Saturday, December 26, 2009

A note on installing flash player in Ubuntu

If you are using 'root user' during the installation of Linux Debugger and Standalone Players for Flash Developers, it will prompt an message to locate the installation path of Mozilla. Using whereis command to locate the mozilla folder, for my case, the path /usr/lib/mozilla will be shown. Unfortunately the installation wizard will complain that particular path was invalid. According to the suggestion from Ubuntu forum, giving this path /usr/lib/firefox- will be more accurate.

If the user wasn't a 'root user' during the installation, the installation will proceed just as normal. The destination of the installation files will locate at /home//.mozilla/plugins.

Sunday, October 18, 2009

My GoogleAppEngine is working now!!

Hurray!!

Finally I have successfully get my Google App Engine up and running. I am able to see the hello world string appear in my browser when I'm pointing my URL to localhost:8080. Following the tutorial provided by Google (here is the link), it wasn't mention clearly on how the Hello World application suppose to be running. It just mention this:

google_appengine/dev_appserver.py helloworld/


Initially I tough I must have my Apache setup in order to run the Google App. hehe...

I have my Google App Engine SDK install in one directory, say Directory A. And then I have my source code locate in Directory B. It doesn't matter where the source code must put, it just my development style. When compiling the source code, it will automatically fire up the server. This is so different from the way I did in programming, where I have to tell the compiler which file to compile. Whereas Google App Engine "compiler" target on the whole directory. In order words, in the helloworld directory, I have app.yaml and helloworld.py, I just need to supply the helloworld directory instead of single individual file, like this:

./dev_appserver.py HelloWorld

One thing to note, the ./ simbol must put at the front of dev_appserver.py, otherwise Linux will not able to recorgnise that command.

Enjoy your programming @!

Powered by ScribeFire.

Saturday, October 10, 2009

My first attempts to OSX86

I have been spending a lot of my effort on searching OSX86 v10.6 operating system. Anyhow the feed was so limited. The average download speed was about 3KB - 5KB, and required 18 - 20 days to complete the download. One of my friend shares out his OSX86 v10.4.x to me. Although it is quite old to me, but I am still OK with it because I just need it to learn Xcode programming. Trying the whole night to install it in Virtual Box and VMWare, neither one is working. Fortunately I found OSX86 v10.5.5, the progress is still downloading, hope this will bring me some good news.

Blogged with the Flock Browser

Sunday, September 27, 2009

BlackBerry Development Kick Start

Few weeks ago I was busy with setting up the BlackBerry development environment. The bad thing is the BlackBerry server were always down for no reason, and making the download process gone damn hard.

One of my friend has successfully setup his development JDE plug-in in Eclipse. Thus I get the whole copy of his Eclipse folder and then paste it into my PC. I though it will run as my expectation, but instead, it wouldn't because the BlackBerry simulator path has been 'hard' set in the Eclipse configuration setting. No change are allowed.

I have no choice, I must download the BlackBerry JDE plug-in. Surprisingly, the BlackBerry server were gone up in pass few days where it was down usually. Thank GOD.

A note on BlackBerry JDE plug-in for Eclipse

I found there are some tricky part on installing BlackBerry Plug-in on Eclipse. Actually there was a sequence on installing the plug-in for Eclipse. If not, the BlackBerry Project wouldn't appear in New Project Selection Wizard.

I have install BlackBerry JDE v4.7 Component Pack into my Eclipse v3.4 Ganymede, but anyhow I couldn't see any BlackBerry project in the New Project Selection Wizard when I'm creating a new project. I did restart my Eclipse but it still couldn't solve the problem. Until I have install BlackBerry JDE Plug-in Full Installer, then only I can see there is a BlackBerry project in the New Project Selection Wizard.

The Full Installer is come with the BlackBerry JDE v4.5 Component Pack, initially I though it would overwrite my current Component Pack v4.7. Fortunately it wouldn't. Thus the sequence of installing is:-
  1. Install the BlackBerry JDE Plug-in Full Installer
  2. Install the BlackBerry JDE v4.7 Component Pack
Either way, I have installed the second option then only installed the first option. It still work!


[resource]
http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp

Sunday, September 6, 2009

Thrift in my project

In order to get the thing working right, first is to ensure that you are getting the right thing. This is very bad because I have spend a couple of time to solve this stupid error. I was working on the Linux platform and the version I get from someone is in Windows version. During the configuration, I got an error complaining that the SVN is not compatible with current version. My SVN version in Linux is 1.4.6, and the SVN version require is 1.5. I am running out of clue in solving this problem although I have upgrade my SVN version to 1.5. What I did is to remove all the .SVN hidden folder in the Thrift directory, and it works!

