Either I’m stupid, or Apple’s developer documentation sucks. Whenever I try to enter a new area of Cocoa development, I am presented with simplistic tutorials and detailed reference information, with little in between to bridge the gap between newbie and expert. Often, the only way to learn an …
programming
How Not to Refactor a Function That Has Too Many Parameters
Most programmers know that having functions with too many parameters can be confusing. However, fixing such problems requires some intelligence. A programmer once saw some code like this:
SetObjectParams(obj, foo, bar, baz, quux, xyzzy, abra, cadabra, hocus, pocus, presto, shazam);
Finding a stylistic rule somewhere that said a function …
How to Learn Programming, in Two Easy Steps
I am sometimes asked by non-programmers how they can get into programming. They want to know what programming language they should learn, which programming tools to use, and so on. These are hard questions to answer. It's like asking "I'd like to be a musician. Which instruments and which pieces …
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
Know Your Programming Languages
I am often amazed at how little some of my colleagues know or care about their craft. Something that constantly frustrates me is that people don't want to learn any more than they need to about the programming languages they use every day. Many programmers seem content to learn some …
Booleans Shouldn't Be Complicated
Warning: Geeky programmer content below.
While learning a new codebase, I was a little disturbed when I saw this:
enum IsVerifying { IsVerifyingFalse, IsVerifyingTrue }; enum IsVerified { IsVerifiedFalse, IsVerifiedTrue }; enum IsEnabled { IsEnabledFalse, IsEnabledTrue }; enum IsActive { IsActiveFalse, IsActiveTrue }; enum IsOnline { IsOnlineFalse, IsOnlineTrue }; /* etc. (There are about a dozen more of these.) */
And there …
Proud Teacher
Today, a development team I've worked with solved an architectural problem by adding a factory method. And they did it without any prompting from me!
They grow up so fast.
Good-bye SCons, Hello CMake
Last year, I wrote of my initial impressions of SCons for controlling software builds. My initial impressions were positive, but even then I was wary of performance issues.
A few months later, I wrote about a performance problem with SCons and MSVC. I was able to hack SCons to make …
Death March
The term "death march" is commonly used for software projects that are behind schedule, over budget, have no end in sight, and yet must be completed. There is a book with that title.
I've recently become involved in one of these projects. I should say "re-involved," because I was involved …
No
Kris, the production system isn't working since we installed the newest release. Can you tell us how to fix it?
Can you send me the log files?
No. They are too big.
Will you let me access the system myself to see what's going wrong?
No. Developers can't touch the …