Archive for the ‘SofTware DevelopMent’ Category
Tudung dan keje
Aku terbaca dalam sebuah forum it yang amat popular di mesia, pasal sorang awek nih nak keje tapi sebab dia bertudung and islamic dia telah ditolak tepi.
Yang membuatkan benda nih cam bertambah panas suam di mana minah nih kutuk vb cakap bahasa nih ketinggalan zaman compare dengan php. Abis kena tiow minah nih.
Disebabkan minah nih apply keje sebagai jr programmer, memang amatlah pelik dressing amat dititik beratkan. Memang sepanjang aku bekerjaya tak pernah aku ngk minah techie ( programmer, system admin and so on ) yang cun lagi bergaya. Nak cun? Belasah laa consultant, memang terbaik dressing mrk and rupa pun leh buat bini. Secara jujur aku rasa bagus laa minah tuh tak dapat keje dengan company camtuh. Mind set orang2 di situ memang aku rasa tak kena dengan jiwa minah tuh bila dia bekerja di situ nanti.
Pasal programming language pun menarik gak. Tak sangka ader unsur flame yang menyebabkan beberapa individu terasa. Tak salah aper yang invidu itu rasakan. Pengalaman aku skang nih menunjukkan SEMUA programming language berguna. Agak kelakar laa pasal isu language nih lagi bagus dari polan and polan and polan. Lagi kelakar bagi seorang programmer tuh mengaitkan dirinya dengan programming language ( terlupa pasal low coupling kot). Programming language just a TOOL in solving problem. Pakai jer laa mana korang rasa sesuai and kena dengan jiwa korang.
Code simply a abstraction of steps in solving a problem and implemented using any tools that com can understand.
Thinkin on the higher level
One of my TTDI’ans asked me to join his group of entrepeneur. My job scope simply on advicing him on IT technologies and how this can enhance our daily life. This fella will act as project manager and I will be his system architect/developer/designer. This entrepenur program is under MOSTI initiative.
Now I know how this can be painful experience when it comes dealing with non technical person especially if they are the one that making the decision. I can see most higher ups see IT as an quick to setup, fast to deploy, ROI in shortest period, which I don’t agree. Explaining the PROCESS of making system and other related factors that can affect timeline proof to be my greatest hurdle in this project. They management simply, want THINGS DONE in shortest time.
My decision on technical side;
- using GRAILS or Spring ROO as our application framework

![]()
- database using mysql.

- apply AGILE manifeto

The guys approaced me last week and we were working around the clock finishing the proposal. Hopefully the proposal will be done by today.
Not bad after all
Been using Ibatis for quite while. I must say its simplycity contribute a lot to speed up my development. The only things that bugging me is that we need to test the dao layer. Yes most of the time I stumbled upon some silly sql error, the syntax part.
Somehow I’m a bit curious on deciding between hibernate and Ibatis. If given a chance on deciding the architecture, at which point should we opt between these two?
I am a strong believer of ‘THERE ARE NO SUCH THING AS SILVER BULLET’. After some time working with Ibatis, I can see several sweet spot using this tool.
- total power of SQL in ur hands ( this got nothing to do with celcom mind u )
- simplicity on abstraction of persistance layer
On the bad site;
- CRUD will become a tedious job

Java script library
Much of my time doing web development currently end up on the UI part. To make things spicy, I end up AJAXING. Planning on exploring mooTools and jquery.

thanks to http://webmuch.com
web development must have tools
Ok guys…I think for web development you only need this 2 tools. Both are extension to firefox,
- web developer
- firebugs
U can get many things to start debugging ur web page. Tools for Javascript, css, http response, these are the basic things.
Love the tools, but hate doing code for user interface.
source control…but distributed
Sit has started since this monday and yet I haven’t heard anything related to my web app. This is worrying me considering the amout unit test I wrote. Much of my unit testing end up testing the dao layer. And I still havent figure out the best approach on testing the client side interaction, especially on ajax part. Well I guess tomorrow since I’ll be going to client side might as well I ask the test manager himself.
Going to client side pose some problem since;
- source control, using svn meants U need to have connection to central svn server which turn out I dun have any.
- creating patches, also its troublesome since I can’t track, commit changes to the svn server
So the only solution for now is to use GIT, and guess who its creator? Its no other the father of linux, linus torvald. Git pretty much like svn minus the central server. What makes it so great coz it have several bridge tools to integrate with SVN. So you can commit at ur local Git then put it into SVN. How cool is that?

