-8

Contextualizing:

Hi, I'm 25 years old, and I've been working as a freelancer for 8 years. I mainly worked with stacks: NodeJS , React, React Native, and with TypeScript as stack superset. I've always liked programming, and I've always studied languages ​​like: "C/C++/Rust/Go, Java/C#, Haskell, Python/Ruby, Elixir/Erlang, Clojure, Scala, Elm, PureScript... . " (despite not programming professionally in them, but I always studied doing some personal projects). Despite being a generalist (because I'm a freelancer) I always liked to deliver my work in the best way, with clean, easy and scalable code.

Problem:

In this year, I "left" the life of a freelancer and started to enter the business field. I started working with other people and started having a lot of "headaches" understanding the work of others (We use NODEJS) mainly because there are teams that use Vanilla JavaScript, others TypeScript, some do it in an OO way and others more functional ..and that's horrible for me. Although I'm not much of a fan of Java (and OO), at least I think it's more organized as they follow a strict pattern that is completely object-oriented (or in theory it should be, after Java 8 introduced lambdas).

Questions:

Despite having a senior role at the company, I sometimes worry that I'm not doing my best. I don't know if it's because it's a matter of habit, or if working in a team with OO and mixed paradigms (especially in JS) is really a mess.

I've been studying functional programming for a long time, and I'm REALLY looking to change jobs to work on some more functional language (like Clojure or Elixir) because I can understand code much better than an OO abstraction. (Or at least avoid bad code I think)

Any tips for me? thanks!

2
  • 5
    Understand that you're really limiting yourself. In academia there's a lot of use of functional languages and paradigms. In the real world, OO destroyed functional. 99% of jobs will be using an OO paradigm. I totally get changing jobs for not liking the language or tools (it factored into my recent job change), but not getting OO is something you should work at fixing. You're not going to avoid it in this career. Commented Aug 3, 2021 at 2:19
  • 1
    I've struggled on how to say this the kindest way possible; but, considering the amount of time you have in the industry, are you sure you have mastered the language you are in? It can take years of not being fully satisfied with a solution to find better patterns of solving problems. Also, how can you really assess the new langauges, considering you are in that whirlwind phase of seeing "all the benefits" and "none of the detriments" Lambda languages, don't constrain you enough to prevent the really big messes. You discover your clean thinking isn't as clean as it should have been.
    – Edwin Buck
    Commented Aug 3, 2021 at 14:02

2 Answers 2

3

I think it's more organized as they follow a strict pattern that is completely object-oriented (or in theory it should be, after Java 8 introduced lambdas)

A sentence like this makes me wonder if you know what you are talking about. Object Orientation is a Java staple, but lambdas aren't part of Object Orientation, it's part of Lambda Based Calculus, which is often related to Lisp or Scheme, languages that generally lack Objects (unless you decide to implement them through non-native means).

I'm willing to say that a mixed paradigm of programming is more difficult than a single paradigm, but honestly JavaScript is also object-oriented, so I'm wondering where the paradigm mix is coming into place.

I'm happy to hear you're studying lambda based languages, and that you like them; but, to be honest, you'll probably not be effective in those until you put in your time. It takes years in a language to move from "being able to do stuff" to "being really skilled at doing stuff."

As for Lambda Calculus helping "you avoid bad code," there is more bad news. The original "bad code" was written back on Lisp machines in the 60's. Bad code exists in every paradim, and on the Lambda Calculus scale, a mis-step can mean "fix this lambda" or "rewrite all the lambdas" based on how the fix folds into the code base. There are reasons why this language group went from "owning most of programming" to a niche, and is only slowly regaining ground.

So, I would slow down. Maybe you really are where you think you are; but, with the sort of mistakes in your own question and the mistakes in what new languages can provide, I'm thinking that you're blessed to be in a senior position (and in your domain, odds are you act at a senior level) but outside of your niche, you're a bit overconfident.

Take some time and learn then new stuff. Mastery of more than one niche takes time, and it reaps benefits that are hard to measure. I think it's worth it. I just think (no evidence for me to back it up) that you are skimming the new stuff, getting disillusioned, and then jumping ship before you really get to know the material. In a few more months, you might be ditching lambdas, and on to the next not-really mastered cool item. In any case, Good luck!

7
  • Hey, Thanks for replying! With the Java 8 lambda, I meant that: "Not the current java is 100% object oriented", because they introduced lambda (which is functional) from version 8", I think it was my writing error, tricking you into misinterpreting, sorry. Commented Aug 3, 2021 at 5:20
  • 1
    JavaScript is not object oriented, I mean, currently with ES6 yes, but it is originally prototype oriented.Regarding the mixture of paradigms in the projects (which I commented): I didn't refer to the same project! Because here we use JS for a lot of things, and some teams run some projects in Pure JS, others prefer to use TypeScript, others use a Functional JS (RamdaJS), and as I help others' projects, I kind of "mix" the paradigm. Anyway, that's what I meant :) Commented Aug 3, 2021 at 5:21
  • 1
    @srluccasonline Ah yes. I've often typed stuff that didn't read well too. I see you've edited the question, 'll update mine too. That said, there's a lot of object-orientation I didn't get ironed out smooth until years in that paradigm. I can also state that until you have your first large program in Lambda based calculus, you haven't see truly messy code. Lambda helps you keep the structure you enforce, but it can be as good or as bad as your own ability to enforce discipline in your code. Basically, with Lambda, it's as good (or bad) as you can be.
    – Edwin Buck
    Commented Aug 3, 2021 at 5:26
  • 3
    @srluccasonline - Java has always be considered to be an object oriented language. If something is unclear about your question you should edit it instead of submitting a comment acknowledging something was unclear and clarifying that something in a temporary comment
    – Donald
    Commented Aug 4, 2021 at 23:11
  • 1
    @srluccasonline In addition to Donald's comments on Java, JavaScript is also widely known to be object oriented. It's hard to find a reference that doesn't state "JavaScript is a prototype based object oriented language" Just because one uses prototypes to make the obects instead of constructors doesn't make them "not objects."
    – Edwin Buck
    Commented Aug 5, 2021 at 4:56
1

In the professional world, object oriented programming is the most common paradigm, but realistically most modern software development is multi-paradigm. I would recommend developing your understanding of the object oriented paradigm to complement your knowledge of the functional paradigm, but there isn't one paradigm to rule them all.

1
  • 2
    And any attempts to have "one paradigm to rule them all" often winds up with "the darkness binding them" - the project failing or complexity taking over as the paradigm is bent to deal with the real world issues.
    – David R
    Commented Aug 3, 2021 at 13:57

Not the answer you're looking for? Browse other questions tagged .