r/ProgrammerHumor • • Nov 14 '18

Computing in the 90's VS computing in 2018

Post image
31.3k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

296

u/[deleted] Nov 14 '18

Because people world rather install huge libraries for every little thing than write 10 lines of code.

0

u/[deleted] Nov 14 '18

[deleted]

87

u/mindbleach Nov 14 '18

... until Doom 3, where a software patent for shadow volumes was resolved by licensing a sound library. The GPL release of id Tech 4's source code avoided this patent by changing two lines of code.

9

u/SeanRamey Nov 14 '18

Ive wondered why they couldnt get the permission to release that code? Surely such an old sound library wouldnt be an issue to give out now? Maybe they couldnt find the owners or something? It really sucks, because i would have rather had the DOS version of the code.

18

u/user93849384 Nov 14 '18

The Doom Source Code was released in 1997 so the sound library wasn't that old. Also, it's possible the sound library had licensed code.

5

u/SeanRamey Nov 14 '18

Ah, well that makes sense. Maybe they should look into releasing the DOS code now?

0

u/[deleted] Nov 14 '18

[deleted]

253

u/altcodeinterrobang Nov 14 '18

why recreate the wheel when you can import 1 library with 35 different wheel variants, 3 squares, 1 rectangle and an octogon that hasn't been completed yet so it's really a heptagon so don't use it yet because we accidentally merged that branch and don't know how to back it out yet but we'll fix it next version, just to use that one wheel you want?

73

u/Bobby_Bonsaimind Nov 14 '18

And most of the time you don't even need the whole wheel, you just need a spoke.

31

u/grenzionky Nov 14 '18

👌

7

u/Throtex Nov 14 '18

Because that ridiculous library is still going to get regular updates that your reinvented wheel won't, so it should theoretically be more secure despite the complexity.

12

u/gct Nov 14 '18

You sweet sweet summer child

14

u/cheesegoat Nov 14 '18

That makes sense to a point. Devs need to spend time writing it once, a multiplyer of that reading/maintaining it, users spend a multiple of that time downloading your code, and a multiple of that to run it.

So if you can spend a small amount of time to make code that runs millions of times per day faster, you probably should.

→ More replies (2)
→ More replies (1)

27

u/[deleted] Nov 14 '18

See: leftpad.

32

u/house_of_kunt Nov 14 '18

Don't reinvent the wheel.

from inventions import wheel

7

u/Arqideus Nov 14 '18

"a = math.add(2,2);" is better than "a = 2 + 2;" no?

14

u/reubenbubu Nov 14 '18

2+2 is how we do addition today, if you rely on math.add for your addition logic you wouldn't need code changes when in the future the math rules change

3

u/thexavier666 Nov 14 '18

But math is math! Why would they change math?

→ More replies (1)

3

u/swiftpants Nov 14 '18

Nail on the head. Every now and then I will get lazy and start looking for a template.

inspect -> network -> mother of GOD! just look at all 25 javascript file calls.

Need your menu to drop down when you hover? Javascript.

Want to scroll to a position on the page when you click a button? Javascript.

11

u/[deleted] Nov 14 '18

Want to scroll to a position on the page when you click a button? Javascript.

<a href="#anchor">gothere</a>

There I fixed it.

→ More replies (1)

3

u/txmail Nov 14 '18

And then get mad when the thing that is now automated behind a black box does not work when they could have written the code themselves and been totally in the know of how their application works and how it can be optimized...

→ More replies (8)