E-Mail:

How to be a Good Software Programmer

Add to iTunes | Add to YouTube | Add to Google | RSS Feed

I programmed a dog into this live video feed. Can you find him? Go ahead… I’ll give you a couple of seconds to look for him. I have a top five list submitted by Raleigh, full of tips to help you become a good Programmer.

  • Save your code often! You know what it’s like to be working on something only to have the power go out. Imagine losing several hours’ worth of code.
  • Back up your code. This is pretty much the same reason as #1. I backup every night after a day of coding, just as an extra layer of protection.
  • Write proper comments everywhere. Comments are very important. These are useful. WHat if you don’t look at the code for a year? These comments will be helpful later.
  • Keep your code clean. Separate your code into chunks, and use line breaks where you can.
  • Test your code often. Whenever you have made a simple part of code, test it. WHy wait until you’ve written four hundred lines of code before testing? If something doesn’t work… you’ll have to wade through all those lines to find your error.

If you have a top five list related to anything to do with “Geekery” or even something Non-Techie… send them to me! I’m always ready to pass on your knowledge to others.

Want to embed this video on your own site, blog, or forum? Use this code:

60 Comments

Programming in my opinion is one of the hardest thing you can do with computer i actually never tried it but it looks hard though.

Eg. = exempli gratia [eksEMPlee GRAYsheeuh] or [eksEMPlee GRAHteeah]
jsuk ^^
or you could just read it as “for example”
(sorry, im a word-geek… cant help it…)

It’s not “Software Programmer” any more than it’s “Oil Lubricator”.

You don’t lubricate the oil, you lubricate the car with the oil.
You are a Car Lubricator.

You don’t program the software, you program the computer with the software. You are a Computer Programmer.
Sheesh!

These are very good and vital tips! Although I think many programmers would know them, it is still always good to have a healthy reminder :-)

Programming is OK if you know the language. For example, the other night I just wrote three reasonably simple classes for a site I develop to replace hand-coded and complicated data structures with easy objects with useful (private!) properties and (public) accessor methods. They do all kinds of things, from parsing a name into first and last to retrieving a sanitized name for display (First L. instead of First Last) to getting a picture file from the specified year. It even returns a “No Picture” graphic URL instead if the filename that should exist, doesn’t. The name processor isn’t terribly robust, but all the people listed so far have normal names, so I haven’t worried about it.

Saving often and testing frequently are both very good tips. I tend to save after every line or two (or every few minutes) and test each method as I add it. At least, that’s what I did for class development. Top-down is just add a few lines, see if it works right, add a few more…

This is a good list!

Wow, this is pretty useful. I’ll be sure to add comments and organize my code more often.

That’s good. But it’s very basic.

these are good tips i had a problem were my pc crashed will i was encoding i should save after i put or every 5 minutes

ty chris love u live stream

once ive learned visual basic, should i be going on to visual basic c ++ which can get me alot further for careers? ime in high school…

i hava a java program due tonight…….AND ITS NOT DONE! oh no.

what program you use?? and is it for school or what?

Tech InterviewsHow to be a Good Software ProgrammerGimme Gimme Gimme Reasons I Might Never Move to Hawaii Cruise Ship Internet It?s Not Just a Screwdriver The Secret Language of Lovers Whack me in the Face - You Know you Want To Packing Tips

Thanks for posting this Chris.
Btw, my name is Rasmus. Ralle is my nickname. No problem though.

I made a mistake in the top5

When I said “E.g. If the end-user is supposed to input a variable. Check if it is a variable, if not, stop and tell the user.”

I meant “E.g. If the end-user is supposed to input an integer. Check if it is an integer if not, stop and tell the user.”

ok so my mum used to write software and now she can barely turn a computer on, lol. well i lie cuz she did make some sweet brochures with some crappy package she got somewhere.

Is that all chris pirillo does is top 5 lists now?

The first two are good for any work you do on a computer, like Word documents, etc.

Programming can be hard, but it’s also very satisfying. It’s all about coming up with good solutions to tough problems.

I’d like to add, re read your code, and see if theres a better way you could write your code :), I learnt that in my computer science class through experience.

I would like to get into it but the school I’m going to doesn’t have much support on the topic when choosing what college to go to to do it :( Can anyone help me? If not on programming then maybe on something more simple like even computer repairs. What title do i have to go for to be able to do computer repairs? Tap back soon.
Kel

Joshua (DarkenProject)

January 21st, 2008
at 9:59pm

I would recommend the book series “Write Great Code” (published by No Starch Press). I personally own volume 2 “Thinking Low Level, Writing High Level”. I enjoy it because I consider myself to be a programmer for multiple languages and this series is not language specific; it can be used universally.

Overall, I think the most useful tip is Save OFTEN! I can’t remember the countless times I’ve built and ran a program that crashed and took the OS with it. So I’m not just talking about saving to a single Hard Drive: save to externals, save to networks, email yourself a copy of the code, do WHATEVER IT TAKES!

Always a fan,
-Josh

The stream is less laggy then usual.

as a software programmer myself i feel that the easiest thing to do is to create a small dos program software that does all this for me everytime i want to shutdown my computer. I kinda like dos it is the fastest easiest base to program. Maybe if i could let someone who is very good at programming have a look at these codes and make it windows abled.

One more tip, and this one may be the most important one. Version control. Invest in version control software that will retain the previous version of the program that you can revert back to when you royally screw up the new one you are working on. It is similar to backing up your files, but different. This can really save you a lot of work. Rewriting code is worse than writing it the first time.

thanks for the good tips!

Wow i tried programming for a week and got so many errors!!! It sucked! but i did write a calculator code which was pretty sick. But yeah after a shite load of codes one does get a wee bit discouraged.

thanks for the tips, im trying to learn C++ and these are definatly usefull

I am just now starting to jump into the programming world. Hopefully all will go well.

Excellent top 5. I’m currently majoring in computer science and one thing I’ve always noticed is fellow programmers who don’t take advantage of white space and comments. I’ve seen the difference between this and well structured, clean code; it makes a huge difference. Many people try to compress as much code as they can onto the screen and it just makes it more confusing for others and for themselves to read down the road.

These are good hints that I should follow. I try to do these things every time I program. However, every time my code ends up being a mess of code with no comments to be seen. the only thing I do that’s on the list is test my code often, almost every 3rd line.

i havent read the comments but he didnt program the picture of the dog it really is his dog :) when he goes to point to it the hair gets caught on his shirt and lifts up lol chris is so funny

