Chinh Do

7-Zip Can Be Used to Open ISO Archives

First time here? Check out my greatest hits or look around in the archives, and consider subscribing to the latest posts via RSS or email. I am also on Twitter and Google Plus. Thanks for visiting.
12th November 2009

7-Zip Can Be Used to Open ISO Archives

Did you know that 7-Zip can open and extract ISO archives? I had to install OneNote today from the MSDN ISO and I didn’t have an virtual drive/ISO mounting tool installed on my work PC. So I tried to open the ISO in 7-Zip and it opened it just fine. All I then had to do was to extract the files to a temp folder and did the install from there.


posted in Software/tools, Technology, Tips | 0 Comments

23rd February 2009

My Multiple-Monitor Programming Setup

In my opinion, the top three hardware items that help maximize programmer productivity are sufficient RAM, multiple monitors, and a fast multi-core CPU. For RAM, try to have at least 2GB for Visual Studio development, especially if you have additional applications such as Resharper, a local SQL Server instance, IIS, etc. Remember that on Windows XP or Vista 32-bit, the maximum usable RAM is limited to about 3.2 GB or so.

My current company-provided laptop, which I must perform most programming activities on, is a Core 2 Duo 2.4 Ghz. It is satisfactory for what I am doing. Given the choice however, I would go for a quad-core CPU desktop. Desktop usually has faster drives, better video cards, etc. And the additional cores allow for smooth multitasking and better performance when using virtual machines.


Plenty of RAM and multiple fast CPU cores will keep the waiting down to a minimum. Now you need to give yourself the ability to see all of those things that you have going on. Research has demonstrated that multiple monitors increase productivity. For most programmers, I would recommend two monitors. Adding that second monitor is a relatively inexpensive affair. Most laptops or desktop video cards has built-in support for a second monitor so all you have to do is getting that second LCD, which cost very little these days compared to three years ago. The third monitor and beyond is where things start to get complicated. You either have to install a second video card, or use a second PC/laptop in conjunction with a software application named MaxiVista. Unless you have spare monitors sitting around, I think the return on investment starts to diminish greatly beyond two monitors.

Another way to use that third or fourth monitor is to simply attach them to additional computers. Sure, you won’t be able to control all those monitors with the same mouse and keyboard but this setup is not without advantages:

  • When the first computer is rebooting or not responding, you still have a fully functioning computer.
  • The screens on the second computer are not using CPU/memory resources on the first computer.

My 5-Monitor Setup

I work from home most of the time and on my desk, there are five monitors, hooked up to three laptops. I know… it’s over the top but it’s not like I bought all of these laptops/monitors specifically for this setup. The second laptop is my personal laptop. The third one is another old personal laptop that would otherwise would be sitting around gathering dust. I might as well put them all to use. Here’s how the monitors are arranged:


The main laptop is hooked up to monitor #1, an ASUS 24″ running at 1920×1080 resolution and monitor #2, the main laptop’s built-in 15.4-inch LCD running at 1680×1050. I spend most of my time on these two monitors. The ASUS 24″ is great for programming/debugging and is where I normally park Visual Studio 2008 or Rational Software Architect. If you can get one with more vertical resolution (such as 1920×1200), that’s even better.

Visual Studio

The extra width on the main monitor allows me to permanently open supporting panes like Solution Explorer that I otherwise would configure to “auto hide”. Note where I have my Start menu: on the right edge of the main monitor. This gives me more vertical space so I can see more code without scrolling. The additional benefits are that more opened windows can fit on the task bar, and that I don’t have to move the mouse as much to access the start menu.

