jasonf
20-02-2007, 12:05 AM
I know, I'm stating the obvious, but something has just struck me..
and I know, I'm monologuing...
I've just spent the last hour thinking about how my tetris game is going to fit together, I've not written a line of real code, All I've done is build my class definitions. I'm going to have to pad them out later with the guts of the code, but at the moment, I'm in design mode. I may change the design, but right now, what's on the screen seems to work in my head, and I'm not going any further until I'm sure.
I work for a large IT company for my bread & butter so I'm no stranger to the design process, I've come from a pretty basic 'Hack it & See' approach to software development, but that was a long time ago, I've learned from many many mistakes and no longer rush in where angels fear to tread... ish... mostly.. sometimes.
My design doc for my game was written to get the basic idea for what I want to do out of my head and onto another medium where I can scrutinise it.., now, I feel that's been done, enough to get started anyway.. I get to the part where I'm designing classes.. When I'm done, I'll update the design doc and scrutinise it again, but at the moment, I need to see how things will work out..
This is where I think Pascals real strengths lie, and a lot of people miss this when jumping on the latest & greatest language band wagon.
I can see why Pascal is still taught in Uni, It's great for teaching codeaholics to step away from the immediate implementation and think about the structure. Some people may think that it's a terrible faff to have to do all this definition stuff up front, afterall, the compiler should be smart enough to figure out what needs to be compiled on it's own.. but that's not the point. The point is, it's way too easy to dive in and code.. too easy by far to rush in, write a load of classes then once you're elbow deep in language, you can't see the design for the bugs. The point is, you have to work it out properly.
Take VB.net for instance, it's a piece of cake to just write classes to solve problems, spend long enough without a design with all that OO power and you'll end up in a world of hurt.. I don't know about anyone else, but I can't hold an entire project's class structure in my head.. am I the only one?. I've fallen for this in VB before, I started writing a version of Chaos in VB, I knew the game mechanics very well, being a fan of the original game and started throwing the game together and I REALLY wanted it to be great. It began quite well, I'd got a bunch of classes to handle things , but very quickly the small faults in the design became big faults, which I had to code around. I'd not given myself the chance to look at the design at a higher level and think, "Is this the right way to do this?".. I could of course have written it all on paper and worked it out, but who enjoys doing that?
As a result, Chaos died.
The other thing is, pascal punishes the rush ahead mentality, especially if you've made a mistake. It's done it to me several times in the past. There you are, writing away.. you've got everything worked out.. you believe.. then something you didn't consider appears and bites you in the ass.. you have to rethink your entire design and hack out a lot of code. So, the next time, you take a bit more time over the definition stage and get it right. Some languages like VB make it easy to rethink and rehash the design, this can be good... if you've taken care of all the loose ends.. but what happens most of the time is, code gets left in there, bugs creep in, there's no overrall plan to tell you that X function is no longer needed or Y procedure has the wrong parameters. Basically, it becomes a mess.
So, It's midnight, I'm at the end of my monologue and hopefully, I've explained why I think Pascal is a brilliant language. I know, I'm stating the obvious, but sometimes... you have to walk outside and say.. Damn, the air smells sweet.
this monologue was sponsored by a rather cheeky little ros?© from Spain, so apologies if this sounds like a bucket full of drunken psuedo-knowldege.
and I know, I'm monologuing...
I've just spent the last hour thinking about how my tetris game is going to fit together, I've not written a line of real code, All I've done is build my class definitions. I'm going to have to pad them out later with the guts of the code, but at the moment, I'm in design mode. I may change the design, but right now, what's on the screen seems to work in my head, and I'm not going any further until I'm sure.
I work for a large IT company for my bread & butter so I'm no stranger to the design process, I've come from a pretty basic 'Hack it & See' approach to software development, but that was a long time ago, I've learned from many many mistakes and no longer rush in where angels fear to tread... ish... mostly.. sometimes.
My design doc for my game was written to get the basic idea for what I want to do out of my head and onto another medium where I can scrutinise it.., now, I feel that's been done, enough to get started anyway.. I get to the part where I'm designing classes.. When I'm done, I'll update the design doc and scrutinise it again, but at the moment, I need to see how things will work out..
This is where I think Pascals real strengths lie, and a lot of people miss this when jumping on the latest & greatest language band wagon.
I can see why Pascal is still taught in Uni, It's great for teaching codeaholics to step away from the immediate implementation and think about the structure. Some people may think that it's a terrible faff to have to do all this definition stuff up front, afterall, the compiler should be smart enough to figure out what needs to be compiled on it's own.. but that's not the point. The point is, it's way too easy to dive in and code.. too easy by far to rush in, write a load of classes then once you're elbow deep in language, you can't see the design for the bugs. The point is, you have to work it out properly.
Take VB.net for instance, it's a piece of cake to just write classes to solve problems, spend long enough without a design with all that OO power and you'll end up in a world of hurt.. I don't know about anyone else, but I can't hold an entire project's class structure in my head.. am I the only one?. I've fallen for this in VB before, I started writing a version of Chaos in VB, I knew the game mechanics very well, being a fan of the original game and started throwing the game together and I REALLY wanted it to be great. It began quite well, I'd got a bunch of classes to handle things , but very quickly the small faults in the design became big faults, which I had to code around. I'd not given myself the chance to look at the design at a higher level and think, "Is this the right way to do this?".. I could of course have written it all on paper and worked it out, but who enjoys doing that?
As a result, Chaos died.
The other thing is, pascal punishes the rush ahead mentality, especially if you've made a mistake. It's done it to me several times in the past. There you are, writing away.. you've got everything worked out.. you believe.. then something you didn't consider appears and bites you in the ass.. you have to rethink your entire design and hack out a lot of code. So, the next time, you take a bit more time over the definition stage and get it right. Some languages like VB make it easy to rethink and rehash the design, this can be good... if you've taken care of all the loose ends.. but what happens most of the time is, code gets left in there, bugs creep in, there's no overrall plan to tell you that X function is no longer needed or Y procedure has the wrong parameters. Basically, it becomes a mess.
So, It's midnight, I'm at the end of my monologue and hopefully, I've explained why I think Pascal is a brilliant language. I know, I'm stating the obvious, but sometimes... you have to walk outside and say.. Damn, the air smells sweet.
this monologue was sponsored by a rather cheeky little ros?© from Spain, so apologies if this sounds like a bucket full of drunken psuedo-knowldege.