Bugging Your Code Reviews – See if your peers are really reading your code.

August 22nd, 2008

Code reviews are the single biggest thing you can do to improve the quality of your code, as Jeff Atwood says. Code reviews force you to show your code and justify your design decisions to someone else, and the extra set of trained eyes can reduce a large number of costly defects. But how can you be sure that your code reviews are as effective as many claim them to be? (more…)

Is Atheism a Religion?

August 21st, 2008
YouTube Preview Image

Building Tesla Coils in the Garage

August 1st, 2008

Many people get into software development because it’s fun. They start programming or web applications or how to get the computer to do interesting things, and the learning begins to grow from there. It’s also a well-paying career, so many people make the transition from hobbyist to professional.

But the job usually isn’t as fun as the hobby, for reasons that are already stated in your average Dilbert comic strip. As such, many software developers continue to do their own side projects in their spare time (at least, developers who chose their career from their preexisting interest, instead of choosing their career as an alternative to accounting or dentistry.) Much of the open source movement is powered by this phenomena: the collective work of developers who have an itch to scratch and a desire to share their creations.

“The time for jacking around with Tesla coils and ball lighting in the garage is over.”
-From the sci-fi movie, Primer (more…)

A Thousand Layers of Abstractions

July 1st, 2008

How should we teach programming?

One of Shimon Schocken’s colleagues says that “Computer science is a thousand layers of abstraction.” This is quite true, and the same applies for programming.

Recently I’ve been thinking a lot about how we can get more people involved with programming. I don’t necessarily mean programming as professionals, but just to develop enough of an understanding on what software is and how it works. So I wrote a book aimed at teaching games programming in Python to the 9 to 12 year age range (get ‘em while they’re young). In my “Python is the new BASIC” post, (which was a plug for my free, Creative Commons-licensed book, “Invent Your Own Computer Games with Python”) I received this comment:

You know, I took a look at that game book and it struck me how so 1980s the thing was. It brought me down to memory lane.

Now, looking at the alternative (Squeak), which is fully OOP all the way down to the very menus and icons, buttons, which has a much richer environment and is totally ready for multimedia, along with the derived (written in Squeak) Scratch language, I think it’s very bad that we’re returning to Basic.

Kids deserve something better in 2008, and we can deliver it, just as long as we keep our prejudice at bay against Smalltalk (because it really is about prejudice and lack of information).

1980s would be right. I based the book I wrote on a 1983 book that taught me BASIC programming (adding Python’s modern features). However, my book specifically avoids higher-level concepts such as object-oriented progamming, event-driven applications, and graphics. I thought these concepts would hide the actual underlying workings of the programs. By using textual input and output from simple raw_input() calls and print statements, my book could focus on variables, expressions, and flow control. I wanted as little “magic” as possible.

“Programming is a thousand layers of abstractions.” I’ll argue that to really understand software, one has to go down this rabbit hole all the way to the bottom, as far as assembly or machine language. But one doesn’t need to understand assembly (arguably the lowest of the programming abstraction layers) in order to actually write useful software, even professionally. And for the purpose of teaching programming, those layers of abstractions save us a lot of tedious details. The key to teaching programming is to find that ideal middle ground: low enough to pull back the “automagic” curtain, high enough to stay above minutia.

My book aims low. There are already several high-level game engine SDKs and drag-and-drop game creator packages to make programming easy (well, easier). I would lose the appeal of graphics, animation, and sprites, and instead rely on text and ASCII art. I would use function calls and loops, a level below recursion and callbacks but above dread goto statements. The high-level space already has lots of ink or bytes devoted to it already, so I aimed low.

(more…)

Python is the new BASIC.

June 18th, 2008

This is the basic problem with learning how to program computers these days:

public class Hello
{
public static void main(String[] args)
{
System.out.println(“Hello World!”);
}
}

The above is the Hello World program for Java, arguably one of the most popular programming languages. Encapsulated in the above three lines are several different concepts ranging from static functions to return types to stdout and to the entirety of object oriented programming in general.

Below is the Hello World program for BASIC:

10 PRINT “Hello World!”

One line. Simple. Back in the days of the Commodore 64, simple software was forgivable, it was expected. The expectation that computer programming is achievable by kids and mere mortals still existed. And BASIC came with most home PCs as well. Writing simple programs and games was a large part (or at least, larger part) of owning a computer.

These days, with physics engines, 3D graphics, MMORPGs, and professional artwork, that expectation is gone. Text-only games with ASCII art are considered obsolete, and the replacement for BASIC has mostly been game creation kits that offer drag-and-drop, point-and-click interfaces to tie together multimedia elements into games that mostly follow fit the same genre. Behind all the graphics and menus and wizards, the art of programming is lost.

The replacement for BASIC has been clumsy at best. How do we introduce fancy GUIs, graphical animation, and ‘splosions to beginner programmers? Visual Basic? HTML/Javascript? Some random, closed source “4 kidz” programming language whose company will fold in three years? NO!!! You can’t be serious!!! (more…)

« Previous PageNext Page »

Powered by WordPress