I personnally coded a pice of software in c+ thats announces software using Weatherbug API. It announces via text-to-speech im MS windows called SpeechLib.dl. I didn’t svae it, shut down computer,lost it.

adding to that i then accicdently formated my drive, and i forgot to backup, then lost it it gave me bsod

Good information to know chris i want to be a PC tech but its good to have other skills in the field of computer science

i dont know much about programming but i hope this will help me in learning to program and this was useful

thanks for the advice on getting started in programming

Whenever I am reading code that has been developed for me, I think the most important things are CamelCase and good coding Conventions. I always appreciate when the coder leaves alot of comments for me. Love the stream.

cool blog chris !!

How to be a Good Software ProgrammerGimme Gimme Gimme Reasons I Might Never Move to Hawaii Cruise Ship Internet It’s Not Just a Screwdriver

Ctrl+S is your friend! Sometimes I find myself pressing Ctrl+S after every minor little change.

Along with the 5 rules mentioned (save, backup, comment, keep clean and debug), I divide and conquer as often as possible. Always plan what you do before you do it, tens to eliminate unnecessary coding. Avoid feature creep, the new web 2.0 approach is to develop released “betas” with limited features, add a couple more features and release again. Only write code for what you need, don’t write what you think you may need, predicting the future is not always the best use of a programmers time. Keep things simple first, if there is a problem then rewrite to be efficient and keep the simple solution as a backup. It’s better to have a simple solution that’s slower or inefficient than to have a complicated solution that is harder to manage, specially if speed or efficiency doesn’t matter. Manage your code with a revision control system.

Ever since I started managing projects with Subversion I’ve streamlined the time it took to take a web site from a development environment to a production web server. With the use of tagging in Subversion, its made it very simple to take a version of your project stored in a Subversoin repository and export to a web server in one command.

This is a great blog post, I had to do some programming at school, basic but it still was a grade.

It happened to me when it gave that hateful restart because something went wrong, those tips are GREAT, would have been useful if this was posted before =/.

When having trouble coding part of a program, sometimes it helps to write the logic down on scratch paper or even make a flow chart.

If you think you want to try out programming, but don’t know where to start, try taking a couple classes. This is the best way to find out you are not really interested in in pursuing programming after all, like me.

If you are starting from scratch, its easy to get overwhelmed but just remember its no different then learning a foreign language, it takes lots of time and practice.

Hey thanks ive been looking into this and now im happy so thanks for doing this chris

My tip: Don’t be ashamed to google things you don’t know… even in front of your boss (if you have one). In most cases, your boss will respect you more than if you try to B.S. your way through.

Another thing to remember is to make something people might actually use! You’ll get a lot more feedback if its something useful. if its something no one has a use for, no one will have a reason to download it and your work will go to waste. Thats a big disappointment, and really will uninspire you

Oh you cant mean that

y would something for school be due “tonight’? is should be tomorow man

Its called night classes fucktard get out of middle school

Oh my gosh, man! Really?!?!

i do that tipe in web site biulding

You could know every bit of code in VB or whatever and be the WORST programmer on earth.

Its what you code
Its now HOW you code

If you code some unless junk nobody is gonna use it

But if you code somthing simple and very effective but your a novice at coding.

Everyone gonna use.

Also you have
Write proper comments everywhere. Comments are very important. These are useful. WHat if you don’t look at the code for a year? These comments will be helpful later.

WHat TWO CAPITAL LETTERS?

I find the most important tip is missing, in my humble opinion. and that would be: find the right language. it’s not as easy as asking somebody, because this is one of the most biased topics of them all. i would recomment C# because it’s portable to linux and the mac, and it’s rather easy, however c++ might be best for you, or just about anything, if you don’t want to get too deep into it, some modern variant of basic might be good for you (like realbasic). i hope that this will inspire some poeple to start programming!

I might start learning a language of programming and I am going to bookmark this for a guideline. Thanks to whoever sent this. Thanks :)

great tips! specially about debugging code

Another tip. If you are working with subversion control. Do not commit a new version to the library if it does not compile and run without errors. The other programmers on your team just might find a rope and hang you from the coat rack in the morning.

Programing isnt just the look of the code or the commenting it is how it will preform in real world applications such as on a server doing e comerce so you need good beta testers to test it (go rent some college kids to bang on it for a while) and to work all the kinks out of it and make it resistant to hackers!

this is not how to be a programmer this is an advice to a programmer !!

hey do you know what a good reprogramer

Maybe you should leave the coding tips to the people who actually know what they are talking about.

JayGayRay…. you’re a ******* prick for begging a free software.

I want my 4:18 minutes back. What an amateurish bunch of tips.

What Do You Think?