What's That Noise?! [Ian Kallen's Weblog]

Main | Next month (Mar 2004) »

20040227 Friday February 27, 2004

Compiling APM out of a linux kernel on redhat9 I rarely have to recompile linux kernels, usually stock compiles are adequate. But occasionally, badness happens.

I'd installed RH9 on a box for a specialized use (a reverse proxy server built on mod_perl 2.0). It's basic deployment requirement was simply that it'd sit in the server room on a rack (i.e. headless). Everything went fine on the system installation and the software that I setup thereafter. However, after I racked it and put a little startup script in /etc/rc.d/init.d for the mod_perl instance I'd deployed, I rebooted it in it's "production" mode i.e. without any input devices attached. Lo and behold, it hung with a message about the power management stuff, something like
apm: BIOS version 1.2 Flags 0x03 ...
[it just stops there ]
So I set out to recompile the kernel. Since I don't do these kinds of things regularly anymore, I had to poke around and read through the procedures. Just for posterity's sake, this is what I did:

I used use FreeBSD for everything I possibly could. It's been a few years since I've had to custom build kernels for BSD but I recall the process being super straight forward; the amount of dickering around with different configuration tools was nil -- just edit a kernel config file and go compile that suckah.

I miss that. Unfortunately, all of the work that I do with Java is not compatible with sticking with BSD; my work is tuxified. If fortune shines upon me, my work in the future will be on Mac OS X where: no kernel dickering should ever be needed, it's BSD and it's slick. ( Feb 27 2004, 11:29:15 AM PST ) Permalink

Dodged the rain in an Expedition Strangely, there was no line today at the pickup point

Rode in the backseat of a white late model Ford Expedition with Don Imus going on about.... nothing in particular. Driving and weather conditions were good as was my timing.

The minute I stepped into my office, umbrellas were abloom outside as the rain starting coming down. ( Feb 27 2004, 09:00:34 AM PST ) Permalink

20040226 Thursday February 26, 2004

'twas Grand Rode shotgun in a late model green Dodge Durango SUV.

After yesterday's biblically proportioned downpour, it was nice to wait for a pickup in sunny (albeit partly cloudy) weather. Yesterday, the freeway was locked up with solid accidents and general bad-weather chaos; seemed it was a definitely a BART day as the carpool line was empty. So I was attentive this morning to the radio reports for weather and traffic conditions, everything sounded good.

Waited in line about 10 minutes before for the 8 people ahead of me to get picked up, and then the Durango arrived. The same radio station I'd been listening to earlier was prattling on with the usual morning blabber.

The going was slow through the Caldicott and to the 580 split but after that it was smooth sailing. KGO was abuzz about a backup "from the tollbooth out to the Grand Avenue exit" but there was no such thing; the approach to the tollbooth was light, the non-carpoolers weren't buried too deep at the metering lights. The incline up the bridge was slow but nothing horrible; total drive time was about 30 minutes. Grand, indeed. ( Feb 26 2004, 10:15:47 AM PST ) Permalink

20040225 Wednesday February 25, 2004

Shalom Salaam At work today, I've been listening to Ziggy Marley's "Dragonfly" release.

Nice headphone groove to write code by. I really dig the fifth track, "Shalom Salaam" ...soulful, reggae and a message so pertinent to the days we live in now.

"children are children no matter color or faith"

Peace ( Feb 25 2004, 12:35:28 PM PST ) Permalink

subversion released! It's been a long time coming, but I'm very pleased to hear the announcement that subversion has gone one-dot-oh!

I've been an Apache user for a long time now and interested in WebDAV for years, so it's been with much anticipation that I've watched (from afar, anyway) the subversion project develop. While CVS will likely be in our midst for years to come, it's nice to know that a robust source control alternative (other than Perfor$e) is ready to roll.

Someday, real soon maybe, I'm going to setup a subversion repository for personal use as well as for publishing code. Putting it on my TODO list now... ( Feb 25 2004, 12:29:13 PM PST ) Permalink

Much Ado About Outsourcing Vivek Paul seems to be the annointed spokesman for India's outsourcing industry. Last week he was the lead protagonist in an eWeek piece The Offshore Proposition. In the current issue, eWeek has him again in a two page interview. The most interesting thing is an excerpt in the response to the last question ("Your advice for the 40-year-old engineer here in Silicon Valley whose job has been outsourced?"). Paul is optimistic about the prospects of US engineers who are, "...pushing the edge of innovation" but then goes on to say:

"If your job involves sitting in a cubicle and not talking to anyone else, you are at risk. Get yourself into a role that is more attached to the customers or suppliers and is on the cutting edge of innovation."
So maybe you don't think you're Milton but according to Paul's point, don't content yourself with being relegated to the basement. Recall Peter and the Bobs:
Peter: You’re gonna layoff Samir and Michael!
Bob Porter: We’re gonna bring in some entry level graduates for us to work in Singapore, that’s the usual deal.
Bob Slydell: Well, it’s standard operating procedure.
Yea, and Milton and his stapler will be outsourced. So stay close to the customers, dammit!

