Thursday, December 29, 2011

Distributed VCS vs centralized VCS

I've been using GiT, a distributed VCS, for more than a year now. I don't find it cumbersome or hard to use at all. It just need a little shift in paradigm of how a VCS works. First things first, we just need to understand its concept of local and remote repository.

When you install DVCS and initialized a repository, this is your local repo. It resides on your local machine. When you do a commit, you are actually committing locally. This has several advantages.

You dont have to be online to commit your code. What does this gives you? The ability to track your changes. But one may argue that you can compare with Local History in your IDE. Question: Can you track the whole project changes with that? I believe that you only can track only a single file at a time. :) So, DVCS allows you to track your whole changes and 'save' it as a set. You might write a prototype program and it works fine. But let say you need to refactor it and something goes wrong somewhere and you lost track of what was changed that made it broke, can you track them back using the local history? Unless you are a masochist then I believe the answer is no.

You are free to develop and implement that experimental feature without the pain of doing merging that most popular centralized VCS gives you. Not just that, you are now able to do that OFFLINE and without the pain of creating a separate workspace/project.

You totally don't need a centralized repo to sync your codes with your buddies anymore. If you and your team work locally, you can just pull from each other and review each other's codes just by sharing a folder on the network, or create a 'bundle' and email it. Or appoint someone as the build manager and let him do the usual merging and build. You can have a 'Blessed' or 'Golden' or whatever name you want to give it to a main repo and work in a 'centralized' way if that is what you want.

Minimize broken builds. Now in my past experience, this thing is undeniably the most common showstopper for developers. Countless times I've been in this situation where somebody from a different timezone 'accidentally' committed half of what they supposed to and what happened was, the whole local team unable to do anything productive for the day. Worse if the team in the other timezone is celebrating holiday the next day. Or maybe somebody refactored a piece of code that another developer did a design mistake to tightly couple his code to it.

I'm not saying the CVCS is all that bad. It is simplistic but it relies too much on the network and developers to commit their code correctly.  Right now, if I am given the choice, I rather go with the DVCS instead of CVCS and I really recommend that you do too. Other than the shift in paradigm, another issue that most DVCS haters are having are just because they did not configure their client properly - this could be for so many reasons but I would say being lazy and impatient is the main issue as I never really have trouble using it. Take time to understand and I'm sure you'll like it as I do.




Tuesday, December 27, 2011

2011 in review.

2011 is closing its curtains. A lot of events occurred that brought major changes in my life's course.

To summarize some of the memorable stuffs:

  • Left a huge nonsensically chaotic corporate organization after a heated argument with a moronic asshole manager. XD
  • Went on a trip to Indonesia, sightseeing and attending my sister's wedding reception ceremony. :)
  • Joined an organization that is also dysfunctional but bearable due to the super flexible hours and remote working ability. :|
  • My team lead resigned. Major demoralization. :(
  • Went on a family trip to Cameron Highlands, BBQ and sightseeing. :)
  • Bought a Playstation 3. Yeah, I'm so outdated. :)
  • Bought a used Playstation Portable and gave it to my brother as his birthday present. :)
  • Bought a new mountain bike - Scott Scale 60 2011. :)
  • Bought a foldable bike - Dahon Vitesse P18 2011 and started cycling to work. :)
  • Partnered with some good friends (my ex-team lead) to start up our own company. :)
  • Ex team lead in Patimas joined the dysfunctional organization, but only lasted 3 weeks before resigning. Another major demoralization. :(
  • Influenced someone to buy a foldable bike too. >XD
  • Opening myself up by joining the cycling community. :)
  • I was on TV! (although just interframing) XD
  • Bought another Playstation Portable and gave it to my nephew for his UPSRA exam result. :)

Things to achieve in first few months of 2012:

  • Quit the dysfunctional organization.
  • Get something really rolling for my company.
  • More community service perhaps?
Out of ideas. To be added more later. 



