Object-oriented – Employer appeal; OOP use in mainstream; solutions that blossom with OOP

object-oriented

I'm currently in the process of what I hope to be a career change into the programming field. Despite my wide range of knowledge in the field and additional exposure to concepts in college (which in the end left a lot to be desired), I feel I might be missing out on what really matters when appealing to employers.

I found this post https://stackoverflow.com/a/1991453 to be specific to my predicament. Importantly:

I've seen a lot of terrible C++ code and it's not just from people who don't understand the concepts. I've seen a lot of coders who know exactly what an object is and can explain polymorphism and all those technical OOP terms perfectly. But if they don't know when to use it, they'll never be able to take full advantage of it. I know because I was like this myself. I had read a book on OOP in high school which explained all the concepts, but I went years before I actually used them because I didn't see when they'd actually benefit my code.

I am comfortable with OOP concepts but a little rusty with supporting languages like Java, C# (my favorite for OO), and even C++. The reason I can't claim to be at least proficient in this area is because I'm not really sold on OO design; everytime I set out to solve a problem that can be done in OOP, I find myself forcing its use and end up making a procedural solution in C which I believe to be a much more elegant program.

I guess this involves three questions: Can I still (honestly) sell myself as being valuable to an employer given my skill-set strengths and weaknesses as explained above? Is there any projects or problems I can tackle solo (for practice) that is just smarter to do with OOP? And given an object strong project, what language should I concentrate on?

Best Answer

I think the most common misconception about OOP is that it's supposed to make writing software much easier. That's where some of the criticism comes from, because when writing software, OOP often means more and sometimes even less natural code. That's what makes it hard to see the benefits of OOP, as everyone who starts programming just writes new programs and never has to maintain existing ones.

However, the real benefit of OOP only shows when you have to maintain software over the years, while constantly changing parts of the program in ways nobody expected when they were first written.

You should see OOP as a way to make sure that local changes to the software stay local and don't affect the rest of the program. In this sense classes are sort of explicit placeholders for future changes. In a procedural program it is often hard to see where you have to change the code to add a completely new feature, without affecting anything else.

Surely you can write procedural programs that are also extensible, but you have to think about it and design it properly. OOP provides you with a general idea of how programs can be structured to keep them maintainable, which means that don't have to think about design that hard! The same goes for other programming paradigms, OOP isn't necessarily the just the most common right now.

So in conclusion I think the only way to really understand OOP is to change and add features to existing software. This is the most common task for programmers anyways, and it's supposed to be easy! Not having a good design makes it harder than it has to be.

That sort of makes it hard to answer your question, as any project can benefit from OOP if it's complex enough and needs to be maintained and expanded. I think projects that can have any number of unforeseen features, such games or bots would be good examples. You can also work on a open source program, that is in general the best way to practice advanced programming.

Related Topic