Archive for January, 2009

LaTeX packages in home directory

I finally figured out how to get downloaded LaTeX packages working from my home directory:

Create ~/texmf!

I’d actually known that first step since long ago, but it didn’t work after a few tries, so I gave up. Anyhow, it works now, and (for example) I can put a custom bst file in ~/texmf/bibtex/bst without needing separate copies of it in each directory where I have a document in need of it. yay!

KDE 4.2 — The Answer

(I’d already been using the release candidate, but…)

KDE 4.2 is now official!

Wisdom teeth

I was at the dentist’s yesterday.

It had been a few months since my bottom wisdom teeth started to erupt (I’m only 16!), and an X-ray showed that both were impacted—the left one diagonally, and the right nearly horizontally. I’m having them extracted on Feb. 12 (after the AMC).

I’m not expecting much:

(That’s not my tooth, by the way.) It’s a good thing my roots aren’t deep yet.

We found another one coming up (down?) in the upper left corner of my mouth, but since it’s still below the gum line, we’re going to wait. I was surprised to find, however, that I didn’t have any more—I thought everyone had four wisdom teeth?! Ah well, one less extraction.

Colemak, the superior alternative to QWERTY and Dvorak

Please read this page for a detailed description of why we need to start using a better keyboard layout than the one most of the U.S. population is using right now, one that has stuck around needlessly for more than a century.

In short, the QWERTY keyboard layout was designed in the 1870s to slow down the user’s typing speed so the typewriter wouldn’t jam. Of course, the advent of the computer made that pretty pointless, but for economic reasons, the layout has remained the dominant one ever since. But in the 1930s, Dr. August Dvorak patented a new layout (aptly named after him) that would maximize typing comfort and efficiency partly by having all vowels on the leftmost five keys of the home row (thus maximizing hand alteration).

Five days ago, I decided to learn the Dvorak layout, but I abandoned it for several reasons (don’t mind if they’re similar to ones you find on the web):

  • L was where P used to be, and frequent occurrence of the letter started hurting my right pinky;
  • Moving the comma, period, and the semicolon to the other end of the keyboard was unnecessarily confusing;
  • The idea of alternate fingering was a good one, but made one-handed typing clumsy;
  • Familiar QWERTY shortcut positions (e.g., Ctrl+z/x/c/v) were scattered all over the place.

So did I switch back to QWERTY? The thought never crossed my mind. If nothing else, facts I found on the web about the layout (e.g., averaging about twice the amount of finger travel compared to Dvorak) had me convinced that I would never use QWERTY again.

Luckily, I wasn’t the only person to find issues with the Dvorak layout.

Meet Colemak, another alternative layout released on January 1, 2006, currently the third most popular layout after QWERTY and Dvorak. It keeps Q, W, A, and most of the bottom row keys unchanged, so many shortcuts are preserved. At the same time, it manages (at least, claims) to be more efficient than even Dvorak!

I decided to go for it. It’s been four days, and so far, there has been no finger pain. Switching from QWERTY should be quite easy, though for me, having fervently practiced Dvorak for a day, it was slightly confusing.

Four days of Colemak-only typing, and KTouch is telling me that I’m at around 30 wpm.

GOAL: reach 60 wpm by the end of February.

Other

Hi-games.net has a useful typing test applet (Java) that lets you play back high-scorers’ finger motions in QWERTY, Dvorak, or Colemak. It’s painfully obvious how much more work QWERTY typists have to do to obtain the same typing speed as Dvorak or Colemak users.

BUG: The caps lock key acts as a backspace, but the caps lock functionality is still there. This is a confirmed bug with only a workaround.

To get Colemak as the default layout on the login screen, I followed the general directions here with minor fixes here.

Added benefit: now no one can log into/use my laptop without knowing how to switch to QWERTY. :)

I’m learning C++!

I thought it’d be nice to learn C++ alongside Python, so I submitted the same algorithm for SPOJ project code TEST in C++:

#include <iostream>
#include <cstdlib>

using namespace std;

int main () {
	int num;
	num = 0;
	while (num != 42) {
		cin >> num;
		if (num == 42) {
			return 0;
			}
		cout << num << '\n';
		}
	return 0;
	}

w00t yeah. Intrepid comes with a newer version of libtools than KDevelop currently has, so it wouldn’t compile correctly at first. I found this useful ubuntuforums.org post to help me out.

btw, for the purposes of this post, I indented the code above using lots of &nbsp;, which is really annoying. Does anyone have a better solution?

SPOJ — programming exercises

The Sphere Online Judge has thousands of programming exercises you can try (submit your code and see if it’s correct!) in lots of different languages. I’m only a (extremely) novice python programmer; here is my first submission to exercise 1 (code TEST):

#!/usr/bin/env python

n = 0
while n != 42:
    n = input()
    if n == 42:
        exit()
    print n

I think it’s a little ugly, with redundant bits of code. Maybe this could actually be done with around three lines rather than six? (Okay maybe not.)

Firefox still trumps Konqueror

KDE! I love integration, and KDE 4 is awesome at it. I switched from Thunderbird to KMail/aKregator a while ago and love it. Firefox was left as my only non-KDE app (okay, and OO.o, but I use Kile much more often). Hmm. Since it was taking up so much RAM anyway (250 MB and up?!), I decided to try Konqueror (4.1.3).

I actually ended up switching back to Firefox after only four days, but here are a few things that I like (there’s one.. and a half)/don’t like (the rest) about the current version of Konqueror:

Address bar

There’s both a positive and a negative about Konqueror’s address bar. While the web shortcuts functionality is extremely useful, its lack of page content match support and general intuitiveness are big downsides.

Web shortcuts is the one feature that I really like. For example, I can make a shortcut “es2en” so that typing “es2en:despertador” in the address bar will be replaced with “http://www.wordreference.com/esen/despertador&#8221;. At first glance, it doesn’t seem like much, but I find it (maybe) more useful than Firefox’s (or Opera’s) page content match.

Unfortunately, Konqueror doesn’t have Firefox’s (and Opera’s) page content match. While it may be part of the reason why Konqueror is so light on RAM (averaged about 110 MB with 12 tabs open, not too heavy on graphics) it’s a big drawback for me.

Typing “kde-look” in Firefox will take me to http://www.kde-look.org. Konqueror outputs an error message instead. It can be configured to search a search engine, but that just gets in the way (besides, I can type “gg:kde-look” to google it).

No plugins

Konqueror doesn’t, AFAIK, have any plugins like those I can download for Firefox. ‘Nuff said.

Confusing session management

Session management is manual. Closing Konqueror doesn’t save the current session like Firefox does. A crash saves the session which can be restored, but Firefox does that as well. Saving a session saves all open windows, which can get annoying (Opera lets me save just the current window). On restart, I have to manually load a saved session.

Slow, occasionally broken page rendering

Some sites like Slashdot don’t render properly in Konqueror. If the page has lots of scripts, it can get slow as heck, too. Having multiple sites like that open freezes my MacBook.

But hey, I never said Konqueror sucked. Again, the big downside about Firefox is it being a RAM hog, even when using the browser.cache.memory.capacity option (wait, is that Windows only?). Konqueror loads a lot faster, and its dual function as a file manager lets me easily upload/download files from the web (including my Box.net dav folder). I haven’t really tried the split view function, but I guess it could be convenient.

Meanwhile, I’ll just have to endure this until I get my hands on some 2 GB sticks…

Currently: I’mpatiently waiting for KDE 4.2.