Balance Programming

  • Scrum

    I’ve given a brief history of Agile and talked about the Agile Manifesto, those were both research driven. However I can talk about Scrum from personal experience. I’ve been involved with a couple of more tentative uses with a few Scrum ceremonies but also done it properly with the bells and whistles. Overall I enjoyed…

  • Bits and bools

    One of my friends was wondering about the performance difference between large representations of bools, say bytes, and packed representations of bools, individual bits. Accessing a byte is easier, requiring fewer instructions, but is going to fill up your processor’s cache. Accessing a bit is harder, requiring more instructions, but you can fit more in.…

  • Area of a polygon

    I wasn’t planning on a follow up but here we go. You’ve calculated the closest distance between a point and a line and calculated the area of a triangle but now want more, the area of a polygon! Winging it Let’s try to remember our school geometry lessons. You can divide any polygon up into…

  • Home or office?

    For many years I spent most of the year in the office 5 days a week. That was the normal. Most software engineers did the same. My office seemed pretty progressive with a hybrid model. We could work from home Monday and Friday. I was often in the office anyway but it was great to…

  • Area of a triangle

    This is a bit specific but that is the way with some algorithms, or formulas in this case. Let’s say you want to calculate the area of a triangle. I’m not sure why. It could be something in a graphics shader for a fancy effect. Winging it It’s been a long time since high school…

  • Diversion ahead

    I’m not going to be able to spend as much time on the blog for a bit. Rather than struggle to keep up with the schedule I’m going to drop the schedule for now. I hope to still post occasionally but it won’t be every Tuesday and will be less often. It could mean that…

  • Defer again

    I written about defer before. This is a keyword that delays execution of a statement until the end of the block. It’s designed to allow you to perform setup and immediately specify the associated clean up. I thought it made control flow a bit more confusing but could be a useful tool. Simple implementation C++…

  • Reorganising data

    I’ve talked about data-oriented design before. It looks at structuring things to remove unnecessary data, keep cache refreshes down and thereby get faster code. Compilers are pretty good nowadays at optimising code. That is they can re-order code, inline functions and unroll loops but they’re not going to restructure your data for you. Packing booleans…

  • Missing operator

    A couple of weeks ago I was talking about error handling and one option using. short-circuit logic. It had lines that looked like this: But why couldn’t they look like this: While you might understand what that means C++ doesn’t, very few languages do. Short-circuit logic The normal logic operators we deal with are and,…

  • The Law of Demeter

    I’ve been doing some more reading and came across the Law of Demeter and train wrecks again. The last time while while reading Clean Code. I’ve one book that tells me this is bad practice: And that I should do this instead: My feeling was to prefer the first as more compact here and it…