programming

  1. 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 …

    » Read more

  2. 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 …

    » Read more

  3. 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 …

    » Read more

  4. 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 …

    » Read more

  5. 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 …

    » Read more

  6. 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 …

    » Read more

« Page 2 / 3 »

© 2003-2023 Kristopher Johnson