<whine>Had to do a complete reinstall of Solaris which wiped out my user partition and I lost all my stored email, my resume and web site</whine>
Now that I've got that off my chest, I just wanted to share a very interesting idea I ran across today. It's a post on Dave Thomas' blog (now a wiki entry) talking about practicing. Practice seems to be more of a, well, a practice with people who have vocations requiring physicals skills (musicians, athletes, etc.). But shouldn't programmers practice too? Dave says yes, and after reading what he has to say, I'm inclined to agree. Especially for those of us who aren't in "agile" shops, and who perhaps spend two months designing, six weeks coding and two months testing. After spending the last couple of years honing my skills with design patterns, UML and other high-level concerns, Dave's katas have brought me "back down to earth", with their focus on the basics: what is the best data structure to use, how do I decide what's the best algorithm for this situation, is it better to write some code or just invoke a system utility?
Maybe it's just me (stuck in the middle of the "two months of testing" leg of the cycle), but thinking about these aspects of system design really brought home the essence of development: deliver a system that solves someone's problem(s). Not that I haven't been doing that, but lately I've been more focused on delivering solutions using "industry best practices" than I have with actually solving the problem. I'll defend myself by saying that the design artifacts are, on my current project, a deliverable, and so I spent a large amount of time making sure that I followed The Process. But in the end, it's the solution that matters, and I wonder if I might not have been led, perhaps by hype, somewhat astray.
07 March 2006
23 February 2006
Solaris upgrades
Well, the blush is off the rose, Solaris-wise. I have spent the last couple of nights whacking my Ultra 20 with a blunt installer, to little effect. First, I installed the Ultra 20 1.2 supplemental update (updates the BIOS and installed new drivers for the built-in hardware). That went all right, but when I rebooted I couldn't get the network interface working. I quickly figured out it was something with DNS (I could ping my router and print server just fine, but anything not in /etc/hosts was unreachable). So after a couple of hours tweaking this and poking that and whacking the other, I found out that Solaris doesn't like the DNS server that RoadRunner provides. It's there, and my wife's Windows box doesn't seem to have a problem with it, but Solaris won't talk to it. Fortunately, I have an alternate public DNS server configured, but unfortunately Solaris won't use it. For some reason, it thinks that the RR server sends it a valid 'domain not found' response. Once it gets a response from a server, it uses that server for all further requests. I finally used nslookup(1) to query my alternate name server, and then Solaris started to use it. Chalk up two hours to "learning experience".
Last night, glutton for punishment that I am, I installed the new Solaris Update utility. It analyzed my system, then ran off to Sun to find out what I needed. 57 patches! So I let it download them all and install what it could. Then it said I needed to reboot to install the rest. Since I'd already blown my uptime (148 days), I didn't think it was any big deal. So I reboot, and the box says it's in system maintenance mode and starts installing patches. It installs a bunch, then seems to just sit there. It looks like all the patches have been successfully installed, so I go ahead and reboot. When the system comes back up, it's a lot different: it's now using the Grub boot loader, and no longer shows the boot messages as it comes up. It also tells me that it can't initialize nge0 (the network interface), which I'm not looking forward to digging into again. Then, it tells me to wait while the X server starts, followed in a few seconds by the notice that the X server cannot be started. Not Good. I've got a job application to fill out, and my email to check, I really can't be wasting hours sorting out some system misconfiguration issue. So I scarf the wife's laptop and go trolling for clues. While dredging through the Sun "Miscellaneous hardware" forum (where all the workstation issues go), I find a mention of a Yahoo! newsgroup dedicated to x86 Solaris. So I hie myself over there, and lo and behold, someone else has reported this same issue! Unfortunately, there was no resolution posted, but someone did point out there was a utility (kdmconfig) that would allow you to switch to the Sun X server (Solaris 10 uses the X.org server by default). I did that, and was able to get X up (albeit at 1024x768 instead of the 1600x1200 I favor). So I got back into the patch tool and backed out the two patches that looked most likely to be responsible. When I rebooted, the Sun X server started, so I went in and set the default back to the X.org server. Which then failed to start again. I checked the log file, and it seems to indicate that the nVidia driver (I am using an NVS280 card) was found and initialized itself, but it can't find or initialize the graphics card. So I switched back to the Sun server and resolved to call Sun Support.
Last night, glutton for punishment that I am, I installed the new Solaris Update utility. It analyzed my system, then ran off to Sun to find out what I needed. 57 patches! So I let it download them all and install what it could. Then it said I needed to reboot to install the rest. Since I'd already blown my uptime (148 days), I didn't think it was any big deal. So I reboot, and the box says it's in system maintenance mode and starts installing patches. It installs a bunch, then seems to just sit there. It looks like all the patches have been successfully installed, so I go ahead and reboot. When the system comes back up, it's a lot different: it's now using the Grub boot loader, and no longer shows the boot messages as it comes up. It also tells me that it can't initialize nge0 (the network interface), which I'm not looking forward to digging into again. Then, it tells me to wait while the X server starts, followed in a few seconds by the notice that the X server cannot be started. Not Good. I've got a job application to fill out, and my email to check, I really can't be wasting hours sorting out some system misconfiguration issue. So I scarf the wife's laptop and go trolling for clues. While dredging through the Sun "Miscellaneous hardware" forum (where all the workstation issues go), I find a mention of a Yahoo! newsgroup dedicated to x86 Solaris. So I hie myself over there, and lo and behold, someone else has reported this same issue! Unfortunately, there was no resolution posted, but someone did point out there was a utility (kdmconfig) that would allow you to switch to the Sun X server (Solaris 10 uses the X.org server by default). I did that, and was able to get X up (albeit at 1024x768 instead of the 1600x1200 I favor). So I got back into the patch tool and backed out the two patches that looked most likely to be responsible. When I rebooted, the Sun X server started, so I went in and set the default back to the X.org server. Which then failed to start again. I checked the log file, and it seems to indicate that the nVidia driver (I am using an NVS280 card) was found and initialized itself, but it can't find or initialize the graphics card. So I switched back to the Sun server and resolved to call Sun Support.
07 February 2006
Hack of the day
Well, this hasn't happened in a while. I had an idea, wrote it up in vi, then compiled and ran it, and it compiled cleanly and worked the first time! Obviously it's a trivial example, but it's kind of neat, so I thought I'd share.
Background: On my current project, we have some boilerplate logging code that has to go into every method. It looks something like this:
logEvent("Module", ErrorConstants.EVENT_START, "Method name");
I got a comment on a code review that I should be defining string constants for my module and method names, since string constants should never be directly used in code (yes, that's the kind of shop we have here...)
The idea: I had had another idea regarding allocation tracing, and I remember that (since Java 1.4) you could get access to the call stack via a Throwable. A quick glance at the JavaDocs showed that you can get both the class and method names from the stack trace. This led to the quick&dirty code shown here:
Quick & dirty == no JavaDoc or comments. Could be worse, I could have written it all on one line!
Denoumont: "Warning: may contain code which is too intense for young programmers". Turns our my solution (replacing all hard-coded strings with dynamic code to obtain the module and method names) was too...something for my team. They never really said what, just that they didn't think it was a good idea. This is a CMM Level 5 crew, and they don't really accept outside ideas well. Oh well, it'll go into my bag of tricks, and I'm sure I'll find a use for it on another project.
Background: On my current project, we have some boilerplate logging code that has to go into every method. It looks something like this:
logEvent("Module", ErrorConstants.EVENT_START, "Method name");
I got a comment on a code review that I should be defining string constants for my module and method names, since string constants should never be directly used in code (yes, that's the kind of shop we have here...)
The idea: I had had another idea regarding allocation tracing, and I remember that (since Java 1.4) you could get access to the call stack via a Throwable. A quick glance at the JavaDocs showed that you can get both the class and method names from the stack trace. This led to the quick&dirty code shown here:
private String getMethodName() {
Throwable t = new Throwable();
StackTraceElement[] ste = t.getStackTrace();
String methodName = ste[1].getMethodName();
return methodName;
}
private String getModuleName() {
Throwable t = new Throwable();
StackTraceElement[] ste = t.getStackTrace();
String moduleName = ste[1].getClassName();
return moduleName;
}
Quick & dirty == no JavaDoc or comments. Could be worse, I could have written it all on one line!
Denoumont: "Warning: may contain code which is too intense for young programmers". Turns our my solution (replacing all hard-coded strings with dynamic code to obtain the module and method names) was too...something for my team. They never really said what, just that they didn't think it was a good idea. This is a CMM Level 5 crew, and they don't really accept outside ideas well. Oh well, it'll go into my bag of tricks, and I'm sure I'll find a use for it on another project.
06 February 2006
Parse error: brain halted
My daughter got me the other day. We were poking around in the library downstairs, and she found a shelf of books that we had picked up at the Lincoln Public Library's annual shelf-clearing sale. They were all books that looked nice, but that we thought she wasn't old enough for yet (ratio of pictures to text wasn't high enough). Anyway, she picked up a copy of Curious George Rides a Bike. I read her the title, and she asked, "Daddy, what's curious mean?"
My brain vapor-locked for a second.
Then I explained, and we read the book, and she enjoyed it. So then we spent the next half-hour or so reviewing the books on the "not-yet" shelf and picked out several to take upstairs to put in her library.
My brain vapor-locked for a second.
Then I explained, and we read the book, and she enjoyed it. So then we spent the next half-hour or so reviewing the books on the "not-yet" shelf and picked out several to take upstairs to put in her library.
23 January 2006
On the road again...
Well, what an enchanting winter it's been! Took a trip out to LA (cold, rainy, not at all as advertised), then out to Philadelpha for Thanksgiving with Fran's family. Then a quick trip out to Pueblo to see my folks as my Dad had, not emergency, but certainly short-notice heart surgery (he had a cardio stress test, and they stopped him about ten minutes into it and had him go straight up to pre-op). So, we were pretty much travelled out come Christmas, so we spent it quietly at home. I did the traditional stay-up-late-assembling-toys Dad thing (since Fran had done the traditional go-all-out-buying-toys-for-the-only-child thing), which was cool.
My big post-holiday buzz has been getting the 944 back on the road again. It had been languishing in the garage with a stuck (down, of course) drivers side window, and I was going to fix it in my Copious Free Time (SM). Then Fran's car developed an oil leak. Turned out to be gaskets that I didn't have the tools, time or shop manuals to fix. So, we bundled it off to the Audi dealer in Omaha. We took it in on a Saturday and couldn't pick it up until the following Monday, which meant that Fran would have to take the Honda to work and I would have to get the Porsche running. So I spent Sunday evening tearing the door apart and fixing the window (turned out to be a bad window switch) and charging the battery and installing the car seat for Gabrielle. She loves it (she gets to sit in the front seat), and I get to drive like I mean it again.
My big post-holiday buzz has been getting the 944 back on the road again. It had been languishing in the garage with a stuck (down, of course) drivers side window, and I was going to fix it in my Copious Free Time (SM). Then Fran's car developed an oil leak. Turned out to be gaskets that I didn't have the tools, time or shop manuals to fix. So, we bundled it off to the Audi dealer in Omaha. We took it in on a Saturday and couldn't pick it up until the following Monday, which meant that Fran would have to take the Honda to work and I would have to get the Porsche running. So I spent Sunday evening tearing the door apart and fixing the window (turned out to be a bad window switch) and charging the battery and installing the car seat for Gabrielle. She loves it (she gets to sit in the front seat), and I get to drive like I mean it again.
31 October 2005
New toy
Well, such a deal! For my birthday, my lovely wife got me an iPod. Black, 30G, the new one that does video. It's really cool! Yeah, I know I'm pretty late to this particular party, but I've invested a lot into some good stereo gear over the years, so I tend to listen to music at home and in the car, not *everywhere* that I go. Oh sure, I've wished I'd had something I could listen to while mowing the lawn and stuff, but not so often that I've ever actually gone out and purchased something.
I've been watching the iPod Phenomenon, as I'm sure all geeks have, and I've been really amazed at the speed and depth of its penetration. I get the occasional overpriviliged Yuppie catalog, and they're all loaded with iPod accessories -- FM transmitters to play your tunes in the car, docks and speakers and holsters and armbands and cases and lanyards and on and on. I usually don't glance much at these, but yesterday I saw that Klipsch makes an iPod dock, and now I want one. It's too expensive, but it looks like a nice rig, and if it really is made to Klipsch standards, then it could be pretty sweet.
Oddly enough, this is really our second iPod. I actually got one (a pink Mini) for my wife the last time we were going on vacation, but she opined that she wouldn't use it that much, and that we could do something better with the money. Yesterday, after playing with mine, she admitted that she kind of regrets sending it back. Her birthday's coming up in a month or so, I wonder...
I've been watching the iPod Phenomenon, as I'm sure all geeks have, and I've been really amazed at the speed and depth of its penetration. I get the occasional overpriviliged Yuppie catalog, and they're all loaded with iPod accessories -- FM transmitters to play your tunes in the car, docks and speakers and holsters and armbands and cases and lanyards and on and on. I usually don't glance much at these, but yesterday I saw that Klipsch makes an iPod dock, and now I want one. It's too expensive, but it looks like a nice rig, and if it really is made to Klipsch standards, then it could be pretty sweet.
Oddly enough, this is really our second iPod. I actually got one (a pink Mini) for my wife the last time we were going on vacation, but she opined that she wouldn't use it that much, and that we could do something better with the money. Yesterday, after playing with mine, she admitted that she kind of regrets sending it back. Her birthday's coming up in a month or so, I wonder...
24 October 2005
Ruby on Rails: Um, yeah, maybe
Well, I was going to plunk down some hard-earned study time to finally get my hands dirty and learn about Spring when I got sidetracked. A lot of the Java news sites were carrying stories about this new technology Ruby on Rails. I remember looking at Ruby a few years ago and thinking it looked like a neat language, but I never really spent any time with it. Now it's got this new Active Record concept and people are claiming impressive productivity gains, so I thought I'd bite and check it out in earnest.
So. I get my box all set up (build & install Ruby 1.8.3, build & install PostgreSQL 8.0.4 [in 2m15s!], download RubyGems so I can download Rails, download Rails). Now to find a quick tutorial that will get me up and running....
Well, given that I'm on a Solaris box now, there's no Quicktime for me, so the on-line "learn Ruby in 15 min" video is out. I got a copy of the Ruby LRM, which is pretty good, but it's not the quick tutorial I was looking for. And as far as I can tell, there isn't one. What I had in mind was something like the Struts sample: copy it to the Tomcat webapp directory, let it deploy, then browse it and its source code. I can't even find an example of a web page with Ruby embedded in it! Maybe I just don't know where to look, but it shouldn't be that hard. Oh, and mod_ruby refuses to build for me (something about "gcc: unknows flag -Xa, unknown language idlfull", something like that). I'm building for Apache 2, so maybe that build wasn't tested. I only tried the latest version, so maybe I should drop back one or two (I was using something like 1.2.4, which just came out, it didn't look like much had changed in the last couple of versions). When I find the time, yeah, maybe....
So. I get my box all set up (build & install Ruby 1.8.3, build & install PostgreSQL 8.0.4 [in 2m15s!], download RubyGems so I can download Rails, download Rails). Now to find a quick tutorial that will get me up and running....
Well, given that I'm on a Solaris box now, there's no Quicktime for me, so the on-line "learn Ruby in 15 min" video is out. I got a copy of the Ruby LRM, which is pretty good, but it's not the quick tutorial I was looking for. And as far as I can tell, there isn't one. What I had in mind was something like the Struts sample: copy it to the Tomcat webapp directory, let it deploy, then browse it and its source code. I can't even find an example of a web page with Ruby embedded in it! Maybe I just don't know where to look, but it shouldn't be that hard. Oh, and mod_ruby refuses to build for me (something about "gcc: unknows flag -Xa, unknown language idlfull", something like that). I'm building for Apache 2, so maybe that build wasn't tested. I only tried the latest version, so maybe I should drop back one or two (I was using something like 1.2.4, which just came out, it didn't look like much had changed in the last couple of versions). When I find the time, yeah, maybe....
26 September 2005
Now It Can Be Told
Well, after much wailing and gnashing of teeth (why does useradd(1) try to create home directories under /home if Solaris reserves that for mount points?), I now have my shiny new Ultra 20 up and running. I got a user account added so I don't have to run as root, and I've at least looked at the included software (Java Studio Enterprise and Java Studio Creator). Haven't actually had enough time to create a project yet, but I think I've got everything else squared away enough so I can focus on Java develoment. The box comes pre-loaded with JDK 1.5.0, which is nice. I'm not sure if it's the 64-bit or 32-bit version, though.
Interestingly, the box seems to get faster as I use it. When I first started playing with it, it seemed to take forever for a new terminal window to pop up. Now it's (subjectively) quicker. The CDE seemed definitely quicker than GNOME, but that's not too surprising given that it's been out longer (I remember using it HP workstations back in the mid-90s). The GNOME environment is no slouch, though. I first used GNOME back with it first came out, when I was running RH5.2 with (I think) the 2.0.36 kernel. It was usable, but I eventually switched to Enlightenment. Then I dropped Linux for good and went over to NetBSD and never looked back. I hope Solaris works out.
I got Apache started, but I think I'm going to see what the Sun application server has to offer before I go much farther down the infrastructure setup route. I'll probably wind up installing all kinds of stuff (Tomcat, JBoss, Resin, Jetty) before I'm done, but I'm going to start out with the Sun suite and see what the creators of Java have managed to do. I have a feeling I'm going to be downloading Eclipse sooner rather than later, though. It's like vi -- my fingers know it too well to leave it behind for long.
Interestingly, the box seems to get faster as I use it. When I first started playing with it, it seemed to take forever for a new terminal window to pop up. Now it's (subjectively) quicker. The CDE seemed definitely quicker than GNOME, but that's not too surprising given that it's been out longer (I remember using it HP workstations back in the mid-90s). The GNOME environment is no slouch, though. I first used GNOME back with it first came out, when I was running RH5.2 with (I think) the 2.0.36 kernel. It was usable, but I eventually switched to Enlightenment. Then I dropped Linux for good and went over to NetBSD and never looked back. I hope Solaris works out.
I got Apache started, but I think I'm going to see what the Sun application server has to offer before I go much farther down the infrastructure setup route. I'll probably wind up installing all kinds of stuff (Tomcat, JBoss, Resin, Jetty) before I'm done, but I'm going to start out with the Sun suite and see what the creators of Java have managed to do. I have a feeling I'm going to be downloading Eclipse sooner rather than later, though. It's like vi -- my fingers know it too well to leave it behind for long.
22 September 2005
Open mouth, insert bullet, close
Well, I can't take it anymore. I ordered a 19" LCD monitor from the Dell Outlet for $318 (+ $36 s/h), then found one with almost identical specs at the local Sam's Club for $349. Works out to be a little more expensive with tax, but I don't have to wait a week and a half for it to be delivered. I forgot, this is the reason I went with a Gateway 7330GZ from Best Buy instead of the Dell Inspiron: I needed a laptop quickly for a trip, and Dell couldn't ship fast enough. I dunno, this build-to-order, just-in-time inventory thing seems to be working for Dell, but they're not getting me as a customer because of it. Nothing against them, they just can't cater to the instant-gratification crowd. Oh well, they do seem to handle order cancellations well.
One thing I am happy about, though -- it's time to fill the Honda again, and I finally broke 50mpg average for a tank. This tank, I've averaged 51.4mpg; not bad, considering when I was commuting to Omaha every day (70 miles at 75mph each way) I was lucky to keep it above 40. The sweet spot seems to be around 55mph, where it indicates ~80mpg, but it seems to get 60 or so at the 30-40mph I spend most of my commute at.
One thing I am happy about, though -- it's time to fill the Honda again, and I finally broke 50mpg average for a tank. This tank, I've averaged 51.4mpg; not bad, considering when I was commuting to Omaha every day (70 miles at 75mph each way) I was lucky to keep it above 40. The sweet spot seems to be around 55mph, where it indicates ~80mpg, but it seems to get 60 or so at the 30-40mph I spend most of my commute at.
21 September 2005
Be Careful What You Wish For
Well, synchronicity makes its typical play again. The same day I whinge about my lost-in-limbo Ultra 20 workstation, it shows up on my doorstep. So I drag it inside and unpack it. The keyboard's kind of cheap (I use a Unicomp Classic at work, and an Avant Stellar at home), but it's usable. The documentation's pretty skimpy, but all I have to do is plug in the keyboard, mouse and monitor and add the power and network cables and I'm good to go, right? Well, in an alternate, reasonable reality this might have been so, but this is my life so what comes next is not unexpected: The machine roars (and I mean ROARS) to life, then quickly quiets down as the CPU temperature sensor throttles back the fan on the heat sink. The little system status light turns green, indicating that the POST went successfully. All's good, except I have no video. I should point out that I got the "medium-sized" Ultra 20, which includes 1GB of memory and an Opteron 148 CPU. It also includes an nVidia NVS280 accellerated graphics card, which supports up to two DVI monitors. I don't have a DVI monitor (yet), so I plugged my VGA monitor into the on-board video (an ATI Rage XL chipset). Apparently there's no monitor sensing or anything, video goes somewhere by default and of course, in my case, goes Somewhere Else.
So, in short, I'd like to be terribly impressed by the Ultra 20, but that hasn't happened yet. Right now Plan A is to take the whole thing down to the basement and hook it up to the TV (which has a DVI input), but I still need a cable which I probably will only use once. Plan B is to get a DVI monitor, but I don't have the cash ready for a nice one and I'd hate to get a cheap one and then have to fight to justify replacing it in a few months when I have some cash together. What to do, what to do....
So, in short, I'd like to be terribly impressed by the Ultra 20, but that hasn't happened yet. Right now Plan A is to take the whole thing down to the basement and hook it up to the TV (which has a DVI input), but I still need a cable which I probably will only use once. Plan B is to get a DVI monitor, but I don't have the cash ready for a nice one and I'd hate to get a cheap one and then have to fight to justify replacing it in a few months when I have some cash together. What to do, what to do....
20 September 2005
What I Want
All I want is a kind word, a warm bed, and unlimited power. -- Ashleigh Brilliant
Power corrupts. Absolute power is kind of neat. -- John Lehman, Secretary of the Navy, 1981-1987
Money, power, fame & fortune. All of the power and none of the responsibility. The same things that everyone wants -- well, if you're an angsty teenager, anyway. For those of us in our post-formative years, this seems excessive and short-sighted. Again, perfect if you're an angsty teen.
Right now, I'll settle for delivery of my Sun Ultra 20 workstation. I ordered it back in June (June! It's the middle of September! Where is the...expletives fail me...thing?). I'm actually on rev 8 of my angry letter to Sun regarding order fulfillment and customer communication, I'll probably put a little polish on it as soon as my workstation finally gets here (how many "t"s in "wretched", anyway?) and send it off with a note to "share and enjoy". I mean, seriously, I understand about pre-selling, and I understand that Sun probably isn't used to dealing with one-off, low-margin customers, but come on! I was never notified when the systems became available, I was never notified when my system shipped, and there was a mysterious hold on my order that was never explained to me. Is this any way to do business? All I have to say is, I have a 90-day return policy, and if this system doesn't rank right up there with sliced bread and shared libraries, it's going right back in the box.
Power corrupts. Absolute power is kind of neat. -- John Lehman, Secretary of the Navy, 1981-1987
Money, power, fame & fortune. All of the power and none of the responsibility. The same things that everyone wants -- well, if you're an angsty teenager, anyway. For those of us in our post-formative years, this seems excessive and short-sighted. Again, perfect if you're an angsty teen.
Right now, I'll settle for delivery of my Sun Ultra 20 workstation. I ordered it back in June (June! It's the middle of September! Where is the...expletives fail me...thing?). I'm actually on rev 8 of my angry letter to Sun regarding order fulfillment and customer communication, I'll probably put a little polish on it as soon as my workstation finally gets here (how many "t"s in "wretched", anyway?) and send it off with a note to "share and enjoy". I mean, seriously, I understand about pre-selling, and I understand that Sun probably isn't used to dealing with one-off, low-margin customers, but come on! I was never notified when the systems became available, I was never notified when my system shipped, and there was a mysterious hold on my order that was never explained to me. Is this any way to do business? All I have to say is, I have a 90-day return policy, and if this system doesn't rank right up there with sliced bread and shared libraries, it's going right back in the box.
Subscribe to:
Comments (Atom)