News for hackers. Stuff that matters.
Re:Learn more programming languages, even if you won't use them by zcw100 on Saturday April 13, 2019 @08:25AM (#19652598)
I’m getting tired of this. Yes I see the benefit of knowing multiple languages but let’s look at the other side of that coin. There’s the dev that is familiar with a dozen languages and writes terrible code in all of them.

When exactly are we supposed to be learning all these languages? Nights and weekends that effectively has you working 24/7? Or more likely some developer that has a personal relationship with the CEO and can do no wrong reads a blog post on language X and catches the fever. Well, he needs some practice and he’s not working nights and weekends so now we are rewriting things or working in a mixed environment. He knows just a smidge more than the rest of the team so he’s in charge but can’t be seen as anything less than an expert so they pretend they are. He leans on dogma and best practices as he bullies the team as they screw things up left and right.

Anyone who is stupid enough to say that we should have stayed with what they had been using will be labeled as not a team player and blamed for the failures.

Those failures will be used as proof that our hero is as amazing as he says he is as he becomes a 10x programmer by kneecapping the rest of the team and valiantly struggles to pull and incompetent team forward.

Next thing that happens is the good developers leave and the rest are forced out or fired assuring our hero developer a fresh crop of devs who don’t know the history of the project cementing the myth that our developer is a genius in our new language.

Re:Learn more programming languages, even if you won't use them by gexla on Saturday April 13, 2019 @09:06AM (#19652790)
> When exactly are we supposed to be learning all these languages? Nights and weekends that effectively has you working 24/7?

By that logic, you might ask how we have time to do anything? How do we find time to eat? How do we find time for HN?

Learning a programming language doesn't have to mean mastering the language. Make a game out of it. Pick one "thing" about the language and spend 15 minutes on reading / practice on that thing. Make an Anki card (or multiple cards) on that thing and run through the deck for some other 15 period "learning" break. Maybe this doesn't work for you either, but it's something else you can try other than chaining yourself to your computer until you come out a master.

Re:Learn more programming languages, even if you won't use them by Viliam1234 on Saturday April 13, 2019 @01:15PM (#19654337)
Perhaps you could eat using your left hand, and use your right hand to make Anki cards. Then you could have lunch and learn a new programming language in 15 minutes.

Meanwhile, you can use one of your legs to relax, and the other one to interact with your family (unless having a family is too unprofessional).

Re:Learn more programming languages, even if you won't use them by flohofwoe on Saturday April 13, 2019 @08:54AM (#19652741)
IMHO the whole point of learning new programming languages is exactly not to rewrite everything to the latest hipster language on a whim.

Instead this adds new tools to your toolbox, so next time you can choose a tool that's a better match for a problem instead of trying to bend a language that wasn't created to solve such problems.

IMHO having many small specialized "speedboat languages" around which can be learned in a few days to weeks is much better than having a handful huge "oil tanker languages" which eventually become overly complex "jack of all trades, master of none" boondoggles.

Re:Learn more programming languages, even if you won't use them by CuriouslyC on Saturday April 13, 2019 @10:19AM (#19653131)
In the contest of a distributed application I definitely agree with this. When constrained to a monolithic application architecture, small focused languages can be problematic. As monoliths grow and become more complex, domain shifts and requirement changes can take you out of that small language sweet spot.
Re:Learn more programming languages, even if you won't use them by orangeshark on Saturday April 13, 2019 @09:05AM (#19652783)
>When exactly are we supposed to be learning all these languages?

Some argue that as a professional, you should be spending time outside of work learning to improve your career. You can't expect your employer to give you time to learn.

I find it can be difficult though, especially when you want to spend your time outside of work on other things like family and hobbies.

