Live data from Hacker News

Ask HN: How best to learn software design principles?

news.ycombinator.com

41–50 of 100 posts

Re: Ask HN: How best to learn software design principles?

#41

Learn a functional programming language. This has had the most impact on the way I think about systems by far. The biggest impact was realizing all of the time I've spent trying to master all of the OOP acronyms hasn't paid off. I've also realized that OOP might be meant for a type of programming that I don't do (video game logic? device drivers?), where as FP seems to fit great for Web applications that are just wra…

Would you say that FP itself (not the thought process it generates) would benefit me in mobile application devlopment. It's mostly gaining data and then setting it.

I would say that the main benefits of FP programming are

1. Its easier to define your own abstractions in libraries. Even advanced stuff like async programming can often be put on a library.

2. Languages like Haskell and OCaml have really cool type systems. Its a killer feature, IMO.

I wouldn't put that much emphasis on the purity aspect. In Haskell the reason for the purity to allow for lazyness and similar languages (Ocaml, F#, etc) are perfectly OK with strict evaluation and mutation.

That said, for mobile apps having a language that operates well with the rest of the ecosystem is probably a bigger concern. Its easier to choose your own language when you have more control over the running environment.

Re: Ask HN: How best to learn software design principles?

#45
I'm going to go out on a limb here and not recommend a book. Good architecture and design take practice. You can get that practice by working with someone who understands it (some of the better, larger open source projects might be a good way to go).

Books can help to a certain degree, but you have to make a conscious effort to practice what you're reading. The best thing to do, assuming you can't get the experience on the job, would be to find a big project and understand and contribute.

Re: Ask HN: How best to learn software design principles?

#46
People in this thread are generally telling you to either read a book or build something, when those things are not mutually exclusive.

So read books, build things and read code.

I like to dig into open source libraries/frameworks/tools that I use in my projects and try and understand their design. It would be great if the documentation people write focused a little on that, instead of the more common "this is how you install" and "this is how you use" (and sometimes "this is how you build it") - but writing docs is hard/tiring and so that knowledge gets lost.

Re: Ask HN: How best to learn software design principles?

#47

Learn a functional programming language. This has had the most impact on the way I think about systems by far. The biggest impact was realizing all of the time I've spent trying to master all of the OOP acronyms hasn't paid off. I've also realized that OOP might be meant for a type of programming that I don't do (video game logic? device drivers?), where as FP seems to fit great for Web applications that are just wra…

Erlang especially, it comes out of the box with OTP, so you don't really need to invent anything or have advance knowledge of design principles. Learn OTP, do things the OTP way. I recommend Erlang and OTP in Action by Logan, Merritt, and Carlsson. I've also heard that Joe Armstrong's latest book is really good.

You can also work through the "Learn you some Erlang" exercises online.

Re: Ask HN: How best to learn software design principles?

#48
post #26

Earlier quoted context omitted.

Would you say that FP itself (not the thought process it generates) would benefit me in mobile application devlopment. It's mostly gaining data and then setting it.

FP has been hard to realize on mobile mostly due to the limited choice of languages available.

RxJava brings lot of FP idioms to Android, and it's great

Re: Ask HN: How best to learn software design principles?

#49
What they want is mainstream orthodoxy like Design Patterns, OOP, etc. You'll want to study the buzzwords, mostly. What are the major principles of OOP? What is a Decorator Pattern? What is TDD?

You won't be able to infer this stuff from studying software that works well. There are specific words they want to hear. Functional programming is probably not going to help at those interviews. FP isn't used at big corporations.

Re: Ask HN: How best to learn software design principles?

#50
Learning software design principles is like learning how to draw - you need to study many, many examples before getting a good feel for it. For example, in drawing there are many individual principles, such as shading, perspective, scale, and so on. Studying each individual principle is only useful within the context of a full drawing.

Software is the same way. Studying SOLID principles, application boundaries, encapsulation, etc. only makes sense within the context of a working application. Not only that, but making sense of design decisions is not as easy as "seeing the result" like you can in a drawing. With software design, you have to take a step further and continuously ask questions:

    "Why?"
    "Why not this?"
    "When would I use this?"
    "When would I *not* use this?"
I'm an instructor at a coding school[1], and one of our biggest goals is to inculcate software design principles into our students. Frameworks are useful, but if you never learn proper software design, you'll always be stuck as a framework developer (e.g. Rails/Angular developer), and never become a software developer (i.e. frameworks and languages are just details).

[1] http://www.makersquare.com/

Post reply on HN