Tuesday, November 29, 2011

Mental fatigue

It's almost December. It has been a long journey and still on the road. Not sure if I lost my passion for the job. I keep on losing focus no thanks to all the super fast requirement changes and super tight schedule. It was a disaster for my life. The only thing I can think of right now is to hoard a lot of cash and invest in shares. I just want to relax and enjoy life. Alas, my business is still in its infancy. There's a lot more work to do to get thing really moving. This is 'The Climb' as what those business people say. Targeting to have a good relaxed life in 5 years time could be too constricting I guess. Maybe I should aim lower.

Or maybe I just need a really long vacation. In my mind right now is only beautiful sceneries of paradise like beaches, beautiful mountains with snow, great waterfalls and serene lakes. But then, to even have decent week of vacation to those places would cost a lot of cash.

I wish life is as simple as it was during the times of our forefathers.

sigh...

Thursday, September 8, 2011

Galaxy S II

I've sold off my good old Samsung Galaxy S to a good friend of mine as I bought the Samsung Galaxy S II.
20 minutes after closing the deal at the shop, I've rooted the device. LOL.

My comments:

Almost everything is as expected. The dual core Exynos 1.2 GHz processor really delivers great performance. I noticed no whatsoever lag during launching and switching of applications. The phone really 'flies'. I haven't use other Android phones before so to me, the GPS performance for this 2nd generation Galaxy S is super fast! A major jump from the failed GPS chip in the first generation. Movies and pictures on the new screen utilizing the Super Amoled Plus technology is a delightful sight to behold. Haven't tested for 1080 full HD yet. But the pictures snapped is of a good quality although not as sharp as Sony Ericsson's Xperia Arc.

My only complain is that at stock factory settings, it's still using Gingerbread 2.3.3 which comes with that super horrible Android OS battery draining bug. I wonder why Samsung have yet to roll out the update to 2.3.4 which fixes that particular bug. My hands are getting itchy to flash those 2.3.4 custom roms because of this.

my thoughts on ORM and database performance

Some people (especially junior developers) who just learnedORM technologies did not understand that sometimes, it is important to write SQL instead of traversing the objects. Yes it is simpler to just get the object from the database and traverse it but depending on the 'loading' mode, you could be writing a program with bad performance issue.

On eager fetching, ALL the related objects will be fetched. You don't really want to do this all the time as it is a resource consuming process.

On lazy fetching, only the object that is directly specified in the query is fetched. Only when we want to traverse along the relation, then only it will load the related objects. This will cause multiple queries to the database.

So, in my humble opinion, it is better to directly query (using the ORM's query language) for the objects that you need instead of being lazy and only depend on the ORM's fetching mechanism. Probably a bit hard to get it right if you aren't familiar with multiple table joins but seriously it is worth the time and yields better application performance.

Conclusion: a good software developer should not neglect learning database related aspect of the field.


Wednesday, July 20, 2011

All work and no play makes jack a dull boy.

It's been a while. Life has been quite busy but I think I'm getting more lazier.
Work issues are getting more annoying with the CEO getting his hands into the cookie jar at times after my respectable team commander left the gig. I don't really bother to reply his questions in the emails as once before he lashed out at me for no reason after I replied (reread my own reply and there is no way that I'm being disrespectful). Things looks like it's going downhill after the said colleague left. Oh well, don't want to comment much on that so let's leave that topic for later posts and talk about other more awesome things in life.

I'm re-indulging myself in cycling/mountain biking again. This time, a bit more serious as one of my brother just bought a new MTB for himself. Went for two off-road trail sessions (Kemensah and Perdana Lake Garden) and I found myself in dire need to upgrade my old bike. So, a few weeks ago, accompanied by my brother (the one who bought the new MTB) went to several bicycle stores around Petaling Jaya. At first, I was really interested in getting a Merida MATTS TFS 800-D at KSH Bikes. But my brother suggested that we went to all the shops first before deciding. So, next we went to Tukang Basikal Fook Sang and was recommended Fuji Tahoe 1.0. Last stop, we went to BikePro and was recommended Scott Scale 60. It took me long enough to consider the options and I finally decided to get the Scott Scale 60 for the reasons:

  • The geometry. It gave me the best clearance on the top tube.
  • The color is more appealing - low profile but 'fierce' enough.

