Skip to content

Rob Williams' Blog
Syndicate content
Random musings on Java development in the 21st Century...
Updated: 2 hours 27 min ago

Returning Kindle Content Sucks

Sun, 09/05/2010 - 17:10

There are few companies that I have literally had no complaints about over long periods of time with many interactions. I don‘t know where my lifetime purchases # is on Amazon, but I order everything from shave soap to tea to rugs to books. I bought a kindle a long time ago and for the most part have been pretty happy with it. For whatever reason, I have had two really bad experiences with Amazon (for the first time ever) in the last month or two, and they are united in what they might tell us about the technology this monster uses to run its business.

I have the Samsung UNB6000, which has an ethernet port, so I have used Amazon's Video on Demand quite a few times. Recently, I was looking to see if they had the sci-fi film I blogged about a month ago or so called The Incredible Shrinking Man I found it and was going to buy it, then a friend of mine found it as part of a large bundle for either the same price or a dollar more or so. So I ordered the bundle. Soon as the transaction was complete, I found out I only got the single movie. I emailed them and got a live response saying 'this requires more investigation.' That was on July 31. The link to the bundle is here if you purchase that you will only get the one film.

Yesterday, I went on and found that there‘s a 3rd Edition of Core JavaServer Faces the Geary/Horstmann book. Saw that there was a Kindle Edition, so I was like 'gotta get that.' I purchased it, opened it and couldn't find anything about JSF2. Turned out, it was because Amazon again had baited and switched me. (See the picture: notice the covers of the books are different, but the link doesn't indicate 'here, buy the last edition'.)

What got me even more lit up though, was the horrific rat maze your first Kindle return introduces you to. Again, when an ATT call drops, I usually don‘t get that excited. Why? Because I push a button and a minute or so has been lost. Seriously, Folks, I spent 20m at least, probably 30, trying to figure out how in the hell you are supposed to return content. Some of this is my own stubbornness because I did a Google search and found out that you have to send an email. The problem with that (and with the general orientation of living in a Google-provided world) is that you are always sifting through a dumpster that has no concept of what is fresh vs. rotten, new vs. old. Finally, it turned out that the search was right: if you go to Orders in Amazon, you can see it‘s easy to return physical items. There is no corresponding process for the Kindle content items. How insane is that?? What kind of upside down world is this??

