Key Repeat Rate in Windows

Dec 22 2009

(7 or Vista) I noticed that while in Linux hitting the backspace key resulted in multiple hits in less time than in Windows. That made the keyboard on Linux more responsive as a single key appeared much faster on the screen. There’s also a way to turn this on in windows.

  1. In the control panel search box, type keyboard
  2. Hit the first option
  3. Drag repeat delay all the way to the right

No responses yet

Bad Karma and the Fox Chasing Its Tail

Dec 21 2009

I’ve been using Windows 7 since May, when I started my first co-op term. It was definitely better than Vista and much better than XP in some ways. The only thing I don’t like about Windows 7 compared to XP is more hard drive grinding pre-loading programs before they are used into memory.

So this time I decided to install Kubuntu again, forgetting what caused me to abandon it last time. (I couldn’t recall the reason until I finished writing that last sentence) Just a quick overview of what whas karmic and the fox before I get into the root cause of this.

Karma is evolutionary garbage, literally. Some companies trying to make monkey dress it up and call it “good karma” or try to sell you “karma coins”. All garbage. I remember the story behind the game Alpha Centauri. There was only 1 in a million chance of the spaceship getting hit by a meteor, yet due to the karma carried by humans onboard, it was destined to be hit by a meteor. Same thing happens in real life. Things on an outer level never change without a change on an inner level.

So why is Kubuntu karmic? It still had the same problems from last time. When I loaded up my wireless card, I still had to apply the bug fix from Hardy, back 2 generations ago over a year. I expected it to be fixed by now. Second, the default firefox version from the repository was version 3.0.6. If Ubuntu updated its software every six months, then it should at least be 3.5 now. Karmic was released at the end of October. I go through several links on google to install 3.5. Unfortunately, this wasn’t the only bug I encountered installing firefox. There was a firefox installer included with Kubuntu. If I click on it, the installer exits saying firefox is already the latest version. As a result, I had to install it from the command line. After the installation finished, it gave an error message about kde. This should have been a clue about what would follow. Firefox ran smooth until I tried to restore a few things using Firefox Extension Backup Extension (FEBE). I was only able to restore 3 things until the dialog box just refused to show up (it was a GNOME dialog box). After that, I saw KDE desktop crash a few times, apt unable to resolve dependencies, wireless stop working, and several attempts to get wireless back (it’s a lot harder without an internet connection). NOW the Karma becomes obvious, though I still don’t know why.

So now we come to the fox chasing its tail. That’s what you get with a distribution that aims to be current built on top of Debian Linux. The fox will never escape its tail. Kubuntu is based on the KDE desktop, and many Ubuntu users won’t even care to try it for whatever reason (maybe for the same reson they’ve never tried other distributions). When I compare the Kubuntu/Ubuntu website with the Sabayon/Gentoo websites, I find that the Ubuntu side has far less activity and takes longer to solve problems. All because the distribution is based on Debian. In a source based distribution like Gentoo, there is a much greater flow of knowledge. Just look at Planet Gentoo, a Gentoo user blog. It’s not surprising that I remember the reason I abandoned Kubuntu last time, as my laptop is installing Sabayon and I’m writing this. Kubuntu didn’t have a community, it didn’t have people contributin knowledge. It’s just a buggy KDE desktop on top of Xorg and the rest of Ubuntu.

Update: I’ve come across another article mentioning the same problem with Ubuntu (I did get the Kubuntu broken Grub bug, forcing me to install another Linux distro). Also, there is a more technical article benchmarking Gentoo and Ubuntu. Gentoo won, of course. As far as speed goes, Gentoo is the fastest, followed by Fedora, Slackware, Mandriva, and almost last . . . Ubuntu (last goes to the outdated Debian stable).

No responses yet

Time for the Flood

Dec 19 2009

Just finished my last exam and now’s the time to update all my outdated software!

The plan is to leave my XP installation that came with the laptop and wipe out everything else. Does that mean Atlantis will be destroyed and civilization has to be rebuilt again? (Who just asked that!) Not that Windows 7 Release Candidate has gone stale, it expires sometime next year. In the past 3 life cycles, I have focused on heterogenous software configurations.

  1. XP should have Spore and custom theming
  2. Linux distributions should be either user-friendly or technology focused (Ubuntu and Sabayon)
  3. Vista with Google Chrome and Gadgets

The basic principle behind this new installation is to keep every system I use consistent. This implies keeping the user interface the same. Several things to achieve this effect:

  1. FEBE and CLEO Firefox extensions to mass install all extensions and profiles
  2. Firefox as the general purpose browser
  3. Font smoothing (yeah Linux and XP have them)
  4. KDE as Linux desktop (the destop effects in Vista can be duplicated, and it’s closer to Windows desktop than GNOME)
  5. Speed up the slowest part of my user experience (loading a web page in Ubuntu)

No responses yet

Ideal Food Combinations

Sep 05 2009

I knew a while ago that fruits should be eaten before meals. Since I recently decided to try something other than milk and cereal in the morning, again due to research, I started eating fruits in the morning. However, following this plan is more complicated than it sounds. I still have to fit in the 7-8 servings of carbohydrates and an egg. So, after some more research on the medical rules for food combining and adding a note on some allergic foods, I have the following diet:
Breakfast:
Apple or Orange

Brunch:
Banana or Juice

Lunch:
Vegetable salad
Grain product (Bread or Rice)
Multivitamin

