?

Log in

Green eggs and Sam [entries|archive|friends|userinfo]
Sam Barham

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Ear worms [Dec. 5th, 2006|08:46 am]
Sam Barham
Schnee Schna Schnappi,
Schnappi, Schnappi, Schnappi,
Schnee Schna Schnappi,
Shoot me in the head.
linkpost comment

Just one o' them... [Sep. 8th, 2006|01:17 pm]
Sam Barham
'...heres a cool link' posts.

Look here for a large list of quotes about computing and software development and stuff, including this gem:

The behavior of any bureaucratic organization can best be understood by assuming that it is controlled by a secret cabal of its enemies.

Robert Conquest's Second Law of Politics
link2 comments|post comment

I'm switching jobs! [Aug. 25th, 2006|11:26 am]
Sam Barham
I imagine that most of my dear readers know this already, but I have resigned from ARL, and will be starting a new job at Straylight Studios, near the uni her in Dunedin.

Its cool, with a side order of groovy.

Although its also a bit of a risk and stuff, so lets just wait and see how it all turns out.
link2 comments|post comment

(no subject) [Aug. 14th, 2006|04:16 pm]
Sam Barham
So, more on my supposeed computer game. Its ticking along nicely, and is not at the point where I can post a screenshot without everyone bursting out laughing and how crappy it is (feel free to do so, of course). Its quite exciting, because all I need to do is slap in some networking code (harder than it sounds, but still faily easy) and it will be PLAYABLE!!!! w00t w00t!!!

