Tag: standards

  • The Power of 10

    I originally came across the The Power of 10 by watching the video how NASA writes space-proof code. These are a set of rules to produce code that can be reviewed and statically analysed. As they’ve come from the space industry you can understand why they want to be really sure what their code does.…

  • Clean Code

    I’ve heard of some people following the Clean Code methodology and some people reacting against it. It’s not been on my reading list before so I got hold of Clean Code by Robert C. Martin. I think it has some good ideas and a few bad ideas. My biggest problem is that these are often…

  • Historic programming style

    While researching one of my recent post I came across a reference to The Elements of Programming Style. It’s a study of programming style and it was first published 50 year ago. My dad recognised the book and he remembers when you had to make programs using punched cards! Despite it’s age a lot of…

  • Good names

    Code is full of identifiers. Whether that’s variables, functions or types. If you’re doing something to something else chances are that one or both of those involve identifiers. I not going talk about how you format a name for the moment, whether you use camel case, snake case or something else. This is about the…

  • Ninja coding

    Apparently “ninja” is Japanese for “one who is invisible” and that sounds appropriate to me. I’ve thought of ninja coding as going and changing something as the original author would do. The idea is to leave no indication, other than a commit history, that you were there. The same function can be written in all…

  • A step too far

    One of the seeds for this blog was some code that I was reviewing. It was based on a recommendation by SonarQube. I don’t have it to hand but it went roughly like this: and was based on the rule: “if”, “switch”, and range-based for loop initializer should be used to reduce scope of variables…

  • In one glance

    I’m surprised how often I come across large functions in projects. It’s not uncommon to come across functions with hundreds of lines. I’ve searched for something, jump in to the middle of a file, and then scrolled up desperately looking for the start of the function so I can start to understand what it’s doing.…