Learn more programming languages, even if you won't use them
thorstenball.com
thorstenball.com
ofcourse, when I was a wageslave in the bay area, its nice to know python, java, javascript, scala etc. - got me jobs every 2-3 years & put food on table.
now that i'm in academia, its completely upside down. literally everybody is way more productive than me in just about any task. The other day I as supposed to program a poisson clock, it took forever. Meanwhile my advisors & classmates with zero industry experience chug thru these tasks effortlessly. Lately I've confirmed its because they know exactly 1 language , but they know it so well & in so much depth, they know exactly where to look, the right mcmc library, the right slice sampler, the right optimizer, that's what matters.
There's no point programming the same bloody front-end & back-end in a dozen different languages just because of industry constraints. That's like eating a spaghetti with a fork, a spoon, with chopsticks, with your fingers...its the same fucking spaghetti. cook something else, not just rotate dish-ware.
OTOH, it took around 15 years to get there. I understand that this kind of dedication may not be possible or worth it for everyone.
[1] Because there is very, very little unique features to each language. Unless you go to the fringes, you're bound to see the same concepts applied again and again and again, which gets really disheartening after a while. If you don't believe me, try naming any "new" feature which was added to your favorite (EDIT: I meant mainstream - TIOBE top 10 or 20 - lang here!) language recently - and I'll show you that same feature implemented 10 or 20 years ago in another language(s).
EDIT: more neutral wording.
What I do doubt, is that it's possible to know several languages in-depth and at the same time be at least very good in a specific domain (webdev & mobile apps are not domains), have good algo and problem-solving skills, have decent to good soft skills, know at least a little bit of PM and also be a good conversation partner and well informed citizen of the world, while also being a good husband/wife/dad and being reasonably competent at some hobby that is hopefully not related to computers.
Learning and keeping up to date with the N+1th language takes space from learning the many other interesting things this world has to offer.
My choice was to forgo any hobbies unless they are somehow useful for programming, ignore most of being "well-informed citizen of the world", ignore the whole mating and breeding business and to focus solely on programming at first, then on programming-related fields that picked up my curiousity. I'm still competent enough in other programming- and work-related areas - at least I've never been told otherwise - but, indeed, half of what you write about is nonexistent in my life.
Actually, if there was a monastery for programmers, with ascetic lifestyle and good broadband connection to the Internet, I'd go there in a heartbeat.
OTOH, I don't think you'd need to go to such lengths normally. As a programmer, you'll be working for 40 years at least, right? 30 minutes of reading a day will eventually get you to the respectable N (if you choose this particular field), it'll just take longer.
The OP said the fact that he learned multiple languages makes him fall behind his peers in coding tasks. I'm saying that he would have no such problems had he learned these languages in-depth and it's perfectly possible to do so. I admitted immediately that the effort needed for this is at least substantial, no disagreement here - I just pointed out that, after that initial effort of consistently learning N languages for 2*N years, the following languages become very easy to pick up. That's it :)
Really learning what you can safely ignore in whatever context is the most important part, everything past the basics is domain specific.
Having said that, I have read several language specifications which can be useful for general understanding. But, that’s simply the tip of the iceberg.
Anyway, I specifically mentioned knowing "some facts about the implementation" instead of "knowing the implementation inside-out". The same is true for tools, libraries, and frameworks - there is no need to remember every function/method signature and every class name in a library - as long as you know the most important parts and can quickly and accurately find the relevant documentation for the rest.
To me, 'knowing in depth' (as a language user) means that no matter the question, you know where to search for the answers. There's no need to remember the answers themselves, although it kind of happens naturally with repetition anyway.
On the other hand, it's also important to know which questions are not worth answering. It's exactly as you say:
> Really learning what you can safely ignore in whatever context is the most important part
So, to sum it up: if you can do both these things, then, to me, you have in-depth knowledge about the language (or actually any other field). The next step - ie. actually knowing all the answers by heart - is mostly useless for language users and only matters for (and is best left to) language implementers/advocates/nerds.
> A language like Java has a giant and evolving standard library plus multiple compilers etc. And that’s ignoring any simply popular libraries etc.
Java stdlib is only "huge" in comparison with C, where stdlib is non-existent. The popular libraries may be ported from other languages or even directly called via FFI. And if the library is really good, it will be ported to other languages, too, which means you'll have an easier time using these languages in the future.
Even without all that, though, if you know more-or-less what's where and can quickly search for the details - you're good. It's not that easy to learn this - you need to remember the structure of the docs at least - but it's much easier than actually learning and remembering all of the stdlib, etc.
For this reason I think it may be rational to only learn what will be used in the near future and spend the saved time on more timeless knowledge.
Like interpreter and compiler architectures, type systems kinds and their meaning, ways of specifying the semantics formally, and also the structure of novel kinds of abstractions proposed by researchers in some experimental languages.
If you learn all of that today, the next time you'd need to learn anything new about a mainstream PL would be in 10 years, if not twice that.
Example: many modern languages only recently started supporting some of the Algol-68 features. That's 50 years to get a lambda into the language...
It wasn't in academia, but I spent a while working on one of the major native front end platforms almost exclusively and had the opportunity to get very familiar with it. And by 'familiar' I don't mean just knowing where to look things up, I mean knowing many of the exact APIs by heart, and having a wide variety of things I could just type in (without much looking things up) even if it involved working with images, network requests, JSON, file IO, string processing, dates/scheduling, collections, serialization, menus, windows, controls, input, drawing, sound, etc.
Another big thing was when there are multiple ways do the same thing, having done it both ways and having direct experience of why one choice will likely be more effective in general or for a particular project. This can apply to choosing libraries/frameworks or app architectural decisions.
I noticed I missed this level of familiarity quite a lot when I switched to a different ecosystem later. Maybe this is worse for native UI development because of the large API surfaces. But I found needing to consult the documentation again to be a lot slower.
Having had that experience has kind of made me wonder about full-stack vs specialization, and optimal-language-for-the job vs standardizing (although of course some languages are totally inappropriate for some jobs). At least in my own experience I found sticking with the same language for a while to have continuing productivity benefits well beyond the 1 week/month period.
Core Data
SQLite
NSArchiver
NSKeyedArchiver
NSUserDefaults
JSON
Property lists
Protocol buffers
stdio
NSData
memory-mapped files
Realm
This is without getting into anything too obscure. This list is probably also out of date.
My claim was that:
> learning a new language - and yes, in-depth, including idioms, stdlib, some external libraries, maybe some framework (if needed), and also some facts about the implementation and its inner workings[1] - takes a week at most
I also tried to define "learning in-depth" in another post:
> To me, 'knowing in depth' (as a language user) means that no matter the question, you know where to [quickly] search for the answers. There's no need to remember the answers themselves, although it kind of happens naturally with repetition anyway.
> On the other hand, it's also important to know which questions are not worth answering. [ie. what to ignore while learning]
And I stand by it: I believe that there's no need to memorize too many details to be productive, you just need to be able to quickly and accurately find the relevant details, no matter which details are they. Various docs indexes and viewers, your IDE features, cheatsheets printed on a wall - all of that can help you if you forget a bit of syntax or a signature of a function. There's nothing, other than just reading a book or two, to help you if you don't understand a crucial concept in a language or the architecture of the library/framework.
Also, all these concepts are reused all over the place. For example: "Io is a purely-object-oriented language with prototypal inheritance which allows objects to have many parents." Each word here has a meaning, and that meaning is (well, mostly) standard across most programming languages. With this description, if you know all the words, you just learned 3/4 of all there is to Io OO. Another example: "Dylan is a purely-object-oriented language which is class-based, allows multiple inheritance, and also decouples methods from classes by relying on generic functions, which use multiple dispatch - similar to CLOS." This one is longer, but it's still a single sentence, which conveys most (or if you're familiar with CLOS - all) of the characteristics of Dylan's object system. Sure, there are obviously more features in Dylan that you need to know before you start coding... but they are all defined with a single sentence. It takes half an hour to go through them all, and - again, if you know the exact meaning of each word - at this point you know more about the language than a beginner programmer would learn in a year or two.
> I mean knowing many of the exact APIs by heart
I was like this in the past, so I know what you're talking about. Unfortunately, my epilepsy makes my memory reset significantly from time to time - I can't do it, or at least not for long. It caused a loss of productivity for a bit, but it went back up when I started using well-configured tools. This is why my definitions of "knowing in-depth" above are what they are - I live them, for better or worse.
> (without much looking things up) even if it involved working with images, network requests, JSON, file IO, string processing, dates/scheduling, collections, serialization, menus, windows, controls, input, drawing, sound, etc.
Yes, that's what tends to happen with repetition - unless your memory is impaired in some way - you just remember things. There's nothing else than repetition that can get you to that point, which also means you "only" need repetition to get there. In other words, it happens naturally with time, provided you consistently work with the given tech stack, and that you use it for the various things you mention.
But again: good tooling makes the rote memorization mostly unnecessary, and I really don't see many benefits of keeping all the idiosyncrasies of the whole stack in your head. It's completely different story if you code in Notepad without Internet access, though.
Further, all the things you mention are implemented in all general-purpose languages. Moreover, most implementations look really similar. In almost all languages "network requests" are built upon sockets - an OS-level mechanism. Images are more tricky because of decoding/encoding (which is handled almost everywhere by simply linking to libjpeg & co.), but after that they're 3-dimensional int array/vector/list/what-have-you (yes, there are other representations - and yes, they are all implemented across most PLs and have very similar characteristics everywhere). "file IO", too, is based upon OS-provided streams, or a crippled reimplementation thereof. It's the same everywhere. "collections" are almost language-agnostic: the names and interfaces may (slightly) differ, but the underlying data structures are the same everywhere. "input", "windows", "controls", "drawing" are event-based everywhere, and almost all languages have bindings to all the GUI frameworks. You can write GTK+ app in Python just as well as in OCaml or C# (even though GTK itself is C (I think?)) - and you'll get the same names and signatures, even.
You'll see for yourself in the decades to come - you're likely to switch the stack at least a few times by the time you retire. You'll see that most divisions in programming are illusions and - quite simply - matters of taste/personal preference, while in reality the differences between the popular languages, stacks, framework and systems are miniscule.
> Another big thing was when there are multiple ways do the same thing, having done it both ways and having direct experience of why one choice will likely be more effective in general or for a particular project. This can apply to choosing libraries/frameworks or app architectural decisions.
These are mostly language-neutral - the exact same considerations apply when deciding on library/framework or approach in every single language.
> I noticed I missed this level of familiarity quite a lot when I switched to a different ecosystem later. Maybe this is worse for native UI development because of the large API surfaces. But I found needing to consult the documentation again to be a lot slower.
It could be because of lack of proper helpers in your editor etc., but either way: if you stick with the new stack, you'll learn it naturally with time. You'll forget some of the previous stack (although I'm frequently surprised how I can recall specific quirks in technologies from 20 years ago.), which is also natural. Memory just seems to work this way. It'll take a few months to remember all the relevant details - less if the new tech is similar to something you already know.
Those sort of details I learned from extended use weren't really important for understanding things conceptually. But of course actually implementing something involves going through all the minor details and making lots of small choices. Being able to just breeze through that was really nice.
To use your example of a network request: on iOS it may be true the API is built on top of sockets or kqueue or whatever (I believe they've moved to user-space networking now but I don't really keep up). But you could use the toolkit APIs blocking on a background thread, or integrated with the main event loop with a delegate object, or on the event loop with a callback block. There's trade-offs to different ways of doing it (especially on a team project): some ways are more verbose, some introduce more thread-safety risk, using blocks everywhere may increase the chance that someone generates a memory leak through cyclic references, processing large requests could be more performant on older phones on a background thread, some patterns make it easy to cancel the request, etc.
I don't really miss iOS development. But I do miss the ability to go through all those details/trade-offs as quickly, and I kind of want stick with one thing long enough to develop that again.
Especially because as you observe many of the underlying concepts are the same anyway (especially among the popular languages that are the practical choices for most projects because of ecosystem/tooling concerns). To extend dxbydt's analogy I'd rather focus on the dish (problem-domain) than the cooking instruments.
That's obvious, although the "substantially" part is a bit vague. But it's still obviously true - you will be slower if you need to check the docs often, it's a given. But:
> I kind of want stick with one thing long enough to develop that again.
It should take just a few months at most. You'll get there much faster than you (I assume, sorry if I'm wrong) expect. :-)
Or is it that you're already many months after the switch, and you still feel that you're checking the docs very often and it slows you down? Maybe there's something wrong with the docs, then? Otherwise, you should probably try learning in a more structured manner, like reading a book or doing MOOC.
> But you could use the toolkit APIs blocking on a background thread, or integrated with the main event loop with a delegate object, or on the event loop with a callback block.
Exactly the same options are present in every general-purpose language. There are quirks, like Python and threading or JS and event-loop, but you get the choice of blocking/non-blocking, and later if the non-blocking is based on threads and synchronization or on an event loop (or coroutines, green threads, CSP, Actors, etc.) The only thing that changes is nomenclature, which for some reason language developers like to reinvent all the time.
> some ways are more verbose, some introduce more thread-safety risk, using blocks everywhere may increase the chance that someone generates a memory leak through cyclic references, processing large requests could be more performant on older phones on a background thread, some patterns make it easy to cancel the request, etc.
Ok, some of these are indeed specific to a given platform and have no direct equivalent in (as many) other languages and platforms.
Yes, you need to learn those - as there's no equivalent in other languages and stacks, you have no choice but to learn, no previous knowledge will help you with them.
However, these tend to be higher-level concerns, where understanding the concept is still more important than memorizing all the relevant details. You write: "some ways are more verbose", which is obviously true, but IMO it's more important here to understand what "verbosity" is, what trade-offs it presents, and what is the "correct" level of verbosity for the task. Knowing this, finding the solution with the right amount of verbosity is as simple as opening a bunch of libraries' GitHub pages and quickly glancing on the code examples there.
---
All in all, I'm not disagreeing with you at all. You're right that remembering a lot of details makes you faster. You're right that there are considerations unique to the stack of language.
What I'm saying is it's not hard to remember all the essential details: you only need spaced repetition, which happens naturally as you work. Further, while unique features for a lang or stack exist, they are very rare, and it's not hard to learn them (exactly because they're so different than the rest, which makes them stand out). All the other - non-unique - features and consideration form a large pool of concepts which are frequently reused across many (or most, depending on the feature) languages and stacks. Internalizing this pool of concepts lets you effortlessly switch stacks and languages; and while you're right that the productivity will drop after the switch, I assert that with a bit of effort it'll get back to normal levels after a short time - just a few months (for the real mastery it would take longer, of course, but that's true always and for every kind of work).
Anyway - thanks for the discussion, I enjoyed it very much, thank you. I hope it wasn't too boring on your side :-)
What about Rust's borrow checker? I considered it novel, but I'd love to find out it was stolen from somewhere.
[1] https://en.m.wikipedia.org/wiki/Clean_(programming_language)
Here's a challenge: come up with something that people generally think is fundamentally new. Given enough HN commenters, someone will present an example of how something super similar to that thing was already there 20-30 years prior.
> try naming any "new" feature which was added to your favorite (EDIT: I meant mainstream - TIOBE top 10 or 20 - lang here!) language recently - and I'll show you that same feature implemented 10 or 20 years ago in another language(s).
This is a fun game and I'll answer for them on this one: OCaml (1996) has structural types.
That sounds like your "issue" isn't knowing too many languages but that you don't know any one language as in depth as they do though?
I don't see why you'd want to unlearn anything.. doesn't that knowledge only help?
I think there are benefits to learning more languages but also support the idea you should have at least one you're super comfortable with.. thats not mutually exclusive!
With only my own experience and that of people I’ve worked with to go by I can’t provide any broader scope, but I feel like it really is the case that a critical mass of familiarity with different languages and ecosystems makes it far easier to pick up and run with others and be more or less unaffected by the differences. It is probably important that the languages in your set be actually different though, rather than superficially different as most historically-popular languages have tended to be.
I suppose you don't _have_ to use different languages to learn new concepts, but it certainly helps in some cases. For example, learning about currying is going to be much more natural in F# than it would be in C#.
https://gist.github.com/prakhar1989/1b0a2c9849b2e1e912fb
“A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness.”
Not all academic code is that bad, but the heft is definitely towards that end of the pool.
I got really familiar with the distinction, because I spent a while translating PhD project/demo code into actual products for $JOB. It’s definitely mostly in making things secure, stable, maintainable, and debuggable that you lose most of the time.
Once the paper is written, the data analyzed, the project is done. There is no such thing as "maintainability" because the code isn't used past publication.
As a developer you are the chef. If all you can make is spaghetti, is it the kitchen's fault? OP makes the point explicit: the language shapes the way you approach problem solving.
When declarative, functional and procedural programming all yield the "same fucking spaghetti", you might just have missed the point.
Maybe because I'm also unfamiliar with it, I can't judge. But knowing the right set of algorithms to solve domain specific problem sounds language agnostic to me.
That said, I agree that you should also continue to learn about CS, learn more data-structures, more algorithms, explore newer techniques and paradigms. That includes learning new languages, but not only that.
It sounds to me like you're working in a highly specialized area that requires deep domain knowledge and rich set of tools to apply that knowledge. Your colleagues have a lot of familiarity with that domain and those tools. Knowing multiple languages isn't your problem, it's just that you haven't spent your entire career working in this particular domain and you're playing catch-up.
VB6 Kix scripts Powershell .net 3.5 Winforms WPF .net 4+ .net core .net asp Java JavaScript React Angular C++ Golang.
If programming is a job and not your craft, it will be harder for you. You just have to practice more.
That just sounds like some mess that one is forced to deal with, not reasonable software engineering. I mean yes, some jobs will drown one in useless stuff. Doesn't mean that learning the useless stuff is a virtue now.
So, TBH, my gut reaction to your comment is you might lack experience developing & shipping any large applications. That’s not an insult, and not a judgement; experience comes with time. Plus I don’t know your experience, I’m just letting you know what your comment leads me to assume. My only suggestion is to be a bit careful throwing around judgmental words like mess and useless and ‘not reasonable’ when you don’t know precisely what you’re talking about.
FWIW, this stack looks very normal even for a web-only application, and it looks simpler to me than the stacks & tech people use for shipping console games. Hell, I’ve written personal projects with tech stacks that have as many pieces.
If I’m off the mark about your experience level, you could make your case stronger by demonstrating that there’s a simpler cleaner alternative that solves the same problems, provides the same or better performance, build utility, maintainability, deployment, user experience, etc.. Do you have any suggestions?
This is what happens when one gobbles up whatever Microsoft throws over the fence... and it's clear they haven't learned their lesson because .NET core is on the list. There is no simpler, cleaner, alternative for them. By their nature such companies will (almost?) always end up in this situation.
Any developer working for them must now learn VB6, ASP.NET and Powershell and other great future-proof tech. That is, once again, not a great career move and certainly not an argument for learning many languages.
For the sake of discussion, that entire stack could probably have been kept to C++, Java, HTML5 and something for scripting assuming a talented engineering team.
C++ would have covered their Windows desktop needs from Windows 9x until today, including going cross-platform if needed.
Java would have covered cross-platform desktop apps and back-end, likely including whatever they're using golang for. Had they wanted more agility on the BE they could have gone with Python which doubles as scripting language.
HTML5 is self-explanatory. No need for fancy schmancy React or Angular which I bet they'll have to replace (or rather append to) in 5 years time.
It's only small and well-defined software that can get away in being written in one technology. For anything larger/serious, you're bound to end up in a polyglot environment.
Yes, most environments use several programming languages. Done right, this can be Google's blessed languages approach. Done wrong, it can be every technology Microsoft ever brought into existence, ending up with a triplicate solution for each problem.
which language is this? I'm guessing Python.
What about:
- Architecture
- Software Delivery
- Networking
- Project management
- Interaction design
- Visual design
- Human factors/Social systems
- Graphics/Art (2D/3D)
- Market validation
- Sales & Marketing
- Business planning and finance
- Application domain knowledge
- Operations and Monitoring
- Data infrastructure
- Analytics
- Machine Learning
- Machine Vision
- Computer Graphics
- Simulation
- Game Engineering + Design
- Information Retrieval + Recommender Systems
- Embedded systems/Control theory
- Optimization
- Scientific Computing
I mean there is basically an endless list of areas you can reach into in the limited time you have time focused on skill development as a software engineer beyond "on the job" training. Building a strong, broad "stack" of skills seems like a good investment. Learning new programming languages is a niche within a niche depending on how expansive a scope you set for yourself as a person creating software for the world to use.
In a time of people going for T-shaped careers, another language is deepening the vertical bar, while another field enriches the horizontal bar.
In that sense, learning a new language and learning a new field are complementary, but different in essence.
Rust ownership and types system teach you about the freedom it affords you when reasoning about values in a system.
Clojure teaches you about separating state from logic and the benefit of keeping it at the edges of a system.
Nodejs teaches you about async and programming which is imo, as different as functional is to OO. The way you need to reason about things is very different. The non blocking needs teach you about what types of things are blocking and which are not.
I took all these lessons back to PHP and my systems are massively improved as a result.
Most of the PHP hate comes from people dealing with PHP code written by people who simply don't know how to program.
That is not a defense of PHP, it has many faults, but it's a language like any other. I have problems, big ones, with every language and ecosystem I've ever been exposed to. That doesn't detract from their benefits or the concepts they can teach you.
Also, it takes like 20-30 hours to get mediocre with a new standard library and syntax. You won't "learn the language" but you'll get a good feel for it.
Arguing time cost as a reason to avoid learning new languages is pretty weak when you're spending a career programming.
Given the leverage developing software can have, and the ease to which it can be deployed globally, I err on the side of assuming that the breadth of skills that are "core" to a career which includes a focus on writing code to create software to be potentially quite broad.
I think I certainly take a generally unorthodox viewpoint in that I have a hard time swallowing the idea that a single person shouldn't be able to consider the skills to design, build, deploy, operate, and iterate on a single piece of domain-specific software as "core" to the job of being a software developer. 20 years ago, it was generally normal thing to do that, with a huge number of software tools (often shareware) developed by a single individual or 2-3 person teams. Today, its much rarer, perhaps except in a few domains like indie game development or open source infrastructure products/frameworks. Projects may start that way but it's generally assumed that when it becomes time to get serious, you need to staff up and delegate to specialized workers.
Even within the generally accepted scope of the domain of software development I find it hard to understand the justification for the separation between "front end" and "back end" engineering -- beyond the fact that the tools today have grown full of incidental complexity, making it hard to get the breadth of knowledge needed to be effective, it seems clear that a person building a single integrated system is going to build something different than a number of people building a system where Conways law informs the architecture due to specialization and communication boundaries.
The problem I now have is that I don't know if I'll ever be able to master any language anymore. Mmmmaybe C, since I've used that fairly consistently, albeit on-and-off for 25 years.
But whenever I get to an "if" or "for" or function declaration, I often have to look at an example real quick because I have too many fighting memories: is it "if () then {}" or "if then:" and is it "else if" or "elif"? Do I need parens around the clauses? Is it "&&" or "and"?
Mostly I've found that the difference between two languages isn't the difference between two cheeseburgers, but rather the difference between a cheeseburger and lasagna. There's absolutely personal preferences (I still despise Python's whitespace-as-scope, even though I love the language), but they all get your belly full.
Even with just a handful of languages in my toolbox, I feel this way too. A mixture of unease and anxiety.
In addition to syntactic variations, I find that the notion of writing idiomatic code in a given language amounts to more thinking overhead which eats into productivity. I'd need to be programming in the same language over a long period of time for idiomatic code to come more naturally. Can't seem to just instantly switch like some talented folk out there.
If I don't have to match styles, and can just write the code as I feel like it, I can work so much faster.
that is exactly how you are supposed to write idiomatic python
One thing to realize, though, is that syntax - outside of a few special cases - is the most trivial part of any language. It's 100% acceptable to forget the syntax of a `for` loop in one language, as long as you still know that, in that language, the `for` loop is actually a for-each construct working on sequences of some types and additionally it's an expression which returns a sequence of results, making it equivalent to `map` higher-order function. Now, I described the `for` loop of (for example) Elixir, CoffeeScript, Racket, Common Lisp (`loop` with `collect`) and F# and Scala (with `yield`). As long as I know that a language I'm using right now belongs to this group, I can plan my implementation around the semantics outlined above. Then, when it comes to writing the code, I can just look up the syntax, or more commonly - just make my editor autocomplete and snippet-insert the relevant bits for me.
So, my advice would be to first learn and understand as many programming language features as possible, focus on their semantics, and then group the languages you know around the features. The syntax is really a trivial matter, and "mastering it" (ie. having the whole grammar constantly in your head) is not actually necessary in my experience.
There's something with those two languages in that they interfere badly.
Portuguese and Japanese on the other hand...
There are roughly 3 main groups of European languages: Italic (or Romance as you described it) for Western Europe, Germanic which is predominantly Central Europe, Scandinavian countries and the UK; and Balto-Slavic for Eastern Europe. Generally speaking of course.
However there is still a fair amount of cross pollination even with the Germanic and Italic languages, not to mention shared characteristics (not least of all a shared alphabet) that doesn’t exist with Japonic languages such as, well, Japanese.
Like when I was trying to speak german, after just some time in France. My native language is Portuguese
Differences between people, or differences between cultures perhaps. Having grown up in the Netherlands I did already come across Frisian and Limburgs, which are also slightly different but if you keep reading or listening you just pick it up. So I don’t know, keep practicing I’m sure you’ll get Spanish!
For example, if you start speaking (not listening to) Frisian and Limburgs, you might find yourself throwing a few Swedish or German words in the mix.
I'm white so I'm sure this was even more confusing for him
C, {all kinds of assembly}, {C++, Java, C#}, {Python, Ruby}, {Haskell, OCaml}, Prolog, {VHDL, Verilog}
For casual scripting, it's so nice to not have to care if it's length or Length. At least memory can help me if it's len/length but length/Length is no distinction at all.
(Case sensitivity is one of my pet hates, for anti-human UX).
Why should the ASCII table be the defining characteristic, over and above the way humans have used English for decades? ASCII "Foo" and UTF-16 "Foo" are not the same set of bytes, should they map to different things? "Foo" and "Foo" are not displayed with the same set of pixels, should they map to different things? "Foo" and "Foo" are not stored in the same memory address, nor were they typed in the same number of milliseconds over the same USB packets, why should the ASCII table internal detail matter and those details not matter?
- The man spoke to God, saying he had made poor decisions.
- The man spoke to God, saying He had made poor decisions.
This kind of gets at what I think is the big advantage of learning a bunch of languages: it gives you instincts for which things are minutia and which aren't. The things you listed that every language has but does differently, which are annoying to figure out and remember, that's the minutia.
Lol - I remember years ago bouncing through javascript, python, lisp, prolog and others, all using ";" differently; then coming back around to C, and despite once knowing the spec by heart and having written C parsers, writing some one-line test programs... because I just could not believe that semicolon was a statement terminator - it looked so "this just isn't right". :)
> [syntax]
But when swapping languages, I had more trouble with cognitive interference on higher-level constructs. Syntax can go in cheat sheets[1], and idioms gathered in example files. Badly organized and incomplete documentation (once common before the programming community exploded in size) can be overlaid with tables of contents and notes. Because remembering how to find things in each languages' documentation was for me a major pain. But for designing say large apis, you have to remember things like some type-system path does look pretty... but only until you hit some language-misfeature monster that lives on it. And also not shy from some approach because of a misremembered or misattributed gotcha from another language. Though maybe that's easier now with so much discussion of best practices, and so much code available to read.
> cheeseburger and lasagna [...] they all get your belly full.
Or alternately, that they're all shambling toxic wretchedness, but you choose the one which seems likely to poison the customer the least, cooking it as well as circumstances permit. Cockroach popcorn and fried millipedes can be tasty. And even with swill milk... gypsum plaster is non-toxic... it's the other adulterants, little nutrition, and absence of sanitation that burn you. I do love programming, but I so look forward to less crippling languages.
[1] http://rigaux.org/language-study/syntax-across-languages.htm...
This becomes less useful when it's "which library do I use" or "what is the idiomatic way to do this in X language".
After lisp I've lost the idea of syntax as of an inherent part of language. You know, all that stuff, that lisp's s-expressions and their memory representation are mapped into each other seamlessly lead to a conclusion that any of them is not important, there is an abstract idea of a lisp object while conrete representations of lisp objects are just some practical ways to deal with them in different situations.
So the official language syntax is a one of the practical ways to represent ideas using that language. The most of languages do not bother to have a second representation, but it doesn't matter. Syntax doesn't matter. You can learn it on a whim in a half an hour of leizure reading.
You might just throw down whatever and let the next compile/interpretation cycle let you know if you didn't get the syntax right.
[1] https://pragprog.com/book/btlang/seven-languages-in-seven-we...
[2] https://pragprog.com/book/7lang/seven-more-languages-in-seve...
It made my son more frustrated when he was first starting.
So, that part is difficult to replicate.
Setting that aside, Erlang finally helped me understand what functional programming is about (I'd tried and failed to grasp Lisp on a few occasions), taught me the value of immutability and asynchronous message passing, really opened my eyes to the fact that there's a vast world outside the tired Algol family tree.
Sadly, pattern matching and immutability have made it very hard for me to enjoy programming in other languages. Most of my development work after that has been in Python, which is not only the least exciting language I've used in a very long time, but also lacks most of what I came to appreciate about Erlang.
Erlang's constraints (primarily immutability in this context) makes it so much easier to reason about and troubleshoot code.
It's also a good language for helping get opportunities to talk at conferences. People keep hearing about it without knowing much about it, so those talks tend to be well-attended.
Elixir is a perfectly acceptable language, although the syntax and other design choices turn me off, personally. Erlang is a very concise language and helps me think in Erlang; anything that looks like Python/Ruby/C/Java/etc just feels wrong now.
Recently I started a side project with the deep learning part in Python and the rest in Haskell. I ended up just week ago converting the Haskell part to Common Lisp. Much faster dev, but I have been using Common Lisp since 1982.
I think that's the bottom line. The creator of Haskell confirmed and explained: https://youtu.be/iSmkqocn0oQ?t=22
The best thing (for my own learning) I ever decided to do was learn Haskell. I have never been paid to write code in Haskell but it gave me such a confidence with languages that I don't think I've seen any language features in any other language that has ever surprised me or that I felt like I couldn't learn. Haskell and it's language extensions will expose you to many many different ideas. It helped me learn Rust, I feel like I can read ocaml, any other functional language doesn't feel like a stretch to read, etc
So, don't just learn many languages. My advice would be to pick languages across paradigms and learn them. Don't waste your time learning 5 object oriented languages.
It's crazy how easy it is to learn how to pattern match well enough that you can build really useful stuff while still not really understanding what you're doing. Human brains are amazing.
Haskell sounds super cool, but it seems like nobody really uses it to build things on the web. They mostly just talk about how it "helped them think".
Depends on how you'll use C#. If you'll write Java-style OOP, you'll indeed learn very little. But C# offers much more than Java: generics, FP, LINQ, async-await, dynamic, native interop, unsafe and pointer arithmetic..
Metaprogramming / what OOP could have been / interesting error handling: Common Lisp
Static Types/FP: Haskell (or Ocaml)
Logic Programming: Prolog
Untyped FP: Clojure (or Scheme)
Actor Model: Erlang (or Elixir)
CSP: Clojure w/ core.async (or Go)
GUI Development: Lazarus (or Delphi)
For instance, I now use many of the functional techniques I’ve learned in JavaScript to write less, easier to read code instead of more loc of imperative code. I’ve also worked at a company that had many functional patterns implemented in php, and frankly made the language quite decent.
In terms of the time issue, I spend about 15 minutes a day just before bedtime learning new languages. I probably manage to do this 4 days out of every 7.
Do you find this actually works? Personally I've read entire books for a language and then gone to write some code in it and realized I knew almost nothing. The only way I've found to learn a language is by writing it.
Oooh, got any examples?
https://phptherightway.com/pages/Functional-Programming.html
https://github.com/mtdowling/transducers.php
Don't forget putting a function into a function, gives you behaviour polymorphism at runtime, without inheritance or class based dependency injection
[0] https://www.sicpers.info/2015/06/protocol-oriented-programmi...
This taught me to take any programming language recommendations from HN with a huge quantity of salt and also mostly ignore Kay-style OO purists.
> I found a mediocre and pretty error-prone language.
makes it seem like you didn't get a chance to dive down into the runtime and how the message-passing model works. FYI,
> Apple unceremoniously flushed it down the drain...
this is not true at all. Most of the code that Apple themselves writes is Objective-C.
Gang of four book was written with Smalltalk and C++ examples.
Back in the 90's we had Mac OS PowerPlant, CSet++ on OS/2, OWL/VCL/MFC/ATL on Windows, Motif++ on UNIX, Telligent, and a myriad of ORM, distributed computing, image libraries and what not written in OOP C++.
Then came Java, took the best practices out from OOP C++, and two decades later 90's C++ is known as Java OOP and people act as if C++ OOP never happened.
> Most dreaded means that a high percentage of developers who are currently using these technologies express no interest in continuing to do so.
Playing with a different editor gives me ideas for different workflows and shortcuts which my main editor already supports. Playing with a different programming language shows me how powerful X is which I never touched in my main programming language.
The focus on learning and exploring an alternative is more powerful for me than mastering that alternative. I get the greatest benefit with a relatively smaller investment that way.
Maybe instead of learning more programming languages, just pick small bits of something to explore.
This might make for an interesting app (which won't make money.) Create a sort of "useless but interesting facts" type of app for programmers. Allow people to submit "cards" with something on it and then up/down vote on the card. The snippet could be a term, clever code, or anything bite size. The programming equivalent of "how to say ck in Klingon."
The conceptual differences between a desktop GUI app, a command line app or a web app are much bigger than between say functionally similar web apps implemented in three different programming languages. A business app based on a relational database is fundamentally different from say a game, even if the language is the same.
I wrote some data automations recently for a client. Here are the languages and DSLs that ended up in the mix: cron, Makefile, bash, sed, regex, jq query, python, R, sql, nginx conf.
I think especially if you're a vertically scaling kind of gal, and you have a fondness for conciseness, parsimony and efficiency; you'll just end up attracted to many language solutions. I just think there is no better way to write less code or keep the semantics of your language more relevant to the task in hand.
And also anyone who could replace you will have to know all these languages. Nice approach to job security.
For a programmer with a minimal amount of linux experience, it likely takes a week to catch up to what the codebase is doing with these.
> regex
There are good tools to destructure regex.
> python sql jq query
I consider those as "given" or "learnable good enough in a week"
> nginx conf
Don't know this.
Overall, "knowing all these languages" seems overblown in the choice of words for me. Java, Python, Prolog and Clojure? Hell yeah that would take quite a developer to replace! But the above? There is 1 proper general-purpose language in there, the rest are well-known tools with great examples online.
That will depend on what the GP has done with SQL. Also, JQuery implies in Javascript. There are up to 3 general-purpose languages in there, one of which nearly any developer will know.
There should be plenty of people capable of taking the codebase, but it's not a trivial single language case. The upside is that good developers will be overrepresented when compared to the population that knows one of Python or Javascript.
I am sure they built their UI with SQL - as opposed for example simply doing some queries, or some joined procedures at best.
> Also, JQuery implies in Javascript.
With uttermost likelyhood, they did not only dynamic changes of some html-documents there, but also their backend and crypthography.
Enough with the snark... ("Language" is such a fuzzy term anyways. You could go as far as to label any interaction with a computer as one - there will always be a protocol according to which the interaction happens.)
> There should be plenty of people capable of taking the codebase, but it's not a trivial single language case. The upside is that good developers will be overrepresented when compared to the population that knows one of Python or Javascript.
I still stand by my point. As far as the cost of polyglotism is concerned, that is a one-general-purpose-language-codebase and the rest being DSLs (apparently R too). There are other codebases where there are really 2+ languages. I.e. some functional lang on top, some performance critical code hand-written in C, some logical programming language to do some constraint programming. Each of those 3 takes quite a lot experience.
I could learn Swift in a week but that doesn’t mean I would be a competent iOS developer.
Someone who knew Python couldn’t do anything useful with the type of automation that I do with Boto3 without knowing the intricacies of AWS.
Multi language solutions make sense with languages that specialise. So I'd never write in "Go and Java" for example, or "Clojure and C#" or some other pair of general purpose languages.
For me, Python usually ends up being the glue. But otherwise, I use a tonne of special purpose stuff. E.g:
AMPL
Prolog
R
Lua
SQL
sed/awk/grep/jq/etc
C++
Makefile DSL
cron DSL
Docker DSL
etc.
My point is that the cost could've been much smaller.
In summary: There is a "too much" and a "too few" when it comes to the number of tools used in a project. Where in that spectrum the OP is falling, we can't possibly know without knowing more details. Maybe the cost could have been smaller, maybe they hit an optimum and costs couldn't have been reduced by fewer tools (or more tools).
Still, bash and (most likely) sed could've been easily replaced with Python.
In my opinion, engineers should have an ample toolbox for much the same reason that a good carpenter has a tool for any given thing.
If well tooled engineers is what you’re after then you’ll be replacing one with another; with few surprises.
(R is perhaps the exception, but it does actually work really well here, because it's the best tool for certain kinds of table mashing and chart creation.)
Little command line tools, sqlite and short, focused programs all tied together with a makefile is a really nice way to arrange a data processing project.
You end up with lots of intermediate output tables to look at, each of which is produced with a small step. This makes for easy testing and debugging.
There's a question I really want to ask HN related to this.
In the compression challenge (how well can you compress this data), the forbidden cheat is to put all of the data inside the "compressor/decompressor" and have the data be a single bit. The way to block that is to mandate that the total size is compressionTool+data size combined so you can't just move the data around.
So is there anything like that for comparing programming languages? If something is "easy" because it's implemented in a large runtime environment you have to ship as well, that's cheating. If it's easy because the language is powerful and well designed, that's not cheating.
If you like "conciseness, parsimony, efficiency", is the entire Python stdlib and the entire R library and a SQL engine and NGINX consise just because you hid all the implementation details in them, and they let you write your "compressed data as as a single bit"?
The purpose with multi language programming is articulating your solution the the least amount of code .
Covering a larger volume of concepts is what should be the emphasis. That is definitely useful, maybe even more useful than just memorizing stock algorithms and data structures, especially if you engage with the mathematics behind the languages.
Learning Rust for example gave my C and C++ a noticable boost, just because Rust made some topics unavoidable that I managed to subconsciously avoid for years when it comes to C, C++.
If you only want to work on C#, you're limiting your mobility here.
Personally, I never get bored because there's so many interesting projects in different languages.
Yep same here.
As far as knowing a modern framework and an ecosystem around the language to do something useful, I would take C off the list. I haven’t done anything useful with C since MFC/Win32.
If you want to do anything with the web, you have to know Javascript. C# is my favorite “serious” big project language but it’s way too heavyweight for simple scripting. For that Python is my go to language.
But, I’m not going to spend my limited free time learning any new technology that doesn’t directly help my career.
In an ideal world, knowing data structures and algorithms would get job interviews, but without being able to at least speak to some specifics of the language being used, a good number of HR departments will screen you out before you’ll get to the data structures and algorithms part of an interview.
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
Isn’t that useful or how to invert a binary tree.
I would much rather you show some competence in the language we are using. Knowing leetCode isn’t going to help if we need an iOS app....
Knowing algorithms and data structures pretty well, is the difference between an update button taking a couple of minutes, or milliseconds.
- Is your customer in Asia and your servers are in us-east-1? Do we need a multi master database one in each region? Can we make even that faster by doing an eventually consistent write?
- do we really need a synchronous update process or can we use queues to make it more consistent?
- is our web server slow? Should we scale horizontally or vertically? Should we use autoscaling and if so which metric should we use? What should our cooldown time be between autoscaling events? Do we need to autoscale across regions? Where is our traffic coming from?
- is our database indexed properly? Did we look at our slow query logs? Did someone do something stupid like have triggers on our database unnecessarily? Is an RDMS the right choice? Do we need to denormalize the table?
- or is it our code?
This is the thought process my manager was looking for when he interviewed me. Not the best way to traverse a tree.
That happens if you learn many similar languages, which is a waste of time. You have to learn languages in different paradigms to learn new things and discover languages that have nothing in common.
> At some point it’s time to stop learning 20+ languages and start building stuff.
You can’t learn a language without building stuff.
C/C++/Rust/Ada on bare metal or systems work for building abstraction upwards from the hardware.
Clojure/Scheme/Common Lisp/Racket: A good dynamic language that's extremely composable, to build abstraction downward from human logic.
ML/F#/Haskell: Powerful type systems that can layer abstraction on abstraction.
I have no experience of the following, but I imagine at least cog and erlang belong to similarly mind-expanding buckets.
A high performance systems language: Asm/C/C++/Rust
A garbage collected language (JIT or compiled): Java/C#/Go
A scripting language: Python/Perl/Ruby/Lua
I think one from each bucket and you'll be able to excel anywhere.
Does author has trouble with discipline?
You don't get anything by learning more and more programming languages. Programming languages are tools, be expert at 2 or 3 languages and that should be enough. Learn anything more to solve a specific problem.
You understand the crux of a language by being expert at it not by "me too" novice at it.
Let's not pretend "knowing" a language well is akin to a 10-year-journey like some arcane samurai art.
If you
- could build an interpreter for a minimal version of the language
- can expand most syntactic sugar into more minimal constructs of the language
- can reason about the language in usual PL terms (call-by-value/call-by-name, pure/not-pure, strictly/dynamically typed, ...)
- know the 5-10 most important milestones in the history of that language
- know the standard libraries so that you don't repeat code that is written there,
then what use is there to master a language further? If someone is experienced in language learning, the above can be accomplished for nearly any language in idk, a year? At that point of mastery, it makes much sense to learn another way of thinking instead of memorizing the official language specification verbatim.
A programmer with 3 completely different paradigms to think in will be much more effective than one with just one paradigm to think in. Time is much better spent learning new paradigm than to gain that last bit of mastery.
Most of the time it tends to favor developers who are the most distracted by the newest and shiniest trends.
It is helpful for any dev team to have 2 or 3 programming languages in their toolbox that they can use to solve their problems. Any discussion about adding a new language to that toolbox would need to involve discussions about QA, deployment and long-term supportability. Unfortunately most developers are less concerned about those "non-technical" aspects.
Sure, learn one or two languages from completely different paradigms than what you use daily, to broaden your mind and seed stuff in context. But the... STOP! And get more projects finished faster and better instead, you'll learn 100x faster this way, and learn more useful things.
Then learn some time management and communication skills...
What we need, most of the time, is a good library tailored to solve a specific problem (string manipulation or complex maths could even be done in BASIC or asm with a powerful dedicated library)
Creating a new language is like forking a code base.
Because of knowing many language helps me a lot. Example, the import module system of Python is amazing. I'm not a fan of it at all but I really like how it were design. When I come to Ruby, I think Ruby need some love for its module.
Or JavaScript binding? Even if arrow function, it does has place you cannot avoid writing `.bind(this)` and you ask a question why we have to do this?
Then come pattern matching of Elixir/Erlang and it blows my mind and I just want to have that ability every where.
Then come Elm/Hashkell or any language that use `whitespace` instead of commma/parenthesis and I just love how natural these language read.
``` hello(username, country) ```
compare with
``` hello username country ```
The more I learn those languages, the more I appreciate the people who invented these and always thinking of different way to do thing.
And once you know enough different languages; design and build your own [0], even if no one will use them.
The whole “10x programmer” thing probably is based on warped ideas for the most part, but I would guess that if you have a colleague that’s ten times more productive than the rest of the team it’s because they understand and can reason about parts of the stack and machine others can’t
I wrote a trivial amount of Haskell, and it still changed how I write shell scripts, which I didn't expect at all.
My day job is embedded systems programming for aerospace, so it's almost entirely C/C++ with some tooling in Python.
Works with many Prologs, too.
Few examples to illustrate my point:
- Having some experience with strongly typed language makes Python developer a better and safer programmer. Compare with Python developer who is not even aware of the weak vs. strong typing issues and all the related gotchas. Well worth the investment.
- Having seen the ease-of-use and power of some data structures (e.g. Python dicts) not natively available in C may suggest to C developer to look for libraries that implement something similar. 10 minutes playing with Python may end up saving countless man-days on a large C project.
- Having even minimal experience with NOSQL DB may suggest to a DB admin that handling unstructured data on their Oracle cluster may not the best way to go.
- Having seen FPGA latencies may suggest to a Java developer not to bother with the software that will be competing on latency.
The list is endless. I guess my main point is: even approximately knowing what's out there helps you make much better decisions, where decisions may be anything from picking the right approach in your area of expertise, or picking up a different tool if you need to, or telling your boss to hire the right person, or even not starting on the task due to lack of right expertise.
It’s best, actually, to learn all five of Python, C/C++, Java, Perl, and LISP. Besides being the most important hacking languages, they represent very different approaches to programming, and each will educate you in valuable ways.
But be aware that you won't reach the skill level of a hacker or even merely a programmer simply by accumulating languages — you need to learn how to think about programming problems in a general way, independent of any one language. To be a real hacker, you need to get to the point where you can learn a new language in days by relating what's in the manual to what you already know. This means you should learn several very different languages.”
Studying languages help you way more than just providing you one more choice for the language of the next project. That’s precisely what this blog post is about.
"One [language] to rule them all."
There's not that much value in learning yet another imperative object oriented language. If you want to put the field of programming into perspective, Prolog is even more alien than Haskell.
That said it will probably enbroaden your mind tenfold.
If you have thousands of hours doing language A, you need several thousand more to meaningfully improve your competence. It’s basically just battle scars from experience at that point.
But if you spend just a few hundred hours on learning a completely different language, that gives you a completely different set of brain tools for working in your day to day language. It’s not a luxury for a js programmed to be able to spend a hundred hours on trying rust or Haskell. It’s a cheap way of becoming a better js programmer without having to spend a thousand hours more on js.
That is language influences (weak version of the theory) or determines (strong) how you think. A perfectly cromulent proposition.
Ineluctably leads to arguments around the relative benefits of deep specialisation versus a T-shaped skill set, which in turn invites bureaucrats to make us all uncomfortable by injecting regrettable phrases like 'generalised specialist' into the vernacular.
Often if trying to pick up a new language in my spare time, I can get to a stage of learning the syntax, but if I do it by following a "101" tutorial, I'll end up building another To-do app or whatever — it's very hard from an "unknown unknown" position at the start to find the path into idiomatic "X" that will show you the unique features and paradigms of the language.
Should people also read the instruction manuals for appliances they have no intent of buying?
An applicance maker should do that, to find ideas to steal. That's about it.
When it comes to learning for the sake of learning, there are more wortwhile things in the world. Learn a foreign language, for instance.
- sell.
- design.
- write better.
- tell a good story.
- get along with people.
- do proper SEO.
- speak another natural language.
- model and query data.
- understand ML/AI.
This is coming from somebody who though himself 10+ programming languages.
Learning Elixir has opened my OO-biased eyes to the new and interesting world of FP. Knowing the theory isn't enough, you have to code it to grok it!
But the main reason I do it is because I think it's just good fun :)
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.
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.
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).
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.
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.
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".
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.
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.
Unfortunately not everything gets done, or paid for, during work time.
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.
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.
<?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)]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.
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...
How much of that can a C++11 compiler do for me?