dwyl / start-here

:bulb: A Quick-start Guide for People who want to dwyl :heart: :white_check_mark:
https://github.com/dwyl/home
1.75k stars 105 forks source link

Which programming language would you learn if you were starting today? #141

Open ghost opened 7 years ago

ghost commented 7 years ago

Today there's a lot of new languages, what would you choose?

kfern commented 7 years ago

Javascript & nodejs

emersonmellado commented 7 years ago

Javascript, Python or C#.

YvesMuyaBenda commented 7 years ago

My choice was based primarily on which languages have the best pedagogical material for teaching one to think as a programmer: so, Racket, Ruby, Smalltalk, Logo, Eiffel. Haskell, Mozart, Python, Shen (different flavours of functional programming basically, basically I see everything from the background/context of functional programming). When one gets into stuff like Javascript, a lot of the functional programming ideas can be seen to derived from prior ideas in the canonical textbook in functional programming (after all Scheme was supposed to be one of the dominant influences on Brendan Eich in constructing the language). The thought was that the most difficult step is the thought process that allows one to methodically construct programs. How important is it for a programmer in their first steps to form a coherent model of programming? I still think the best introduction to functional programming bar none is How To Design Programs which includes within it the specification and testing of programs.

I reckon though that a person would gain a lot by just reading a good introductory text in some of programming langauge above over, say, a year, if they do not want to push too hard. The context gained would allow a lot more things to fall in place easily later, as opposed to madly searching for specific tutorials all the time, where everything fits into place would just be "known". It it has taken me a while to piece together a lot of different elements, and I find myself reading and learning something from an introductory book on Perl "Elements of Programming with Perl"

But the final answer to the question for me is: it depends, it depends on a large number of things which are different for each individual. The process above would likely take too much time for most people, as they would like to get stuck in building stuff to showcase to others.

YvesMuyaBenda commented 7 years ago

Actually, if I was going to do everytihng all over again, the book I would start with is Harley Hahn's Guide to Unix and Linux. For one thing, going through the book teaches one how to read documentation! After reading the book, I instantly "leveled up", where before almost all the time Linux was mentioned it was all vague and mysterious and I did not know how the pieces fitted together, and the book is one of my top examples for how to write docs, tutorials, readmes, etc--the examples the dude uses are just so delightful.

sohilpandya commented 7 years ago

I would actually like to say that Swift is probably a really interesting and a good language to get started with.

It is open source 🌟 and Apple has created some amazing resources for learning it.

ghost commented 7 years ago

I really like this answer @nelsonic gave last year for this question: https://medium.freecodecamp.com/what-programming-language-should-i-learn-first-ʇdıɹɔsɐʌɐɾ-ɹǝʍsuɐ-19a33b0a467d

YvesMuyaBenda commented 7 years ago

From my point of view, the main problem with Javascript as a first programming language is the problem of "overwhelming choice"; in that a beginner to programming would have to make an almost neverending sequence of choices at the time when they have the least amount of experience to make sound judgements.

There is overwhelming choice within the language itself ---what style do you want to use? Simple imperative programming where you are mutating variables with stuff like for loops? Functional programming style with higher-order functions? Shall we pretend that Javascript is Java and mimic Java's OOP? Should we try to learn how prototype-based OOP differs from the classical? What subset of Javascript should we call the good parts and use a linter to enforce? These choices create significant barriers in quickly being able to read other people's code.

As well as overwhelming choice in external libraries--Just which library should we use to do testing? Do we want to do property based-testing? How are we going to implement the concepts of modules in Javascript? How do we structure Javascript applications? What is the best way of documentating Javascript code? Asynchronus Javascript what is that?

The overwhelming choices puts the beginner either in the position of consuming large quantities of hours to answer basic questions to do basic stuff, so as to develop beyond the very first introductions of using variables and for loops and whatnot, or having to lean upon a community of experienced people who simple "know better". Leaning upon a community of people who "know better" depends upon other people exerting significant efforts and time to fill in the pedagogical black-hole that Javascript exists within, e.g. which introductory book on programming using Javascript introduces the writing of specs and testing from the very beginning and not as an after thought? It is not so much that explanations of basic concepts are missing (you can probably find Medium posts that nicely cover various aspects of Javscript), more what is missing is an escalating sequene of exercises and projects. For example, one of the things that mark "Eloquent Javascript" as not a beginner book is the lack of exercises. Sure, one could supplment with codewars but what codewars lacks is sequence, that which Exercism attempts, but ya know, a good book with a nice sequence would likely save someone months of time, many many months.

