The Caffeinated Penguin

musings of a crackpot hacker

BattleTech

| April 29, 2005

So, I started work on my BattleTech Mech design app today. Originally, I was going to store all the various tables as XML and then suck them in as a bunch of DataTable objects populating a DataSet. No big deal, right? Well, I got them to load, but since my various widgets are dependant on that data, I needed to do things like get Min and Max values for a certain column. Something like this should have worked (quick and dirty proof of concept test):

Console.WriteLine(Chassis.Tables[“chassis”].Select(“Min(weight)”)[0][0].ToString());

Should select the minimum weight from the “chassis” table . The [0][0].ToString gets the first column from the first row and converts it to a string. Now:

Console.WriteLine(Chassis.Tables[“chassis”].Select(“weight = 20”)[0][0].ToString());

works just fine. But not the above. It throws an error of:

Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.

I don't know what it's trying to cast that it's getting angry about (the string perhaps?), but I tried to get it to work for about two hours with no luck. It's either a bug in mono or I simply can't do what I want to do.

So, I've implemented it as ArrayLists for now, but the inefficiency of it kind of grates on me, so I might just do a bit of hackishness to compensate for the lack of Min/Max and write a function that iterates through the data set to get the current min and max (this data is NEVER changed by the user inside the application, so I can get away with this approach).

Of course, anyone who has any other brilliant ideas is welcome to suggest away.

Battletech woes

| April 26, 2005

Okay, so now that my computer list has gotten shorter (and I'm getting bored with that), I'm back to focusing on gaming.

Specifically, I want to start playing Battletech. This is one of those games that requires a bunch of record sheets, and a way to generate them. Problem is, the software out there for generating these is a bit lacking, for one reason or another.

HeavyMetal Pro is the FASA/WizKids approved product for generating all kinds of sheets. Problem is, the sheets are ugly and the interface is kind of convoluted and overgrown (and badly in need of a redesign). I could handle the kludgey UI; it's the ugly sheets that get me (specifically, the “frankenstein” mech as opposed to the “pretty” anime-style mech that everyone else uses for their generators.

BattleMech Designer This one produces very nice sheets (though the font sizes for certain things could be larger). The problem with this one is that the progress stopped at Level 2 tech (current tech is level 3). The developer hasn't worked on it since 1999 and doesn't sell it or otherwise seem to derive revenue. However, he won't share the source code (I asked).

The problem here is that my immediate reaction is to write a .NET app in Mono using GTK# (winforms isn't there yet). That way, anyone can run it and all is good. Make sure the rules validation and equipment lists are in something easy for folks to modify (I'm thinking XML) and life is easy. However, that would represent a lot of time, and I want to game right now, not code.

I'll probably shelve this and use HeavyMetal until I get fed up with HeavyMetal or have an itch to code again. However, if someone else knows of someone who has a not-sucky mech design package looking for a code port / migration / maintainer, by all means let me know.

Why KitchenAid rocks

| April 22, 2005

1.) They make really solid, over engineered products.

2.) They stand by them.

Example of #2

  • Lizzy buys me their best coffee grinder as a gift. It's about $200, and solid. It weighs something like 20lbs.
  • The beans have issues feeding from the hopper; they bind up.
  • So, I email the customer service people and and mention this to them, and that they might want to consider redesigning it and issuing a “fix it” kit.
  • What do they do? They say: It is a problem. We've fixed it. We'll UPS Ground you a replacement. Pack the original in the replacement's box and UPS will be back to pick it up in a week or so.

Now, that is real customer service. They were nice, no hassle, no bother. They didn't even ask me for a credit card in case I was scamming them or something. I paid a premium for it, and I expect this level of service.

Not like this apartment complex, where we pay over $1800/month in rent and they are now giving us a hassle because they want us to pay with 1 check instead of 2.

Updated website

| April 22, 2005

So, I've done phase 1 of my updated website. People are encouraged to visit and comment / suggest improvements.

Link for folks who don't know it.

