this post was submitted on 15 Jul 2023
1184 points (98.8% liked)

Programmer Humor

19623 readers
98 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 67 points 1 year ago (3 children)

Program in assembly, 40 columns is plenty. You just need an awful lot of rows.

[–] [email protected] 14 points 1 year ago (5 children)

We need the same monitor, vertically!

[–] [email protected] 4 points 1 year ago (1 children)

The Samsung 55" Oddity in 'cockpit' mode has you covered.

load more comments (4 replies)
[–] [email protected] 4 points 1 year ago (2 children)

Same monitor, just rotate it.

load more comments (2 replies)
load more comments (1 replies)
[–] [email protected] 29 points 1 year ago* (last edited 1 year ago) (3 children)

I have a monitor that's almost like this and it's surprisingly nice. It feels like a two-monitor setup. Two actual monitors would probably have been cheaper, but I got mine from work, so it wasn't a factor.

The real advantage of having two actual monitors is being able to flip one vertically for reading code.

EDIT: a word

[–] Milx 14 points 1 year ago (1 children)

Everyone at my work who has this runs into issues whenever they need to share their screens, apologizing for low resolution or painstakingly resizing every window to mimic multiple screens anyway.

[–] [email protected] 9 points 1 year ago (1 children)

I just share one window at a time. I put the meeting on one half and the window I want to share on the other, which makes it 16:9 and works perfectly for what I need to share.

[–] Milx 3 points 1 year ago (3 children)

Yeah people do that, until you're sharing a code window and then need to see if it works on a browser and then your dev tools are popped out so you have three windows...or you don't want to just have one meeting and one window visible, you also want slack or a window for googling or something similar...

It's all workaround-able, it's just minor annoyance after minor annoyance lol.

load more comments (3 replies)
[–] [email protected] 9 points 1 year ago* (last edited 1 year ago) (1 children)

I bought one after some months of remote work in 2020. Then when I started my new job they gave me another one (different manufacturer but exact same panel size). I needed to rearrange my desk a lot, but holy shit so much room for error messages!

Yes, I'm a Java developer ¯\_(ツ)_/¯

[–] [email protected] 4 points 1 year ago

It was either that or a C++ programmer. Those template error messages are gnarly.

[–] [email protected] 6 points 1 year ago (1 children)

The real advantage of two monitors is that you can turn one off if you don’t need the full 50000px width.

load more comments (1 replies)
[–] Coreidan 17 points 1 year ago (3 children)

Jfc. Do people really write code like this? I’ve been writing code in Java for 15+ years and have never seen anything like this.

You need more skill, not a wider monitor. SMH.

[–] [email protected] 16 points 1 year ago (2 children)

Hello world in Java:

class 9-A {
    public static endangered therefore protected final void main(String[] args) {
        System.prepareTheOutputBufferForPrintingAsTheNextStatementWillDoSo(args);
        System.in.out.in.out.shake.it.all.around("Java is a programming language " +
            "invented by the intelligent monkeys " +
            "working at Sun Microsystems.");
        return void; // duh!
    }
 }
[–] Coreidan 6 points 1 year ago (1 children)

ROFL you’ve proved my point. Just because Java gives you an opportunity to hang yourself doesn’t mean you should or have to.

You took one line of code and turned it into a novel. Bad programmers do this and then ignorant folks blame it on the language when it’s really just a lack of knowledge/skill.

load more comments (1 replies)
load more comments (1 replies)
[–] [email protected] 10 points 1 year ago* (last edited 1 year ago) (1 children)

Yeah, you never see this in enterprise settings. Sure builders or streams can get a bit long but you just pop each .x() on a new line.

And when they're on new lines intellij has a cool feature where it creates a little UI only comment next to the line showing what type it returns.

[–] XaeroDegreaz 3 points 1 year ago* (last edited 1 year ago)

In an enterprise setting we'd definitely create a method in that object what would have that chain in it, and call that instead... It seems like it's used over, and over again.

Anyhow, we're sitting here trying to make sense of something that obviously some sort of joke haha.

Man we're such fucking nerds.

[–] [email protected] 4 points 1 year ago