nelsonic commented 7 years ago

https://stackoverflow.blog/2017/09/06/incredible-growth-python/

cwonrails commented 7 years ago

I'm a bit biased here since I specialize in sysadmin work, but bash (or the command line generally) is a great way for people to get involved in and begin to understand programming. The 'everything is text' Unix approach really changes the way you think about programs and programming generally. Having to do basic things like cd around, type git commands manually rather than through a GUI interface in your editor/IDE (no hate on that though! we all do it!) yields substantial, continuing dividends. I also think gaining a thorough knowledge of HTML, not just what it is but why it is that way is very valuable. It's easy for beginners to throw in the beginning of HTML5 Boilerplate and not know what the meta tags mean, which are things that really matter ultimately when building a web application (see: Twitter cards and so on.)

With all that being said, I believe others who've suggested Python are right on the money in terms of what used to be thought of as the "Ruby or Python?" choice during the earlier days in CS courses, with Python clearly having won out (IMO). However, for me the best choice would be... go.

go is simple, has an extremely strong stdlib, relies on / references basic Unix concepts (like those described earlier), and lets learners (1) build very small projects to solve very simple problems, (2) allows learners to import their earlier work into new projects to continue building on and refining those earlier concepts, (3) is being rapidly adopted by many startups and large companies (4) will leave the learner with a stronger base knowledge of CS concepts than most any other "first language" except for Python (as others have mentioned, though I'm curious about the 2/3 divide in learning and have no original thoughts to offer there), and (5) is quite frankly where the future of distributed systems, microservices etc. are heading (TJ Hollaway has been doing some outstanding work since his switch to go, which is notable given his historical role in node's development.)

I'll close with this quote from the creator of node.js:

screen shot 2017-09-11 at 9 04 24 am

Don't get me wrong; I'm currently working with React (or trying to) and really like the system @dwyl has laid out, especially the choice of Elm (which seems lovely and like something I need to learn), but there are far worse places to start with than go.

YvesMuyaBenda commented 7 years ago

Hello @cwonrails I too have written about how the command lines basically forces you to deal with certain essentials.

Audrey Lim has made a clear case for Go as a language for raw beginners here: https://www.youtube.com/watch?v=fZh8uCInEfw The thing about Javascript is, it has to be confronted one way or another, at some point in time or another, if one is interested in web-development. My main thought is that as a first programming langauge, a raw beginner is pretty much left hacking through a jungle of not-quite definitive resoureces. Python has been long adopted by academia, so there are many excellent introductions, and there are langauges such as Scheme, Lisp, Haskell, Smalltalk, Logo due to often being thought of as "teaching languages" have many an excellent teachings. Also, the Ruby community went over and above in providing a wide variety of materials. Elixir looks so nice and clean but it is very young, and the community cannot compete in terms of raw teaching resources, and Phoenix is proabably quite easy to get into with those with significant web-development experience.

What "very small projects to solve simple problems" do you have in mind that Go allows one to easily do that other langauges do not? The basic argument for Go--as put forth by Audrey Lim above--is that it is a relatively simple and clean language that forces the beginner to face certain CS fundamentals early. e.g. runes and how strings work for, and pointers.

I was thinking along the lines that Go being a relatively simple and clean language combined with its significant standard library presents unique opportunities for learning by reading significant code that does significant stuff, something like being utterly immersed with the imperative programming paradigm, but not having to learn assmebly, though I have not even began to dabble myself. What I am looking at though is this bottom-up approach might really help to have a clear conceptual model of web-development, where you are essentially bulding up everything with your bare-hands, so web-development in Golang might be a useful first step as there are courses that teach web-developement with no "magic".

My own particular biaseses tend to lead to a functional first approach though, which would be learning from the top-down as opposed to Go's bottom-up approach. But as I said before, there are so many variables at play in the choice of langauge, that it is for the individual to weigh their own choices relative to their own puproses, where the words of more experiences people is merely a guide and not a subsitution for one's own thinking.

nelsonic commented 6 years ago

I often return to the question of "Which Programming Language?" 💭 I keep looking for a reason to "dive" into Haskell, Rust or Go. 🙄

But when it comes to building Web Applications with that require a "Backend" (Server), Elixir still "wins" because it's really easy to write, has built-in formatting and testing and the fact that it compiles to Erlang VM gives it unparalleled "fault tolerance" and low-latency.

https://www.slant.co/topics/1565/~best-server-side-programming-languages image

