Why do Programmers use Monospace Fonts?

January 19th, 2007

Programmers prefer monospace fonts, right? I know I did. I didn’t really consider using anything but - even though I had noticed that Bjarne found a proportional-width font was better for his book. Bjarne has had lots of great ideas, I thought, but also a number of peculiar ones and I figured this was one of those.
A few months ago I tried switching to Verdana in Visual Studio. And I must say that I am pleased so far. I haven’t yet missed monospacing and come to think of it, I don’t really have any good reasons for wanting it. Formatting, you say? Well indenting works just the same whether your font is monospace or not. The only formatting problem that could arise is with alignment of things like fancy comment “frames” which I don’t really use anyway (if you make lots of those, notice that you are probably putting too much code into one file - which makes you want to add distinguishable “headlines” that are easy to spot when scrolling through the file. You should probably split your code into more files or get a folding editor.)
Verdana is much more narrow that most monospace fonts, which means that the need for horizontal scrolling is less. This comes in handy especially in the build output where error messages can often grow long. And, I find that it is generally more pleasing to the eye.

Want to become a magician?

January 7th, 2007

My brother Jakob has written a blog entry called 10 Steps to become a magician. If you are into magic or just want to show off at social events, you might consider reading it. He definitely scores a lot of points with it at parties and family get together’s.

Is Your Code Laptop-Ready?

November 30th, 2006

A number of the programs that I have running on my pc have a problem with stand by. When I open the lid of my laptop, I often get a greeting expcetion in a message box.
By keeping memory alive and asking all device drivers to resume state, your operating system is trying to create an abstraction that allows your app to work regardless. While this works for most apps, the abstraction is not complete and there are a number of quirks you should prepare your code for:

  • Networks may change. The IP of this machine may not be the same as when the program was started.
  • In fact, the entire hardware configuration may have changed. Most obvious example is the docking station that adds memory or pci slots.
  • Time is non-linear. From your app’s point of view, stand by is the equivalent of time travelling. Four hours may have passed since the last tick because of stand by.

In the Parlance of Our Times

November 27th, 2006

The Dude: I dropped off the money exactly as per… look, man, I’ve got certain information, all right? Certain things have come to light. And, you know, has it ever occurred to you, that, instead of, uh, you know, running around, uh, uh, blaming me, you know, given the nature of all this new shit, you know, I-I-I-I… this could be a-a-a-a lot more, uh, uh, uh, uh, uh, uh, complex, I mean, it’s not just, it might not be just such a simple… uh, you know?

The Big Lebowski: What in God’s holy name are you blathering about?

The Dude: I’ll tell you what I’m blathering about… I’ve got information man! New shit has come to light! And shit… man, she kidnapped herself. Well sure, man. Look at it… a young trophy wife, in the parlance of our times, you know, and she, uh, uh, owes money all over town, including to known pornographers, and that’s cool… that’s, that’s cool, I’m, I’m saying, she needs money, man. And of course they’re going to say that they didn’t get it, because… she wants more, man! She’s got to feed the monkey, I mean uh… hasn’t that ever occurred to you, man? Sir?

Such magnificent dialogue. The Big Lebowski which I rewatched this weekend is definitely one of my favourite movies.

Protection as a Business Model

November 7th, 2006

The Business Plan is a pain that entrepreneurs have to suffer, at least if they want to raise venture capital or other kinds of funding. To geeks, writing a business oriented document sounds just about as exciting as room temperature Jolt with no gas. Oh man! Budgets, risk assessments and silly attempts at future prediction that everybody knows are not going to hold anyway. Oh well, as we need funding if we’re going to make AAA games, we have been writing our business plan with all of those things in it. And for a while, I found it quite frustrating that whenever we spoke with someone with business savvy, they would tell us that we had to describe the problem that our product solves, the demand that it meets. How does it enable? That’s great, but how did we fit in there? The biggest problem a video game can be said to solve is boredom. Obviously, people are making money from video games already, as with movies, music, theme parks and what not, so perhaps the guideline should be extended to this: a company should either enable or entertain. Seems reasonable to me. So instead of focusing on solving a problem, we have now shifted towards how we are going to ensure quality. Quality meaning fun - entertainment.

(C) Copyright by Christian Øelund, Flux Studios

Recently, it occurred to me that there is actually a third thing a company can do - it can protect. And this is an interesting area because, it seems, the upper boundary to required safety is vague and liquid. I bet Microsoft would be able to release Vista as nothing but a number of security updates. Essentially, protection is of no direct value to the user. In fact, in the best of cases, protection merely causes the user no additional inconveniences such as keys and codes or the loss of processing power. When people are scared, they will pay for protection with their money and by tolerating inconveniencies.
The problem here is obvious: a company that sells protection has an interest in scaring the population. Currently, the story about bump keying is traveling across Europe. It was recently described on national Danish television and the Danish lock smiths have since sold enormous amounts of bump-safe locks. I am not accusing the lock smiths of having spun this campaign but it demonstrates the concept perfectly. As does the strategies of the US Republican Party that seems to be heading for a crash in the mid term elections today.

Definition: Flocking

October 9th, 2006

A behavioral pattern that can often be observed in office environments. When two or more persons look at a third persons monitor, everybody else in the room will come and join the audience. I think this happens even more in companies developing video games – it is definitely common here.

Ads in Google Earth?

October 4th, 2006

- when will we start seeing them?

With all the sites that feature Google Earth sights and the quality of the images, it can only be a matter of time before companies start targeting ads at the satellites in the sky..

Beaverkill Special..

September 21st, 2006

If you know what the word kusse means in Danish, this site becomes quite amusing.
“No cane rod I fabricate ever leaves my shop without my complete inspection and satisfaction”

Live Report from the Coup in Thailand..

September 20th, 2006

..on Reddit:
http://reddit.com/info/j30d/comments/cj38o

Good Things About Hardcoding

September 11th, 2006

Everybody agrees on hating hardcoding. In fact, to many it is probably among the worst of programming sins.
But is hardcoding really all bad? I don’t think so. It has some good properties:

Development Time
It is fast. Just writing code takes less time than thinking out abstractions and then writing the code.

Performance
Hardcoded means fast. At least, it can. Essentially, it’s inlining functionality that would otherwise have to be executed through a number of abstractions. Calling a function takes clock cycles.

Simplicity
Fewer abstractions to understand and memorize can make your system simpler to work with.

Readability
Hardcoding makes your code easy to read. If you’re like most programmers, you will turn away with a snort of disgust when you spot some code that is definitely hardcoded. Nevertheless, chances are that you can easily tell what the code does. This is something that can be much harder with properly refactored code.

-->