Archive for October, 2004

Well its election time. You know where I stand. Vote Kerry/Edwards for a stronger America. Though I suspect no one who reads this hasn’t already made up their minds. If Bush wins, I will blame my parents. It’s still extremely tight, but I’m hoping voter turnout in the swing states will make the difference.

I am voting a pretty much straight Democratic ticket I think. Some of the minor propositions I might not fall into line with the party, but otherwise.

Ars technica had this article which was titled “The internet has made us all partisan wackos”. It wasn’t particularly interesting reading, aside from the title, which is true.

Comments off

This is long and all about software, so you can safely skip if you don’t care.

Software engineering performance flame wars. I was reading this article posted to a Java oriented audience claiming that PHP scales well. As someone who’s been writing software for a while(though by no means the most expert/experienced developer ever), I think I have a pretty good perspective on what makes good software. And one of the hottest topics for debate is whether X performs better than Y. Whether it’s one line of code or it’s an OS or a whole language, few things ignite more flame wars than what runs faster than what.

You would think that the question would be easy to answer. Just run a benchmark for X and Y and see what wins. The reality is that it’s almost never that simple. For a single line of code that might work but even single lines often don’t provide comparable results. And it’s completely impossible to compare large projects. Usually the point of a performance comparison is to decide beforehand which method to use and comparing the whole application performance of both systems defeats the purpose.

For large systems, the key feature is an architecture that can achieve performance through scalabilty. The author does acknowledge later that performance is different from scalability. Performance is how fast your systemm runs, scalability is how fast your system can run. Scalability is an abstract goal at the architectural level to design a system that can handle all the potential traffic you can anticipate.

I don’t usually argue the performance characteristics of Java/PHP/C++/Perl, but thankfully this blog is my personal soapbox so I can say whatever the hell I want. I think they can all perform fine for any application, small or large. C++ is probably a bit faster than Java(but Java can win sometimes as seen in this article), which is probably a bit faster than PHP. I think Java is slower than C++, but it’s speed is rapidly increasing to the point that it will soon be faster than C++ for many things. However the performance of these languages is largely irrelevant as long as you are not running them as forked CGIs. In system design two things are more important than performance: scalability and maintainability(yes I know it’s not a real word, but software developers know what I mean and it makes my conjunction better if I can use two -ability words together). Any of the languages can be used to build a scalable system.

The reason that Java works so well for enterprise applications is not because it’s faster. The reason I like it is that it is the easiest language to create maintainable systems. It’s possible to create a scalable design with each of the languages, but Java guides developers towards it without a significant loss in maintainability. PHP and Perl are were developed as scripting languages and have quick small applications in mind. They encourage practices which aren’t as easily maintainable in very large systems. I love Perl, I think it’s amazing, but I wouldn’t build a system of 50,000 lines of code with it. I feel similarly about PHP, except that it’s much better for building web sites, but worse for most everything else. Having a weakly typed language where variables are not clearly declared and scoped is asking for trouble later. You can certainly be verbose and declare and scope things in both scripting languages, but the nature of the language and the programmers of those languages means it usually doesn’t happen.

C++ has a different set of issues. Yes, C++ is frequently faster, but it’s tougher to write good OO code with it. C++ programmers tend to be created from procedural C programmers and they tend to inherit some of the designs that tend to be too procedural and not OO enough. Also having to do your own memory management is a time consuming, even for experienced C++ programmers.

To summarize, you can build scalable, maintainable systems with any of the languages. Performance is overemphasized, scalability is not. The performance difference between the languages is overemphasized, the difference in maintainability is not. You probably won’t get an order of magnitude performance boost by switching languages. You could get that by redesigning your system architecture. If it costs you a significant amount of time to achieve the performance you are looking for your architecture is to blame, not the language.

There are plenty of good reasons to choose a specific language, whether it’s Java, PHP, Perl, C++. For instance your local talent pool is filled with PHP programmers and you know they are excellent. Or you need to work with an extensive amount of legacy C++ code without a major system revamp. It’s just a bit easier to do write a scalable, maintainable system in Java because it guides you in that direction.

Comments off

It’s tough to come up with new compelling content week after week, not that I think what I have is compelling, but it would be easier to just put up porn.

I am getting totally huge. I topped 181 lbs for the first time the other day. I’d be psyched if it wasn’t all fat. The combination of 60 hr/week job that provides free dinners and free snacks doesn’t leave that much time for working out and doesn’t make for sensible eating.

I now subscribe to about 50 different RSS feeds, and I find that the more news I get, the less of it I actually read. After browsing the headlines, I now skip the articles I would’ve read before. And there’s a lot of overlap between a bunch of different feeds. If you break it down, I have about %20 world news/top story, %10 general science, %20 software/java/linux, %10 sports, %10 entertainment, %20 misc, %10 personal/friends blogs. My favorites are still Slashdot, Wired, cnet.com.

I changed my work PC from Windows XP Pro to White Box 3.0 linux(though I have dual boot just in case). It seems really stable so far. Although I have to admit the windowing system doesn’t feel as fast as Windows. One of my co-workers claims that it’s just because the dual monitor feature which allows you to drag between monitors really slows it down. But it does feel like I’m losing a bit of performance in Linux. But on the other hand, I am so used to unix utilities I personally gain a lot of productivity there. I want to use Eclipse for Java development, but unfortunately it doesn’t support Java 5.0 that well, and we use those features extensively. I am actually writing a fair amount of C/C++ code too lately and I want to try out the eclipse C integration. People think of it as just a Java tool, but it supposedly has a good enough architecture that it works well for other languages. We’ll see how it goes.

