Blog

  • You, or Someone You Know Can Fix the Machines of the Future

    I’m convinced I’ll have a job in technology till the day I die. At the rate things are going, maybe it won’t be coding, but I’ll bet my last dollar it’s in maintenance.

    I spent, oh, 20 minutes at lunch trying to fix my blower; it’s a 2 stroke engine with a fan that generates massive air blowing power. It is used by me to blow mowed grass off my driveway, my back porch, and I can even invert it to vacuum up grass since my mower is bagless (came with house, not much I can do). After 2 weeks of no lawn mowing, with 1 foot high under the tree, the covenant police we’re chomping at the bit to get me on a “mowed grass in lawn” violation. Thankfully, someone at the corner entrance into my cowpasture-turned-suburbia neihborhood hasn’t sold their house in like over a year, gave up and left, and tend to their yard every month, if that; decoy saves the day again.

    Can’t say I blame ’em; if I were looking to purchase a house, and noticed a yard unkempt, I too would develop a judgement that said yard owner was a slob, and would keep to his un-sightly habits, and make it hard for me to sell my house, and continue the horrid cycle of seller insecurity. Still, the teenager in me wants to tennis-racket their mailbox if they even touch mine with another frikin’ flyer; it’s bad enough I have to Tabasco sauce my eyes just to stay awake on my roof to catch that rogue junk-mail paper delivery boy in the sites of my sniper rifle. Haven’t caught him (her?) yet either… have about 3 sheriffs in my neihborhood, and don’t want to cause a ruckus, ya’ know. Speaking of ruckus’, I wonder if they caught that 6ft wiry, white male who keeps breaking into houses naked? …and you thought I was weird sitting on my roof with hot sauce and a gun?

    Anyway, yeah, 20 minutes, gave up, hit the Subway and aquired more food than I could utilize. After the last Subversion check-in, I surveyed my surroundings, and figured I’d give it a go again. So, I start unscrewing every screw I can find. Frikin’ crackhead engineers; either I do not have an appreciation for the finer points of screw head vs. phillips head vs. alan wrench head… or my former adjective usage was well placed, if not an abused conjunction. Thankfully, her majesty recognized my testosterone yearning awhile back, and satiated me with a drill set. It had every type, and with enough sizes to disassemble Johnny-5. STEFFANEEE… neeeed INPUT!

    It kept getting uncomfortable too; I tried to make rows, even fantasized about construction paper & chalk outlines… but gave up, and made a bolt haiku on the ground at my garage door, wide open. I obviously need to throw some stuff away; I kept getting people offering me money for boat shelves I have out front, and I had to politely decline their purchase, as this was not a yard sale, I was merely “working in my garage” as guys are like… supposed to do and stuff. The weird looks were a tad uncomfortable (sorry, out of lemonaide, nothing to offer), but southern hospitality prevailed.

    The same, morbid urge one gets to look at an accident on the highway somehow wrapped it’s black tendrils around my motivation, and pushed me onwards. I knew my blower was screwed; there was no turning back now. I couldn’t code in Flex; too burnt out. I had to move this grass, and the thought of manual labor was laughable… HA! I had to justify 60k worth of degrees somehow (obviously that wasn’t in economics, because that price guess wasn’t even close). So, I’d look at the… uh… “standing plate bar insert” thing as I detached it; as if it were some alien parasite piece of detached flesh (formerly attached, whole, to the ship), and the aliens had left, we had worked through the religious issues of the aliens coming, and the government assured us our tax dollars did NOT pay for that incursion, and so I after the stay-puff guyz in the suits confirmed there were no alien diseases on said parasite, I continued to disect it since the aliens weren’t really gray’s, and disecting your planetary neihbors is just rude; we in the south keep to ourselves.

    So yeah, piece by piece, I removed things. Halfway through, I hit Google and apparently found a clue via RC-car sites. Is it me, or is there a common trend in tutorial sites, for any discipline, coming off as patronizing? Condescending? Feels like it. Anyway, yeah, pully or something. It just so happens the pull cord was, WHERE? At the core… the cold, hard, steel center behind tons of complex machinery. I get uncomfortable enough opening my Alienware to remove the dust, so this was just wrong. Upon reaching the center, the cord was wrapped upon itself, a kite wind gone astray, a fishing lure with heavy weight being dropped into sea horribly wrong; tension, man, TENSION! Ease it in, control it.

    I thought the engine was locked since I pretty much had hay bales in my yard, and had to gather said yard trimmings in a pile. What to do with them afterwards? No no… this is primal time, must work, the process will wrestle itself out, it always does. Mid-yard blow (I was doing laps; my new iPod-mini raving me till dawn), even over the din of an 808, I could hear the blower trying to tell me something. Another pitch shift and I definately knew something was wrong. I was hot, the sun was relentless, and as a geek (yes, I still had some protective tan left) in the sun, well… the only radiation that should be hitting my face is from a Viewsonic, not from a ball of gas you can’t even put into her majesty’s Element. If I can survive this, SO can you. Damn empathy… strikes at the worst times. Shakespeare had it easy; good people are TOO EASY to mess with. Thus, as soon as I turned off my blower to give it a breather, it breathed it’s last. I couldn’t pull the cord to start it again, not matter what button, or dial I modified & tweaked.

    Upon re-assembly, I was confident I had actually fixed my first piece of hardware. And why not? Shouldn’t the skillset of modifying code personify onto hardware, and lament the same degree of success?

    All was for naught. 3 hours later, I still couldn’t pull the cord. But MAN, that thing is pretty slick in terms of how it’s put together. If a Java guy wrote it, I’d be able to use one screwdriver, and be able to get to all of the screws with my drill… but it wouldn’t have been as cheap.

    So, grabbing the rake before my inner fire unleashed hellish frustration upon my garage of boat shelves, and … God, what the hell IS in there anyway? Her majesty’s walking out with a painting & a charcoal drawing? I swear to God that is going BACK in that room of stuff holding if it’s not on some wall by tomorrow night!

    About 5 minutes, I realized my muscles needed proper audio stimulation via the iPod or the pace would be about as consistent in it’s livery as picante sauce made in New York city handed to Montana Joe and his merry men. Dark breaks, and some old school Pantera later, I had ported and entire weeks worth of “yard” into some wanna-be pond in my backyard. Why did I buy a house with a yard again? Oh yeah, so I can put the front-yard’s leftovers in the back, right, right.

    …almost done, and it hit me; technology breaks. Seriously, all the frikin time. Yes yes, I’m reaching the point of this post, quite right. How many hours a day do you spend “fixing” things? Fixing bugs, cleaning spam, rebooting Outlook, restarting Tomcat, ALT+F4 out of a crashed game, replacing a haddrive, re-typing an email with tact… the list goes ON! Hell, my dad when I was a kid worked on his boat 24-7; that’s the main reason I keep telling her majesty no when she asks for us to buy one. In a typical 3 week period of around the clock grease-monkey insanity, we’d maybe go water skiing once… and maybe fishing twice… in a month. He enjoyed it, I spose.

    I started realizing the fine line between “bugs” and “workarounds” and “lack of knowlege”, and realized the same thing applies to technology. If a blower breaks because you overheated it, is that a faulty blower, faulty user, or lack of good documentation?

    That’s not the real question; the real question is, why do some people win those robot contests. A lot of the underdogs have better chances (underdogs being underfunded school systems… oh wait, they all are… well, the lowest of the low). They come with the mindset of “keep it simple”. The more complex a system is, the exponential amount (did I get it right Patrick?) of errors that system can produce. Thus, the more technology gets ingrained in our culture, the more points it can break, and the more need for either self-ability to fix it, or new jobs.

    Going off of the example, when fast food finally does replace humans (has 50% up in Richmond, Virginia at a gas station. You use a kiosk to order food; you choose breakfast or dinner, sides, toppings, and condiments. A human hands you the package; do they need to? Naw, I worked at Wendys, a fast food chain here in the states created by a really nice guy named Dave, and I know making a sandwhich isn’t hard at all. Hell, Terminators’ cousin makes my Honda. Damn big paranthesis, gotta stop the insanity now… :: grunt :: UGH ). Anyway, they can’t remove people entirely; MacDonalds I think is like the #1 or #2 private company employer in the United States. You can replace the obnoxious countenance of cashiers with a PSD beveled button interface, but you can’t remove the lobbylists from capitol hill (don’t know politics, just guessing they have lobbyists for jobs there; remember reading some insanity that programmers can’t get jobs and they lobby congress to stop visa’s or something whack). Too many jobs would get replaced by machines.

    BUT, anyway, when we do, and those people are replaced, those machines WILL break. Even Kroger & Publix, grocery stores here in the south of the states, have automated checkout lines which have at least 1 dude watching to ensure you don’t steal, you don’t illegally buy beer or cigs underage, and also to fix the machines when they break. Does God watch me until I break?

    That being the case, what if I break it down? Naw, just kidding, what I meant was, that being the case, even if Rational Rose becomes a behometh, and starts coding EVERYTHING for you, you’d still need a human to configure XML files (hell, Java & Flash guyz do that now), make sure machines are up and running. The cycle’d continue, and going off of that sleep attack post, we’re all gonna be a bunch of f00king Scotties, albeit not Scottish (I’m 33% Irish), with a bunch of IT Managers going, “I need more power, sucka!” or “Fix this in 1 hour less than you time estimate!”.

    Maybe it was the kids joy riding in the pimped out Civic whilst I raked my yard. The iPod didn’t compensate; I felt old; an adult, doing yard work… with a rake… outdoors at a house I own. I had to justify my future in software somehow, mabye this post was it, maybe it wasn’t. I just felt frustrated that we live in a world where there are not just 1, but 3 pills for everything, you can surivive at a gas station when zombie’s attack, and I can talk to anyone in the world who’s jacked in… and I can’t even use a machine to blow some grass away for more than 20 minutes.

    Someday, Half-Life 2 will NOT have a loading bar. That’ll be the day my blower never breaks… or if it does, it’s because whatever fixes it broke, and the dude responsible for fixing that robot was busy doing something else.

    Bloody full moon.

  • No Complete Event for Internal Content

    Both Flash & Flex have a Loader component to load content into. It’s nice in Flash because it abstracts sizing & loading code. It’s even cooler in Flex because you can bind to contentPath.

    However, if the content you are loading in Flash is an internal symbol, or embedded content in Flex (same thing), you will not get a “complete” event.

    I find this wrong since expectations are, “I load content, I get an event while it’s loading, ‘progress’, and I get an event when it is completed, ‘completed’.” However, you only get these events for external content, like external JPEG’s & SWF’s. The documentation for both Flash & Flex versions does not state anything to the contrary.

    Frankly, since this component abstracts the loading process, it should be up to the component omit events regardless of loaded content, or emit different events. This now requires the user of the component to know which content type they are loading.

    This is an important distinction, because such low level details of whether something is an internal asset are not easily determined at runtime in both Flash & Flex. The more OOP something is, the less you know about where an asset came from. Simply adding the “Embed” metatag in Flex above an asset path, and it’s internal; your code doesn’t change.

    Additionally, Flex abstracts control via binding. Since this connection is handled for you, one assumes (wrongly) that those bindings work without data inspection intervention.

    What I’ve been doing is just checking if the asset I’m loading has a prefix of “__Resources” in it; if so, it’s an internal asset in Flex, and thus I must immediately call my complete event myself. Hack.

  • Flex Chronicles #12: External Text Files for String Variables

    Typically, if you want external content in Flash, you link to an external text file, and load it into a text field like so:

    lv = new LoadVars();
    lv.owner = this;
    lv.onData = function(str)
    {
      this.owner.my_txt.text = str;
    };
    lv.load("yourTextFile.txt");

    Quick and dirty, right? Well, Flex does the same thing for you, but without all the work; check this out:

    <mx:String id="data_str" source="some.txt" />
    <mx:TextArea text="{data_str}" />

    Yes, that’s it, I swear! The line between authortime & compile time is blurred so technically this is compiled in, but it remains an external text file you can check into source control & deploy on your webserver, or keep locally.

  • Flash, Flex, & AMFPHP: RSS Reader Example

    Wanted to not only learn bindings in Flex, but see how they compared to Flash in terms of actually using them and seeing their benefits side-by-side to Flash. The fact you can bind any property to any property of a GUI component rocks the mic!

    So, since both of these RSS reader’s hit the same AMFPHP webservice, I figured I’d just upload the source so you could see how to use Flash & Flex with AMFPHP since there aren’t many examples around on using either, ecspecially for using RemoteObject with something other than Java, in this case PHP via AMFPHP without using the Flex server. Additionally, this is a simple enough example in Flex to see how the bindings work.

    You’ll have to setup AMFPHP yourself as the SWF’s are not using the Flex server as a proxy, and thus will not work unless hosted on www.jessewarden.com because of the security sandbox. Unless you spoof this, or use AMFPHP to actually forward the request (which is easy I believe), or just setup and run localhost.

    Here’s how they work:
    – Flash or Flex hits the AMFPHP gateway via Flash Remoting, and calls the getRSS1Feed method in a PHP class called RSSReader.
    – The RSSReader class’ method, getRSS1Feed takes 1 parameter, the URL to an RSS feed, and uses Magpie to parse it into a usable object. It then returns this object in the function.
    – AMFPHP sends the object back to Flash or Flex.
    – Flash or Flex then displays the RSS feeds and allows you to cycle through the blog entries.

    Needless to say, the Flex one was faster to build, and more fun!

    The Flash One

    The Flex One

    Files & Links

    Source Files

    Magpie PHP RSS Parser (his files need to be next to RSSReader.php in the AMFPHP “services” folder)

    AMFPHP

    Flex

    Flash