Tuesday, December 05, 2006

Interview Notes 1

Three of my old interview logs, maybe you can use them to help you prepare for one of your early career software programming job interviews. Maybe I'll put a more recent batch of these up later.


4/16


I had a phone screen recently, man those things are fun. First one in a while, though mostly just for fun, and I wasn't well prepared at all since it came out of the blue. I actually took notes afterwards, so I thought I'd briefly discuss the interview.

First we talked about Java's Access Control modifiers (public, private, protected, package) and about which each modifier did what. I couldn't remember package though. I feel stupid, because after I said I couldn't remember the last modifier, we talked about packages and I didn't make the connection for a while. We talked about what packages are, why we use them, and how to classes to a package. That's when I finally made that connection.

Then we talked about Interfaces. What they are, what they're used for, and why you would use them versus standard inheritance.

Next, we talked about Exceptions. The two types of exceptions, why to use throw versus try/catch, and how the Method Call Stack was used with Exceptions.

Then we went into Threads. He had me give an explanation of them, how to use them. I gave him some code of how to create a new thread and gave him some examples of when we use them without explicitly creating (in someone else's code, like with Swing, as well as when processing http sessions).

We talked about Reflection, what it is used for, and why it is used. I had to give some code using the refection package.

Next we went over databases. He had me give him code to make a simple query on a table and print the results out. He asked me a little about SQL also, like how to insert and delete stuff.

We then talked about Unit Testing and Functional Testing. I didn't know this. It turns out unit testing tests one class while funtional testing tests an entire project. He also asked me if I'd used Ant before. I told him I used Make instead, but I think I'll look into Ant now.

Lastly, we talked about J2EE. Three types (servlets, JMS, web services). We didn't go much into it since I didn't know much. And that was the end of the interview.


4/20

I had another interview; the people were very laid back there. The first interviewer mostly asked me about what I had done before. The coding questions were to write the code for a page of boxes with text in them, design a database layout for certain information, and then usin Javascript to resize a box when a button was clicked. With the second guy, we mostly talked about a card shuffling algorithm I brought up when I said I made a card game before. He told me about a "Perfect Shuffle", when cards interleave one by one. 7 (or 8) straight perfect shuffles result in the cards being in their original position, which is a technique used by card sharks. He asked me what kind of stuff I wanted to work on before letting me go. It was a pretty fun interview, all in all.


4/25

First stage interview today; went through three people in about an hour and a half.

First guy mostly talked to me about data structures. Started off with asking me how I would index all the pictures on the internet and make sure not to index pictures multiple time. I said to use a hash table. Then he had me do some pointer logic in c. How to reverse a string in place and how to copy one file to another.

The second guy asked me a lot about my old work experience. At the end he asked me one programming question, which was to write code copying

The third guy mostly gave me puzzles to solve. He asked me how many sugar cubes were in a cube that was 10 sugar cubes across and 10 sugar cubes high. Then he asked me some kind of math problem about finding out how long it would take to run across a field. Then, for some reason, he had me do some recusive programming: Just the Fibonacci code and traversing a tree. He ended by asking me a badly worded problem.

That problem ended up being this: Imagine you and your friend are on other sides of a river. There is a box with two locks: you have the key to one of the locks and your friend has the key to the other lock. Both locks need to be unlocked to open the box and the locks don't touch each other. You want to deliver an important message to your friend, but you can't do it yourself and you don't want to risk anyone else seeing the message. What do you do?

Of course, once I clarified the problem, I realized it was an encryption abstraction and answered: "Put the message in the box, lock your lock, and have a messenger bring it to the friend. He locks his lock and has the messenger return it to you. You unlock your lock and have the messenger return it to your friend. Now the friend unlocks his lock and takes out the document." And that was the end of the interview.

Wednesday, November 22, 2006

SQLite 3 and Java

The other day, I went off about how great SQLite was and everything, as well as how to use it with Ruby. Today I'll tell you how to use SQLite with Java. Just download SQLite JDBC drivers from here. Figure out where sqlite.jar and sqlite_jni.dll (native file) are, allow your java program to find them, and then access your sqlite database using JDBC. If you aren't familiar with jni and you're using windows, you can throw that DLL file into C:/WINDOWS. Support is cake for anyone who has used Java before. The documentation for the SQLite JDBC project can be found over here. As I said before, SQLite is a good database, especially for personal projects (where running your own database server is overkill) and quick testing. Also, the SQLite SQL implementation supports more than the in-memory database HSQLdb does, which I feel is the other good alernative. I'm liking SQLite more than HSQLdb. But I'm probably especially whiny about HSQLdb right now, since it didn't support the SQL case-when statement that I wanted to use for my last project.

As for examples... well, it's JDBC: the beauty of it is I don't need to give examples. But since I have examples, here's some very brief code to create a connection. If you don't know JDBC, read the JDBC documentation from Sun, it's probably worth knowing regardless of what you program for. With that, following this brief example (for which requires importing java.sql.Connection and having sqlite.jar and sqlite_jni.dll on your paths), I'm all done.

// Load the Database Engine JDBC driver
Class.forName( "SQLite.JDBCDriver");

// connect to the database
Connection conn = DriverManager.getConnection( "jdbc:sqlite:/filename", "", "" );

//close the connection. So pointless.
conn.close();

Monday, November 20, 2006

SQLite 3 and Ruby

As per my wife's request, I built a financial management spreadsheet application, because "we" needed to keep better track of our finances.. I'll probably go into that program some other day as it's actually proven useful. But enough about that, today I want to talk about the database I used for it. This database was SQLite 3. If you haven't heard of it, SQLite is an ACID-compliant relational database management system contained in a relatively small C library where the SQLite library is linked in and thus becomes an integral part of the program with the database accessed through simple function calls. Yes, that long run-on sentence was courtesy of wikipedia, copy, and paste. In my words: SQLite is a database that exists as an easy to access text file (via c function calls) instead of requiring an external database server to be running somewhere waiting for requests. A free and tiny embedded database with great SQL support.

My program was written in ruby. For database access, I used the sqlite3-ruby gem, which wraps up those c function calls with ruby. If you're unfamiliar with gems, they're simply packaged ruby applications that allow easy installs. Simply go to your command prompt and type in "gem install sqlite3." This will work as long as you've installed ruby with gems and have an internet connection.

Once you've installed the gem, you're all set. To show how easy it is to use, I'll go through a short example. This example creates a database with a table describing teams and a table describing how a certain team scored on a certain game. It then queries the database in order to print out team rankings. Yeah, it's an odd way to get that information, but it was part of a homework assignment I had. I'm unsure whether the query is very good, but it's going to serve as my example.

First, create your connection and (possibly) insert information thusly.
require 'sqlite3'

if( !File.exists?( 'test.db' ) )
db = SQLite3::Database.new( 'test.db' ) #The database is automatically created
db.execute( "create table team ( id INTEGER PRIMARY KEY, name VARCHAR(255) )" )
db.execute( "create table team_gm ( id INTEGER PRIMARY KEY, game_id INTEGER, team_id INTEGER, score INTEGER )" )
db.execute( "insert into team_gm values( 1, 1, 1, 5 )" )
db.execute( "insert into team_gm values( 2, 1, 2, 5 )" )
db.execute( "insert into team_gm values( 3, 2, 1, 3 )" )
db.execute( "insert into team_gm values( 4, 2, 2, 6 )" )
else
db = SQLite3::Database.new( 'test.db' )
end
Then query and manipulate data thusly. You've got lots of freedom here. I suggest to at least read the FAQ if you don't want to read all the documentation.
query = "select z.name, sum(case when x.score > y.score then 1 else 0 end) as wins, " +
"sum(case when x.score < y.score then 1 else 0 end) as losses, sum(case when x.score = y.score then 1 else 0 end) as ties from team_gm x " +
"join team z on x.team_id = z.id " +
"join team_gm y on x.game_id = y.game_id AND x.team_id <> y.team_id group by x.team_id " +
"order by wins-losses-ties desc"

db.execute( query ) do |row|
print row[0],": ",row[2]," Wins, ",row[3]," Losses, ",row[4]," Ties\n"
end
And finally close your connection thusly.
db.close
This database was exactly what I wanted and the sqlite ruby access is very simple. Granted, I'm probably way behind for not having used this before (I've been using HSQLDB for my "easy" databases), but at least I know now. I bet I'll be using it a lot now.

