News for hackers. Stuff that matters.
Re:Ask HN: How to get good at separation of concerns? by dtagames on Sunday September 04, 2022 @02:49PM (#32716378)
Sure. I'd say be aware of code smell as you write and read your own code. Look out for functions that have too many parameters.as they're probably doing too much. Avoid passing data to a function that it doesn't absolutely need. Be careful about returning complex variables. Don't write functions that do more than one thing. Avoid globals and closures. In general, functional style programming will naturally lead to better separation of concerns.

There are no comments on this comment yet.