The built-in laptop monitor (#2) is where I have miscellaneous supporting windows such as rolling logs, instant messaging client, email client, documents, etc.

For taking notes, I use Microsoft OneNote and since it’s not installed on my company PC, I use my own laptop for it. This laptop is monitor #3, sitting to the left of the main monitor. Monitors #4 and #5 are used once in a while to display server logs, various server telnet and remote desktop connections, and anything I don’t need to control often.

Update 2/25/2008 – Synergy

Rohan kindly pointed out to me a free keyboard/mouse sharing utility called Synergy. You should give this a try if you have multiple computers on your desk. Synergy lets you use a single keyboard/mouse to control multiple computers, running multiple operating systems. Additional features include clipboard sharing, screen saver, and single password login. The configuration is not the most intuitive but once you have everything set up correctly, it works like a charm.

I now can control all three laptops and 5 monitors with one mouse/keyboard combo! Very nice.

Synergy animation

posted in Dotnet/.NET - C#, Java, Programming, Software/tools, Technology, Tips | 8 Comments

12th February 2009

Bag of Links #2

.NET/C# Programming


Apps and Tools

Other Stuff

posted in Dotnet/.NET - C#, Links, PowerShell, Programming, Silverlight, Software/tools, Technology | 0 Comments

23rd January 2009

Bag of Links #1

A while ago I had been posting my Finds of the Weeks series and this is the continuation of that. Instead of weekly though, this series will be more of a “whenever possible” kind of thing.

General Programming

.NET/C# Stuff



Software, Tools, etc.

  • If you have a Linksys WRT54* router, I highly recommend loading Tomato firmware. I have been using it for about 6 months now and it’s so much better than the built-in Linksys firmware. Tomato’s QOS works great to make sure my Vonage phone line remains usable at all times.Tomato firmware


  • Ben Pierce posted a series of very useful PowerShell command-line demos: Demo1 (Administering Windows), Demo 2 (Administering Servers in bulk), Demo 3 (How do I Know Which Class to Use), Demo 4 (Administering Hyper-V).

Something Different

posted in Dotnet/.NET - C#, PowerShell, Programming, Software/tools, Technology, Windows Mobile / Pocket PC | 2 Comments

31st December 2008

FedEx Office (Fedex Kinko’s) Online Print Service

At home, I occasionally need to print color posters and black and white flyers. I’ve found FedEx Office Online Printing Service to be very convenient for this (if you know exactly what you want… more on that later). After you upload your file in one of the supported formats (Word, PowerPoint, Excel, RTF, Post Script, PDF, Text, JPG), select a paper size, and set print options (color/black and white, copies, collation, paper stock, etc.), the web site gives you a preview of the final print output.

FedEx Office Print Online

For my last print job, the file I wanted to print was in CorelDRAW format, so all I had to do is go into CorelDRAW and export it to Post Script format. The final print output looked perfect to me.

There is a "minor" problem with the service however: there are no prices to be found on the site anywhere. No, the printing is not free, sorry. You do eventually see the total price when you check out. The only reason I can think of for this strange "price hiding" practice is so that people can’t easily compare online prices vs walk-in prices. They obviously have complete pricing data in the system, because the site does give you a total at checkout. This lack of up-front pricing is a major hassle, especially if you are not sure which options you want (type of paper, etc). You can’t easily/quickly compare the different printing options (and there are tons of them). Changing your order and going through the checkout process just to see the price is too cumbersome.

One has to ask, what were they thinking??? I certainly hope this is not a trend among online stores. And don’t you hate it when you google something (such as "FeDex Kinko’s prices") and the first thing you find is other people also looking for the same info and not finding any :-).

Here are some actual prices I got recently (December 2008) for my local FedEx Kinko’s (Richmond, VA):

– 8×11, B&W, 30% Recycled Paper: 10c/page.
– 8×11, B&W, Standard Laser Paper: 12c/page.
– 8×11, Color, Standard Laser Paper: 59c/page.
– 17×11, Color, Standard Paper, 1.78/page

There is a volume discount when you order more than x copies. It seems that the discount starts at 100 copies.

posted in Software/tools, Technology | 3 Comments

23rd December 2008

Vista 64-bit and SoundBlaster X-Fi Crackling/Popping

Against popular wisdom, I decided to upgrade my bedroom home theater PC to Vista 64-bit a couple days ago (just have to make full use of all of my precious 4GB of RAM). Everything is working surprising well so far, with the exception of sound! Whenever I play any audio, my speakers now produce all kinds of pops and crackles along with the normal audio stream. Urgg.

After a couple of days of googling, tweeking various sound settings, uninstalling/reinstalling drivers, etc. without success, I almost gave up on the thing. Then I decided to try just one more thing, changing the default sample rate to “2 channel, 16 bit, 44100 Hz (CD Quality)” from the default “2 channel, 24 bit, 48000Hz” and just like magic, the pops and crackles are gone.

SPDIF Out Properties

posted in Software/tools, Technology, Tips | 7 Comments

20th November 2008

Gmail Adds Themes

Nice surprise logging into Gmail just now: Themes! I tried out a few and have to say they are nice to look at. I almost forgot I have actual emails to read. I’m going to try out a cheery theme to offset the grim news from Wall Street.

There’s even a Terminal theme for die UNIX shell diehards. It’s actually kind of cool… if only for a few minutes.

Gmail Themes

More info from the official Gmail blog.

posted in Software/tools, Technology | 0 Comments

2nd September 2008

Windows Underlined Letters for Keyboard Accelerators – Peculiarities