Monday, November 13, 2006

Regular Expressions and Dates

Regular expressions are great and I think programmers should always keep in practice with them because you really never know when it'll be useful to parse through text. When I was first learning Regular Expressions, I practised with dates. Eventually, I made myself a short program in ruby. It takes a string as input and if the string suggests a date, the program is supposed to figure out which date. Lots of stuff can be done with that date, such as a report of the day of the week, how far in days the date is from today, or when the end of the month is. All the calculations are trivial if a date is given. The tricky part was determining if a string specified a date, and if so, extracting the date.

As I said, I used regular expressions for figuring out what the date meant. I thought of all the formats a user might use and made a case for each of them. This has actually been a useful exercise and I've used the results of it a lot. The following are all the cases that I could think of... I very much doubt that I got all of them. Remember, this is for ruby, so the reg-exp formatting may be different for you. The i means ignore case and \A and \Z can be used to specify the beginning and end of the string respectively. The only way I can think of improving the recognition for now is to allow for spelling errors. Can you think of any other ways a person might reasonably suggest a date as a string? Here goes.

1. Of the format MM/DD/YY, MM-DD-YY, or MM\DD\YY. YY may be YYYY in any of the cases. This is the trickiest pattern, since the user may mean either Year/Month/Day or Month/Day/Year. Two digits for the year makes it difficult to assume what the user meant. I chose to use the Month/Day/Year form, unless the user uses four digits to specify the year, in which point it is easy to figure out what they meant. Therefore, YYYY/MM/DD is also a valid format . As for the year, if four digits are not specified, then I assume that they are specifying the current millineum (2000).
/\A(\d+)\s*(-|\/|\\)\s*(\d+)\s*((-|\/|\\)\s*(\d+))?/

2. Of the format "June 27, 1983", "Jun 27, 1983", or "June 27" (in which the current year is implied). Granted Junileropwf 27, 1983 would also be valid here, but I didn't think such cases were important enough to detect and were instead a waste the readibility of the expression. In specifying the month, a minimum of 3 characters are required. The comma is optional, but at least one space must separate the tokens. If a day and year are not specified, then day one of the specified month in the current year should be used.
/(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)([^\s]* (\d+)(.*))?/i

3. Of the format YYYYMMDD. It has to be in that order, I didn't make allowances in this case.
/(\d\d\d\d)(\d\d)(\d\d)/

4. Of the format YYYY. The date is interpreted as Jan 1 of the year YYYY.
/(\d\d\d\d)/

5. Last or Next or Current Day of the Week (ie last Thu, next Thursday, or Thursday). I used a minimum of three letters for the weekday name to avoid matching cases I didn't want it to match. Once again, I didn't test that the letters following the first three were correct because I didn't think it improved the match any more.
/(last |next |this |)(sun|mon|tue|wed|thu|fri|sat).*/i

