Technology

Dropbox

Posted by Doug on October 18, 2008
Technology / No Comments

What an awesome idea for anyone with two computers, or who is crazy about having their files backed up: Dropbox. The skinny: you have a folder on your computer (Windows, Mac, or Linux!), changes to which are tracked. Any time a file is added, deleted or modified, the changes are immediately reflected not only on the company’s online server, but also in any other computers that are connected to your account. To improve the speed, only the fragments of files that are changed are actually transmitted. Furthermore, all of your files as well as a backup of every modified version is available online through their interface.

Other features they provide: you can make files publicly available and provide people a link to download it (no more clogged email messages with too-big files); you can upload a file to your dropbox through the web interface, so again, no more emailing files to yourself when you’re away. They have a video on their website which demos all the features. They give you 2GB free, or 50 for $99 a year (if you like to move around media files, or large amounts of word documents, I guess).

I got set up yesterday — it pretty works as advertised, syncing files between my Ubuntu linux laptop, and my Windows XP desktop. There was an extra step for me on Ubuntu — I installed their dpkg, but I had a problem where it wouldn’t sync, and I had to download another dropboxd package (I can’t find the forum link now, but if you search for the exact error message on their forums, you should find it).

As a side note, Foxmarks has probably the best & smartest support site I have ever seen. Ever. It seems to be run by a company getsatisfaction.com.

Synergy

Posted by Doug on July 09, 2008
Technology / No Comments

My coworker introduced me to an awesome piece of software called Synergy. It allows you to use the same keyboard and mouse on several computers; you can just push your mouse to the edge of one screen and move it onto the next computer as though they were connected. The software works on all of Windows, Linux, and OS X, so you really have no excuse, except a dearth of computers, for not using it. The software was last updated in 2006, though, so you might have to convince some folks to pick up development. That, or you can start a company to continue development and sell support for the software; they even have a roadmap on the website for new features and feature requests. The macro environment may be negative, though; the trend is towards fewer computers using Virtual Machines, not more. (At least in some places.)

Object Oriented

Posted by Doug on June 13, 2008
Technology / No Comments

… simply amazing. I somehow got it in my head to focus on writing object-oriented programs while taking a C++ refresher course. I started doing as many of the homeworks like that as possible (e.g., writing a counter class instead of just using an array).

Today, I wrote a class to run a simulation (really, just shuffle a vector), and then a second “counter” class to do the rest of the grunt work. The beauty of the whole OO process is that since everything is modular by design, the code can become very simple, or at least straightforward. I would say this process can be used to nearly eliminate bugs from the design process. Why? Because each piece can be tested in isolation without hacking the code to pieces as well as removing the obfuscation of dealing with the moving parts. Furthermore, it is highly maintainable.

One can think of it the way digital engineering is done (I can actually speak about that with some intelligence). When designing something complex, like a CPU, only a moron would try to design it directly in terms of transistors. Rather, the CPU is made of modules, each made of more simple logic, themselves made of even more simple logic, and so on until you get to the simplest digital units made of transistors. This process adds a certain amount of friction to the process as there is a “compatibility layer” between each device, but it saves enormously on being able to understand, design, and modify the whole system. After all, if you had to worry about whether the timing on the flip flops in one frame of the processor were going to affect the ALU multiplier timing, you’d go mad. However, knowing that each meets certain specifications lets you just abstract it away and draw the whole thing is a box with lines on it. And that’s the object oriented programming concept as well.

Alt-select

Posted by Doug on May 22, 2008
Technology / No Comments

HFS OMG! On some applications (it appears it works with Word, Microsoft Visual Studio, doesn’t seem like it is in Firefox), you can hold down Alt while selecting text… and it will select in columns instead of rows! So if you copy a big table and it gets plopped down as text, you don’t need to open a spreadsheet to delete columns; just put your cursor down in one corner, hold down alt, and drag the cursor to the opposite corner! So cool!

Microsoft Visual Express C++ 2008

Posted by Doug on May 21, 2008
Technology / No Comments