2 bz
Sajer buat tajuk pakai short form. Skang nih terlampau bz dengan projek web application. Dah laa lone ranger, nasib baik design semua dah been taking care by the solution architect. Nasib baik ader face communication kira agile gak laa kalo nak dapatkan feedback.
Aku rasa most of the time masa aku abis skang banyak pada unit testing/system under test/automated test. Masa utk buat code kejap jer.
Tak tahu sangat nak cakap pape utk post kali nih. Still rasa nak sambung code siang tadi.
sketching and prototyping
basic mocking with easy mock
Ok today we gonna learn something not very new. Basically when I was working with my previous company I have’t got the chance to do mocking on my unit test or automated test ( lack of knowledge to be exact ).
To make things clear, here are the list of common words that I’ll be using in this exercise;
- unit test = automated test
- mock object = test double
This scenario will simulate on how test double will make things easier if we code to interface. Actually there are lots of benefit but I will save that part for later.
First we have the interface;
public interface EyeTechnique
{
String illusion();
String readPersonality();
String seeThrough();
}
Then here come the SUT ( system under test ) which will be using the interface.
public class Clan
{
private String name;
private EyeTechnique eyeTechnique;
private String village;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public EyeTechnique getEyeTechnique()
{
return eyeTechnique;
}
public void setEyeTechnique(EyeTechnique eyeTechnique)
{
this.eyeTechnique = eyeTechnique;
}
public String getVillage()
{
return village;
}
public void setVillage(String village)
{
this.village = village;
}
public String getEnemyPersonality()
{
String personality = this.eyeTechnique.readPersonality();
return personality;
}
public String watchEnemy()
{
String enemyInfo = this.eyeTechnique.seeThrough();
return enemyInfo;
}
public String createIllusion()
{
String illusionary = this.eyeTechnique.illusion();
return illusionary;
}
}
And the last thing, the test class.
import org.easymock.EasyMock;
import junit.framework.TestCase;
public class ClanTest extends TestCase
{
private Clan clan;
private EyeTechnique eyeTechnique;
public ClanTest(String name)
{
super(name);
}
protected void setUp() throws Exception
{
super.setUp();
clan = new Clan();
eyeTechnique = EasyMock.createMock(EyeTechnique.class);
clan.setEyeTechnique(eyeTechnique);
}
protected void tearDown() throws Exception
{
super.tearDown();
}
public void testGetEyeTechniqueNotNull()
{
//fail("Not yet implemented");
EasyMock.replay(eyeTechnique);
assertNotNull(clan.getEyeTechnique());
}
public void testCreateIllusion()
{
EasyMock.expect(eyeTechnique.illusion()).andReturn("mangenkyo sharingan");
EasyMock.replay(eyeTechnique);
assertEquals("mangenkyo sharingan", clan.createIllusion());
EasyMock.verify(eyeTechnique);
}
}
Ok here is the explaination especially on using test double or mocking;
eyeTechnique = EasyMock.createMock(EyeTechnique.class);
This is where easy mock will create a proxy object based on interface that we specify. In other words, a dummy/mock object.
public void testCreateIllusion()
{
EasyMock.expect(eyeTechnique.illusion()).andReturn("mangenkyo sharingan");
EasyMock.replay(eyeTechnique);
assertEquals("mangenkyo sharingan", clan.createIllusion());
EasyMock.verify(eyeTechnique);
}
At line 3, this is where you expect your test class to call the test double method and return with a value ( as specify in our interface ). This part also known as recording the behaviour of test double.
Then at line 4 this is where we tell easy mock to stop recording and reply the behaviour. So when the next line exercise the SUT, this will be the test double we just recorded.
Line 6 will serve as verification stage where easymock will check whether they are missing/more behaviour than it suppose to be. It will try to match up the recorded behaviour with the one that will be call in our test method.
I think I might be missing some important things here…But not sure what.
the legacy…..code?
Yes….seems I been idle since the last week, it would beneficial for me and the team if I could find something useful to do. To be more precise something that would be bring some value to the project. Hence the reason why I am and choosen to be with the team.
Frankly speaking I’m addicted to writing code especially test code. TDD bring much excitement in my career as a coder. But that only serve useful ( IMHO ) if you involve with the project from early stage. But what happen if you joining the project that already started for a few years? And to make things interesting the project doesn’t have any standard way of doing automated testing and unit testing?
Forget about doing TDD, how about doing automated test on legacy code? Hey I’m not that great programmer/coder to begin with, but it would be great to have a safety net each to make changes to the code. Yes the one that can be run as automated test.





