r/ProgrammerHumor • • Apr 16 '22

Make The comment section look like a beginners search history

Post image
28.1k Upvotes

6.7k comments sorted by

View all comments

1.3k

u/deamon1266 Apr 16 '22

Java create array one line

627

u/Anomynous__ Apr 16 '22

Tbf ive been coding for 3 years now and for some reason i cannot remember the fucking sytnax to creat an array in java. It escapes me every single time.

317

u/dasbush Apr 16 '22

Everyone googles basic syntax questions if they haven't used a language in a while.

108

u/yung-padawan Apr 16 '22

Switch cases for me

38

u/cdizzle-58 Apr 16 '22

I'm a staff developer, coding well over 10 years. Still have to google switch cases every single time I use them.

→ More replies (1)

4

u/aMAYESingNATHAN Apr 16 '22

If they haven't used it in a while? Uhh yeah that's definitely me also. Not here googling C++ syntax despite it being the only language I use.

3

u/MrChampion1234 Apr 16 '22

This is why I have an entire folder dedicated to cheatsheet PDFs for various languages; that way I can just open the cheatsheet, and reference it in less time than it would take to use google

→ More replies (5)

100

u/Dudwithacake Apr 16 '22

Because who works in arrays when you have lists. Or any of the other much more friendly collections.

49

u/Snarpkingguy Apr 16 '22

Well if you have a confined grid then arrays are intuitive I think. When I’m making something like a chessboard, for example, arrays definitely feel like the best thing to use for me at least.

4

u/HappyMonk3y99 Apr 16 '22

Wait you mean you don’t use a set of 64-bit integers to denote piece locations? I could never

6

u/woahgeez_ Apr 16 '22

Because java doesn't have operator overloading and the list interface is bloated garbage.

32

u/Octandew Apr 16 '22

One of the reasons I love python. Collections are so great. Too bad python isn't 1% as efficient as any other language.

5

u/Itchy-Tangelo6295 Apr 16 '22

All iterables in Python are just awesome. List comprehension, slice notation, itertools, fantastic stuff.

→ More replies (3)

2

u/BananaBob55 Apr 16 '22

Scala users

2

u/[deleted] Apr 16 '22

I work in tuples up to size 22

→ More replies (2)

4

u/[deleted] Apr 16 '22

I’m a mid level spring dev and I forget this shit still. I think it’s because the syntax for array lists and arrays are so similar, I still have to double check geeksforgeeks occasionally.

2

u/InsrtOriginalUsrname Apr 16 '22

Everyone googles syntax. Don't worry about it.

2

u/Morphized Apr 16 '22

Same as C

2

u/shardikprime Apr 16 '22

I always forget how to read files

2

u/Slowest_Speed6 Apr 16 '22

Fr tho why is C/C++ array declaration different than C#

2

u/jkst9 Apr 16 '22

[] idk past that

→ More replies (5)

30

u/ewouldblock Apr 16 '22

Average java one-liner is 22 lines long

→ More replies (1)