Milton is Nervous
( Feb 25 2004, 10:48:03 AM PST ) Permalink

20040224 Tuesday February 24, 2004

Snake Eyes Often, it's just a roll of the dice.

The line at the carpool was at least twenty five persons deep when I arrived. At that point, it becomes a dilemma: do I wait it out and ride in on the 'pool or do I just say "screw it" and jump on the train? There wasn't exactly a throng of cars chipping away at the line, it could be a long wait. When the rain started to come down and I realized that I didn't have an umbrella, I sez to meself: "screw it!"

I hustled into the station. From the platform, a clear view of the carpool pickup point is evident. Here it was, just moments later, there was no rain and the line looked to be about halved in size! Was it halved because others were following my example and bailing out on the line? A steady procession of cars were apparent as the BART sign flashed "11 minutes" for the next train. It now looked like those people who'd held fast were likely to get downtown before me and with more train fare left on their tickets.

Sometimes, the dice just come up snake eyes. ( Feb 24 2004, 09:37:44 AM PST ) Permalink

20040223 Monday February 23, 2004

It's the most wonderful time of the year Perhaps I'm a latino-phile, I dunno.

I've never been to latin america (unless Florida counts). I've never been to Mardi Gras either. But this is the time of the year when the news is filled with pictures of Carnival in Brazil and other great places. And I think it's awesome.

Public displays of non-inhibition are not always pretty but the pictures of the various Carnival celebrations are truly splendiferous. Just a nice reminder that the accepted American narrative of normal and appropriate behavior is clearly deficient. ( Feb 23 2004, 12:03:00 PM PST ) Permalink

Constants Abuse Hard-coding string and numeric values into application logic is often problem-plagued. I tcan lead to duplication, which leads to maintenance nightmares, which can lead to increased substance abuse, drinking, crack cocain... it's a treacherous road. Don't go there.

It's a pretty common (and usually, good) practice amongst java programmers to organize all of the little magic values that application logic depends on into a class that defines public constants. However, this can lead to another problem: constants bloat. Cases where the developer needs to define a constant that is only accessed by one component (let's just call a single class and its instances "one component" for the time being) but stores it in a shared centralized constants class is another form of substance abuse. It's constants abuse.

I would really prefer to see constants with a limited scope of applicability confined to that scope. For instance, if it's only used by one class -- define it in that class, not the shared centralized beast. If it's only used by a cluster of classes that work on a particular area, perhaps there's already a bean that they all know about; the constant may be better suited for that bean than a class shared system-wide.

Confine the scope of your constants definitions to where they are useful and save yourself and your colleagues maintenance headaches down the road. ( Feb 23 2004, 10:55:14 AM PST ) Permalink
Comments [1]

20040221 Saturday February 21, 2004

Black Sun to open for Yngwie Malmsteen Long time Bay Area axe-slinger Thaen Rasmussen's current band, Black Sun is set to open for Yngwie Malmsteen. Those of us who frequented the metal scene way back when may recall Thaen's legacy effort, Anvil Chorus, and their opening gig with Yngwie. Yep, I believe that show at Wolfgang's in San Francisco was over twenty years ago, 11/19/1983! ( Feb 21 2004, 12:09:30 PM PST ) Permalink

Tiles Definition Files: anti-pattern? Struts tiles definition files allow the developer to refer to components to include symbolically. Besides the struts-config.xml, this is an additional configuration point. Ostensibly, the extra layer of indirection eases maintenance and re-use. However, I've found it to be flawed:
It increases the maintenance burden by requiring mappings in two different xml files and these mappings are easily abused
For instance, suppose updating the UI logic on the SomerSault widget is required. The developer may have to traverse two different mapping types (struts class mapping and tiles component mapping)
  1. look in struts-config.xml for the class mapped to /SomerSault.do
  2. the <Action /> stanza forwards to something called somerSault.layout
  3. ok, next, look in tiles-defs.xml and one might find that somerSault.layout maps to /SomerSaultContainer.do
  4. alright, go back to the struts-config.xml to find /SomerSaultContainer.do and see that it maps to the type com.example.SomerSaultContainer
That's too many steps
There's no compile-time validation
The developer might make all of these changes and be please that everything compiles, including the JSP components (using the jasperC ant task). However, at runtime if the names don't match up, it's difficult to debug where the problem is.
It would be preferable to define any symbolic names for components as constants in a compiled class (say TileDefinitionConstants), this would make the names uniformly available to the Action classes and JSPs. Exposing the symbols to the JSPs would require writing a little tag library but that's a trivial feat. ( Feb 21 2004, 10:22:50 AM PST ) Permalink