Saturday, 24 September 2016

    Yaay, bandwagon! or;

    Not impossible. Just very, very hard; or,

    Ow my brain!!!, or; "there are...twelve dots!"

Now my head hurts. A lot.

Friday, 23 September 2016

    Refactoring

    Or; "Time to throw out all that hard work and rewrite it"


    This narrative is a work of fiction, mostly based on true stories.

    Let's say you want to make a top-down roguelike. So you have some character and monster sprites, some item bitmaps, and some spell sprites. You even have animations.

    So, you wire up some code. Move the player's character left when the player presses '4' on the numpad, up and left on '7' on the numpad, generate some random numbers influenced by stats and items when the PC hits a monster (and vice-versa), reduce health and make dead as appropriate, and wands cast spells. You websearch dungeon generation, and presto, our little dude is running around killing monsters. It's all good, and you're exhausted.

    Then you hand it to some friends to playtest it, with an eager sense of anticipation.

Thursday, 22 September 2016

    Spherical Programmers of Uniform Density...

    ...Programming requires one to be very knurd...


...If # of bugs grows with volume of code...

...And volume of code grows with increase in distance from starting first line...

...And the parts of the code users interact with are the surface of said code...

...And the surface of the code itself contributes to the amount of work to do...


...And more efficient programmers make fewer bugs, thereby resulting in less need to visit the volume...

r = how much utility you have added since the first line.
e = how inefficient a programmer you are, range [0, 1], where 0 is fully efficient; you only add new code.


Productivity = 1 / ( ((4 / 3) * pi * r^3)^e + (4 * pi * r^2))

Thus we see that a fully efficient programmer, having increased the utility of the code 10 times over, has a productivity for the next integer increase of utility of:

Productivity = 1 / ( ((4 / 3) * π * 10^3)^0 + (4 * π * 10^2)) = 0.000795142

Or in short, 1,258 more lines to increase the utility to 11 times the initial start. With perfect efficiency.

Of course, this is almost certainly reasonable-sounding nonsense, if one that tracks with experience. Writing a simple falling blocks game takes X lines of code; adding levels and a level editor will probably at least triple your lines of code.

But this was mathed simply for the nerdery fun. :)