english test

I’m not as smart as I think.

You scored 100% Beginner, 93% Intermediate, 81% Advanced, and 61% Expert!
You have an extremely good understanding of beginner, intermediate, and
advanced level commonly confused English words, getting at least 75% of
each of these three levels’ questions correct. This is an exceptional score. Remember, these are commonly confused English words, which means most people don’t use them properly. You got an extremely respectable score.

Thank you so much for taking my test. I hope you enjoyed it!

For the complete Answer Key, visit my blog: http://shortredhead78.blogspot.com/.

My test tracked 4 variables How you compared to other people your age and gender:

You scored higher than 68% on Beginner
You scored higher than 30% on Intermediate
You scored higher than 8% on Advanced
You scored higher than 15% on Expert

Link: The Commonly Confused Words Test written by shortredhead78 on Ok Cupid

vim word and code completion

Microsoft’s intellisense is an awesome power for developers to wield code faster.

I prefer vim for various reasons which I will not list.

Sometimes completing words or variable names in vim would be nice. Particularly when I forget the case of a variable because I am not using consistent style of variable names, or when I’m using someone elses code.

I’ve been familiar with vim and tags for a while. Vim will read a file named tags from the current directory and use it to index other files. The tags file is generated by the program ctags which is hopefully the version from the exuberant ctags project. Its great to be able to navigate to function implementations and member declarations. Tags are great.

I’m new to vim’s dictionary functions. I learned about it in vim tip #91. I added

" enable words completion
set dictionary+=/usr/share/dict/words
" use ctrl-n ctrl-n instead of ctrl-x ctrl-k
set complete-=k complete+=k

to my .vimrc.

Now I can ctrl-n to cycle through variables, function, in the tags file, or words in dict/words.

The piece which is a bonus is when I don’t have a match in those files, vim actually scans included files. I stumbled on this when testing in a C file. I don’t write much C, but it turns out vim will scan included files in your current file for word matches. This are the complete+i and d options. See :help complete for more information.

It turns out ctrl-n automatically completes variables based on tags, includes, and other things listed in the vim help. I did not need to add anything to my vimrc to have this support, I just needed to know to use it. The vimrc additions just include using ctrl-n for the vim dictionary feature.

As a “P” person (perl/python/php), it would be awesome to have “includes” include searching perl/python/php based on use/import/require&include. But I’ve not found how to do this. For now, tags will do. Same for C#.

Coupled with code folding, there is not much vim won’t do. I’ve been using vim for years, and I’ve always found it difficult to find good documentation. There is so much out there geared toward new users, that finding intermediate to advanced tips is difficult. :help is sometimes good enough, but other times I want more of a howto or users guide.

“Learn vi” should always be translated to learn vim, including regex, code folds and tags. Now I extend this list to include completion.

The Importance of Being Correct

I don’t like being wrong. I mean who really likes to be wrong? I don’t mind saying wrong things. I like to argue, so I often play devil’s advocate. This I enjoy. Its fun to challenge ideas and thoughts. Being wrong when figuring things out is fine. Being wrong on a long term decision or strategy is a real bummer.

I’m very proud of the firewall at my Dad’s house. It is an old tank of a desktop PC running Linux and iptables for network address translation. I’m sure it has protected my dad from the hell that many experience with cable modem viruses and the old Windows Messaging popups. I’m also proud that I installed Debian on it sometime in 1998 and never reinstalled. It moved from Debian 2.0 to 2.1 to 2.2 while in testing, back to 2.1 without hiccup. It is a tribute to Debian’s excellent packaging.

For the past year+ I’ve been running the 2.6 kernel on this particular computer. It has run fine. I noticed some network problems in connectivity between a long network drop from this computer to my Dad’s primary workstation. I did everything short of running a new drop. I replaced NICs in Dad’s computer. I recrimped ends. I added and removed hubs and switches in the mix. Connectivity always seemed poor.

Last weekend I finally upgraded to a recent 2.6 kernel. I installed the 2.6.10-1 debian package. I had been running a 2.6.5 package which I never upgraded. I didn’t see a need to upgrade. (please don’t comment about the numerous security issues with the 2.6.5 kernel. I know. I don’t care.) The 2.6.10 kernel fixed the connectivity issues.

I cannot beleive that 2.6.5 has some driver problems with the rtl8139 card, but apparently, that is the issue I was having. I haven’t had these kinds of issues with linux in a long time. I guess that is what I get for being an early adopter of 2.6.

The amazing part is that I only upgraded the kernel because I was there in person to install a large disk drive. I had tried using network disks, but because of the buggy driver, the performance was poor. Now that the network is performing, I can use network disk. This is good, because the disk that I put in has already died! It was an old 10G drive, so I won’t call it bad luck exactly, but it is strange luck for sure.

Moral of the story: I have no idea. Don’t rule out the bug being in the kernel or software…. maybe? … oh and being wrong sucks.

fun quiz

What “Happy Bunny” phrase are you?

hi, loser

You are a very outgoing and fun person. Everyone loves to be around you because your personality is so out there!

Personality Test Results

Click Here to Take This Quiz
Brought to you by YouThink.com quizzes and personality tests.

Nothing else much is up.

I’m trying to package mono-1.1.4 for ubuntu. Making debs is not as easy as making RPMS. Or maybe its not as well documented. I’m still not sure if dpkg-build ever actually runs make install. No biggie. I’ll figure it out eventually.

Nothing else much up. Need new music to listen to at work.

I Want to Pipe My Output to Two Commands

syndicate said, “cat file |/sbin/command | /bin/command2” would be cool.

Yes, it would be cool. I thought maybe it would be possible by copying file descriptors, but I couldn’t quite figure that properly. The magic was in using a fifo.

Specifically large read operations should only be done once. Lets say we are reading an entire disk using dd, and sending that somewhere via netcat.

Normally we would just dd if=/dev/sda | netcat somewhere 1234

But it would be nice to compare the md5sum at both ends. If we run md5sum /dev/sda we get the md5sum, but now we have read the entire disk twice. That can take a long time. Lets only read it once!

The solution looks like this:

mkfifo myfifo ; dd if=/dev/sda | tee mkfifo | netcat somewhere 1234 & md5sum test

The data is sent to the fifo and netcat at the same time. The fifo is blocking so it is important to read from as soon as possible, so we start reading from it with md5sum immediately.

A solution on the receiving end to write the file and md5sum it immeidately is as easy at tee:

netcat -l -p 1234 | tee file | md5sum