Getting Better at Programming

Unlike many applications and even similar implementations, by their very nature tiling window manager provide a unique opportunity for anyone who wants to either learn programming or improve their skills in a particular language.

Traditional Approach

When someone says that they want to learn programming, the most common method that comes to mind is that they’re taking a class in school. Depending on their age, you might consider other methods. Week long or weekend bootcamps where they’re put through intensive training. Web services where they sit on websites and work through various lessons while an online REPL tests their results. Some might even still think to try books.

What all these methods amount to is the novice turning to some authority to show them what they need to do in order to learn programming. It may not actually be the “traditional” approach, but it is the method most people think of when they decide to learn to code.

There’s nothing unreasonable about the traditional approach. In fact, it is even the recommended approach for anyone with no experience whatsoever. You need a baseline from which to understand how the computer works and how to understand what the program does when it runs. But, there are limitations.

What’s Next?

Beginners following the traditional approach tend to plateau or even stall out fairly early in the process. The point they get hung up on is the rather simple question of what’s next?

In the early stages, simple fascination with the process is sufficient to keep them interested with learning. The instructions explain that they should write FizzBuzz and they work out how to use the modulus and boom, there goes a thousand point range of FizzBuzz to standard output. While these are entertaining brain teasers for the beginner, they’re somewhat less attractive to the intermediate programmer.

The difference between web services that target novice programmers and those that target the rest is striking. Often you can go from the basics of looping to advanced computational algorithms without a whole lot in between.

More damning is that these advanced lessons stick with the game model. They have you focusing on brain teasers and problem-sets, which effectively teach you how to write an algorithm without teaching you how to actually implement and use an algorithm in a practical application.

The intermediate programmer who comes to these advanced problems faces two issues: First, the problems may be too difficult for them understand at their current skill-level. In which case there’s the risk that they’ll get discouraged and give up on the idea of learning this material.

Secondly, solving these problem-sets are their own reward, which is to say they get boring after a while. Learning new skills only becomes fun when you actually put them to practical use. If you’re just learning for the sake of learning, maybe that works for you but it doesn’t work for everyone. An intermediate programmer that becomes bored with code problems isn’t liable to advance anytime soon.

Which, is where the pragmatic approach comes into play.

Pragmatic Approach

Under the traditional approach to learning programming, you learn to code by writing code, usually by working through various problem-sets in book, website or lesson plan. Under the pragmatic approach to learning programming, you learn to code better and faster by writing code that you actually want or need to use.

This addresses the specific what’s next? problem of intermediate programmers. That is, you have the skill to build things but lack direction in what to do with that skill in order to get better at the language and the practice in general.

Some people have a fairly easy time finding a direction. Maybe a professor points something out to them or gives them the right kind of assignment. Maybe they notice a specific limitation in their workflow and attempt to develop an extension to address it. Maybe the whole reason they learned programming was to scratch a very particular itch. But, for others, inspiration and direction don’t come with near so much ease.

Intermediate Programming with Tiling WM’s

First time you start the tiling window manager awesome, you have a black screen with a funny looking background and a single panel running along the top of the screen, which includes an application menu, workspace indicators and a system tray. The configuration also includes support for keyboard shortcuts, notifications and various other features. This is enough to get started, but it’s not enough for long-term use.

Where you go from there is the principal value to the intermediate programmer using a tiling window manager.

Use Case: Volume Control

For instance, say you have awesome running under its default configuration and you decide you want to watch a video on Netflix or Hulu. You open the browser and get the video going, but find you have no sound. Let’s say you’re an advanced Fedora user, so you already know how to manage sound from the terminal. So, you open Xterm and run the amixer command, work out that the problem is the volume level and get the sound going to where you want.

This gives you a short-term fix. You can now enjoy audio while you binge on various tv shows. But, it doesn’t really qualify as a long-term solution. You shouldn’t have to open Xterm every time you want to adjust the volume.

How do you get that? Typically, desktop environments develop and maintain applications that handle basic features such as this. You can even install them through your package manager and run them out the box in awesome or however you like, (the Xfce Project is a good resource for common basic applications of this kind).

Using third-party applications does solve your immediate need for volume control, but it isn’t necessarily the best approach to the problem. The better alternative for you, the intermediate programmer, is to attempt to implement your own solution.

What you need is code to raise and lower the volume by increments, as well as code to toggle mute. What you also need is a volume indicator for the system tray, one which changes based on the current state, (that is, will display different icons depending on the volume level and whether mute is on).

You can write this code yourself. It takes around fifty lines of Lua to get it done. Source that code into your rc.lua configuration file and you now have volume controls in awesome.

Benefits to the Programmer

It may seem tedious on the surface, writing code for things as basic as a volume indicator. Why can’t you just take someone else’s work and maintenance for this functionality?

For the intermediate programmer volume control provides a basic project. There’s the basic stuff you have to do in awesome, like adding an object to the system tray and setting up a menu for that object. There’s also more advanced features like figuring out how to access the system audio controls from Lua, manipulating those figures and then adjusting the current audio settings.

Once you get that far you can take it further, like: Mixer controls for multiple audio output. Time-based volume adjustments, to quiet certain applications at night so you don’t disturb your spouse or roommates. Contextual audio: like, setting your instant message notifications to go silent when the web browser plays a video full screen.

These are all practical challenges that build off the immediate need for audio controls in awesome. And, if it’s a work machine you might not even need audio controls. You could just as easily ignore the whole concept and go work on something else.


When you combine the minimalist approach in what they out the box with the fact that in most cases you need to write code in order to extend basic features, the tiling window manager becomes an ideal platform for intermediate programmers who want to further develop their skills in the given extension language.

What you’re developing is in effect a personal desktop environment that suits your specific working needs. Getting from the bare bones starting point to something you can happily use every day is a journey that’ll take you from the early intermediate period to advanced programming, wherein you actually have an idea of where and how to use the algorithms presented in those advanced projects online.

< Prev Next >