Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!

Liutauras Vilda

+ Follow
since Nov 12, 2014
Liutauras likes ...
BSD Linux Mac OS X VI Editor
London, United Kingdom
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 Green check

Recent posts by Liutauras Vilda

Let me put some of my thoughts for the method I chose randomly:

1. Looking to method's name first thing which comes to mind is: hm.. "ok, let me have a look again, what does it do/say?".
   1.1 promptBoolean, is it wrapper class going to be returned Boolean or primitive boolean? (as subsequent methods indeed return wrapper). I'd avoid Boolean mentioning at all if name cannot suggest clearly what it is going to be returned. In this case it misleads even due to camel case convention. IDE's are clever enough to show return type of method, so to clutter method names with types information makes it harder to read (personally to myself). When methods say getPerson() - in my head I interpret that: "give me person's blueprint/description/entity, but not its class it is implemented in".
   1.2 YN postfix. I'd think it is poor choice. Suggests YN but accepts answers true; false; yes; no; as valid. Again, method name suggests upper cases, while hint upon incorrect input suggests lower cases.

And most of the method names are cluttered in my opinion with the information what the method's signature along with return type should and do provide already.
4 hours ago
Welcome to the Ranch. Have a great promo week. Probably you'll get some tricky questions
2 days ago
Non of the source files compile, because class's declaration must start with lower c: class not Class. And end of story with such kind of question.
2 days ago
Welcome to the Ranch.

Can you please explain in broad steps, numbered: 1; 2; 3; 4... what this code does?

So then possibly we could help you
3 days ago
Krzysztof Rams, have a cow - great score! And welcome to the Ranch.

Both of you welcome, as well as Poornima Velayutham.

Daniel Demesmaecker wrote:Or you could but then we charge you 150€ an hour

Note: that is probably what Daniel does, his saying "we" doesn't involve coderanch as an entity.

But he was right about the part that you'd need to ellaborate a bit more in order to explain where you stuck.
4 days ago

Tim Holloway wrote:all a switch statement is is just a bunch of implied "IF" statements that happen to be predicated on mutually-exclusive conditions.

Not sure I understood you correctly, but that's not true. Perhaps that's true in situations with really few switch cases, but when the number grows switch statements use lookup tables. So it outperforms technically bunch of if-else statements as search of matching condition is O(1) as oppose to bunch of if-then-else goes in a linear fashion.
1 week ago
Moved to Android forum.
1 week ago
Alright, thank you for explanation. I will have to revise my all copies now. But will be too late to complain if anything, but red star still would be ok.

Indian version of this book

Campbell Ritchie wrote:That is quite a common scam from some parts of the world.
it has a different ISBN

Please explain a bit more. Are you saying that somebody (in India presumably) copies content illegally and print a new book?

I have never experienced that myself so far (i think), but probably will be well suspicious from now on onwards.