Monday, November 17, 2014

How to Start Your Career as a Freelancer?

I started my career as freelancer since beginning of 2012 as freelance programmer at High-Performance Computing Labs, Universiti Teknologi PETRONAS, Malaysia. Being a freelancer for 2 years, I am not thinking myself as a freelance master. Thus, this article is not a "how-to-be lecturing", but it's a kind of a reflection. This article is based on my experience and discussions with some friends whom working as freelancer.

First thing first, freelancer is a skill-based position. You don't have to get any degree from any university (even in some case it will give a value-added). As freelancer, even if you are still 5 years in age, as long as you have skill or set of skills needed, then you are ready to go.

Because freelancer is a skill-based position, showing your skill is paramount. You are very lucky that you are now living in the world where most of the platforms you need as freelancer are provided for free. Here are some examples of free platforms you can use to show your skills:
  • Any type of coding: github, gitlab
  • Photography and image editing:, or simply show the photos in your Facebook, Twitter, or Instagram.
  • Design: GraphicRiver
  • Programming and algorithm skills: your blog or any programming forums (mathworks, stackexchange, etc).

So, to highlight, the first step needed is to show up your work(s). Let people see your works, let them admire your works and let their own words say good things about you and your works.

After showing your work, you need to work with people using a trusted platform. There are bunch of trusted platforms out there that connect you and prospective clients. One of them (the one I use since April 2014) is oDesk. ODesk is a great platform that facilitate great working collaboration between clients and freelancers. Other than oDesk, you can use like Elance,, etc. Each of them have different rule of works. You have to learn carefully how the platform provides interaction between you and your client(s).

Finally, I was thinking that by being a freelancer, we may have more "free time". In fact, it is not. Being a freelancer, it totally means that we have to manage our working time ourselves. If you work at any office, the office will make you come to office at 8am and leave the office at 4pm, from Monday to Friday. However, depend on you and your agreement with your client, being a freelancer will make you do one of these working style:
  1. Adapt your working time with client's working time. If you have small time difference, this will not be that difficult. It will be very difficult if you have big time difference.
  2. Manage your working time yourself. If you can communicate well with your client, most of the time, your client will understand as long as you fill up their requirement and reach the total hours agreed. For example, you may start your work as early as 4am and work for 3 hours. Then you send your children to schools and start working again at 9am until 1pm (so now it's already 7 hours). You pick up your children and send them to bed for a nap (or you also have nap if you want to). And work again for one hour after 3pm (so now your working time is 8 hours already. Same with those working at any office). This is just an example. You may manage your time differently.

Hope you enjoy being a freelancer like me. Believe me, it's a very great experience, especially if you are freelancer working with people around the world. You may get a good clients, but once you may get a not-too-good clients as well. Just enjoy the game (and enjoy the money as well). Hehehe...

Monday, November 3, 2014

How to convert FORTRAN to MATLAB?

Converting from one programming language to other programming language may need some effort and understanding on both programming language. In this post, I will discuss about converting from Fortran to Matlab.

Fortran is general-purpose programming language developed by IBM. It is used primarily for numeric computation and scientific computation. Matlab is array-based programming language that used for scientific computation.

To convert from Fortran to Matlab, here are two alternatives you can do:
1. Convert manually
2. Convert automatically

==== 1. Convert manually =====
To convert manually, you have to understand both language very well. In the converting process, it will be easier for you to display your fortran code and your matlab side-by-side. If you have dual screen, it will be a lot easier. You can put your fortran code in second screen and your matlab in first screen. Or you can print your fortran code and put it beside your workstation.

==== 2. Convert automatically ====
I found a fortran to matlab converter from mathworks developed by Barrowes consulting ( To convert, followings are some steps needed:
1. Download and extract f2matlab into your computer
2. In matlab, go to the folder in which you extract f2matlab
3. In matlab command, put >> f2matlab('myfortran.f');
4. The f2matlab.m will do automatically for you

However, I noticed that some files cannot be converted correctly. Therefore, I have to do double check for the converted one. I noticed even some files cannot be converted at all. So, the f2matlab can help you a lot. However, be ready for manual checking and even manual conversion.

Hope this helps.

Friday, January 17, 2014

Android studio in ubuntu - problem: 'tools.jar' seems to be not in Android Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE.

I love coding, especially Java. Because Android apps is written in Java, I would love to make one as well. Unfortunately, when I tried to install Android Studio on my Ubuntu yesterday, I got this error message:
'tools.jar' seems to be not in Android Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.
When I google on this error, there are so many websites and forums discuss about this error as well as the solutions. However, in linux (or ubuntu in my case), sometime we have different environment so that the solution will not always work (sometimes we have to do another thing before or after that solution). And this also happen in this case.

Here are what I did then:
1. Know what exactly the problem is: the problem is that the JAVA_HOME in my system did not point to JDK. Instead, it points to a JRE. JRE can only be used to run java applications, not to build them.
2. Check the java path used by the system. In terminal, I typed the following:
$ java -version
In my system, the output was
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

Hmm... still don't know exactly what was the problem. So I continue with this one in terminal:

$ update-alternatives --config java
In my ubuntu, the output will be

Selection    Path                                      Priority   Status
  0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
*  2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode
  3            /usr/lib/jvm/java-7-openjdk/jre/bin/java   1051      manual mode
Press enter to keep the current choice[*], or type selection number: 
3. Voila, according to some people out there, I have to use java-7-openjdk. So I have to change the selection into 3. OK... now type 3 and enter. But, wait... here's what I got.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to provide /usr/bin/java (java) in manual mode.
update-alternatives: error: unable to make /etc/alternatives/java.dpkg-tmp a symlink to /usr/lib/jvm/java-6-sun/jre/bin/java: Permission denied

4. Aaaa... permission denied. So, I just have to put 'sudo' before the command:
$ sudo update-alternatives --config java
5. That's it... now I can choose number 3, and when I do this command:
$ java -version
The output has now changed
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-0ubuntu0.11.10.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
6. In my android studio folder, I go to /bin folder and now I can call the in terminal.
$ ./
7. Voila... after several steps, my first android project has now been created

Hope this post will help you as well. :D