Error free since 03:14:07 UTC January 19, 2038.

October 20, 2008

TSA agents commit crimes

Filed under: misc, kinda maybe funny — Dave @ 9:36 am

Notable if only for the size: TSA agent steals $200K worth of gear, resells it on eBay

…one agent had single-handedly absconded with over $200,000 worth of travelers’ belongings, primarily cameras and laptops… travelers have no real means of protection when it comes to guarding against inside job thievery like this.

I’m going to assume that the amount stolen by a given TSA agent is a poisson distribution, so though I expect this agent is an outlier in terms of magnitude, he reflects a general laxity towards employing criminals in the TSA. To be fair, security is hard, and a job riffling through other people’s things with near immunity is going to attract thieves.

But to be clear, there’s something deeply disturbing about being treated like criminals by the TSA every time you fly through the USA, when the TSA employs criminals.

/grumpy.

Update (Nov 20): A helpful reader writes in to point out that air marshals are worse.

July 23, 2008

Laptop Hack: Mute My Sound When I Change Rooms

Filed under: misc — Dave @ 9:40 am

I drag my laptop between different environments pretty often, and it’s a hassle to remember that what was appropriate in the hotel room isn’t always on the plane — you can get your head out of the gutter, I’m mostly concerned that I left music or a movie playing.

Solution:
I created a task (This is all in Vista, but I’ll be upgrading to XP anydaynow, so I’ll verify that it works there) that is triggered on log-on, start-up, lock and unlock that runs “NirCmd mutesysvolume 1″. NirCmd is a little 29kb app that can change things from the command line (the software seems safe after a causal googling, although it’s sometimes included in viruses because it’s useful).

Making a new task is so straightforward I won’t go through it in detail:

  1. Launch Task Scheduler, if you can’t find it, just run “%SystemRoot%\system32\taskschd.msc /s”
  2. Make a new task (Mine lives in the Microsoft folder since I had trouble making a new folder) that triggers on “log-on, start-up, lock and unlock” those are probably your best options
  3. Make an action that “Starts a program” point it to NirCmd with the arguments “mutesysvolume 1″
  4. Save it and you’re good to go.

I was going to include the exported XML of the task, but importing is almost as complex as making it yourself, the paths are hard coded and it also runs my really simple logging batch file for testing “LogSomething mute muting.txt”.

Addendum: LogSomething.bat

@rem Syntax: LogSomething Event File
@echo off
echo %1: ------- >> %2
date /t >> %2
time /t >> %2
echo ----------- >> %2

July 11, 2008

56 Megs for 5 words

Being a Vista user, I’m used to getting smacked in the face, and yet even I was curious when Vista wanted to download a 56 megabyte update — is it installing something completely new?

Massive download

So naturally I checked out the Knowledge base article:

The words “Friendster,” “Klum,” “Nazr,” “Obama,” and “Racicot” are not recognized when you check the spelling in Windows Vista and in Windows Server 2008

Oh, noes! That’s serious indeed. And worse: it applies to such critical applications as Windows Mail! — The Office apps seem to “correctly” accept all of these words.

So to re-iterate, 5 words weighing in at 34 bytes compresses down to 56 megs. Giving a compression factor of ~10^jeeze-louise-people!

Seriously guys, I don’t want to hear any more about how XML adds a lot of overhead.

p.s. I’m pretty sure I know why this happened. The PM in charge of this had two choices: EITHER have a dev write code to do a diff, and get an SDET to test it which could take a long time, and get slagged in the .01% of cases where something goes wrong OR just throw resources at it, in this case the bandwidth of millions of people. It might have actually been the right choice from their perspective, but it betrays some poor design somewhere.

p.p.s. Standard disclaimer: I used to work for the Borg as a PM, but I know nothing about this particular team.

July 10, 2008

Using AWK to convert CSV to XML

Filed under: awk, programming — Dave @ 10:52 am

I needed to convert CSVs to XML, so it’s time to return to my text processing hero: AWK.

CSV to XML gets me 90% of the way there, except, it doesn’t actually convert from Comma Separated Values to XML, it uses space to separate values. Updated script:

BEGIN {RS = "\n"
FS = "," }
NR == 1 {for (i = 1; i <=NF; i++)
tag[i]=$i
print "<" node "XML>“}
NR != 1 {print ” <" node ">”
for (i = 1; i <= NF; i++)
print " <" tag[i] ">” $i “
print ” “}
END {print ““}

Notes on cleaning your data:

  • our column headings need to be sane, ie: no spaces or weird characters

  • Numbers with commas, ie “12,231″ won’t work

June 27, 2008

I’m kind of a big deal around the blogosphere

Filed under: Blogroll, kinda maybe funny — Dave @ 7:01 pm

Apparently Ta-Nehisi Coates and I have a psychic link, because we have the same thoughts at the same time. But don’t take my word for it, take the words I cut and pasted from our conversation:

D: … “Study shows blacks don’t share similar views of world”…. Now I’m not sure what I feel, but seriously — that 39 million people don’t all agree is headline news? This needed studying rather than talking to 2 or more people? ….

T-N C: “haha! yeah you had about the same reaction i would. i’m posting about this right now.” [same link as above]

D: “I look forward to it. But I have to warn you, some whites may not. I’m not sure how well known it is, but often whites don’t all have similar views.”

T-N C: “lol”

June 21, 2008

Scratch (goto considered impossible)

Filed under: toys, programming, kinda maybe funny — Dave @ 3:26 am

I spent an hour or two playing with Scratch a programming environment for kids. It’s infuriatingly difficult to re-use code (there are no functions for instance), no arrays, no network connectivity, and no external files.

But isn’t this awesome? (use the arrow keys to drive once it has focus, the green flag may start it)

Scratch Project

May 26, 2008

Guitar Poser (first pass)

Filed under: misc, toys, kinda maybe funny, ideas — Dave @ 2:43 am

Here’s something I wanted to see exist. Rather than yet another Guitar Hero clone, this is a guitar emulator… sort of.

Start it up with your USB Guitar Hero controller plugged in (as the only Joystick), and there you go: from guitar hero to guitar poser.

  • Strumming causes a note (obviously)
  • Pressing a single key gets you regular notes, A, B, D, E and G. Pressing several keys at a time gets you some chords, chosen pretty much at random from the ones available at the freesound project
  • The whammy bar controls how quickly notes fade out once you’ve unstrum
  • The volume is controlled but how vertical the neck is

Awesome Screenshot

Check out those wicked graphics! Seriously though, try it out.

The samples are huge so the ZIP is 27megs: GuitarPoser.zip.

May 15, 2008

What’s the deal with Drivers?

Filed under: misc — Dave @ 6:30 pm

I love working in the software industry: it moves fast because copying the right solution is easy, so we don’t spend forever re-inventing the wheel (or at least that’s the ideal).

So why in this day and age am I still having trouble with drivers?

Case in point: I have a Lifecam VX-3000 Download Software, although you’ll have to re-enter the product you want drivers for. Even worse, you’ll need to know whether you have a 64 bit or a 32 bit version of Windows installed, and I know Microsoft employees who don’t know that).

And then watch out! The drivers are trapped in a mysterious LC14.exe which is a mysterious file well north of 100 megs.

On the other hand, there’s the Gyration Mouse I bought on a whim (I was on sale; Bountii has it at $99 right now, but I’m sure I spent under $30). Now this is kind of like a mouse except it uses gyroscopes, basically it’s a weird laser mouse hybrid for nerds from a small company I’ve never heard of — I could understand if the drivers weren’t 100% smooth.

Except they were. And if the autoplay hadn’t worked, all the software I needed was right there on 256megs of memory on the device itself. Which raises two points:

  • Why don’t all USB peripherals have some flash memory? It’s just too useful, and it can’t add more than a pitance to the price (the full units seem to start ar $3 retail, and most of the circuitry is already in a USB device)
  • Why can’t Microsoft branded products work that easily?
  • Bonus issue: A Zune already has 30GB of space on it, but plugging it in gives me the helpful message “This problem was caused by Zune Device, which was created by Microsoft Corporation.” I didn’t even notice the link to the drivers, I just gave up and Google’d them.

So, I repeat, what’s the deal with drivers?

Bountii.com: I don’t make any money from linking to them, but I like the site and John has been known to on occasion let me pick his brain on start-up ideas.

April 21, 2008

Vista, XP and Ubuntu

Filed under: misc, windows vista — Dave @ 4:31 pm

Desktop:
Grr, Vista won’t let me fiddle with my C:\Windows directory. It’s not a security protection though, just a personal distrust so I had to take ownership of the windows directory and give myself fiddling permissions.

Laptop:
Apparently, there is no way on earth to get sound drivers for a Gateway MX 6445 for Windows XP except having them pre-installed from the factory, all the other drivers are hassles: network, wifi. After a few hours down the drain, I installed Ubuntu and everything was automatically recognized and drivers were installed without even needing an internet connection.

Win: Ubuntu.

March 23, 2008

Using a Windows Media Center remote control in Winamp, WMP and Media Player Classic

Filed under: misc, toys, windows vista — Dave @ 4:46 pm

I’m using a Pinnacle Remote Kit (for MCE Certified for Vista USB 2.0 Interface) that was $30 off newegg, and it worked out of the box for Windows Media Center but I want to use other programs. All of this is being done on Windows Vista Ultimate.

Winamp

Winamp takes the cake for compatibility with this remote.

  1. Press Ctrl+P to bring up preferences
  2. From Global Hotkeys, enable default multimedia key support

Media Keys in Winamp

Now winamp will respond to keys whenever it’s running unless another program has focus and wants the clicks for itself (like if you’re running Media Center).

Windows Media Player

I tested WMP first, and I could’ve sworn it wasn’t working, but after configuring winamp, WMP now responds to next, previous, play, pause, stop, volume, mute, back and OK seems to go to the previous file.

Media Player Classic

MPC, everyone’s favourite little open source player isn’t so friendly:

  1. Press “O” to bring up options
  2. Go to Player\Keys
  3. Double click on the “key” entry, so for “Next Playlist Item” click on the string VK_NEXT, it turns into a drop down and you can change it to some of the media keys. The one’s I’m sure of are: VK_MEDIA_NEXT_TRACK, VK_MEDIA_PLAY_PAUSE, VK_MEDIA_PREV_TRACK, VK_MEDIA_STOP but I haven’t gotten play/pause to work correctly.

media keys in media player classic

« Previous PageNext Page »