List of improvements to be made:

  • I want to make the scripts page into a bunch of tables, and maybe break it into a bunch of different pages by category, and also an “all”. I'll probably break the tables out to different files and then just include the right blocks depending on what the user chooses, or something like that.
  • I want to make the menu better. Probably with some nice png bullet that makes a bunch of lines connecting the meny. Maybe expandable/collapsible if I can find a way to make it not crappy.
  • I want to provide a visual indicator as to where you are on the menu; perhaps a little chevron or something.

I guess that's it for right now on that.

Oh, and while I was configuring the CoreAudio plugin for xmms, I found this wonderful bit of output:

checking for white_boys in -lFunkyMusic.so... no
Warning: You may not have enough white boys to play your funky music.
         Please obtain additional funky white boys.

Wheeee…

DV + Math

| April 20, 2005

Okay, if I do my math correctly, we learn that:

  • 1 hour of DV = ~ 12GB = ~12GB/hour data transfer = ~3.5MB/sec. And that:
  • 100mbit/sec = 12.5MB/sec

Subtracting at most 50% TCP+SMB overhead, that gives us >6MB/sec.

Which means that, in theory, I should be able to stream DV from my Mac to my core SMB server without issue.

I also put the Mac and server on the same Gigabit switch. The switch should be able to handle the throughput without issue, and this reduces the number of hops required to get there.

I tried this with 2 minutes of video and it seemed to work. There is no “dropped frame” counter that I can find in iMovie, so I'm just doing it based on perception.

The whole reason for this is because I need to capture from 6 hours of video tapes that I'm not sure are 100% full, and are full of lots of camera gaffes and such. This allows me to grab each as one big capture, chop out the ooky bits, and then make DVD's of them in the most efficient space allocation possible.

Opinions/comments?

Kino vs. iMovie, Hoary upgrade, and more on the Mac…

| April 17, 2005

Okay, first, Kino vs. iMovie HD. Kino notes/discussion:
  • I turned left “auto split files” on, but set the size to 0. This splits files when the camera is started and stopped, but not on any file size, which is useful.
  • I did have a problem where the screensaver activated and, when I wiggled the mouse, Kino’s window wouldn’t redraw. However, this was not repeatable.
  • I tried to use my PowerMate as a jog dial, but I had no luck.
  • As I mentioned before while running Gentoo, DV import seems to be broken on SMP systems under 2.6.10. It is less broken than while I was running the Gentoo sources – I can at least see the device attached to the bus now, but I can’t seem to get a video feed out of it. I might play with it some more, but considering it “just worked” under Warty’s 2.6.8 kernel, I think it’s not going to be fixed short of a kernel upgrade.
iMovie notes/discussion:
  • I had to copy the PowerMate settings from iMovie to iMovie HD.
  • iMovie disables the screensaver during capture; I like this.
  • In the File -> Share menu, there is an iDVD option that lets you only export certain clips to iDVD, rather than the whole project. This allows you to grab, say, 6 hours of home movies, chapter them up, then export 2 hour chunks as individual iDVD projects (or so goes the theory, I haven’t tried).
  • The nondestructive editing sounds great, in theory, until you realize that it wastes a LOT of space. Basically, it tries not to modify the captured DV files, EVER, which creates this problem that even the stuff you edit out is still on your hard disk. This is kind of annoying, considering that it can end up wasting a lot of space, if you’re not careful with how you capture stuff. If anyone knows how to force it to rewrite the DV file, with only the bits I want to keep, I would very much appreciate it.
Okay, so now I’m running Ubuntu Hoary. Notes on that:
  • As mentioned above, DV is broken
  • /dev/dvd and /dev/cdrom links are no longer created. I consider this to be a very bad thing, since so many items depend on these being in place. To fix this, edit /etc/udev/cdsymlinks.conf and uncomment the appropriate lines (the file is well commented). Then, link /etc/udev/cd-aliases.rules into /etc/udev/rules.d
  • Suspend/resume is now implemented and works pefectly on my laptop, with a few caveats. They are fully documented here, but condensed below:
    1. The ATI binary drivers (fglrx) break when you try and resume from suspend. This is ATI’s fault, not the kernel maintainers’ or Ubuntu’s. The solution is to use the free drivers, which limits me to 2D only because 3d on the FireGL doesn’t work yet.
    2. Edit /etc/default/acpi-support and uncomment ACPI_SLEEP to enable suspend to RAM
    3. Edit /boot/grub/menu.lst and find the #kopt= line. Add resume=/dev/hdaX (where hdaX is your swap device). Then run update-grub, which will rebuild the grub list with the revised kopts.
  • It would be nice if there was a generic wireless configuration app that worked well. There are a couple, but they are either gnome or KDE specific applets, or limited in some way (the generic KDE one is limited to 4 wireless configurations; not nearly enough)
  • The Ubuntu maintainer removed the XOSD support from tpb, so I had to grab the debian package for it. This is all detailed here.
