News for hackers. Stuff that matters.
Re:A Bunch of Programming Advice I'd Give to Myself 15 Years... by ffsm8 on Saturday June 29, 2024 @09:52AM (#40830557)
But you're not going to realize which way it's better unless you've written the bad code before.
Re:A Bunch of Programming Advice I'd Give to Myself 15 Years... by BiteCode_dev on Saturday June 29, 2024 @10:07AM (#40830703)
Tangential, but I think that's the problem with trying to learn from design patterns.

I read about them and tried to apply them.

That's backward and didn't produce anything good.

I started to understand them by doing it the other way around:

- Coding, solving problems.

- Reading other people's sources.

- Then reinventing half a terrible design pattern.

- Later on, looking at a book: "ohhh, that's what I tried to do" or "ohhh, hence the snippet in that source".

- Now I can discuss with people about the pattern and name my code entities according to that.

Design patterns are a communication tool.