Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

salvin francis

+ Follow
since Jan 12, 2009
salvin likes ...
Eclipse IDE Google Web Toolkit Java
Forum Moderator
salvin francis currently moderates these forums:
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by salvin francis

Primary uses (Can't live without)
1. Whatsapp (Has superseded my phone calls. I barely call folks now.)
2. Alarm (I am using the same alarm since 12+ years)
3. Phone

Secondary :
1. Maps (To check open/close timings, wait times at gas stations, etc.)
2. Email
3. Image Editing (Switched from pixlr to snapSeed)
4. Social media (FB only)

1 day ago
I made a scratchpad for you :

1 week ago

Campbell Ritchie wrote:But women had been producing milk in a rather similar fashion long before cows were domesticated.

Of course they have ... for babies. We don't consume milk from all sources right ? I mean dogs/cats/pigs/elephants/donkey to name a few.
I was going into the historical direction as per OP's title.
1 week ago

Pete Letkeman wrote:..."You see that plant, I dare you to eat it."...

Invention of milk along the same lines: You see that cow? I wonder what happens if I squeeze its udders ...
The rest is history.
2 weeks ago

Campbell Ritchie wrote:... unless the capital N means they have a class Null.

Or a client side code that simply capitalizes the first letter of the word.
2 weeks ago

Henry Wong wrote:...why would anyone want to jump out of a perfectly good airplane? ...

Well... There are those who fly machines and there are those who themselves fly (or more technically, 'fall'/'glide')

I wish to sky dive someday, but I am scared of heights and I too have motion sickness for non rhythmic movements. I have done paragliding once with my wife and it was fun.
2 weeks ago

Junilu Lacar wrote:
.. You could also define a private void initWithDefaults() method and call it.

To my taste, I prefer to do all initializations in the constructor itself rather than delegating it all to private method. These are my personal beliefs:
  • To a fellow programmer reading your constructor, all initialization logic is present at one location.
  • If your constructor is getting too huge, it gets noticed at an early stage and raises a code smell that something may be wrong.
  • It makes the constructor logic highly cohesive, i.e. it only does the work of construction with no inclusion of other business logic

  • I am not against calling private methods in constructor, I am simply pointing out that delegating the construction work to a private method may not be good (at least as per my experience)
    1 month ago
    I suggest this :
    1 month ago
    Congratulations to All !!!
    1 month ago
    +cow for that wonderful implementation.
    1 month ago
    Adding to what Campbell has posted, the sum of an arithmetic progression is

    n  x  ( (A1 + An) ÷ 2 )

    n is the total number of elements,
    A1 is the minimum
    An is the maximum

    Our progression has a common difference of 1, hence its easy to calculate n given the min and max :
    n = (An - A1) + 1

    1 month ago