Wednesday, September 07, 2011

A stuck and hang VM on Xenserver

Yesterday I found our development server can not be accessed. It's a VM under Xenserver and trying to fix things through XenCenter is quite a deadend. The console can not be accessed from XenCenter, there's only blank whitescreen and when the VM was being forced to shutdown it complained "Another operation involving the object is currently in progress class: VM".

There's some discussion and proposed solution from this and this thread forum. Here's quote from one of the post that  finally fix it for me (you need to login to server's shell to execute the below command) :

1 - "xe vm-list" to get the uuid of the VM that is hung
2 - "list_domains" to list the domain uuid's so you can determine the domain # of the VM above by matching the uuids from this output with the uuid for your VM from the previous command.
3 - "/opt/xensource/debug/destroy_domain -domid XX" where XX is the domain number from the previous command
4 - "xe vm-reboot uuid=XXXX --force" where XXXX is the uuid from the first vm-list command for your VM. (name-label may work but didn't work this time for me so I used the uuid)

Sunday, August 21, 2011

Install Kubuntu 11.04 on Samsung N150

I had a Samsung N150 from the office and installed it with Kubuntu 11.04 not long ago. Below are some notes to get it working acceptably. It's more of a high level notes/todos on setting things up for guides and reminder and not meant for the detailed to-the-letter instructions (read : familiarity with ubuntu/linux is assumed).

  • The basic installation. There is nothing special here as it went quite straightforward.
  • Changing the network-manager with wicd. My wifi can not be connected with the defallt-installed network-manager. Removing network-manager and replacing it with wicd (together with it's kde integration) solve the problem.
  • Add xorg-edgers to apt-source and do updates to get video driver hardware acceleration ( natty main). This way, the 3d efffects on kde will run smoothly.
  • Fix the brightness setting : Installing samsung-backlight and samsung-tools mentioned on the article does not help in my case (only working once after install and the brightness setting fail to work again after resboot).  The solution I end up settling in is making script to encapsulate the solution using setpci as referred on the article. It is not user friendly but good enough for me and since I don't change brightness too often it i not really a big deal.
Despite it needs some research and tweak to get it working to a usable state, it is interesting to use when it is finally working. The kubuntu netbook-style desktop need sometime to get used to but after it I can appreciate how it makes the work on the netbook and and it's utilization become more efficient, most notably the screen real estate.  It does that without compromising the usability too much. Also, having the application menu integrated to desktop in a popup/vertical way is very cool too.

Wednesday, June 29, 2011

The Return of Help Viewer, Visual Studio 2010 Service Pack 1

I recently install Visual Studio 2010 Service Pack 1. It surprised me when opening the Help a familiar-looking Help Viewer popup (although from the looks of it, it seems now rewritten in WPF following the visual studio itself).

I was a bit uncomfortable using the previous browser-based help initially, although overtime I am starting to get used to it and appreciate some of the benefits e.g: easier saving, simpler navigation. However, now that the desktop-based one came back, I am happy again :).

The main problem with me with browser-based one is that it got closed often and getting mixed up with other stuff opened in browser. It makes switching to it slower than desktop one since my mind seems to need additional work to get to it  i.e: find the browser and select the one that open the help, compare to just open the application directly. The reason is quite similar to why I still prefer using thunderbird for opening mail no matter how improved gmail web-based email client currently i.e: desktop-based still feels more native and direct.

Monday, June 27, 2011

Trace Registry Activity using Process Monitor

I have some problem with interoperability with certain executables that seems to behave somewhat randomly. Along the way, I stumble upon Process Monitor. From it's descriptions on the site : 

"Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity".
It proves very useful in my case. It shows that somehow there is registry activity that explain the cause of the previously random behavior.

It's another useful addition to the toolbox along with other utilities from Sysinternals that I have been using so far, most notably DebugView and ProcessExplorer.

Thursday, June 23, 2011

Adding Note Support, Freeplane for Windows Mobile

I have added note support to Freeplane for Windows Mobile. I ported the note support form PocketFreemind with some changes mostly in simplifying node edit/save cycle and dialog. It is still on the repository right now and will be on the next release.

Here's some screenshot :

Note view panel
Note editing with tag helper

Tuesday, June 21, 2011

Make Single Executable Installer using IExpress

Visual studio deployment project produce two file when built i.e: setup.exe and the .msi file. I need to make them into single-file executable installer. This reference is really useful. It turns out there's already a tool that exist in windows itself to combine several file installer into one : It is called IExpress.exe and reside on C:\Windows\System32.

I had some notes in following the above references (and it's various links) :

As the entry said, using setup.exe as an entry point does not work due to the "bug" introduced since visual studio 2008 (it was working in visual studio 2005).  I currently use visual studio 2010 and it still not working too. However, the given solution using batch file did not directly working either when I tried. When executed by resulting exe the .bat file seems to have trouble with long file name while it is working when I tested the .bat file directly.

Some trial and error later, it turns out that somehow the resulting .exe executed the .bat file using and causing problems with file path. When I tested directly .bat, and working, it is executed by cmd.exe, that's why it behave differently. So in "Install Program to Launch" dialog, to ensure cmd.exe is used instead of,  instead of entering setup.bat, I called the command  "cmd.exe /c setup.bat" as illustrated on the screenshot below.

Also, for the cleanups, instead of using the refered codeproject reference that relatively complex,  I used script that act as a pair of the setup.bat refered on the post and has content as below  :


and put it in Post Install Command field (using the same "cmd.exe /c" call as stated above). It is much simpler that way and utilize what's already provided by IExpress.

Friday, June 17, 2011

Light Use of XPlanner

I use XPlanner to track development process. However, in many cases e.g: very small team, small scale software, I don't use many of it's feature and use it as a very light project management tools that feels more like an extended todo list (which is good since it is simpler and does not get in the way of the development more).

Here's how I used XPlanner lightly :

  • I filled mainly only text and description for stories and tasks, other fields are left in default
  • No timesheet entry, just click "complete" when task is complete and change the stories to status to "implemented" when all it's task is done
  • I monitor only what task is done and what stories is implemented
So, when it is used like this it's basically just an"over-featured" todo list, but it still has some advantage over generic todo list and that is the built in iteration concept. I can still feel that I am within development iteration. Also, when in other iteration I decided to use more of it e.g: timesheet, it is still there, ready to be used.

Thursday, June 16, 2011

UML for Reverse Engineering

There's an entry on Martin Fowler's blog that I find interesting. I talks about using UML as a tool to understand the existing code. It resonates with me since that is how I find myself using UML lately i.e: more as a reverse engineering helper than as a top down development design tool.

I still use UML in a top down fashion sometime, usually when trying to solve certain mechanism directly in the code seems to spawn too much options/thoughts. This is the time that I usually fire up UML tool (I use Astah, BTW) and do some mockup of classes, association and interations until it's clearer what I need to do next in the code. However, this is not frequently happening since many coding tasks have a clear next-actions (to borrow GTD term).

On the other hand, reading existing code usually require the understanding of the base code structure first before I could do the tracing and debugging. It's like try to get a map first of the are so I know where the location of certain things and how I can get from there to somewhere. This is where the UML come in, to help get the understanding of the big picture of the code. And like the above article said, I find using our own modelling is much more useful in getting the understanding of the code than using automated reverse-engineering typically exist in CASE Tool.

I usually keep the file/diagram for future references/re-use but not neccessarily keeping it updated as it's already done it's purpose i.e: helping to drive the development process and keep moving it forward. I could always refresh the model when needed, for example when trying to understand part of the code that I haven't been working on for a long while.

Wednesday, June 15, 2011

Freeplane for Windows Mobile

I am a long time user of PocketFreemind on which I am one of the programmer too. It is working fine while I still in qvga device. However, when I switched to wvga device it started to show many issues that I feel the rewrite was needed. So, there comes FreeplaneWM which later become Freeplane for Windows Mobile.

Here are some note on the changes/differences of the rewrites from PocketFreemind :

  • The domain model is now just a thin wrapper over .Net's XML-related classes. Any changes done directly to those XML classes through the wrapper without additional data structure in the between. This simplify the code and improve performance.
  • The layers/module are simplified. There are basically just application layer (gui related matters) and domain model (xml plus wrapper classes)
  • Attention to vga/wvga visual consistency and behavior
In a nutshell, the changes is driven by the goal that so it can be used in wvga/vga devices well and keeping the codebase fun to code.

Tuesday, June 14, 2011

Base Setup : HTC Touch Pro 2

I own HTC Touch Pro 2 for more than half a year now (replacing my previous HP iPaq 912c). It takes some time for the various apps and setting to settle in. For me personally, it's not just about using of the gadget itself but more about how it integrates with my personal workflow. That is also why I still stick to Windows Mobile currently as many things that I use still not yet available in other platform.

Here's a brief overview of the setup of the essentials :

  • Shell and Core App : SPB Mobile Shell+PocketBreeze+PocketInformant. These are the basics and I probably won't use a gadget if I can not setup a comparable feature on it
  • Desktop Sync : BirdieSync + Windows Mobile Device Center (WMDC). Having complete and reliable synching to desktop is essential otherwise it will be a pain to have to sync manually or having a gap in data between mobile and desktop. Birdiesync (event, tasks, contacts, etc..) and wmdc (files, notes, etc..) does all that I need
  • Outliner : Freeplane for Windows Mobile. I wrote this app myself (branching from PocketFreemind project on which I am one of the developer too). I used Freeplane a lot, especially for things that can not be captured by the structured information manager. This allow me to have access to it on the go
  • Spredsheets : Excel Mobile. Spreadsheet are great for certain type of data and I have some main personal files on this form that makes the existence of it on the gadget is very important. Windows Mobile comes with it out-of-the-box so it's already well-covered right from the start
Those are the essentials that makes up the base of my mobile setup. There are other apps that I use frequently but they are functionality specific while the above are has more of a dashboard/control-center/base-system feel to them.