Somewhere someone probably does... But this piece of code really look like someone either tried to inline a bunch of calls or this is code generated object mapper from json or other nested model.

Nobody with a sane mind and serious attitude will use this code as a "real" code. (I still believe in people, despite all the evidence to the contrary I get every day)

As a fun bit though this taken some dedication.

[–] moosh 13 points 1 year ago (2 children)

Is this a good thing I’m looking at or a bad thing? I don’t get it but then again, I’m not a programmer.

[–] [email protected] 31 points 1 year ago (3 children)

Java is a programming language that is notorious for being verbose, the joke is that you need a massively wide monitor to view it without the text being cut off

[–] moosh 3 points 1 year ago

Ah, thanks for the explanation!

load more comments (2 replies)
[–] [email protected] 15 points 1 year ago (2 children)

The joke is Java is verbose. It takes many characters to accomplish simple routines. Depending on your view that could either be good or bad for reading the code later.

[–] [email protected] 16 points 1 year ago* (last edited 1 year ago) (11 children)

Sure, but most of the lines in the screenshot break down to:

object1.setA(object2.getX().getY().getZ().getI().getJ().getK().getE().getF(i).getG().toString())

Aside from creating a method inside the class (which you should probably do here in Java too) how would another language do this in a cleaner way?

[–] [email protected] 7 points 1 year ago (5 children)

You shouldn’t reach through an object to invoke a method. That tightly couples the classes which getJ and getG (for instance) return.

load more comments (5 replies)
[–] fredthedeadhead 3 points 1 year ago* (last edited 1 year ago)

Kotlin would represent the getter/setters as synthetic properties (and do so automatically, since Kotlin interops with Java).

object1.A = object2.X.Y.Z.I.J.K.E.getF(i).G.toString()

Of course it's still not great (there's still too much nesting, there's something fundamentally wrong with how the data is structured) but at least the code is less noisy.

load more comments (9 replies)
load more comments (1 replies)
[–] [email protected] 10 points 1 year ago (4 children)

Had an ultra wide for a while, went back to 2 27" monitors after 2 years. 2 monitors is more convenient imo. I can flip one vertical whenever. Less fiddly to have multiple things open at once. One is centered while the other is on the side and angled, much nicer way of separating what's my focus. Easier to screen share. I always found the curve distracting for text.

[–] [email protected] 4 points 1 year ago (1 children)

The ultra-wide's big appeal is definitely more for gaming than programming.

load more comments (1 replies)
load more comments (3 replies)
[–] [email protected] 9 points 1 year ago (1 children)

You're dangerously close to the edge there bud, what's your plan B when that starts to overflow huh?

[–] SamXavia 14 points 1 year ago

Buy a second monitor with the same space

[–] clutchmatic 8 points 1 year ago (1 children)

...and that, kids, is why java has this thing called imports

[–] [email protected] 10 points 1 year ago (1 children)

Imports wouldn’t help. It’s setters with a ton of chained getters

[–] [email protected] 5 points 1 year ago (2 children)

Mostly they're all the same up to the last one or two methods - just set the common part as a variable?

load more comments (2 replies)
[–] [email protected] 7 points 1 year ago (1 children)
[–] [email protected] 9 points 1 year ago

no, he's using a very old version of IntelliJ Idea

[–] Crashumbc 7 points 1 year ago

LOL, that said. The BEST thing I ever bought when WFH started was a 4k monitor.

The extra screen real estate is amazing

[–] twelvefloatinghands 6 points 1 year ago

Type aliasing in java could have saved us from the current pixel shortage, but at least kotlin is giving us a cheaper path forward.

[–] [email protected] 6 points 1 year ago (7 children)

Oh come on, first time I actually want someone to post a link for an “ad” and not one in sight

load more comments (7 replies)
[–] Nioxic 6 points 1 year ago

that's some serious chaining lol

[–] mvirts 3 points 1 year ago

For java programmers afraid of explicitly allocating any varables

[–] phoneymouse 3 points 1 year ago

AbstractInitiatorFactoryDelegateVisitorFactory

load more comments
view more: next ›