doctor insidious blog header photo
doctor insidious's c-blog
Posts 0Blogs 23Following 0Followers 10



Programming Advice #1

I am bored. Sitting here in the middle of class, you would expect I'd have something to preoccupy myself with.
I don't. This class is called "Intro to Java", and it's the only programming class I was able to take freshman year. From what you've read in my blog so far, would you consider me a "beginner" programmer? God I hope not, I've worked to fucking hard for that.
Anyway, this brings me to the meat of my blog. I came up with an adage for you aspiring programmers, and I liked it. I decided that I'd come up with more and share them with you, like a weekly/monthly thing. So anyway, here's the first one (I really hope I didn't subconsciously steal this from someone):
"Assume the users wants to do everything and nothing and has no idea how."
This compact statement tells of the importance of three things:
-Memory management
-Program protection
-User interface

He wants to do everything, memory management:
Most newbie programmers don't really consider how important this is. He will allocate a block of memory and say "This is how much input you can enter" (creating a character array). This would be like if the people who made Open Office decided that one can only type up to 1,000 pages, and that was it. Sure not a lot of people want to write a book that long, but there are still people who want to.
case in point...

He wants to do nothing, program protection:
This is pretty obvious. Remember, when you are writing a program, don't forget: Error checking, Error checking, Error checking, Error checking, Error checking. What is error checking? Well, say you write a program that gets a random integer and divides it by an integer taken from input (why? No idea). You could right your program seemingly perfectly, but in the end, what if the user enters the number zero?
you can't divide by zero!

How the hell?... user interface:
Don't let other people tell you otherwise: If you have a great program with terrible user interface, you are only doing have the job. Programs should be easy to start and get into, or at least include a manual. What would it be like if when you started up a video game you had to press the A and B button to move through the menu and press down the left analogue stick to select the menu item. While all of you people would be kinda interested messing around with it, I'd be in another room, KILLING MYSELF.
This is good UI (thank god for emacs):

So I hope all you beginning programmers were interested a little bit. I certainly like the quote.
One last thing, how did the word "noggertits" (see last blog) become popular (kind off not really)?! I'm a go and drink some hard cider.
Login to vote this up!


doctor insidious   



Please login (or) make a quick account (free)
to view and post comments.

 Login with Twitter

 Login with Dtoid

Three day old threads are only visible to verified humans - this helps our small community management team stay on top of spam

Sorry for the extra step!


About doctor insidiousone of us since 5:40 PM on 02.16.2009

Hi, my name is Matt, but you can call me doctor insidious, because that is much more awesome.
My top ten games:
9. Sam and Max
8. Gears 2
7. Tap Tap Revenge
6. We <3 Katamari
5. Castle Crashers
4. Persona 3
3. Braid
2. Crayon Physics
1. Cave Story

I am one of the few people who actually know how to program in this world. And by program I mean know how to use pointers.

#include <stdio.h>

#define COCKS 0

int main (int argc, char **argv)
printf("Hi I'm doctor insidious\n"
"This is the most useless program I have ever seen\n");
return COCKS;