So, rather than doing a helloworld and TOC study, I will try to understand why is it getting so much attention from the programming world. I will see the forums and communities to understand how it feels like working with scala.

*one line expression can give you results. (Verbosity) but isn’t that going to increase complexity?
*everything is expressions and not statements.
*every value is an object and every operation is a method call (No Primitives) but what about reference passing and memory blot?
*Functions as first class objects. Thereby, It is possible to pass functions as arguments, to store them in variables, and to return them from other functions.
*pass functions around as they are full time members of the language now(Higher order functions) but do we need them anyways?

OK… Scala is not just a functional language but a hybrid.

Concurrency and parallelism : more interesting here.

Going further now:
No static here for methods or fields. Use object to create singleton directly.
Imports are a little different. *{asterisk} is valid scala identifier so use _{underscore} . It can also import static members directly.
Methods taking one argument can be used with an infix syntax.
Functions can be anonymous like classes in java. Functions without name .. ding !
Method overriding from a super-class is ok. It is however mandatory to explicitly specify that a method overrides another one using the override modifier, in order to avoid accidental overriding. Compile time error.

]]>https://shaileshsingh.wordpress.com/2013/12/01/iiird-attempt-at-scala/feed/0shaileshsinghTrip to Taiwanhttps://shaileshsingh.wordpress.com/2013/11/30/trip-to-taiwan/
https://shaileshsingh.wordpress.com/2013/11/30/trip-to-taiwan/#respondFri, 29 Nov 2013 19:08:18 +0000http://shaileshsingh.wordpress.com/?p=105]]>]]>https://shaileshsingh.wordpress.com/2013/11/30/trip-to-taiwan/feed/0shaileshsinghTrip to Italy – 2013https://shaileshsingh.wordpress.com/2013/11/30/trip-to-italy-2013/
https://shaileshsingh.wordpress.com/2013/11/30/trip-to-italy-2013/#respondFri, 29 Nov 2013 19:07:24 +0000http://shaileshsingh.wordpress.com/?p=88]]>My first trip to Italy, May 2013]]>https://shaileshsingh.wordpress.com/2013/11/30/trip-to-italy-2013/feed/0shaileshsinghFest testing for swinghttps://shaileshsingh.wordpress.com/2013/03/31/fest-testing-for-swing/
https://shaileshsingh.wordpress.com/2013/03/31/fest-testing-for-swing/#respondSun, 31 Mar 2013 13:00:10 +0000http://shaileshsingh.wordpress.com/?p=82]]>This has been an exciting experiment around using a ten+ years old legacy swing UI and adding Fest fixtures around it to do integration testing.

When you planning to code cover such voluminous code base that is very dynamic with 100+ devs working on it, you need to come up with some framework around which the whole thing will evolve.

This is not to be confused with Decorator which is delegation through composition!

Dynamic proxy takes the idea of a proxy one step further, by both creating the proxy object dynamically and handling calls to the proxied methods dynamically. All calls made on a dynamic proxy are redirected to a single invocation handler, which has the job of discovering what the call is and deciding what to do about it.
Code artefacts involved:
– java.lang.reflect.InvocationHandler
– invoke() method of InvocationHandler
– java.lang.reflect.Proxy
– Proxy.newProxyInstance() : to create a proxy object, we need to pass a classloader, a list of interfaces the proxy needs to implement and implementation of InvocationHandler.

]]>https://shaileshsingh.wordpress.com/2012/02/18/java-dynamic-proxy/feed/0shaileshsinghNew Zealand travel pointers (Auckland to Queenstown)https://shaileshsingh.wordpress.com/2012/02/02/new-zealand-travel-pointers-auckland-to-queenstown/
https://shaileshsingh.wordpress.com/2012/02/02/new-zealand-travel-pointers-auckland-to-queenstown/#respondThu, 02 Feb 2012 05:46:04 +0000http://shaileshsingh.wordpress.com/?p=54]]>It is a different land altogether. All natural stuff are pretty different from what we have anywhere in northern hemisphere. And the faultline cris-crossing the islands vertically make it even more bubbling .. Did i smell sulphur? (don’t worry you will understand the joke once you visit the place)

