Wednesday, July 29, 2009

A bucketful of water on the floor

Before yesterday, it seemed reasonable to assume that a bucket can support the weight of a bucketful of water. I never even thought about it. Then this happened:

The design defies common sense. It even doesn't make sense when trying to use less plastic, because everything other than the ends of the handle and the hinges seems robust.

Monday, July 27, 2009

On fandom

When I became a fan of someone/something on Facebook I just meant to say "that's really good". I didn't mean to subscribe to stuff; that part even got to be a bit annoying.

For example, with Infected Mushroom, I meant to say their music is great and highly recommended. I can also say that seeing them live is highly recommended if you get a chance. (The one time I saw them in Toronto is still a very memorable positive experience, even though the club was unreasonably packed.)

At first, seeing all the stuff they posted was annoying. It almost seemed like spam and it certainly seemed to decrease the signal to noise ratio. Yet the first article I read was interesting. It's a weird feeling, realizing that there can be more to something than I ordinarily experience. I'm not really sure what's the point of taking an interest in more than just their music but it certainly feels worthwhile.

Saturday, July 25, 2009

So, I have a WiFi router which runs Linux...

For a while now I was interested in getting a WiFi router with USB ports and ability to run third-party Linux-based firmware. Theoretically such a device can be very useful. Besides the obvious routing and WiFi functionality, it can also function as a low power always on computer running Linux. The possibilities seem endless. They include:
  • web server, with CGI, PHP, etc.
  • file server on the LAN
  • handling downloads
  • using an external display to show information from the Internet (such as e-mail notification, the weather forecast, RSS feeds and messages left via the web server)
  • webcam server
  • playing Internet radio
  • doing things via the serial console
I decided on the Asus routers, because they seem to have good support from third party firmware, they have USB 2.0 ports, and they have a decent amount of RAM and flash. At first I couldn't decide between a WL-500G variant or a WL-500W. At first, the WL-500G seemed like a better choice. Pre-N didn't really seem necessary, and in any case the alternative firmwares I looked at didn't support it. Then I learned about Oleg's firmware, which supports pre-N, and I decided to get a WL-500W.

The initial experience with the WL-500W and Oleg's firmware was quite positive. Things simply worked. Configuration was simple and there was a nice repository of software which can be installed on an external drive.

However, I quickly learnt that doing all the things I initially imagined would be a lot of work. In many cases, it doesn't seem like the software is available, and I would have to do a lot of coding. For example, I'm not aware of any software which can use an external display in the way I envisioned. The closest thing seems to be LCDproc. Another example the lack of download manager software which can run as a daemon.

There were also some problems, even with things which should simply work:
  • Much to my surprise, the procedure for building a cross-development environment was simple, but GCC 3.2.3 is so buggy that it can't even bootstrap itself. There, the solution seems to be -fno-schedule-insns2, but I would still like fully functional GCC.
  • Oleg's firmware helpfully provides modules for using a USB-to-serial adapter, but that version of Linux has a serious bug which prevents the onlcr stty option from working properly. The solution was simple: use the pl2303.c and pl2303.h files from the latest version of the 2.4 Linux kernel.
  • My webcam was totally unsupported, and spca5xx failed to build correctly. The binaries I found didn't support my webcam. I found a patch, applied it to the latest compatible version, and it worked. It even allowed me to use my Dakota "single use" digital camera as a webcam. The Asus webcam software didn't work properly with either, and it seems like an kludge, but fortunately, other applications are available, and w3cam works.
So, now I'm building up the capabilities. I even ported the client software for the LED sign I built from Windows to Linux. The main thing that remains is to tying stuff together in a way that's useful and beneficial in a long-term way. In the meantime, the best thing I've done is using my HP Portable Plus as a serial terminal for accessing Google Talk via mcabber.

Sunday, July 19, 2009

Fix for Dell Inspiron 6400 audio glitches

Since installing Vista on my Dell Inspiron 6400 laptop I've had problems with sound interruptions. They ranged from short clicks and pops to significant interruptions approaching a second in length. Disabling WiFi made them go away, so I assumed it was some conflict between the Dell 1500 (BCM4328) Draft 802.11n WiFi card and Sigmatel STAC 92XX C-Major HD Audio.

At one point I updated the WiFi driver and the sound interruptions went away once I connected to an 802.11g network. This was pretty good. If I didn't need the WiFi card I could disable it, and if I needed it, I would connect. However, when I bought a 802.11n router, the interruptions started happening a lot, even when I'm connected. The solution again was updating to the latest drivers, although that's not straightforward for reasons I'll explain later.

This time, I found a very useful tool: the DPC latency checker. I highly recommend it if you're experiencing audio glitches. Looking at the graph it produces is much faster and easier than listening for glitches. Here's what I saw:

When I disabled WiFi, the latency went back into the green. This showed me that it's entirely the WiFi driver's fault. Yes, updating audio drivers had helped, but I shouldn't expect audio drivers to be able to cope with this.

With some further online research, I found that people running Windows on Macbooks were having the same problems, and the driver fixed it. They had a slightly different BCM43xx chip, but I thought the same driver might support my chip. So, I searched Dell's support pages for the version number, downloaded the latest file and installed it. Here's what dpclat.exe showed me:

Yeah, that's not ideal, but it's a big improvement. More importantly, the audio interruptions are gone!

