james

James Mills

In Software Engineering naming “things” correctly is really important. Often Software teams will either come up with their own Naming Convention or adhere to some standard like PEP-8.

Whether you are following a prescribed convention or adhering to a standard, it is really important to name things correctly and precisely.

  • Variables — Name them what they are. Avoid using 1-letter variables.
  • Interfaces — A convention from Go is to use an Adverb which is actually a good idea!
  • etc...

Remembering that:

Code is read more often than it is written. — Daniel J Scheufler

Example?

Consider the following configuration file:

encrypt_cipher: cbc

At first glance, this seems reasonable until you ask yourself:

wtf is “CBC” and what kind of cipher is that?!

Only to realize that this is just one of a few “block mode”(s) of at least two ciphers, DES and AES. Which one are we referring to? Should the configuration key have been encrypt_cipher_block_mode? Should we also declare the actual cipher used and not just the block mode and assume a hard-coded cipher?

Precision is important.

#Software #NamingConvention #Standards

Solving the Chicken or the Egg problem is often quite hard in any relatively complex software system.

Often I find the easiest way to solve this is to build half a chicken.

What do I mean by that? In bootstrapping terms it means you build a simpler version to bootstrap the real thing. This is quite often done in Bootstrapping Compilers in self-hosted programming language.

Sometimes though this isn't possible due to other dependencies. For example your solution uses a set of Public Crypto keys that you don't have available in the first place. What then?

Use another chicken you've already set up elsewhere to bootstrap!

😁

#software #ChickenEgg

Just trying out this new Writefreely instance. So far it's proving to be quite a nice piece of software. I had to develop my own Dockerfile so I could more easily get it in a running production state.