I figured that if I’m going to take a C++ class for the finance industry, I should get on the Windows bandwagon, and not with an open source port. Instead, I went with Microsoft Visual C++ Express, which is a free version of Microsoft’s IDE, and will almost certainly do what I need to do.

I did have a problem installing it the Visual Express 2008, which caused me to initially backtrack to the 2005 version. The error I was getting was being thrown during the unpacking of the installer. It was:

setup has encountered a problem while trying to copy $shtdwn$.req

It turns out the system was installing the temp files onto my Linux Ext3 drives and this was generating an error (probably relating to permissions). When I disabled the Linux IFS driver (or, really, unmapped the drives manually) and ran the install, it went fine, as the temp files went onto my NTFS drive C.

Nothing gets a person quite as riled up as having the tools to create something… that’s how I feel now that I have a Visual C++ IDE ready to go…

Is this computer hosed?

Posted by Doug on April 16, 2008
Technology / 1 Comment

I moved to my mom’s place last weekend, and managed to usurp my (older) brother’s room as an office (I have a desk, my girlfriend has a desk, and we left the bed alone so he can sleep there). Now that I have a place to comfortably use my desktop computer (it was pretending to be DVD player in my apartment), I realized that my Gentoo installation was almost a year out of date.

So I went about the slow and annoying process of updating everything. I think it said there was 1.5 GB of files to download, and don’t even get me started on the time spent compiling and fixing install errors. After a few hours of this, I threw up my hands, killed the install process, and downloaded an Ubuntu disk. That entire process took perhaps an hour all together.

Like my previous Ubunutu install, on my laptop (which I also upgraded to 8.04 Beta yesterday, which was a cinch!), things didn’t go perfectly. The problem is again mostly with the graphics card, and I think the problem is basically that the default video card for nvidia cards is the free version… which does not perform anywhere nearly as well as the proprietary version (the use of which I have no problem). I also have KDE 4, which is pretty sweet.

So, that was good. And then there is another machine we have (An AMD XP 3200+, I believe with an Asus motherboard), one we were using a server until we realized it was a waste to run this noisy machine ourselves. I decided that I would use it instead as a web browsing machine to put in our basement (the most convenient place for that part of the house). Although I had had some trouble with this hardware in the past (I couldn’t get the Gentoo install disk to boot; Windows barfed when it booted), I assumed that Ubuntu, known for its hardware excellence, would have no problem.

How wrong I was! As soon as you try to boot into linux from their main menu, the disk says something along the lines of “Kernel panic: trying to kill idle process”, and hangs. I haven’t done a thorough investigation online, but I don’t think this is a common problem; I wonder whether this is hardware, software or BIOS related. Specifically, I wonder whether something is really wrong with the motherboard, CD-drive or CPU or whether the disk itself is bad, or if there is a bad BIOS setting. The fact that I had similar trouble previously leads me to rule out CD-ROM problems, but it’s hard to tell what about the hardware is wrong.

If there’s anyone out there reading this… any advice? I suppose I should post on the Ubuntu support forum…

Ubuntu on the Vaio

Posted by Doug on March 24, 2008
Technology / 2 Comments

I own an 8 year-old Sony Vaio, PCG-SRX87 (I really cannot believe it’s that old.) It’s got 384 MB of RAM, and PIII 450 MHz processor, 20 GB HDD, wireless, USB 1.1, ethernet, video out, memory card reader, external CD-R/DVD drive (8x write speed!), and a modem. It came with Windows XP, and no small supply of craplets (as Walter Mossberg, Mac enthusiast calls them). Since then, I’ve installed various distros of Linux (Manrake, LFS, and ) on at least four other computers, generally with great success. However, my experience made it clear that most distros are pretty kludgey and don’t deal with hardware very well. It was my impression that laptops generally have proprietary hardware (how mistaken I was!) that wouldn’t be supported, and the system would be fairly unusable.

