Brian MacDonald

Debugging for beginners

Nobody's perfect, and neither is your code, but that's OK

I discussed one thing that developers hate last time around — commenting — so I thought I’d follow up with another big source of developer frustration: Debugging.

Bugs happen. Every developer in the history of programming has had to debug, even the legendary ones who write code with butterflies. Becoming a skilled programmer doesn’t mean never making errors, it means becoming better at finding and fixing errors. When you’re starting out, your programs will likely be small enough that you may be able to figure out the problem by taking a closer look at your code, paying attention to the syntax, and tracing the execution process in your head. Once you get beyond that initial stage, though, you’ll need some help to find the bugs.

Read more…

Comment

The art of commenting

Is commenting your code a waste of time, or programmer gold?

Ask any developer what programming task they enjoy least, and odds are you’ll hear “documentation” as an answer. After all, you came here to write code, didn’t you? Who wants to write boring text about the code? In fact, documentation is the grease that keeps the development process moving — good documentation benefits your co-workers, the users, and maybe even you. And the most basic form of documentation is the comments in your program itself.

Read more…

Comment: 1

To IDE or Not to IDE?

Choosing the right tool for the beginning programmer

You’ve picked the language you want to learn, and you’ve learned more about the various language paradigms. You want to get started writing some actual code—but what tool do you use? With almost all languages, you can start writing code in any old text editor available to you, and that’s what programmers used to do, decades ago. Any good engineer, though, will find tools to make his or her job easier, and that’s where the Integrated Development Environment (IDE) comes into play. So now you need to learn how to use a tool before you can learn the language? Not necessarily. Although many programmers consider “should I use an IDE?” to be a question with an obvious answer, they don’t necessarily agree on what that answer is.

Read more…

Comments: 3

Should You Start Programming with a Procedural Language?

Why trading procedural programming for functional is like learning to ride a unicycle

A few weeks ago, I invited readers to consider which is the best programming language to learn first. I made my own recommendation, and people had a good discussion about it in the comments. If you’ve been looking around at different languages, you’ve probably heard about different programming styles, or paradigms, that languages fall into. The terminology can get confusing, and isn’t at all obvious if you’re new to programming. To confuse the matter even more, the various languages don’t often fall strictly into one paradigm, and the paradigms themselves sometimes shift and overlap. To keep things simple, though, I’ll introduce the three most commonly discussed paradigms: procedural, functional, and object-oriented.

If you just want to be told what to do, read this first.

Read more…

Comment

Which Language Should You Learn First?

If everybody should learn to code, what's the right tool for learning?

What’s the best programming language for a beginner to start with?

It seems like a simple question, and one that lots of aspiring developers ask themselves, but it’s actually somewhat loaded. Are you asking because you want to get a job as a developer? Because you want to get in on the mobile app craze? Because you’ve been tasked with improving your company’s web offerings, even though you’re not a developer? Or just out of personal interest, for the fun of it?

Read more…

Comment: 1