Earlier quoted context omitted.
I feel the same way for OOP paradigm but I found it's usually hard to argue against it because it seems to be so ingrained into people's minds. After all that's what we are taught in universities and presented as a first go-to toolbox so it's no wonder. I'm guilty of that defending attitude too but after probably several hundreds kLoC of OOP style and utilization of whatnot design patterns I've came to realization th…
The problem, I think, is that OOP is teach with lots of inheritance. And people think is all about inheritance, and is the only valid tool. Correctly (sparingly) used is ok, but 99% of the time is over used. That is the "All has to inherit from something" illness. Another thing that is overused is hiding: all has to be private, all accessed through getters/setters, all so deeply hidden as possible... OOP has good ide…
Which programming paradigm had the most impact on you as an engineer and why?
81–90 of 91 posts
Re: Which programming paradigm had the most impact on you as an engineer and why?
#82Re: Which programming paradigm had the most impact on you as an engineer and why?
#83When you have to review code you notice sometimes people that dislike OOP are doing a lot of messy code. Procedural code or procedural code hide in a object is not OOP and it's horrible to review!
Re: Which programming paradigm had the most impact on you as an engineer and why?
#84Is so simple, that for like a decade I was using it with great success without having a clue about it.
Then when I start looking for my hobby programming language, was the one that pop-up as the easiest to implement with the greatest level of potential and expressivity. There is when I truly pay attention to the actual theory.
And the shocking part is that the theory is so small that you can put in in a single piece of paper.
Why is not more prevalent? I dunno!
Re: Which programming paradigm had the most impact on you as an engineer and why?
#85I’ll actually list 3. 1 - Smalltalk. I’ve done Python, Kotlin, Swift, C++, and Objective-C, all in various forms of real production code. The kind of OOP you do in Smalltalk is not the same as you do in other “oop” languages, which are really just Algol dirivstives with some weak sauce OO smashed on top of them like lipstick on a pig. 2 - C actually. In particular, pointer rich C. Working in some domains where we did…
Interesting that you consider Objective-C to be just an Algol derivative when it is so heavily inspired by Smalltalk and is basically Smalltalk bolted onto C. The C half of Objective-C is Algol derived, granted.
Re: Which programming paradigm had the most impact on you as an engineer and why?
#86Functional programming. I learned OOP in school, and always thought it overcomplicates things, why can't this comparison operator in one page of Java just be a function, I thought. How can you make the state of objects manageable, especially if it's private, how do you test, without opening up too much of the API, couldn't we just make this a set of functions with an explicit state so it's easier to understand? How d…
As a C# developer, F# is something I long to learn. I heard about F# until I had to adjust some build script which I thought is elegant [1]. I did try some F# tutorials at free time, but nothing that would make me comfortable and "click" on how to write functional code. But I long to bring some improvements to code correctness that can be statically checked by embracing immutability, pattern matching with discriminat…
Re: Which programming paradigm had the most impact on you as an engineer and why?
#87I learned to program on punch cards, and the options were 'top down' ("The best way"), and bottom up ("The bad way").
Top down was hideous, because it ended up being decomposed as the next level as (1) Initialize things (2) Do what's needed. There was no clear path to subdividing the functionality.
Bottom up was worse. Ya' know you're gonna need a routine to do such-and-such, so go ahead and write it. You get to feel productive. The huge down-side was that you couldn't figure out in advance precisely what was needed, so those routines always got re-written to be amenable to what was needed at a higher level once the higher levels were written.
OOP gave me a way to think about the middle layers of a program in a way that isolated some element of what was needed and let me code it 'usably'. I could sit and think about an what kind of interface I wanted to provide, and get it right. It was also a big win to realize that even C (NOT C++) could be used in this paradigm, in terms of a boundary around the interior or some piece of functionality.
Re: Which programming paradigm had the most impact on you as an engineer and why?
#88Ruby's pry. Just dropping `binding.pry` anywhere in the code, run it and then get a full REPL with all the variables and instrospect everything with `ls`. This is why I am still coming back to Ruby and writing everything like it. In most other languages you spend a lot of time actually trying to find a way to debug properly. Happy to hear recommendations how other languages are doing it. (I know that there are debugg…
As of javascript, you can hit F12 right away and dive into debugger for 3rd party site. :)
Re: Which programming paradigm had the most impact on you as an engineer and why?
#89Earlier quoted context omitted.
As a C# developer, F# is something I long to learn. I heard about F# until I had to adjust some build script which I thought is elegant [1]. I did try some F# tutorials at free time, but nothing that would make me comfortable and "click" on how to write functional code. But I long to bring some improvements to code correctness that can be statically checked by embracing immutability, pattern matching with discriminat…
One of the things that made F# "click" for me was Wlaschin's "Domain Modeling Made Functional". It's largely a focus on how to think about the underlying data, and getting in that mindset helped tremendously in feeling more comfortable with F#.
Re: Which programming paradigm had the most impact on you as an engineer and why?
#90Ruby's pry. Just dropping `binding.pry` anywhere in the code, run it and then get a full REPL with all the variables and instrospect everything with `ls`. This is why I am still coming back to Ruby and writing everything like it. In most other languages you spend a lot of time actually trying to find a way to debug properly. Happy to hear recommendations how other languages are doing it. (I know that there are debugg…
import IPython
IPython.embed()
Or, using only the Python standard library: import code
namespace = globals().copy()
namespace.update(locals())
code.interact("", None, namespace)