First ride on road, I can already feel the speed and the handling is much better than my old Giant Rincon. Thanks to the 30 speed setup and light overall weight, I can now climb up a steep hill much more easier than before (tested in the hilly area of Kampung Sg. Penchala). I can also attack a downhill with more confidence and control thanks to the disc brakes (the strongest reason to upgrade was my old bike's frame does not support disc brakes).

So one fine weekend, my two brothers, me and a friend of my brother who also just bought a MTB went off in a quest for an off-road trail. Went to Elmina but we're not sure on the trail's entrance so after about half an hour wasting time circling the area, we decided to go to FRIM instead. That day, we conquered the Rover's Trail which we failed the last time due to my eldest brother being superbly unfit with his cheapo-bloody heavy-stupid branded-bought from Giant Hypermarket-MTB causing us to be unable to finish the conquest. That's what you get for being a bloody cheapskate (he never really learn the lesson. sigh. The only thing really MTB-worth on him that day is his helmet). It felt really good that day. Although my brother's friend commented that I went uphill like a absolute madman but downhill like a girl. LOL. That was the first off-road with the new bike.

Last sunday, the four of us went out to FRIM again. This time, we did the Dream Trail + Rover Trail. I would say the Dream Trail is quite a technical challenge being a single track with all those roots, water ruts, the rocks and the narrow trail. The most challenging part for me is the roots and the water ruts. Those ruts really made the trail seems unmaintaned and hard to ride. It was another interesting ride. We thought of taking on the infamous Steroid Hills but both my brothers were not that fit for long rides. Good thing that I've been cycling around the neigborhood so my endurance is kinda okay :). And I've improved my downhill speed thanks to the techniques I've learned from the magazines and youtube videos. My CatEye cyclometer recorded 40km/h as my fastest speed that day :).

Next trip is to finish FRIM's Steroid Hills and later on to Rubber Research Institute in Sg Buloh area. I just can't wait. :)

Monday, May 23, 2011

I hate ignorant incompetent programmers.

I really hate when this thing happens. Yes I know that Java can be quite verbose with its boilerplate codes but please, as a developer, we should be responsible to write proper codes.

My current gripe right now is related to closing I/O streams. Please do close your streams at the proper place!

Bad example:



public void readFile(String filePath){
  
  try {


    FileInputStream fis = new FileInputStream("inputFile.txt");
    FileOutputStream fos = new FileOutputStream("outputFile.txt");

    ...whatever file processing here...

    fis.close();
    fos.close();

  } catch (Exception e) {


    e.printStackTrace();


  }



} //end of readFile method


Okay, now why do I say that this is a bad example of code? First thing, if there is anything that happens in the try block, rest assured that the program flow will jump directly to the catch statement and the close method invocation will never be reached and the files will be stuck on system unless the app was terminated.

The code was supposed to be written like this:


public void readFile(String filePath){
  
  FileInputStream fis = null;
  FileOutputStream fos = null;

  try {

    fis = new FileInputStream("inputFile.txt");
    fos = new FileOutputStream("outputFile.txt");

    ...whatever file processing here...

  } catch (Exception e) {

    e.printStackTrace();

  } finally {

    try {

      fis.close();
      fos.close();

    } catch (Exception e) {

      e.printStackTrace();

    }

  }

} //end of readFile method


Now, the changes are highlighted in blue and the font was made bold. Right now, no matter what happens, the streams will always be closed unless you put a System.exit() somewhere before the finally block is reached.