Not there yet, the next error after this is Unrecognised command line option "-mno-cygwin". From here then I know it is definitely not for Linux platform. After getting the right version everything going happily except one thing, which is to set a proxy server for ANT in order for this tool to download additional package for the compilation. Here is the solution and make sure this is done in super user mode.

export ANT_OPTS = "-Dhttp.proxyHost= -Dhttp.proxyPort=8080"

And the last note is to ensure that Thrift was install under /usr/local/src.

Saturday, September 5, 2009

Finished configure OpenOffice 3.10

I have spend a night to search on the solution for installing GTK2 yesterday. During the configuration process, I got this error message:

checking for gtk+-2.0... configure: error: GTK2 is needed to build mozilla.

Actually, this error telling me that the GTK2 source code wasn't there. I get this information from the Synaptic Package Manager and it could be download through this manager with package name called libgtk2.0-dev. Thats it!

I have spent a bunch of time on installing the GTK2 by doing the manual installation and finally it crash my Ubuntu at the last update.

Now what! Looking on how should I get my hand dirty on OpenOffice source code.

Tuesday, September 1, 2009

Connect Guest OS in VirtualBox through VNC

Few days ago, I was busy at studying on how can I connect an OS running inside VirtualBox through VNC from another PC. A lot of time spending at reading the documentation, and articles post on the Internet. The solution was to attached the network adapter to Bridged Adapter instead of NAT under the VirtualBox settings dialog.


[Reference]
1) Running VirtualBox from VNC
2) Control guest through VNC
3) How to connect guest OS running Ubuntu through VNC

Saturday, August 29, 2009

Rectangle text in Ubuntu

Recently I have downloaded the latest source code of Open Office 3.10. Few days ago, there was an update from Ubuntu Update manager. As usual I'll briefly browser through what is going to be install in my Linux. But this time I did not browse through it, and I just install. Then in my next login, all the text or whatever text can be read in English are change into rectangle. I was in the situation where there is no English text at all.

In order to solve this problem, I have to un-install the pango v1.24 through runlevel 2 because that is the only place I can see English text. Restart after un-install process has been done to take immediate effect.

I guess there must be some dependency library having some conflict with pango library during the update. Need to find out more on this.

[Reference]
  1. http://ubuntuforums.org/showthread.php?t=1251089
  2. http://ubuntuforums.org/showthread.php?t=455987

Wednesday, August 26, 2009

How to execute install.sh?

Few days ago, my friend was having a problem on setting Tomcat in his Linux box, and he got no clue on how this file is going to execute?

The file actually is using bash command, to execute it, that file must be granted an execute permission by doing this:

chmod +x install.sh

By granting the execute permission on a file, now the file can be executed just like below:

./install-sh

Without granting the permission, the file has to be execute in following method:

sh install.sh
bash install.sh

But base on my working experience, that file will be granted an executable permission if the source is dedicated for linux. Unless it is dedicated for Windows.

[Reference]
  1. http://www.cyberciti.biz/faq/run-execute-sh-shell-script/

Monday, August 24, 2009

OpenOffice 3.1.0 kick start

Few weeks ago, I have downloaded open office latest source code from this link. There are six major packages in total, which there are:

  1. core source package.
  2. system source package.
  3. binfilter source package.
  4. l10n source package.
  5. extension source package.
  6. testautomation package.

I have extracted those package and ready to install. Unfortunately the installation process not going so well. There are so many missing components in my Linux, and I have to install it one by one. Currently I was stuck at installing the GTK+ because this component requires me to install the dependency components such as Glib, Pango, ATL, and Cairo. Installing those components is not as easy as I think, and it could spend up a lot of time to search the Internet how those components should install. Like one example, when installing Glib, it prompting an error complaining that gettext module was not installed. By doing manual installation doesn't fix the problem, and thus I have to issue the command below to solve the problem.

sudo apt-get install gettext

Although Glib installation has been resolved, but installation for Cairo is a different issue. Because it doesn't have a Makefile, how could I continue my work?

Resource:

  1. http://wiki.services.openoffice.org/wiki/I_want_to_be_an_OpenOffice.org_developer
  2. http://wiki.services.openoffice.org/wiki/Setting_up_Subversion_Access

Friday, August 14, 2009

Finding on developing XBOX game

For so long I want to get myself started in game development. Due to the limited funding and resources, I have joined the local game house to get my dream come true. This could be a great chance for me to learn PS2 and Nintendo technology in game development. Unfortunately, the company doesn't go very well due to the financial crisis, and I am force leave that company to develop the boring software (again!).

I have been heard about Microsoft XNA for a long time, but I never get a chance to use it in developing any game. This technology open up the gateway for everyone to sell their final product to the public, it could be a very good chance to self funding and bring up a new career to myself – The indie game developer. Few days ago I was doing some study on how I can get myself started in commercial game in XBOX, below are my finding.

