The Swampy BLOG

Media Lab Employee Web Log

Disclaimer: All opinions are of the authors themselves and do not represent the opinions of Media Lab, Inc.
[ add ]

  April 10, 2002 Chris writes: I've been struggling in C++ hell again on the latest product. ( yes a new product, very cool, don't ask - you'll all know soon enough ). And, working in this pathetic excuse for a language gives me pause and makes me want to say: Programming in Lisp is like dancing and programming in C++ is like babysitting.

  And I should know.

  References
www.tango.org/dance


Chris writes: Well, it's been awhile since anyone has entered anything into the BLOG. But today I am suitably inspired (pissed off) to take the time and make an entry.

  Today's Topic: Web Applications
Today's Viewpoint: They SUCK! They are setting the computer business back 20 years.

  How I Came To This Epiphany: Our online store is a web application called Miva Merchant. I recently had to remove some old shipping categories. So, I had to navigate to a series of pages, find the shipping options that needed deleting, click the "Remove" checkbox that is next to each one, and then hit Update. But, instead of hitting Update I clicked on Delete , which was the button next to it, and deleted not just the shipping options, but the whole damn product from our store. What a terrible UI! Click remove, remove, remove, update? Who thought of that?

  But it gets worse, because, despite it being 2002 with and almost 20 years of GUI application experience behind us, the stupid online store has no UNDO .

  I used to create multimedia, so long ago, and one of the things about it was that despite the modern GUI's rich vocabulary of windows, buttons, menus, text fields, pop-up menus, scrolling lists, collapsing trees, drag-and-drop, rollovers, undo/redo, history, open/save, copy/paste, help, scrollbars, and resizable panes - most multimedia was reductio ad stupidem. Most multimedia used the button as their only GUI element.

  Sadly, the web has much of the same problem. Ignoring your browser, most web pages use only one GUI element: the link. And web applications are barely any better. Why could I not select individual shipping elements and delete them by hitting the Delete key on my keyboard? And having deleted the wrong item, why couldn't I undo? And how could I save a version, just in case? - Technically, I know why: it's mostly because HTML sucks. HTML was never meant to be an interactive environment. But, there is another reason as well: low standards. If Miva Merchant were a desktop application it would be considered a piece of crap. But, as a web application we don't expect as much. As such, Miva Merchant is rather highly regarded. You want the truth? It's a piece of crap.

  Sadly, there are very few good web applications out there. I've been somewhat impressed with Yahoo! Mail. It doesn't feel like a web app - and that's a good thing. Other than that, though, I can't think of any.

  Personally, I prefer Java applets, if we are talking about online applications. Let's face it: who wants a full screen download and redraw every time they hit use a UI control? I know I don't.

  References
The Miva Corporation - We Don't Do Undo
java.sun.com


December 20, 2001 Chris writes: As you know, a lot of developers have been pushing people away from shared libraries, because of the whole "house of cards" problem. The recommended "safe" solution is to include all needed libraries in your executable. Thus, any given Windows machine will probably have 40 copies of each version of the VBRUN.DLL, MSVCRT.DLL, a dozen different Java JREs, etc.. With my 45 GB drive, and applications coming on CD, that might be fine. But, times they are a changing, and distributed inter-operating applications are the way of the future. At least that's what I'm told.

  

  The "house of cards"problem occurs in the first place because there is no good way of tracking what code depends upon what. Thus, installers (or worse uninstallers) of product A break product B. And, of course, the user has NO reliable information whatsoever on whether any file is needed or by whom/what/when. This problem is rampant on all of the Windows operating systems, and somewhat problematic on the Mac.

  

  It's really just a case of the common failures of C/C++ being reflected at a macro level: disposal and release of resources and lack of a decent error mechanism.

  

  What we need is a good OS that has a strong "garbage collection" system so that unneeded components are automatically gotten rid of, and needed ones are preserved. Because, ultimately, shared code is great, especially in the Internet cum distributed application environment we are heading into.

  

  Does .NET address these issues? I don't know. But I can say that if it does not, then it will fail. And if it doesn't fail outright, then it will stoop over and shrink, like an abused homunculus, functioning barely and resembling not at all the grand Adonis vision promised.