I really hate when my app causes memory leak from using a third party API because of this. And this is also the cause of people saying that Java programs are causing memory leaks. The actual fault lies at bad codes written by incompetent developers. If you are writing an API, make sure that the code is well written! be responsible!

Now, time to get some sleep. Urgh!

Wednesday, April 27, 2011

Awesome!

I hope that my past postings are the last of my painful suffering saga. It has been a month. I am now feeling content and great as I'm currently working in a team with good friends and have no issues with anyone. I only have the tasks assigned to focus on and so far, I'm feeling awesome!

I get to work at anytime I like, I don't need to be in office all the time, I don't need to complain much about the task as I believe my team leader and project manager are doing their best to protect me from outside noises. There's no serious blame game going around. No office politics. Just a group of friends working hand in hand as a team to survive on the road to success.

There's always room for discussion although sometimes my team lead and project manager heats up kinda quick but after the discussion, they just 'fool' around together like nothing happened. Professionalism. Nothing personal.

Well, I hope it stays this way. There's no need to work for a huge and famous MNCs to feel content and happy. I left those behind and now, I'm feeling awesome!

Friday, March 25, 2011

Life balance is being restored. :)

I'm back. Feeling the joy of life returning to me. At the moment, I'm enjoying my holiday. It feels so good to know that there are no more troublesome task with ridiculous deadlines waiting for me at the end. Nothing to worry about. I'm going back to my passion; the core of software development - programming.

It ain't real software development if it doesn't involve real "Puroguramingu, Mazaafakkaa!" All those platforms that claims to be top number one but is not really programming and no community support are all bullshit. And those people doing the management should not dictate what technology and how it is going to be implemented. Stop putting your hands into the cookie jar, bastards! They all should get out of the way, let the engineers apply their expertise and clear any obstacles for the engineers. That's what real Management, Asshole! is all about.

Enough about that. Now I'm going to rant about those freshies out of college and their obsession with joining huge corporate companies. Yeah, sure you have the bragging rights as you have that uber cool email address ending with @<insert huge ass company name here>.com but seriously, have a look at the market demands first. I don't mind if the job is really aligned with what the market demands. But doing things that are of little value to the big market? Are you satisfied enough to invest your part of your precious lifetime doing things that are only going to tie you to only that place? I rather stick to the skills that the market demands. That is the reason I'm not afraid of losing my job. I don't care much about job security if the job itself doesn't give me satisfaction. I rather be free doing things that I truly love. There's a saying that goes: "Find a job that you enjoy and love doing, and you won't need to work anymore".

"Life is too short for the wrong job"

Monday, March 7, 2011

3 weeks to freedom.

     My resignation took effect on 28th of February 2011. More like resignation email actually since this company is so advanced and did not require printed materials. There was silence in exception for the email I received back from the Human Resources department to confirm that they've received my notice. I'm not keeping it secret to people who I consider as friends. Most others did not know yet but I don't care. They don't matter much to me.

     It became my resolution ever since my new manager 'challenged' me to resign about four weeks ago. The domain side complained that my team is not giving our full dedication and said that we did not deliver anything. My team leader is a spineless weakling who can't even stand on his own, always obeying the commands even though it's absurd. My integrity was questioned again and this enraged me. It was unfortunate that I've been sick a lot at the end of 2010 and early 2011 with the kidney stones and the food poisoning. Yet, I was labeled of being 'sick' just to avoid work. When I challenged them back about the medical claims I made because I've maxed out the specialist clinic allocation and whether they wanted me to bring my medical records, silence reigns. I've worked my ass from daylight to the wee hours of the morning just to reach the absurd deadline. I've been denied training on the platform just because I can't attend the full two weeks due to my appointment with my doctor. I've been working hard just to understand the uber annoyingly complex platform but I've received no gratitude for my work. Heck, originally, I was the only developer working on the stupid module. Even after another offered to help, we still couldn't finish the damn thing on time as the time given was ridiculous.

     I've truly had enough. I'm glad that I've made the decision. I'm buying myself out. My time is too precious to waste on things that I don't even like doing.

