Saturday, February 28, 2009

Getting myself familiar with VIM

I have been using VIM as my main editor in Linux development for about a month now. I was gradually fall in love with this tool because I like command base editor. I hate those graphical editor (IDE) because I am having difficulty by using the mouse pointer and then aim at the point and then hit the button to fire. That's why I am good in using shortcut key to accomplish my task quickly.

With VIM, I can even do more work beside those IDE. And the most importantly, I can use command to accomplish my task without worrying clicking the wrong command. Like for example, print and print preview. By using a command, it is much more clearer on what am I doing actually.

In order to get yourself familiar with this tool, the learning curve is quite high as well. Get yourself familiar with those advance command, it is highly important to show you that you are serious on this tool, but not the casual user.

Enjoy vimming!

Experience on VirtualBox

Recently, I am using VirtualBox to do my development work. I found out that there are some difficulty in sharing documents and source code from virtual machine and host machine.

I am using Windows XP as my host as I am still maintaining the software on Windows at the same time while developing Linux software, thus I have try something out on Microsoft virtual PC. What hurting my is Microsoft's product - VirtualPC seems having difficulty on installing Linux. Then I change to VirtualBox, everything was fine. My development work gone well and perfect. Now I am running Fedora Core 4 in my virtual machine. Please note, the default virtual disk size (8 gigabytes) was not enough even though I am not install full version.

Anyhow it is still not perfect. When I switch to full screen mode, stay for few hours there and come out (by pressing Right-Ctrl key), I notice that the keystroke was gone wild. It seems not stable enough whenever I try to switch into full screen mode. To solved this issue, I have to logout the Windows and then login again. Haven't report this problem to VirtualBox team.

Besides that, sharing files in between host and virtual machine seems a bit tricky. The documentation doesn't stated clearly what need to be done in order to share a file. May be I was rushing on this issue, causing me lose some of the important notes.

And also the networking issue, totally have no clue at all how this can setup? What need to expect? I only allocate 1 day to solve this problem.

No worry, all this problem have been jot down. I will follow up this issue in near future.

[See Also]
1. Installing Ubuntu inside XP using VirtualBox

Saturday, February 14, 2009

Port over code from Windows to Linux with MinGW and Cygwin

I have spend up to 1.5 months to work on the port over from Windows to Linux. Does it really need so much of time to carry out the work? Actually the answer is no. What went wrong? This is due to my wrong assumption to the header specification on MinGW and Cygwin.

I started out my project by using MinGW to compile the code. It works perfect at initial stage. But when I try to compile using Cygwin, it giving me a bunch of error. Most of the error telling me that the header specification were incorrect. Some are event doesn't exists in the header folder in Cygwin.

From my experience, I must compile the code strict on the Linux platform. MingGW and Cygwin are the tools for me to port over a program from Unix to Windows, not from Windows to Unix. I think there isn't a tool that does the conversion automatically from Windows to Unix. All you need are manual works.

Saturday, February 7, 2009

My Open Source Empire

Recently I was using Microsoft's virtualPC to be my test ground on Linux. After a while I notice that it doesn't work well on Linux, for example, the display doesn't support correctly or the display totally crash/corrupted. Thus when I was looking for a powerful virtual machine, just like VMWare, and it must be free, I found VirtualBox. The functionality are almost similar to VMWare, good to try it out and abandon Microsoft's virtualPC (it doesn't Linux).

Now I have Linux to be my main working OS, Open Office to be my reporting tools, Umbrello to be my software design specification, and now I have VirtualBox to be my test ground. I can even have wine to run Windows software on Linux.

This is really cool. I love open source.

Port over from Windows to Linux

My first experience to port from Windows to Linux. It is not an easy job although I have done the port over before in my previous project. That is port from a web base program (done in Java) into Windows base program (done using C++). To be more precisely, I am re-writing the whole code from ground up using MFC and C++. It is not port over.

My definition of port over means to make use of the same code to support multiple platform. For example, from a program done in MFC/C++ running on Windows platform into a program done using generic library running on Linux platform. Then this is defined as "Port over". Whereas from a program done in Java into a program done in C++ is as "Re-writing".

(That is my definition. Please leave your comment if you have other definition.)

Why is that difficult?

Because in LINUX are POSIX standard whereas Windows not. Thus if your code include some other library then you have to change it manually. Below are the sample:

Change from:

#include "MyDir\MyHeader.h"


#include "MyDir/MyHeader.h"

Imaging if you are support the legacy code, the work could be tedious.

Looking for library to replace the wn32 code. Simple example will be . There are many more like seriel code, multithreading code, and time. The most frequent type of library use in daily basis.

Never do you port over on Windows. I was using Cygwin and MinGW at initial stage, but now I have to redo almost everything from the beginning. Because the header specification in Cygwin, MinGW, and a real LINUX environment are different. Strict do your code in LINUX.

Sunday, February 1, 2009

UNIX certification

Few days ago I was doing my study on UNIX specification to see how they defined the header standard on UNIX. My finding was this kind of specification really exists and it is called Single UNIX Specification (POSIX). And it is maintained but Open Group - a software standards organization sponsored by a number of major software vendors [1].

Their most popular programs are the certification program. Just like Microsoft, Sun, and Oracle. These are the certificates dedicated to open source technology such as POSIX or UNIX.

[1] definition.
[2] The Open Group wiki
[3] TOGAF Certification