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.
Thursday, December 29, 2011
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...
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.
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.
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:
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. :)
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:
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!
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");} //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"); 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!
Subscribe to:
Posts (Atom)