I interviewed a PhD in Math from Berkeley who was interested in working for us the other day and was reminded how weak my math knowledge is compared to what it probably should be. On the other hand, my software engineering skills are pretty good.

Oh and the Google stock price is insane. The valuation($48B for a company with $52m in earnings last quarter) makes you wonder if we’re living in 1999 again.

Comments off

Someone must have designated October as Create A Blog Month, because now Nat has a blog. Which brings up the total to 3 this month, all using Live Journal, Dave,Jason, and Nat. Anyone else want to join the fray?

Comments off

After a long absence, I returned to a casino to play poker. I hadn’t played at a casino in about 6 months I think. It was a pretty typical 6/12 game at Bay 101. I made about $114 in 3 hours. Mike made more than $200+, playing somewhat looser than he should have and Kojo was down a fair bit also playing somewhat looser than he should have. We were seated all at the same table for most of the night so that made it fun by itself.

A couple of somewhat interesting hands.

I have AA in the big blind, mid position player limps, cutoff limps, small blind limps. I raise. All call. Flop is A 8 6 with 2 clubs. Small blind checks, I bet, mid position limper raises, cutoff calls 2 bets, I call. Turn is an offsuit 3, I check, raiser bets, cutoff calls, I check raise, mid position 3 bets, cutoff finally decides he’s screwed and folds. I put the mid position guy all in for 2 more chips. River finishes the flush, but thankfully he only has A8, my top set is good.

I have AKo in the small blind. One player limps, cutoff limps. I raise from the small blind 3 callers. Flop is Q83, 2 hearts. I bet out. Cutoff calls. Turn is a small heart. I check, cutoff bets. Sadly, I have to look at my cards here to figure out that I do actually have the K of hearts. Usually I don’t have to look to remember. But with the K of hearts I call. River is an offsuit Ace. I check, he bets as expected and I call as I had pre-planned. His JhTd had some draws, none of which got there and most of which would have been more expensive for him.

Comments off

Everyone’s doing it. I think Jason was jealous of the two hits per month that I am getting so now he has created a blog. Who knows what he’ll write about it.

We’ll be getting some interesting test machines at work. I haven’t ever used an AMD Opteron before or any other 64-bit systems, but we’re going to be evaluating some of them to compare with our Dells. I hadn’t realized that AMD Opterons had been doing so well compared to Intel’s Itanium 64 bit machines that Intel finally had to suck it up and release Extended Memory 64 Technology(EM64T), which are a line of Intel chips that are compatible with AMD machines. That must have really hurt the ego of Intel, having been the leader for so long, to admit defeat in their big margin server business and adopt an AMD standard.

We’re also testing a couple different OS’es. We’ve been having some issues with Suse 9.1 crashing on us, so we’re having a shootout between a variety of them for our application. So far Win2k and White Box Enterprise Linux 3.0 are the winners while Solaris x86 and Suse 9.1 have both crashed. Until recently, I hadn’t ever heard of White Box Linux, but Tango and our sysadmin recommended it, and now we’re testing it and it looks really good. I feel kind of like a hypocrite because I have a Windows XP desktop, but I am a Linux fanboy. I swear I’ll install Linux on my work desktop when I get some time.

Comments off

Damn them. Someone bought the lot next door to us. And they claim that part of our deck is over the bounds of where we can build it. It’s not into the other lot, but there are some building codes which determine how close to a lot line you can build. It doesn’t look like the deck had a permit for it, so now we have to look at our house paperwork and see if we are liable for it, or it was something that the sellers didn’t disclose. We might have to track down the people we bought it from and contact them about it. Either way it’s a pain in the ass, mostly for Tracy because she’s doing all the work for it.

Comments off

Wow is the new Counter-Strike: Source amazing. I have never seen a game engine as good as this. The graphics are really good, but the best part is the physics engine. Everything is extremely lifelike. From the way oil barrels roll when they are tossed down a flight of stairs, to the way a body falls over lifeless when you shoot it, every object acts like you would expect it to. It really has to been seen to be believed. The sounds are just as you would expect as well. It’s a good thing I upgraded my pc for this, otherwise I would have no hope of running it. This has really set a new standard for what to expect out of a PC game.

Comments off

Counter-Strike: Source is now available at www.steampowered.com

I consider a couple of problems in America extremely hard to solve. One is our health care system, the other is the commercialization of college sports. The problems with both are complex and intractable. Both have too many special interest groups and too much money at stake. However they both do a disservice to the public which they are trying to please.

In health care both doctors and patients have lost much of their decision making power in treatment and that power has now been given to insurers and administrators who are too far removed from problems to make the best decisions. And the privatization of prescription drugs has given the pharmaceutical companies the power to promote and brand their drugs which drives costs higher for consumers. Consumers then request drugs which may or may not be the best fit for them. Malpractice insurance and frivolous lawsuits are also a big problem.

The big money in professional sports has corrupted the college sports system, particularly football and basketball players. Colleges gain the most exposure and thus the most donations from alumni by having great sports teams. Coaches are generally rewarded for the performance athletically, not for their students academic performance. To the student athlete, the lure of a big pro sports contract is too great. They have a hard time passing up a chance at a professional sports career and so education takes a back seat to their athletics.

These are hard problems to solve, I don’t have answers. Someone solve these problems and I’ll give them $1.

Comments off

Went to Tahoe this weekend for my friend Dave’s wedding. Here are some pictures. Damn I’m looking good.

Comments off