Posts Tagged Sensorium
I have returned. And I am bored…
Posted by Aaron in Random ramblings on January 17th, 2010
As the title says: I am bored. Boredom is the only real reason I update this blog anymore.
This post will be about whatever comes across my mind. Therefore, expect random topic changes.
My Desktop PC
My parents don’t like it. “It uses so much power…” They’re right, at least in part: I tend to leave it on overnight in order to take advantage of our 60GB of off-peak quota, since I could (if I really tried) burn through our 60GB peak in 2 weeks, or so. The specs of the system don’t help, either:
- Gigabyte P35-DS3 motherboard
- Intel Core 2 Duo, overclocked from 2.33 to 3.5GHz
- 4GB of G.Skill DDR2 RAM, overclocked from 800Mhz to 1GHz (in order to get the CPU above 2.8GHz)
- 512MB Sapphire Radeon 3870
- 4 Western Digital Hard Disks:
- 1 x 80GB (IDE)
- 1 x 320GB (SATA)
- 2 x 640GB (SATA)
- Pioneer 20x DVD burner (SATA)
- 600W Coolermaster PSU
- Logitech G15 Keyboard
- Logitech G5 Gaming Mouse
- Logitech Cordless Rumblepad 2
- Logitech Dual Action
- IBM Model M Keyboard
- Samsung 22″ Widescreen LCD Monitor
- Some old, Dell-branded 17″ CRT from 1997
As you’d probably expect, that PC uses a fair amount of power. However, for a 2-year-old PC, it doesn’t perform too badly when gaming.
There are, of course, other ways to do offpeak downloading, but they are not without their own problems. My laptop doesn’t really have enough free space for me to fill it up with torrents while I wait for them to seed and setting the desktop to shut down after completing its downloads doesn’t really reduce its power consumption by all that much.
What I really want is a nice, small, quiet, Intel Atom-based, mini-ITX form factor PC that I can use as a storage server, and downloader. The prices aren’t so great at the moment, however, with the Aussie dollar weakening against the US.
Clacky Keyboard
While I definitely would not consider myself a “keyboard enthusiast”, I still consider my IBM Model M keyboard to be second-to-none in terms of typing feel. I bought it for the bargain price of 50AUD and it even came with a matching IBM PC for free (or that’s the way I see it). While that PC has long since been retired to the attic, the keyboard remains. The only reason I keep the Logitech G15 is because I use its USB hub, and its screen is useful in certain circumstances (the media display is quite handy, for example)
Music
Some soundtracks that I believe are completely awesome:
- Naruto, especially Shippuuden. Current-day rock, metal (and some other genres) blended with traditional Japanese instruments makes for some extremely epic music.
- 3 Key visual novels: Air, Kanon and Clannad. The soundtracks are so good, they’re used as the soundtrack in the (gorgeously animated) Kyoto Animation adaptations
- Final Fantasy. Especially VI and X (though that might be because those are the two I’ve played the most). The Black Mages have some extremely good (progressive/power metal) arrangements too.
- Jade Empire, Mass Effect, Dragon Age: Origins. Epic soundtracks that seem perfectly suited to each game.
- Beyond Good and Evil.
- Serial Experiments Lain. While not an epic soundtrack, the soundtrack is so perfect that whenever there is music playing, it’s almost unnoticeable, or is exactly what you’d expect at that point.
- Full Metal Panic! and Full Metal Panic! The Second Raid.
Sensorium
Sensorium is an app I am currently developing for a specific purpose. Once I get that mini-ITX PC, I plan to mount it inside my current desktop’s case, with a 7″ LCD mounted in the front, displaying the desktop’s internal sensors’ values (temperature, fan speed and voltage). The problem, I discovered, is that there is no way for the mini-ITX PC to access this sensor data directly.
So I set myself a task: to write a piece of software to send it over ethernet. The requirements were these:
- The server had to run on both Windows and Linux and retrieve all available sensor data
- The client had to run on Linux, at least, and be able to receive and display the sensor data
Of course, the problem was the first point. The client could easily be cross-platform, but there is no cross-platform way of retrieving sensor data. Linux has libsensors, at least, but in Windows, there is no standardized way to access the sensors. I have overcome the Windows problem by using SpeedFan’s shared memory, which provides the sensor data.
Sensorium was initially programmed in Java, but some severe limitations appeared: the native DLL I was using had to be compiled for the same instruction set as the JRE the app was running under (ie. 64-bit DLL for 64-bit JRE, 32-bit DLL for 32-bit JRE). Upon discovering that C# had something similar to, but much easier to use than, Java’s JNI, I decided to start from scratch in C#.
C#’s P/Invoke is much better than Java’s JNI for two reasons:
- There’s no need for any helper DLLs, meaning I can code the entire app in C#, as opposed to Java and C++
- Coding entirely in C# (and therefore compiling to MSIL), means no need for separate 64-bit and 32-bit libraries
Even better, I discovered that P/Invoke also works in mono (on UNIX OSs) meaning that, again, there would be no need for helper libraries, that I could code the entire app in C#, and still have it cross-platform with minimal to no differences between platforms.