Programmer's Block

Started by
12 comments, last by Inmate2993 18 years, 9 months ago
But it is possible to change your laziness.

edit: Not saying the OP is, though.
Advertisement
Quote:Original post by Spoonbender
Quote:Original post by Andrew Russell
Avoid the design documents.


Seconded. Just sit down and code whatever you want to. Look at it as a prototype. If you ever get it working, you can start making big design documents and actually doing it all "properly". But for just getting started, the best way is to just jump into it, and solve the problems as they occur, rather than trying to plan everything out form the beginning.


This is a really good point. Not everything design-wise can be forseen in every project. Thank dog for refactoring! [smile] Nobody codes the perfect program the first time.

And yes... break down the problem into the smallest pieces that vary. Each of these pieces can map directly to a polymorphic concrete class (if you're using OOP).

If your problem is just coming up with ideas... just sit down and code something from the seat of your pants... that one app/game you wish was out there... it doesn't have to be perfect, at first. Evolving code is a GOOD THING™
my_life:          nop          jmp my_life
[ Keep track of your TDD cycle using "The Death Star" ] [ Verge Video Editor Support Forums ] [ Principles of Verg-o-nomics ] [ "t00t-orials" ]
To expand on what Verg said, Refactor Mercilessly. I'd take some of the stuff on that page with a very large grain of salt - "extreme programming" can be just as dangerous as it is helpful for hobbyist/inexperienced coders (that's another thread, though) - but the general principle is a good one.

I used to be scared of refactoring code. Once something was written, I'd tweak the parameters of the functions or whatever to minimize the code impact - even on new projects where I was the only programmer affected. It created a lot of hideous code. These days, when I discover I need to rearrange or even totally rebuild some code, I do it, and my code is visibly better for it. When you're reluctant to refactor, it can make procastination worse, because you don't want to mess with the code... but you can't finish X until the code is fixed... but you don't want to mess with the code... so X doesn't get finished... and without X, Y and Foo won't work... and then you turn off the monitor in disgust, and wake up 48 hours later with a hangover and a discarded project (ok, maybe not that extreme).

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Advice: Take the opportunity to study some concepts you don't know yet.

Programmer's Block is half a problem of poor organization, and half a problem of not being able to visualize a solution. The organization part, I can't really help you there. Read some documents by Knuth and Richie and learn how the pros deal with stuff like formatting and breaking down problems. As for being able to visualize a solution, develop a mental toolbox of programming concepts, so that when a problem comes up, you'll have a wide array of possible solutions.

If you've been to college, then you probably already know Linked Lists, Trees, Quick Sort. What you probably don't know is stuff like Message Digesting (MD5 Hashing for example) and Secure Hash Algorythms. These are hard, but worth at least figuring out what they're used for, the basic idea behind the process. You can skip the implementation, just get the theory.

Another thing, which is a lot simpler, is just test some odd functions that you never really payed any mind to before. Like the xor operator. Write a short program just to show you what (x^0x55) yields for x's between 0 and 255.
william bubel

This topic is closed to new replies.

Advertisement