More general Mac notes:
  • I switched from iTunes to XMMS. This has nothing to do with iTunes, it is quite a good program. However, I use XMMS on my Linux boxen, and all my playlists are in that format, which iTunes doesn’t read. This is what I did to get it working:
    1. Install the XCode tools (you need them to compile the OSX output plugin
    2. Get glib, gtk+, and all the xmms stuff via Fink.
    3. Get the XMMS OSX output plugin. Configure it with –prefix=/sw, then make and sudo make install it.
  • I found a way to make shell scripts click-on executables; you chuck a .command extension on them. Ironically enough, this was documented in my friend Brian’s book.
  • Given the above, I’m annoyed with the standard BSD tools (the behavior of ps and lack of a pkill). Basically, I need to get the pid of a (possibly) running process and kill it. So, I’m going a ps aux | grep ssh | grep -v grep | sed.. And I’m working on the right sed string to give me just the pid. I know regexps, I just don’t know what the syntax for sed is. Oh, and the second grep gets rid of the grep which shows up in the list when you’re grepping for ssh.
  • It takes the mini about 3 hours to encode an hour of video for DVD. This is not too shabby.
  • iDVD 5 does not include the themes from previous versions. This is kind of a shame because iDVD 4 had a lot of nice themes. So, bear that in mind if you have iDVD 4 and are looking to switch boxes – make sure to back up those themes first.
  • Oh, and you can open up x11 apps from the command line with the open-x11 command.
  • Now, all I need is to get the stupid xterm to not open when I start X. I think if I make an empty xinitrc, it will work.
Other stuff:
  • I got my new KVM. It’s nice. It has OSD and front panel buttons which gives me much happiness. There is a slight issue with the PS/2 to USB KVM cables which I’m trying to run. Namely, the new KVM probes for connected machines, which causes it to get an intermittently false signal bouncing off the circuits in the cable. It works fine if the cable is actually plugged in, but when it’s not, the KVM gets confused. So, I ended up cascading my 2 KVM’s, connecting the old KVM just like another machine to the new KVM. Since all it’s used for is to connect “transient machines” (those which are not permanently connected), it’s not that big a hassle. Indeed, it exends the distance machines can be from the core KVM by about 6 feet, so that makes my life easier.
I guess that’s it for now. I’ll have some random pics soon, too.

The verdict on ruby on rails

| April 10, 2005

Well, it looks completely wonderful. However, you basically have to be able control the webserver to a degree that most hosting companies aren't comfortable with. Basically, it seems to want to be either VHosted, or Aliased to where you want it. I don't have that luxury – it has to be in a subdirectory of my home directory.

Also, my hosting provider doesn't have the necessary libraries for rails anyway.

So, while Ruby might be great for real business use, and therefore I might pick it up later to hack around with, it doesn't help me with my need to redo my website. See, I have this TODO list. Once everything on the list is done, then I'll invent more projects. However, right now, the following is in the list:

  • web site
  • Backup howto
  • UPS monitoring
  • dar -t to test archives

Quite a short list, but still needs doing…

Apple update

| April 9, 2005

Okay, so the Mac is almost done being set up. There are a couple things left, and I'll get to those later.

First, it looks like ps2pdf is broken under Ubuntu Hoary. I've filed a bug report. I'd appreciate if people can try it on their systems and see if it works or not.

Second, someone has found a legitimate OSX local root compromise. Basically, a trojaned app could run, wait until it sees a call to sudo go off, then executed something itself. Congratulations on finding a legit vulnerability in OSX, as well as every other Unix distro using this mechanism. It's not a new thing. This has always been the problem with sudo when set up to run things in a desktop context (when running from the terminal, it can be locked to the terminal).

Anyway, installed bits: DoubleCommand – Since I’m running the Mini off a PS/2 KVM with a PS/2 -> USB converter cable (the only such conversion I’ve ever found that actually works), and my keyboard is a standard 101 key PC keyboard (no Windows keys), I don’t have a command (open apple) key. This creates a decided problem. So, DoubleCommand lets me remap Alt to Command (which is actually in the same spot as Command is supposed to be). It also has the side benefit of changing it so that the Home/End keys work as they do on PC’s. Apple’s X11 – This was not included on my Mac Mini’s install DVD (at least, not that I could find), so I needed to download it. Gimp.app – This is one of the many Gimp packages for OSX. It requires X11, and works just fine with Apple’s. Mozilla Thunderbird – Because Mail.app behaves very strangely when dealing with IMAP+SSL. It’s supposed to be a lot better in 10.4. We’ll see. Mozilla FireFox – Note that this one was a little special. As explained in the article, the stock FireFox doesn’t use the right input handler API, which is why it doesn’t handle middle-click properly. The poster fixed the issue in his patched version of FireFox. Also note that this is only installed for compatibility with my other machines – since all my bookmarks are in FireFox’s HTML format, and Safari won’t import them, the only nice way to get access to the bookmarks is to install FireFox. Sure, I can open the bookmarks in Safari, but that’s just ugly. However, Safari is much faster on OSX and therefore remains my default browser. Hopefully, Apple will add an “import bookmarks” feature. Neo Office – This is a native port of OpenOffice, which doesn’t require X11. XJournal – LJ Client. Works nicely. Fink and Fink Commander – Apt-style packages for OSX. Haven’t done much with this yet, except installing Gnome and KDE and then removing them when I scrapped my 2 desktop idea because it was taking too long. Destop Manager was the one who told me about this. Anyway, it provides multiple desktops and cool switching effects. QuickTime Ogg Component – So I can play Ogg files in iTunes. Things I considered installing and didn’t, or tried and removed: iTerm – It was nice, but I didn’t see why this was so much better than Apple’s stock terminal. So, I removed it. DarwinPorts – I was actually going to install this to get XFce (see the XDarwin discussion, below). Then I saw that there wasn’t an installable package and that I was going to have to get it from CVS and that it was basically going to be more trouble than I cared for. XDarwin – Thanks to for this one. It’s actually REALLY good. You can executed as a full screen session and flip between (you’re supposed to be able to do this with Apple’s X11, but I haven’t tried). Anyway, I was originally going to try to have Cocoa and X desktops running in parallel and flip between them. The problem with this was that Fink didn’t have an XFce package. I did get KDE and Gnome running just fine (it was trivial to install), but as I worked on this problem, I started to care less and less, especially since my Linux desktop is just a KVM flip away. Problems fixed – I wanted to make an icon to mount the network shares on my core server. I finally figured out that a nice way to do this is to mount it by your favorite method, then right click and choose “Make Alias”, then drag the alias to the dock. But, it has to be on the part of the dock next to the trash, where you can drag documents and stuff. Of course, this led me to the document explaining the Top Nine Reasons the Apple Dock Still Sucks. Bear in mind that this guy was “Apple Employee #66, Apple’s first Interaction Designer and only Human Interface Evangelist”, so not just some random crank. (Well, maybe a crank, but not random). I think he’s right. Problems needing fixing – My local DNS is broken. My WRT54G serves out DNS names for itself and all machines in the house. The Linux and Windows machines have no problem with this. The macs seem to hate it for some reason. I don’t know why and have to look in to it, and just haven’t yet. Of course, it means that printing is broken until I do. – I need to figure out how to make an entry for the dock that launches a script. – I need to figure out how to make additional bins/drawers/folders/menus/etc. to contain less frequently used icons. You know, click drawer, click icon, drawer closes and app launches. Misc opinions and thoughts – The fact that you can’t shift+home or shift+end to select text in an input box in Safari really pisses me off. – Finder’s behavior in accessing FTP sites is annoying. I wanted to get a pile of stuff and ended up just doing it in a terminal because copy/paste wasn’t working. I could have drag & dropped it, but that would require opening 2 finder windows (one for the FTP site, and one to navigate to the desired target folder). Conclusions – This is not going to replace any of my Linux machines (they’re just too “set up exactly perfect” for what I want. – This does have a lot of really good applications that I want to use (which was why I bought it). Also, I haven’t made much progress on Linux/Mac video comparison (been busy), and since I want to actually get some video projects done, I think I’ll do them in iMovie and go back and do the comparison when I have a chance.

Hoary upgrade notes and coffee

| April 7, 2005

HowTo: https://www.ubuntulinux.org/wiki/HoaryUpgradeNotes There is not an easy “apt-get install hoary-upgrade”, but it should get easier for Breezy.

Very Impotant notes if you used the backports repository: http://ubuntuforums.org/showthread.php?t=12174

Official backports homepage (you need to change warty -> hoary backports, and this is the place to get URLs: http://backports.ubuntuforums.org/

Also note the new power management stuff (good for laptops): https://www.ubuntulinux.org/wiki/HoaryPM

Okay, coffee stuff: The new coffee maker definitely produces coffee with a crisper, cleaner mouth feel. I don't know if this is a result of the new coffee maker's water filtering, or lack of the AromaControl's bimetallic coil steeping apparatus. I expect it's the latter, because it's got a mild “french press” mouth feel. However, this difference is not a bad thing – the crisper flavor from the new coffee maker really brings out the flavor in flavored coffee, and brings out different aspects of different blends. In a light/dark blend, for example, the highs in the lightly roasted beans really pop more than in the old coffeemaker, where they'd get killed by the lows in the dark roasted beans.

So, not good or bad, just different. Personally, I like the more velvety mouth feel from the french press, but then again, I have a french press – I don't need a drip coffee maker to make coffee like that from the french press.

The passing of an era

| April 5, 2005

So, the Krups Aroma Control coffee maker has been retired, because it's gotten quite scummy and no amount of cleaning and descaling seems to get rid of it (there's floaty things in the reservoir). So, we were at Macy's today, buying Liz's new table, and a Krups FMF4 was on sale (25% off) plus we had gift card from my friend Maurice, and Liz had gotten a Macy's credit card (to get 10% off her new table, which was nothing to sneeze at considering that what she saved paid for the delivery fee). Anyway, so we got this new coffee maker.

Differences:

  • The new one has a water filter (because our water here is crap)
  • The old one had a bimetallic coil in the basket that would allow the coffee to steep a bit before opening up to drainm giving it an almost “french press” style mouth feel. At least, that’s what it was supposed to do. Owning a real french press, it doesn’t really come close. So, I question whether it really makes a difference. We shall see (I’m not going to make coffee tonight to try it).
  • Both have double wall stailess steel carafes.
  • The handle design for this one is better than the old one. See, the old one had 2 attachment points – studs soldered on to the outer wall of the carafe. However, since you had to apply a lot of torque to open the top, I ended up snapping the studs off. This one uses a locking lid (rather than screw on), and the handle is attached to bands which run around the carafe. Hopefully it will be better.
  • The old one had an odd pour spout. It was a wide arc which was supposed to be no drip; which it was. However, it ended up not always going into the mug where I wanted it. This new one is a more conventional spout-style design, which seems to have superior pouring characteristics

Oh, and a followup on the KitchenAid professional burr grinder:

  • It definitely has less grind adhesion to the container than my old capresso burr grinder
  • You can taste the difference in the coffee (definitely tastes better out of this grinder).
  • The feeder needs to be redesigned. The beans almost never feed properly, and you have to poke them. The problem is that the angle of the input hopper is too shallow (kind of flattened on the bottom) where it needs to be a steep cone design. I’m going to send KitchenAid an email about it. Hopefully they’ll fix it and sell a retrofit kit.

Anyway, for everyone who had coffee from the old coffepot, come on by and grab a cup out of this new one!