Better HN
topnewbestaskshowjobs
Log inSign up

renwick

2 karma · joined Jun 5, 2012 (14y ago) · 4 submissions

Submissions

comment 12y ago · link · parent

You probably know a lot more about the company you work for than other companies you might invest in, so that might be one reason to prefer their stocks

comment 13y ago · link · parent

"It is easy to notice that in Java, one might have implemented infinite number of for loops trying to do such lookups using iterators."

??

val list3 = list1 ::: list 2 // returns a new list of 6 elements

final list3 = new ArrayList(list1).addAll(list2);

list3.drop(2) //return a new list without first 2 elements

new ArrayList(list3.subList(2));

list3.filter(s => s > 4) //return a list with elements 5 and 6

new ArrayList(list3.subList(4));

Also the Java versions use standard convenience methods which seems preferable to language features since anyone can re-implement them, or add new ones. Plus the copy-on-mutate behaviour is optional.

comment 14y ago · link · parent

Note the dreadful UI on their app implementation! (You type something like '100:5,25,60' and invite someone to guess a number on each round)

Why wouldn't they do something like:

1. Enter the subtotal (becomes permanently printed at the top) 2. Enter successive item amounts, after each entry the app says 'pay' or 'continue'

comment 14y ago · link · parent

I had a similar problem - also dismissed Twitter4J etc. as too complicated and wrote a 50 line Java method to send a tweet (signature: tweet(tweet, consumerKey, consumerSecret, accessToken, accessTokenSecret) ).

So presumably it's the culture you don't like, rather than the language.