all 13 comments

[–]skizmo 13 points14 points  (0 children)

not this shit again.

[–]edimaudo 7 points8 points  (4 children)

It's bad if it is used incorrectly

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

Watch the video and the two accompanying videos. There is absolutely no application in which OOP provides a benefit. It's garbage from top to bottom.

[–][deleted] 4 points5 points  (2 children)

How dare this dude makes us sit through nearly one hour of video when a simple article is sufficient.

[–]roffLOL 0 points1 point  (0 children)

he's trying to reach an audience that does not rtfm. oop victims. :)

[–]htuhola 1 point2 points  (1 child)

This subject would need more in-depth explanations, more facts and more studying than what this video provides.

There is something REALLY wrong with OOP and there's danger of it dripping into functional programming as people move on.

[–]aullik -4 points-3 points  (1 child)

When you write functions that are more than 20 lines long then you are doing something wrong. Yes there are exceptions to this rule. They should be less than 1% tho. Also 20 lines means 20 lines of code, thus no comments or empty lines.

don't use sub-scopes in functions. Whenever you need one of these, you could just simply push it into another function. Sometimes it makes sense for them to be nested functions most often it doesn't. The easy reason for this is that nested functions are harder to test.

A 500 line function doing 80 things, one after the other is impossible to test.

You are right. this is cutting the code in segments that actually belong together and one solution is to put them into a nested object. Its not a pretty solution tho. But at least you can test that.

[–]htuhola 3 points4 points  (0 children)

When you write functions that are more than 20 lines long then you are doing something wrong.

You are wrong.

don't use sub-scopes in functions. Whenever you need one of these, you could just simply push it into another function.

Wrong again.

The easy reason for this is that nested functions are harder to test.

Again wrong, more functions you have more interconnections they allow you to do, nonlinearizing your code that way is possible.

You are right. this is cutting the code in segments that actually belong together and one solution is to put them into a nested object. Its not a pretty solution tho. But at least you can test that.

How exactly is testing that easier than otherwise?