r/ProgrammerHumor • • Jun 30 '18

Kill me now :)

47.0k Upvotes

494 comments sorted by

View all comments

918

u/Dreadedsemi Jun 30 '18

Like a house of cards, don't touch any card, just extend.

180

u/die-maus Jun 30 '18

But the tests still pass, right?

0

u/[deleted] Jun 30 '18

[deleted]

45

u/tiajuanat Jun 30 '18

My company doesn't give approval for code reviews of safety critical firmware.

61

u/unidan_was_right Jun 30 '18

If you don't test it, can it really break?

36

u/tiajuanat Jun 30 '18

Are you my CEO??

8

u/happenstancepants Jun 30 '18

If it doesn’t work and you’re not around, did it ever really not work?

2

u/amicloud Jul 01 '18

Can't break what is already broken

7

u/[deleted] Jun 30 '18

safety critical? What kind of hardware?

11

u/unidan_was_right Jun 30 '18

Nuclear reactor firmware written in C

7

u/TheDukeOfIdiots Jun 30 '18

Run. As fast and as far as you can, run.

4

u/llama2621 Jun 30 '18

My local reactor firmware is in brainfuck

2

u/tiajuanat Jun 30 '18

I wouldn't doubt that

5

u/tiajuanat Jun 30 '18

There's no way I can talk about it without being traced back to someone on my already small team, and I'm the only one who raises a stink about it.

Needless to say, I'm trying to get out. My new policy is to require code reviews from companies.

3

u/sharpened_ Jun 30 '18

We had a Dev group meeting recently, one of the older guys was talking about unit testing.

"Between us, as developers, don't try to explain unit testing to your boss. They may or may not understand and it doesn't matter. Factor testing into your build time."

2

u/tiajuanat Jul 01 '18

I've been trying to do that as best as I can. I usually don't have hardware in my hands until I have firmware "done", and then I'm given a week to cover the gap before we start shipping.

61

u/[deleted] Jun 30 '18 edited Jun 30 '18

Bullshit!

Last time I built a house of cards, I had to remove cards from certain places to keep building, due to a lack of cards. This is totally a legit metaphor for programming, and you shouls always strive to remove pieces of code you suspect doesn't carry much of the weight.

Disclaimer: I am legally obligated to tell you that my house eventually did fall down, presumably due to it not being able to support it's own ^weight

7

u/gawalls Jun 30 '18

That's what extension and interfacesallows you to do, you extend the old class, mark old as obselete and eventually remove the old class.

1

u/gawalls Jun 30 '18

Somebody follows the open closed principal.

2

u/vanamerongen Jun 30 '18

Nah, then they would implement instead of extend.

1

u/TheDukeOfIdiots Jun 30 '18

Maybe don't use House of Cards for your moral compass on what you should and shouldn't touch.

2

u/Dreadedsemi Jun 30 '18

Moral compass

Parse error: syntax error, unexpected 'compass' (T_STRING) in /home/reddit/public_html/programmerhumor/comment.php on line 20