Requirement for developing XBOX game:

  • Xbox 360 console with hard drive. (RM1800)
  • Xbox LIVE Gold or Silver account. (Free of charge)
  • XNA Creators Club Online Premium membership. (around RM350 per year)
  • XNA Game studio. (Free of charge)

Requirement for deploying XBOX game:

  • XNA Game Studio Connect in XBOX.
  • Add a device in through XNA Game Studio Device Center in XNA Game Studio.

The pricing is range from 200 to 800 point, which is equivalent USD2.50 to USD10.00. 70% of the revenue will be received by you from the total sales. There is one bad news, which is, even I'm debugging a game on XBOX, and I still need to have a premium account for this to work [7].

Related link:

  1. http://roecode.wordpress.com/xna-gameengine-development-series/
  2. http://www.fiercedeveloper.com/story/xbox-make-your-own-games-xna-10-steps-diy
  3. http://msdn.microsoft.com/en-us/xna/default.aspx
  4. http://creators.xna.com/en-US/create_detail
  5. http://msdn.microsoft.com/en-us/library/bb975643.aspx
  6. http://majornelson.com/archive/2008/07/22/use-xna-to-create-games-and-then-sell-then-on-xbox-live-and-make.aspx
  7. http://forums.xna.com/forums/p/27613/213799.aspx#213799

Monday, July 27, 2009

Transition from C to C++

I have been working as a software developer for five years since year 2003. I have been spent four years at the beginning of my career on C language and one year on C++ language since I am working as a game developer on last year.

From my perspective, C and C++ are pretty much the same. What I mean is in terms of programming syntax and semantic. C programming syntax is still compatible under C++ environment where the file extension was saving under CPP file. But if C++ syntax was saving under C extension and try to compile it with C compiler, it will prompt a syntax error.

I have compiled a list of key note for C programmer making transition from C to C++:
  • C++ has smart pointer whereas C is pointer.
  • C++ adopted functor whereas C is using function pointer.
  • Memory allocation should adopt RAII technique.
  • Should not rely much on structure whereas should focus more on object design.
  • Should familiar with template design as this will utilize the code reuse concept.
  • Error handling should be done on one side by using exception. Return code only indicate the status of the execution of a process, not to instruct what should be done next.
C++ is a powerful language, programmer should aware of what they coding so that this language is not overuse. For example:
  • Multiple inheritance should use carefully because this will increase the risk of code maintenance as the hierarchy level was increase.
  • goto keyword should use extensively in the code as this will lead the program flow much more complicated.
Here are some good books that worth to read:
  • Accelerate C++: Practical Programming by example
  • Effective C++
  • Exceptional C++ and More Exceptional C++

Sunday, July 26, 2009

Information overload

What is Information overload?

This happen when you have collect too much information on hand but you don’t need all of them.


Below is the list of symptoms of Information overload

Stress You have done a lot of search, but it seems to be that you have not enough time to read it or there are still missing part.
Poor memory No matter how hard you have read and how hard you force yourself to memorize something, you still not able to recall it.
Inattentive You are not able to concentrate on one thing and get distracted easily.


Here are some tips that may help you out
  1. Plan your purpose of acquiring the information.
  2. Organise your work and get rid of clutter on your table.
  3. Put aside the information that is not relevant to you.
  4. Try to focus, ignore those chat lines, idle gossip, and surfing the Internet aimlessly.
  5. Focus on one task at a time and complete it before starting a new task.

Improve your memory
  • Listen to Baroque music. This type of music has tempo ranges from 55 to 65 beats per minute. It has a frequency of 500 hertz that can harmonies your brain waves, causing our bodies become relaxed and minds alert. One example is Pachelbel.
  • Use music as a memory aid. Music could be a powerful memory trigger.
  • Speed up your reading. An average person can have a reading speed of 200 to 250 words per minute (wpm). There are three attributes showing that you are a slow reading person. First, read word by word. This will cause your eye strain, and boring. Second, sub-vocalise when reading. This will reduce the reading rate because muscular activity tires you out. Third, re-read earlier section waste time and slow down your reading rate.

Speeding up your reading

  • Read groups of word. This is to reduce pausing as you read.
  • Minimise sub-vocalise. Reading either aloud or silently was a bad habit.
  • Reduce regression. Don’t go backwards when you read and force yourself to finishing your reading. Try stop at a section if not whole chapter.
  • Focus and avoid any temptation. Choose the most productive time for your reading. E.g. early in the morning.

Saturday, July 25, 2009

The benefit of using __declspec

  • Only applied to pure interface class
  • Compiler stop initializing the vfptr in constructor and destructor.
  • Only references to the vtable that are associated with the class will be remove.
  • Can reduce code size.
I don't know where did I get the above mention notes but I did jot it in my notebook. I think it should be use with novtable storage-class attribute. It suppose to be use with other Microsoft specific storage class attribute and shouldn't be standalone.

