Wednesday, April 1, 2015

Cancer

Cancer (n) - the phenomenon resulting from a cell making its division function recursive and forgetting a proper stopping criterion. The function will recurse until it crashes the system or is halted externally.

Friday, March 20, 2015

The right to be...

In response to http://intelligencesquaredus.org/debates/past-debates/item/1252-the-u-s-should-adopt-the-right-to-be-forgotten-online

There is no right to be forgotten. That's a misapprehension of the root point. There is instead a right to be understood.
Every story discussed in support of the motion points to the every-human wanting to be understood as what they are, not what they were or what someone else believes them to be.
Every story posed against the motion points equally to a public need to understand who someone is now. The stifling of negative information about public figures being prominent.

So I propose that the motion is simply broken. We should instead be discussing a right to be understood and processes that can express and reinforce that right. Frankly, I don't believe any government is the proper party for that. Law is not, cannot reasonably be, flexible enough for that and so it must come to the individual's interaction with the world that expresses the right. Perhaps sadly there are many individuals with greater leverage in their interactions that don't seem interested in understanding anyone outside their circles.

Tuesday, January 27, 2015

Problem analysis

Response to
http://discourse.codenewbie.org/t/coding-exercise-problem-breakdown/618


  1. Check front door lock.
    1. If locked, unlock.
  2. Open front door.
  3. Until distance to car door = 0, walk toward car door (I'm deliberately ignoring pathing concerns, my car door is basically straight outside my front door)
  4. Check car door.
    1. If locked, unlock
  5. Open car door.
  6. Sit down in driver seat sideways.
  7. Juggle lunch, backpack, etc into passenger seat (this sort of crap is why robots tend to look so clumsy, just try and create an algorithm for how your arms move doing that, never mind controlling your balance through it all, your brain really is amazing)
  8. Pull feet into car.
  9. Close car door.
  10. Insert key into ignition.
  11. Turn key.

There are a few minor steps left out and there's some assumed knowledge like the car not having keyless ignition (mine does so this algorithm couldn't be applied naively to my case). It also assumes that you're able to carry whatever you're carrying without juggling anything around, and you don't have to find the right key on your key ring or look for your car in an apartment parking lot. And it still took 11 procedural steps.

Oh. And we never closed and re-locked the front door. That wasn't in the requirements. Of course in my case my wife does that in the morning so I suppose you could call me a good example of why you should follow the requirements doc once it's been reviewed and accepted by all parties.

Tuesday, January 13, 2015

Code Combet + Firefox = win

Wow. This runs so much better in Firefox. Go figure.
It's nearly unplayable in Chrome (which surprised me), it's a lot better in IE (which floored me), but it's smooth as silk in FF. Well, aside from slowing down a bit as the thang count increases.

Also, in IE my solution to one of the levels locks up every time I submit it even though it runs fine in the 'debug environment'. In FF? Works like a charm. Go figure. >.> FF just earned a spot back on my computer.

Sunday, January 11, 2015

Certainty

There is one thing about which I hold myself certain. One thing I consider inviolable truth. It is that certainty is poison to the human spirit. The more certain you are of something the less human you become. Witness fundamentalism everywhere.

If you are certain of something then that is something that you must do your utmost to inject doubt into. Examine under the light of many worlds, consider it as the ancient Persian would both drunk and sober, include as many more altered states as your lifestyle allows, consider whether you would believe the same if your moral basis were built upon something else. Perform experiments, physical or social as necessary, to test your understanding and the veracity of your certainty and keep notes. Make it impossible for yourself to ignore the edges of your certainty where logic or fact tells you otherwise. Because once you refuse to allow yourself to see one small facet of reality you begin to blind yourself to all of it. And thence, by all measures of psychiatry, lies madness.

I have yet to find evidence that certainty in any thing does more good than harm. However while there are truths that lack contrary evidence there are no truths that merit certainty. I accept even my initial statement in this post as a poison, it poisons my ability to make statements unambiguously and it poisons my ability to trust in the things that people say. Frankly, that may be a good thing in some cases. I accept that one poison regardless but no further. No other certainty will I knowingly accept into my self.

Smart methods can make a developer look stupid.

So I'm playing through Code Combat (works a lot better generally using Python and in IE though it still has a lot of head-on-desk problems) and I reach a section where I'm supposed to blow up ogres but not villagers. Thing is I only have access to findnearestenemy() in order to identify them. Now it's a pretty explicit method name but I'm much more used to dealing with very simple functions. I'm expecting this to give me whatever the nearest actor is and make me decide whether it's something I want to attack or not. Indeed, a method that does that is generally more useful. So I'm bonking my head for 5 minutes or so because the example code which you're forced to use doesn't account for villagers.

Well apparently findnearestenemy() only returns hostiles. Duh. But. As a method that makes it painfully specific. I'd much rather have a method that gives me the nearest actor and lets me decide whether it's one I care about or not. Maybe that method comes later.

Saturday, January 10, 2015

CodeCombat take 2

So, it works much better in IE. To my great disappointment. It looks like Coffeescript is rather better/more fully implemented. Since they say it's mostly written in Coffeescript that stands to reason. What doesn't stand to reason is that even the CS implementation has bugs, or at least one level/possibly game, breaking bug. You can't attack in a loop. Though to be complete I don't think I tried attacking and something else in the same loop, but the level startup script contained a comment that attacking in a loop was currently broken. Anyway. That worked in Python, but it seems a bit silly to expect someone to work an entirely different syntax just to winkle their way past a few levels here and there.

Oh, and they're looking to hire a level designer which for a 'game' like this would be a very particular set of skills. Suggests that they're doing pretty well too. Though, having a good handful of languages implemented (mostly and partially) is generally pretty good.

Having escaped the dungeon it's time to explore the countryside. Onward!

Edit: Correction. There are a ton of bugs in IE as well. For an extremely frustrating example the second level in the forest area requires the leather boots. Only I couldn't buy them because the price was 'undefined.' Which may only be a minor data error but it stymied my progress until I decided to try buying the next upgrade of boots (reinforced or something) which I thankfully already had the gems for. Equally thankfully the game only checks that you have the required methods available on your equipped gear (in this case the moveXY method) rather than checking the gear itself. So that was at least thoughtfully implemented.
And then, of course, I don't know how many times I'd gone in and out of the level in the forest before it the second level stayed unlocked without a refresh. Here's the scenario: Enter level 2. Fiddle with it some and get frustrated at the bugs. Close IE to try it in Chrome. Get sick of it there, and go back to IE. Level 2 is closed. ?!? Hit refresh. Level 2 is back. !?!
Maybe the page is cache-enabled when it shouldn't be? But Chrome didn't have that particular problem. It has different problems. Cumulatively it's getting to be enough to put me right off the game.

Oh, and apparently you can put @attack in a loop in Coffeescript as long as there's some other statement with it. So... yeah.