Ever since Windows 2000, menu keyboard shortcut characters are not underlined by default. According to Microsoft, the underlined letters are hidden until you press the Alt key. Let’s try that… First, use the mouse to click on the Help menu in Visual Studio:

Visual Studio About

Now, press Alt to show the underlined letters right? Poof, the menu is gone. Ok, that’s an easy one. I’m sure everyone have figured out that Alt key must be pressed before you access the menu. But can anyone tell me this? How do I show underlined letters for right-click/context menus with the Alt key? Well, the short answer is you can’t! If you don’t believe me, try it yourself. I’ve tried Alt+right-click, Alt then right click, right click then Alt, etc. Nothing works.

The only thing I’ve found to work is the Application key (this is the key with the image of a mouse pointer on a menu, between Alt and Ctrl). Interestingly, the Application key will always show underlined letters regardless of the “hide underlined letters” settings. The keyboard combination Shift-F10 also brings up the context menu, however that keyboard shortcut does not show underlined letters.

You can forget about all of this nonsense and have Windows always show the underlined letters by changing a setting (instructions below are for Windows XP):

  • Open the Display Control Panel.
  • Display Properties Control Panel Applet

  • Click on the Appearance tab, then Effects…
  • Uncheck “Hide underlined letters for keyboard navigation until I press the Alt key”.
  • Hide underlined letters for keyboard navigation until I pres the Alt key

posted in Software/tools, Technology | 15 Comments

29th August 2008

Web Scraping, HTML/XML Parsing, and Firebug’s Copy XPath Feature

If you do any web scraping (also known as web data mining, extracting, harvesting), you are probably familiar with the main steps: navigate to page, retrieve HTML, parse HTML, extract desired elements, repeat. I’ve found the SgmlReader library to be very useful for this purpose. SmglReader turns your HTML into XML. Once you have the XML, it’s fairly easy to use built-in classes such as XmlDocument, XmlTextReader, XPathNavigator to parse and extract the data you want.

Now to the labor intensive part: before your program can make sense of the XML, you have to manually analyze the HTML/XML first. Your program won’t know jack about how to extract that stock price until you tell it exactly where the stock price is, typically in the form of an XPath expression. My process of getting that XPath expression goes something like this:

  1. Scroll to/find desired element in the XML editor.
  2. Does element have unique attributes that can be used?
    • a – If yes, code XPATH statement with filter on attribute value. Example: //Table[@id=”searchResultTable”].
    • b – If no, code an absolute XPATH expression. Example: /html/body/div[4]/pre[2]/font[7]/table[2]/tr[5]/td[2]/table[1]/tr[2]/td[5]/span.

Step 2b is where it gets very labor intensive and boring, especially for a big web page with many levels of nesting. Visual Studio 2005 XML Editor/Resharper have a couple of features that I find useful for this:

– Visual Studio’s Format Document (Edit/Advanced/Format Document) command formats the XML with nice indentation and makes it a lot easier to look at.

– With Resharper, you can press Ctrl-[ to go to the start of the current element, or if you are already at the start, go to the parent element.

Even with the above tools, it’s still a painful and error-prone exercise. Luckily for us, Firebug has the perfect feature for this: Copy XPath. To use it, open your HTML/XML document, open the Firebug pane (Tools/Firebug/Open Firebug), navigate to the desired element, right click on it and choose “Copy XPath”.

Firebug Copy Xpath

You should now have this XPath expression in the clipboard, ready to be pasted into your web scrapper application: “/html/body/div[2]/table/tr/td[2]/table”.

A feature that I would love to have is the ability to generate an alternate XPath expression using “id” predicates, such as this: “//Table[@id=”searchResultTable”]”. With web pages that are not under your control, you want to minimize the chance that changes on the pages impact your code. Absolute XPath expressions are vulnerable to any kind of changes on the page that change the order and/or nesting of elements. On the other hand, XPath expressions using an “id” predicate are less likely to be impacted by layout changes because in HTML, element IDs are supposed to be unique. No matter where your element is on the page, if it has the same ID, you should still be able to get to it by looking up the ID. Hmm… this sounds like a good idea for a Visual Studio Add-in.

posted in Dotnet/.NET - C#, Programming, Software/tools, Technology, Tips | 5 Comments

17th June 2008

Finds of the Week – June 17, 2008

.NET, C#

General Development

Software, Tools, etc.


Something Different

posted in Dotnet/.NET - C#, Gaming, Programming, Silverlight, Software/tools, Technology | 4 Comments

  • Calendar

  • February 2017
    M T W T F S S
    « Dec