Re:Learn more programming languages, even if you won't use them by zcw100 on Saturday April 13, 2019 @09:18AM (#19652836)
I didn’t say you shouldn’t spend personal time on those things but you should expect to be compensated one way or another for it. It’s interesting how people in IT separate their skills from their compensation. If my lawyer or doctor is working weekends I guarantee one way or another they are making damn sure they’re getting compensated for it.
Re:Learn more programming languages, even if you won't use them by mcguire on Saturday April 13, 2019 @11:34AM (#19653571)
Most states require between 20 and 50 hours of continuing education for MDs per year. (https://www.boardvitals.com/blog/cme-requirements-by-state/)

Most states seem to require between 8 and 15 hours of CLE per year. (https://www.lawline.com/cle-requirements)

You'll find that with most actual "professions".

Re:Learn more programming languages, even if you won't use them by rimliu on Saturday April 13, 2019 @05:32PM (#19655860)
My compensation for learning things "on the side" was always simply getting the better job where you can use the skills you got.

I've taught myself web development and thus got my first job. I've taught myself iOS development and was able to switch to it full time later.

Re:Learn more programming languages, even if you won't use them by 4thaccount on Saturday April 13, 2019 @10:32AM (#19653202)
That is probably because they are both different jobs. Both doctors and programmers get paid while they're at conferences and shouldn't have to pay for travel, lodging, food, or conference fees. Outside of that, I'm not sure doctors are needing to pick up too many skills outside of what they typically get paid to do.

A rails developer gets paid to make rails apps and maintain them. If you notice that your company will have to pivot soon and another technology will be needed, I hope they allow you to learn on the job, but many are far too shortsighted, so you have to do so outside of work and it's the reality of the situation however stupid.

Re:Learn more programming languages, even if you won't use them by pjmlp on Saturday April 13, 2019 @12:48PM (#19654125)
I certainly know teachers, doctors and lawyers that improve themselves out of their own pocket and time.

Unfortunately not everything gets done, or paid for, during work time.

Re:Learn more programming languages, even if you won't use them by rmrfrmrf on Saturday April 13, 2019 @09:12AM (#19652815)
I absolutely expect my employer to give me paid time to learn, and only work for those that do.
Re:Learn more programming languages, even if you won't use them by mcguire on Saturday April 13, 2019 @11:41AM (#19653613)
I don't. Oh, I'll spend some down time learning rather than spending all of it here, but I don't expect formal training, especially if I am asked to jump in to some project quickly. In fact, most formal training I have been exposed to outside of school has been horrible and useless; I actively avoid them.
Re:Learn more programming languages, even if you won't use them by orangeshark on Saturday April 13, 2019 @10:54AM (#19653321)
I expect employers to give me paid time to learn stuff they require me to use at work, but if it is something unrelated to the company I am not expecting them to give that time.
Re:Learn more programming languages, even if you won't use them by tluyben2 on Saturday April 13, 2019 @08:57AM (#19652754)
But this is also to do that many people do not see developing software as a career; more something they happen to be ok at and it makes a bucket load of money. If it's a career, like I decided to make of it when I was 16, you can be an actual senior in a number of languages. I feel equally secure writing large codebases/projects in quite a substantial number of languages after 30 years of learning different languages and environments and having and worked on many large and different projects using different languages.

It is quite different for someone who is 25 and does not get enthusiastic about spending a lot more years in the field; why would you then learn a lot of different languages? It makes more money, short term(!), being good at one language just jumping up the ladder as fast as you can using that.

[dead]
Re:Learn more programming languages, even if you won't use them by tluyben2 on Saturday April 13, 2019 @09:38AM (#19652943)
I didn't say I started then, I said I decided I liked it enough to make it my career; others in my university saw it as a stepping stone to (upper) management. I feel the age that I decided that can be interesting for others thinking about career choices.
Re:Learn more programming languages, even if you won't use them by scarejunba on Saturday April 13, 2019 @08:41AM (#19652674)
Jesus Christ, man, I think that team was going to fail anyway. That's super dysfunctional and the languages thing seems like a very small deal.
Re:Learn more programming languages, even if you won't use them by zcw100 on Saturday April 13, 2019 @09:20AM (#19652848)
Are you under the impression that IT isn’t super disfunctional right now? Yes, the language thing is a symptom not the problem.
Re:Learn more programming languages, even if you won't use them by scarejunba on Saturday April 13, 2019 @06:54PM (#19656273)
Dysfunctions are on the team level. I know some exceptionally well-functioning teams.

The field of software engineering as a whole? Nope, not dysfunctional. Creating the most value in the world since the internal combustion engine and doing so super smoothly.

Re:Learn more programming languages, even if you won't use them by pjmlp on Saturday April 13, 2019 @12:46PM (#19654105)
There is code that makes the customer happy and willing to pay for more projects, and perfect code that never sees the daylight.
Re:Learn more programming languages, even if you won't use them by j_m_b on Saturday April 13, 2019 @09:09AM (#19652803)
I can tell you've worked for at least one startup. Par for the course.
Re:Learn more programming languages, even if you won't use them by Rerarom on Saturday April 13, 2019 @08:30AM (#19652624)
Also, it's boring.
Re:Learn more programming languages, even if you won't use them by darkhorn on Saturday April 13, 2019 @08:34AM (#19652636)
I've learned to code methods in OO languages without using loops after I've learned Erlang. No loops means less bugs.
Re:Learn more programming languages, even if you won't use them by zcw100 on Saturday April 13, 2019 @09:23AM (#19652864)
I can’t tell if this is sarcasm but if it isn’t it just proves the point. Your teammates must just love working with you. I’d love to see the look on their faces when you committed that code. “I just learned Erlang. Check out what I did without telling anyone. Suck it. Boom!”
Re:Learn more programming languages, even if you won't use them by darkhorn on Saturday April 13, 2019 @03:24PM (#19655190)
It is not sarcasm. Yes, they love working with me, they learn new things from me and they use it. Generally their face is like "o_O I wish I've learned it before". I use build-in functions of PHP and Java in way without loops, there is nothing unknown. I don't write Erlang code. Here is an example what I mean;

  <?php declare(strict_types=1);
  function fibonacci_nth(int $n): int {
      if($n === 0) return 0;
      if($n === 1) return 1;
      else return fibonacci_nth($n - 2) + fibonacci_nth($n - 1);
  }
  function fibonacci_series(int $n): array {
      return array_map('fibonacci_nth', range(0, $n));
  }

And here in Python

  class Fibonacci:
     def fibonacci_nth(self, n):
        if(n == 0): return 0
        if(n == 1): return 1
        else: return self.fibonacci_nth(n-1) + self.fibonacci_nth(n-2)
        
     def fibonacci_series(self, n):
        return [self.fibonacci_nth(x) for x in range(n+1)]
Re:Learn more programming languages, even if you won't use them by jodrellblank on Saturday April 13, 2019 @11:22PM (#19657404)
"no loops means less bugs"

But the loops will be clear and explicit. People can check if you have an off-by-one error.

Python does not support many recursive calls, after "n" gets beyond a certain number, the code will crash with a RecursionError.

That is a bug which is much harder to see. The code will crash if N < 0 for the n_th() method, which is probably a bug.

Re:Learn more programming languages, even if you won't use them by platz on Saturday April 13, 2019 @08:42AM (#19652681)
And none of those OO langs can be relied on to have tail recursion so now you a new problem
Re:Learn more programming languages, even if you won't use them by yomly on Saturday April 13, 2019 @08:48AM (#19652712)
Most non-functional languages will implement map/filter/reduce as loops under the hood, but realizing that there is an abstraction for general sequence processing frees you up to focus more on the core business logic at hand and reduces the surface area of your code for bugs.

Sure, handrolling a loop is a trivial activity that novice programmers can figure out, so you should _never_ get it wrong because you _never_ ever program tired or hurriedly under deadlines or make typos or input off by ones...

Re:Learn more programming languages, even if you won't use them by AnimalMuppet on Saturday April 13, 2019 @03:50PM (#19655339)
I don't recall exactly how many handrolled loops I've messed up in the last 10 years, but the number is either 1 or 2. Could I mess up one or two map/filter/reduces in 10 years? Is it impossible to mess them up? What about the cases they don't cover, so you use your own recursion?
Re:Learn more programming languages, even if you won't use them by jodrellblank on Saturday April 13, 2019 @10:45PM (#19657264)
OK you can write a handrolled loop almost perfectly. /Why/ are you writing ten years worth of loops - something a computer can do for you?
Re:Learn more programming languages, even if you won't use them by AnimalMuppet on Sunday April 14, 2019 @02:42PM (#19660924)
Can it? I'm working on embedded systems, in C++, with C++11-or-earlier compilers. Sometimes I need control of the exact order things happen in. Sometimes I need an action to occur either zero or one times, on the first available entry. Always I need to write code that my coworkers can read.

How much of that can a C++11 compiler do for me?