this post was submitted on 15 Jul 2023
1190 points (98.9% liked)

Programmer Humor

19511 readers
1462 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
[–] Hector_McG@programming.dev 60 points 1 year ago (3 children)

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

[–] giloronfoo@beehaw.org 33 points 1 year ago (1 children)

Same monitor, just rotate it.

[–] dudinax@programming.dev 6 points 1 year ago (1 children)

If you don't use a vertical monitor I don't consider you a real programmer.

[–] interolivary@beehaw.org 37 points 1 year ago

Joke's on you: I don't consider myself a real programmer either

[–] Jocker@sh.itjust.works 15 points 1 year ago (5 children)

We need the same monitor, vertically!

[–] taldennz@lemmy.nz 4 points 1 year ago (1 children)

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

load more comments (1 replies)
load more comments (4 replies)
[–] Captain_Patchy@lemmy.world 3 points 1 year ago

As someone that first learned to program in 8008 machine code, you aren't really wrong, but formatting is and always will be for the weak.

[–] henfredemars@lemdro.id 30 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@lemmy.world 13 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.

[–] firelizzard@programming.dev 8 points 1 year ago (4 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.

load more comments (4 replies)
[–] VanillaGorilla@kbin.social 10 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 ¯\_(ツ)_/¯

[–] MaungaHikoi@lemmy.nz 4 points 1 year ago

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

[–] bleistift2@feddit.de 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@lemmy.world 21 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.

[–] words_number@programming.dev 19 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@lemmy.world 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)
[–] Von_Broheim@programming.dev 12 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.

load more comments (1 replies)
load more comments (1 replies)
[–] moosh@lemmy.world 12 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.

[–] eugene1970@waveform.social 29 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

load more comments (3 replies)
[–] 1stTime4MeInMCU@mander.xyz 14 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.

[–] Anomandaris@kbin.social 17 points 1 year ago* (last edited 1 year ago) (3 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?

[–] bleistift2@feddit.de 8 points 1 year ago (4 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 (4 replies)
[–] Blackthorn@programming.dev 4 points 1 year ago (1 children)

Well I guess the point is that you shouldn't need all these method calls to achieve simple goals. Most of those "getF" are calls to some SystemFactory to get a GenericObjectFactory and so on and so forth.

[–] Anomandaris@kbin.social 3 points 1 year ago (7 children)

This just tells me you don't use Java. Factory classes are just used to create objects in a standardized way, but this code isn't creating anything, it's just getting nested fields from already instantiated objects.

load more comments (7 replies)
[–] fredthedeadhead@lemmy.world 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 (1 replies)
[–] Von_Broheim@programming.dev 9 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.

[–] CoderKat@lemm.ee 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)
[–] JC1@lemmy.ca 3 points 1 year ago

I use a Ultrawide as my main monitor, a 1440p vertical one on the right and 2 portable 15" 1080p under the Ultrawide.

When I need to share, I share one of the 15". I keep my notes and the call on my Ultrawide. I think it's a great setup.

But if you don't want as many monitors, for sure 2x 16:9 is much better than 1x 21:9 or even 1x 32:9.

[–] DogMuffins@discuss.tchncs.de 3 points 1 year ago (1 children)

You might have just saved me a heap of money.

Screen sharing would suck with an ultra wide.

load more comments (1 replies)
load more comments (1 replies)
[–] nicotinell@lemmy.ml 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@lemmy.world 12 points 1 year ago

Buy a second monitor with the same space

[–] clutchmatic@lemmy.world 9 points 1 year ago (1 children)

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

[–] snowe@programming.dev 12 points 1 year ago (1 children)

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

[–] hughperman@sh.itjust.works 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)
[–] yoz@aussie.zone 7 points 1 year ago (2 children)

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

load more comments (1 replies)
[–] there1snospoon@ttrpg.network 6 points 1 year ago (1 children)

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

[–] GizmoLion@kbin.social 4 points 1 year ago (1 children)

I'm using this one, highly recommend it! 240hz refresh rate, HDR, perfect for coding and gaming. Don't know if it's the exact same as the one in OP's pic, but same concept for sure.
https://www.samsung.com/us/computing/monitors/gaming/49--odyssey-g95na-gaming-dqhd-led-monitor-ls49ag952nnxza/

[–] Rakn@discuss.tchncs.de 5 points 1 year ago* (last edited 1 year ago) (2 children)

I've bought one and sent it back again. I felt like I'm not utilizing most of the space since I had to move my head too much to see windows on either side.

I'm now using two 4k Screens. In in the middle and one to the side, but rotates by 90 degrees. Can recommend that. Though for gaming... I can imagine it there.

Personal preference I guess.

[–] bleistift2@feddit.de 4 points 1 year ago (3 children)

I recently switched desks at my company and found one with two monitors. The seam was right in front of me. So if you have a task that has you watching a single monitor most of the time, you’re always looking to one side.

I stopped wondering why the colleague who sat there before was complaining of neck pain.

load more comments (3 replies)
[–] GizmoLion@kbin.social 3 points 1 year ago

Oh yeah, it was brutal to play Apex on initially, but eventually you relearn where your eye needs to dart to to see your health and stuff and it gets a lot easier.

Then you learn how to process all that peripheral information and nobody can sneak up on you ever again lol.

[–] Nioxic@lemmy.world 6 points 1 year ago

that's some serious chaining lol

[–] Crashumbc@lemmy.world 6 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

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

[–] phoneymouse@lemmy.world 3 points 1 year ago

AbstractInitiatorFactoryDelegateVisitorFactory

load more comments
view more: next ›