6. Yesterday, today, tomorrow. Also, my wife and I made up words Yupterday (the day before yesterday) and Threemorrow (the day after tomorrow.) [--We wanted to make up for the lack of an English word for these common references. Yes, we're pretty goofy people. Please feel free to adopt the words.] The test for these is really simple and reg-exp isn't even really needed. It's actually less effecient if you want single matches, O(nm) instead of O(n). Here's the case for the heck of it:
/(today|tomorrow|yesterday|yupterday|threemorrow)/i

If you think the program I described might be useful, here's the whole current version as html. Do whatever you want with it. I've found it useful and added a bunch of date converting methods for flavor (like get the end of the month, return day statistics, or get number of days between two dates) , but the heart of the whole thing is still the regular expressions.

Wednesday, November 08, 2006

Some Funny Links

Today, I (probably stupidly) gave away the link to my blog to more people. To make up for the low quality of my previous posts, I offer some of the funnier links I've come across. Of course, they are probably the kind of humor that only I'd enjoy. But at least I tried. Yeah, these are all pretty old.

General
An old He-Man storybook with commentary
English Papers
How stupid Superfriends is looking back. Specifically, the Riddler.
Retitled Romance Novels

++ Images
Did I get the job?
Find X
My favorite web comic strip.
Bunny

# Some Programming Humor
1. Stupid Hacker
2. Evolution of a Software Engineer
3. Clock in Perl

Quotation of the day: "I like to throw sandwiches at the homeless. It satisfies both my altruistic and sadistic urges."

Monday, November 06, 2006

Good Free Reads

Stories are an important part of life. Not only are they entertaining, but they can effect your life if you let them. A good story will not only spark your imagination, but will give you new pespectives about the world. Of course, there are a lot of times where stories just take too long to read. I had a friend who brought books to work to read which he never ended up liking. It took months to finish each book and along the way my friend would lose interest. Good short stories would be way better for short bursts of reading, so I suggested some to him and he seemed to enjoy them a lot more. It worked well. And so I'll share with the internet in general.

The following is a list of online stories (that probably don't justify this really long introduction.) Although a bit on the computer geeky side, these are all stories that I think are especially good reads (which is why I wanted to share them.) They are all free, excellent quick reads that focus on ideas and characters rather than visualization and are located on fairly unsuspicious urls. In other words, they're ideal for fun short break or lunch time reading. If you know of anything else you think I should add to this list, please please please e-mail me. ^_^


Stories

(1) Orson Scott Card
Without doubt, Orson Scott Card is my favorite author. At his website, many short stories are provided. Here are my favorites.
   (a) Atlantis
It's very long and takes a bit before it's interesting, but it's really good once it does. If you've read Pastwatch, you might think you already read this... but you haven't, keep reading.
   (b) Ender's Game
If you like the book and haven't read this, I think it's still worthwhile. If you haven't heard of Ender's Game... after reading this, I'm sure you'll want to pick up the full novel.
   (c) Homeless in Hell
It's a Christmas story about an interesting interpretation of Hell and Santa Clause.
   (d) Missed
It's kinda on the sad side about a guy coping with death, please keep that in mind. Quite short though. One short break's worth.
   (e) Prior Restraint
This is a pretty interesting story, but I can't say anything about it without kind of ruining it.

(2) Neal Stephenson
   (a) Jipi and the Paranoid Chip
Lots of very cool ideas, flow of thoughts, and character interaction. As with Neal Stephenson's stuff, it has an abrupt ending.
   (b) The Great Simolean Caper
Interesting, it touches upon some of his normal themes. Smart characters, cool capers. Ending isn't as abrupt as normal, I think.

(3) Wizardry
Rick Cook wrote a series that blends fantasy with programming. Sound strange? It really isn't that strange and it's actually really quite cool. If you don't like fantasy or programming... then... maybe you should keep away. The first two novels (of five) were made free. They're the best ones anyways, in my opinion. These novels are pretty short, but it should still take a few hours to get through them. Maybe a week of lunches alone.

(4) Suzumiya Haruhi no Yutsu
This is a translation of a series of Japanese light novels. Some chapters are long, but it's not difficult at all to find constant good stopping points. This story is about a normal high school guy trying to deal with a very eccentric classmate who seems to unknowingly control the world and a bunch of supernatural people drawn to her. It's a comedy, mostly. Wiki for more information, but if you like Japanese comics/animation then this is an excellent find. There's also an anime of this series.

(5) Densha Otoko original posts
Umm... this is the black sheep of the list. It's not really a story, although it does tell a story. It's an organized, edited version of a forum thread that chronicles the relationship between an otaku (japanese super geek) at the thread asking for help and a non-otaku woman he had helped. It's pretty fun to read though... a very geeky romance story. Also, a Japanese drama came out of this (also called Densha Otoko), and it's pretty funny.

(6) The Book and the Sword
A great Chinese story to complement the Japanese stories. While the book is very long, the story arcs in the book are actually very episodic and pretty short. The Book and the Sword is a kung fu novel by Jin Yong and it's a really fun read.

(7) The Last Question
I can't really say I like Asimov's writing. I mean, I like his ideas and I do understand why he's important to sci-fi, but I don't like his writing style and so I rarely have fun reading his stuff. The ideas carry this story pretty well though. Since this was a pretty well thought out story, very famous, and a very quick read I decided to list it here. Passes the time on a very slow day, at the very least.


Essays

The following is a list of my favorite online essays. Any programmer and many non-programmers should find many excellent reads in this list. What's here deals primarily with introductions to ideas, examples of thought flows, productivity boosters, and springboards to interesting topics. While some are technical, they don't delve very deeply into the actual technology, instead giving you enough information to decide if you want to devote the time to really learn the topic. With all that said, here's the list. All good reads. If you know of anything else you think I should add to this list, please please please e-mail me. ^_^

(1) Orson Scott Card
Yep, my favorite author again. In addition to novels, he also does a lot of reviews and world commentaries on his web site. I find them interesting, even if I don't agree with everything that he says. These essays were carefully chosen by me as the ones that were the most interesting and thought-provoking to me. Read more of them if you'd like, as most of them are quite interesting.
   (a) Why Making Choices is So Hard
This is the first of OSC's essays that resonated with me. This talks about making choices.
   (b) Freakonomics
A review of Freakonomics, which is an interesting book. It also takes an example from the book and expands upon it, reaching another theory. I like seeing people's thoughts flow and this essay has a lot of very nice examples of thinking about cause and effect, as well as morality.
   (c) Weapons of Mass Destruction
This one provides interesting thoughts about what makes a weapon a WMD as well as some commentary about how OSC thinks the balance in the world works.
   (d) Taking Animals Seriously
This one is very interesting. It contains a lot of ideas about how people think, as well as how different people see the world. It does this by focusing on an autistic author who has devoted her life to making animal slaughterhouses more humane.

(2) Steve Yegge's Essay Collection
Link to his current blog
Steve Yegge writes a lot. His writings made me begin to really improve my programming and they constantly cause me to evaluate the way I think about things. That's why I believe these are very important. I think every programmer should read these because after reading, whether or not you agree, you will have thought a lot. Especially the fresher programmers, like me. Plus, they're pretty entertaining and he says funny stuff. I chose to list my favorite essays. Narrowing them down is difficult since I found it very worthwhile reading them all.
   (a) Tour De Babel
   (b) You Should Write Blogs
   (c) Five Essential Phone Screen Questions
   (d) Practicing Programming
   (e) Saving Time
   (f) Practical Magic

(3) In the Beginning, there was the Command Line by Neal Stephenson
In the End, I find this horribly long, boring in places, and a little out of date. But since I didn't grow up during the era, I ended up learning a huge amount from this. Some of the ideas are interesting, especially if you're pretty new computers. If you really enjoyed this, Mother Earth Mother Board is freely available too. This is another monstrously long essay... it might as well be a novel. It's about Neal Stephenson following FLAG, a global undersea fiber optic cable. He comments a lot about the history and politics around FLAG, as well as about his surroundings. But some spots are way too slow for me.

(4) Joel on Software: Best Software Writing
Essay Links for Best Software Writing
Archive Links
Joel on Software is one of those famous blogs with lots of entries worth reading. I can't think of anything in particular, except maybe this post. He released a compilation of what he felt were the best programming related essays of the year 2005. They really are some of the best software essays. Plus he talked about what makes writing good. The second link I've provided gives links to all the essays he chose. The last link is to his archives for his major blog entries. You may as well just start with the first essay there and work your way down.

(5) Random Tech Essays
   (a) 10 Question, 8 Programmers
This was a very interesting interview. 10 questions which 8 well-known programmers answer. Very, very interesting and a very cool idea. Everyone aspiring to be a good programmer should give this a read because it's good to know how those among "the best" view the field.
   (b) Lisp for Imperative Programmers
This is an introduction to functional programming where the reader is assumed to know only about procedural programming. Anyways, if you're a purely procedural programmer (C, Java, Ruby, etc..) and wanted to know what functional programming was all about, I can't think of any better read than this.
   (c) The Best 46 Free Utilities
This is a list of what the author considers the best windows free utilities for various tasks. I like his suggestions and this is the first place I will go if I want to find a new tool. Hey, it's kind of like an essay.
   (d) Programming Rock Solid Code
This is an interesting piece about the work environment of a place that must write the code to launch and run a multi-billion dollar shuttle.
   (e) No Silver Bullet
A classic CS essay about programming tools and languages.

Saturday, November 04, 2006

Jin Yong's Wuxia

Quick Summary of Links:
Romance of the Book and Sword (Buy the translation)
Sword of the Yueh Maiden
Return of the Condor Heroes (Divine Eagle, Gallant Hero)
Wuxia English Forum
Wuxia Fan Translations

Actual Entry:
I've been reading Jin Yong's (aka Louis Cha) Wuxia novels recently. Jin Yong is known as one of the best Wuxia writers. He created 15 Wuxia stories that are famous throughout a lot of the world. I've read three of the stories (soon to be four), but that's only because it's all the translated-into-english text I can find. If I could read Chinese, I could just read it all from here (but it's all simplified.)

Maybe I'm getting ahead of myself. Wuxia is a genre that comes out of China and literally means "martial arts heroes." They take place in China's past, usually among real events, but everyone's abilities are hyper exaggerated. It's a blend of philosophy, conflicting honor codes, and fantasy martial arts. The best I can compare it to in western culture would be modern takes on Arthurian or Robin Hood stories. I guess Westerns are kind of similar also. If you've seen "Crouching Tiger, Hidden Dragon", that's an example of a wuxia story. Except Jin Yong's stories are much better than these examples, and a lot more stuff happens involving much cooler characters.

If you like shonen japanese stories, there is no doubt you'll love the stories Jin Yong has written. In fact, you'll very likely like the novels more than those comics. I'm pretty sure almost all the really good anime fighting ideas (with the chi or martial arts moves) were stolen from China. The fighting used is really interesting and very well imagined. The novels have lots of romance elements, political plots, and technique-laden action. The characters are all really cool and interesting.

So far, I've read the Book and the Sword, Return of Condor Heroes, and Sword of the Yueh Maiden. I've ordered Deer and the Cauldron... but it's pretty pricey at $35 for each of the three books that make the story up. Each book I've read has been very good. Read Sword of the Yueh Maiden if you're doubtful. It's the only short story of Jin Yong's novels and it's a great taste of what the genre is like. For a full listing of his stories, please consult his wikipedia entry, from which you can also get summaries. Beware of spoiling yourself though. I'm going to go over the works that are completely available in English. There are a lot of translations of his, but most of them are in progress works.

Sword of the Yueh Maiden is a short story about two nations at war with each other. You can read it in English here. The weaker nation isn't weaker by much: its only problem is that the swordsmen of the other nation are far stronger. The story is about one of the court advisors looking for a way to overcome this weakness.

The Book and the Sword can be read here and bought here. It's about the actions of a very heroic secret society. It starts with several rescue plots until the "big secret" is uncovered. It has a large cast of characters, such as Chen who fights using go stones and a whip to hit accupoints. There's also the lightning fast one-armed brother and the Mastermind strategist brother. These characters are naturally all ranked in their organization. There are great and powerful female characters as well. It's all great fun.

Return of Condor Heroes follows the growth of a boy named Yang Guo and his relationship with his teacher Xiaolongnu. Yang Guo is the brilliant son of a defeated villian and no one wants him to grow up like his father. However, all his masters treat him poorly so he runs away to a cave where he becomes the student of Xiaolongnu. Lots and lots of stuff happen from there and Yang Guo grows stronger and stronger even despite bad things happening all the time. It's been fan translated and that translation can be found here.

The Deer and the Cauldron was translated into English and released as three installments. Book one can be purchased here, book two can be purchased here, and book three can be purchased here. I haven't read it yet, but it's supposed to be funny. I will update this when I get to read it.

The Fox Volant of the Snowy Mountain was also translated into english and can be purchased here. However, I've heard that the translation was really bad.

Unfortunately for me, these books have been adapted into TV series, which I've been spending a lot of energy recently obtaining and then a lot of time watching. These series all last about 40 episodes and it's still not really enough time to show all the events from the novels. Furthermore, these things are pretty much corny and horrible as far as I've seen. They try to rely on cg effects that would be embarrassing in a old playstation game and really has no business in a live action film. I also don't like all the unnatural sounding voice dubs. Despite all my problems with them, I keep watching and am slowly beginning to enjoy it. The stories are good and every once in a while, things are done right (read: not ridiculously poorly.) The only one I've seen like that so far is Tian Long Ba Bu 2002. Return of Condor Heroes 2006 was ridiculous, but the actors looked too cool to complain too much. Okay, mostly Liu Yifei.

Tian Long Ba Bu follows three fairly different heroes whose paths constantly intertwine. There are a lot of characters here and a lot of twists. It's a fun series to watch and no segment really drags for very long. Some story arcs are especially gripping. The best thing is that there are so many characters that are very likable and all the different storylines are equally interesting. The thing that makes this a good tv series is the (relatively) low use of CG, the good casting, and the actually fun to watch fight scenes. I hope I can find another adaptation like this.

I want to mention that, so far, Jin Yong's stories are the only wuxia I've read that I'd really recommend at this point. I've gone through The Sword and the Exquisiteness and Sentimental Swordsman, Ruthless Sword by another very famous wuxia author, Gu Long. While I did read through them both, I didn't like them very much. I couldn't relate to his characters and I felt that they were very one dimensional - a few very good, many very bad, or some inconsequential. I do not feel that he built a very compelling or deep world for his stories to take place. I read his wiki entry, and I think that the differences I saw between Gu Long and Jin Yong are reflected in the ways that they led their lives.

And that's all I've got to say. I just wanted you to give this genre a try if you haven't already, y'know, bring it to your attention. I had no idea about the quality of this stuff until I happened by it after reading the wiki entry on the movie Kung Fu hustle. I mean, you want to open your horizons and see what popular Chinese fiction is like, right? I tried to explain it, but there was no way I could do the stories justice. So please just follow any of the links I gave earlier and give it a try. If you'd like more information, read Jin Yong's wikipedia entry, the fan translation base, and this forum. I'll update this entry as I get more information and as more translations are completed.

Oh, and one last thing slightly related thing. I recently found a freely available translation of the Romance of the Three Kingdoms. If that interests you, take a look over here.

Tuesday, October 31, 2006

Essential Program End

So it did end up taking a full month for me to list all my much-loved programs after all. I don't think I'll be doing it again. Instead, I'm going to put up the full list of my essential programs over here, which I'll keep updated with all the good stuff I find and use. I don't think that this will happen very frequently, except with those firefox plugins. I also added a section for the quick games that I like to have around; a solitaire hater's solitaire.

Monday, October 30, 2006

Essential Programs 1: Nifties

These are applications I love... but I guess I could live without. They make my life easier and help keep my eyes, brain, and wrists happy. For me, they are necessary applications for convenience.

() Unlocker
I organize (read: cut and paste) my directories a lot and use external drives frequently. Windows is pretty stupid sometimes (read: very often) and annoyingly locks files so that they can't be moved or deleted and the external drive can not be stopped. Using this program, it's very easy to free things up (right click and click unlock over any file or folder.) Now you can delete and move stuff or stop your external drive.

() TaskSwitch XP
Much desired (by me anyway) improvement to alt-tab. It allows the window to be "stickied" and it will not close unless the enter or escape key is pressed. Also, it allows you to exclude programs from the list, move minimized windows to the end, and all kinds of other convenient things. Download it, play with it, and if you don't like it remove it. But you'll probably like it.

() EjectMedia / RemoveMedia
To safely remove external disks (like an external hard drive or a USB drive), you normally have to right click some icon, double click another, right click again, and finally tell windows to stop the disk. These programs allow you to do this in one step: "EjectMedia.exe E:". Tie it into your Super Smart Windows Input/Output Box and you get a much simpler way of stopping your devices. You could also script it together with Unlocker for better use.

() TweakUI
This allows you to tweak a bunch of stuff in windows. Like... it let's you remove the recycle bin from the desktop, customize displays... man, too many stuff. Just download it and play through the options. If you don't see anything useful, just uninstall it.

() More Firefox Extensions
() Statusbar Clock
Puts a clock in the status bar. I use dual screens, usually with firefox opened, so this allows me to see the time when I look at the bottom right no matter what. This is important to me, though it may not be for most people. I just really like to know the time.

() Clear Private Data Button
Adds a button to clear private data. It's useful when you need it.

() Mouseless Browsing
This is an extension that I love the concept of, but I still think needs a little work. Essentially, it assigns numeric ids to links so that you can quickly select the links without needing to use a mouse. However, sometimes it can take quite a while to assign all the numeric ids, which makes the whole thing pointless. I would like it a lot more if I could have it automatically be on for certain sites. Nevertheless, I like the extension a lot and I do use it when I really want to avoid the mouse.

() All-In-One Gesture
This allows you to do tasks (like back and forward and close) by using the mouse. I'm still undecided whether or not I really like this. I'm not quite sure how much it gets in my way and causes me to do stuff on accident. The only gestures I occasionally use are for back (left), forward (right), next page (>), previous page (<), and close (down) anyways. I dunno... I'm generally anti-mouse anyways also... but even though I rarely use it, it is really cool idea...

() Customize Google
Another one that I'm not quite sure if I really like or not. I don't want to block google ads and the customization doesn't really mean that much to me. Mostly, I like the google images links going directly to the real image. Is it worth having a whole extra extension for this? I don't really know.

Monday, October 23, 2006

Essential Programs 1: Occasionally Essential

I use these, but not all that much, so I wouldn't really say I *need* them. They are incredibly useful the times I do need them, which might happen a few times a month, if that.

() Virtual CD: D-Tools
Every once in a while, I find this useful. It allows you to load a cue/iso file as a real CD. I prefer it to Alcohol 120%. Also, It's free.

() Office: Microsoft Office
Sometimes Microsoft Word and Excel are necessary, so... I very rarely use this stuff anymore though, mostly just when people send me stuff or expect me to send them stuff that is in these formats. I prefer html tables to organize my lists and text documents nowadays for my
work. At work, I do use Excel frequently though. Too bad the suite isn't free.

() CD/DVD Burning: Ahead Nero
Yeah, this is common and it's not free (though you get it with most of your Burners nowadays). I rarely burn stuff anymore (external hard drives and usb drives have replaced most of my needs for cd/dvd), but when I do need to create a cd/dvd, this is what I use. Perhaps it's not the best tool. I really don't care.

() Visual Studio
For C# and windows application development.

() More Firefox Plugins

() IETab
(Text stolen from joelonsoftware) IETab takes advantage of the fact that Internet Explorer is available as an ActiveX control, which is available to be embedded in any Windows application, to open certain websites in Firefox using Internet Explorer. Whenever a website comes up complaining that you need to get "Netscape 4.0 or some
other modern browser" you can just right click on the tab and it'll pop up right in Firefox being rendered by Internet Explorer. You can set up a list of websites that always come up in IE tabs.

() Web Developer Extension
This helps web developing an incredible amount. I can't imagine not using this toolbar and trying to design a site. It lets you disable anything, resize the window, mark boundaries, validate code, and tons more.

Sunday, October 22, 2006

Essential Programs 1: Essentials B

() System Measurements: Rainmeter
This program is a bunch of meters. It has a plug-in architecture that allows you to measure anything you want, but I find plug-in writing... very time-consuming, though I wrote some that I use. Most importantly, it does all the measurements of the task manager. However, it stays on your desktop and you can (somewhat) easily configure the appearance. I admit that this kind of slows down the system and isn't all that necessary... but... I can't help but use it because it looks cool. I have a key combination that pops it up on the screen for me. Here's a snapshot of my set-up:. And here's some skins.
() Skin Set I use. It's a modification of other skins that I found.
() Original Ayuka Skin in English
() Original To Heart 2 Skin
() Good weather set

() MP3 Player: Winamp
Okay, I really have no good reason for using this other than it was my first MP3 player. My wife prefers the Windows Media Player, and most people use iTunes now (it seems)... but, I stick with winamp. I don't really configure it at all (I have four different playlists and make sure breaks between songs are clear). All I use it for is listening to MP3s, which I can queue (but so can everything else). Well, although I don't strongly recommend it, I've never been dissatisfied with it, so that is that. I use an old kare-kano skin for it because I haven't spent any time looking for new ones. But it is really annoying that winamp does not internally support Unicode (or any other kind of language support).

() Anti-Virus: NOD32
This is not free at all, but it's the best Anti-Virus program I know of. It catches a lot of stuff Norton and Symantec don't catch, and that doesn't seem to happen the other way around. Anyways, you can search for free anti-virus programs if the cost for such an important program is an issue (but in that case, why are you using xp instead of a unix-like system?)

() Anti-Spyware: AD Aware
Not that good, but it gets rid of spyware. I'm currently looking for a replacement to this.

() Registry Cleaner: RegCleaner
Based on what I've seen, I believe that cleaning the registry helps. This is the best free registry cleaner that I've found and I've read it has one of the lower chances of messing things up. Lots of people suggest the general tool CCleaner to me, but I don't like it as much.

() FTP Client: Filezilla
A simple to use FTP Client that has all the features you'd expect. It's also completely free, which is a huge plus to me.

() Cygwin
Umm... http://en.wikipedia.org/wiki/Cygwin. Either you need at and have it, or you have no idea what you'd do with it. I guess there's that slim chance you need it and haven't heard of it... but... well, just read up.

Monday, October 09, 2006

Essential Programs 1: Essentials A

() Text Editor: TextPad 4
This program isn't free (though there is a never-expiring evaluation version) and isn't really all that great (compared to vi and emacs, anyways). However, I've been using it for my windows development for a while and I really got it customized to my likings, so I stick with it. I hope to migrate over to emacs soon, but the learning curve for a good Text Editor is just so steep and I'll have to translate all my plugin code. So for now, I've got this.

() Video Codecs: K-Lite Codec Mega Pack
This is all that you need in order to play video on your windows machine. Whenever you find a new video format you can't play, all that means is that you haven't gotten the latest codec pack. It comes with the "Windows Media Classic" and "BSPlayer" players. Personally, I use "Windows Media Player Classic." Make sure you get the "Mega Pack" version, otherwise you don't get Real Media and Quicktime alternatives.

() BitTorrent Client: Azureus
For me, this had the best download speeds of the three I tried (uTorrent, BitComet, Azureus). This could have merely been coincidence, so I'll be redoing my tests soon and my client may change as a result. However, I really like the plugin architecture and there are a few plugins that I really love. Plus, I've got lots of memory and I grew up on Java. The plugins I really like are:
(1) Auto Speed
(2) Auto Scheduler
(3) SafePeer

() Super Smart Windows Input/Output Program: Windows Miko
The mouse slows you down. While it's great for intuitive design, it's horrible to use for things you do a lot. I know it hurts my wrist, slows me down, and annoys me in general. And so I really suggest writing what I call a "Super Smart Windows Input/Output Program." It's basically a command prompt (I really miss using *nix at work), except more catered to your needs. "Windows Miko" is my implementation, written in Ruby. The main idea is that you type something, and Miko does something as a response (opens a web page, makes a note, gives you information, does a calculation, launches a program...). It uses regular expressions and is very extensible. She has a plug-in personality and appearance also.

() Hot Launcher: PS Hot Launch
This application allows you to run programs from key presses. There are some keys and combinations it doesn't allow you to use, but letters, numbers, alt, shift, and win are all available in any combination. It's wise not to use too many keyboard shortcuts though because they aren't intuitive at all. I think a Hot Launcher is best used with scripts. For example, my key press "Ctrl+Down" replaces "Alt-F4" via an AutoIt3 script. Also, I use "Win-V" to go to Windows Miko, and from there I can quickly get to run any progam by some nickname. This is faster than using a mouse to double click an icon somewhere and doesn't require worrying about key conflicts or contrived combinations.

() Sequential Art Viewer: CDisplay
The best, by far, image viewer to read my manga with on a windows machine. At some point, I considered writing my own software, but there isn't anything that I would do differently than this program. If you read scanned comics in Windows, this is probably your best bet, you just have to try it for yourself to really understand. Its best features are allowing you to view two pages at a time and its smart "next" feature. I also modified my right click menu to open folders with CDisplay.

() File Archiver/Zip Utility: 7-zip
Unzipper, basically on par with WinRar in its unzipping. The major difference between the two for my purposes is that it is completely free. I actually do like using WinRar better, but I'm not willing to pay for it yet and so refuse to use it. You may have a difference of opinion.

() IM Client: Trillian
This is the instant messenger client I use. It allows you to chat with people using AIM, Yahoo, MSN, and ICQ protocols. I have friends that use these different clients, so it's useful to have one program I can use to chat with all of them. I'm aware of the IM client Miranda, which can be made to look very cool. Since I like how Trillian looks on my desktop and it seems to have no other benefits, I've stuck with Trillian.

() Image Editing: Photoshop 7.0
Definitely not free, but I think it's worth it. Plus, I've been using it for years, so I am pretty familiar with it. For web sites, I think it's pretty important to have a real good image editor.

Tuesday, October 03, 2006

Essential Programs 1: Web Browser

Web Browser: Firefox
My main browser, I doubt I have to justify its inclusion to you, so I won't. I will admit Opera is tons faster. But firefox's customability (its options, themes, and extensions) wins me over. For themes, I switch between the default, opera, and iFox themes. As for extensions (plug-ins)... They are the reason I love firefox, so I'm going to list out all the ones that I use.

() Linkification
This plugin changes plain-text urls to hyperlinks in html (stuff you can click on). For example, certain forums do no allow hyperlinks, so instead people type them out. To visit their links, you probably have to copy and paste into the address bar and press enter. Linkifcation will style the link text and let you click on it directly. This extension is very similar to Text Link (which allows you to go to the textual link by double clicking on it.) Supposedly, Linkification is slower to use because it needs to parse the entire page first. I decided to go with the better usability, but I'd use Text Link if i was worried about performance.

() NextPlease!
This extension allows you to easily go to the "next" and "previous" pages. For example, instead of clicking the "Next" link on a google search, I press Shift+Ctrl+Right. This becomes very useful for me when browsing forums. It works by looking for links with certain keywords (reg-exp) or specific images, and you can customize it as you need. I think it's my favorite plug-in.

() Tab Mix Plus
Gives you a lot of control over your tabs; you really have to install this and play around with it to understand its usefulness. A few of the nice features of this is session saving, tab progress bars, specifying tab widths, and allowing multiple rows of tabs. This offers so much, so I won't even try to explain it all, you just need to try it out. If you want to see my preferences, here they are: My Preferences.

() Download Status Bar
Shows your downloads in a new bar above the status bar instead of opening that annoying popup download manager. I hate the download manager and this interface is very, very nice (and customizable.)

() AdBlock
() Adblock Filter Set G
Probably the best ad-blockr available. I think Firefox has a lot of these features built it, but it really makes customization and setting up new things to block very simple. I tend to leave text and most image as, but I block all pop-up and flashing ads. The filter just allows Adblock to update its list of bad ads every four days or so.

() Gmail Manager
This extension notifies you of new gmail for multiple accounts. You set it up to check for new mail at set intervals. It'll bring you to your account in a single click. It's very handy, at least, if you use gmail with multiple accounts and are forgetful in checking it (that's definitely me...)

() Organize Status Bar
This extension allows you to organize your status bar. It's useful because a lot of these extensions will place (usually useful) icons in the status bar. Sometimes, you really don't want them. Other times, you want them in a different order. This extension can fulfil both wishes.

() Menu Editor
This extension allows you to edit firefox menus. This includes all the top menus (like File and Edit) as well as the menu when you right click anything. Similar to organize status bar, this is mostly useful to remove the clutter from the other extensions. However, I did end up clearing up a lot of menu items under the Tools menu as well.

() Session Saver
This extension lets you save your sessions. It automatically goes about its business in the background, so even if Firefox crashes or you accidentally close it, you can have it go back to what it was. It even saves the text and such that you had entered. Tab Mix Plus does this, but I find this plug-in does a better job.

Monday, October 02, 2006

Intro to Essential Programs

I thought about it, and I decided to start listing out the programs that I use most often. If you're anything like me, you'll like the list, unless you already use all of it. Oh, last thing. Please don't take the following few posts as a best of list... seriously, I don't have the time or energy to research what "the best" is. These are just my favorites out of what I've seen, I don't claim to have sniffed out the best out there (hopefully they're among the best though). If you want more general yet all-encompassing "best of" lists, let me point you to:

The 46 Best-Ever Freeware Utilities

100 Best Freeware Utilities

So, pretty soon, I'll start posting stuff, let me know if you have any suggestions of better stuff, I'm always willing to take a look at other tools. This series of posts may very well completely fill up the rest of the entire month.

Saturday, September 30, 2006

Screen Saving and Locking

I use dual monitors and I liked the windows screensaver that cycles through your images. However, that screensaver only works on one screen (at least for me) and I am using two. I found the google pack screensaver which will get the images on both screens (and do some other nifty stuff, like an photo stacking effect and specifying multiple image directories to draw from.) I use a modified version of the screensaver that removes the google logo and doesn't require you to download the entire google pack.

Here's the link.

If that link doesn't work, use this one.

Oh, and there's another screensaver related thing I did. We all know how to set the screensaver to turn on and lock after "x" minutes. And we (probably) all know how to lock windows manually (I use the built in win+l shortcut myself.) But... how can you turn on the screensaver and lock windows manually?

If you run the screensaver by double-clicking it (or executing the file without any options), it actually runs in its "test" mode, so the computer isn't locked. In order to get it to run AND lock the computer, use a batch file (text file that ends in .bat) with the following text:

::initiate screensaver of choice
"[insert path to google screensaver program; i.e. C:\gbsaver.exe]" /s

::lock the workstation
%windir%\system32\rundll32.exe user32.dll,LockWorkStation
I mapped that batch file to "win+;" using PS Hot Launch and it has worked very well for me; instant screen lock and a nice showing off of pictures to my friends to coworkers. I bet they really apreciate that.

I do realize that since I'm using LCD monitors, screensavers don't really save the screen. With CRT monitors, screensavers changed the image on the monitor so that no image got "burned" into it (my wife's old crt had an error message ghosted into it.) With LCD monitors, it just wastes power and probably wears down the life of the LCD. This tweak was for fun; I have the monitor power off after 10 minutes or so anyway. I mainly use it to show off my cool images and getting rid of the boring lock screen. Also, it helps me not feel so bad about downloading so many wallpapers, but never using them. Read more about screen savers and their history at wikipedia.

Wednesday, September 27, 2006

Changing That Green XP Start Button

Here's all the best information I could gather on changing the look and feel of the Windows XP non-classic start button. You know, that annoyingly green button on your side bar. I'm pretty sure that somewhere there's a program that you can simply run to do this all for you. But these instructions are all "do-it-yourself"... meaning you'll be playing with the registry and system resources. I think it's pretty fun, pretty simple, and gives you a better idea of how Windows works. Have fun and say goodbye to your bright green start button! And good luck trying to think of something better to put there, I just got replaced the button with a line and an all black windows logo icon. And that's all I have to say.

Changing the color of the start button

Changing the text and image on the start button

- Image Replacement tips from Yuki (above link) -

I would like to comment about the shape of the start button icon.

There are some examples of customized start button icon in the web; they all are rectangular in shape. But you notice that Windows default flag icon is not such a shape and it "blends" to the start button.

This blending is produced by an "alpha channel" in the default bitmap image. To see it, open the bitmap in the explorer.exe with ResHacker, choose "Action -> Save(S) [Bitmap : 143 : 10xx]...", and save it as .bmp file. Then you can open it with an image processing program such as Photoshop and see the alpha channel in the channel palette. You can not see it by simple copy and paste from ResHacker to Photoshop.

Alpha channel is a grayscale image hidden in the file that indicates the "opaqueness" of the entire image. White means complete opaque, black means transparent and gray indicates semi-transparent with its darkness.

You can create your own image with an alpha channel like the original. Don't forget to check the "Include alpha channel" checkbox in save dialog of Photoshop. Save your own, replace it with original bitmap in explore.exe and you can have your beautifully "blended", custom shaped start button icon.

The size of default icon is 25 pixels in width and 20 pixels in height for "Luna" theme (ID=143), but you may notice a complete black (transparent) region of 5 pixels width at the rightmost of the image. Apparently, this region is intended to make a space between the icon and the following text. So if you make an icon with no margin (or no alpha channel), the icon sticks to the text. This is not beautiful, of course. So the default size of Luna theme icon can be explained as 20 * 20 pixels with 5 pixels space. Curiously, the default icon for "Classic" theme (ID=176) is 16 * 16 pixels, without any space. Luna theme can be space-consuming. This is probably for considering generalization of wide-screen. The size of icon is not restricted to 25 * 20, so you can create smaller icon instead.

By the way, I think it is dangerous to overwrite explorer.exe without testing. You can test it by Ctrl-Alt-Delete, quit explorer.exe, run your own such as C:\WINDOWS\explorer2.exe as a new task, and see it.

You can rename explorer.exe while it is running. So you can easily rename explorer.exe in simple safe mode with explorer. Command prompt is not necessary. Safe mode is necessary to bypass system file protection. Go to C:\WINDOWS in safe mode, rename explorer.exe to explorer_orig.exe , rename your explorer2.exe to explorer.exe and restart the PC.

Tuesday, September 26, 2006

Introduction

Hey all, I'm Jonathan Discar and this is my blog. Due to the influence of reading many blogs recently (mostly, the influence is from Steve Yegge) I decided to start up one of my own. I could go on and on about why I did it if I wanted to bore you, but basically the decision was made because I want to improve my typing speed. I don't have much important to say right now, but I'm hoping that'll change someday. Until then, I decided to mostly share stuff I've found entertaining or handy. It shouldn't be very complicated or controversal, but hopefully it'll be useful to some people and not entirely boring and personal. So, computer techy tutorial and link highlights mostly. We'll see how this goes. After a while, when I finally really realize no one is going to read this and th blog becomes truly just for me, I'll be way more loose and babble on endlessly about random thoughts: worse than I'm doing now. I'll see, I'll see.

Oh yeah, this is me: I'm currently 23 years old and I'm a programmer. I primarily make stuff using Ruby and Java. My personal projects tend to be programming automation tools, websites, and tinkering with new technologies. I like to tinker with stuff and I spend my free "zoning-out" time surfing for random infomation, reading some book or another (usually in the genre of sci-fi, fantasy, manga, or programming), playing video games, or watching japanese anime and the occasional tv show, usually a sitcom. I spend the rest of my free time cleaning up and hanging out with friends. Nope, no traditional hobbies with me. Man, what a very vague bio.