here are a few pointers:

– Visit during summers. Most of NZ is snow covered during winters(late march to late sept) Also you will benefit from longer day time. Sun used to set at 9 pm eveyday during my visit.
– Hire a car, best mode to travel places in NZ. longer days will allow you to travel during day time. Roads are nearly empty and you can drive at 100(speed limit) continuously on cruise for 30 mins at place.(I mean that) . North islands have straight roads. South island have windy mountanous roads. I hired a corola altis during new year season can it cost me NZ$ 78 per day for 12 days. (you will surely get better bargain than this) Go Rental is recommended. And all other options of travel are more expensive and less fruitful. It’s all about countryside and finding those secret lookout areas in the mountains or the valeys or beside the lakes or beside the beaches . needless to say, travel in day light.
– Arrive in a city and depart from a different city. We landed in Auckland and traveled north island, than south island and finally departed from Queenstown (Northern tip to southern tip . Paid addn. 200$ to change my return flight bookings from AK to QT. So, don’t commit the same mistake.
– Traveling from North to South Island is through a cruise which is very very good (4 hrs ride) . $65 per person + $169 for the car deporting. Islander recommended. (3 times a day)
– don’t book your hotels as you may not know where you will be. Go backpacker and spend the money elsewhere. backpacker options are plenty everywhere and you can find everything on the GPS. I found all my stay over the counter (except marlborough) during the chrismas ny season, so you know.
– Handy latest maps GPS is indispensible. Torrent will help you here. Make sense to set it up before your visit and save places on it.
– food no issues at all.
– people : you wont find many but the ones you will , will surprise you by their friendliness and helpful nature.
– mobile-prepaid: cheap even if you take it with 3G

Not to be missed attraction
– mt eden at auckland
– coromodal bay
– LOTR hobbitson sites at mata mata
– rotorua and various sulphur attractions
– lake taupo and adventure (best and cheapest skydive)
– volcanic valley between rotorua and lake taupo
– beach road to napier
– wineyard stay at marlborough (it is divine but the most expensive thing) but wine harvesting time is may
– beachride road run to karakoura
– whale watching and swimming with dolphin at karakoura (may bunk if marine doesn’t fantasize you)
– hanmer springs hot mineral pool spa(spend whole day there)
– Glacier trekking at fox or frank josef glacier (besides driving, I loved this the most)
– queenstown, the most happening young city of NZ
– Milford sounds
– go bungy at QT: 47 then 68 then 139 mts fall into the river. Could only do 47 mts. My pockets were empty by that time.

One week is too less to cover it all. Total travel distance is 2980 kms. Do just one island if you are fixed with time or increase it to at least 10 days.

]]>https://shaileshsingh.wordpress.com/2012/02/02/new-zealand-travel-pointers-auckland-to-queenstown/feed/0shaileshsingh20120203-015820.jpg20120203-015945.jpg20120203-020039.jpgJava Generics and Erasurehttps://shaileshsingh.wordpress.com/2012/02/01/java-generics-and-erasure/
https://shaileshsingh.wordpress.com/2012/02/01/java-generics-and-erasure/#respondWed, 01 Feb 2012 04:44:56 +0000http://shaileshsingh.wordpress.com/?p=50]]>Generics or the parametrized types are compile time constructs in Java. This means that these do exist in JVM byte code. The process of converting parametrized types to bytecode that is backward compilable with older java code is called Erasure. This can also be called Type Erasure.

Sometimes during compilation, JVM may need to add a bridge method to perform type erasure.

Scoping of dependency: we can define scope to a particular dependency. it controls its visibility and inclusion in the final packaged artifact. Scoping enables you to minimize the Jars that ship with your product.