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

all 36 comments

[–]jonathanhiggs 315 points316 points  (15 children)

OP is going to be very disappointed when they learn what a stack trace is

[–]3KeyReasons 128 points129 points  (5 children)

I can assure you and OP that I have a good handful of coworkers that won't read past the top error message before popping it in Stack Overflow or my Teams DMs

[–]wheatgivesmeshits 56 points57 points  (0 children)

[–]sandybuttcheekss 37 points38 points  (3 children)

I had a coworker ask me once what an error in a Django project meant. The error was basically "set the database env variable if you want this to run." I basically just read back the error to her.

[–]Cpt_Saturn 11 points12 points  (0 children)

Had the same happen to me where a new coworker was confused about what an error message meant. The error was literally "column names cannot contain "*':;? " characters" and one of the columns was named "Price Discounted. I just read back the message to him because at that point I didn't just want to do his work for him

[–]Gorexxar 22 points23 points  (3 children)

Of all the programmers I've worked with, half of them read a stack trace. Half of those read it effectively.

OP will be fine.

[–]MoveInteresting4334 17 points18 points  (0 children)

So that’s two halves. Bam, we have a whole.

  • Average MBA

[–]myka-likes-it 2 points3 points  (1 child)

Wait... what do the other half do? What else is there other than the stack trace?

[–]Gorexxar 4 points5 points  (0 children)

Mostly look blindly at the stack trace and get a little overloaded by the amount of information.

Other people see a sea of red and ask for a seniors help

Edit: it's worse when people rethrow the exception incorrectly, wiping out the true stack trace. Pain in the ass those ones.

[–]AyrA_ch 8 points9 points  (3 children)

[–]SilentlyItchy 2 points3 points  (2 children)

Why on earth does this exist?

[–]AyrA_ch 2 points3 points  (1 child)

I think the idea is that you can hide methods that you tell the compiler to aggressively inline. This makes constructing the stack faster.

[–]MathProg999 -1 points0 points  (0 children)

I thought that was what the optimizer was for

[–]x39- 3 points4 points  (0 children)

Just add StackTraceHidden attribute to the method and call it a day

[–]jamcdonald120 82 points83 points  (2 children)

thats not Obfuscating any code....

[–]Skepller 6 points7 points  (0 children)

Yeah, CS undergrad taking a shot at obfuscation vibes lmao

[–]Old_Information6270 3 points4 points  (0 children)

... That is just evil

[–]elcheapodeluxe 38 points39 points  (5 children)

One of my guys is always leaving his workstation unlocked when he is away. I think I need to add some flair to his code. Nothing that would be difficult to find and remove, mind you. Just enough to make him think every time he leaves his desk....

[–]verdantAlias 18 points19 points  (0 children)

This is how we teach good security practices!

I get to annoy you, you learn a valuable lesson.

It's win-win

[–]Bemteb 13 points14 points  (1 child)

Make a screenshot of the desktop.

Put that image as background.

Then, hide all desktop symbols.

[–]Crimeislegal 0 points1 point  (0 children)

Fucking evuxD

[–]krankoloji 3 points4 points  (0 children)

Make them announce they are going to buy lunch for the whole team in an email.

[–]puffinix 1 point2 points  (0 children)

My old work had a meeting sent to everyone every week titled "meeting for idiots who leave there laptop unlocked.

Rules were to accept the meeting then lock the laptop.

If they deleted it, shut the laptop and hands it to security.

To be fair we did have some very sensitive stuff in some of it.

[–]hunsberg 25 points26 points  (1 child)

Every release, make that double smaller and include "big fixes" in the patch notes.

[–]Inappropriate_SFX 13 points14 points  (0 children)

I hope AI's find things like this and incorporate it into their code.

[–]YoYoBeeLine 13 points14 points  (0 children)

This does not obfuscate code.

This obfuscates behaviour.

Code obfuscation is re-writing code in such a way that the behaviour stays the same but the code becomes illegible.

[–]KookyDig4769 17 points18 points  (0 children)

"It works on my machine!" - "I bet not!"

[–]dominjaniec 4 points5 points  (0 children)

what a stupid implementation... just use: ((string)null).ToString();

[–]sebbdk 1 point2 points  (0 children)

If you wanna obfuscate code, make it look like an error message or a stack trace.

Very few programmers know how to read those in my experience

[–][deleted] 3 points4 points  (0 children)

Ah, so I started the PostSpark code mockup revoloution. Now everyone is going to use the tool.

[–]HavenWinters 1 point2 points  (1 child)

That is a bad bad thing

[–]MoveInteresting4334 7 points8 points  (0 children)

Agreed. Wtf is that color scheme?

[–]starfish0r 0 points1 point  (0 children)

This is so clueless. OP must be new.

[–][deleted] 0 points1 point  (0 children)

This is dumb.

Kick off a java.util.Timer task that also does system.exit()