Archive for the ‘General’ Category.

“Windfall tax” - is it good, or is it wack?

Like most Americans, I have been outraged at the merciless rise of gasoline prices. Oil companies get richer while working Americans get poorer, right? Naturally, when congress began introducing bills to grab huge chunks of oil companies’ record profits, it seemed like a good idea to me. Why should they get to gouge me?

Then I started to think about the oil companies’ shareholders. These are not just a bunch of fat cats who are pocketing your gas money. Many of them are middle-class Americans who invested smartly and are counting on the success of their mutual funds for their retirement efforts. If the government decides they can take “excess profits” from the oil companies, they are artificially turning these people’s successful investments into mediocre or poor ones, as oil futures plummet in response.

Nevertheless, the price of gasoline is hurting anyone who has to commute - which is most working Americans. What can the government do? The legalization of new drilling would ease speculation while maintaining the growth of oil stocks. But this would come at the cost of the environment - so I don’t see this as the solution. Instead, there are some existing legal measures that could be used to help solve this crisis, without the federal government “stealing” people’s investment value:

First: if the oil companies are, in fact, colluding to artificially inflate the price at the pump - as some have alleged - then they are acting illegally and should be slapped with an antitrust suit. Sure, this would hurt their stock prices - but in this case, it’s all part of the free market, and nothing unfair is taking place.

Next: full-time employees in the U.S. are forbidden from including gasoline used to commute as an itemized expense. For some braindead reason, only the self-employed (i.e. freelancers) with a “home office” are able to deduct the cost of their commute. The IRS should recognize that the purpose of deductions is that only available income is taxed. Any income that goes directly and non-optionally to maintaining employment is not available income, and it should be allowed to be deducted. This might hurt tax revenues, but since the U.S. Government is content to waste trillions in Iraq, I must conclude that they have too much money anyhow. I think this would be a pretty good measure - it doesn’t encourage commuting and polluting, but gives a break to those who must.

Of course, in a free market, the price of gasoline must have a de-facto cap. At some point, alternatives will be more cost-effective, and there will be vast amounts of money to be made in manufacturing and supplying them. Necessity is the mother of invention, and there are smart people out there figuring out how to turn unwanted turkey parts into fuel. Once there is a widely available alternative to keep the oil companies in check, gas prices won’t be a problem anymore. So hang in there. Personally, I’m cutting my commute by moving to sunny San Clemente, near my office. What a shame; I’ll have to live by the beach and bike to work. Because of gas prices.

Disclaimer: I don’t have any oil futures. In fact, I don’t have any investments at all, because I’m an idiot. I’m certainly not qualified to be writing about this crap, so take it with a grain of salt.

Giving this “blog” thing another go

A while back, I decided that running a podunk little blog that nobody reads just wasn’t worth it. I was getting flooded with comment and trackback spam and I just didn’t feel like dealing with it. So I disabled comments entirely, threw my hands up, and started worrying about more important things.

Well, technology has advanced, so I’m going to give it another shot. I’m putting my faith in Askimet to protect me from evil spammers. Hopefully, it will work (or all spammers will be viciously killed. Either way is cool with me). I switched my template to a standard wordpress one, because I had destroyed all ability to comment in my previous template (based on my “minimal” CSS template) and I just really don’t have a lot of time to spend on my wordpress template. If you like the template, there’s a link to the original in the footer.

I do some things that might be interesting or useful to some people. Maybe one of them is you! Feel free to comment, if you’re a real person.

Warner goes with Blu-Ray. That was dumb.

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.

Programmers: Users matter more than you (a rant)

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.

Updates to Syntax Editor

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

  • Added simple line numbering
  • Added a workable (but not bulletproof) CSS sub-grammar to the HTML grammar.

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.