[TIL] What is the synonym of "I don't care" in programming?

17    09 Jul 2015 08:06 by u/14d2025

22 comments

17
try {
    someMethodThatThrowsException();
}
catch (Exception e) {
    // TODO
}

This gets bonus 'I don't care' points if it makes it through to production (unfortunately more common than you'd hope).

2

This! sometimes there is a e.printStackTrace(); with a //TODO if you're lucky.

0

Darnit. That was what I was going to say.

I just committed this sin today.

I added it as temporary code while I fix the real issue. I have a listbox-style control that doesn't like overlapping datetimes in the control, but some of our systems have bad date time data as they are development systems and didn't have the code in place to keep them from putting in the bad data in the first place.

I chucked this in and am doublechecking that new systems can't get bad data and then to also write a method to ignore duplicate datetime event data.

If it gets through, the data is so unimportant that it should never matter. (and now I just jinxed that, so better get back to work to fix the real issue)

0

I'd replace the

catch (Exception e) {

by a

catch (Throwable th) {

Because, who cares about errors ?

0

Yes, ugh. It's better to just not use a try catch in the first place.

2

A void return value

2

To me, writing some aknowledgement of something being broken and needing to be fixed, even if it's just a comment saying "broken and needs to be fixed," at least shows some effort. It's when someone has nasty ass code that is uncommented and impossible to follow that I know they don't care.

2

it's

try{
}
catch(Exception e){
}
2

"We'll address that in the next point release"

"It doesn't do that in my Dev environment"

"Will not fix"

//Whoever wrote this should be fired, I don't even know what it does

int getRandomNumber() { return 4; // chosen by fair dice roll. // guaranteed to be random. }

4

Remind me this. 😎

0

I lifted the reference from XKCD ;) +1 for recognizing it.

1

Third-party libraries who think dumping the API/Class Diagram on a website == documentation!

0

MYBRAIN

0
char * buf = malloc(1073741824);
memset(buf, ' ', 1073741824);
0

Comment above function

//check later

But then I don't check back to make sure it's 100% functional...

0

discard statement in Nim.

0

not addressing compiler warnings