Posterous theme by Cory Watilo

Filed under: Java

This weekend in Tech : A thinking IDE - Collective Intelligence in Software Development

Think of a scenario when you are using a new framework or working with a mega API set provided by a packaged solution maker (ERP/PLM/CMS).If you are like me you would fire up the eclipse IDE first and put the new framework jar files available in class-path & would rather like to read the API documentation as you code. For every dot you press eclipse would auto-suggest you tons of methods that you could call!

What if by some wonderful magic eclipse would only suggest a subset of the methods that is most suitable , with a quantifiable measure of that methods suitability! Code Recommenders does something similar by making "you much faster and even help you to understand the frameworks you use". To see the code recommenders in action watch the screencast below. If you would like to give it a shot this Monday at work, the eclipse plugin is available here

 

Planetary positions,Wolfram Alpha & a Combination Generator in Java!

This morning on the breakfast table we were discussing astrology (for the uninitiated - the affect of planetary positions on mortal beings!).The problem we were munching on was how many aspects could be formed by  5 planets   (No, we are not dealing with Aspect Oriented Programming here!) 

 

 

And being engineers the planet scale abstract thinking is not common to our kind .We like to think in shapes say boxes ... triangles!Fortunately the complex problem of mysterious planets forming aspects could be simplified to a box/triangle pattern! So, if an aspect was a cluster of three planetary nodes (so I believe at the time of this writing), the problem can be simplified to how many unique triangles can be formed by five planets.Or even better,in a probabilistic way "If universe was a bag and planets were balls how many combinations of three balls one can draw!"

 

The answer immediately was very simple 5C3 (5!/2!*3!) which is 10.But now writing down all the 10 combinations is a bit tedious.

I tried to get a visual representation of this problem from WolframAlpha (see screen) but the visual representation just showed five dots.

Wolfram

Finally I found an algorithm from Rosen implemented in Java and wrote my PlanetCombinator class against that as shown:

 

Read the rest of this post »