beanz Magazine

Code Golf

sterlic on Flickr

Problems software programmers can do to practice their skills, from beginner to advanced.

Learning to code is only one of several key steps to become a good coder. Learning how to debug or fix code is another key step. A less obvious skill is the ability to code efficiently.

And efficiently doesn’t mean the basics: commenting your code when needed and reducing the number of steps and functions wherever possible. Efficient coding also includes spending time to find ways to do things with much less code than the average programmer might realize.

I recall seeing the PHP code files for pMachine, a content management system and blogging tool, when the code was refactored into object oriented code. The sparseness of the code was like looking at a cathedral. Every bit was simple, obvious, and tight with lots of clean white space. There were no tall heavy chunks of code. Opening every file showed the same clean and carefully thought out code.

The ability to achieve this effect in your code takes lots of time and hard work. Probably you also have to think in ways useful to coding, for example, in terms of cause and effect.

How do you learn to be an efficient coder?

What is Code Golf?

Code golf is a fun way to gain some insights into how to write truly efficient code. As with golf, where the fewer strokes you have the better your score, with code golf the less lines and characters of code in your program the better your score.

Code golf is a series of programming challenges that require coders to be efficient. You write a program to solve the challenge. You also see the results of other coders, learn from their efforts, and improve your skills. It’s a fun way to participate with a community of programmers.


Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year!

Subscribe Today!

Also In The April 2015 Issue

Why Do Designers Hate Comic Sans?

The history of the font and the reasons people hate Comic Sans are great ways to learn about typography.

Learn Typography Online

Learn typography online and practice basic typography skills.

The 10 Principles of Good Web Design for Developers

Design basics for developers who do not have a designer around to say "no comic sans!"

Mary Glendening Talks about Library Makerspaces as Community Technology Centers

Librarian Mary Glendening describes how they created their library makerspace.

An Interview with Joe Dytrych and Dee Saigal, Creators of Erase All Kittens

Learn how two people created a fun online game to teach HTML and CSS.


Apple's new Swift programming language is an interesting language to study and learn, plus an opportunity to watch a new language evolve.

A designer is an emerging synthesis of artist, inventor, mechanic, objective economist and evolutionary strategist.

Online Security Tips

How to create secure passwords, manage your email accounts, securely backup data, and more.

April 2015 News Wire

Interesting stories about computer science, software programming, and technology.

April 2015 Learn More Links

Links from the bottom of all the April 2015 articles, collected in one place for you to print, share, or bookmark.

Code Golf

Problems software programmers can do to practice their skills, from beginner to advanced.

Design Patterns and Anti-Patterns

How programmers use design patterns and anti-patterns to develop software.

Help Build Applications Online

This website lets anyone practice their coding and design skills.