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 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 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?