But wait, let me go way beyond this. There was a huge stink a few years ago in Southern California when some inspectors went into supermarkets around here and found that some items rang up at the register at prices different than what the labels said. I‘m sorry, this is the level of fraud we are talking about here, and Amazon is treating it like ‘ok, mr. pain-in-the-ass, lemme go see what your whiney ass problem amounts to…‘ (and then they don‘t even return a month plus later..

I see something else here too: technological rot. Face the facts, folks, most of the titans in the web world have a technical lineage that is spotty at best. We all know that Amazon was a huge hot mess of garbage like perl. This is what happens. Pancake only works through a couple layers. (Actually it doesn‘t really work, it‘s more that the growth of revenue makes it possible to spend a ton of money telling yourself that you are improving what you‘re doing (even though you aren‘t).) Got me thinking about how I would redesign Amazon if I were given the chance. It‘s not smart. It thinks it is, but it‘s not. It‘s constantly jamming recommendations in my face all over the place, and some of them are pretty good, but they are all over the place (because I buy a lot of stuff there), and they are pretty dumb. I have bought Nikon lenses, but it‘s suggesting Canon lenses to me, etc. The only two things they know are ‘this is popular‘ and ‘others who bought what you bought.‘ I used their mobile app a few times and it was decent. But my overall experience with newer Amazon stuff has been poor. Especially Video on Demand. It‘s a nightmare finding things on there, and it‘s easy to waste half an hour and not even come away with anything. Furthermore, when you are running a rental business, e.g. ‘get this movie now and you have 48h to watch it,‘ the message that sends to potential viewers is ‘you are going to have to come through this rotten maze every time at the point of consumption,‘ which is INSANE. At least give me a damn queue like Netflix does. Idiots.

Finally, while I‘m on the topic of Amazon, I have one more beef with them. There have been studies that show that buying online is greener than going to stores. There is zero question about that. That said, it pisses me off that I live in an area that is geographically prone to smog and the dopes from UPS still charge up the hill to my house in a truck that is not CNG. I blame UPS, but I also blame Amazon. This is your supply chain, in the same way that recycling coffee cups is Starbucks‘ problem. I never eat at McDonalds, but the reality is that they got Temple Grandin‘s slaughterhouse designs to be adopted, and have pressed the clowns in that business to clean up their acts in other ways. If an Amazon competitor came along tomorrow who really had that part of the story down (and it wasn‘t just run of the mill greenwashing), I‘d probably buy stuff from them..

Categories: Blogs

Some Hands on with JEE6/JSF2

Sun, 09/05/2010 - 02:51

I have been doing JSF since 2004. I blogged for a long time on here about some of the shortcomings of JSF 1.x, but overall, have always sustained that a flawed framework is better than a tinkertoy one that is not really a framework at all (Struts). Seems like I have been waiting for JSF2 for ever. Finally, getting to put my hands on it, it feels pretty nice so far, though there are some things that are still the same.

The Weld getting started doc kind of sucks. They were showing a login screen, which I needed, so I figured I would follow along. Spent a bunch of time flipped over in a ditch getting database errors until I went to look at the Producer class from the stupid Widget class that‘s included in the JEE6 generated project and found that instead of annotating a public instance, they had a getter with a note about Weld closing the connection if you referenced the field (as is shown in their own getting started doc). Sure enough, as soon as I changed to that, things started working. Overall, I am still queasy about the degree of annotation-fatted addenda these JEE6 approaches entail, but I can see the logic of the approach. I have had my own way of doing Repository classes for some time. This looks pretty straightforward, though it does seem kind of weird to be calling things by names in an annotation (e.g. WidgetRepository) that are actually just the bare knuckle object that you would usually have behind such a component (the EntityManager).

The cynic would argue that DI spends a LOT of time trying to elegantly make things appear places magically, when in fact, the range of objects that require this type of delivery is probably extremely narrow, with the EntityManager being chief among them.

In doing the registration page, I had to have a password and confirm inputs and check that they matched, so I delved into JSR303 a bit. One of the big complaints about JSF 1.x was that validation was confined to a single component so broader validation required methods in the controller or a custom validator class. The annotations that have been added are useful, and there is one that allows you to even do things like scripting, but that kind of stuff does not get me excited: I would literally rather add a validation method to a controller than to put some ugly script code into the body of an annotation. It did occur to me though that something like DbC might have been nice here. Instead of wasting a bunch of cycles in Sillyland talking about closures in Java 7, there should have been a movement to really put basic contracts into Java with annotations. Would not be hard, then you could just define an invariant for conditions like these. (The new validation constraints look like they should be part of a generalized DbC mechanism already.)

The real star of the JEE6 adventure so far is Glassfish. I was kind of pissed when I first started out because i very quickly figured out that the Weld main page was getting a banner from a css file, so I found it and replaced it with my own banner image, but could not get the rig to see mine. It was very strange and I am not settled about the resolution, which was basically to change other elements on the page, then finally, it did change the banner. While doing so, I tested the amount of pillow fluffing the system required to recognize a css change, and it appears the answer is it doesn't automatically, but a mere publish (Command-Option-p) will suffice, but the best news is, that happens VERY quickly. Which brings me to the altar of another wish I've had forever. Whenever I have seen quick cycles like this, and gotten drunk on them, another part of my brain chimes in to remind me 'dude, the app has 3 or 4 forms in it; once it does something, it'll come back down to earth and you'll be wanting to go break things..' Have not read about this yet, but that is one of my great hopes for OSGi: that we don‘t have to put all interface components into one big pile of components or into one big war file for the one big project we are working on. (Maybe there is a maven archetype for a components project based on JSF2…?)

It‘s also a relief to just have a bunch of the JEE6 baked into the server. We had lots of fun in the past flopping back and forth with conflicting version issues, or marking certain parts as provided when going out to JBoss, and back to inside the war targeting Tomcat.

Someone needs to figure out why the JSF train was in the tunnel for 6 years, then the Java world should just make do with what there is. JSF2 is a good framework, and whatever remaining ills it has should be easy to dispatch.

Categories: Blogs

Spring v. RedHat v. Oracle

Thu, 09/02/2010 - 16:43

Remember when monster movies jumped the shark they did that battle of all monsters movie where Gamera came flying in on Godzilla vs. Baby Kong? Was like a monster version of a Vegas drag show. The Java world is reaching that stage. Here are a few thoughts on the various parties (just did some of this, so this is more technology focused).

Red Hat

I still like these guys best of the 3, though that may be changing, we‘ll see. The experience of getting a new project going with Weld was unpleasant. First, there were maven archetypes, which is great, and they showed up in m2, which is also great. But then, the Tomcat one is pretty much useless, there‘s no JPA, and no examples of adding any (you can guess numbers though!). Read around a lot and there were a lot of people looking for something to no avail. So I downloaded Glassfish v.3 and installed that. Then regenerated the project. Then I hit a slew of insanely stupid errors. The main one was that the damned xhtml template the project includes has a typo in it. BTW, Weld has its own way of reporting errors that is seriously sucky. Also, glassfish, though it installs in eclipse, doesn‘t write to the console! ( update: I‘m an idiot: they have their own console, which is cool..) So I have to go open their stupid log file to find out what went wrong. Stoopid. Finally, the example doesn‘t work because the db is not started. There is no way to start the db from the console, so you have to go do it the old cl way. Nice.. At least it works.

Still very intrigued by Arquillian. Read a good article about finding a bug with it (see below). Even though Dan Allen and Gavin King are archetypal angry guys, there are some things that require some anger. A decade and a half with the inability to do real integration testing quickly and easily and hot deploy top my lists. (BTW, see the link below where a guy after my own heart does a retrospect of his latest project and says most of the time went to waiting around for restarts, etc. The other damage we are doing is only the lobotomized drones will remain, vs. iOS is insanely fast, the simulator does everything, now Instruments does testing… yada yada yada…

Oracle

Glassfish does look kind of nice, but I hold out zero hope that Oracle‘s tutelage will be anything but a disaster.

Spring

Ok, so a few things conspired to bring some Spring love into my life for the first time in a REALLY long time. One, I was literally about to do a blog post about how it‘s time for object databases to reemerge, and I just happened to read yesterday that Spring is acquiring Gemstone. That I think is a very good move. SQL is great, my friends, but object databases make a lot of sense. And let‘s face the facts, the advent of the cloud, and CEP is changing everything. The idea that we have to see pounds of sterling laid at the db vendors‘ feet is ludicrous. Of course, since Java‘s papa is now the biggest db godfather of all time, don‘t expect to see any movement in that direction from that side. Likewise, Hibernate is still the most successful RH piece of the JEE puzzle, so I doubt they are in a hurry to give us a real OODB. Go Spring on this one!

When Weld was pissing me off, I went looking for some Spring archetypes. Didn‘t see any, but then this morning here on jroller found a link to a guy who has one. Will probably generate the same project using that archetype and A/B the two against each other. If Spring is doing CDI now, let‘s just cross off the DI crap and move on, People, this does not deserve more cycles. Time for a lean redux here.. actually, it‘s really now or never…

Spring JEE Archetype
Weld Reference Doc
Interesting Site on CEP
Good Dan Allen Post re:Using Arquillian to Find Weld Bug
JEE6 Tutorial w/Discussion
Excellent Discussion of JEE6 v. Spring
Weld Quickstart for Maven Users

Categories: Blogs

First Quick Look at CDI (of JEE6)

Thu, 09/02/2010 - 15:55

The good news is that you can have a parameterized constructor (one). The docs (at least the Weld docs) tell us that this allows us to have immutable objects. A builder (a la Bloch‘s from EJ2) would have been better, but this is a great relief from the stupidities of default constructors on every object.

As I push farther into this document, though, I‘m kind of overcome by the thought that Enterprise dev is turning dependency injection into its version of string theory. The purported advantages of DI are that you make explicit the wiring up of components. But DI came in on the XML boom where we had cabinets of interconnects that were nameable and traceable. Ok, argument makes sense: pull the random uses of new out of the code. Also, wire together compound components into bigger units (something language does not deal with exceptionally well because there is no concept of a component in any languages that are out there). So doing bean definitions in XML that had subcomponent wirings explicitly laid out made sense. Problem was, XML became its own nightmare and people decided annotations made more sense. So it‘s ‘ok, let‘s go back into the code,‘ begging the question ‘um, how are we better off than we were when we used to do this in the code?‘

The answer is that we have a container doing work for us, assembling components and then managing their scope.

One thing is for sure, and this is generally a good test of whether we are off in the weeds: if we were starting from scratch, JEE6 and CDI would not be what we would produce. That I‘m sure of. It‘s got all the hallmarks of rutted, grooved warps and whip marks. Of course, because the generals are always fighting the last war, but also because each act of creation is simultaneously the putting to death of some prior genus and the birthing of some supposedly superior species, this is what the various powers have come up with. (Further proof that committees drafted from a few of the cognoscenti does not mean you get some magical incantation involving colored smoke and a visitation. As a matter of fact, apparently the road to CDI was insanely contentious and nasty. Read a Guice Bob rant about what a nightmare it was to work with Gavin King.)

The theater of that in JEE6 is not quite as successful as it was in JEE5. Then, we were getting JPA, which made so much bloody sense, the rest of the train was taken on spec. DI, now that it has gotten its moment in the sun, is starting to look more like a rash than a solution to any immediate problems (other than the DI problems of the prior round).

I was reading a blog on here the other day where some guy was flummoxed because he‘d had an app where he had 10 different versions of the same interface dutifully laid out in his XML file and did not know how to do the same with annotations. I suppressed the urge to suggest starting over. Might be a good piece of advice for the spec guys too. I do believe that CDI is better than continuing on with Spring (now a commercial force) with no standards coverage.

Categories: Blogs

Mac Mini Server Porting Story: Bloody Hell

Mon, 08/30/2010 - 07:37

Finally finished moving from a mini server I got end of last year to a new one I got a few months ago. The porting process was so hellish it made me rethink a lot of things along the way. But then, when it was all done and working, somehow, the regular functioning of it, churning out commits and CI builds, and the like, took all the pain away. [Favorite Nietzche theme: humanity/history impossible without repression.] So what am I doing here? Wanted to memorialize a few of the things I ran into.

So it must have been some karmic joke that I had just been on here blogging about how wonderful the Apple docs were for iOS when I went skipping down the SLS garden path, fearlessly anticipating a day at most to move all my crap from old mini to new. Sometimes, I can be a real idiot when reading things, assuming that if something were meant to be there for my case, it would be explicitly marked as such. Well, the Migration Guide has a section in it about migrating from 10.5 to 10.6, but no documentation about lateral migrations. So I started just trying to move things and it quickly turned into a nightmare. Eventually Open Directory got all hosed up. Figured I would need a new OS install and went to share the CD from one of my Mac Pros and when that didn‘t work, I had to call Apple.

Their support was pretty much excellent. Didn‘t start well. The first guy told me ‘yeah, the docs still say 10.5 to 10.6, but those are the steps you should be following.‘ I was kind of flatfooted by that. ‘Wait, new server and they were just too cheap/stupid to add a new section or a note?‘

Once I was alighted to the path, things didn‘t really go that much better. Migrating jabber was a nightmare. Archiving all the files into a tar was a miserable failure. Eventually, mapping a drive from one mini to the other made the most sense, then using the command line tools to do the migrations. All of this has the feel of exactly what you don‘t expect from Apple: a clown car of one-off schleps.

One of the reasons that I started to relax a little about how much more a PITA it ended up being was because I learned a lot. I had already gotten my head around launchctl, and come to like the Tomcat way on the mini. But I learned a lot about Open Directory, jabber, and Hudson. Frankly, my adoration for Hudson came down a bit because it turns out it violates one of my core laws of applications: though shalt not allow default configurations to create a nuclear waste site that requires a HASMAT intervention at some point. Hudson saves every build of every app it ever built unless told not to. It also seems to dump a lot of crap in the jobs directories. I am pretty skilled at combining find and -exec gymnastics when the situation demands. When you start trying to crawl around in the job directory and decide whether various incisions might render a limb useless by cutting a muscle loose. (In the midst of this, I started thinking ‘is this a model?‘....)

Eventually, it seemed like it was about to all be done and suddenly the server started booting every 10m. I started flipping out. I went down into the office and was sitting there trying to figure out what was going on when I looked up and saw that the server and the NAS went off at the same time. Since they were plugged into a dedicated outlet going to a brand new 200 AMP box, I realized immediately ‘wait, the hell of my unreliable NAS has been a power strip this whole time??‘ OMG So, I rerouted it and that was the end. Started working, kept working, that was the end. I took an APC 1500 AMP UPS down and plugged both the NAS and mini into it and they‘ve both run without incident for a few weeks.

The only thing the old mini was doing still was it was the Open Directory master. I had migrated it when I installed the OS on the new mini, but for some reason, I was not seeing the accounts in the 127.0.0.1/LDAP dir. So I did export and redid all the passwords! Good timing though because the old mini nodded off not long after.

Virtualization has delivered not really push button OS installs that are easily moveable, but rather the ability to fiddle with instances, and cut out a lot of the pain of admin-driven requisition. My recommendation to Apple would be to make it so you could get a new server, install it, and then migrate things from one machine to another, e.g., the Jabber server sees the other one, and replicates the accounts, ditto Open Directory, web sites, etc. Doubt it would be that hard. No documentation is the best documentation. If the console was service-focused, then the addition of instances would be something the system could handle without any real intervention.

Last thing is to get Gerrit installed. Kind of skeptical, and still thinking I might want to do my own review app at some point, but looking forward to it.

Categories: Blogs

Few More Thoughts on the Revolution

Mon, 08/30/2010 - 00:22

Returning to the primary delusion about Revolution. For whatever reason, the modern perception of revolution is that fat leaders of unprecedented power finally end up so far out of touch with their subjects that the unruly masses rise up and rid themselves. Ok, that never happened, anywhere. The French Revolution doesn‘t fit that model, neither of the English Revolutions, certainly not the American or any of the Russian ones. Invariably, the model is some part of the society starts to gain some power and the leaders usurp that power and when it becomes clear that the crown is not going to aid their continued rise, the problems occur. The Puritan Revolution of 1640 was precipitated by the Crown‘s need for funds to put down a Scottish Rebellion. Bertrand Russell‘s son wrote a revisionist book about it in 1992 that argues that the prior explanations that it was a bourgeois revolution (Marxist) neglected the realities of what happened when it broke out. That‘s silly though. Consider the following, more abstract model: consolidation of power followed by rise of vested classes then a negotiated phase of ‘reform‘ which ultimately blows up on the reform leader who can‘t hold all the factions together. That fits a lot of them: 1640, 1688, French (Louis XVI was a reformer), George III (not willing reformer, but the whole structure of the empire was being re-formed, e.g. triangle trade, niggling with the French over the fur fortune, etc.) and then Alexander II in Russia (freed the serfs and got blown up for it).

Java was clearly a revolution away from the horrible repression of Microsoft. The original dream was get all your stuff out on the web and grow it organically, with this wonderful language that everyone could have a say in. Then, of course, the benevolent leader inched forward to try and position himself for some monetary gain from his new found jewel. The idea was mounted ‘let‘s make an enterprise version, that will have beans that only the expensive pay tools will be able to create and manage, and we‘ll tell people only our big machines can be trusted to run these great new systems.‘ Miserable failure, followed by second revolution: POJOs (Spring). Short term flourishing, but clearly a death sentence for the Leviathan. No one seemed to care. Then the Spring guys went and raised a bunch of investor money and suddenly, things start to smell a lot like nothing has changed in a decade: they want to have an enterprise edition that‘s pay with support and services, blah blah blah… But wait, this wonderful new thing called OSGi (O stand for open, Kiddies) is going to take us into the promised land. Whelp, another lead balloon later, the original Leviathan was gobbled up by easily the biggest ahole in the history of IT. Larry Ellison makes Bill Gates seem like a character from the book of Saints. Granted, Ballmer is in the same league, but he‘s just so much less ‘let them eat cake‘ than Larry.

So in irony of ironies: we now have a situation where the Revolutionaries, who believe the false model that the core of revolution is finding oneself under a disinterested leader who cares nothing for his subjects are wearing Larry‘s uniform, looking across the water at the Apple Developer revolution saying ‘I don‘t want to be Steve Jobs‘ subject!‘

Let‘s go back to the model. I would argue that the precipitation of revolution is when the subjects who have some power realize that the leadership‘s interests and their own have no intersection points. I would say that point is clearly here in the Java world. Not today, but coming for sure. But I am going to make a perverse argument. Not just because Larry is now Lord of the Land. No, because the powers that have coagulated over the past decade and a half are increasingly turning into gigantic brontosauruses who need to slurp up a forest of growth eighty feet in the air, even if it means stomping every subject in the land. OSGi anyone? I agree with Gavin King: for top 2% of Java projects, vitally important, and costly but probably useful advent, for the other 98%, useless pain in the ass. Furthermore, this is energy not being spent on the huge holes that have gotten no attention for a long time. Testing? Go read the Arquillian page. Dan Allen saying ‘yeah, JEE sucks for testing.‘ OMG, it‘s been a damned decade plus. Think you can just put Arqullian in and start going? No, it‘s not even pupal at this point. There‘s so much beta shit in the Java world right now, it‘s NUTS. Does this make you think Cambrian Explosion #2 is imminent? Not me. Makes me think the hydra‘s about to bleed out because there‘s not enough blood for all the heads it‘s spawned. RichFaces just trying to add JSF2 support has been like watching a snake eat a donkey, in slow motion. It literally hurts. Weld, looks great. Looked great when I looked last year. Trying to locate where it was in the fallopian tube today was more trouble than it was worth. A whaling ship has one guy who goes up the mast. In the Java world, you have to have regular sentries running around trying to tell what the hell is going on. Are we ever going to have hot deploy? No. You know why? Because the brontos don‘t need it. What they need is a whole new circulatory and respiratory system. Dreams of Java unification are making hammering out a deal on Jerusalem look like Ralph Cramden‘s civil service test. It‘s clear what is going to happen here: Larry will be the reformer. A horrifically bad one. Mark my words.

Now, let‘s consider the other options. Google is rumored to be working on a new language. Ok, great. Problem #1: Google is like Microsoft. They tell you how much they care ‘Developers, Developers, Developers…‘ then hope you don‘t watch the other video ‘Advertisers, Advertisers, Advertisers…‘ Eric Schmidt has all the charm of a cross-eyed sand shark. Ability to inspire: 0. Ability to make me believe he has a vision (singular, feel free to substitute any) for the future of development: < 0. Google has a lot of smart people. Read the announcement about Go and thought ‘oh boy, this has the ugly whiff of a kingly edict.‘ Nothing interesting, visionary or fun there at all. I see Google becoming more and more consumed with having to mount this image of revolutionizing everything on earth, email, maps, web dev, mobile, etc., but having no vision for making them all go together. Google‘s #1 enemy: complexity. Remember Microsoft was going to present a unified vision of computing? From the vantage point of 2010 that sounds sillier than jesus‘ face appearing in the toaster of a truck stop.

Red Hat was my choice for Java stewardship. Their latest announcement is that they are putting the whole platform up on the cloud. Ok, we‘re too stupid to do that ourselves, and frankly, they are going to be app vendors soon, which has never worked for tool makers. Good luck with that guys.

I don‘t plan to stop doing Java any time soon. But I also don‘t plan to think ‘der, Larry‘ll do the right thing, right?...‘

Wired‘s latest issue, somehow, kind of capsulized the moment fairly well (in their typically, infantile, overwrought sensationalist way): the web dream is over. Didn‘t work. So go forth and program devices, and use the web as an interconnect backbone. But increasingly, blood will be flowing away from this monolithic dream (as it should). In a lot of ways, Larry mounting Java is like the French deciding to have it out in Vietnam after WWII: so dark and cynical and useless, and clearly mercenary. As I have said a bunch of times before, Steve Jobs is not perfect, but the likelihood that a unifying vision of ‘the road ahead‘ will be better from him than from these other barnyard fascists is orders of magnitude higher. Go view the WWDC sessions and you will see not a stagnant village of hypnotized idiots taking gruel for patĂ©, but rather, a huge, growing organism that is bent on keeping its interests aligned with its users and developers. I believe in a world where consequences are immediately felt by producers through consumers. Not one where a bunch of subjects are seen merely as a way to keep another source of blood flow going. Only Apple fits that model right now. Everyone else is in the business of making money from something else, and almost always that something else involves subjects who are really captives.

Categories: Blogs

Other People's Stuff

Sat, 08/28/2010 - 20:51

No, this is not a post about the IT equivalent of the Stasi. Rather, a simple meditation on why it‘s advantageous for us to rummage through each other‘s stuff from time to time. We all know that the best presentations at conferences are the ones that more or less give you a tour of something under construction. Part Bertolt Brecht/Roland Barthes (from his Structuralist Period), the idea is that the mind must be stimulated into the putting on of the thing. The dead form of this, per Brecht, is mere voyeurism, the active form is one of the most powerful types of stimulus there is (well, maybe next to cash for clunkers).

Today, I was puzzling over the 401 error from egit. The only thing that sucks eggs about git is the patchwork of silly nightmarish potholes the mere use of SSL opens up. You can wrestle with curl, install ssl, add your cert, and ultimately, you will still have to set http sslVerify=false to clone a repo that is protected through webdav. To make matters even worse, egit doesn‘t work getting at it (previous post) and even the Xcode 4 Preview doesn‘t work. (The good thing is, since this is git, you can pull down the repo into a local dir and then point the tool there, leaving yourself just to have to do push/pull from the command line.)

So, while mert and I were strategizing, I suggested pulling the egit/jgit source. I did that, and then innocently went into eclipse to import it as an existing Maven project. To my surprise, I was shown a tree with a pom at the root and a slew of children. This is something I've wanted for AGES!! and it appears to work. Guess I didn't get this memo(others did).

So I take back some of the mean things I‘ve said about m2Eclipse ... this is great. Not the least reason being I am sick of having a lot of crap repeated in jar poms all over the place.

Categories: Blogs

The Problem with C++? Hint: Not the Language

Fri, 08/20/2010 - 16:14

Like most people who did it, I had a love hate relationship with C++. I am probably a very small number of people who bought the Zortech compiler when it was released (first commercial C++ compiler, by Walter Bright). I still remember reading the manuals and thinking ‘wow, this is awesome: there‘s a class for money!‘ It seemed to my naive, optimistic mind that people would embrace this and programming would be a mass of happy shaved apes, moving forward into the object realm, singing kumbaya. Of course, what happened instead was C++ became a food fight and the very people they were trying to coddle spoiled the whole thing. Well, there, I‘ve gone and let the cat out of the bag.

The first phase of my C++ use reached its crescendo when I wrote a program using Borland C++ 3.1 for Windows where I had all kinds of nutty things like drag and drop and multiple document creation/coordination. Was pretty dreamy. Then Borland 4 came out and I started using templates. I didn‘t think a language could get any better than that. Soon, Borland cratered and I ended up using Microsoft Visual C++ which ruined the language for me. Mostly it was MFC, the worst framework in the history of the world. But it was also the general lack of drive to take the language and embrace the burgeoning web. Microsoft hired a few smart people and the ATL looked good, but Java came along and it seemed clear very quickly that was the bus out of hell.

While I was blowing through the outstanding WWDC 2010 Sessions, I saw one that showed that the C++ support had been beefed up. I didn‘t think much of it. Then, I had occasion to need to write a kernel estimator so I started looking around at some implementations that were out there and found out that the boost library for C++ had a LOT of statistical functions in it. I started poking in there, then I was wondering ‘how do Objective-C programmers do math?‘ and a door opened: they do C++. So I started thinking about Objective-C++ for the first time (everything is about how the door got opened (though, as Nietzsche points out, later, it‘s almost never about which door it was)). The thoughts were really good. One of the reasons was I thought the combination might be a really powerful one: an outer dynamic language with a great framework and the ability to pull out all the stops internally (and just access to STL got me pretty excited).

Then I started looking at the boost accumulators and the whole little cup of milk curdled. First off, C++ has the capacity to produce some really ugly code. I was going to clip out a bunch of excerpts, but it‘s really not necessary. That library is the work of the ugly cabal that ruined the language in the first place: unrepentant, procedural dopes who don‘t understand objects, don‘t want to do them, and who just can‘t part with a world full of stupid, obfuscated symbols that make perfect sense to them. At first, I literally went in thinking ‘huh, cool idea, so I can perform operations on members of a set and accumulate the results.‘ Then I saw the first example and thought ‘what is better about this?‘ Then my next thought was ‘wait, where is the work? what is this thing doing for me?‘ The answer is clearly not much.

Finally, as I was zeroing in on the kernel estimators issues, I started to look around and wondered ‘shouldn‘t I just have a class called a kernel estimator?‘ Then design patterns started to slip into the picture. KernelEstimator should clearly be an interface and GaussianKernelEstimator one of the implementations (others would be Quartic, Triadic, etc.). What the hell am I missing? This is not ‘gee, aren‘t I smarter than the boost guys?‘ This is ‘these guys either don‘t know objects 101 or they know them and they just patently refuse to practice them.‘

Finally, a kernel estimator has a bunch of values added to it, then the probability can be rendered for a given value based on a density estimate. There was a Java one, in no less than WEKA, which is part of Pentaho. But it was such ugly code it made me want to vomit. Pre JDK5, doing arraycopys all over the place, keeping values in one array and weights in a corresponding one. Ugly. Where is the notion of embodying what is happening? For instance, values are normalized. Where? Distances are computed. The interface in WEKA was void addValue(double) and double getProbability(double). To me, why even do addValue? Pass the thing the set you want to operate on. But then, I started thinking about how I could structure something like a template method. Some computation is done when the delta‘s are computed and the results are accumulated. We could call that computeKernelValue(double) or something, then, the base class could accumulate the results of that, then some normalization is done on the results, e.g. nonNormalizedDensityEstimate / sampleCount / rootTwoPI. So we could make getProbability into something super simple:

double accumulation = 0.0;
for (double value : values){
accumulation += computeKernelPoint(value);
}

return normalize(accumulation);

so then each implementation variant just provides a different override of computeKernelPoint and normalize.

There are probably 2 things at play here:

  1. procedural programming corresponds to the language these people were trained in (equations), and
  2. to someone whose whole sense of value is tied up in doing the equation, making an object that puts it inside and allows any dope to come up and draw milk would clearly be seen as giving away the cow rather than selling the milk

Got me thinking about something kind of interesting. While Java did not solve the problem of pointers (that scared a lot of people away from C++), tools have now, and I just can‘t get past that metrics study done 5 years ago or so that showed the 90% of C++ code was C (not object oriented). The ultimate measure of a language is how it transforms practice. If the answer is not at all, what is the point? Anyway, the idea I had was what if we wrote a program that crawled around getting samples of projects in different languages and made a determination of which ones were most object oriented in practice (praxis) rather than just in capacity, or conceptually (logos). I bet Objective-C would be near if not the top of the pile. C++ clearly would still be mostly the tool of C programmers who now don it (falsely) as a cloak of their progress. Despite that, I am still looking forward to using it in Xcode, and do believe it could be a major advantage for Objective-C going forward.

Categories: Blogs

Adobe Hegemony: Would Be Hell on Earth

Sat, 08/14/2010 - 15:20

It‘s hilarious that they were seriously acting as if they should be the single source tool provider for, um, the whole mobile space and web. Track record (past and present) shows that their tour (were it ever to come to pass) would make the Microsoft Epoch seem like the Era of Good Feelings.

Mobile Photoshop App Gets Slammed

Categories: Blogs

Bruckner's 9th

Mon, 08/09/2010 - 21:39

I never tire of this piece. Even though it‘s unfinished, the 3 movements that are there are amazing. Funny thing is, I don‘t really love any other Bruckner symphonies. 7 and 8 are good, but 9 is from outer space. It‘s also an incredible piece to see live. The first and second movements will make the hair on your head stand up even if you‘ve heard them a thousand times.

You have to like a guy who just drives straight into traffic: Beethoven‘s shadow is everywhere here. The piece is in D minor (as is B‘s 9th). The second movement is a scherzo (the best part of B‘s 9th) (I love scherzos..). Like the B9 scherzo, this one is canon-like, ambling a long with ferocity, but constantly restarting, as if it‘s some kind of fractal that‘s exploding in your ears.. the end still made my head fuzz out today delivered through Sonos (e.g. not even live)...

There‘s been talk about finishing this piece (a la Mahler 10), but I don‘t see the point. Frankly, I‘m not even sure I would like it more if Bruckner had finished it. (I never listen to the 4th movement of Beethoven 9.) As it is, the 3rd movement is ethereal and the end is the music just sort of fading away.

My favorite performance of this piece is Bernard Haitink's (of course the US version is out of print).

One last message from this: take a look at the pic, listen to the music, then watch Penn and Teller‘s episode of Bullshit about Old People (not their best, but a lot of good/valid points).

Categories: Blogs

Beware the Bill Mind Meld

Mon, 08/09/2010 - 06:19

Wow, it‘s a scary thing when I read an article recounting Bill Gates talking and find myself agreeing with everything he‘s saying. Kind of like waking into a Buñuel film. I have blogged on here a lot about how the future is all about modeling. Not the milquetoast version where we have templates to autogenerate 80% of the 10,000th payroll program. The one where we realize that the only way to even broach complexity (and let‘s face the fact, the first wave of software was mostly simple simulations: even ERP is just a huge simple simulation), is to increase our abilities to model.

The part that Bill doesn‘t talk about is what do these models look like?

Complexity as a science is remarkable for how little new there is in it. All problems are complex (and have always been). The dominant mechanisms for problem solving: calculus and the scientific method, deal with complexity through reduction (/simplification). Disease and nutrition are examples of problems that don‘t lend themselves to simple reduction. I like BG‘s referencing the depth of our ignorance. Good starting point. The problem with this is that absent any ideas about how these new models will work, you have to assume he‘s just thinking (as has always been the MS wont) that force will just make things happen. It really won‘t.

The far edge of probability is belief nets. It‘s impossible to even consider a belief net without a model, and probably one that is evolutionary. That‘s the modeling rubicon. Not getting Warren to put a few chips in the pot.

I do think BG has changed a lot since his days as the cracked Czar, emailing his henchman about choking their foes.

I‘m still looking forward seeing Fester sacked.

Bill Wants Better Models

Categories: Blogs

More Googling Freedom

Fri, 08/06/2010 - 03:47

Oh jesus. Ok, this story from Huffington Post is bleak. Wow, the road to rebelling against the nasty control of Apple is getting sillier and sillier. Wonder what the little ‘no walled garden for me‘ tweakers would be saying if it were Apple doing this nonsense.

Categories: Blogs

A Bug Story

Thu, 08/05/2010 - 16:33

Even with unit tests, integration tests, stress tests, there are times when you put something out into the wild and something starts happening that you have not seen before. Pushed out an app a few months ago. It exposes a web service interface. Calls into it include some ‘evidence‘ that is handed over to a bayesian inference engine and a probability is computed. The tests we had done showed the computations were extremely fast and clean. Made some load tests using JMeter, even went beyond that and made a separate war file that could be used to trigger invocations of the service complete with real ‘samples.‘ Everything was looking great. Then, the app got pushed out onto a cluster.

Suddenly, the admin from the deployment team shows up to the weekly status meeting saying that the CPU was ending up pinned after some time, and once it went nuts, it never abated.

The first thought that came into my mind was ‘why is this a. not resulting in a failure, and b. the computations are timeboxed so if the performance was degrading, it would eventually stop returning scores. But it wasn‘t. It was continuing to function properly, happily pumping out log messages about each layer of the probability calculation.

My first inclination was that there was something wrong with the container. That maybe the garbage collector was going into a death spiral at some point. But even that didn‘t make a lot of sense, because that should also have produced a degradation of service. Figured it was time for a profiler.


Last time I looked at using profilers, I put my hands on Glassbox, which is interesting, but ultimately pretty bare for someone whose used serious tools ( JProbe was king in the first half decade of Java dominance). Then I talked to a few people on the team about profiling and one of them said we would need YourKit. It had already been coming to the fore when I last did Java profiling. So I went to the site and looked at it. Seemed very impressive. But I was thinking ‘just setting this up is going to take a lot of work, duplicating this, especially since we‘d already done that and not found this condition. Then a great thing happened: I mentioned this to the onsite admin and he dipped into my favorite I word: initiative, and just went and installed it on the server.

For the first week or so, we spent time talking about JSON errors from XStream. There were a lot of them. I was having a hard time believing that a parsing failure would make a thread go zombie. Eventually, I was reading about the features again one day and saw that snapshots could be taken and saved, but seriously complete ones. I sent a request for one. While this was all going on, one of the times the machine was hung up, I asked the admin to see what the threads were doing and there was a method from the gaussian kernel estimator that performed a binary search. suddenly it seemed that there was a way to a zombie thread. Started looking at the binary search thinking ‘either this has a failure condition where it can get stuck in a loop‘ or, not being threadsafe, it was experiencing a race condition in the rare cases where concurrent probability computations had overlapping features.

As fate would have it, this kernel estimator was the one piece of open source code I used in my implementation of bayes. I found it in WEKA, a framework I used first on a project a decade ago. The code was ugly but didn‘t seem to have any obvious faults with it. There were no tests. So I pulled the code out and wrote some. Could not produce a failure. So I figured it must be a race condition. So I synchronized the method and thought this would surely squelch the zombies. I did the old trick of making a package in my own archive and putting the source in it, and adding some logging.

To my amazement, after deploying the war, the app ran fine for a while, then it went zombie. Finally, I got a dump with this zombie session and was able to see all the threads and it was clear that the binary search was where things were popping the rails. So I added log messages showing literally every comparison (>, =, <). (For a time, it seemed that the = (double) might be the problem because there were doubles involved…)

With the new logging in place, the war was deployed and a few hours later, it went berserk. I got a dump and the log was huge: 1.25M lines in it. I started going through it with vi, first from the top, then the bottom. At the bottom there was only one line, repeated ad nauseum showing what the middle and current values were. Right away it smacked me as strange that that message could appear without any intervening logs. I did :set number on vi and started doing my own binary search until I got to where the logs went over to the singularity. Then I got the thread id. Decided at this point to clip off all the dead messages, then use grep to move only my thread messages into another file and went back into vi. Again, jumped around until I found where the first message was that had middle and current values equal to the ones that were repeated ad nauseum. When I finally found it, the line say ‘computing the probability of: NaN‘. My Moby Dick moment immediately made me wonder: am I the idiot or did WEKA get me here?

Ironically, the question goes to one of my favorite schisms in programming: the one between contract programming (e.g. DbC) vs. defensive programming (Code Complete). I come down strongly on Meyer‘s side. Suddenly, I realized, this was very similar to Meyer‘s brilliant interpretation of the Ariane 5 crash report. One of Meyer's core arguments about contracts is that clearly typing is not a sufficient means of expressing constraints. In this case, the implications of leaving it to typing is that the calling interface says the function takes a double and returns one, but in reality, NaN is a double. (Of course, the counter question is why try to get an NaN from a pdf [probability density function]. The answer to this is simple: features are computed values too so unless we can be guaranteed to not get back an NaN, this is liable to happen.)

Amazingly, one hour after fixing this, a dev on one of our other projects came to me and told me that he just figured out that a problem he had found was an NaN problem (super strange synchronicity..).

The second one ended up being easier to unravel because we could just pull the code into a failing unit test. The long and short of that one was we were using CI Bayes to perform bayesian text classification. I am going to do a longer post about CI Bayes. The funny thing about that is I had done something almost the same as that project's author (the ServerSide's Joe Ottinger), but my implementation was in Objective-C. I am going to redo mine in Java because the Java in CI-Bayes is just beyond perplexing to me, and has some serious issues. Meantime, the path to figuring out why we were bombing out with an NaN using it was the following: 1. we suspected that asking it to classify items that had a lot of text was the problem, 2. we embedded log statements to see where it was breaking, which got us to zero in on a part of the project that had a loop going through the tokens found in the item to be classified. It was assigning a starting probability of .5 to the item (the idea being that in a classification problem, with no evidence the prior is it could be or might not be the target classification). After staring at it for a few minutes, the dev I was pairing with said 'if you perform a product on .5, doesn't this eventually drop out of the bottom of double?' I burst out in laughter: 'it's Zeno's Paradox! I‘m pretty sure this logic is wrong. I will also leave this to another post (reader exercise), but the reality is if your probability problem falls over with more evidence, the computation is setup wrong. Now, that said, the literature on probability is loaded with writing about overfitting a problem, but that is something totally different: it refers to too many features of some part of a problem which then drowns out the effects of other features. Anyway, this is wrong, broken, and represents a weirdly similar predicament to the other bug: code that has no tests that exercise constraints and boundaries is going to produce situations like this.

But the bigger frame for these two is that perhaps for all our tools and conscientiousness about testing, there are fundamental language problems that are not magically dispatched. In some ways Agitar was an attempt to close this: it would look for gaps between the weak expressions of simple typed interfaces and insert automatically generated tests, but that failed. It's doubtful that Meyer's crusade for Design by Contract will ultimately gain traction. Something like it needs to be in the next language, whatever that is. I'm sure I've done a blog post about contract vs. defensive programming. One could argue that even the defensive doctrine would fault the providers in both cases here: the idea is to defend yourself from misuse. One of the interesting things about the first bug was that the binary search, by going zombie, was what took down the server. The solution would be to say 'if not in range throw new IllegalArgumentException.‘ One of Meyer‘s key arguments is that even though contracts and defensive may often end in the same place, the contract wins the argument because it gets there much faster and with less pain.

Categories: Blogs

Google's Definition of Open: Lot Like Facebook's

Mon, 08/02/2010 - 15:35

The fact that black hat might be a forum for a story about how a walled garden might be good is actually hilarious on its own.

Android Apps Privacy Siphons

Categories: Blogs

Xcode's Achilles Heel: Unit Testing

Sun, 08/01/2010 - 20:15

While Maven seems indispensable to basic Java dev, somehow, when you are doing Xcode, you don‘t miss it or wish for something like it. Adding frameworks is pretty simple, and the reality is, what I would most hope for is that the majority of the 3rd party ones move to Git and then I would just pull the source and build it. I went to make a framework of my own today and wanted to add OCHamcrest, I got some crazy message in the console about out dated metadata. I got a url to the project svn and used git to clone it. There‘s an Xcode project file inside, open it and build it, then go to finder to get the OCHamcrest.framework and dump it in /Developer/Library/Frameworks and you‘re done.

Actually making the framework project build unit tests on the other hand was bloody hell on earth. First off, I kind of broke my own rule and did searches. That led to the Chris Hanson series on setting up unit tests that are mostly 5 years old. I would encourage people to not go by these guides. Ultimately, I ended up on the developer.apple.com site and followed the document Xcode Unit Testing . That is a well-done guide, but it really doesn‘t get you there on making the framework unit tests build. There is some talk in there about setting Test Host and Bundle Loader.

Ironically, what ultimately got me going was going back and forth between the OCHamcrest project and my own looking for differences. It works now. Why am I posting? Because I just did a post on how Xcode seems to be making a compelling case to be the most advanced IDE, and that many of the things that have hampered eclipse are irrelevant and unneeded in the iOS/MacOS world. But the situation with setting up unit testing is beyond ludicrous. After a couple visits to the Chris Hanson page, I thought, this really is laugh out loud funny. I am not disrespecting him, he seems like a serious guy, but it is incredibly ironic that the company who I just got done saying is taking down the age of nerds and is bringing hordes of new people into the computing world who nerds have written off, have this incredibly nerdy, nutbutter route to getting a simple unit test running in a project.

It used to be that people would argue ‘yeah I know we should write tests, but the crazy management didn‘t budget enough time for it.‘ In places where tests are easy to setup, and run fast, this argument gets obliterated because a. the tests don‘t take much time to create, and b. it‘s always more efficient to write as much code as possible in these small little tests than to be starting and stopping a running program a thousand times to make adjustments.

I don‘t remember seeing much about unit tests in the Xcode 4 preview. Here are my suggestions:

  1. It‘s silly in 2010 to have to do anything to add tests. The project templates should install a unit and an integration test.
  2. Apple should embrace OCHamcrest if not BDD in some wider way. The whole argument about Objective C is that it favors readability of the code over writability. Anyone who thinks the stupid ST assertion macros are more readable is nuts. Furthermore, Hamcrest saves you having to construct messages about what was expected vs. what was actually found.
  3. I don‘t mind not having a test runner, but I would like to see the console and not have to run around drilling into it after each run. That‘s just plain nutty. Let me detach a window and have it sitting there. (See the second enclosed image for how test failures appear now: at the bottom of a tree you have to drill open each time that‘s mostly full of useless information.)

Not sure what has made this subject crawl along at this pathetic pace on the Apple side. They seem to see the usefulness of unit tests, and there are numerous comments from their users that go back 5 years asking for easier setup. One last thing that would be nice would be some way to control the project templates themselves. Maybe that‘s there. Gonna look for that next. This kind of tool wrestling adds nothing to your life. You don‘t learn anything. There should be some statistical measure of how much of a pain in the ass something is based on how many different little doohickeys need to be set to support basic page one operation. A framework with some working unit tests would garner a very poor score at this point.

Automated Unit Testing in Xcode (This one is actually a better source for unit testing iOS apps.)
Chris Hanson Post on Debugging Unit Tests (Another nutty long, nerdy bunch of stuff to do what should work automatically (5 years old with messages that go on for pages).)

Categories: Blogs

Ballmer's Hail Mary: Copy Apple One More Time

Fri, 07/30/2010 - 21:50

So Sony, the former champs of the electronic device world, announced earlier this year they were betting the company on 3D. Laughed when I heard that. Why not just call it over and go home, Guys. Seriously. Now, we hear this week, that almost beyond belief, people at Microsoft have finally figured out that Steve Ballmer is a useless tool and that he‘s finally going to have to perform or face a putsch. This is one of those cases where saying ‘hey, I said he was a completely visionless, empty lunkhead over a decade ago‘ is hardly a boast.

But how ironic is it that the same guy who whistled past the graveyard for over a decade must now run desperately after a competitor who he has never taken seriously or face the axe? Who thinks that holds even the wildest chance of success? Maybe he‘s just Mickey‘s Montgomery: a complete meathead who cannot be removed until he‘s been given his chance to get a lot of people killed. What does it say about this country though? Bankers who ran the economy off a cliff get record bonuses, CEOs of companies that don‘t have a single major success on their watch and have less ability to inspire excitement than an undertaker can remain in charge of one of the largest companies for a decade?

Clearly, those of us who never liked Gates and thought Ballmer was 10x worse will be vindicated long term by history, that much is already clear. Jobs was CEO of the last decade, Ballmer was not only not on that list, if they had a list of the emptiest suits, he would have been clawing the likes of Madoff to avoid that crown. Why is tech so dominated by shapeless, humorless white dolts? Oh, that‘s right, because the nerds have managed to keep the world convinced that a relationship with a chip requires a priest. Jobs is the Martin Luther of his generation (minus the 300 lbs of blubber and rampant constipation) and the fall of Ballmer when (, not if) it happens, will be the end of the line of inbred bumbling fools, like the slack-jawed Hapsburgs whose mangled genes went all the way back 800 years to Charlemagne.

Ballmer will face mutiny in 18 months
Cringley Calls Long Odds

Categories: Blogs

The Age of Magoo

Fri, 07/30/2010 - 08:28

It‘s official, the whole world is obsessed with Dunning/Kruger; Dr. Mercola was blogging about it this morning. He apparently read Errol Morris' piece in the NYT. Going back to the source, the two were pondering the case of the bank robber who was so dumb he didn't have the capacity to grasp his own incapacity. I've already blogged about D-K. I was obsessed with it when I first found it using StumbleUpon because I‘ve seen it a thousand times in IT: people who you ask ‘give yourself a score on Design Patterns 1 to 10‘ and they say ‘9‘ and then you say ‘give me an example of Composite‘ and they say ‘when one thing is made up of other things?‘

Today, I was going to blog about fixing 2 bugs this week that were ultimately, it turned out, strangely related (in totally different projects). One involved a computation of infinity and the other the infinitesimal, which got me thinking about one of my favorite films of all time: The Incredible Shrinking Man I did a tour in college running the film series one year which was thankless since people in, yes, the birthplace of film, were not disinterested, they were belligerently opposed to foreign film or anything more ambitious than The Blues Brothers When I showed this film, it was a really interesting divining rod: the intellectuals who'd been turning out for the likes of Bergman and Bresson were totally put off, and a lot of the witless action/thrill-seekers were turned off by the pretensions. There's a reason this film has a 7.7 on imdb, and garners a place in serious film analysis books like Amos Vogel's great Film as a Subversive Art

I hated the show “Mr. Magoo“ when I was a kid, but I find myself bringing it up all the time these days. Today, I realized that Magoo and TISM are kind of opposite ends of the Dunning-Kruger spectrum: Magoo is man hurtling into the accelerating freneticism of the future completely oblivious (like the D-K bank robber thinking he‘s invisible) while TISM is Russell‘s too conscious man, literally seeing himself shrinking away from a world that is becoming more and more dominated by things. All great works of art have some level of allegory, and TISM is one of the great ones of all time (thanks to Richard Matheson‘s amazing script and Jack Arnold‘s great direction (also love his adaptation of James‘ “The Turn of the Screw”)). What a prescient vision from the end of the 50s: as humankind shrivels, the struggle to hold onto some dignity is the natural first phase, but it quickly gives way to a desperate struggle to not perish at the hands of objects over which assured mastery it seems was merely a function of scale. The still is one of my favorites from film history: rousted from his doll house digs, the protagonist ends up in the doorway to the underworld (his basement), with an animal that is a miniaturized version of one of the most lethal organisms the ecosystem has ever produced, clearly, there is no way the last defense will hold. But the film‘s not done there: the last chance is that the wife, whose intuition is that her husband is in the basement, might find him. A few more random events conspire to assure this too evaporates, and as his world recedes, we‘re given a few telling signs that his own brother is already moving in on his desperate wife.

Is there anything between these two extremes? In programming, we are constantly being overwhelmed by complexity: soaked in it, and yet, the huge successes of the last few years are treatises in Magoo-like simplicity: Twitter and Facebook. Happened to catch a nauseating trailer for Aaron Sorkin‘s new film about the rise of Facebook. It seriously looks like it‘s going to make Jersey Shore look like Shakespeare in the Park. The lowest, stupidest flagellation, nay moth-like fluttering around the flame of power. Not real power, just its phantom: the temporary slags who got their name in the directory (momentarily). In this week‘s premiere of Mad Men Betty‘s new husband defends her hanging onto the house saying ‘it‘s temporary‘ to which Draper responds ‘everyone knows this is definiitely temporary.‘ Just as the Republicans were making plans for a 25 year lock on power in 2004, and now are looking like the only place they could win a majority is in a population that has a lead-soaked well or the deadly combination of blinding stupidity (D-K) and rash-like paranoia, so goes the saw. (Not a D defender either, they are feeding from a different part of the same pond; anyone vaguely conscious these days is completely fed up with the parties.) More speculation surfaced this week that Facebook could be another MySpace, while the latter, it turns out, is trying to rebrand itself younger (tyke trolling).

Anyway, my point is: maybe we have reached that stage where things are popping so quickly, there is such a scramble to grasp that the dignified fight is the 300: hopeless, but better than captivity, and thus the future holds only a revolving door of magoos. It has steeled my conviction that what we need most on the complexity side are two things: a firm embrace of it, that includes walking away from the rigid stupidity of the scientific method in favor of a world view dominated by probability (more on this), and tools to help us absorb our world more efficiently. In the past week or two, after converting to Git, using GitX to view commit sets, and watching the xcode 4 preview has made me realize that despite a decade just ended that was dominated by tools, clearly we forget that if each time we use them, we come out the other side not knowing anything new (I would argue this is the norm), then they are but a turnstile and we but their ear-tagged chattel.

Categories: Blogs

New Refrigerant 99% Less Noxious

Sun, 07/25/2010 - 18:21

Wow, this is super cool. Where is the version for home units, though? They got a new one in the last decade called R410, but it‘s probably not this green. Maybe this can be used in home units too, but GM is just stepping up to add it to their cars first.

Air conditioning also sucks a LOT of electricity when it runs. Unless you live in a place that has a huge flat roof over a dug in bunker, you cannot offset air conditioning with solar. My own solar panels have generated only about $40 less electricity than I have used in the last 10 months, but when the A/C is running, the meter explodes (my unit is 10 SEER, some of the newer ones are as high as 20, but you can‘t justify the cost difference unless you run them all the time).

These types of innovations would maybe be better served by a prize rather than product-based economy: put out a $10M prize for a new refrigerant or an air conditioner that can do 30 SEER or a solar panel that can attain 30% efficiency. Then the technology adoption could be universal.

Categories: Blogs

Infoworld: Google's Waterloo Too, Apparently

Sun, 07/25/2010 - 06:24

In the same way that Mama Mia didn‘t affect Meryl Streep‘s status as the most respected actress in the world, the idiotic prognostications of press members just come and go like a tax-payer funded wall street bonus. If the weatherman kept saying rain, I‘m thinking (s)he would get removed at some point, but maybe not..

Yo, Guys, looks like DroidX has the death grip (mortgage) problem too.

See it here .

At least the people over at BusinessWeek zeroed in on the fact that this is a rampant condition, not the finally hoped for Apple achilles heel. (Notice the similarities to the Sherrod story: people looking and only seeing what they wanted to see, to reinforce their own stupid fears?)

Categories: Blogs

Xcode 4: The IDE Apocalypse

Sun, 07/25/2010 - 05:54

I downloaded the WWDC sessions and was watching one of them this morning. It was about using the existing version of Xcode. The meat of it was a recipe application for the phone being turned into an iPad app. Probably the most important thing that determines the success of presentations like these is the degree to which they communicate flow state. This presentation (WWDC Session 305) succeeds to a pretty astounding degree. Of course, part of the reason is that it‘s polished and the presenter is rehearsed, but you start to pretty quickly realize that you have popped through to a level of that is a direct reflection on the product. Showing, not just a piece or some preconstrained view of something, but a whole, in the commission of some externally defined value exchange, is not the usual stock and trade of conferences. As a matter of fact, during this session, I of course, started to think ‘what would the Java version of this look like?‘ My answer was, it would make Andy Warhol‘s 8 hour epic Sleep look like a 15s Animaniacs interstitial.

We are into a new decade. The last one was dominated by tools. Many of us believed that tools would suture the many disparate parts and pieces of the Java world. In retrospect, it seems kind of silly. Flow state does not just spontaneously appear through some kind of Tinkerbelle-induced incantation. If Lean is about anything it's about minding the VSM. It isn‘t so much that the Java world is mindless, it‘s more that in the name of ‘choice,‘ it‘s left to each person to construct their own VSM, with only fragmented help from each framework and no one to vouch for the combination.


Of course, I thought about doing the 4th grade class report format of comparing and contrasting Xcode to eclipse. There are still quite a few things that Xcode does not do that eclipse does, for instance, I have a lot of templates setup in eclipse, that allow me to define variables. Xcode 4 introduces snippets triggered by keywords/code completion, but only has placeholders. The other side of the scale quickly went kind of berserk. Of course, there is no interface builder in eclipse. When I first started using the NeXT/Apple Interface Builder, there were little annoyances about it, but very quickly, I became convinced that it was an immensely useful tool, very intelligently implemented. It‘s not that we don‘t have interface builders, it‘s that none of them survived. We wouldn‘t have ORM mapping either if it weren‘t for the fluke of Hibernate growing enough on a crag to get scooped up and watered (the trail of failures there was even deeper). Frankly, as much as I like Hibernate, I seriously don‘t think it‘s that much better than CoreData. But this is my point in this whole jag: only from the warped perspective of ‘hear, let me show you how I have a lead on a bunch of little features‘ can you see eclipse as ahead in this stuff. WTP is still a broken pile of scabs. You can run your app in Tomcat or JBoss, but it will crash and the restarts are painfully slow. The cycle time between source and iPad/iPhone simulators on my SSD-backed MacBook is literally zero and it never crashes.

The new interface builder removes a lot of the prior annoyances. Property and outlet declarations then synthesize statements were a trifecta of repetitive crap. They‘ve really narrowed that stuff down. At SDWest in 2008, Josh Bloch was talking about how painful it is that we have to write declarations like:

List myList = new ArrayList(); (Textile not showing the parameterized classname in both places.. imagine it… )

Eclipse made some progress on that, and now Xcode has too.

But then, what you can really see if you look at Xcode 4 is hordes of disparate tool components from the Java world being scuttled, like so many clattering pieces of broken garbage. Nevermind Git support, they also have blame, logs, diffs, etc., that are miles beyond the horrendous state of half-baked source control plugins. Much as I love Maven, 5 years after adopting it, the plugins are still torture devices. Don‘t need it in xcode. Especially not if a lot of frameworks, etc., adopt git: in the demo, they add github to the repositories pane and then pull code into their project in a few clicks. By the time I saw the new interface testing in Instruments, I was kind of reaching the state of thinking comparison requires things be comparable. People, we are getting to that stage. Seriously..

One last point. Another image appeared to me while I was hypnotized by the flow state. The dominant new framework of the last decade on the Java side was Dependency Injection. The main raison d‘etre of which is the basic idea that newing things all over the place and thus not knowing where and how components are wired together, is bad. How, then, does it make sense that the exteriorization of the wiring ends short of the interface frontier? Watch the Interface Builder demo and you see what explicit wiring looks like that goes from the top to the bottom of the app. There is no bean container, but there‘s no real need for one. Access managed to make a decent interface builder, but it was built atop a sandbox of goofy tinkertoys and figuring out where anything was being done was impossible. This is the gauntlet that Apple has run successfully, and clearly, they are onto a new phase where the tools are subordinate to the overall goal which is the clearest possible expression of the immensely complex elements that go into even the simplest creations.

Categories: Blogs