Dec 8, 2001 Tom writes: You know, I look at that timid disclaimer above and I wonder, "what exactly does it mean for a company to have an opinion?" Just because a company is treated as a separate fictional legal entity from the people who own it or work for it doesn't mean it takes on all human attributes. Can a company cry? If you cut a company does it bleed? (Hemorrhaging money doesn't count.) Can a company like a dress, but think it might make the company look a little fat and so rather than buying the dress go and eat a half gallon of Ben and Jerry's cookie dough ice cream?

  

  If companies can have opinions, what might they be? Something along the lines of "CHEEZ-IT brand cheese snacks are cheesily delicious!" perhaps? I know I feel that way, and I'm president of Media Lab, but somehow my affection for those magical little orange squares does not translate to Media Lab holding that opinion. So do we need to hold a board meeting and have this opinion read into the minutes as an official opinion of Media Lab? This sort of bureaucracy is creepily reminiscent of Communist or totalitarian states who take it upon themselves to decide the opinions of their citizens and then attempt to enforce them.

  

  In fact, while corporations may not have opinions themselves, they certainly try to generate opinions in consumers and politicians. This is known as marketing, which is Media Lab's weakest area of business acumen. Does this mean our corporate opinions are wishy-washy? After all. you can't convince anyone of something that you don't firmly belive in yourself unless you are a lawyer (which I am not, and in which case it is your job) so I am now going to list some strong statements that I hope to make official Media Lab Corporate opinions via whatever prestidigitations are required to do so.

  

  Media Lab official opinions to be:

  

  1. CHEEZ-IT brand cheese snacks are delicious, in spite of seeming to contain no actual cheese.

  2. PhotoWebber is BY FAR the easiest and smartest way to make interactive graphical web pages.(natch)

  3. The Dartmouth College football team is just absolutely awful, and has been for some time now.

  4. The manner of communication characterized by excessive use of phrases such as "go ahead and", "at this time", and the word "do", as in "we do ask that you do go ahead and stow your luggage at this time" will henceforth be said to constitute two new verb tenses, present and future officious, and is really bad and annoying to deal with from flight attendants and tech support and customer service people who read from scripts

  5. The Onion is hilarious and everyone should subscribe.

  6. The Onion should take submissions and not be so stuck up and should get over itself.

  7. Thank heavens for little girls, for they grow up in the most delightful way!

  8. While television is, in general, exactly as bad as Chris says it is below, it's still better than what Hollywood is mostly putting out these days. Examples of current great TV: The Daily Show, The Simpsons, Futurama, Malcolm in the Middle, The Tick, Buffy the Vampire Slayer (no lie), Mr. Show reruns and also Tenacious D. All of these shows are at the cutting edge of post-modernism and are well written and realized.

  

  When these opinions are made official we'll put up a notice.


