Showing posts with label traps. Show all posts
Showing posts with label traps. Show all posts

Monday, 6 January 2014

μηδέν άγαν {nothing in excess}

One of my (very patient) mentors made the following very true observation about me:

By the way, designing features based on speculation is usually not a good idea. (...)  Maybe there's a bug report in our tracker requesting such functionality? If not, perhaps you don't need to worry too much about that scenario.

I have a habit of assuming the worst case and then try to create something that (hopefully) solves for the entire range of problems/issues that might occur.

This sounds like it's a good thing, and sometimes it is, at other times, it isn't, because the sky is not about to fall.[1]

I've been thinking why that is so. and my best guess is that this probably a function of OO coding on the MUD, where anything and everything can cause surprises, because things interact whilst interactively interacting.

If you've ever replaced 20+ players lives, stats, xp points and equipment because your fun toy caused a chain reaction that you hadn't considered... you get extra careful after the umpteenth time ;-D

Contact me for a great deal on a used pair of bullet proof sandals.


-=-=-=-=-=-=-=-

[1] From the Omega game:
(you walk into the establishment)
Rampart Healers. Member RMA.
a: Heal injuries (50 crowns)
b: Cure disease (250 crowns)
ESCAPE: Leave these antiseptic alcoves.
(you hit ESCAPE)
OK, but suppose you have Acute Satyriasis?

Thursday, 31 October 2013

This task only takes 2 minutes!

...but if that 2 minute job occurs 1000 times, it's 33 man hours.

That's only 100 users doing the same thing 10 times each.

If you have 1000 users who need to do this once every day at work, that's 200 times per person per year,  or 6 1/2 hours per year per person, and per 1000 users this is 6666 hours or 277 full 24 hour days or 833 8-hour work days, days, or 4 employee years (@200 days per year) + 33 days.

So the 2 minute task is quite the time (and money) sink!

Friday, 11 October 2013

GDB and the shell game

Sometimes, a good thing can be too good, and so it is with GDB's pretty printing of strings.

I spent quite some time trying to figure out why GDB showed me "\"AA" and not (as expected) "AA" or, even just "\"AA"\". 

To cut a long story short, svn_cstring_split() doesn't do strings with spaces inside strings many favours, and so, "AA BB CC" ends up as 3 elements, '"AA', 'BB' and 'CC"' respectively, which then ends up as "\"AA", "BB" and "CC"\" in the GDB display.

I didn't think that GDB would pretty print anything let alone decorate strings with escaping slashes... and so wondered for quite a while where the extra "\ went! :-D

I should have employed this kitty to help me here: