WHY YES I DO WANT A COPY OF THAT. Sadly, the payload wasn’t even a trojan, just a Chinese-hosted pillz site. The default blocking of images from domains you don’t trust here is good; most clients have it now, and it was clearly developed as a response to web bugs but it also protects one from basilisks. It’s still trivial in the current email protocol to forge a sender, so trust no one – not even yourself.
November 20, 2009
best-targeted spam ever
Posted by Jeremy under blog | Tags: basilisk, blit, david langford, necronomicon, spam |Leave a Comment
November 12, 2009
Too good for just my Facebook friends to know about, this is one of the lesser known perks of working at Microsoft:
Why use Google when the soda locker down the hall is full of these things? Does it quench your thirst? Hell no it doesn’t. But this will.
November 12, 2009
more on: invalid BS_jmpBoot in boot block: 000000
Posted by Jeremy under code | Tags: boot camp, mac os x, macdrive, snow leopard, windows |Leave a Comment
I’ve been getting a lot of comments that say “invalid BS_jmpBoot in boot block: 000000” happens with Apple’s Boot Camp HFS drivers from Snow Leopard as well as MacDrive. The act of assigning a drive letter to the partition seems to cause the GPT corruption. This would seem to make it a Windows issue. I do not speak for my employer in any official capacity, but when my current high-priority tasks are done, I’ll ask around at work and see if anybody knows anything about this issue.
Meanwhile, keep sending in your experience reports! The more data, the better.
September 13, 2009
I like Windows 7. It’s got all the things I liked about Vista (Aero Glass, cleaner-looking user directory structure, better support for multiple network interfaces, more text labels and fewer incomprehensible icons, to start) and it’s got the Dock from Mac OS X.
So it stood to reason that the Media Player that comes with Windows 7, namely, Windows Media Player 12, might be worth another look.
I’ve tried to use Windows Media Player a few times before. I think the last time was when WMP10 came out, back when I was still running XP. It was ugly, glitchy, and liked to freeze for long periods of time for no reason, especially when network shares were involved or the library was much above 20 GB. Once in a while, it would eat its own database and refuse to show anything until I nuked the library database files on disk and reimported everything. Not so good.
Normally, I’d use iTunes, but over the past couple of releases it’s been hard not to notice that Apple is a lot worse at writing Windows software than Microsoft is at writing Mac software. I’ve experienced redraw glitches, funky-looking (i.e. not ClearType) text rendering, general sluggishness, and an inability to turn off annoying things like those go-to-the-iTunes-store arrows which can be taken care of with a preferences editor on the Mac. Also, my iPod 4G finally died. RIP Inductive Satanograph 2004-2009. You’re syncing and charging over FireWire with the angels now… *sniff*
A lot of people use WinAmp, but the UI is like a cheesegrater being rubbed across my corneas. It’s one step above a Taiwanese OEM’s overclocking utility. There are things with command-line interfaces that are prettier and more usable than WinAmp. It’s skinnable, so theoretically there could be a skin out there that fixes this problem, but so far every 3rd-party skin I’ve seen has been worse than the default.
So. WMP12. Been using it for a few weeks now. Turns out it has problems. Big ones.
Tag Support
Surprisingly, WMP12 supports MPEG-4 tags better than MP3 tags. I’m not aware of any published standard for MPEG-4 tags. Tools like AtomicParsley and Mutagen appear to have been built based on inspection of iTunes-tagged files. WMP12 had no problem reading my collection of MPEG-4 AAC music, album art and all (except for the problems it has with all album art, which I discuss below.)
However, it doesn’t support ID3 v2.4 tags on MP3s at all. The word from the WMP team at work is that this is intended behavior, because v2.4 isn’t widely supported. Umm… The standard’s been out for nine years, guys. You should at least be able to read them even if you don’t write them. Why not ask the Xbox 360 team for some code? The 360’s media player can read them. I don’t know if it supports fancy features like replay gain frames (RVA2) but at least it gets title, album. and artist right.
This is not an insurmountable obstacle; downgrading from v2.4 to v2.3 doesn’t cause any problems in my music library. I ended up writing my own Python utility for reading and writing v2.3 tags, because Mutagen won’t write anything except v2.4, and after downgrading (and cleaning up a few screwed-up files with a hex editor), metadata started appearing in WMP12.
Metadata
Unfortunately, WMP12 doesn’t seem to support the ID3 TPOS frame or whatever the MPEG-4 equivalent is. This is the disc number field in iTunes, the one that lets you specify where a track belongs in a multi-disc set. It’s listed as known by the Windows Media Format SDK, but there’s no way to display it in WMP12, and it doesn’t affect sort ordering, so it might as well not exist. Without it, all the tracks on a multi-disc set get zippered together, sorted by track number and then alphabetically:
On top of that, the Advanced Tag Editor is gone, and the Edit context menu option seems to be broken for some data types: I can’t clear a wrong release year, for example. On hitting Return, it snaps back to the previous value.
Album art
I have nice high-quality album art from Amazon, Discogs, iTMS, or the web embedded in almost all of my music files. WMP12 finds it, creates a tiny little downscaled copy, and uses that for album art display instead of the full-resolution stuff in the music file. Then it poops invisible JPEG versions all over the library folder structure (Folder.jpg, AlbumArtSmall.jpg, and friends.) There was a workaround for earlier versions, but it’s gone now. Look at this Now Playing window. Doesn’t the artwork look lonely? And blurry?
Glitches
Every so often, I’ll start WMP12 on my home machine and it’ll go through the entire library and make two entries for each track. They’re pointing to the same file location, so nothing’s being copied, but everything is listed twice. This is infuriating. Sometimes it goes away if I relaunch WMP12. Sometimes it doesn’t. It goes away if I delete the library databases in %LOCALAPPDATA%\Microsoft\Media Player, but it can come back just as easily. Possibly related is that Last.fm’s scrobbler has stopped scrobbling tracks played in WMP12.
Neither of these glitches happen on my computer at work, and the only difference I’ve noted so far is that the Music library at home includes a folder on an external hard drive (which is always plugged in), while the Music library at work only includes the My Music folder. Don’t know what’s going on here.
Conclusions
Man, they’re not even trying any more. Time to reinstall iTunes.
August 22, 2009
I just had my own Wonko the Sane moment, brought on by a toaster. On emptying the crumb tray, I discovered words embossed on the steel, reading “WARNING – TO PREVENT ELECTRIC SHOCK, UNPLUG BEFORE CLEANING.” Somewhere, there is a man who is familiar enough with the intimate operations of toasters to be trusted to write warning labels for them, but somehow doesn’t consider that the words he writes will be (a) covered in crumbs and (b) inside a toaster.
August 5, 2009
had Lucky Swede IV painted on the stern in letters of gold. If it’s so lucky, I want to know, what happened to the first three?
July 31, 2009
I’m not dead, I got a job
Posted by Jeremy under blog | Tags: microsoft, sharepoint |Leave a Comment
When I was working at JPL for the summer a few years ago, we were doing some very cool stuff that I still think will be crucial to the eventual rise of the machines, but our efforts were greatly impeded by the nature of government operations. For example, most of the lab’s computers were on three-year rental contracts from a subsidiary of some defense contractor. We weren’t allowed to replace or even upgrade them. I was lucky enough to have my own workstation, and unlucky in that it was a real dark ages UltraSPARC running Solaris, frequently got tapped to run processor-intensive SPICE jobs for other researchers, and on top of that, was the lab’s web server. The other summer researchers weren’t as lucky. There were two or three modern computers which had to be shared among them, and the only reason the lab were able to get them at all is that some bright fellow worked out that he could get around the computer supply contract if he billed computer purchases as “miscellaneous electronic equipment”.
So, screw academia. I’m now living in Seattle and working for Microsoft on Office SharePoint Designer 2010. I’ve been working on improvements to SharePoint workflows, which are long-running, event-driven background processes. The canonical example is approval of an expense report: an approval workflow can automatically trigger when someone uploads an Excel spreadsheet to a SharePoint document library for expense reports, fish around inside for the total, and process it and mark it as approved in the document library if the total is less than $500, or hand it off to the uploader’s manager for manual approval if the total is $500 or more, and send them a reminder email. The workflow authoring component of SharePoint Designer (aka SPD) is aimed at nontechnical users and is actually strongly reminiscent of the trigger editor from StarEdit, so if you’ve ever made a scripted Starcraft map, you’ll be able to fire up a copy of SPD and snap together your first workflow in about ten minutes. (Actions for recharging your shields or setting your department’s mineral count are not yet included.)
I did an internship with the SharePoint Designer team last summer, when I was trying to decide whether to stay in academia and start planning for grad school, or get out and give industry a try, and I liked it so much that when the team offered me a job at the end of the summer, I jumped on it. My development machines are powered by electricity instead of whale oil, there’s free soda down the hall, and people actually use our product. Exciting times, these.
May 19, 2009
Today’s Left 4 Dead sprays are brought to you by René Magritte. Download and unzip to C:\Program Files\Steam\steamapps\common\left 4 dead\left4dead\materials\vgui\logos\custom\.
May 18, 2009
Unicorn Support Would Be Easier
Posted by Jeremy under code | Tags: linux, mac os x, samba, unicode, xfs |[2] Comments
Unicode has two ways to represent composite characters like accented Roman letters. If you want to write a ü (that should render as a lowercase u with umlaut/diaeresis/two dots over it, if your browser is any good), you can represent it as the single Unicode codepoint LATIN SMALL LETTER U WITH DIAERESIS (U+00FC), or you can represent it as LATIN SMALL LETTER U (U+0075) followed by COMBINING DIAERESIS (U+0308). Since these are, in fact, the same letter, Unicode defines normalization forms for things like comparing and sorting strings. In the NFC form, all composite characters that have a single codepoint representation are represented as that single codepoint; in the NFD form, they are all decomposed into multiple codepoint representations. If you pick a normalization form and stick with it, then you can ensure that ü is always equal to ü no matter which representation it came in with.
If you don’t do normalization, then annoying things happen. The setup is as follows: I’ve got a server machine running Debian 5 Linux, serving files from an XFS filesystem through Samba, talking to a client Mac running OS X 10.5 (Leopard) and mounting the share using mount_smbfs(8). Some files and folders have accented letters in their names. Now, they display fine in Finder directory listings. Problem is, when you click on them, they disappear!
It took some poking around in Wireshark to figure out what was going on. I noticed that the file names being received from the server in directory listings were not the same as the ones that were later being requested: specifically, characters like our friend ü were decomposed in the listings, but composed in the requests. Samba would then report the requested files as missing.
I’m honestly not sure who to blame here. It could be OS X’s fault for not keeping track of received filenames somewhere so it could send out the same ones it got. It could be Samba’s fault for not normalizing incoming requests before looking up files when it’s set to use Unicode. It could even be XFS’s fault: XFS filenames are byte strings and can include any bytes other than the ASCII codes for / and NUL. The Mac OS filesystem HFS+ uses a normalization form that is (almost) NFD, so filenames are stored on disk in one format only, and other representations are illegal. XFS does not appear to do any processing of filenames. It’s actually possible to create two files named “ü” in the same directory, or at least two filenames that display as “ü” when interpreted as UTF-8 byte strings, decoded to Unicode code points, and displayed by something that can handle Unicode characters.
Fortunately, there is a workaround. If Unicode filenames are converted to NFC on disk on the server, they appear to survive the round trip to the Finder and back just fine. Python’s unicodedata module has a normalize() function that makes this pretty painless.
***
update: here’s some working sample code to NFC-ize everything in a folder hierarchy.
import os
import unicodedata
for root, dirs, files in os.walk(u'/path/to/base', topdown=False):
for entry in files:
nfc = unicodedata.normalize('NFC', entry)
if entry != nfc:
os.rename(
os.path.join(root, entry),
os.path.join(root, nfc))
print os.path.join(root, nfc)
rootparent, rootentry = os.path.split(root)
nfc = unicodedata.normalize('NFC', rootentry)
if rootentry != nfc:
os.rename(root, os.path.join(rootparent, nfc))
print os.path.join(rootparent, nfc)
April 13, 2009
Valve’s taking their sweet time to release Left 4 Dead’s mod tools. Meanwhile, I have a hacked-up Orange Box SDK, Sourcemod, and this prototype laser rifle.











