just finished my final presentation for cs32, the notorious software engineering course in the institution which i study.

i’ve always been aware of the fact that i’m not actually a very good programmer. and that statement is truer than ever after this semester of 32. and i wanted to look at this statement from a variety of angles and tear it apart.

cause 1: i’m not an pre-planning coder  (at all).

i tend to see a problem, think for a while, decide i have a good enough solution and then try to write it up in code.
i get a bug, then change my code to fix it, then iterate this process until it “works”.
this is bad on multiple levels.
i have a good idea of what the structure is in my head, but never a complete picture.

so it’s very easy to say i’ll just write this method or call this variable with a dumb name, or copy and paste this code here and there, and then you base your future on this sort of messy hack of code and so forth and the whole piece of code just spirals out of control.
this gets exponentially worse when you’re writing medium sized projects, especially without an ide which lets you refactor automatically.

so i’m a scrappy programmer, i write things really quickly but they usually don’t always work, and things spiral out of control and become exponentially more difficult to maintain and debug. and i add more if var != null statements, and include more checks, and eventually it works. but by now, it looks like a giant mess which someone popped on.

i can’t really tell if that in itself makes me a shitty programmer, or  just a trait which other people have had success with. this is contrasted against other coders (who i need to give credit to )who meticulously spend lots of time laying the foundations of the project, and thinking and rethinking for a better solution. they don’t start until they’re absolutely sure that there’s nothing better.

i don’t do all of the aforementioned crap without some faulty reasoning.

i have a very short attention span and like to jump between algorithms, and problems in my head. and i find it much more rewarding to see connections between different algorithms and problems than try to solve the same problem three times in progressively cleaner, and more elegant ways. if i have a solution, i usually keep it rather than spending more time to come up with a better one.

i also have a hard time believing that when you’re working on a complex program that you can ever have the whole program in your head. i’m at the peak of biological cognitive abilities. people are sharpest, smartest when they are in their early 20’s. so it’s ok now for me to say you got to practice going through this insane loop with 10 changing variables, and 4 break statements. but i know in 20 years them, there will be no bloody way for me to be executing a task of this cognitive complexity.

i also generally don’t believe that you can predict all the complicated interactions between different parts of the program. so you inevitably have to make modifications so why spend so much time to have this perfect little castle, if it’s going to have to be destructed anyway?

any of you who have made it this far down the post are probably interested in this question. so help me out a little bit and tell me what i should do? is it just always better if i take a painstakingly long time to lay out the foundations and formulate all the problems in my head before i write anything down? do i gain anything from re-attacking the same problem multiple times for a more elegant solution. would that be considered pre-mature design? but those  kinds of design questions are especially important when you start looking at things like threading, concurrency, scalability. what is the distinction between design and programming. is there a divide at all?

is programming inherently an act where you have to keep modifying and adding to the same piece of code again and again as you make it more complex? is there any gain for me in trying to get a perfect solution in the beginning? it seems to me that it’s somewhat related to the concepts of writing a very verbose novel or spending a lot of time debilitating on the word choice for a poem


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s