December 26, 2002
Hearing specific audio encoding

What about a lossy audio encoding system that uses information about the hearing profile of the listener to tune the encoding? For instance if you can't hear frequencies above a certain range then there's no need to encode the data for those frequencies. The software performs a hearing test to check which frequencies you can hear and create the profile. Obviously the files wouldn't be as good for swapping between listeners as generically encoded ones but I personally don't do that anyway. A further refinement would be to also tune for the playback environment. I'd like some files for playback in the car and some for through headphones at work. The first environment is much noisier than the first and the speakers are different. Perhaps a different encoding could exploit this to provide increased compression and fidelity for the portions that are actually going to be audible. Of course I'm not going to actually do anything with this idea :)

Posted by Alex at 11:12 AM
December 24, 2002
Another Computer

This Christmas I build a PC for playing games as a gift. There are some pictures here showing the "human side" of PC construction. I'm just going to write about the "technical" parts. The end result isn't perfect I'm sure but it's still about three to four times faster than any of the other machines I've got.

The constraints were that we were going to build the thing from scratch, it had to be able to play the latest PC games, and that everything had to be available at Fry's cause this was a last minute idea.

I used the ArsTechnica Buyer's Guide as the basic reference to give me an idea of what to look for. The current CPU recommendation is AMD, which I've used in the past and liked. I picked the motherboard possibilities based on this AnandTech motherboard review.

So off to Fry's we went to return with:

  • AMD Athlon XP2000 processor
  • Leadtek K7NCR18D motherboard
  • 512MB of Mushkin memory
  • WesternDigital WD800JB hard drive
  • Sony CD-R/RW
  • Radeon 9000 128MB DDR video card
  • Enermax CS-307 case
  • OEM version of Windows XP Home Edition (ick)

I think that's quite a list but at least there was no need for a floppy, keyboard, or mouse as I've got those bits already.

Putting the hardware together was pretty easy, as usual. All of the big bits are never any trouble, it's hooking up all of the leads to the leds on the front, usb ports etc. that's tricky. Installing windows was easy, though took a long time, RedHat's quicker. The only problem, and it took some time as was pretty frustrating, was trying to load the motherboard drivers. Every time we tried it would freeze up, and without the drivers the built in lan wouldn't work. Fortunately we noticed that the freeze was after the lan was enabled so I was able to download a later set of drivers from the web and they installed with no problem. Fortunately we've got a DSL line. Without that downloading 18MB of driver would be very painful. Of course once all that's done it's time to play windows update. Finally, after another 20MB (excluding the .NET Framework), we were ready to go.

So, how does it play? Fantastic. The No One Lives Forever, A Spy in HARMS way demo will run smoothly at maximum resolution. Lots of fun, not that I plan to do this anytime soon. I've sworn off windows at home so my PC gaming is over, well as long as I can resist it is anyway. It just takes up too much time that could otherwise be spent programming.

Posted by Alex at 04:32 PM
December 23, 2002
$624 million

On Sunday there was an Austin American Statesman article titled They had $624 million to burn. The title refers to the amount of VC money raised by Austin area firms in the second quarter of 2000. Nothing that hasn't been said already really. However, I think they misread the anecdote with which the article opens. Mike Schultz is the incoming CEO of Infoglide and the scene is an all hands meeting in February 2001.

After explaining the dire situation facing the company, the 57-year-old Shultz opened the floor to Infoglide's 70 young employees. Among the first questions: "What's the status of the rock-climbing wall?"

"It was then that I realized the company had lost its soul," says Shultz, who spent his first weeks at Infoglide apologizing to customers for the high-handed way it had treated them. "That was true for many, many companies that raised a ton of venture capital and felt that entitled them to write their own rules."

<CYNICAL>My take on the remark is slightly different from Mr. Shultz's. By the time he arrived I suspect the poor employees who were left at Infoglide had been through CEO De Jour a couple of times already. Each new one bringing with him a new business/marketing plan and some new buddies to take over the VP positions. Listening to a presentation about the financial situation of the company by the latest CEO and then asking about the climbing wall is the equivalent of giving the guy the finger. It's saying we don't believe you, we think you're just like all the rest of the guys before you.

I don't read it as saying the the employees felt that they were entitled to write their own rules, a climbing wall, free food in the break-room etc., rather that they'd seen a sucession of bosses do just that and were justly cynical after another pep talk. I suspect they'd listened to presentations in early 2000 setting out the tremendous growth prospects for the company, and not believed those either. If there was a disconnect from reality I think it wasn't down in the trenches, it was in the boardrooms. Programmers generally don't believe the hype, most have seen too many failed silver bullets in the programming world (CASE, 4GLs etc.) to be easily taken in. On the other hand, no one every got anywhere by pointing out the delusions of the CEO, so I think they adopted a live and let live attitude. You don't feed me too much bull, and I'll pretend to believe the stuff you say.</CYNICAL>

Reading it over, my "analysis" is way over the top. Anyway, it's fun to rant from time to time and that period of free money was pretty wacky. At work the current business plan seems eminently reasonable so either things are changing or I've been at the koolaid again.

Posted by Alex at 09:51 PM
December 22, 2002
Christmas Vacation

Today marks the official watching of National Lampoon's Christmas Vacation for 2002. That is all.

Posted by Alex at 08:51 PM
December 19, 2002
Noggin The Nog

While drinking some egg nog just now I remembered The Sagas of Noggin the Nog. The same team was also responsible for The Clangers. I especially liked the Soup Dragon and the Iron Chicken.

Posted by Alex at 09:02 PM
December 18, 2002
Code Generation Patterns