I found an article which describe how this keyword can help in code optimization, how the code will improve when disabling vtable initialzation, and how to indicate a function not to throw an exception.

Windows SDK in VS2008

The Problem
Few days ago I was creating a COM project and try to compile it using midl command, but it shows me that midl was not recognize by windows (I was using the VS tool command prompt).

My Action
First I check on the windows environment variables to ensure they are properly sit there. Then I dive into the directory where the VS installed, my finding was shock because the SDK wasn't there?

I did a search through internet and found a post from forum mention that it should be install together with another component then only the SDK will install properly. What is that component actually? It is Crystall Report.

The solution
Iniatially I feel vague because why Microsoft have to tied the SDK with Crystal Report? I have no other choice. Thus I follow what the guy said. The result was that guy is telling the true.

When the Crystal Report component is installing (the only component that I didn't installed in my local PC), I actually saw the Widnows SDK for Visual Studio 2008 was pending in the Install Component queue.

So the problem solved...
This is not my fault, please don't shoot me !!

JOURNAL

Since I started publish my writing on the blog, I found out that writing was so enjoying to myself. At the beginning of writing the blog, I was so frustrate because I don't know how to present my thinking in the brain onto the paper. Thus there are few post at the beginning of this blog was so boring and the grammar are bad. The situation become even worst when I need to use English to present my thinking since I am not familiar with English especially those grammar.

But now I am getting comfortable with it. This is due to the experience in my writing, and keep practicing it, doing self review after each writing, and doing a lot of grammar checking through the Internet. All these effort are pay off to myself.

Recently I found another type of writing, called Journal. What the hell was that? I did some search using Google and Bing, they are many type of it from the search. Each type of journal will serve for different purpose. I am not going to talk about each of them here. But I am trying to give my own definition about this term, which is more suitable to myself I guess.

The definition:
It is a writing of your study on a subject together with your thinking about the subject and come up with your own specify opinion or suggestion on it.

This is true. Journal could be a good tool to keep track of your study and also your finding about the subject.

Sunday, July 12, 2009

Google Directory could be my study panel

Google directory is a tool for me to further up my study. How to say? I found the computer science directory and mathematics directory quite interesting to me. This tool could be my online learning tools as there provide some useful, but not all, of resources for me to reference.

One example I found is Learning via Primary Historical Sources. This resource was talked about the way of learning discrete mathematics and computer science from history source. I am sure discrete math is one of the subject in computer science program. Have a look on it when you got time. Beside calculating on number, lets try to learn math from history point of view.

Enjoy your reading.

Future of COM?

Just curious to know whether COM still exists in the future. Yes it is. Called COM3? Wait a minute, COM3 is a serial port name, will it crash? So what Microsoft did is rename it to COR, then later rename to COM+ 2.0, then ..., finally to .NET.

The information I mention above is from this post.

Saturday, July 11, 2009

The format of function calling from DLL

I got a problem when calling a function from DLL. And this rule is not well document in MSDN I guess. Thus it could be a very common mistake for those who are new to DLL. I have capture the rules when trying to call a function in DLL from the client program. Lets assume a simple DLL is created, and with a FuncA() being export to the client program in that DLL.

Rule 1) When fucntion is declare using __declspec

#define __EXPORT_MODULE __declspec(dllexport)
__EXPORT_MODULE int FuncA();

The function name from Dependencies Walker is shown like below

?FuncA@@YBHWZ

Rule 2) When function is declare using extern "C"

#define __EXPORT_MODULE extern "C" __declspec(dllexport)
__EXPORT_MODULE int FuncA();

The function name from Dependencies Walker is shown like below

?FuncA

Hope this make a clear sense :)

Sunday, July 5, 2009

Specialization for Computer Science in USM

There are six specialization have been designed for student major in Computer Science in USM. Let's check it out:

a) Information System Engineering
Courses offered under this specialization included Information Systems Theory & Management, Management & Engineering of Databases, E-Business Strategy, Architecture & Design, Software Project Management, Process & Evolution, and Decision Support Systems & Business Intelligence.

This specialisation incorporate main concepts and techniques in current business practices, such as business process engineering, re-engineering, redesign and reverse-engineering so that appropriate business values can be added to the resulting business solutions for the interested parties.

b) Multimedia Computing
Courses offered under this specialisation include Multimedia Systems, Web Engineering & Technology, Computer Graphics & Visual Computing, Multimedia Information Systems & Management, and Animation & Visual Reality.

This specialisation required student to apply the principles that underpin the design of multimedia, hypermedia, multimedia information, graphics and information retrieval systems including web-enabled systems. And also describe the range of media, tools and supporting devices that can be used to support the use and development of multimedia information, hypermedia, and graphical systems.

