Thursday, January 19, 2012

Dyson makes for a confused monkey

So I have one of those nifty Dyson handhelds, because my dogs' fur loves the couch like a cheap whore. After a muddy pawprint left me scrambling to find said handheld, alas it was out of juice. A couple of chained surge protectors later and I could reach the couch with the handheld and be plugged in with little fear of electrocution.

Pressed the trigger and... nada. No sucking, no disappearing mud, nothing. The f***ing thing doesn't work when IT'S PLUGGED IN! What electronic device doesn't work when it's plugged in? Maybe an electromagnetic pulse generator after it's detonated, but holy crap... really? Fortunately, the wife is not averse to manual labor and simply scrubbed off the mud with a damp towel but honestly, that defeats the purpose of having a ***d*** Dyson!

Conclusion: Brain fart... serious, serious brain fart. I'm applauding... without... any... sarcasm...

Friday, January 13, 2012

Scala + Android = Angry Monkey

Not working the last couple of months has afforded me the opportunity to buy a house, get married, move in, get married again, and most importantly, learn Scala. For the sheeple, it's a programming language that integrates seamlessly with Java, the primary language with which I've developed software for most of my career.

Some background to make your brain hurt... To execute Java code, it must first be "compiled"; that is, converted into the binary form of 1s and 0s, "bytecode", that a computer can understand from the 'source' text I type. Scala integrates itself by also compiling into Java bytecode, making it transparent to the computer executing the program that it's actually a Scala program.

Which leads us to the brain fart that Android made in its core design. The Android platform, which can run Java, does things a bit differently. After watching my simple Scala program bleed memory like an artery just trying to startup on the Android emulator, I did some research. It seems Android compiles Java into and runs off of DEX bytecode, which it creates from the Java code just like standard compilation.

Does the DEX compiler know how to interpret Scala source files? Of course not. Rather than working from Java bytecode to generate the corresponding DEX bytecode, they reinvented the wheel of compilation and basically screwed me. Having written some elegant Scala code, I now must reinvent my own wheel in Java just to run it on the Android platform.

To add insult to injury, the googling turned up suggestions of Android commands to generate a magical script that could "DEX" the Scala files. What do these commands do? Start up Eclipse, my development environment, and then hang. Sigh.

Ninja Code Monkey says: You suck, Android.

Typing this blog is like donning a cape...

So... I'm awesome. And handsome... dashing, really. Smarter than the average bear. It's a burden I shoulder with grace and dignity in the face of the hoi polloi and their neanderthal cacophony. This blog will attempt to raise you above the noise and teach you Ninja Code Monkey wisdom... otherwise known as a little f***ing common sense.

I hope you'll join me on this journey of enlightenment, notions, and rants (oh my!) because really most of you need to know... for example... how to merge your car or next time, so help me, I'm running you off the road.

Look behind you. Seriously.

~NCMSW?