Khangharoth

July 8, 2009

Why I didn’t tried Maven before

Filed under: Uncategorized — khangharoth @ 9:54 am

I am or now should I say was happy with Ant.

It was doing all the things i wanted it to do and support in terms of documentation and other compatablity was also their.So from my prespective ,i felt absolutely no need to change to another build tool.But readin so much about maven on discussion forums and its idea about Convention over Configuration is something i always wished for.

Whenever we move to another project , its structure is the single most annoying thing.You are used to some way and now these guys are doing same thing another way.Their is no right or wrong but just diffrent and this really should be done away with.

Plus the fact that in ant you need to specify where is the ’src’ ,how to compile java file ,where test classes are ,how to generate test-reports seems bit too much.So the fact is Iwas aware of benefits maven gives but still found no compeling reason to make a switch.

This monday I needed to set up a new project and so just thought of giving maven a try.And I was able to set up a maven based project whith test-reports,PMD reports,Findbugs-reports,Coverage reports,Java-Docs etc in less than 15 min.This was awesome ,I can do all this is ant quite easily but nothing like this.

So in my opinion ‘Transitive dependencies’ is really great in Maven but its their emphasis on ‘Convention over Configuration’ ,which makes maven such a great tool to use.

Personally i am feeling bit sad as Ant used to be so cool and now it think i need some compelling reason to use ant!

June 16, 2009

How Agile turns into Fragile

Filed under: Uncategorized — khangharoth @ 3:19 pm

I really like Agile  methodologies  especially because of its focus on  iterative development which encourages frequent inspection and adaptation.

But i would have been very happy if this was incorporated in normal working practises rather than giving a new fancy name.Now it gives a license to Managers to change requirement at any point in time and if you get back to them ,they will teach you about Agile way of doing work.

So how people have changed Agile to Fragile.

  • Requirement evolves  (To)  Reguirements can change anything and to anything.
  • Document what is necessary (To) E-mail’s are good enough documents.

May 23, 2009

Book Review of “Java Power Tools”

Filed under: Uncategorized — khangharoth @ 7:24 am

I am currently reading Java Power Tools , came across this book on John Ferguson Smart blog.I quite regularly read his blog as he generally writes about current java landscape and good overview of problems faced in current set up say release management,branching strategy ,continuous integration etc.

So on weekend just went out and got a copy of it from nearest Book store ‘Landmark’ in gurgaon.

After going through the index i noticed that we were using mostly all the technologies in various projects barring

a) Continuum,LuntBuild : I am happy with Hudson and no itention of switching to another CI server.

b)Openfire : Haven’t heard of it ,will try to dig deeper into it.

c)JunitPerf ,Jmeter ,Jupiter etc:We are using something else but would like to know more about them especially JunitPerf and Jmeter.

After going through couple of Chapter i noticed that this book is written in very simple and clearly demonstrated the rational behind using these technologies .May be its due to the fact that  i was already familiar with most of the technologies mentioned in the book .

In all i would recommend this book to java developer for a reference book for what’s all tools available for their arsenal.

Few things standout for me :

a) TestNG :

Author pointed this as Next-generation Testing and in my view this is very apt definition for TestNG.Junit has not kept pace with growing demands in testing space and Junit4 is also bit of disappointment.It still lacks on many features and i think way behind TestNg.

One thing i find missing in TestNg chapter is migration strategy and examples for Migrating to TestNG from Junit.But otherwise other aspects of testng were well explained like Test LifeCyclye,managing dependencies in test cases,parallel testing etc.

b) Continuous Integration :

This book cover this topic quite well and give a good overview of various tools available for this like hudson,cruise-control,continuum etc so well covered topic.

c) Profiling and Monitoring using Sun JDK tools:

Its really good to see that this book pointed out some very handy tools available to developer right under their nose ex: Jconsole is really good tool for thick client application monitoring.

I still don’t know why the tools which come bundled with JDK are not so popular inspite of such a  great use.

What this book missed :

a) Aspects :