c) Distributed System & Security
Courses offered under this specialisation include Information Security & Assurance, Principles of Parallel & Distributed Programming, Distributed Systems & Grid Computing, Computer Systems Security & Protection, and Advanced Computer Architecture.

This specialisation required student to understand the current and emerging technologies, architectures and standards in computer hardware and software architectures, and apply this knowledge towards the design and implementation of new computer languages and modern operating systems.

d) Network Computing
Courses offered under this specialisation include Network/Socket Programming, Internet Protocols, Architecture & Routing, Network Monitoring & Security, Microprocessors & Embedded Systems, and Wireless & Ad Hoc Networks.

This specialisation required student to manage and secure computer systems and networks using current tools and techniques, to protect the security and confidentiality of user data, as well as implement preventive measures to deal with known and unknown cyber threats.

e) Software Engineering
Courses offered under this specialisation include Software Requirements Analysis & Modelling, Software Design & Architecture, Software Project Management, Process, & Evolution, Software Quality Assurance & Testing, and Automata Theory & Formal Language.

This specialisation required student to demonstrate an understanding and appreciation for the importance of negotiation, effective work habits, leadership and good communications with stakeholders in a typical software development environment.

f) Intelligent Systems
Courses offered under this specialisation include Artificial Intelligence, Knowledge Management & Engineering, Computer Vision & Image Processing, Natural Language Processing, and Intelligent Health Informatics.

This specialisation required student to use the latest technological developments that support the development of intelligent systems and their applications in various domains such as computer vision and natural language processing. Besides that, they may required to design and develop knowledge-based systems such as expert systems, case-based systems and knowledge management systems.

Saturday, July 4, 2009

Screen Resolution on S60

As I developing S60 application, I am facing a very tricking problem where the screen resolution was so different in between the emulator and the real phone. Thus I raise my problem in Nokia forum regarding on my issue.

The feedback I get from was disappointing me because this problem is a general defect of emulator. This is impossible to develop one emulator that cater for so many hand held devices with different resolution. Someone has suggest me to use J2ME Polish and LWUIT to solve my problem. But anyhow, this is not a guarantee solution which will not working 100% on the way that you want.

Please note that J2ME Polish use heavy preprocessing and it create a JAR file for every single devices whereas is fairly screen adaptive technology.

Saturday, June 27, 2009

Adding Scroll bar into S60

I was having a problem to show the content inside Nokia X5800 as the content was huge. Two solutions for this:
  1. Redesign the content.
  2. Add scroll bar into it.
Anyhow, I am force to use the 2nd option due to the urge from requirement. Unfortunately the srcroll bar component was not inside the eSWT library. Thus a message was send out in the Nokia forum to see how this can be done.

In the mean time, I did some Google search looking for alternate solution. I got one at last, which is, I have to manually handle everything from drawing to event handling. This is the worst solution if there are no more other choices. I continue my research on scroll bar while waiting reply from Nokia forum.

The first post was reply. And he mention that I have to draw the scroll bar on canvas and receive the "down" key event in keyPress(), and then update everything in the content. Almost similar to the one I found in Google.

Base on this website, eSWT was already handled the scroll bar automatically, but the problem was that when I click and drag the scroll bar, it doesn't work. Until my friend told me that I was using the wrong emulator (I was using 3rd edition FP2 during that time) and he suggest me to use N97 emulator. Then only I notice that this is the only emulator which support touch screen.

From the answer I get from Nokia Forum, I got good news and bad news.

Here is good news:

eSWT Scrollbars on Scrollable provide low level access to scroll events so that the applications can implement their own scrolling logic. You can register for those events using the Scrollable.getHorizontalBar() or Scrollable.getVerticalBar() to get a handle to the scrollbar instance and adding a SelectionListener.

Also there is a custom utility class in Eclipse that provides automated Scrolling for Composites Called ScrolledComposite. You can fetch it from Eclipse Project.

Posted by gorkem.ercan

And here was the bad news:

There is also an ongoing discussion whether ScrolledComposite or an equivalent should become part of the eSWT here. You can actually comment/follow on the progress of that as well.

Posted by gorkem.ercan

Anyhow, my friend was able to make a custom scroll on that phone. Although it is not working perfect, but it still can satisfied the project requirement.

Thursday, June 25, 2009

Develop iPhone on Window

Want to develop an iPhone application under Windows. I found two discussion regarding on this issue.

In this discussion, they are not encourage people to develop iPhone app in Windows because this will against the iPhone's EULA. But in this thread, someone suggest that it could be done on normal PC by installing Hackintosh and it was working fine.

Will take a look on it, might think about MAC MINI when it is not working.

Tuesday, June 23, 2009

CORBA first touch

WOW!! I am moving one step forwards in my IT road path now - CORBA, my next goal. I have been seeking a chance to get myself involve in CORBA development, now I had it.

Since I'm new to CORBA, it is best to get some overview on the CORBA architecture. In this page, the author have give us a clear big picture describing the core concept of CORBA. In this discussion, people are giving us some hints to start CORBA. But that discussion was mainly for JAVA guy, but it can give us a preliminary understanding about CORBA since CORBA is not language specific.

Another discussion, was talk about an alternative way to COM. Among the technology used, CORBA is one of the solution. Enjoy your reading. Cheers!!

Sunday, June 21, 2009

C++ developer direction

I have been learning, playing around with, and working on C/C++, MFC, STL, Win32, OpenGL, and minor DirectX for a couple of years (around 7 to 8 years). After that don't know where to go, have been waste some time working on Action Script, PHP, JavaScript, and J2ME. Not bad, I have learned new thing.

Until I found this discussion, there are actually plenty of things I need to learn. Among the answer suggest by the volunteer, I notice that this one is most valuable. The answer mention that information from rss feed, newsletter, and blog could be scatterer. Try concentrate on one thing or a specific topic, then you will be the master of it.

I am coming back to C.

Cheers !!

Saturday, June 13, 2009

Can't launch S60 emulator

I was installing Nokia Symbian S60 SDK (3rd edition FP2 and N97) in my PC under C:\TOOL directory. (This is just my way of organising the files in my PC.) After the intallation completed, I was not able to launch the emulator. It tooks me about one day to figure out why this happen. Then I reinstall it under C:\ directory, its working!!

One thing must take note that although the SDK was remove from the PC, I mean uninstalled it from the PC, all the files were still there even though a new copy of SDK has been install under C:\ path. This has been making me so frustrated when I launching the emulator from Eclipse, it keep prompting not able to connect to agent. To solve this problem is to manually delete the old files.

Just curious why the S60 emulator's path was hardcoded?

Saturday, May 23, 2009

To be a better "PROGRAMMER"

There was a very interesting post found in this page - How can I know whether I am a good programmer. From the answer, I found two point which is quite match with my attitude:
  1. A good programmer loves to program, and would do so in their spare time even if they already spend 80+ hours a week programming.
  2. A good programmer knows that she/he is not a great programmer.
I still remember when I first attend my C programming class, I start to fall in love with it. I start to realize that this is what I want to do to my computer. Not just to atend the computer class which I did in my primary school, turning on the computer, playing some games, and typing some documents.

I want to be able to instruct my computer to accomplish my command.

I feel so great, this is a real computer class I ever miss. I start digg out more stuff on pogramming after attended this class. Programming was so interesting, complex, cheating, mathematics, and mystery. I learn new everything at my own pace. Along the way, I have learned OpenGL, Win32, MFC, STL, and some web language. I am spenting all my day and time sitting in front of my computer to create something great and fun. From the things I have learned, I discovered that, OpenGL have a great library to create 3D application, MFC providing a framework to ease the application development. Whereas STL providing the algorithm library to simplify things, e.g. string manipulation.

Not there yet, there are many more to learn. When I move on to second company, I have found a new set of library which is dedicated only to the company and at the same time, I participate in OpenOffice project which is using UNO framework in the development. There are gain and loss from here; I study so hard to learned their framework, I am working with thier development style. I gained a valueble experience from here, which is, how to build up a framework for developer. Make developer feel easy. On the other hand, I was blinkly following their development style, I can't change their mind set to listen to mine idea because I am still new and young in programming during that time.

All the way in my study, start to realize the important of methodology, Object Oriented, in my development. But sometime I do think that this is some sort of bullshit theory. In fact, some brilliant people may have some kind of great thinking who can foreseen the future. Well, doest it really help? It has been a long time for me to adopt this concept in my development. That time was when I joined in a game company, I am fully utilize this concept in my development. The question come again, does it really help? I will say not neccessary. I would rather spend time on algorithm thinking rather than OO thinking.

Right until now, I have build up my expertise skill in Windows, and Linux software development, low level software design, and symbian development. Am I better enough? To be frank, I am still focus on the programming, but it is more theory about the programming language, like What the hell this PL is created? What is the fucking proof? When should I use it? Why should I use it?

Sunday, April 12, 2009

The role of Software Engineer

