The random rantings of a concerned programmer.

Archive for May, 2006

Untitled

May 23rd, 2006 | Category: Uncategorized

LOL.

I love how the OP says, explicitly, that he doesn’t want to learn C/C++ and the first 3 posts are “Hey, here’s how you learn C++”. Seriously. LOL. I may be a C++ bastard myself, but at least I don’t actively try to oppress people with it (forced suicide, anyone?).

Then again, I’ve seen the same thing done with other languages. Sheesh, what ever happened to “open-mindedness”?

(Oh, and Java still sucks, btw)

9 comments

Untitled

May 20th, 2006 | Category: Uncategorized

Uhhhhh… bugs bugs and more bugs. Shit got really messy, but I think I’ve cleaned most of it up. Here’s a screenie of the current progress -

Yeah, I know I’m a slow coder. I have the internet to blame (code a line, browse for 10 minutes…) Anyway, can anyone see what’s wrong in the below code?

// deletes a component from a map of sets.
void delComponent( ComponentType* component ) {
        //  THIS PART IS A MAP ( string here ) // THIS PART IS A SET //
	_components[ component->getClassName() ].erase( *component );
}

// components are sorted in an ordered set; to change the
// key you have to take it out and put it back in. This 
// function does that.
ComponentType* refileComponent( ComponentType* component, std::string newClassName ) {
	// create a new component object
	ComponentType* newComponent = addComponent( newClassName );

	// fill it with data from the old one
	*newComponent = *component; // omg assignment operation?

	// delete the old one
	delComponent( component );

	// return the new one
	return newComponent;
}

Cookies for the first person who can find the bug. Oh, and my code doesn’t really have comments like that. Well, except for the “omg assignment operation?” because I wasn’t 100% sure how that would be handled when I wrote it. And I also removed the fix, to add suspense.

Anyway, find that bug, and under what circumstances it will crash the system!!

EDIT: Oh, and a precondition of both functions is that the ComponentType* passed is non-NULL. Dur dur :D

6 comments

Untitled

May 17th, 2006 | Category: Uncategorized

I decided I was going to order Exceptional C++ today. I browsed around for prices on the internet, checked my paypal account, discovered I’m poor, and was forced to decide against it.

On a sidenote, I changed up my schedule today – instead of playing Maple and procrastinating, I instead coded something and procrastinated more.

I’ve decided to lay out the whole interface before adding most of the functionality. Right now, the only thing that “does anything” is the size and image fields.

This demonstrates a key flaw of the current GUI framework – there is no OnChange event for text fields. There isn’t even an OnEvent to handle a return. So all those “submit” buttons are a necessity, sadly. I guess I could have hacked something together whereby it would process changes on a lose focus event (I think it has those) but that would have been messier :<

The large empty area at the bottom is being saved for hardpoints. I still haven’t quite figured out whether or not I want a separate window to make those; but we’ll see. I’m pretty happy with how this is looking so far.

After the component editor, there are very few things left to create before getting down to writing the actual game. I’m going to try and delay that part long enough so I can get to see the 4E5 rules for the summer – at this point I could use these content creation tools to pretty much do anything.

Or so my strategy goes, we’ll have to see what 4E5 pans out. I doubt it’ll be “Superpig, Washu’s Tentacles, Spoonbender’s Army, and Stompy’s Smilies”, but you never know.

I have to say, it would be bloody awesome to take a Superpig as a chasis, add a Stompy smiley as the head, and attach Washu tentacles as the weapons. But I diverge.

And divulge. Too much. There will be a knock on your door shortly.

But lol, don’t worry about me competition wise. Everyone knows I never actually get any work done :D

4 comments

Untitled

May 17th, 2006 | Category: Uncategorized

My conclusion is that no one reads journals anymore. Or at least, no one seems to be leaving comments in any journals anymore. Even I haven’t been leaving many comments.

Evidence #1

Now, I’m too tired and/or lazy to crunch numbers tonight, but if you look at the overall volume of comments per week, you’d see a definite downward trend. If you take some of the more popular journals, like Stompy’s, Washu’s, EDI’s, and others, you’ll notice that recent entries don’t have many comments anymore.

Another observation is first-post comments – in some of the journals there aren’t even any first-post comments! Seriously! What the hell has happened? I remember ever journal getting 10+ comments and obligatory rate++’s for donating to our wonderful site, but these days I hardly see any of that.

I’m not trying to start a new omfg journal movement or anything, far from it. But personally, I’m going to try to comment in other people’s journals more, and encourage everyone else to do the same. From a writer’s perspective, comments are an enjoyably way to reap benefits from your work, and to gain constructive criticisms on your current projects.

So please, think of the kittens.

11 comments

Untitled

May 13th, 2006 | Category: Uncategorized

Okay, so I’m back home. Hooray.

I have an old box which I’d like to make useful, but I’m not sure what to use it for. A major limiting factor at this point is the OS – WinME. I tried to install OpenBSD on it tonight, but my efforts were easily defeated by being unable to create a proper bootable CD (even from an ISO). Don’t know what I was doing wrong, but I know the system supports it – the restore CD doesn’t require a floppy to boot from.

Anyway, some possibilities for this box so far -

  • HTTP Server: This would be an easy option, probably just involving installing Apache or some other software on it. I’m not quite sure what I’d use it for, however…

  • Subversion (or other version control software): this actually would serve a purpose, however, the server doesn’t support WinME. Which means I’d have to switch to another OS, which is painful.
  • Host some game or something – requires me to actually have something to host. And could potentially eat up a lot of bandwidth, and I’m not sure about my limitations.

Another major problem at this point (especially with OpenBSD) is that I’m running almost 100% off a wireless connection. OpenBSD’s driver support for that sort of hardware is absolute shite (because of their free-distribution policy) and I’d probably end up having to buy a bridge for it to work. Which is expensive and I am poor.

So I guess what I’m looking for is an easy, cheap fun thing I can do with this machine. That isn’t smashing it or otherwise destroying it, because its still in perfect working order (except for the OS, which was never in working order).

Suggestions/comments/ideas ? :(

6 comments

« Previous PageNext Page »