That was pretty much the case on my first try, in 2005. That summer, I had a sysadmin job at my college, and I was feeling adventurous. Too adventurous, really, since I tried to install an LFS, which is something you should never do if you are doing anything full-time (school doesn’t really count, and I did do such an install in my freshman year of college, with moderate success). I spent about 3 weeks on the project. I actually installed the entire base system and X. I think I did KDE, too, but so many things did not work (most notably, wireless internet), I couldn’t stand it. So I gave up entirely and reinstalled Windows.

Since my knowledge of Linux distros is pretty sparse, and is mostly derived from my older brother, I moved from LFS to Gentoo on my desktop machines. I was well-aware that this wouldn’t fly with my laptop (all the compiling, oy!), I held off. Finally, when my girlfriend’s father decided to install Ubuntu on his laptop a couple weeks ago, I figured it was time. I had actually had a brief encounter with Ubuntu in college when a gentleman emailed the Linux list at my school (which generally receives a couple emails a year) about starting a LUG and he went on and on about how great Ubuntu is and how he wanted to support his “clients” and esteem God. That didn’t go over well with the socialists (me included: I was reading the “philosophy” pages on the OSS websites too much), he was flamed, and that was the end of that.

But Holy Cow, installing Ubuntu is probably the easiest thing I’ve ever done. The live CD is extraordinarily slow to use (since it is constantly spinning up the disk) and took more than 5 minutes to load, but you should be pretty well convinced that it’s a good substitute for windows once you get on there. Certainly having low expectations given my past experiences, I was impressed. Wireless works (better than in windows, I might add!), power management works, it’s got a control panel-like thing, and everything is plug-n-play. It’s uncanny how far these things have come. One caveat is that I got a black screen when I started up, because it detected my screen settings wrong. Hit Ctrl-Alt-Minus (where the minus is on the number pad, not next to Backspace) a few times to make it a visible size. Once you log in, go to System->Preferences->Screen Resolution to change it to the native resolution.

Installing was a breeze, although mysteriously I can’t make the boot screen appear when I boot, even though it works fine on the live CD. There are a few kinks, such as the Brightness software not working in the OS, but it works fine if I use the keyboard shortcuts (Fn-F5 and Fn-F6). Hardware acceleration is disabled by default because the video card can’t handle 24 bit color depth and acceleration on this system. I can go on and on about what works, what needs a little effort, and what doesn’t work, but pretty much right out of the box, maybe some assembly required, you have an excellent substitute for that average windows user. I’m also told that if you use their Verified Hardware, you won’t have any of the problems I experienced. (Do you think Windows works on your hardware because the Microsoft people are clever, or because the manufacturers all make sure it does? Until they give Linux attention, it’ll be hit-or-miss like this!)

My impression of the average windows user is that they browse the web, check email, use a word processor, and spreadsheet. In the browser, they have to be able to load flash and java programs, and view other videos. Playing music and connecting to the iPod is crucial for most. You can do those things 100%. (I happen to think Amarok is a better music player than anything you find on Windows, hands down.) Installing software is done by checking the program’s name in a menu. Uninstalling is similarly easy. There is software to do nearly everything, but it becomes iffy. My girlfriend does graphic design, and won’t touch either inkscape or the GIMP with a 10-foot pole, since they compare so unfavorably to the Adobe products they imitate (the former is quite fun to use, and the latter, particularly before version 2.0, was god-awful). Video editing, when I’ve tried it in the past, was quite finicky. There is, of course, Wine, which lets you run windows programs in Linux. I just made a post on that; you can supposedly play many games and run quite a variety of program in it. Just don’t expect 100% polish if they do run. (You can see which ones work by going to their AppDB: you might be pleasantly surprised.)

But if video editing is your thing, just wait a few years. When I started using Linux, firefox was version 0.5 or so. It didn’t load most pages, and it crashed regularly. A few years later, it was 1.0 and mostly usable (with a healthy does of add-ons). As I was describing above, hardware used to be very irritating. Now you have something like Ubuntu that makes hardware support a breeze. Similarly, the other core functions that I described are very, very solid. It’s the fringes that are now being worked on. Video and sound editing, graphic design, and games are just coming into their own. If you really need these things on Linux, you’re probably best advised to wait a few years until they’re mature. Either that, or participate in their development by testing the software, programming, or writing documentation.