How do you define yourself as a software engineer? Before going to that, first thing first, what is software engineering. According to Wikipedia, software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches. Sound nice? But this isn't the way in real wolrd.
I mean in the real practices, the software has to be build on time regardless of what approaches is chosen. No such definition from the above statement. Programming is a must. Knowing C++ and do not know JAVA is still useless because the position (software engineer) require the candidates to know JAVA besides C++.
To conclude that, a software engineer must know how to "code" instead of know how to build up the software and he/she must work indepently (because company got no money to feed the employee). Usually we called this as one man team. They are more concern on your programming langauge rather than your software development approach. They need a programmer more than a software engineer. In other words, they need a software engineer with programmer pay. Hope this make sense to everyone.
One man team approach is very poor because the software is very fragile as the software is poor "design". Design is refering to software design, not the tips and tricks in programming design or fancy UI design. A very good example is one line code statement. This happens very frequent from my pass experience. (I also been doing that before, hehe...) Anyhow they are still developer out there feel proud of their work because they have the ability in developing a "program". Developing a system, one man team approach should never happen, unless time permit (>5 years).
Usually we will use UML in designning the software since UML already a well known to everyone and is become a standard approach for everyone. It is not limited to use your own custom modelling or diagram to represent your software design. This creative approach should be adopt for every one, and encourage one's motivation in building the software.
Sometimes the way of writting code is programmer attitude. One way to eliminate this "programmer attitude" approach is by conducting a "code review" session. This session will normally held during the software development for those "big company". Software house usually don't because lack of money to do such wasting money activity. This session will neutralize ones attitude to adopt a new approach which everyone agreed.

Saturday, March 28, 2009

What the fucking XML is?

In year 2005, before I got the offer from MYOB, and on the same time, I got several interview invitation, there was a very interesting interview session held at Nxxxxxxxx limited company. The interviewer is very familiar with Web base development (I guess), since all the question he ask are related to the Web Technology. He has throw out a very interesting question said "Do you know XML?" Immediately there are two question generated from my brain:
  1. What the fuck he asking me this question?
  2. Does it really matter if I don't know?
Let's 1st focus on the 1st question. This question is to test whether I have take the initiative to learn new language beside my work. During that time I know XML language (and many others), but I don't really know the objective of this language being designed because I am a C developer, it seems no point for me to adopt this "new thing" in my application development. To me, I will rather choose INI instead of XML since I don't see any problem on using INI so far. And the objective of INI is clear and set:
"To configure your application setting and behavior."
Thus I have answer NO to this question. Once I have said no, then he ask why. So this is something related to my 2nd question.

Do I really need it? Yes, I need it because I am applying for the Web Developer position. This is a must and very important. I am applying this position because I was looking for career advancement into Web Development.

The interview has failed at last. But lucky I did not get the offer. If I have accept the offer, then I wouldn't have my goal:
"To be a C Software Architect."
And also I wouldn't develop Linux application now if I have move to Web. Thank god not giving me this offer. I love you.

Now I was giving a task on redesign the software architecture design for future enhancement. The objective is target on the future. No one able to see from now. My fellow teammate and I are working so hard on this problem and we strike to create a better architecture design for future. One colleague show up his new idea:
"To use XML to mapped all the different logic on the same screen for different model, so that we can achieve robustness without being need to recompile the whole program."
This is too bad. This will gonna burden up the developers who going to support on the XML. Imaging you are working on the XML without knowing the problem domain. XML is a language to do the configuration stuff, it is not a language to mapped the business/presentation logic for different model.

But at last we all agreed not to use XML in the logic mapping. Lesson learned here, don't be over ambitious on programming language, think carefully why this language is being designed and what is the objective/purpose in choosing a programming language in the development.

Happy programming !!

Sunday, March 15, 2009

Error in mounting FAT32 USB in Linux

Problem background:

When I mount an FAT32 USB drive in Linux, it will prompt an error something like below:

mount: you must specify the filesystem type.

I don't know what is that means, I usually will ignore it. Once I ignore this message, and continue with my task, I notice that some of the files with capital letters in it will gone after transfering from Linux to Windows through the USB drive. All the files/directory name are truncate into small capital font. I am so curious on this issue and I start to think of whether this is because of the different file format in between the two devices. Is this due to some missing bits during the write process to the device with different file format?

Solution:

mount -t vfat dev/sdb/ mnt/<mount_point>

This command will mount a FAT32 drive in Linux.

How to write file into Fat32 USB?

Problem background:

I have a USB drive with Fat32 format, but I could not write any files into that drive.

The solution:

1. ls /media/disk -l

This to verified that whether my USB have write access on it. When I use this command, it show me something like below:

drwx------ 2 root root

2. chown -R root:root

This command is to give the ownership to the root user too.

[Reference]
1. CHMOD Help.
2 chmod by the Numbers.

Saturday, March 14, 2009

How to format USB drive into Fat32 format?

Problem Background:

Some of the files created in Linux will not be able to format in Windows, it keep prompting you error said that the device was on use by some other else. When bringing back the USB drive to Linux, the files was locked. there is no way for you to delete it. Thus I am force to format the USB drive under Linux.

Solution:
  1. umount the USB drive.
  2. log in as root.
  3. delete the existing partition using fdisk.
  4. mkfs.vfat /dev/sdb1
But when I was trying to format it (in step 3), it prompt an error:

