Grokking the Mask – understanding classless subnetwork masks

I’ve noticed that many networking students have few problems answering questions about the simpler, classful networks and their subnet masks. But then many struggle when problems involve CIDR networks.

I think it’s because beginners have grasped the basics using some rules of thumb, but not the underlying principles.

When we take the class C netmask,, the shortcut thought is that the magic number 255 means “part of network”, and magic 0 means “part of host address”. But if that’s all you know, then as soon as you see a netmask like, you’re stumped. What does the 192 mean?

The two keys to decrypting 172 are understanding what a mask, generically, is, and thinking in binary, instead of base-10.

Continue reading “Grokking the Mask – understanding classless subnetwork masks”

Randomness – C# mini tutorial

Note: This was some teaching material I used on the degree and professional courses to explain a little about using randomness- why and how -in your applications. The courses were based around C#, but are easily adapted to many other languages, including Java and Javascript. Just ask for a translation! Because they were slides used as part of an in-class tutorial, some parts may raise questions as much as answer them…

Note 2: A Visual Studio project is available with some starting code, and some questions (in the form of comments) for you to try to answer, available here:


  • What is randomness?
  • Where can we use it in our programs?
  • How can we acquire random values?
  • How can we make some values more likely than others (weighting/non-uniform distribution)?

Continue reading “Randomness – C# mini tutorial”

Whales and Wales – Weekly Question

You can compare most things to Whales or Wales. How frequently is an area the size of Wales cut down in the Amazonian rainforest? How long are 5 double-decker buses?

200TB == six blue whales ?
© 2017 BBC

So this slide came up on screen during the BBC YouTubers satire, Pls Like. It might seem ridiculous, two incomparable quantities, but it’s a fun jumping off point to consider the knowledge domains and dataspaces we might consider if we had this slightly silly problem. What does it mean to store a whale?

Continue reading “Whales and Wales – Weekly Question”

Neongrit guide – release 1.3.2

Hello. If you’re a user of the neongrit server I sysadmin (sudo make me a sandwich, for I. Am. root.), you should already be familiar with my guide to making use of the services offered.

But if not, or if you’re new to having an account, please download and read it, it talks about using notepad++, WinSCP and Dreamweaver to access it, how the filesystems is laid out, and lots of hints and tips. Particularly useful if you’ve never hosted a website on a linux server before.

neongrit user guide v1.3.2