Links

pmuellr is Patrick Mueller, an IBMer doing dev advocate stuff for node.js on BlueMix.

other pmuellr thangs: muellerware.org, twitter.com/pmuellr

Wednesday, November 12, 2008

brainwashed

I remember reading Michael Lewis's "Liar's Poker" back in the day, and enjoying it, so it's not a big surprise that I also enjoyed reading his recent article on our financial crisis, "The End".

But my reaction to the article is a little different than Tim Bray's "Angry" blog post. Anger is an understandable reaction; we've essentially been fleeced. But when you get fleeced, you have to realize that often you walked right into the scam. One of the people to be angry at, is yourself.

How did this happen?

One word: brainwashing. We all wanted to believe there really was a lot of money to be made, that level of wealth building going on was somehow sustainable, and that we could all be a part of it.


DJIA from 1930 to today - link to live chart

But honestly, did you really believe your realtor when they told you the property prices in the neighborhood you bought into were appreciating 10% a year, with no end in sight? Does it really seem ok to spend $30,000 on an automobile? Can you really look at the historical record of the Dow Jones Industrial Average from the 1930's to today, and say: "I don't see anything abnormal".

We all wanted to believe, so ignored the signs, if we saw them at all. Were there some bad apples out there? Sure. But far more folks who weren't really bad apples, really just duped like we were. Deluded by fantasies of riches. Brainwashed.

Relating this to computer tech

I couldn't help but to extrapolate from my take on Lewis's article, to some of the goings on in the computer tech field today, because I think there's a fair amount of brainwashing going on in tech also. What do you think about the following ideas:

  • Using LaTeX files or Microsoft Word .doc files as serialization formats for structured data.

  • Using C or C++ to build your next web-based application.

To me, these sound crazy. Why would you use a word processing system as the basis for a data serialization format? Nuts, right? But we are. XML traces it's roots back to IBM's Generalized Markup Language, a text markup language not like LaTeX or nroff (good times, good times). XML is frankly not all that different from GML, I'd say easier on the eyes (brackets are easier to visually parse than colons), and more regularized syntax. But it's fundamentally a language to apply bits of text formatting to large amounts of raw text. A typical BookMaster document was mainly plain old text, with occasional tags to mark paragraph boundaries, etc.

Same sort of nutso thinking with Java. A potentially decent systems-level programming language, it could have been a successor to C and C++ had things worked out a bit differently. But as an application programming language? Sure, some people can do it. But there's a level of complexity there, over and above application programming languages we've used in the past - COBOL and BASIC, for instance - that really renders it unsuitable for a large potential segment of the programmer market.

How did these modern-day accidents occur? Hype. Being in the right place at the right time. They more or less worked for simple cases. We all wanted to believe. We brainwashed ourselves.

