r/java • u/edmguru • Mar 01 '22
Interview with Senior Java Developer
https://www.youtube.com/watch?v=kdMG40wUCm48
u/socialis-philosophus Mar 02 '22
I've worked professionally (ie. being paid not just learned on the side) to program in Java, Scala, Kotlin, C#, VB, and Python.
I really don't understand the Java hate. Every platform has good and bad.
8
u/edmguru Mar 02 '22
Exactly. Java ain't bad at all.
2
1
u/Bozzzieee Mar 02 '22
Apart from being wordy and a little bit old school, it is great.
2
u/tofiffe Mar 03 '22
Wordy makes it easier to read. I used early kotlin versions back at uni, half the code, but it was write once - read never. So much easier to write throwaway code in many other languages. Never had that happen with java
2
u/tvidal Mar 02 '22
I don't think it's about being bad, just odd. People have overused some quirks of the Java language and ecosystem which leaves a lot of room for comedy from those not familiar with them, i guess.
2
20
53
9
u/agentoutlier Mar 02 '22
I’m old enough to remember and receive a Java coffee mug…. ironically I didn’t drink coffee at the time (I got addicted later in life).
I think I got the mug at a conference or a Java certification test.
Sadly I through it away. BigDecimal.
8
7
17
16
4
4
u/franzwong Mar 02 '22
He didn't wear a tie.
8
u/agentoutlier Mar 02 '22
To be fair that sweater was kind of awesome. Like some 80s movie Scandinavian assassin vibe.
4
u/macro161 Mar 02 '22
I feel personaly offended, at the time of watching this video i was drinking black coffee and writing exception class
8
u/uh-hum Mar 02 '22
This is hilarious! Can someone explain the BigDecimal joke?
12
u/VincentxH Mar 02 '22
BigDecimal is a datatype often used when accurate decimal arithmetic needs to be performed, like with money.
Using floating point primitives, like double, is a classic mistake. Because it leads to problems of floating point arithmetic inaccuracies.
It's both a standard interview question and common mistake in the wild.
0
Mar 02 '22
[deleted]
17
6
u/temculpaeu Mar 02 '22
int cents only works if you dont have to deal with fractions of cents, not very common but it can happen
5
5
u/thisisjustascreename Mar 02 '22
Financial securities are very often denominated in fractions of a penny. There are also other currencies than dollars in the world.
3
u/VincentxH Mar 02 '22
Yeah that lovely hack. Leading to problems like this with even an unsigned 32 bit int: https://www.google.com/amp/s/www.wsj.com/amp/articles/berkshire-hathaways-stock-price-is-too-much-for-computers-11620168548
At least use a long these days.
2
5
u/jvallet Mar 02 '22
Once I got drop on an interview for writing a solution for they challenge that used doubles instead of BigDecimal. Apperently that is big nono.
7
u/stefanos-ak Mar 02 '22
it wasn't that good... maybe for a couple of times, but not worth half the video :p
I think it's about BigDecimal being overused because of hype and not technical requirements.
3
5
1
1
20
u/back-in-black Mar 02 '22
Ok this did make me laugh. A favourite line was "I spend my time writing Exception types".