Aspects is a mainstream concept now and could have been incorporated in this book.AspectJ have now really matured and now comes with good support in IDE like eclipse and Idea.

b) Design analysis tools :

Some insight about determining health of your current project.Some tools which can be discussed are CAP ,JDepend .

c) UML and Reverse Engineering tools :

I think this is also a topic worth considering in this book .Their are some good offerings from IBM which integrated well with Eclipse (although paid).

eUML2 from Soyatech is another good tool for UML and comes with very good eclipse plugin .

In all its a good book for getting a feel of Java landscape. (more…)

May 20, 2009

Life With Mock Objects

Filed under: Uncategorized — khangharoth @ 11:31 am

In my current project ,it seems impossible to write a Unit test case without using Mocks.And i don’t know why but i don’t like mock objects per se.I don’t know why but writing a test case with all those Mocks flying around gives me feeling that  i am not  actually testing the code but just the call hierarcy.

Their are places where mocks find their use but for me they are very few .So if you find yourself using lot’s of Mock objects and its difficult to test classes then its time you start looking at dependency injection (Spring).It really helps in making your system modular and certainly testing friendly.

Coming back to the work at hand , here ojbects dependency is specified in code and if you just need to test one method you have added then Jmock and PowerMock are your friends.

May 17, 2009

Homegrown Persistence Framework

Filed under: Uncategorized — khangharoth @ 3:21 pm

I now moved to new team in my company and task is to set a team in India which  works with london based team on round the clock model.

In process of this migration we inherited existing java code. Functionally this code is in production and is performing quite well.And this project started as small and then grown into a important big project.

Couple of points worth mentioning about this code.

  • Extensive use of Static  : Or Over use of static .Writing Unit tests is big nightmare and now i can fully appreciate how dependency injection is so useful in writing Unit testing.
  • Extensive use of nested classes : Not sure exact need for this kind of architecture.
  • Home Grown Persistence framework.

After working with Hibernate and JDBC ,this is first time i am working a piece of code which can be dubbed as Home grown Persistence framework.Its really nice from personnel prespective after reading all sorts of problem self written Persistence framework could pose.

So am looking forward to get as much prespective on any design approach and  what prompted to be that way.

Also to compare that with hibernate .

May 12, 2009

Manage your Eclipse Plugin Dependencies

Filed under: Uncategorized — khangharoth @ 3:20 pm

For a Java developer who primarliy uses Eclipse as IDE,managing all the dependecies can be nightmare.It took me quite a while to get euml2 plugin installed and working.

More often downloading a new plugin can leave your eclipse installation in inconsistent state and you are now worse than when you started.

I try new plugins just to get feel of what’s on table from eclipseplugincentral,but am always worried about the dependencies i need to sort between eclipse versions and then plugin’s version.

And then i came across Yoxos ,it just what every eclipse user needs.You select the plugins and it sorts out the dependencies for you.And you get a customised eclipse installtion for you.Really sleak….

It’s really worth giving a try…

http://eclipsesource.com/en/yoxos/yoxos-ondemand/

Note: Would be a good idea to start building from base Java IDE

November 1, 2007

Learning the Art of Databases.

Filed under: Uncategorized — khangharoth @ 8:41 am

Relational databases are their for long time and going forward nothing seems to change that trend.

Object oriented database are now history and it seems that the idea was great but execution wasn’t. So we are pretty much goona live our life with RDBMS.

I was working in Computer graphics and we used to have 3D file formats like DWG ,DXN ,IGES etc and for couple of years i had absolutely no contact with databases.But as i am again working in JEE world and in this world DB’s are backbone of any application.

So how to be with current with this aspect of your programming world , well I’ll suggest http://www.databasecolumn.com/

And if you just want to hone up your Db skill’s than you can try these

October 31, 2007

High Performance Web Sites

Filed under: Software Design — khangharoth @ 1:24 pm

This is the name of Book written by Steve Souders, Chief Performance Yahoo.

Well it does give another view to the problem , what is seems as most of the time we only for known culprits like Database queries etc whenever we are on any Performance drive. And invariably the responsibility is of back-end developer to increase the performance.