Dinner:
Vegetable salad
2 Cooked vegetables
Grain product (Bread or Rice)
Meat
Calcium supplement

There is a good reason for leaving milk out. According to the last article, milk should be taken alone. While it’s fine for most people to take milk before going to bed (make sure you brush), I found out I have an allergy that is triggered by milk. The calcium supplement works fine. It is taken at night so that the blood supply has a level amount of calcium while I’m asleep. This leaves a non-drowsy morning without milk and sufficient servings of each category of food from the food guide.

No responses yet

Why Latex Doesn't Save Space

Sep 03 2009

When I try to include an image in my work report, I get the following latex error:

LaTeX Error: Cannot determine size of graphic (no BoundingBox)

Then the solution is to convert it to a PostScript file. I use ImageMagick to convert the image using the command

/> convert image.jpg image.eps

and it generates the image file for latex. The eps file is about 50x larger than the original. The question then is whether writing documents in latex actually saves space by reducing formatting.

No responses yet

Gray Matter Matters

Aug 27 2009

I asked a question on probably one of the higher traffic forums, and it was answered within an hour. It still took 3 people to put together the answer because one line of code couldn’t work without the other. I had to have about the same level of technical knowledge to make use of the information and ask the question. What made this answer question style different was that the question was answered immediately unlike some other forums I’ve used. You can see it for yourself here:
Python FTP Most Recent File – Stack Overflow

Coincidence? It was on this website that I first heard of dive into python, the online book I used to learn the language. Except I learned dive into python 3 and asked the question from Google. A lot can be said about the use of the democratic process where knowledge matters.

No responses yet

Shifting Unicode Codepoints

Aug 26 2009

While working on a word search generator that translated letter symbols (sort of like cryptograms, except this one’s impossible to solve without the key), php ran out of memory on a rather ordinary function.

function uniord($c) {
    $h = ord($c{0});
    if ($h <= 0x7F) {
        return $h;
    } else if ($h < 0xC2) {
        return false;
    } else if ($h <= 0xDF) {
        return ($h & 0x1F) << 6 | (ord($c{1}) & 0x3F);
    } else if ($h <= 0xEF) {
        return ($h & 0x0F) << 12 | (ord($c{1}) & 0x3F) << 6
                                 | (ord($c{2}) & 0x3F);
    } else if ($h <= 0xF4) {
        return ($h & 0x0F) << 18 | (ord($c{1}) & 0x3F) << 12
                                 | (ord($c{2}) & 0x3F) << 6
                                 | (ord($c{3}) & 0x3F);
    } else {
        return false;
    }
}
function unichr($c) {
    if ($c <= 0x7F) {
        return chr($c);
    } else if ($c <= 0x7FF) {
        return chr(0xC0 | $c >> 6) . chr(0x80 | $c & 0x3F);
    } else if ($c <= 0xFFFF) {
        return chr(0xE0 | $c >> 12) . chr(0x80 | $c >> 6 & 0x3F)
                                    . chr(0x80 | $c & 0x3F);
    } else if ($c <= 0x10FFFF) {
        return chr(0xF0 | $c >> 18) . chr(0x80 | $c >> 12 & 0x3F)
                                    . chr(0x80 | $c >> 6 & 0x3F)
                                    . chr(0x80 | $c & 0x3F);
    } else {
        return false;
    }
}
function asc_shift($string, $amount) {
 $key = substr($string, 0, 1);
 if(strlen($string)==1) {
   return unichr(uniord($key) + $amount);
 } else {
   return unichr(uniord($key) + $amount) . asc_shift(substr($string, 1, strlen($string)-1), $amount);
 }
}

Now I understand why there is a need for a lower level implementation of UTF-8 strings by default in php 6. Python support of UTF-8 support has already been included in Python 3.0 released December 3rd, 2008.

No responses yet

A lot of steps for just getting one file

Aug 26 2009

If you ever wanted to include PEAR.php in a script, but never installed it before on a shared host, a google search for pear.php download should have solved the problem. On the contrary, following the first links on google is a huge waste of time. In my situation, I only needed pear.php to instantiate a class. The intuitive solution is to just download the file and ftp it to the same location as the file that includes it. That works, except the official installation guide never says that.

No responses yet

What Happened to Searchme?

Aug 09 2009

As far as searchme goes, it now redirects to google. It did a better job of showing search result previews than GooglePreview.

No responses yet

Python Development

Aug 08 2009

Just a few things to note on Quirks:

  1. IBM’s Eclipse x86-64 for Windows is hidden. I can understand that the majority of Windows users don’t care about x86 or x86-64, but why keep the download hidden so that there’s no way to find it through links on the website? Now, the x86-64 version works fine and requires Java x86-64. You won’t have trouble finding Java x86-64 for Windows. It’s a drop-down menu under Operating System.(… I doubt the one for Linux works.) If you google search eclipse 3.5 64 bit, you get Eclipse Downloads and Eclipse IDE for 64-bit Windows and 64-bit Java « LingPipe Blog on Jul 21. I’d pick the second choice.
  2. eclipse Python 3: Python Development with PyDev and Eclipse – Tutorial or Python development with Eclipse and Ant. Again, IBM’s links are outdated.
  3. Becareful, Don’t Look BACK! If you want to write code that can be used on most installations, you’d better write it in Python 2 and use 2to3 whenever you want it to run on Python 3. Try searching for it. You get junk. And more hard to spell stuff.

No responses yet

« Newer - Older »