Luckily, evolution is taking it's toll on these two languages. XML isn't the only game in town now for structured data; JSON and YAML are often used where it makes sense; Roy Fielding notes that perhaps GIF images are an interesting way to represent sparse bit arrays (ok, that's a random mutation in evolutionary terms). We're seeing an upswing in alternative languages where Java used to be king: Ruby, Python, Groovy, etc (with many of these languages having implementations in Java - perfect!).

Reality is setting in; do what makes sense; think different; the hype curve doesn't always point to the right answer.

My new favorite example of tech brainwashing

So while I can't complain so much about XML and Java as I used to, it's kicking a dead horse at this point, I do have a new whipping boy in the tech world for where we've been brainwashed - "web applications". Those things that run in our web browser, giving us the power, beauty and flexibility of desktop apps. Web 2.0. RIAs. GMail and Google Maps.

I don't have to explain to anyone who's ever tried putting together a "Web 2.0 application" the utter pain in doing this. Ignoring server-side issues, you have to deal with three different languages: HTML, CSS, and JavaScript; typically interspersed betwixt themselves. That behave differently in the three to five popular browsers you might hope to support. And the iPhone. Server side programming throws more wrenches in the gears, as in our simpler web 1.0 world, we frequently mixed HTML, CSS, and JavaScript with whatever programming language(s) we used on the server. And we still do, at times, in this new world also, only there's lots more HTML, CSS and JavaScript, so it's even messier.

Or maybe you're using Flex or Silverlight or some other more constrained environment for your web app. But then you have different problems; your users might expect to be able to bookmark in the middle of the app - it's running on the web after all. Or cut and paste some of the content. Etc. And you're probably still deploying in a web browser anyway! There is no escape!

What really frustrates me about the situation we're in, is that we've painted ourselves into a corner. We started with a very useful, mainly read-only, networked hypertext viewer, and over the years bolted new geegaws on the sides. Blink tags. Tables. JavaScript. Frames. DHTML. File uploads. XmlHTTPRequest. SVG. HTML Canvas. (stop me, my head's about to explode!) All great stuff to add to a mainly read-only, networked hypertext viewer. Can you use it to build a word processor? Yes, you can. Well, a team of software developers at Google can. Not sure that I can.

But I used to be able to build GUI apps without a lot of difficulty. High function, richly formatting text editors even. In C, for gawd's sake, though life got a lot easier in Smalltalk.

It's time to stop thinking we can apply bandages to the status quo and make everything better. We want to believe. Just another gadget or framework is going to make everything better! We've brainwashed ourselves.

Wake up! We fundamentally have the wrong tools to do the job. We're using a spoon where we should be using a backhoe. Look down! You're using a spoon for *bleep*'s sake! Don't you realize it? Slap yourself around a little and clear the fog from your eyes. Expect better.

To be a little more concrete, I actually do think that the fundamentals of our web tech economy are sound. I'm not unhappy with HTTP, HTML, CSS, and JavaScript when viewed as separate technologies. I don't think we've fit them together in the best way, to make it easy to build applications with. And they're wrapped in a shell optimized around mainly read-only, history-enabled, page-by-page navigation, which doesn't seem like the best base on which to build an application. It's time for some new thinking here. Can we take some of the basic building blocks we already have and build a better application runtime platform than what we've got in front of us? I have to believe the answer is: Yes we can.

21 comments:

Bill Higgins said...

But I like my spoon. :-)

Patrick Mueller said...

That one of either:

- Stockholm Syndrome

- the fact that you've never seen a back hoe before

You youngsters are in for a treat when we pull our collective heads out of our asses and provide a proper application runtime platform for the web.

Tim said...

Your chart of the Dow is ingenuous; if you plot it on a logarithmic scale (which gives a better indication of growth over a long period of time) it is much smoother.

Patrick Mueller said...

I should have noted a little more explicitly: the picture is from a Yahoo! Finance Chart. Just scraped it.

Fascinating that it becomes linear with the logarithmic scale. Thanks!

Though I'm not sure why it gives a better indication of growth over a long period of time. Should have paid attention in Econ.

What should the decay curves look like?

Tim said...

A logarithmic scale shows change in percentage terms, rather than absolute terms. A 5% increase covers the same length on the scale no matter where along the scale it appears. Thus an exponential growth (such as the stock market, which we're told grows on average about 10% per year) appears as a straight line on a logarithmic graph.

void said...

Hi, I loved your post. I think you summed up what I have been thinking about web browsers all this time: They were not designed for most of the stuff that is currently done with them. They were designed to see documents. PERIOD.

Maybe it's time for someone to come up with a better set of tools/protocols/etc to allow building better interconnected applications. Though I have a hard time it will come from one person only, though :)

Anyways, thanks a lot for the post. It was very interesting reading it.

Pedro

cdent said...

Interesting stuff.

I think it is important to make a distinction between the browser, which is basically a thing for reading documents, and the protocols it uses (i.e. HTTP). HTTP presents a huge number of advantages for networked apps on big complex networks.

Unfortunately when people have tried to make development environments for browsers they tend to lose track of good HTTP behaviors and it is sad.

ReiToei said...

Hi Patrick,
Regarding Flex, you can easily bookmark 'pages' in a Flex app using the history object. This forms an integral part of the framework (and a project I have been working on recently).
Regards,
Paul McClean

ReiToei said...

Apologies Patrick, I meant 'browser manager', as opposed to 'history object'.

Paul

Patrick Mueller said...

cdent; yup, we don't want to throw out all the great stuff we've invented and learned over the years with the browsers. I honestly think we can reuse everything, we just need a runtime organization story. Maybe an different shell.

Patrick Mueller said...

reitoei; thanks for the clarification. I think the directions flex / silverlight are going with web &| desktop style apps is truly some innovative stuff; exactly where i'd like to see plain 'ol HTML, CSS, and JS head. Great competition. Keep it up. BTW, fix the GD mousewheel scroll on the mac, plz. :-)

Damian Cugley said...

Well, I have certainly had customers sending me all sorts of data wrapped up as Microsoft Word documents (or Excel spreadsheets, which is slightly less foolish).

I have also developed web sites partially in C++ (as a way of creating COM objects that can be plugged in to ASP), and I would definitely not recommend it.

JavaScript is not that bad a language to write in, and things like jQuery and HTML 5 would make the DOM a lot less unreasonable a model of an application UI. If you planned to write an AJAXy app from the start you could come up with a way to write as little server-side code as possible and write it in JavaScript as well (e.g., using CouchDB) and save on learning a separate language for the server.

There are projects like SproutCore that are supposed to make it possible to write client and server sides of your app all in one place.
No idea how well they manage this feat.

LordVir said...

We all wanted to believe there really was a lot of money to be made, that level of wealth building going on was somehow sustainable, and that we could all be a part of it.


Nope, I pretty much knew it was BS, or at least came to that conclusion in 2006 when shopping for a house. Now I'm sitting on a pretty down payment and I've never been in debt.

I'd bet that I get screwed over in the end by the government though, since I did the right thing.

shevegen said...

"In C, for gawd's sake, though life got a lot easier in Smalltalk."

I see where you are coming from.

For my part, this is ruby.

It would be nice if future "scripting" languages would have the REAL power to completely replace the need for any C language. That would be a huge win for ALL the "scripting" languages community.

It would be like breaking an old barrier "static vs scripting" attitude (which is harmful by the way as it hinders new ideas)

Patrick Mueller said...

shevegen, you can call out to C libraries in Ruby with ffi. Python 2.5 (maybe earlier?) has ctypes. Smalltalk's have been able to do this for a while as well.

lococrazy said...

Do you have any options?
I would like:
1. Sandboxed enviroment
2. Zero installation-time
3. Run on 99.9% of all home-computers _today_
4. Accessible from everywhere
5. No dependency-hell

Why #1 hasn't hit the desktop-applications yet is to me a huge wtf. Windows now has UAC but i'm still afraid to open random exe-files.

void said...

@lococrazy: Actually it has. It's called UNIX ;)

mtnygard said...

Patrick,

I agree with your overall argument, but I have a separate comment about the chart of the DJIA.

To me, that perfectly embodies two combined forces: compound growth and overall constraint.

Most of the chart looks like an exponential, which suggests the effect of compound growth. In a functioning capital-based system you'd expect exactly that. Capital invested produces more capital. Any time an output is also a required input, you get exponential growth.

The interesting thing is that almost everyone looks at exponential growth and expects the hockey stick to keep going up indefinitely. (Until it hits Singularity, I suppose.)

No real system can produce infinite growth. Instead, they always hit a constraint. That could be a physical limitation on the available inputs. It could be a limit on the throughput of the system itself. In a sense, it almost doesn't matter what the constraint itself happens to be. Rather, you should assume that a constraint exists.

In safe systems, when the system approaches the constraint, marginal throughput will be increasingly diminished by the effect of the constraint, and you'll see a smooth tapering-off of growth. That produces a sigmoidal graph.

In systems with a chaotic tendency, the system doesn't slow down at all when approaching the constraint. In fact, it may be increasing at it's greatest rate just before the constraint clamps down hardest. In such cases, you'll either see a catastrophic collapse or a chaotic fluctuation.

I don't know what the true constraint was in the financial system. Plenty of other people believe they know, and I'm happy to let them believe what they like. Just from looking at the chart, though, you could make a strong case that we really hit the constraint in 1999 and the rest has been chaos since then.

Patrick Mueller said...

mtnygard, thanks for the comment. Based on Tim's comments earlier, realized he was implying compound growth. I know that's how my savings account should be growing :-) , what's not clear to me is whether that is a natural growth curve for the stock market. As I sort of indicated, I think the stock market is largely all voodoo anyway, might as well be concentric circles to me. I suppose treating the DJIA itself, as an average of a number of institutions, as something like a bank account, in terms of growth, makes sense. Something about it doesn't ring true to me though.

The point about constraints is key. No matter what kind of positive growth, unless you believe in unlimited, infinite growth, there's got to be a downturn at some point right? I'm just kind of amazed that realtors I've dealt with over the last 20 years throw out the "it's never going down!" line; I have to imagine people believe them.

Jonas Bandi said...

Could you be my Morpheus handing me a red pill, please?

http://blog.jonasbandi.net/2008/10/java-ee-blue-pill-of-enterprise.html

Brad Neuberg said...

Hi Patrick, good post. We are having a similar discussion over on Ajaxian titled "Fixing the Web, Part I":

http://ajaxian.com/archives/fixing-the-web-part-i

Best,
Brad Neuberg