Development


0

I stumbled across this little nifty debugging feature in Eclipse this morning. Turns out that you can write a little code snippet as part of formatters for different classes.

This is very useful because you can get custom display an object in debug mode without touching the original code override the toString() method in the class.

Code Assist also works in the little code snippet editor, of course…

Sweet!


0

I recently discovered this nifty mode called “wdired” (writable dired). It gives “dired”, the simple directory management tool within Emacs, some editing functionalities.

In short you can “edit” contents in a directory. With it, you “edit” a directory like a file buffer. So instead of making changes one file at a time, this mode lets you leverage Emacs editing commands and batch up your changes in a buffer and then apply all of them when at one shot when you “save” the buffer.

This saves me a couple of minutes when I had to do some mass file manipulation last week. I was able to use query-string to selectively move large number of files and fix broken symbolic links.

Sweet…

0

One of the things I love about Emacs is its extensibility. It has all sorts of different edit modes for different file types. For example, SGML mode comes standard for editing XML & HTML. It’s a step up from normal text edit mode, it renders tags in color fonts. But it’s pretty plain vanilla editing– no syntax validation nor smart tag completion.

I started to use nxml-mode earlier this week and am liking it. Here’re some of the nice features:

  • Smarter rendering of tags
  • Real-time syntax checking
  • Tag completion
  • Support of folding
  • Link handling

You can download nxml-mode here. The latest file as of this writing is “nxml-mode-20041004.tar.gz”. Unzip the package into the standard emacs “site-lisp” directory (it’s /usr/share/emacs/site-lisp on my macbook).

Configure it to auto-load and bind to various file extension via the following configuration in your .emacs file:

(load “rng-auto.el”)
(add-to-list ‘auto-mode-alist
              (cons (concat “\\.” (regexp-opt ‘(“xml” “xsd” “sch” “rng” “xslt” “svg” “rss”) t) “\\'”)
                    ‘nxml-mode))
(setq magic-mode-alist
      (cons ‘(“<???xml ” . nxml-mode)
            magic-mode-alist))
(fset ‘xml-mode ‘nxml-mode)
(fset ‘html-mode ‘nxml-mode)

5

Sometimes instead of running several sessions of SSH’s or putty’s, I run Emacs with multiple shells– this cuts down on the number of windows I have to deal with.

To run a shell in Emacs, you invoke the Lisp function “shell” via meta-x shell. This creates a buffer called *shell*. Running it the second time though doesn’t create a 2nd shell buffer as you might expect, instead it brings you back to the original shell buffer. The trick is to rename the original buffer to avoid name collision. The quickest way to do this is via “rename-uniquely" function via meta-x rename-uniquely. It renames the buffer to a similar but unique name like "*shell*<2>“. Now if you start another shell.

The better behavior is for Emacs to automatically create new buffer with unique name. Perhaps there’s a hook to configure this that somebody can point me to.

0

Last week was the big launch of Firefox. This week, Eclipse Ganymede will be launched tomorrow.

Eclipse is a popular open source IDE. Each year, the Eclipse Foundation ships annual releases, so far around the summer. It’s a release vehicle where all major Eclipse projects release & synchronize their code. The Ganymede (all releases are named after Jupiter’s moons) release this year represents a simultaneous release of 24 eclipse projects– an incredible scheduling feat if you ask me.

I’ve been using several release candidates and so far so good. For an overview of the new features, check out this article. Coolest feature is probably muti-core CPU support.

So, go get the bits here.

0

This week has been full of conferences for me. First I attended Interwoven’s GearUp. It was fun in part that I got to hang out with my friend Bill (an Interwoven employee) for a few days. I haven’t seen much of Bill last few years. The keynotes were usually boring, but the highlight was Guy Kawasaki’s presentation: most lively and entertaining keynote I’ve ever attended. Big take-away from Guy: “it’s okay to ship crap!” 🙂

I also went to the Web 2.0’s Expo. It was bigger than I had imagine. Everything and everybody is working on something labeled web 2.0 I guess. There were booths from a lot of small companies I never heard of. Social networking and cloud computing seems to the major themes. I’m surprised that I didn’t see Facebook there. Yahoo’s booth was tiny at the corner.

The coolest demo was TellMe’s mobile app on Blackberry. You speak to it and it displays search results on the Blackberry. It’s basically search on voice recognition. Very useful…

0

Today marks the 10th anniversary of the launch of Mozilla project. I still was with Netscape that faithful day: March 31, 1998. I still remember the big engineering gathering announcing the move. Open source by a commercial software company was pretty much unheard of at the time. The decision to open source the browser code was both controversial. It was a difficult time for Netscape– Microsoft IE was cannibalizing Navigator’s market share and there was no light at the end of the tunnel. By some account, once mighty Navigator’s market share had perilously fallen to 20% at that time– an astounding decline no matter how one looked at it.

Giving away many man-years of commercial code seemed illogical even to me at that time. But an essay by Eric Raymond called “The Cathedral and the Bazaar” became very instrumental in the push toward open source. Raymond’s main point was that “given enough eyeballs, all bugs are shallow.” I remember, the client team had to spend months cleaning up the code. In particular, there were a lot of comments that the public might deem inappropriate. Many people expected the open source community will immediate embrace the code and push it to success. The reality was different. The move was a little too late in saving the company which got bought by AOL later that fall. The move was to salvage the browser. But when the open source community did not become an immediate driving force, some key folks like Jamie Zawinski began to leave the project. Underscoring complexity of the project, it took another 4 years before Mozilla 1.0 saw the light of day.

Ten years later, IE still dominates 80% of the browser market. Given Mozilla’s current market share at 17-18%, Mozilla barely recovers the market share lost it its lifetime. It speaks volume to Microsoft dominance and proves the difficulty of turning the tide. It took some time, Mozilla is emerging as a powerful, innovative and influential project. It relentlessly puts out version of Firefox with one innotive feature after another; by contrast IE has become stagnant. I for one can’t wait to see what the next 10 years Mozilla will bring to the users.

0

Every quarter, Yahoo! holds a hack day when engineers are given 24 hours to dream up an idea and build it out– it’s a way to promote innovation in the developer ranks. I’ve seen some very innovative stuffs in the past. So this past hack day, I worked with two of my co-workers David & Ahmed to build a chat or IM “robot”. Very geeky but also very cool…

A chat or IM bot is basically a piece of software that acts like a real chat buddy: you send it a message and it replies with a response to you. We called our bot Alfred, Batman’s confidante and assistant. The idea is that this is an all-knowing chat buddy. You send it a question like “How do I make a grilled cheese sandwich?” and it will return to you an answer by searching Yahoo! Answers database. In this case, the bot will send back a chat message with instructions on making the sandwich! You send it a command like “tell me about 2008 Olympics” and it will return you the popular links del.icio.us users have bookmarked about the 2008 Olympics.

I had a lot of fun hacking Alfred, probably the most satisfying piece of code I’ve written at Yahoo! Check out Sarah Bacon’s coverage of our hacks at the official Yahoo! Messenger blog, including a screen shot.

0

Ryan Tomayko wrote this blog entry called “How I explained REST to my wife.” Cool…

I wonder how it would pan out if I try to engage my wife with this type of topic in this manner… I can guess the outcome already… 🙂

2

Today, Yahoo! launches a completely redesign of pets.yahoo.com. In terms of content, it’s a relatively small site comparing to food.yahoo.com or health.yahoo.com, but still it isn’t a small task launching a site that scales to a thousand hits per second.

This is the first project where I’m part of from conception to launch, so I feel more involved. I was responsible for rolling out the launch, so last few weeks have been particularly frenzy. We were all feverishly testing last night but managed to roll out the site with an hour or two to spare. Woohoo…

Now, I can start having dinner with the wife & kids again. 😮

Next Page »