May 2007 - Posts

Now that's what I call a desktop!

Think of the possibilities:

  1. Magic the Gathering
  2. Internet mahjong; with realistic tile shuffling -- none of that randomizer stuff
  3. Solitaire, the way it should be played
  4. CRC cards!
  5. UML
  6. Billiards
  7. Table Hockey
  8. Piano
  9. Drums (pressure sensitive?)
  10. Massage tutorial !
  11. DJ mixing table
  12. Computer sculptures
  13. StarCraft II
  14. And finally, tables that turns blue all of a sudden...

http://www.microsoft.com/surface/ 


Posted by jop | 3 comment(s)
Filed under:

Hex

Open a file on Binary Editor using Visual Studio's Command Window

> File.OpenFile myfile.dat /editor:"Binary Editor"

 

Posted by jop | with no comments
Filed under:

Composed Method Pattern

Msg #129624 on the extremeprogramming Yahoo! Group

Some people swear that they would rather see all the code in line,
rather than separated out into small methods. I think that the
in-line people should be prevented from breeding.
-- Ron Jeffries regarding the Compose Method pattern.

Haha!

Posted by jop | 1 comment(s)
Filed under:

Muscle Memory

Eight years ago, a friend of mine introduced me to the world of Unix (you know who you are -- thank you). After mastering the finger ballet that is emacs, I then discovered the wonders of modal text editing in VI. Those are the first *real* programmer editors that I've used.

The power of Emacs lies in Lisp. It is a very programmable editor. It is so powerful, there actually came a time when Emacs is the application that I use for majority of my tasks. It has a mail reader, news reader, file manager, web browser, - it even has Tetris!

The power of VI lies on the conciseness of its commands and its integration with command line utilities. Unix provides lots of little utilities for slicing and dicing text. On a conceptual level, these utilities are very much like SQL for text files - you can query and join files (cat), filter lines (grep) and do all sorts of things with text.  In this conceptual level, VI is like Query Analyzer for text files.

These editors both have a steep learning curve. It took me a few hours just to get used to the environment and learning the basic commands.  That sounds silly - editors should be simple - open a file, type in text, save, and close. These editors are not like that. These editors are arrogant. If you make a mistake, they will just pout and let you figure it out. However, once you've learned the commands/shortcuts, muscle memory kicks-in and you'll not even notice that you're using a different editor at all. Then you'll have withdrawal symptoms every time you use another editor. :w

As a programmer, you owe it to yourself to learn at least one of these very powerful utilities. Even in this PostIntelliJ era, these editors are still very relevant. Of course I'll still use built-in editors of VS.NET/Eclipse on my day to day work (I guess once you're addicted to Intellisense, you can never go back), but there will always be instances where the built-in editor just doesn't cut it. CSV, XML, HTML, CSS files, SQL scripts are all those files that doesn't have the same level of tooling present on mainstream programming languages. Whenever the need arise, you can pull out your VI and start slicing!

:wq

Posted by jop | with no comments
Filed under:

Logged

Notepad has this cool feature that I never seen anyone ever use. When you create a file and place the text .LOG on the first line, Notepad will take that as log file. Everytime you open that file in Notepad, a new line will be appended containing the timestamp and the cursor will be placed under that new line.

I've been using this feature for years now. This is my sole reason for still using notepad. I maintain a LOG.TXT on my home directory, and whenever I think of anything that needs to be remembered, I just [Win-R] LOG [ENTER], type in the idea [Ctrl-S] and [Alt-F4] - my idea is now safely tucked with a free timestamp.

I still have the log files from way back 1998. Most of my entries would actually make good blog articles. Maybe I can post some of them here.

Btw, I first saw this feature on Windows 98. When I tried it out on Windows XP and 2003, it is still there. I wonder if this still works in Vista?

Posted by jop | 3 comment(s)
Filed under: ,

Tears, Flying and Nightmares

I almost got teary eyed after watching the official StarCraft 2 cinematics and gameplay videos. The game brought back a lot of memories - flying command centres, shouts of frustration, and people getting nightmares because my zerglings have reached their bases... again.

Now, if I can only find out where I placed my build order cheat sheet...

Posted by jop | 5 comment(s)
Filed under:

The Web -- Distilled

I know that Google has a mobile website, but I didn't know how good it is. I never had a chance to try it out until I got a new Playstation Portable.

Digression: I was initially eyeing the Sony Reader but I just can't find the device here in Singapore. Despite being online for almost all of my waking hours, I'm still very much a low-tech buyer. I have never bought anything online and I don't even have an online banking account. I like to touch whatever it is that I'm buying before I take out my Moleskine (which doubles as my wallet). I'm not going to start now. The Playstation Portable, however, is quite popular here. I'm quite interested in the big screen - perfect for reading PDF (which is does not support) and HTML (which is does). Anyway, there are applications that can convert PDF to HTML so there's no problem there.

Back to the main story.

PSP supports WiFi. That's a good thing because Singapore now has island-wide free internet access. Just what I need  ;-). - free internet access while waiting for the train. Naturally, I'm going to find out how to read my RSS feeds from PSP. The device has a built-in RSS reader but I don't want to use that. I use Google Reader at home and at work it is working quite well. I can access Reader using PSP but I can only get the top menu bits. The device's browser doesn't support Ajax!

I guess the next best thing is the mobile interface. You can access using this URL - http://www.google.com/reader/m and you will be asked to enter your username and password. The interface is very minimal but usable - just what I like (I'm one of those people who still uses lynx). It strips out the ads and just leaves out the text and images.

And here comes the best part: when you click any link on Google Reader Mobile - you also get a mobile version of the site that you are going to! Instead of going to the address directly, the url will be passed to the Google and all ads are also stripped out. What you get is just the essense of the page.

Btw, nothing going to stop you from using Google Mobile on your desktop PC. You can get the distilled version of your website on any browser. Quite useful when you are at work pretending to, erm, work. :-p. Use responsibly.

Posted by jop | with no comments
Filed under: ,