in 2018 I would still recommend learning/using Elixir for building "Web Apps". https://github.com/dwyl/learn-elixir And if you need an excellent Web Framework to get "up-and-running" fast, Phoenix. Try the "Phoenix Chat Tutorial": https://github.com/dwyl/phoenix-chat-example

That said, I don't think anyone can "escape" learning JavaScript (because it's everywhere!!) And to that end I've been working on a comprehensive "beginners tutorial" for learning JavaScript by building a "real world" App following TDD: https://github.com/dwyl/learn-elm-architecture-in-javascript/blob/master/todo-list.md 😮

Evan Czaplicki's recent Elm Europe Talk “What is Success?”, describes how complete beginners go from zero knowledge to building apps with Elm in a single session: https://youtu.be/uGlzRt-FYto?t=15m45s And since Elm can be used to build incredible front-end Web/Mobile Applications and Games I would suggest that as soon as you know basic HTML & JavaScript, Learn Elm! https://github.com/dwyl/learn-elm

I plan to come "full circle" and write a tutorial for Python because it's still the best for "Scientific Computing" ... but it's not currently on "The List": https://github.com/dwyl/the-book/issues/69 ... You can use Python for most of the things that you can use Elixir or JavaScript (Node.js). The only reasons I'm not using Python for my current work are:

  • WebSockets are much better in Elixir (we're building real-time apps!)
  • Error handling is better in Elixir (we really like fault-tolerance)
  • Elixir has a "macro" system that allows us to write much less code an achieve more result.

Conclusion

For a complete beginner this is "order" you should learn things:

Once you have covered the basics of the first 3 languages, you will know enough "codefu" https://youtu.be/xki0NZ_enpQ?t=7s to "Make something people want". Then it's a "natural progression" to where-ever you chose to take it. https://youtu.be/WNnGXXlPzuo?t=2m

YvesMuyaBenda commented 6 years ago

@nelsonic You write informative posts! Thanks for giving the benefit of your experience!

YvesMuyaBenda commented 6 years ago

Only thing I would add is that the what to learn part of the equation is significantly easier than the how; in that some people will have processes --most likely unconscious--that determine how they go from newbie to ninja (to use the modern internet hyperbolic parlance!) relatively efficiently.

For example, the McMaster Outreach program spoken of by Czapliki, the one that allowed children with no experience to get started with Elm was dependent on specially created materials which are much more effective teaching/learning tools than the everyday programming language tutorial.

nelsonic commented 6 years ago

@YvesMuyaBenda totally! Writing beginner tutorials which get people up-and-running with a language/concept is time consuming but hugely worthwhile. As soon as we have finished our current (client) project I intend to dive into our HTML and CSS examples. I plan to write a “meta” tutorial where the learner first builds their “portfolio” or “showcase” website where they list the skills they are going to learn and then learns all the skills. 😉

YvesMuyaBenda commented 6 years ago

@nelsonic You the man! The effort you put into helping others is commendable!

YvesMuyaBenda commented 6 years ago

@nelsonic What do you think of this diagram as a model of learning/teaching/documenting?:

For myself the diagram fine-tunes the process of learning in software development described by Edabit

Also, since producing effective materials for starters is time-consuming and labour intensive, then I think the above process has two applications:

  1. Give starters a process to document as they incrementally learn the language.
  2. Give a more experienced person a set process for incrementally writing documentation

The advantages for for the first application is that starters are best in a position to create materials for other starters, creating documentation as they learn. The advantage for 2, is that the incremental approach allows a more experienced developer to break down the task into small, not so time-consuming steps, creating usable documentation that grows incrementally.

Also, if the troubleshooting step includes testing, then one would get incrementally growing documentation that gets tested, reviewed, troubleshot, etc at each incremental step, similar to what is considered good practice in software development (small increments that are tested).

Oh and since one proposes an exercise first, one has a kind of TDD cycle applied to learning/teaching/documenting, which would have a use of allowing the person to practice the mindset in an entirely different context than in using software tools.

I need to run some experiments myself, but that is the gist of my thoughts!

Source: http://www.troubleshooters.com/bookstore/rl.htm

nelsonic commented 6 years ago

@YvesMuyaBenda good diagram. I would add an optional "show examples of end result" and clarify why learning the new increment is useful either in itself or as part of the grander project.

YvesMuyaBenda commented 6 years ago

@nelsonic Sure, I was thinking of it mostly as a good skeleton to structure the overall process.

Oh, and it actually provides a process to read technical books, and turn them into docs, or read docs and turn them into learning materials!

YvesMuyaBenda commented 6 years ago

Here is another version of the diagram, giving more details:

Source: http://www.troubleshooters.com/tpromag/200101/200101.htm