Audible for Linux

Posted by Doug on March 21, 2008
Technology / No Comments

Audible sells audiobooks (books read aloud, if you didn’t deduce). Audiobooks are cheaper than print books on the whole because the cost of producing them (beyond the actual writing and editing) is simply the cost of hiring a single voice artist, as opposed to printing each copy. In other words, it has enormous operating leverage. (On the other hand, buying these in disks in the store can be quite pricey.) Therefore, if you commit to one of Audible’s plans, such as the monthly or “all-at-once” plans, you can get an excellent deal on these things. For example, the “24 credits all at once plan” (the most economical if you use it to its full) gets you each book for $7.50. I happen to listen to them on my way to and from work in the car, which is usually about an hour each way. Most audiobooks last a week or so for me. (You can get more bang for your buck with subscriptions to the New Yorker, New York Times, Wall Street Journal, etc.)

While I’m talking about audible, before I get to my Linux experience, I might as well tell you what I think of the site. I think it’s an excellent service, overall, and a huge boon in the modern commuting age. I had previously bought about a month’s worth of audiobooks (it was four all together, I believe) for about $100 at Barnes & Noble’s; through Audible, this would have cost at most $45. Their site leaves something to be desired; it is something of a poor man’s amazon.com. Of course, you can research the books you want on Amazon, and then just check if Audible has them. The files have DRM protection, but it’s no problem using them on an iPod or in iTunes, which is all most people care about. They also force you to use a proprietary download software, which presumably encrypts and tags the files as you retrieve them. My prediction is that both the clunky website and the DRM will go the way of the dodo once Amazon takes over (they’re being bought by Amazon; my prediction is purely speculation, of course).

Which brings me to the purpose of my post. Given that the proprietary, windows (and perhaps Mac) download program, Linux is officially unsupported. However, on my Ubuntu machine (version 7.10 at the moment), I had no problem downloading and installing both their “AudibleManager” (which can organize and play your audiobooks) and “Audible Download Manager” (which downloads the files outside of AudibleManager) using Wine (see Wine’s AppDB for support information). I used Wine straight out of the box, and had to use the short script described on the AppDB page referenced above; now it integrates very nicely with firefox. Make sure you have Audible Download Manager running before you try to download, otherwise the download won’t work. Note that the podcasts page does not work for me in the audible download manager; you have to download the files through the Audible website using the library (since only subscriptions can be downloaded directly through the download manager, this isn’t such a hassle, anyway).

Now that you have these files, what do you do? You can listen to them using the AudibleManager, which plays audio, and recognizes the chapter markers. Amazingly, Amarok not only recognizes the .aa files (although it cannot play them), but can download them to your iPod. I don’t think any other ipod program recognizes the .aa files, so Amarok (which is just an awesome program, by the way) may be the only way to do this. However, on my new 3g iPod nano (supported in Ubuntu 7.10 only by installing a libgpod hack, although it should work officially starting next month with 8.04) these downloaded files play fine, although they lose the chapter information. This isn’t such a big deal, though, since you can fast forward and rewind easily enough by pressing the middle button and then scrolling (a technique that does not seem to work at all when a file has chapters).

So, although Audible has no official plans of supporting linux, the linux community seems to have done a superb job of making things work. To recap, to use audible in linux, you need to:

  1. Install Wine and Amarok (if you want to download to an ipod)
  2. Install the audible download manager or the AudibleManager (to listen on the computer) using Wine
  3. Use the shell script suggested on the AppDB page to integrate the download manager properly with firefox.
  4. Start the audible download manager, go to your audible library, download, and enjoy!

Westinghouse TV as a monitor

Posted by Doug on June 27, 2007
Technology / 1 Comment

For those of my dedicated readers (I don’t think there are any) you may be disappointed by my long hiatus. I sure won’t be correcting that now.