This would all have been much easier if Dell helped me find the latest drivers. It seems that soon after they stop selling a model, they stop saying that their drivers support that model. So, soon after I got my laptop, the drivers which support the Dell 1500 WiFi card stopped saying that they support my laptop. It gets worse. Soon, drivers stopped saying that they even support the Dell 1500 WiFi card. Dell claims that the driver I'm using is for various other wireless cards and for another laptop. It actually seems to be a universal Broadcom driver.

Friday, July 17, 2009

Proper packing of parcels

It seems to me that when packing stuff for shipping, the stuff should be in the centre of the box, and it should be surrounded by packing material. Once upon a time, I remember stuff arriving this way.

DirectCanada just puts stuff in the box, against the sides, and then fills the remaining space with packing material. This leaves product boxes resting against the outer box. In those locations, impacts are transferred directly to product boxes. Because of that, I've seen damage to product boxes. Fortunately, product boxes generally have padding and space inside, and so I didn't receive any damaged products.

I just got my first order from NewEgg Canada, and they did the same thing. Is this way of packing the norm now?

I guess it might not matter because product boxes protect the products. Things are also probably less fragile than I assume. For example this EVGA 8600GT video card was totally loose in its own box and able to rattle around. I thought that would break solder connections, but the card still works perfectly over two and a half years later.

I shouldn't single out Facebook invites

Shortly after I posted about how Facebook invites are spam, Yaari and LinkedIn reminded me that they do the same thing. Isn't capitalism fun?

I opted out of Yaari, because it's like a virus. The LinkedIn invite didn't even have a decline link, so I accepted it. I filled all the fields with made up information and connected the account to a temporary disposable e-mail address. (GuerillaMail is nice.) That was fun. I'll probably do it in the future if a site re-sends invites and I have some free time. Maybe I should also post the username and password on BugMeNot or here. That could make the accounts into a collaborative art project.

Friday, July 10, 2009

Facebook invite e-mail is spam

I have a Facebook account which is associated with one e-mail address. A friend sent an invite to another e-mail address. Since then I keep receiving the invite again and again.

Last time I added the second e-mail address to my Facebook account settings. When I did that I got a weird e-mail telling me that the e-mail address was removed from my account but I can still use it. However, the e-mail address is still in the settings, and if I search for it I find myself on Facebook. Facebook then sent another invite to that address as if I don't have an account.

The worst part is the content of the e-mail itself. It shows the person who invited me and "Other people you may know on Facebook". The name of each person is a link. However, those links are useless. If I am logged in, they take me to my Facebook home page. If I am not logged in, they take me to a page where I can start creating a Facebook account. There's no way to get information about the people listed in the e-mail. To add the friend who sent the invite, I had to search for him by name. Looking at the links for various people, I see that they're all identical and they are the same as the "sign up for Facebook" link at the bottom. Because of that it doesn't matter which link you click; all the people listed are basically being used as advertisements for Facebook.

Besides creating a Facebook account, the only thing I can do with the invites is ask Facebook to stop sending e-mail to that address. There is no way to reject one particular invite without preventing all future invites. I suspect that this "unsubscribe" option is designed to stop people from using it.

So, yes, it kind of looks like a genuine e-mail, but the way it's deceptive and repetitive makes it spam. I don't know what to do about this. I don't expect Facebook to listen to my complaint, complaining to their ISP(s) would be silly. It's too bad that deleting my account isn't an option because of so many other people who use Facebook. (It is to social networking what Windows is to operating systems.)

Wednesday, July 08, 2009

Simple and free FLV to AVI conversion in Windows

Both FLV and AVI are container formats. That means they merely wrap the audio and video data into a file. The data can be extracted from one file and put in another. Here's how to do it.

The program I use is VirtualDub. It is a free basic video editing and video capture application. To get it to open an FLV file, put the FLV Input Plugin (FLVInputDriver.vdplugin) into the VirtualDub plugins directory. With the plugin, FLV files may be opened by dragging them to VirtualDub or via the "File->Open video file..." dialog box. However, VirtualDub may still refuse to open your file, because FLV files often use video codecs which are not supported by default in Windows. I recommend FFmpeg, in particular ffdshow tryouts. When installing ffdshow tryouts, make sure you install the VFW interface. Afterwards you need to run the ffdshow "VFW configuration" (not "Video decoder configuration") and on the decoder tab enable the codecs you need. FLV can contain video in VP6F, FLV1, H.263, H.264 and possibly other formats.

When all this is done, converting FLV to AVI is simple. Open the FLV file in VirtualDub, in the Video menu select "Direct stream copy", make sure that's also selected in the Audio menu, and in the File menu select "Save as AVI...".

Note that the resulting AVI files still use video codecs which aren't supported by default in Windows. VirtualDub can also re-encode the video into a more popular codec. I recommend Xvid, which isn't supported by default but is a de-facto standard.

Also note that AVI is just another proprietary container format. Only convert videos to AVI if you really need to. There are many ways to play FLV files, and they can even be played in most DirectShow applications, like Windows Media Player.

Wednesday, July 01, 2009

Evening primrose

Here is some evening primrose, in particular, Oenothera biennis. It has nice yellow flowers, which open late in the evening, close early next morning and then wilt. New flowers open every evening. In the photo you see tonight's flowers, the remains of last night's flowers and many buds preparing for upcoming nights.