5 ms·
I'm sure this will ruffle some feathres, but the technical skill that has been the most persistently valuable across the past 25 years of my career is object-or
by munificent 4y ago
I'm sure this will ruffle some feathres, but the technical skill that has been the most persistently valuable across the past 25 years of my career is object-oriented programming and design. It's not the only paradigm I use, but being able to organize large programs in terms of OOP has been incredibly valuable and hugely productive for me across several languages and domains.
- Jweb_Guru 4y agoEveryone has a different experience! Object oriented programming and design have had approximately no impact on my own career, while SQL knowledge has been indispensable. I don't think they're really in competition.
- avgcorrection 4y agoJust a slow-to-die 90’s fad in the end.
- kwhitefoot 4y agoOOP is considerably older than '90s. Turbo Pascal 5.5 had objects in 1989 and was far from the first. Anyway structs plus FP is no less object oriented. You just don't have to write the methods in the same code module. See NIM Method Call Syntax for example: https://nim-lang.org/docs/tut2.html#object-oriented-programming-method-call-syntax https://nim-lang.org/docs/tut2.html#object-oriented-programm... Yes, I know NIM is not purely functional. Use F# instead to get a bit closer to purity, it also does OOP quite nicely as does pretty much any functional language that has closures. OOP is a tool just as Git is a tool. See also: https://medium.com/extreme-programming/oop-vs-fp-182475457a01 https://medium.com/extreme-programming/oop-vs-fp-182475457a0...
- avgcorrection 4y ago> OOP is considerably older than '90s. Fad means popular (in a deragetory way). 90’s was its popularity heyday. > See NIM Method Call Syntax for example: https://nim-lang.org/docs/tut2.html#object-oriented-programm https://nim-lang.org/docs/tut2.html#object-oriented-programm... So oop is when you `obj.methodName(args)` instead of `methodName(obj, args)`? Well if that’s all it is about then I can get behind it... > OOP is a tool just as Git is a tool. An iron maiden is just a tool. Don’t be hatin’ it’s just a tool what has it done to you?
- randomdata 4y ago> FP is no less object oriented. In fact, Erlang (and Elixir, I suppose) may be the only object-oriented programming language[1]. [1] https://www.infoq.com/interviews/johnson-armstrong-oop/ https://www.infoq.com/interviews/johnson-armstrong-oop/
- kortex 4y agoOn the contrary, I think that's a self-fulfilling perception. If assets are already organized as objects, then it'll continue to work well with oop. But if you take the approach from the get-go to use data and FP approaches, things can be quite nice. Examples: - interface/trait based programming / structural subtyping (widely used in go/rust, increasingly in TS and python) - terraform - react - aws lambda / cloud functions - flow-based data processing (the whole of deep learning, spark/hadoop) - and of course, anything declarative DSL based (SQL, jq and friends) So I would counter that the more valuable skill is "how do I solve problems in terms of applying and composing transforms to data" To clarify, since everyone has their own definition of OOP, and of the four pillars, Abstraction, Polymorphism, aren't at all unique to OOP, and Encapsulation is just Abstraction: the defining features of OOP are inheritance and poking-and-prodding-state into opaque objects. Inheritance is subsumed by interfaces / structural subtyping, and poking at state is contrasted with reactor patterns, event sourcing, persistent data structures, etc. Oop really shines at the middlin-low level, in languages without a lifetime (state for things like IO resourcese, at the GUI widget level, and the (micro)service level, which is more like the original smalltalk sort of objects, in which case inheritance isn't a think.
- munificent 4y ago> On the contrary, I think that's a self-fulfilling perception. So is using SQL. My point, as well as the parent author's point, is that I've found a technology that has been a useful source of value for my entire career. I make no claims that there aren't other useful sources of value, but I've never for a second regretted the time I've spent getting better at writing object-oriented code. I'm also quite comfortable writing functional and dataflow-oriented code, but I've never found those to be as exciting as some people seem to.
- kortex 4y agoFair enough! And yeah, since OOP is everywhere, there's zero downside to getting better at it. > I've never found those to be as exciting as some people seem to. It's less about excitement (for me at least) and less about the hair pulling associated with reasoning about complex state. I find the more independent attributes an object has, the harder it gets to reason about, unless I can serialize the whole thing (which usually goes against encapsulation). I'd say that's the number 1 thing I do to get "better at OOP": have a healthy suspicion towards any long-lived object I can't serialize/deserialize using primitive types.
- Scarbutt 4y agoI can see how can that be the case if one never works with products that rely heavily on having a database.
- munificent 4y agoYes, my career is possibly a bit unusual in that I've mostly not worked on heavily database-driven stuff. Mostly client applications, games, tools, and programming languages.
- pmarreck 4y agoTell me you've never worked on large FP codebases (as a point of comparison) without telling me you've never worked on large FP codebases ;)
- munificent 4y agoThat's true, I haven't. Weird how many large OOP codebases there are to find oneself working on and how few large FP ones. :) Maybe that's just coincidental, or maybe not.
- sophacles 4y agoShould the inference be: FP doesn't scale? - or - FP inherently creates small code bases?
- pmarreck 4y agoWell, having worked on both, I was able to tell that you only worked on one since your stated opinion would likely be very different had you worked with both, so take from that what you may
- runeks 4y ago> Weird how many large OOP codebases there are to find oneself working on and how few large FP ones. How on earth is that weird when OOP is a hundred times more popular than FP?
- munificent 4y agoThe point is to ask why OOP is a hundred times more popular if, according to FP advocates, it's so much worse as a paradigm.
- pmarreck 4y agoInertia is a powerful thing. Look at how many people still use C and C++ (and Java!) despite there being arguably better alternatives.