Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I started my journey with trying to learn C++ in the late 1990s when it was the “cool” thing. Most of the books and the sparse educational material on the web back then made little sense to me. I wanted to instruct a computer to do cool things like the games I played or the programs I used, but all I got was obtuse passages about taxonomies of animals and shapes (CAnimal, CDog and CShape, CSquare). Stuff like virtual functions and constructor types was deeply uninteresting and irrelevant for me at that point.

Then came the “aha” moment. I downloaded a few tutorials which used the GLUT library from C and I was instantly amused. Now I could draw 3D teapots and text and rectangles with almost no boilerplate and I had examples to learn from. A turning event that has influenced all aspects of my life for the latter 20 years.



I had the same experience trying to learn C++ as a kid, the book i got had all sorts of OO examples and all i could get is “why would I want to do this?” and my progress learning to program was put back by years.


I feel the same. Coming of age in the late 1990s OOP was all the rage and while I found a lot of it interesting and useful, it created a lot of its own problems and the solution was often just "more oop" in the form of design patterns and such. Meanwhile I always preferred composition over inheritance and templates made a lot more sense to me than crazy object hierarchies ever did.

I almost actually considered leaving programming in the mid 2000s but then I started seeing the tide slowly turn away from OOP, or at least I found voices that agreed that OOP is not the only answer and I felt a sense of relief. Then as latency became a more and more important thing in algo trading, it eventually fell out of favor almost entirely.

But yeah, OOP has a place but it really went overboard for awhile and there was jiggawatts of brainpower spent on trying to make it work when straight C or other approaches would have worked much better- and with much more grokable code!


Mine was more extreme... I basically stopped learning to program after hello world and simple math because there was all of this OO stuff and it was like "ok I can follow these examples but have no idea what any of this would possibly be for" and that was that for years.


My first solo experience was a VB.NET book with Car, SuperCar, Truck and all this stuff. Even at the time (I was very young) those laughably shallow examples stuck out as contrived and useless


Interesting, I've been learning and doing almost everything with a functional or procedural style, but I've felt kind of guilty I don't understand OOP patterns enough, or don't know when I would want to use them.

So I've been learning Smalltalk/Pharo and reading Smalltalk, Objects, and Design [1] because people say that's what OOP was really supposed to be. It's been interesting and enlightening in some ways, but I still feel like I'd rather do most things without OOP. Do you think it's still helpful or worth it to dig into all this for someone now?

[1]: https://www.amazon.com/Smalltalk-Objects-Design-Chamond-Liu/...


You should read Gang of Four imo. There are still a lot of very influential ones in there


"Read" GoF is not a thing I would do, just as I don't sit down and read a recipe book. Because GoF is kinda a recipe book for oop.

I would skim it though, just to have a sense of what's in there.


It's not very long. Why not just read it and work through it? It isn't written like a recipe book, but even if it was, you should sit down and read your recipe books


I got a similar book on C++ and tried to return it to get a refund as soon as found there's no exiting sample code but OO stuff. I was lucky that the shop didn't get the book back so I had to read it. I think it upgraded me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: