Warner goes with Blu-Ray. That was dumb.

January 4, 2008 General

So, you’ve probably heard that Warner has picked a side in the hi-def format wars, and they’ve gone with Blu-Ray. Here’s why that’s bad.

Blu-Ray is technologically more advanced. It’s about 200% more efficient to store video in h.264 than in MPEG-2 (which is used by HD-DVD). So what? You can still store a 2-hour MPEG-2 movie on a single HD-DVD (or Blu-Ray) disc. h.264 is also orders of magnitude less efficient to decode and display, and I think this is a lot more important than storage efficiency. So you can store 4 hours of video on a Blu-Ray disc. These discs cost pennies to manufacture, and if you’re watching 4 hours of video you probably welcome the intermission when the time comes to swap discs.

The hardware to decode MPEG-2 is simple. Brainlessly simple. It’s been used in standard DVD players for over a decade. It’s been refined to the point where the ASICs used to decode MPEG-2 are practically hit and run blackjackjeux flash casinoonline black jackjack black moviesslots onlinecasino jeux toulousewww casino gratuites combonus de casino en ligneregles de la rouletteenquete casino on netwww jeux casino comjeux de casino gratuisjeux de cartes casinobonus sans depot pour casinoroulette anglaise,gagner à la roulette anglaise en ligne,la roulette anglaisevideo poker en lignewww casino dowww geant casino frle casino machine à sous gratuitescertificat bonus casinosuper slots casinomeilleurs jeux de casinojeu roulette gratuitesjeux keno en lignecasino bonus partycomment gagner a la roulettejeu au casinojeu casino machinecasino jeux de tabletableau black jackwww produits casino frjeu poker casinocasino jeux en francebaccarat room en lignejeux online poker tourpoker en ligne sans argenttelecharger poker superstarsjeu carte pokerstreap poker gratuitesjeu de cartes pokertelecharger party pokerdes règles du poker texas holdempoker tour en lignejouer au poker sur macpoker gratuites sur macpoker en ligne 3djeu de poker pour pclogiciel de poker gratuitesjouer au poker en francaisjeu de poker gratuites cheaper than dirt. In fact, every new TV has a hi-def MPEG-2 decoder built right in, because that’s the format used for HDTV (at least in the U.S.). Anyone who has ever tried to play h.264 video on an only moderately new PC, on the other hand, can tell you that it takes some serious horsepower to do it.

Therefore, I argue that both Blu-Ray AND HD-DVD are retarded, because of their requirement for players to support these “efficient” codecs. This will make players more expensive and less power efficient, which means hotter and noisier as well. Blu-Ray even includes freakin’ Java in its standards, so studios can execute freakin’ programs on my player! Thanks, but no thanks.

Ditch both of these pieces of crap, and make a blue laser disc standard that only uses MPEG-2. Like a DVD, only with high-def video. That way, you could even have uber-cheap players that just read a the raw MPEG-2 stream off the disc and send it to the TV to decode with its built-in decoder. Or TVs with a built-in disc slot, which would cost only marginally more than a regular TV and take only marginally more space (if any). Didn’t anyone think of that? Sheesh. Yeah, let’s have a bunch of redundant hardware and complicated software instead, just so we can cram more video onto a single disc rather than spend another 33 cents making a second one.

Of course, now that at least two major movie studios have gone Blu-Ray exclusively (Sony and Warner), the rest will soon follow and HD-DVD will die (hope you didn’t buy an HD-DVD player!). We’ll all be stuck buying expensive, wasteful players because nobody in that industry seems to have any common sense. Bummer.

Comments disabled

Programmers: Users matter more than you (a rant)

December 18, 2007 General

Whenever I’m using a web application, and it’s disgustingly slow and requests often time out, I think to myself, “I’ll bet this is written in Ruby on Rails.” Then, I check the response headers, and sure enough - nine times out of ten I see the telltale “Server: Mongrel 1.x.x” header, indicating RoR.

Don’t get me wrong; I think Ruby as a language is great. Unfortunately, its implementation makes it 100% useless as a production language. Academically, it’s awesome. It makes for elegant, expressive code. But developers, please! Before you write your application in Ruby, ask yourself one question: “Do my users give a poop-flinging monkey about how elegant my code is”? The answer is that no, they don’t! Your application will be developed much less than it will be used. Make things better on your users and don’t use a slow piece of crap to run your application. I mean, think about it for a minute. You’re using an interpreted language to run your application layer? And you’re running it from a webserver written in an interpreted language? Don’t you see anything wrong with that?

I know that Ruby’s creator is hard at work on a bytecode interpreter, and if he can make it fast, I will be 100% behind ruby. But for now, stick with something fast. You can throw a bunch of hardware at the problem, but it’s not going to change the fact that you are sacrificing your users’ experience for your own laziness and programming enjoyment. Is it more important for you to have nifty fun writing the application, or for your users to have nifty fun using it? If your answer is the former, you are not a software engineer.

Ruby is not the only culprit here. For example, take ColdFusion. What a piece of garbage! MySpace is one of the high-profile sites that use CF, and half the time it doesn’t even work. When requests do successfully complete, they take far too long and make me want to pull my hair out (thankfully, I rarely use MySpace). If you think that these people don’t have racks and racks worth of servers, you’re kidding yourself - and yet, their user experience is awful because they have bad code running on a bad platform. Now, look at Google. Have you ever done a google search and waited for more than a second or two for the response to come back? No, you haven’t, because Google doesn’t fuck around with crap code and crappy, interpreted languages like ruby and coldfusion. They stick with C, Java, and Python because they don’t want to waste CPU cycles on executing code in the least efficient way possible.

So am I advocating that everyone writes their web applications in C++ instead of scripting languages? It doesn’t really seem practical to recompile your whole application every time you change a template, does it? Well, why the hell not? How long would this really take you? Oh, but it doesn’t seem practical to manage your own memory instead of letting a garbage collector do it for you. Again, why the hell not? Have we as engineers sunk so far that we can’t even trust ourselves with memory management in our own application?

I’m going to digress here into something that has been haunting me for quite some time: that I fear for the future of computing. The generation before us; that generation that pioneered personal computing - these were smart fucking people. They are the people that wrote code in assembly, the people that designed the digital logic inside the CPU!. If you weren’t smart and passionate about computers; if you didn’t “get it,” you did something else with your life.

Nowadays, computers are where the money is. Universities are flooded with idiots who couldn’t program their way out of a paper bag, and are majoring in computer science anyway - these people muddle their way through, taking tests on computer science theory that they’ve managed to memorize long enough to write it down on the test sheet and pass. They do this for four years, then they walk across the stage, shake the dean’s hand and get their shiny, wholly undeserved diploma, which they take to the nearest MegaCorp and get a job sitting in a cubicle twiddling their thumbs and writing the occasional piece of awful code. There are still smart people out there, but they are far outweighed by the number of people that really shouldn’t be involved with computing in the first place. As a result of these people, software is getting worse and worse.

These are the people responsible for things like Windows Vista. I mean, Microsoft has more money than pretty much any other company - you expect me to believe that they don’t have the resources to make a really good operating system? Sure they do - but their cubicles are clogged with the excrement of universities that are basically businesses, selling diplomas instead of ensuring smart graduates. Don’t get me wrong; I’m sure that Microsoft has many of the smartest programmers around. But the rest of them are making Microsoft’s software worse. Whoever’s in charge over there, here’s a tip: ditch the cumbersome, slow-moving teams of mediocre programmers, and trim it down to surgical teams of the really smart ones. Throw away Vista and start over from scratch. You can make a really good operating system, and your users are counting on you to do that. Schlepping crap like Vista and getting away with it based on the fact that nobody has any real choice is a perversion of the free market.

Even more than software, I fear for the future of hardware. Do you know what a bloody friggin’ genius it takes to design the chips inside your computer? Digital logic design is not kid’s table shit! It takes really smart people to make hardware better rather than worse. Most of my class failed digital logic design at least once; I’m one of the few who got through it with an A (despite my intense dislike of busywork) because the DLD professor was one of the few at my university who understood how important it is to separate the wheat from the chaff. Even so, I could never design a modern processor, or even be particularly useful as part of a team that does so. Because I have no illusions about the fact that I am just not smart enough for that task. And you can see the evidence of this problem - processors really are getting worse. They cover it up by shrinking transistors, jacking clock speeds and cramming in more and more cores - but the fact is, if the industry was full of really smart folks (like those from the original AIM alliance, who created the PowerPC architecture) then processors would be a lot better today.

Anyway, thanks for reading my rant. I only hope that if you’re a software or hardware engineer, you’re one of the smart ones. And if you want to tell me what a moron I am, how great ruby is, or what have you - don’t bother; I’m not really interested in hearing from you.

Comments disabled

Updates to Syntax Editor

August 2, 2007 General

I made a few changes to the syntax highlighting editor I introduced in yesterday’s post:

Check out the updated demo. IE6 has a fair number of bugs - for one, undo will probably never work in IE6 because it oh-so-intelligently clobbers the undo buffer whenever there is a change to the DOM tree. I’m not sure if IE7 has this bug or not. It also has some more easy-to-fix bugs, such as all the line numbers being the same (wtf?) and broken CRLFs inside selections.

Safari tab width is an issue - this will only really get solved when the browser itself is fixed. As an aside, Opera used to have the same problem - I noticed it when I was working on the proof-of-concept about a year ago. At the time, I complained about it on their newsgroup and it’s since been fixed. I’m not saying it was because of me that they fixed this, but huzzah in any case! Maybe Apple will follow suit if I complain to them!

The biggest issue is still optimization. This thing is becoming a useful tool, but only if you have a really fast machine and really short documents to edit. The key is going to be removing previously highlighted nodes only as they are discovered to be “dirty”, and figuring out when to stop parsing. I still don’t really know how I’m going to solve that, but once I do I expect I’ll release this thing under some kind of public license.

Note: This component pairs nicely with the Tabinta Mozilla Extension, which lets you place tabs in textarea fields without tabbing out of the field.

Comments disabled

Syntax Highlighting Textarea, Reloaded

August 1, 2007 General

A couple of years ago I tried my hand at making a DHTML-based syntax highlighting editor, for use in web applications. The result has been posted in my portfolio for quite some time, but it never worked particularly well, and was quite feature-poor. It was also very heavy - it relied on javascript for even basic editing capability, and therefore did not degrade well.

I had an idea about a year ago to start the whole thing over again with a different way of handling input (which I thought was pretty clever): Instead of building the editor from the ground up using javascript, use a textarea for the editor. Better yet, take an existing textarea, apply a javascript constructor to it, and it gets converted into a syntax highlighting textarea. I planned to accomplish this by making the textarea mostly transparent (but still slightly there, for interaction purposes) and positioning the highlighted text behind it. The highlighted text - colored with CSS - would be updated whenever the textarea changed. Simple, right?

I whipped up a quick proof of concept and quickly forgot about the whole idea as my workload became too great. A couple of days ago I decided to start fresh on this thing and do it right. Here are the results so far. It seems to work in Firefox, Opera, and IE6 to a limited extent; Safari borks it up because their tab width is different in a textarea than it is in a block of preformatted text (Don’t ask me why; this probably comes from Konq, though, and suggests that Konq will also fail).

The beauty of this is that the code will get submitted to a form containing the textarea without any trickery or additional work. Also, if javascript is disabled, the user will just be presented with a plain old textarea - and at least the application will still be usable.

There is a lot of optimization to be done. You might notice that it quickly gets unusably slow as the document gets longer and longer. This is because it typically has to re-color most of the document on every keypress. I’ve added an optimization wherein the highlighting will start from the last initial state before the cursor position (if it can be found), so this helps as long as you restrict your editing to the end of the document :-D. There has got to be a way to do a similar optimization which somehow detects when the parser returns to an initial state that was already an initial state, but I haven’t thought of it yet. It will probably involve “spying” on the input to the textarea to get an idea of what’s going on, and making parsing decisions based on that.

Anyway, stay tuned for that stuff, and e-mail me if you have a suggestion! Remember, comments are disabled because of the dirty spammers (who should all be killed in gruesome ways) - my e-mail address is jeremy at [the domain you’re looking at].

Comments disabled

Upgrade

June 17, 2007 General

I finally upgraded this site to the latest version of Wordpress. Things aren’t really working that well anymore, but hopefully I’ll have time to deal with it at some point in the near future.

I really wanted to ditch wordpress and roll my own publishing platform, but I just don’t have the time. Bummer.

Comments disabled

Next Page »