|Oct 14, 2009, 03:16 AM||#1|
Hardcore Monkey Moderator
Join Date: Feb 2007
Location: Cheeseland (Wisconsin, USA)
Posts: 12,110 (5.28/day)
Thanked 5,488 Times in 2,932 Posts
How to deal with coding dillemnas
The P&W forums have been a tad serious lately.
This is normal as when people are coding something they tend to focus only on the task at hand and have difficulty separating themselves from their given/chosen quest.
So, I figured I would write a little essay that will both inform people and with a bit of added humor, set them back on the right mindset for coding and also clue them in as to what they can expect from people here on TPU.
We can categorize coding problems in a few ways. Let's look at them;
Issue : I have no !@#$ idea what I am doing
This is the curse that plagues all new coders. They are trying to write a program for a class at school or got tossed into a work project that is somewhat beyond their current expertise.
Answer : Relax
If you are a student simply follow these guidelines.
1)Start your project as soon as you get the assignment, do not wait until the night before it is due or we won't be able to help you. We will not do your homework for you. We will be happy to explain anything you are not clear on. We will not charge you. We are better than the assistants at your university. But hey, it's your call.
2)Never assume that your question is too basic or that you are embarrassed to ask a question. Just remember that as Ceasar was dying he said “Et tu, Brutus”? Well, duh. Brutie-tootie was standing there with a knife in his hand, wasn't he? No question is too stupid. No one is born knowing how to program and everyone who has the motivation to learn will have questions. We are here to help.
If you are in the workforce, follow these simple guidelines.
1) Read student section #1 above.
2) Read student section #2 above.
Issue : It's a lot of typing and I'm not very good at typing.
Answer : Practice
You're at a computer. The input device is a keyboard unless you have some kind of speech recognition software. Deal with it … and learn how to spell for God's sake. If you put a comment in your code like …
// we cin jus caluatrate the fomule her.
Issue : I wrote some code, but now can't figure out what it does
Answer : Use a consistent coding format
Name all variables by what they contain, do not use cryptic constants, do not purposely obfuscate your code (unless it is a requirement), and for the love of all, do not use GOTOs if you can avoid it. GOTOs are a leftover from an era when coders had to quick write something to get it working before they were eaten by dinosaurs. Do you honestly believe that a month after you write a line like “var a = b+ c * (b/c)*d” you will remember what it does? Do you know how many coders have died from writing bad code after the poor schmuck who ended up maintaining their code could no longer stand it, hunted them down and capped their sorry butt? A lot. But you never hear it on the news because it is covered up. Kind of like a special forces mission, only different.
Issue : I can't come up with a good idea for a new program
Answer : Write Tetris clones until you are so bored that you spleen reaches up and skewers your brain
This always works.
Issue : I don't like the code I wrote
Answer : This is called “Coders' Block”
It usually manifests itself in a manner which sneaks up on you. One day you are pounding out line after line, and the next you are deleting a months worth of work.
Coders' tend to be their own worst critics (which is not a bad thing), but when you are trying to optimize a statement like “MyVar = 10”, you know it's time to take a break.
Turn off the computer (if you are at work, just walk away from it). Go outside and take a deep breath (not recommended in Los Angeles and some parts of Detroit), Come to the realization that you are becoming a coding zombie and it's time to do …. anything different for awhile. My personal preference is to drink a copious amount of beer and ride through all kinds of muddy trails on my ATV. If you live in a urban or suburban environment where you cannot get out into a peaceful setting, I would recommend just stalking your neighbors kids. It's always a barrel of laughs. Guns really help to take your mind off of programming woes too, even if they are pointed at you.
Issue : This post did not cover my problem
Answer : While we try to cover everything most of us are not experts in proctology. See your doctor.
While I obviously could not cover all the issues that coders' face, I hope that this little foray into some of the issues helped you out. If not, who cares, I've got code to write.
Cloud (noun, singular): A dynamic arrangement of multiple potential single points of failure, with a user at one end and their data at the other.
Get more tech news on a wide variety of topics at NextPowerUp
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Virus - Please solve me how to deal with this virus||freebird_9924||General Software||72||Dec 3, 2009 03:03 AM|
|Why is xbox incompatible with windows coding?||Sir_Real||Games||97||Jun 5, 2009 02:33 AM|
|[FS] Bad Deal ??? HOW TO GET MONEY FROM A MEMBER HERE>>>>>||sweeper2||Buy/Sell/Trade/Giveaway Forum||12||Jun 3, 2009 12:46 AM|