I wanted to add to the collective knowledge of the internet by explaining how I got my Westinghouse LCD TV (SK-26H240S) with a VGA input to work as my computer monitor under Linux. Towards taht end, I will be using as many keywords as I can think of to help make this information go far and wide. Fancy-pants people who run windows need not read on, as somehow windows can just figure these things out, whereas Linux cannot.

I’m running Xorg 7.1 on Gentoo, although everything should work on just about any version of Xorg or XFree. I had to manually enter a Mode line (via the Modeline directive in my xorg.conf file) to indicate the timing and resolution for the screen. According the the xorg.conf man page you need basically 9 entries to specify a modeline: DotClock (a.k.a. Pixel Clock), HTimings (hdisp hsyncstart hsyncend htotal), and VTimings (vdisp vsyncstart vsyncend vtotal). I also specified the HSync and VSync.

I was going for the native resolution of 1360×768. For this setting, the pixel clock is given in the manual as 72. The horizontal and vertical totals are given (1520 and 790, respectively), the horizontal and vertical displays are given (1360 and 768, respectively), but the other two “start” and “end” values are not; the manual instead supplied “sync” (32 and 5) and “back porch” (80 and 15) values, which are not the same as what I need.

I tried to figure out these values from a product sheet I found, but couldn’t quite do it. However, I managed to reverse-engineer them from the XFree Modeline calculator: the start timing is “display + back porch” and the end timing is “total – sync”. Thus, the modeline is:


Modeline “1360×768@60″ 72 1360 1392 1440 1520 768 773 775 790

In researching this post, I found a tool that figures out the modeline for you… but you need to figure out the front porch from the total.

Video conferencing in Linux

Posted by Doug on May 04, 2007
Technology / No Comments

The short: They almost all suck. Hardware support is awful, and the field is crowded with a hundred different API that all do the same thing, poorly (story of FOSS, I think).

The long: I tried a number of video conferencing tools, and most of them were miserable failures. Among those I tried were Ekiga (formerly gnomemeeting), Kphone (which relies on vic), minisip and Mercury Messenger, and anything Flash.

  • Ekiga ultimately worked for me. In Gentoo, it annoyingly relies on LDAP, which I can’t imagine being an actual requirement in the software. In fact, I can’t even find an option to use LDAP in the program itself. Anyway, the first couple of times I tried to install it, I left out the all-important v4l (video for linux) flag, which is naturally important for a webcam that uses v4l. Eventually, I got that working, and I actually have video. Just like the Dilbert comic, I don’t have anyone to call (Karolina wasn’t around by the time I got this working). It’s annoying that it doesn’t store the camera brightness and contrast settings.

    Like most things in Gentoo, it ultimately Just Works: you can futz around with the USe flags and config files, but in the end it’s the defaults that are what work. So, I can’t really offer any insight into making this work.

  • Kphone also looked promising, but relied on the program vic, which is, shall we say, weird. They provided binary packages, but not for Intel architecture (are they for real?). Then I couldn’t make the source compile, so I just dropped it. I actually can’t remember the details, since I was frustrated at this point. In the course of writing this, though, I noticed their News page only has events from 1995, which may be a problem.

  • Minisip was perhaps the most ridiculous. It’s always a problem when you can only use programs from the main development branch. I tried to find the stable branch in their code repository, but for some reason it’s been deleted. I’m not a pro with the subversion tool, so I couldn’t find when this happened (so I could get the most recent stable release), but in my short experience I haven’t known subversion to ever forget things in that way. It was also trouble that their lists had only three emails per month for the past six months, and that the development list only had emails of spam or commit records (automatically generated). I dropped this one pretty fast.

  • I saved the best for last. Mercury Messenger was just an outright catastrophe. Their developers are a bunch of hacker types (I mean the teenager kind) that threatened to ban anyone who posted their (freely available) code online. What’s worse, is that it relies on Java Media Framework (JMF), which, like all Java programs, looks like absolute crap, and has no configuration options. The issue is probably that the development of JMF stopped in 2002, so I’m not it supports video for linux, or at least modern API for v4l.

  • The Flash player did not work. I have no idea how one would approach fixing that.