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 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)
I saw a good deal for a 4GB USB/thumb drive on one of the deal sites I frequent this week. It’s pretty bare bone but it meets my 2 requirements: a retractable USB head and a small form factor to be attached to a key chain.
I then secured it by encrypting its content using TrueCrypt, an open-source encryption software. Encrypting/decrypting files has always been a pain, but TrueCrypt makes it easy. You basically read and write the files seamlessly as a password-protected mounted drive. Encrypting and decrypting are done on the fly automatically. Piece of cake…
The best part is that since TrueCrypt is available in Windows, Mac and Linux, my personal data on the new USB drive is now both secure and truly portable across platforms.
Sweet!
A little company developed an iPhone application that fakes calls to yourself. Ha! A great meeting escape-hatch.
A Sweet and simple app…
This is cool if you have children like me. The full Wikipedia for Schools selection has been made available on a DVD. It’s a free and community-based alternative to Microsoft Encarta and the likes. Very cool…
K&A may be a bit too young for this, but I’ll make them a copy and check it out.
You can download it via BitTorrent here.
There are some folks that claim iPhone makes up as much as 40% of Apple’s revenue. How many companies can claim that type of success with their 1st or 2nd generation product in a brand new industry? The company is on a tear. In fact, it’s already supplanting older and more established products like Macs & iPods as the bread-winner.
The company’s recent string of hit products is just amazing if you remember the old days of Gil Amelio. Whatever happened to him?
One thing I like about Chrome is that it’s fast and light. It starts up fast and performs zippier than Firefox. The memory footprint is about 1/3 to half of that uses by Firefox as the screen shot below shows. Both where running with a single tab opened. Not surprising since I have a few of Firefox plugins installed. Firefox started out as a light version of Mozilla, but has gotten fattened up a bit over the years. I’d like to think the bloat is for richer features and extensible plugins. It’s still my browser of choice, but I am finding that I’m firing up Chrome more & more when I want some quick surfing.
I believe I ran into a bug with iTunes.
A few weeks ago, the credit card I was using on iTunes was replaced. As soon as I got the new replacement, I updated my iTunes account with the new card. Starting then, I wasn’t able to make purchases or update my existing iPhone apps. I’d get the error msg “The iTunes Store is unable to process purchases at this time” each time on my home PC, work PC and my iPhone itself. So it’s clear, it’s a server bug not client. I roamed the forums but didn’t see anything helpful.
The workaround? I create a new iTunes account and now I can make purchases & updates finally.
Just installed the new iPhone app from Wordpress. Sweet…
Blogging this post from my iPhone!
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.
I was lining up at the AT&T store last night to pick up my iPhone. This one guy at the front of the line picked up his phone a few minutes earlier and came up to the employee:
Guy: “Where’s the wand to my iPhone?”
Employee: “What wand?”
G: “You know the thing you write on the screen with.”
E: “Oh, iPhone doesn’t have one, you don’t need it!”
G: “Then how am I going to write it?”
E: “You use your finger, it’s a touch screen.”
G: “But I need a wand”
E: “You really don’t need it, let me show you…”
E: showed the guy how to use it
G: “I want my wand, where’s my wand?”
The episode cracks me & all the folks at the store up. And it goes to show some people are buying into this iPhone craze without really understanding the product they’re buying.
Ah, the omnipotence of Steve Jobs…
Where’s that bandwagon that is iPhone?
After skipping out on the 1st generation, I decided that I too will join the iPhone generation. I was one of those dorks that lined up when iPhone 3G was launched. They ran out of the model I wanted, so I placed an order rather than settle with the available models.
Anyway, my unit finally came & I picked it up last night. It’s a beautiful device and I can’t wait to put it through the paces! If only I can pry them from my girls’ hands… The fact that even my 4 year old can operate with easy the first time is a tribute to its design. They’re all over it.
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.
Been having issues with my computer at home recently…
First the video card died inexplicably a few weeks ago so I upgraded to an Nvidia 9600; now I’ve got DirectX v10. But it still sucks considering it was only 18 months old. Then last week’s heat wave finally fried my CPU. I had trouble installing the heatsink on the CPU when I built my current machine last year. My guess is that there’s always been heat dissipation issues and the heat last week was the last straw.
So I spent some bucks getting a quad-core CPU and a spanking new Asus motherboard as well as some additional RAM and a terabyte hard drive which by the way is an engineering marvel: cramming 1 terabytes in a few 3.5″ platters. 6 hours of working late into the sweltering night and I finally got a pretty beefy Windows Vista system running. Other than the computer case and some RAM modules, it’s pretty much a brand new system.
Been testing it past few days and it’s rock solid and very zippy. Despite careful research, I did spent $700; for a few hundreds more I could’ve gone and get a Mac. I did contemplated it but decided to take the plunge later when I upgrade my notebook.
As if the world needs yet another iPhone blog post, but I must say that I am super-excited. I’m definitely gonna get one and retire my old sucky razr. It’s timely since our AT&T contract is up this summer.
It’s always wise to skip 1st generation of a new product, and I’m glad I did. That’s not to say I was tempted. The 2nd generation adds 3G network and GPS. I’ve been putting off getting a GPS device for my new car. I can’t wait to see the many location-based applications that will be coming out. In fact, I might consider writing a few apps myself!
Most of all, I’m looking forward to lugging one single device. Oh yeah…
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…
Ran accross a t-shirt with the above graphic and I just had to order one for myself. Geeky, sure but I like…
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.
So, we have a new piece of trivia: “when did Netscape Browser died out?”
Answer: “March 1, 2008″
Looks like 3/1/08 is the official date of demise for Netscape browser when AOL will cease all support for the storied browser. It’s a little fact most people don’t really care about, but it’s rather sad in perspective for a former Netscape employee like me…
After putting it off long enough, I spent some time this weekend tweaking my blog.
First, I hacked some plug-in code to get the random posts in the format I needed. I had to go all the way to making changes in some SQL queries. While Wordpress’ APIs are getting better, I still find myself going all the way and hit MySQL to get the necessary data. It’s not ideal because this type of code changes will break with schema changes. Oh well, it is a hack I guess… Finally, I tweaked the CSS to fix issues that had been bugging me. Some were minor issues like color and font inconsistencies; some were layout issues.
Some of results are:
- The sidebar is re-arranged around a bit. More useful data is pushed up and space efficiency was taken into account.
- The new list of random posts, with excerpts, appears at the bottom of the sidebar.
- The footer is now rendered a lot cleaner than before.
- The new list of most commented posts appears in one of the footer columns.
- More consistent link hover styles for both black and blue backgrounds.
- Time/Date is now displayed with no wrapping.
Next thing I want to tackle is to build a better Flikr widget than the one I’m currently using…
Recently I started to setup my Vista desktop machine to double as our dvr, recording TV shows which we watch on our media center pc in our living room. These videos are DVR-MS files and they are MPEG-2 encoded. The files are huge– 1 hour of Monk eats up 3 gigs for best quality recoding! For the life of me I couldn’t find a configuration Windows Media Center to use more efficient codecs. Perhaps a reader of this blog can enlighten me.
Anyhow, the best workaround I’ve found is MCE Buddy: a windows service that automatically re-encodes the video files to other ideal formats like H.264 & DivX behind the scene. Added bonus: the program claims to be able to automatically removes comercials! Sweet!
This is jumping through a hoop, I wish the video codec was configurable in the first place to avoid this re-encoding business. I suspect copyright protection has something to do with the missing codec configuration. Annoying nevertheless.