Could not stat /dev/sdb1 --- no such file or directory.
The device apparently does not exist; did you specify it correctly?

To solve that problem, here is the solution:
  1. cat /proc/partitions. (this will show the minor and major number of each partitions drive)
  2. mknod /dev/sdb1 b <major> <minor> .
  3. retry the format again.
  4. type fdisk -l to verify the partition again. (optional step)
[Reference]
1. Ubuntu Linux format USB pen drive.
2. Could not stat /dev/sdb1, although partition exists.
3. Partitioning with fdisk.

Saturday, March 7, 2009

Career Advancement into Linux Development

I have been dreaming to be a Linux developer for a long time. Now my dream have come true and it is so real. Now I am a Linux developer, developing Linux software using the Linux Operating System. I am using VIM as my editor, GDB as my debugger, G++/GCC as my compiler and MAKE as my script to issue a batch of command into compiler. I can't believe it I can do that. That was great and it is so cool.

Currently I am experiencing the threading in my development. By looking back when I was in Windows development, I though I have been doing the most advance application in my life. The most complicate software I ever never been develop for. Now I have break the limit, beside using those UNIX specific library in my development, I am also experiencing linux threading development, forcing me to study more on the Operating System matter. To be frank, I never touch any Operating System before in my study syllabus. I am not a Computer Science guy but doing Computer Science work. So challenging me in this year.

As well as VIM and GDB, the most command like tools I been dreaming for. This is so great I can learn so much of great development tools in my career, and also my development. Not there yet, I need more challenge to come to me. I am waiting here. Be ware !!

Sunday, March 1, 2009

Setting up QT on Ubuntu Linux

I have been used and played around on Linux for about 2 years. My main activity are basically typing documents, surfing Internet, troubleshooting and administration work. But in this year, I have to move on to do some development work on Linux. Due to the limitation on my technical knowledge on Dell E5400, and also the number of Linux distribution choices available on my desk, I have chosen Ubuntu 7.10 as my primary OS for the QT development.

First of all, I am using Dell E5400. I am failed to install Ubuntu through the start up menu. My laptop hangs during the middle of startup when I was trying to install. But anyhow, I was able to install through the “Live” startup. (There will be an “install” icon on desktop after the OS boot up.) But it comes into trouble when setting up QT open source version, there were some package was not properly install in the OS. This is due to the limited size of the CD. It is impossible to get everything squeeze into the CD with the just 700MB. Thus I have to manually install the require package through Synaptic Package Manager.

Nothing was missing in the QT INSTALL manual, it just that I didn’t read properly on the output during the compilation process. That’s why I failed to install QT. INSTALL manual have given a deep clear installation instruction. But it didn’t mention which kernel package are require for the compilation. Because it is varies depends on which distribution that everyone will be installed. Thus I need to pay close attention on the output during the compilation process. Once found a require package is not there, then only install that particular kernel package in order to get QT compile and install properly. The last step is “make install”. This step is important because it will install QT into root directory so that everyone is accessible. If not, an error “command not found” will be shown when qmake command is being issue.

Last thing to remember, QT installation must be perform under root user because it will require write access to the system directory. Otherwise installation will fail.

swprintf() in Cygwin

I was installing Cygwin in my home's PC. When I try to compile a simple program, it giving me an error arguing that swprintf() was not declared. I have been compile this program using LINUX, but now it is giving me this error seems so weired to me. I though Cygwin will make the porting from LINUX to Windows go easier? Or it should be hassle free?

Just curious to know whether this is my fault? Am I downloading the wrong package version? Instead of downloading the package, how can I update the package?

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?

1st
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"

into:

#include "MyDir/MyHeader.h"

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

2nd
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.

3rd
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.


Reference:
[1] Whatis.com definition.
[2] The Open Group wiki
[3] TOGAF Certification

Saturday, January 31, 2009

Touque Game Engine is not a free tool

That is bad when everything is not free. Whenever I am looking for something great sure will charge on the fee. They suppose to provide a free version with limited functionality for trial. They have forget about those busy peoples who only have a small amount of time to do their own thing.

This thing doesn't suit to me because it is aim for rapid application development. My objective is to work on more technical site. This thing is more like a front end layer like VB or 3D studio MAX. But the thing I want to do is to deal with the mathematics calculation. Unless I am using it for my freelance job.

Last word, it is not the tool I was looking for...

Sunday, January 4, 2009

Planing on Boost engine

I was planing to use boost engine in my project. But I have spend the whole day in configuring the boost thing. At first, i have choose to do the manual configuration, but then later I found out there is actually an exe installer ready for me. ok... Everything is there now. It is very simple to use for visual studio compiler, but if I'm using MinGW, then I have to copy the whole boost directory (only the compile build) into the include folder of MinGW. Then only u can compile the source code, if not U will get an error saying that "The xx file could not be open".

That was cool !