838
Mar 11 '18 edited Mar 12 '18
Cant have unreadable errors if you dobt make errors in the first place
edit: ironic typo is perfect
389
u/cujububuru Mar 12 '18
You mean by wrapping your entire project in a try catch?
41
u/agentlame Mar 12 '18 edited Mar 12 '18
While we joke about this, and while no one should ever do this, and while it's the stupidest thing ever to think of as an option, and while anyone who ever has even considered doing this should be shot on sight... once, just once, I did this for about day in a live POS system, to find an obscure crash that I just could not reproduce to save my fucking life.
It worked, I apologize for nothing. (Context: had to do with the initialization state of the receipt printer when invoked by tethered touch display for customer confirmation. Neither of which did I have handy in my dev env.)
29
8
u/ssh_tunnel_snake Mar 12 '18
why is it so bad? seems to me most/all errors under the "main" method will be throwing on up till they are caught. you may need to handle them in your main in a special way before exiting
10
Mar 12 '18
Depends on the application, but you generally want to catch certain exceptions and try to handle them internally. Otherwise, your main has to know about every possible issue that could arise in your application. That said, I still do a top level try catch and try to log the error to a file. At least then I have a stack trace of what unreproducible issue took production down in the middle of the night.
→ More replies (1)7
u/agentlame Mar 12 '18
Programming subs on reddit are weird. I once made a similar comment about needing to place a try/catch inside of a catch. Similarly, there was a perfectly valid reason for having to do it... but I got some shit about "oh, because you can't code." So then I had to breakdown the stupid case for doing so.
This is another case of "no one should ever do that..." until you find yourself doing it.
Should you wrap your
main()in a try/catch? Of course not... until you do.8
u/SarahC Mar 12 '18
We've lost thousand of debug hours with that shit.
No one uses "break when error thrown" in Visual Studio either - because there's fucking millions of caught errors.
The worst case for performance "Check for errors!" in the code..... and we've got millions.
Fucking technical debt.
→ More replies (21)6
29
u/EpicSaxGirl (✿◕‿◕) Mar 12 '18
Not making errors? Is it possible to learn this power?
60
u/BlckJesus Mar 12 '18
Not from a programmer...
25
u/kevinhaze Mar 12 '18
Never compiles code and just commits everything daily
Ahh, it’s good to never have errors. The people I work with though? They seem to have a lot of errors.. And then they try to blame me. It’s kind of sad. I mean they’re the ones with all the errors.
→ More replies (1)6
u/hyperparallelism__ Mar 12 '18
Have you heard the tale of Darth Borrowchecker the Wise?
→ More replies (1)55
1.5k
Mar 11 '18 edited Mar 12 '18
AbstractHippopotomonstrosesquipedaliophobiaFactory taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu = new com.madpsycho.chargoggagoggmanchauggagoggchaubunagungamaugg.antidisestablishmentarianism.Rechtsschutzversicherungsgesellschaften.GucciGangGucciGangGucciGangGucciGangGucciGangGucciGangGucciGang(int pneumonoultramicroscopicsilicovolcanoconiosis, String floccinaucinihilipilification, Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon);
110
u/amyyyyyyyyyy Mar 12 '18
Then name your crypto class CorrectHorseBatteryStaple
→ More replies (3)76
u/ebilgenius Mar 12 '18
o fuk how do u know my password?
64
458
u/seraku24 Mar 11 '18 edited Mar 12 '18
You're missingLlanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogochin there.Edit: Ah, getting better. But since it's Java, maybe we need a
AbstractHippopotomonstrosesquipedaliophobiaFactorytoo? :)111
u/JNCressey Mar 12 '18
Can we get a
Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwhenuakitanatahu?113
u/CaptainHondo Mar 12 '18
40
Mar 12 '18
I think this is Hawaiian - it means "Lazy bugger languishing on the beach with a piña colada at 10 in the morning when he's got a shitload of work to do."
→ More replies (6)5
→ More replies (1)4
83
u/tssop Mar 12 '18
Can confirm, this does indeed wrap around.
Source: I am using the monitor in question right now.
22
15
u/xbnm Mar 12 '18
I'm not sure if you're serious, but can you share a pic? What kind of wallpaper do you use with a monitor like that?
101
u/tssop Mar 12 '18 edited Mar 12 '18
I put pants on and walked to the store to buy bananas. Hope you guys appreciate that.
https://i.imgur.com/OVM7eZk.jpg
Edit: resolution is 3840x1080 which isn't that difficult to find wallpaper for.
19
10
→ More replies (10)8
34
u/chateau86 Mar 12 '18
Life goal: Sneak a function called GucciGangGucciGangGucciGangGucciGang() through a code review.
34
16
u/01101001100101101001 Mar 12 '18
Needs more BeanPreprocessorBeanFactoryProcessorPostprocessorBean
→ More replies (1)4
4
4
3
2
2
2
u/Krissam Mar 12 '18
InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Actual class in the java standard library.
2
u/rodinj Mar 12 '18
hibernate(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,)
→ More replies (10)2
u/ishin_rikku Mar 12 '18
GucciGangGucciGangGucciGangGucciGangGucciGangGucciGangGucciGang
I see you, too, are a culture man/woman
369
u/GODBLOR Mar 12 '18
That stand looks extremely inconvenient.
133
u/you999 Mar 12 '18
You have to think of the weight of the monitor though. you are either going to have a heavy bottom stand or a tri leg stand with two long legs to prevent your thousand dollar investment from falling off the table.
55
u/GODBLOR Mar 12 '18
Sure, I'm not saying it's not necessary... It just looks like a pain. Guess you might be able to get a vesa mount.
5
Mar 12 '18
I’d be worried about whatever I mounted it to tbh
→ More replies (1)6
u/CoderDevo Mar 12 '18
If they can mount 48” TVs onto hotel dressers, you can mount this safely.
→ More replies (2)0
15
u/tshugy Mar 12 '18
That stand is the only reason I didn't assume the picture was photoshopped
→ More replies (1)6
u/astertread Mar 12 '18
Yeah that's a dealbreaker. Nothing wrong with three monitors. If it ain't broke, don't fix it.
6
u/MassiveMeatMissile Mar 12 '18
I prefer 3 monitors over one massive monitor like in the OP. I work on 1x 30 incher with 2x 23 inchers vertically on the left and right, it's great because I don't have to pan my head a lot.
→ More replies (3)4
109
u/demkca Mar 12 '18
rotate it 90 and you might be able to see an entire java stack trace
7
→ More replies (1)2
u/killchain Mar 12 '18
Rotate it 90 and you have a stand-up desk with only needing to raise your keyboard.
263
u/Xirzag Mar 11 '18
not C++ template errors So true
13
u/SoundOfOneHand Mar 12 '18
Boost spirit errors are like a page and a half long and usually tell you nothing of any use.
6
u/FallenWarrior2k Mar 12 '18
Can be extended to most template libraries, especially when the type parameters themselves are also template instantiations. I remember seeing an error message from WebRTC somewhere on the internet where the identifier alone was like 6 lines or more after resolving all
typedefs andusings2
u/proverbialbunny Mar 12 '18
Metatemplate programming in C++03 would crash Eclipse if it had an error, due to the error code spitting out too much text. v_v
9
u/rubdos Mar 12 '18
You would think moving on from C++ to Rust solves those things, since Rust doesn't do templates.
Joke was on me though: what C++ people solve through templates, Rust people solve through zero sized types and (generic) composition thereof. So, now I have errors like
futures::future::MapErr<futures::future::Map<futures::mpsc::Sender<(Stuff, futures::mpsc::Sender<Request>)>>, std::io::Error>::Error == ()3
u/golgol12 Mar 12 '18
I've had project errors where the internal debug names for templates instantiations were too long.
157
Mar 11 '18
[removed] — view removed comment
74
91
u/Xirzag Mar 11 '18
There are more characters in a template error than attoms in the observable universe
→ More replies (4)
128
u/Oonushi Mar 11 '18
Yes, 2nd monitor can go right above this one!
111
u/seraku24 Mar 12 '18
I was thinking you get enough of them to have a 360-degree setup with a swivel chair in the middle. Something like what Neil Peart would have if he programmed instead of drummed.
39
u/Oonushi Mar 12 '18
Yes! Now I want to also stack vertically and build a spherical dome of screens around me!
→ More replies (2)13
19
u/shmed Mar 12 '18
I'm waiting for super high resolution VR HMD so I can just live in a virtual sphere of screens
→ More replies (3)10
9
u/JohnMLTX Mar 12 '18
I have something like that with four monitors and two additional laptops for a total of 6 screens, 240 degrees of computing.
3
u/FPMC4172 Mar 12 '18
What's that like? I'm actually curious
10
u/JohnMLTX Mar 12 '18
Here's a picture from a while back.
The three monitors on the back desk are all connected to the gaming/workstation PC on the right. The rightmost monitor is also connected to a server underneath, and the leftmost monitor is also a TV with my SNES Classic and a Chromecast.
I ABSOLUTELY LOVE this setup. There's enough room for three monitors of productivity, and space to work on and take apart laptops, and plenty of space for homework too.
4
Mar 12 '18
Wait, would all the screens connect to the screens to both the left and right of it? Because if so, you could stretch any window around the 360° infinite times, meaning infinite space for error messages!
→ More replies (2)2
u/Rowdy293 Mar 12 '18
Eh...that could get a little weird, unless you had multiple keyboards/mice or completely wireless ones.
55
u/mikeputerbaugh Mar 12 '18
Samsung's 65" class curved 4K TVs are within a couple hundred bucks of this display's list price, and have the same pixel density but twice the vertical area.
Obviously there are some other tradeoffs to be considered, especially related to gaming, but for coding I'd go with the UHD TV.
13
→ More replies (7)13
u/glemnar Mar 12 '18
Looking up while coding would wreak havoc on your neck
11
→ More replies (1)5
u/skaven81 Mar 12 '18
I use a 43" UHD HDR TV as my primary monitor. I have it positioned where if I look straight ahead, I'm looking about 2/3 up from the bottom of the monitor. No trouble at all with neck pain or fatigue, and it's just as sharp as the pair of 24" panels I had before (positioned about a foot closer).
→ More replies (2)
190
Mar 12 '18
Sorry, coding standard says max 100 chars per a line, no flex on that one either, because some principal grey beard off in the weeds still uses an 18 inch monitor and wants two files open side by side
32
u/seraku24 Mar 12 '18
But just think how many 100-column files you could open side-by-side on that thing.
Side note: I use a width of 132 for my editors and terminals.
11
Mar 12 '18
On my personal code I don’t use widths at all, because I have a 24 in wide monitor, so who cares... I’m lucky enough that my code usually doesn’t hit a lot of people’s radar
→ More replies (4)8
u/evertrooftop Mar 12 '18
27", 4K screen. 100 characters max. I don't think I could live without many vertical panes so I'm glad that generally 80-100 is still the standard.
16
u/evan1123 Mar 12 '18
80-100 character max line width is great. Works really well with a vertical monitor.
11
Mar 12 '18
My complaint about vertical is most screens (in my opinion) are optimized to display in the horizontal and orienting them in the vertical causes “weirdness” and artifacts i subtlety detect
→ More replies (4)4
u/clockwork_coder Mar 12 '18
If you're talking about weird colors, it's a big problem with even the best TN panels, but if you buy a decent monitor with an IPS panel you shouldn't notice any difference.
Can confirm though, vertical monitors can be awesome for coding. I have a 27" 1440p monitor I keep vertical and you can see 115-145+ lines of code depending on your editor and font size. In many (most) cases it's enough to see entire files in my team's codebase.
50
u/equationsofmotion Mar 12 '18
Am 28. Insist on 80 character lines. Also multiple files open side by side is awesome. Seriously don't knock it until you try it.
29
Mar 12 '18
Am much older, have worked at 4 different companies, have tried it, much prefer no line limits
→ More replies (2)10
u/glemnar Mar 12 '18
Screens are big enough to open many files with bigger line lengths now. Dot matrix printers are no longer the standard.
120-130 is better.
8
u/equationsofmotion Mar 12 '18 edited Mar 12 '18
I don't know what font size you use, but I can fit almost exactly 160 characters per line on my laptop screen.
My desktop has a lot more screen space, but that just means I can keep more files open at once... If I keep them all at 80 characters each.
Edit: correction. For Java 120 character lines is pretty much necessary. My daily languages are C/C++, so that's a bit different.
6
Mar 12 '18
GitHub code window has a scrollbar at 110 characters, which is my excuse for having a 100 character limit. But I have a way easier time reading code that's broken up into smaller chunks on each line.
→ More replies (2)→ More replies (19)19
Mar 12 '18
“Grey beard?”
Wise old programmer and mentor or old guy who codes to slow and makes more than me?
19
Mar 12 '18
Old guy with many thoughtful insights, but potentially obstructionist to changing the way the team works, sometimes has enough get out of jail free cards to never let progress happen
18
u/Mars_rocket Mar 12 '18
Am grey beard, but I let my team do whatever the fuck they want, as long as I get to choose my own terminal settings and use vim.
6
16
u/EwokaFlockaFlame Mar 12 '18
Where do I get that?
Asking for a friend...
24
u/karlthelama Mar 12 '18
It's Samsung's 32 x 9 ultra-ultrawide. $1100.
13
u/ImAzura Mar 12 '18
That's surprisingly reasonable.
20
u/skaven81 Mar 12 '18
Not really, when you consider that you can get a curved 49" UHD HDR TV that has double the vertical pixels for under $800: https://www.newegg.com/Product/Product.aspx?Item=9SIAC4Z6Z55438&ignorebbr=1&nm_mc=KNC-GoogleMKP-PC&cm_mmc=KNC-GoogleMKP-PC--pla--LED+TV-_-9SIAC4Z6Z55438&gclid=CjwKCAiAxJPVBRB4EiwAsCA4aY8FAA3neuOEO2jGSy8KSxfmmC7IbVsx4Tv_rR_xJmsf6h_MgZ7zSxoCk3UQAvD_BwE&gclsrc=aw.ds
Granted, the TV won't have as quick a response time as the monitor, so probably not as good for gaming. But for coding/productivity work, the TV is going to be the better choice every time.
→ More replies (2)10
31
u/vvyn Mar 12 '18
This would be a bitch to use without a window manager.
22
Mar 12 '18
Have a slightly smaller wide screen and can confirm it is a pain. Gotta travel across the sea to reach the exit button if full screened...
11
u/Scooba6369 Mar 12 '18
It comes with a program that lets your segment the monitor on the fly. Source: I own this monitor
3
u/Narcolapser Mar 12 '18
My thoughts exactly. I'd much rather have 2 screens so that my OS knows how to handle it and I can use all the short cuts for snapping windows everywhere.
→ More replies (1)5
u/666_420_ Mar 12 '18
I kind of prefer two screens to one ultrawide. I don't game and I don't really use my monitor to watch movies. I like the way I can break up windows to different screens; I still use a window manager, but something about it feels more organized
11
Mar 12 '18
As someone's who has only coded in Java/Kotlin, can someone explain why other languages would have shorter class names? I can't imagine my naming conventions being much different if I switched languages, but what you learn as a beginner influences your habits everywhere else, I guess. I don't even think my class names are all that long.
3
Mar 12 '18
It's not just your naming conventions, it's what you have to work with if you use different frameworks, like Spring.: SimpleBeanFactoryAwareAspectInstanceFactory
3
u/BumwineBaudelaire Mar 12 '18
the problem with java is the jdk itself is pretty verbose, and since java is used in enterprise (eg “must work or money/lives are lost”) there’s a lot of pattern usage which is brilliant
there’s absolutely no reason why user java code has to be especially verbose however - don’t want complicated OO structures? don’t create them, don’t want patterns everywhere? Don’t use them etc
8
20
u/EpicSaxGirl (✿◕‿◕) Mar 12 '18
I'll take 4
12
13
6
u/Jokkerb Mar 12 '18
Cool, but definitely would need a 2nd monitor. I mean, how else are you going to keep an eye on the icon layout on your desktop?
4
4
4
u/hotfrost Mar 12 '18
How do you multitask on these things? Looks like you can have like 3 windows open at a time but how do you snap them?
6
3
2
2
u/DiaperBatteries Mar 12 '18
I remember encountering a template error before I understood what templates even were. Boy, did I sure figuratively shit my pants thinking i horribly screwed something up, when it turned out I mistyped a single character or something.
It takes quite a lot of practice to be able to parse through 500+ characters of junk to find the issue.
2
u/bobans30 Mar 12 '18
Ohh Java! How I hate you! I learned C# as my first programming language, but I had to learn Java for an interview. It was really hard and the interviewer was awful. Now I am doing front end web and Iove it. Never looked back at Java.
2
1
1
1
u/PM_ME_YOUR_NACHOS Mar 12 '18
I read the title as the screen will fit OP's name and I assumed OP as being Sri Lankan.
1
1
1
1
u/lol_camis Mar 12 '18
I watched an Unbox Therapy on this. It's actually not terribly expensive. I mean it is. $1500. But for a 49 inch curved 4k ultrawide monitor that's not bad.
1
1
1
1
u/ackbarwasahero Mar 12 '18
I had an apple 30"for a while but down graded to a 27" (3 of them) since I couldn't get out of the habit of maximising. Only way to truly concentrate on a bug.. And 30" was hurting my neck.
1
1
u/lalien42 Mar 12 '18
Developer here, just bought a ultra wide 39 inch from dell and can confirm it’s amazing to work on. (Swift)
1
Mar 12 '18
sounds like someone is jealous of our templates because language Language::name doesn't have them
1
u/Dizzman1 Mar 12 '18
I just bought three of those. One for each team member that needed them. They all opted to keep one of their original HD monitors in place. So about 6k x 1.4k desktop.
1
1
1
u/ParanoidBox Mar 12 '18
And if you flip it, so it's vertical, you might be able to fit half a stacktrace on it!
1
1
1
1
u/killchain Mar 12 '18
Yeah, for those times you want to present your screen over Skype, but don't want to show a certain something on the second one.
1
1
1
Mar 12 '18
I bought a wide aspect monitor. I don't like it because I lose snapping points for the shift + arrow to use.
1
1
u/BOTzzz Mar 12 '18
This guy with the ProductProduct....Name classes needs this so hard. Someone please link it, can't find it anymore -.-
1
1
1
Mar 12 '18 edited Jun 27 '23
these comments have been deleted in protest of Reddit's API changes r/Save3rdPartyApps -- mass edited with redact.dev
1
Mar 12 '18
The only reason I create a function sometimes is because indentation goes too deep. Though I know there is not going to be code reuse.
1
Mar 12 '18
Curious. Is there a way to make Windows maximize applications to “half” of a screen? I know you can do it with staging to the sides. But it seems like on wide format monitors it would be helpful to do this a bit more automagically.
1
u/boxxa Mar 12 '18
Ugh. I still have flashbacks and used to get laughed at when I would say in the CS lab "Another fucking factory"
1
u/Firevenge007 Mar 12 '18
Objective C and Swift file names would still not fit on there.
→ More replies (1)
1
1
1
1
Mar 12 '18
How do you get it?
8
1.8k
u/Plantman1 Mar 12 '18
I recently worked on a project to convert an coworker's accounting spreadsheet that had 3000+ columns (on 5 different sheets) to an application. He used to be the CEO of the company I worked for before it got acquired.
Every month he had to add 26 more columns to it to handle the new month. It was 600+MB and couldn't be opened on some of our machines. Every month he would spend at least 40 hours working on the spreadsheet. Editing certain cells would lock up excel for 30 seconds or more. His "trick" was that if you copy/pasted values in those cells, it did not take as long for some reason. So he would look around for another cell that had the same value to copy/paste.
Did you know there is a limit to how many cells a formula can reference? To get around that, he split the formula into 2 cells and had a 3rd cell to then add them together (and then repeated this formula every month from 2013 to the present). It was a nightmare, but we ended up getting the job done and it actually works great. It now takes him a couple hours to do simple data entry, and a bit more time to check the reports we generate.
Halfway through the project, I saw this monitor and jokingly suggested it to him. He almost cancelled the project.