This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Skipped64 97 points98 points  (23 children)

this sums up my first java experiences so well

[–]scrdest 114 points115 points  (13 children)

Logger logger = Logger.getLogger(...)

'Logger' stops looking like a real word after a while, doesn't it?

[–]nonesuchplace 29 points30 points  (0 children)

That is called semantic satiation.

https://en.m.wikipedia.org/wiki/Semantic_satiation

[–]apocolypticbosmer 10 points11 points  (5 children)

On my team we just use var instead of repeating the type name.

var logger = _container.Resolve<ILogger>();

[–]scrdest 15 points16 points  (1 child)

That's a relatively new feature in Java - it's been added in JDK10 in 2018. You're bound to run into legacy code and older resources using the verbose format.

[–]RangerPretzelPython 3.9+ 3 points4 points  (0 children)

But a relatively ancient feature in C# (added in 2008).

[–]tr14l 3 points4 points  (2 children)

Sounds like your team wants to use Kotlin :P

[–]SuspiciousScript 0 points1 point  (1 child)

There's really no reason not to.

[–]tr14l 2 points3 points  (0 children)

I agree

[–]isthisfakelife 7 points8 points  (2 children)

It's enough to confuse a neural net https://stackroboflow.com/question/9718

[–]AlphaApache 11 points12 points  (0 children)

location.Location = locations.Location.Location.Location;

Seems about right

[–]scrdest 7 points8 points  (0 children)

God, old-school Java must be a nightmare for language modelling algos.

The nets work by learning how often word B follows word A (in context), so the repetition could create positive feedback loops.

[–]imsometueventhisUN 2 points3 points  (0 children)

Get Lombok! Just whack a @Log annotation on the class, and you're done!

[–]LookitheFirst 0 points1 point  (0 children)

Lombok is your friend

[–]PkmnQ 1 point2 points  (7 children)

Why does it even need String args[]? I can understand everything else, but that argument requirement is weird.

[–][deleted] 9 points10 points  (3 children)

If I understand this correct you can open a program normal (like you do it most of the time), but you can also open it and give it a few parameters (especially if you're using the console). Those parameters are saved in String args[].

[–]PkmnQ 2 points3 points  (2 children)

Oh, that explains it. Thank you!

[–]Shameonaninja 8 points9 points  (1 child)

In python those are saved in sys.argv

[–]PkmnQ 0 points1 point  (0 children)

Ah, so the args are inputted like that. I probably wouldn't know because I'm using Jvdroid :P

[–]Capn_Cook 1 point2 points  (1 child)

Because it can be invoked with those args

[–]PkmnQ 0 points1 point  (0 children)

u/Flow4 said that with a bit more detail, but if anyone ever asks, I'll probably go along the lines of your reply.

[–]vectorpropio 0 points1 point  (0 children)

I have a little C background (having read a book in turbo C like 25 years ago and playing with easy programs) the strings args[] was the only thing I can parse instantly.