October 5th, 2008

Grado Labs SR-80: RIP

My precious Grado SR-80 headphones died today. :( I hardly new thee.

This picture may not be suitable for small children or those with a heart condition:

Headphones

These headphones sounded really great, best I've ever owned. They should, for how much they cost. But they were designed so so so poorly. The cups can rotate 360 degrees, which means no matter how well you take care of them, the cables from the cups to the Y-splitter will get twisted. Once I realized this I electrical-taped the cables together to avoid some of the twisting, but it didn't help. No matter how carefully I wrapped the cords up and stored them in my briefcase, 10 minutes later I'd pull them out and they'd look like a tornado hit.

Today I plugged them in and the left cup was sputtering and hissing in its death rattle. I immediately put the headphones on life support and performed emergency surgery, but the left wire snapped in my hands. You can only twist copper so many times before it gives. What followed was a good 45 minutes of hacking away at the plastic Y-splitter to get to the wires. But it was no good. I think something broke in the cup too, and that thing is impossible to get apart no matter how much force I applied. I tried heating it up to melt the glue but that didn't work either. I made it hot enough that the working parts are probably a puddle in there.

I'm almost glad this DIDN'T work, because then I'd be wearing that mess on my head for another year. Now at least I can justify possibly buying a replacement.

I absolutely need music while writing code. Depending on my mood, either angry German music or cheerful Japanese music. Foreign-language music seems to be just the right mix of brain-stimulation without the distraction of needing to pay attention to the lyrics. So yeah, I'm now in dire need a of replacement. I have backups but they're the in-ear bud sort and aren't the comfiest thing for an 8-hour session. Plus they cancel noise too well and I can't hear my boss talking to me.

It took me MONTHS of research to find these, but I can't justify buying another set after these broke in a few short years of heavy daily use. I need something sturdy and comfy that sounds really good. I need good bass in particular. Back to the drawing board I guess.

EDIT: Crap, I fixed them. :(

October 5th, 2008

KDE4 disaster

From reading the bug it sounds like KDE4 is getting close to being ready to hit the tree, which is awesome. Foolishly, I decided to try it early from the overlay last night. It was a total disaster. Things were crashing left and right, panels would resize themselves to be fullscreen (with hilarious results), half of my apps didn't work at all. I found three or four ways to bring down the entire X server. It took me many hours to get KDE3 running again. This is totally to be expected from installing masked packages as I did, so it's my own dumb fault, it was amusing and I wanted to get a taste.

I'm afraid it's going to be inevitably difficult or impossible to migrate cleanly from KDE3 to KDE4. I had the same problem in Kubuntu when I tried a while back. KDE is so huge and so many things link to it or interact with it that it's going to take a year to track down and remove all the cruft after the switch.

I couldn't even import my old KDE3 color schemes or Konsole color schemes into KDE4, which was surprising. QtCurve was un-configurable, dekorator didn't work, and so on. I didn't get far enough to figure out if my preferred icon themes work or not. I didn't realize they broke backwards compatibility to that large an extent, but I maybe it's to be expected.

There were other problems that were seemingly due to the lingering immaturity of KDE4. I can see all the pieces there which are going to allow people to do really neat stuff eventually. In the meantime KDE4 feels horrible.

KDE4 fonts look nice though.

October 4th, 2008

Westingouse: Victory

Monitor

It only took seven months, a report to the BBB, 30 phone calls, a half dozen emails, and threats of reporting Westinghouse to the FTC and CA Attorney General, but they finally sent me back my monitor. It's the one on the right there (with the very slightly crappier picture quality).

I must say, 3840x1200 resolution is pretty much a dream come true. I can have Firefox and Vim/Emacs open and nice and big, and still have room for lots of terminals, and maybe even a file manager or two. Multiple that by eight virtual desktops.

As near I can tell, it appears to e a new unit, not refurbished. If it is refurbished, it's refurbished well enough that I can't tell one way or the other, which is fine. However I'm still expecting this one to die too. My first monitor died in such a way that it wouldn't power on at all. This one is running very very hot, which scares me. I give it 3 months tops.

It makes me sad every time another person posts to my blog that Westinghouse is giving them the same horrible treatment. But hang in there. Lessons learned:

  • Don't buy a crappy brand just because it's cheap. I saved $75 or $100 on this monitor compared to a better brand, but it cost me over seven months of anguish (and $25 in shipping fees to send it back to the factory, and I had to buy a replacement!) Cheap things are cheap for a reason: The company isn't paying anyone to support their customers, or it's cutting corners in the quality of the merchandise, or something similar. Is it worth the gamble?

  • Don't buy anything expensive online unless you have a very clear method of getting it replaced if it breaks. Manufacturer standard warranties are evil. Is the time savings of shopping online rather than going to the local big box electronics store really worth it, if you have to pack up and mail your stuff to Zimbabwe for seven months?
  • UPS sucks. Hey UPS, how about if you don't drop off $500 pieces of electronics on a random person's front porch without a signature next time? I hope whoever ended up with my first monitor is enjoying it. (Actually I hope they die in a fire.)
  • Westinghouse sucks. Suffice it to say I won't buy this brand of anything ever again. And neither will my family or friends, who've heard me complain about this for seven months. And neither will many people reading my blog, I hope. Note to companies: Take care of your customers. A new monitor costs you a few dollars, but treating your customers like garbage costs you FAR MORE in the long run.

(Read the whole crappy story of Westinghouse's dishonesty and horrible customer service: The beginning, Update 1, Update 2, Update 3, Update 4, Update 5, Update 6, Update 7, Update 8, Update 9, VICTORY, aftermath.)

September 26th, 2008

Gentoo still rules

The version of akregator I have always displays article link text in an ugly dark blue, which doesn't show up well against my dark Qt theme. I can barely read an ebuild to save my life, and the KDE ebuilds are full of all kinds of odd KDE-specific stuff, but it still took me just a couple of minutes to:

  1. Find the sources in /usr/portage/distfiles
  2. Cludgily patch akregator to use normal text color for links (underlines still distinguish them)
  3. Copy the akregator ebuild into an overlay, throw the patch in there and add one line to the ebuild to read it
  4. emerge away

Et voilĂ , custom-patched, package-manager-managed app. Gentoo is pretty good for this kind of thing, whatever its other shortcomings. Does any other distro make it this easy to do such things? (I'm genuinely curious.)

September 24th, 2008

Westinghouse: It Never Ends

(If you're just tuning in, long story short: I bought a Westinghouse L2410NM monitor November 2007, it broke March 2008, I sent it to Westinghouse (paying for shipping myself), they sent it back to the wrong address and didn't tell me about it for 2 months, I filed a BBB complaint, they didn't respond to that for another couple of months, and seven months and 30+ phone calls later, I still don't have my monitor back.)

My last post about Westinghouse's horrendous customer service and never-ending RMA process was titled "Westinghouse: Finally getting somewhere?". The answer to that is sadly "no".

I got a flurry of phone calls and emails from Westinghouse's corporate office, attempting to settle my BBB complaint. On September 12th, Westinghouse finally responded to the BBB, saying:

Company states, replacement unit shipped 09/10/08

Good news! I was looking forward to posting an end to this horror story.

However, today is September 24th, and guess what? No monitor. I contacted Westinghouse last week, asking for a UPS tracking number so I'd know when to expect my monitor. However, after being promised a phone call last Thursday that never came, and then sending an email Friday which was never answered, and then waiting three more days for good measure, it appears I'm once again being given the runaround.

So today I sent this email to my contact at Westinghouse:

Do you have access to Google? Please search for "westinghouse rma" and look at the top result. I believe it will be my website. I've been carefully documenting all of my adventures with Westinghouse for the past seven(!) months. On my website, many other people have related their own similarly terrible experiences being kept in the dark for months by your customer service departments.

You promised me a phone call on Sept 18th to provide me with a tracking number for my replacement monitor, but I never heard from you. I also never received a reply to the email I sent you since then.

The BBB was informed that a replacement monitor shipped on the 10th. If that was the case, I probably should've had it in my hands by now, given that it's been two weeks. Has it actually even been shipped? I suspect not. I feel as though I'm once again being given the runaround while nothing is done to resolve this issue. Please understand my frustration.

If I don't have a UPS tracking number by Friday, I'm filing a complaint with the FTC and the California Attorney General. They have a very easy-to-use form for filing complaints here: https://www.ftccomplaintassistant.gov/ and here: http://ag.ca.gov/contact/complaint_form.php?cmplt=CL

My website only has a couple thousand readers, but I'm also going to cross-post my story to every online tech news aggregate I can think of (e.g. http://reddit.com and http://digg.com), which translates to tens of thousands more potential readers. The story I would like to tell is "Westinghouse finally sent me my monitor after seven months", but I'll tell it either way.

I look forward to hearing from you,
--Brian

Look for this story on Reddit and Digg on Friday if I don't hear anything.

UPDATE: Well, I got a reply already. That was fast.

Your Fed Ex tracking number is 772xxxxxxxxxxx, you can track the
package at www.fedex.com/tracking to see the progress of your shipment.
Please keep mind that there was a delay at our warehouse and your unit
is going to ship tonight.

Just a little two-week delay, I guess those things happen. Hopefully if/when it shows up, the monitor actually works. I've burned through seven months of my warranty and somehow I doubt Westinghouse will courteously extend it for me if this monitor fails too.

(Read the whole crappy story of Westinghouse's dishonesty and horrible customer service: The beginning, Update 1, Update 2, Update 3, Update 4, Update 5, Update 6, Update 7, Update 8, Update 9, VICTORY, aftermath.)

September 22nd, 2008

Practicality: PHP vs. Lisp?

Eric at LispCast wrote an article about why PHP is so ridiculously dominant as a web language, when arguably more powerful languages like Common Lisp linger in obscurity.

I think the answer is pretty easy. In real life, practicality usually trumps everything else. Most programmers aren't paid to revolutionize the world of computer science. Most programmers are code monkeys, or to put it more nicely, they're craftsmen who build things that other people pay them to create. The code is a tool to help people do a job. The code is not an end in itself.

In real life, here's a typical situation. You have to make a website for your employer that collects survey data from various people out in the world, in a way that no current off-the-shelf program quite does correctly. If you could buy a program to do it that'd be ideal, but you can't find a good one, so you decide to write one from scratch. The data collection is time-sensitive and absolutely must start by X date. The interface is a web page, and people are going to pointy-clicky their way through, and type some numbers, that's it; the backend just doesn't matter. For your server, someone dug an old dusty desktop machine out of a closet and threw Linux on there for you and gave you an SSH account. Oh right, and this project isn't your only job. It's one of many things you're trying to juggle in a 40-hour work week.

One option is to write it in Common Lisp. You can start by going on a quest for a web server. Don't even think about mod_lisp, would be my advice, based on past experience. Hunchentoot is good, or you can pay a fortune for one of the commercial Lisps. If you want you could also look for a web framework; there are many to choose from, each more esoteric, poorly documented and nearly impossible to install than the last. Then you get to hunt for a Lisp implementation that actually runs those frameworks. Then you get to try to install it and all of your libraries on your Linux server, and on the Windows desktop machine you have to use as a workstation. Good luck.

Once you manage to get Emacs and SLIME going (I'm assuming you already know Emacs intimately, because if you don't, you already lose) you get to start writing your app. Collecting data and moving it around and putting it into a database and exporting it to various statistics packages is common, so you'd do well to start looking for some libraries to help you out with such things. In the Common Lisp world you're likely not to find what you need, or if you're lucky, you'll find what you need in the form of undocumented abandonware. So you can just fix or write those libraries yourself, because Lisp makes writing libraries from scratch easy! Not as easy as downloading one that's already been written and debugged and matured, but anyways. Then you can also roll your own method of deploying your app to your server and keeping it running 24/7, which isn't quite so easy. If you like, you can try explaining your hand-rolled system to the team of sysadmins in another department who keep your server machine running.

Don't bet on anyone in your office being able to help you with writing code, because no one knows Lisp. Might not want to mention to your boss that if you're run over by a bus tomorrow, it's going to be impossible to hire someone to replace you, because no one will be able to read what you wrote. When your boss asks why it's taking you so long, you can mention that the YAML parser you had to write from scratch to interact with a bunch of legacy stuff is super cool and a lovely piece of Lisp code, even if it did take you a week to write and debug given your other workload.

Be sure to wave to your deadline as it goes whooshing by. If you're a genius, maybe you managed to do all of the above and still had time to roll out a 5-layer-deep Domain Specific Language to solve all of your problems so well it brings tears to your eye. But most of us aren't geniuses, especially on a tight deadline.

Another option is to use PHP. Apache is everywhere. MySQL is one simple apt-get away. PHP works with no effort. You can download a single-click-install LAMP stack for Windows nowadays. PHP libraries for everything are everywhere and free and mature because thousands of people already use them. The PHP official documentation is ridiculously thorough, with community participation at the bottom of every page. Google any question you can imagine and you come up with a million answers because the community is huge. Or walk down the hall and ask anyone who's ever done web programming.

The language is stupid, but stupid means easy to learn. You can learn PHP in a day or two if you're familiar with any other language. You can write PHP code in any editor or environment you want. Emacs? Vim? Notepad? nano? Who cares? Whatever floats your boat. Being a stupid language also means that everyone knows it. If you jump ship, your boss can throw together a "PHP coder wanted" ad and replace you in short order.

And what do you lose? You have to use a butt-ugly horrid language, but the price you pay in headaches and swallowed bile is more than offset by the practical gains. PHP is overly verbose and terribly inconsistent and lacks powerful methods of abstraction and proper closures and easy-to-use meta-programming goodness and Lisp-macro syntactic wonders; in that sense it's not a very powerful language. Your web framework in PHP probably isn't continuation-based, it probably doesn't compile your s-expression HTML tree into assembler code before rendering it.

But PHP is probably the most powerful language around for many jobs if you judge by the one and only measure that counts for many people: wall clock time from "Here, do this" to "Yay, I'm done, it's not the prettiest thing in the world but it works".

The above situation was one I experienced at work, and I did choose PHP right from the start, and I did get it done quickly, and it was apparently not too bad because everyone likes the website. No one witnessed the pain of writing all that PHP code, but that pain doesn't matter to anyone but the code monkey.

If I had to do it over again I might pick Ruby, but certainly never Lisp. I hate PHP more than almost anything (maybe with the exception of Java) but I still use it when it's called for. An old rusty wobbly-headed crooked-handled hammer is the best tool for the job if it's right next to you and you only need to pound in a couple of nails.

September 16th, 2008

Copy/paste in Linux: Eureka

It's been a few years since I officially grasped Linux's (well, X Windows') weird concept of copying and pasting, with its multiple discrete copy/paste methods: the highlight + middle click version, and "clipboard" Edit->Copy" + "Edit->Paste version.

But once in a blue moon, copying and pasting in X still surprises me. Try this:

  1. Open Firefox and a text editor. I'm trying with Vim.
  2. Highlight some text in Firefox.
  3. Middle-click paste it into the editor. The highlighted text is pasted, as expected.
  4. Close Firefox.
  5. Middle-click into the editor again.

Can you guess what happens at the end? If you said "Some random text from another application and/or nothing at all is pasted rather than the stuff from Firefox", you're right!

But today I read this article on jwz.org and finally understood how copy/paste works in X. Highlighting text doesn't copy anything, it just announces to the world "If any applications want to middle-click paste something, come ask me for it". So if you close the application you wanted to paste text from before you actually do the pasting, the application isn't around to give you the text you wanted any more, so you can't get it. The Edit->Copy / Edit->Paste version of copy/paste behaves the same way. You can't "Copy", close app, "Paste".

Note, this is different from how MS Windows works. When you copy some text in Windows it really copies to another location. You can close the app and still paste away. But Windows has a different (inconsistent) behavior when copy/pasting files in Explorer. There, it behaves like X in Linux: if right click a file and "Copy", it doesn't actually do anything with the data until you paste. If you right-click, "Copy", delete the file, "Paste", you don't get an error until you try to Paste.

In Vim in Linux, the "* register lets you access the "primary selection" (highlight / middle click selection), and the "+ register lets you access the clipboard.

In Vim in Windows, "* and "+ do the same thing, and use the clipboard.

September 9th, 2008

Westinghouse: Finally getting somewhere?

I finally got not one, but two phone calls from Westinghouse today, inquiring as to the status of my Better Business Bureau complaint against their company. This is of course in connection with the big expensive L2410NM computer monitor I sent off for repairs in March and never got back.

I actually have three different people's names to get in contact with at Westinghouse now, two or more of which are apparently supervisors. After I returned one call and was told all the supervisors went home for the day, I then received an unprecedented second call back from a different supervisor, saying she was on her way out the door but that I should call her tomorrow, and she gave me a direct line to contact her.

Some supervisors must be rooting through old BBB complaints and responding to them all, would be my guess. A phone rep let slip that there's someone working on "all of these cases... er, I mean, your case". The LA BBB still lists 69 unanswered complaints against Westinghouse, so I'm sure there's plenty of work to go around.

After six months of bullcrap, I can't get my hopes up at this point that I'm going to actually have this resolved but hey, you never know. In spite of my 21 phone calls to Westinghouse (and counting) and many promises of a return call, this is the FIRST TIME I've ever heard from anyone at the company. I'll be posting the result of my phone call tomorrow.

(Read the whole crappy story of Westinghouse's dishonesty and horrible customer service: The beginning, Update 1, Update 2, Update 3, Update 4, Update 5, Update 6, Update 7, Update 8, Update 9, VICTORY, aftermath.)

September 9th, 2008

Perl6 features borrowed from Lisp

Via PerlMonks I found a couple of articles discussing in good detail some of the new features of Perl6.

Perl6 steals even more things from Common Lisp than Perl5 did: it has multimethods / multiple dispatch for example, which is a huge plus. Via this interview with Damian Conway we learn that Perl6 will also have named, optional, and "rest" parameters to subs, just like in CL. That's also a good thing; CL's parameter-passing styles are nice, and it's awesome how you can combine them. Certainly better than Perl5 (but everything is better than Perl5). There's also apparently special Perl6 syntax for applying functions to lists and currying functions, and weird Capture objects to explicitly deal with multiple-value returns from subs. Good stuff.

Perl6 is also apparently taking first-class functional objects to an extreme; blocks, subs, and methods are all objects and there are all kinds of metaprogramming hooks to screw around with them. This is one area where Ruby is just a little bit lacking: functions and methods aren't quite first-class enough in Ruby. Most people seem to pass around symbols / names of methods rather than pass around methods as objects themslves. Anonymous blocks are used liberally but mostly via yield, limiting you to one block per method and largely hiding away the block objects themselves.

I'm honestly a bit excited about Perl6, but largely as a curiosity or new toy to play with. It is kind of interesting how languages keep creeping more and more toward Common Lisp. If Perl is a nicer-looking Common Lisp which I can edit properly in Vim, it'll be almost a dream come true; I hate Emacs and Common Lisp tends to be butt-ugly. (Not talking about the parens, mostly about the verbosity and cruft and inconsistencies. Larry Wall famously said that Common Lisp looks like (paraphrased) "oatmeal with toenail clippings mixed in". Perl is certainly at the other extreme.)

http://rakudo.org/ is a good site for keeping up on Perl6 news. It's pretty active. Here's hoping we see a real release of Perl6 someyear.

September 6th, 2008

Vim + screen + REPL = win

Via the Clojure wiki I found a great page describing how you can use GNU screen and some Vim magic to let Vim play nicely with an interactive commandline program like a Common Lisp REPL, Ruby's irb, or Python's, well, python.

That page is a very stripped-down and simpler version of what Limp does for Vim+Lisp. But Jonathan Palardy's version has the benefit of being so simple that you can set it up yourself manually in a second or two. I still have never gotten Limp to work quite right and I don't have the time to debug a big mess of Vim script.

The idea is to start up a named screen session via e.g. screen -S foo -t bar, then start an irb session (or whatever) in there, and then in Vim you can simply yank some text into a named register and send it off to screen via a system call. Download Jonathan's code and see.

It's not a full-blown SLIME; it doesn't have tab-completion or weird interactive debugging windows or such bullcrap. It doesn't capture the output of your command and feed it back into your Vim buffer. But hey, it's pretty good for something you can throw together in 2 minutes, and it works.

So there goes my last reason to ever use Emacs. Good riddance, I must say.

Honestly, Emacs just frustrates the living hell out of me. Oh how I tried to like it. I really did. I've used it on and off constantly over the past year. I have Emacs shortcuts written all over the whiteboard in my office. But its braindead window management, its terrible broken undo/redo system, its finger-crippling key-chord combos, its lack of features I need (like line numbering), its reliance on broken 3rd-party elisp hack scripts for things Vim has built in (like line numbering!), its ugly fonts and GUI elements, and so on and so forth. Vim is such a joy in comparison.