Thursday, February 10, 2011

No more Mr Nice Guy

Does it strike you as weird when you're bought out from a company with an exorbitant amount on your head..

 - and tells you that they need your expertise but they asked you to do every nitty gritty detail set by them to the letter?

 - and tells you they need your experience but are not listening to your advice at all?

 - and tells you they need you to provide input on enhancements but when you do, nothing is being done about it?

- and tells you that they need fresh new ideas but when you pitch some to them, it falls on deaf ears?

- and tells you that they need your problem solving skills but when you detected a hidden but imminent malicious problem and told them about it, they asked you to just follow the plan?


Heck, there's a hell lot more.

I'm totally pissed right now. How easy it is for you to deny all that I've done; my commitment, the F-ing long hours just to follow your atrocious deadline, the denied holidays, the stressful weekends. What happened to the "good job!", "great!" and what-so-ever when we followed your destined-to-doom plan earlier but the final product is a mess?

That will be the last time you'll be questioning my integrity. And yeah, since it's easy for you to say that if I don't like it, I can just get out,  no more Mr Nice Guy from me. Here it is: FUCK YOU!

Yeah you bought me out. but that doesn't mean that you fucking own me!

All the best luck and the grandeur of the heavens for your Death March.

Tuesday, February 1, 2011

Disgusted and burnt out.

I don't really want to blog about this. It's been 7 freaking months. I've been trying hard not to but I can't stand it anymore. The thing is, my current company sucks big time. Not as worse as the Singaporean company that I've joined before but enough to make me feel sick about it.

There's no real structure. The whole thing is a total disarray. Requirements come in really late. Estimations were done at managers' whim. developers were forced to work super overtime just to meet the impossible deadline and the worse thing is, I'm already burnt out.

Asshole managers. I seriously disgusted by an email written by one of the managers. Come on, It was not their business opening time yet, the deadline is just a few hours late and he already shot an email claiming that we already losing client's trust and we are perceived as being bad. Total bullshit. Disgusting. You're the one who over promised the client. You never consult us about the task estimation and you just stamp your own date and what the F, we're the one to be blamed? F you!

Useless team leads adds salt to the pain. You know that it is impossible to meet the crazy deadline and yet you just say yes to everything but the burden was placed all on the developers. You yourself hardly code and you call yourself an architect? F you! When things go wrong and the damnation is imminent, you start to frantically blame your developers and force them to work atrocious hours. Again, F you!

I'm already on holiday, yet you tried to called (good thing I've blocked your number earlier) me demanding I submit the codes and when you can't reach me, you spammed with sms' threatening that this will not look good on my performance review? For F's sake I've told you I'm going on holiday on these dates ages ago. Why the F did you assign me the task? F you!

Highly Political. Highly Preposterous. Highly Painful.

I bet Bill and Dave are crying in their graves right now. So much of preserving those so called values.

Monday, January 10, 2011

Income from piracy.

In the world today, nearly every business requires the use of computers and when we say to use a computer means that we are using a software that are installed in the computer to get our job done. It has come to my attention that most of us are using pirated software no matter how small the scale is even in those large corporations or in the government sector.

I have to admit that I am one of them and I'm not proud doing it. Thus, in this year 2011 I am set to use only legitimately acquired software. I am a software engineer by profession and I really understand how malicious is the effect of software piracy. At the current moment, other than my daily job, I'm also working as a software development consultant on a part time basis for another company. My concern right now is that I'm indeed using software to earn income. From a Islamic perspective, software piracy is like stealing and income for the use of it is non Halal. I guess I just realized why I'm always getting sick. So, the next thing is, I'm going to legally purchase all the required software for my business.

a post in a forum about fatwas on software piracy: