Recently
Over the past week or so I’ve been reading a story written by a friend of mine. I’m sure I’ve mentioned this before.
It’s a really good piece of fiction set in the Star Wars universe, shortly after the battle of Hoth. It follows a small band of survivors from the battle as they try to make their way to safety across the ice ball. It also details what happened once the Imperial forces had taken over the Rebel command centre on Hoth, too.
For those unsure, the battle of Hoth took place during the first 30-40 minutes of Star Wars Episode V: The Empire Strikes Back.
Another thing that had happened recently, is that I’ve been bitten by the programming bug.
Ever since graduating, I’ve occasionally had to battle a very intense need to program something, anything. I’ve been writing lots of silly little programs that do very little, and take seconds to compute. I’m thinking of putting more than a few of them up on my website, but that’ll have to wait until the weekend at least.
One of the (many, many) reasons – aside from being a programmer, of course – I’ve been bitten by this bug, is because my contract of employment is due to run out in 7 weeks time and that means I’ll be unemployed again. So, I’ve taken this time to air out my programming skills and start earning some major kudos by coming up with as many program ideas as I can.
Side note: “Program” as in to program a computer – is is “Program” or “Programme”? I can never remember
I really want to, finally, get into a games programming role somewhere, and bolstering my portfolio of work with some working titles (even if they are naff) will help me to apply to those jobs.
You see, much like a graphic artist, programmers need a portfolio of work to show off. The final program itself doesn’t really matter, it’s the steps that the programmer has been through to create that program, and the “elegance” of the code.
For instance:
[sourcecode language=”cpp”]
/* famous "hello world" code */
using namespace std;
int main () {
char ch;
cout << "Hello world" << endl;
cin >> ch;
return 0;
}
[/sourcecode]
Is not very elegant as a first time programmer might not know what lines 4 and 6 do. However:
[sourcecode language=”cpp”]
/* famous "hello world" code */
// this code uses a char type called ch
// to hold the input returned by the user
// in an effort to stop the program from
// executing too quickly for the user to
// see it
using namespace std;
int main () {
char ch; //here we create a char
cout << "Hello world" << endl;
cin >> ch; //here we use the char to
//temporarily halt the program
return 0;
}
[/sourcecode]
Makes a lot more sense, as the program’s function is explained to the reader.
Anyway, there are volumes and volumes on code elegance, and I shan’t repeat what they say verbatim.
What Else?
That’s pretty much all that I’ve been up to, to be completely honest. Although, I did purchase the components for a PC upgrade last week. When it was delivered, I checked the invoice details with the items I was sent and it turns out that the company had sent me the wrong ram. This means that my PC has sat idle, without ram throughout the entire weekend. Which is why I haven’t been able to upload any of the code I’ve written recently
That’s about it, really. that’s all I’ve been doing since I last posted.
I’ve another post lined up for later on today/at some point tomorrow, though.
Stay tuned.