It'll still be crappy and stupid and all that, but thats not the point. It'll be able to be played, so that it'll be possible to get Real People's thoughts on it (even if I have to strap them down in order to get them to play it.

Right. Screen shot time...

link4 comments|post comment

(no subject) [Aug. 9th, 2006|02:40 pm]
Sam Barham
So, long time, no write and all that.

I'm starting (yet again, for the Nth time) to write a computer game. Its something I do periodically, but I never finish. I'm too much of a team based worker to get anything done on my own. Hopefully this one will be different, cause its way simple. My natural inclination when designing games and stuff is to make them too complex, with layers and layers and details and systems and so on, so this time I'm making a concerted effort to keep it simple.

The idea? I'm going to assume most of you know of the game Civilisation. For those of you who don't, its one of the most important computer games ever (as in 'biggest impact on computer game-dom). You play as the controller of a civilisation (romans, americans, english....) starting out at 2000BC, and guiding them until ~2050AD or so, building cities and armies and making war and developing technologies from the wheel to the internet and dealing with unhappy populaces and stuff. Its usually played solo against the computer, although you can play it multiplayer as well. A full game from beginning to end takes a good 4-5 hour of actual play time, minimum.

Well, my game is going to be all of that, only playable in about 5- minutes. Plus humour.

At the moment, I don't have much more than a rotatable sphere on the screen that you can click on to build 'cities'. I'll tell more when there is more to tell.

Oh yeah, and I'm fasting from painting miniatures for 40 days (17 days to go I think). No painting. And I've got my Avatar of Menoth (warning, bunch of data at that link) sitting on my painting table waiting to be finished. I've done a massive (for me) conversion project on it, and its an absolutely gorgeous model, so its not easy waiting to be able to paint it.

And the day after the fast ends I'm entering a tournament that I'd really like to have it painted up for.
link12 comments|post comment

Hacking [Jun. 29th, 2006|09:18 am]
Sam Barham
I recently got a model as part of my prize for winning Southcon. Last time I won, I changed the pose of the model I got, so I figured I may as well continue the tradition. So I started cutting up this expensive piece of pewter... You can follow my progress/failure here.


Also, Ian (my boss) just got back from foreign parts, and he's scary happy. As in so happy that its scary, and everyone is kind of trying to keep a low profile in case he notices us and focuses his evil happy beam on us and we disintegrate or something.
link4 comments|post comment

Found on the packaging for a programmable keyboard [Jun. 8th, 2006|11:16 am]
Sam Barham
Important--Read Carefully before Opening.
By breaking the seal on this package you are agreeing that you have indeed broken the seal on this package. If you do not agree to this condition then promptly place this package in an inconspicuous place and claim that you never touched it.
link6 comments|post comment

Nerdery and models [Jun. 6th, 2006|02:56 pm]
Sam Barham
One of the guys in my bible study group got married a wee while ago, and another friend asked him if he was going to open source his wedding. So he turned up a few weeks later with the source code to said wedding. And its open source, so I can stick it here too :)

So, the source code required to execute a wedding is ... (Warning for coders. He used incorrect c++ deliberately to make it more readable for non-coders)



/* The source code to my wedding. Please do not notify me of errors in the code.
Copyright (C) 2006 Hadyn Youens

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*/

// Includes
#include "stdafx.h"
#include "wedding.h"
#include "mydatetime.h"
#include "money.h"
#include "_money.h"
#include "__money.h"
#include "___money.h"
#include "guests.h"
#include "music.h"
#include "components.h"
#include "gifts.h"
#include "honeymoon.h"
#include "weather.h"
#include "bride.h"
#include "bridegroom.h"
#include "backup.h"

// Defines
#define MAX_GIFTS 10000
#define COST_OF_RINGS 25000
#define NUM_GUESTS 3000

int _tmain(int argc, _TCHAR* argv[])
{
// Wedding date
date dday = new date(4,2,2006);
// Bank account balance
double my_bal = bank.myaccount.getbalance();
// Create bride
Bride bride = new Bride();
// Create groom
Bridegroom groom = new Bridegroom();

// Organise the wedding
while (today() != dday) {
my_bal = mybal - 100;

if (not_complete("honeymoon") && rand() < 0.5) {get_honeymoon();}
if (not_complete("rings") && rand() < 0.5) {get_rings();}
if (not_complete("church") && rand() < 0.6) {get_church();}
if (not_complete("pastor") && rand() < 0.8) {get_pastor();}
if (not_complete("photographer") && rand() < 0.7) {get_photographer();}
if (not_complete("music") && rand() < 0.4) {get_music();}
if (not_complete("bridal_party") && rand() < 0.8) {get_friends();}
if (not_complete("suits") && rand() < 0.6) {get_suits();}
if (not_complete("dress") && rand() < 0.7) {get_dress();}
if (not_complete("food") && rand() < 0.9) {get_food();}
if (not_complete("reception") && rand() < 0.5) {get_reception();}
if (not_complete("cars") && rand() < 0.5) {get_cars();}
if (not_complete("invitations") && rand() < 0.8) {get_invitations();}

bride.setStresslevel(bride.getStresslevel() * 10);
groom.setStresslevel(groom.getStresslevel() + 1);
}
// Create guests
Guest guests[NUM_GUESTS];

for (int i=0; i++; i
[Error: Irreparable invalid markup ('<num_guests)>') in entry. Owner must fix manually. Raw contents below.]

One of the guys in my bible study group got married a wee while ago, and another friend asked him if he was going to open source his wedding. So he turned up a few weeks later with the source code to said wedding. And its open source, so I can stick it here too :)

So, the source code required to execute a wedding is ... (Warning for coders. He used incorrect c++ deliberately to make it more readable for non-coders)



/* The source code to my wedding. Please do not notify me of errors in the code.
Copyright (C) 2006 Hadyn Youens

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*/

// Includes
#include "stdafx.h"
#include "wedding.h"
#include "mydatetime.h"
#include "money.h"
#include "_money.h"
#include "__money.h"
#include "___money.h"
#include "guests.h"
#include "music.h"
#include "components.h"
#include "gifts.h"
#include "honeymoon.h"
#include "weather.h"
#include "bride.h"
#include "bridegroom.h"
#include "backup.h"

// Defines
#define MAX_GIFTS 10000
#define COST_OF_RINGS 25000
#define NUM_GUESTS 3000

int _tmain(int argc, _TCHAR* argv[])
{
// Wedding date
date dday = new date(4,2,2006);
// Bank account balance
double my_bal = bank.myaccount.getbalance();
// Create bride
Bride bride = new Bride();
// Create groom
Bridegroom groom = new Bridegroom();

// Organise the wedding
while (today() != dday) {
my_bal = mybal - 100;

if (not_complete("honeymoon") && rand() < 0.5) {get_honeymoon();}
if (not_complete("rings") && rand() < 0.5) {get_rings();}
if (not_complete("church") && rand() < 0.6) {get_church();}
if (not_complete("pastor") && rand() < 0.8) {get_pastor();}
if (not_complete("photographer") && rand() < 0.7) {get_photographer();}
if (not_complete("music") && rand() < 0.4) {get_music();}
if (not_complete("bridal_party") && rand() < 0.8) {get_friends();}
if (not_complete("suits") && rand() < 0.6) {get_suits();}
if (not_complete("dress") && rand() < 0.7) {get_dress();}
if (not_complete("food") && rand() < 0.9) {get_food();}
if (not_complete("reception") && rand() < 0.5) {get_reception();}
if (not_complete("cars") && rand() < 0.5) {get_cars();}
if (not_complete("invitations") && rand() < 0.8) {get_invitations();}

bride.setStresslevel(bride.getStresslevel() * 10);
groom.setStresslevel(groom.getStresslevel() + 1);
}
// Create guests
Guest guests[NUM_GUESTS];

for (int i=0; i++; i<NUM_GUESTS) {
guests[i] = new Guest();
}

bride.setStresslevel(bride.getStresslevel() * 10);
groom.setStresslevel(groom.getStresslevel() - 20);

// Remove any guests without gifts
for (int i=0; i++; i<NUM_GUESTS) {
if (guests[i].gift == NULL) {
delete guests[i];
}
}

// Check to see if there are any guests left
int anyleft;
for (int i=0; i++; i<NUM_GUESTS) {
if (guests[i].gift != NULL) {
anyleft++;
}
}

// If there are no guests left, create a rent a crowd
if (anyleft == 0) {
People rent_a_crowd = new People(3000);
anyleft = 3000;
mybal = mybal - 500;
}

// Start the groom
groom.execute();

// Wait for the bride
char tmp;
cout << "Press enter when the bride arrives..." << endl;
cin >> tmp;

music(0); // Start the first instance of the music
bride.execute(); // Start bride
tears(); // Start tears
smile(); // Smile
pastor(0); // Start the first instance of the pastor
music(1); // Start the second instance of the music
pastor(1); // Start the second instance of the pastor

// If the bride doesn't say "I do", get out of there
if (bride.getResponse() != "I do") {
tears();
exit(false);
}

// If the best man doesn't have the ring, remove him
// and promote the groomsman
if (groom.bestman.get_rings() == NULL) {
delete groom.bestman;
groom.bestman = groom.groomsman[0];
groom.setStresslevel(groom.getStresslevel() + 2);
groom.getBackupRing();
}else {
rings();
}

kiss(groom, bride); // Start the kiss
bride.blush(); // Start the brides blush
smile(); // Start the smiles

// Begin the photographs
photos(photographer);
photos(guests);
bride.setStesslevel(bride.getStesslevel() + 3);
groom.setStesslevel(groom.getStesslevel() + 30);

// Remove all guests with an inappropriate speech
for (int i=0; i++; i<anyleft) {
if (guests[i].inappropriateSpeech) {
delete guests[i];
}
}

reception(); // Start reception
speeches(); // Start the speeches

// Remove the drunks
for (int i=0; i++; i<anyleft) {
if (guests[i].getBloodAlcoholLevel() > 80) {
delete guests[i];
}
}

// Get rid of everyone else
delete groom.bestman;
delete [] groom.groomsman;
delete [] bride.bridesmaid;
delete [] guests;

// No money left
if (mybal > 0) {
mybal = 0;
}

// Time for the honeymoon
exit(HONEYMOON);
}



In other news, I went to a WARMACHINE tournament on Sunday, where I won first place, and the painting prize too!!!!! You can see a (crappy, blurry) picture of the winning model <a href="http://forums.privateerpress.com/index.php?showtopic=82226">here</a>. Not only that, but for approximately 22 hours I had no unpainted models, which hasn't happened since I started painting about 15 years ago. It was a slightly weird feeling, so I went and spent some of my tounament winnings on new figures.
link2 comments|post comment

Hi ho, hi ho, its off to inflict pain and death on strangers I go! [May. 31st, 2006|01:40 pm]
Sam Barham
So I'm going to the Southcon wargaming tournament on sunday, where I'm technically the reigning champion for WarMachine (I won last year, but there were only four entrants including the organiser, and two of them hadn't played much, so I don't know if it really counts). Not really anything to say about that, but I felt like updating. I've been doing a bunch of painting recently so that my minis are fully painted, and now I'm 6 models away from the elusive fully painted collection. It'll feel slightly weird to have no minis sitting on the painting table.

Oh well, hopefully if I win the prize will be more models, which will cure that nicely.


On a different note, this is a very interesting read, if rather long.
link5 comments|post comment

Moonraker [May. 11th, 2006|10:28 am]
Sam Barham
We watched moonraker last night withg my bible study group, and I have to say it is one of the silliest movies ever. We are all fans, to one degree or another, of Mystery Science Theatre, so we spent the whole time commenting on it, with much hilarity. I don't drink much, if at all, but we did come up with a good drinking game:

Moonraker drinking game:
Watch moonraker. Every time you see a scantily clad young lady, or Bond kisses/sleeps with/otherwise sexually harrases said ladies, you drink.

You'll be paralytic within half an hour.
link5 comments|post comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]