Most of the Stuff was  new to me , as how diverse the problems can be .

Haven’t got the Book Copy : Need to find out ,Its tough to get these kind of books in India!

But to get  Gist , you can go through  this review : http://www.theserverside.com/news/thread.tss?thread_id=47378

Also this http://developer.yahoo.net/blog/archives/2007/03/high_performanc.html 

Now i am curious as what sort of Architecture these Top sites have : Also Do Java has any role into it ?

October 26, 2007

Software : Finding Right person for the Job .

Filed under: Software Management — khangharoth @ 2:02 pm

This is a hypothetical case study based on my experience in software industry.

Disclamor : Whatever i am discussing below is based on my experience which i admit is very limited ,but intention here to make you think about this aspect of Software Life Cycle.

BackGround : Any Software Work which we do has these inherent factors associated with it.

  • Complexity : How complex the piece of Work.
  • Resource Competence : how competent are the people who will work on this.Compensation for the resource depends upon competence level.
  • Time: What are the time lines.
  • Cost:Total cost which incur to company for this piece of Work.

We will rate all the above parameters on the scale of 10, ten being highest.

Requirement : We have a piece of Work , which say has complexity of level 3.

Resource and Time Planning :

Scenario 1:

We take a Developer with competence level of 3.Now let’s assume he will take 3 unit of time.This means for the work we have to wait for 3 unit of time and it will cost :

Developer Compensation * Unit Of time = Cost To Company.

In our example as compensation is proportional to competence so ,

3*3=9 this is the Cost .

Scenario 2:

Now say Manager wants to hire a person with higher competence so that quality should be higher and work can be finished before time.

So he hires a Developer of Competency level 8.Now to have same cost this guy needs to finish the work in

Cost/Competency=Time 9/8= 1.125 unit of Time.

Everything is fine but this generally don’t happen in real world.

What actually happens is this Developer is not Sufficiently challenged by the work he is doing and so he invariably thinks of more than necessary aspects of the given Problem and would now make given task of higher complexity ,say of level 8.

As now the task is of more or less same level of complexity as developer competence so time will again be of similar magnitude , say 3.

Now let’s calculate the cost 8*3=24.

More than double the cost of original cost.

So if you are Project Manger and you feel that your resources are over competent for the given work , than keep close eye on Scope of the Project.

October 18, 2007

Software : Time and budget estimation.

Filed under: Architecture, Software Design — khangharoth @ 3:30 am

In continuation of my previous blog about “Failure of Software Project” .

This one topic has really amazed me as people are able to estimates such huge building with such good accuracy.How many times you have heard in News that this Stadium will be ready by this date with these functionalities and they do deliver.Also in these situation maximum worst that happen is delay,but vary rarely whole thing gets scrapped,but this happens in Software Industry all the time!

Is it to do with Team-Work as this industry very much reward individualism  and so you will see lot’s of Talented guys who can single handedly deliver a small to Mid Size project.But a team of 5-6 of them fails to deliver some what bigger application.So is this why Failure rate of Software is directly proportional to its size.

And if this is one of the reason why people in other industry can work so well in Teams?                                                             One of the answer i have in mind is  as this Industry pays a lot and this could be a simulator for  Huge Ego and individualism.

Well these are all guesses and it may be that  inherent process of Software development is difficult and hence  this gap’s in estimation’s.

So why estimation of Software is so hard,well the point is “Software is Hard”.In Maths we know that in any equation as we have more and more variables,prediction is less and less accurate from couple of variable values in hand.

To read more on this subject , i regularly search internet and  today stumbles upon this.I think its quite a bold statement and also very close to reality.

It is impossible, by examining any significant piece of completed code, to determine within a factor of two how many man-hours it took to produce that code.

And the corollary:

If you can’t tell how long a piece of code would take when you have the finished product available, what chance do you think you have before the first line of code is written?

My first response to this : am reading the above line’s again and again,Isn’t it true?

Next Page »

Blog at WordPress.com.