On TheServerSide there's an article about Model Driven Architecture, TheServerSide.com - MDA from a Developer's Perspective. This includes 10 Myths about Code Generation. I spent several years working for a company whose product relied on code generation, and we use quite a bit of it at work now so I have some thoughts myself about this issue.

In particular I don't agree with myth 7. I'll just use XML/XSLT and be done with it. The explanation for why this is a myth makes the assumption that you will be modifying the generated code and have to merge these changes in with any later regeneration. In my opinion this is the result of using a flawed pattern for generated code.

I believe the correct pattern is to never modify the generated code. Clearly you'll never be able to generate code that provides 100% of the functionality you need. The question is where to add the extra functionality. Instead of adding it by editing the generated code, add it by subclassing the generated code and overriding and adding methods where needed. When you have control over the framework and it is designed with this approach in mind the end result are much better than can be achieved with don't touch the code colored blue techniques you see in NetBeans, VisualStudio.NET and similar tools.

We use this scheme very successfully at work with our own XSLT based code generation system. Using XSLT really is an advantage over proprietary tools with their own little languages, each of which will have its own little bugs, with their lack of full access to the template source, and with their vendor lock in. The biggest remaining problem with code generation really remains for the programmers writing the templates. This is the fact that you're dealing with two control flows, the one of the templates used to generate the code, and the one of the code being generated.

Posted by Alex at 08:37 PM
December 17, 2002
Joy of Linux?

I wanted to connect a laptop I borrowed from work to the network at home. This needs dhcp if it's going to work in any reasonable way. So I installed a dhcp server on my debian box, easy with apt-get, and followed the instructions in The CTDP Linux User's Guide - DHCP and BOOTP and other places to get the thing configured.

However, the first time I try to start the server it won't work because it says the kernel isn't compiled with CONFIG_PACKET and CONFIG_FILTER set. True enough it isn't, and true enough this is my fault as this is a "custom" kernel I compiled last year. So, in order to attach a laptop to the network I have to recompile the kernel. OTOH, at least I've now got a more up to date kernel installed.

Posted by Alex at 10:46 PM
December 16, 2002
XSLTXT in C#

As a sort of learning exercise I think I might have a go at porting XSLTXT to C#. This will have to be more than just a straight translation of code as the .NET apis for reading XML are different from the Java ones. In .NET Microsoft has implemented a pull type api. An application program makes calls to the parser to retrieve the next node they are interested in. Java uses SAX and application programs use listeners to handle events issued by the parser. The claim is that a pull api is easier for application programmers to handle. This may be true but I think it's going to be harder to write an XSLTXT parser to support a pull api as now I'll have to handle the state of the parse rather than letting the application do that.

Posted by Alex at 07:51 PM
December 12, 2002
What's Windows Worth?

An interesting view in a Slashdot thread MS Proposes Disclosing Windows Source To India. Perhaps the real value of Windows in now zero, certainly with 85% profits in the OS division it is much lower that the cost you pay, and the actual price charged is mostly the extra money Microsoft is able to extract through their monopoly in the desktop OS market?

Posted by Alex at 09:54 PM
December 11, 2002
Vinyl

Nice little rant you can recycle when people start up with the cds are worse than vinyl arguments. Re:analog. By the way, the initial line of the post, Why do uninformed ramblings keep getting moderated as "Insightful" here at Slashdot? really must be a retorical question!

Posted by Alex at 04:46 PM
Microsoft and Software Patterns

Microsoft has only recently "gotten religion" where software patterns are concerned. Their patterns & practices site is recent, as is any formal interest in or promotion of patterns within the company. They were late to recognize the importance of software patterns, especially among corporate and Java developers, just as they were late to see the importance of the internet. However, as with the internet, though they are at the back of the field at the moment you can expect to see them running faster than anyone else and they'll soon catch up. I imagine they may well recruit some pattern heavy hitters to add credibility to their offerings. Eventually we'll probably even see people who think that Microsoft invented the whole concept!

In the meantime though, to have their most public .NET (and anti-Java) effort held up as an exmaple of how not to do things, as this article, PetShop.NET: An Anti-Pattern Architecture does, must be embarassing. It's an interesting look at the patterns used in Microsoft's PetShop.NET implementation. The issues have been raised before, in particular by Clinton Begin in discussing his JPetStore implementation, but it's good to see it as the main focus of an article. Though PetShop.NET performs better than the original EJB PetStore it may weaken Microsoft's overall argument in the end because of the poor design it demonstrates.

Posted by Alex at 03:56 PM
December 06, 2002
Language Fads

Fads for using various words and phrases seem to come and go in software companies. One month they're in and everyone's using them, the next they're out. Maybe a boss starts using a particular word or phrase and suddenly everyone's at it. It's probably the same in other industries as well. While I was in Redmond I heard a couple of new ones that seem to be popular at Microsoft at the moment.

The first is performant, as in writing performant code or we have put a lot of effort into making the framework perfomant. It looks like it means performs well though Google doesn't have a definition for it. Here's a post from 1999 claiming a French origin for the word and there's even a company founded in 2000 that calls its self Performant.

The other phrase I heard a lot was take a dependency, as in we'll be taking a dependency on the CLR project. Of course this means dependent, but uses more words.

Where I work the current favourite is socialize, as in we'll be socializing this message with the other groups. Just means talk about or discuss with.

A few years ago out of pocket was popular to mean out of touch, as in she'll be out of pocket when she's at the client site next week. I thinks this is currently declining in popularity. Here's a post discussing it arising at least 25 years ago.

Posted by Alex at 09:41 PM
December 03, 2002
Words I didn't think I ever read

From a New York Times article Scratching Without Vinyl: A Hip-Hop Revolution Hip-hop D.J.'s are a stubborn and purist bunch.

Posted by Alex at 07:33 PM