Programmers! Learn when to stop! Don't over-engineer your code.

preview_player
Показать описание
Put down the keyboard!

There is nothing worse that using code that has been written to some arbitrary set of standards in the guise of professionalism. Often due to inexperience, or the urge to just keep on trucking, some coders make a complete mess of otherwise perfectly acceptable code.

Рекомендации по теме
Комментарии
Автор

All that refactoring... and he still didn't turn PI into a constant.

nonameo
Автор

I love a quote from a book: "Code can be so complex that there are no obvious bugs or so simple that there are obviously no bugs"

frankcastle
Автор

I'm not even joking, this is really close to how I was taught programming in uni. You'd lose marks if every line wasn't commented.

PersonMan
Автор

"Getters and setters for every single field!"



You just invented Java!

notepass
Автор

First one wouldn't even pass a corporate code review. They'll tell you to do it like the second one.
Second one will pass the corporate code review, but management will decide it takes too long. They'll outsource this task to India, hire a joint venture management specialist and his assistant and a secretary and a coordinator and an additional HR person. Then they'll realize how expensive everything is and fire you to save some money. Management will give itself bonuses for reducing costs.

DoubleBob
Автор

"It's the best code ever!"
*Compilation error*

vrtex
Автор

This is getting played out our next dev team meeting!

kieranwood
Автор

2:52 I laughed out loud when you pasted the entire text of the GNU GPL in there

pvb
Автор

“Know when to stop.”


And here I am wanting to know when to start.

minoanlight
Автор

1000 lines of code just isn’t sufficient enough to square an integer.

DavidWonn
Автор

Junior: hard-code it.
Senior: hard-code it.
Mid-level: let me do all that because I've just learned it, feels good!

anttihilja
Автор

You've imported 2 things in that code: where's your dependancy manager?!

OKRASSnaky
Автор

Truly enterprise-level. Where's the github repo?

gikyrfi
Автор

"I wonder if everyone will understand what this boolean means. I mean, it could be true or false."

ovndfbs
Автор

I liked you included both "cmath" and "math.h" because on of them must be the correct one :)

kushagra
Автор

Encryption - "Nah!! Too old fashioned"
Over-engineering - "Yeah!! This will save my code from theft. "

akashdutta
Автор

This is the most important thing I have learned in 17 years of professional coding. keep it as simple as possible as complexity will appear by itself.

colinkingswood
Автор

#include <cmath>, #include <math.h> //I'm not sure which one so let's be safe

brilliant idea

drewestification
Автор

One sees over-engineering in software all the time. Overly academic engineering, overly abstract engineering, overly layered designs, all that. In what other fields of engineering do we see over-engineering? Electronics may sometimes look complicated to outsiders and beginners, but I can't say I've ever seen over-engineered electronics, not in real life. Maybe in over-priced gimmicky high-end audio, gold cables and all that fluff. Mechanical? Architectural? Costs keep things pretty well constrained to practical. Anything "over" is for extra strength, extra capacity, extra longevity, or for spacecraft to survive extreme conditions. What is special about software that so many pathologies of creation and implementation beset the industry?

DrunkenUFOPilot
Автор

yeah, I definitely went through a phase of over-engineering code when I was right out of college. Another thing we coders always do is when you learn a new thing, you inevitably start inserting that new thing anywhere you can.

zombiekick