12/7/2001 Chris writes: Well, I guess its time to start using this BLOG again. Not that anyone reads it, but what the hell. It was a WebMeddler test bed page for awhile, but we cleaned it up and are ready to put it to its intended use.

  Todays Subject: The Programming Language Lisp.

  Since, realistically, my audience here is probably just the other Media Lab employees - or the subset of those that can read - I feel no hindrance to talking at length about things the general public probably won't care about.

  Lisp rocks. In the past, upon seeing Lisp code, I have always gotten a headache - why would anyone make programming language with all those damn parentheses? Real Lisp-o-philes love their parentheses. I, myself, still do not care for them, but I understand what they are about, and its the least interesting aspect of the language to discuss.

  So why does Lisp rock, you ask? First, the list, as it is used in Lisp, is an incredibly flexible data structure. It is sequence, array, vector, tree, stack, set and hashtable all rolled elegantly into one little parentheses-bound bundle. Java has different classes to represent each of the above representations, and moving between them can be trying. C++ needs something like STL for some halfway robust collections - STL + templates = excruciating pain. But, in Lisp, the perception of a list (or list of lists, etc.) as a set vs a tree is strictly in the eye of the beholder.

  Second, for work upon these lists, Lisp brings the most robust set of operators I have ever seen. Iteration, traversing, mapping, binding, set operatioins, sorting, searching, culling - all are readily available in many flavors and very powerful.

  Third, even the functions and classes are lists, and can be manipulated as such. You can programatically define or construct functions and classes. Functions can be passed around like data. Technically, C & Java can do this, but only barely, and not elegantly. I'm developing a little something that uses more rule based programming. I can't live without dynamically constructed functions. And so much less code!

  Fourth, Lisp has macros. These are not like C's #define insertions. They are far more powerful. And, my favorite feature, they can "wrap" code. Take a look at Lisps built in macro with-open-file. It opens the specified file, handles all IO exceptions, and closes the file when done (and it has unwind protection!) All you do is supply the code you want to run on the contents of the file.

  Fifth, Lisp has an object system called CLOS. Three words: Oh My God It Rocks - metaclasses, generic functions, auxillary methods - ever heard of them? I hadn't until I started studying Lisp and now I feel like a caveman. Auxillary methods are methods that "wrap" other methods. When creating an auxillary method you specify that you want it to execute before, after, or around the existing method of the same name. You can even wrap the read or write accessors for class variables!

   C++ classes have functions and data, access control like public, private, protected and static and virtually addressed functions. Java has a slightly different access control and all functions are virtual. Ever think about the difference between the two and what defines that difference? In C++ and Java the language defines that difference. In Lisp, metaclasses define that sort of behavior - and metaclasses can themselves be defined by you. This opens up whole new doors for self-expressing classes, AOP, DBC, and more.

  There is a lot more I like about Lisp that I won't go into. It interfaces with C easily, you can change the code as your application is executing, you don't have to worry about number overflow, there are quite a few libraries for building http servers, opening sockets, etc.

  So what don't I like about Lisp? Well, I haven't done much investigating into UI libraries, but it looks like there may not be a great selection of robust, flexible, cross-platform UIs. Java's AWT and Swing are both pretty hot. Also, I've looked at Xanalys' LispWorks and Franz' Allegro CL and neither have great debuggers. (Though, in Lisp, if you are at a break you get a prompt where you can do anything you want - including defining and running new functions - so you aren't poor for information.)

  

  Ultimately, Lisp rocks.

  www.alu.org
www.franz.com
www.xanalys.com




I'm so vain

8/16/2001 Chris writes: I don't really have a television, but I do have a little set that my girlfriend and I occasionally hook up to an old video camera to watch rented movies. On Sunday, we rented a movie, and finished watching it at 11:30. Both of us were tired from being in the mountains earlier that weekend, but it was still too early to go to bed so we elected to watch a little TeeVee. The reception is bad, but we can pull in most UHF channels, Fox, Paramount, and maybe one of the big three. The Home Shopping Network (which I had thought was only available on cable) comes in the best.

Over the last five years I've been television-less, but have seen, through friends, Seinfeld, Friends, the Simpsons, and the Daily Show. All of which are great.

So, back to Sunday. We began to flip through the channels and I was stunned. Stunned speechless. But not by violence or sex (I didn't really see either) but by the banality of it all. Show after show was terrible. Stupid stupid scripts delivered woodenly by stupid stupid actors. Plots that were completely senseless. And the dialogue - it was the worst part - in every show the actors say what they think (in short single syllabled sentences), say what they are doing, say what the other characters are doing. Scripts were just a long series of flat stilted observations.

It was completely unwatchable. We tried dramas, sci-fi, comedies. Lame. It was all pathetic. Who is this for? Kids in second grade? At 11:30PM?

As we switched channels we began to come across the other shows - the Jerry Springer rip-offs (what's the name for this format? talk shows?). I have never been able to stomach these shows. An old girlfriend of mine used to like to watch Jenny Jones, and I could never stay in the same room. It's like these shows are going out of their way to say "Hey Chris! You know everything you want to believe about people, that they are fundamentally nice and don't really mean anyone harm. That everyone has their own story and it is worth hearing? Well you're wrong! Read 'em and weep, baby. You are just wrong and we've got the goods to prove it". The people on the talk shows were babylike self-centered selfish versions of the stupid stilted people from the fictional shows.

Finally we settled on a few televangelists and the aforementioned Home Shopping Network. More flat affectless acting and numbifying observations. But, as it was just people trying to sell stuff, it didn't make me as upset as the other shows. But what's the point? I wasn't interested in buying anything that was being sold, so we turned the television off and put it away again until we rent another movie.

One last note. I liked the commercials. High production quality, many were exciting and interesting to watch. Clearly most had a lot of money and thought put into them. If there were an all-commercials-all-the-time channel I might watch that. Maybe they have that on cable.....