r/learnprogramming • • Feb 08 '19

Two mistakes that trap new programmers

Most aspiring programmers get trapped and fail to move forward. As a teacher, I get to observe how some programmers keep moving forward. Here's two signs you are trapped.

Trapped coders focus on anything but coding.

Trapped programmers love to debate which language or framework is best. They spend their time figuring out what to learn and end up learning nothing at all. So let me answer all your questions.

Learn Python.

But what if I need to learn C#?
Learn C# after.

Isn't Javascript the language of the future?
Learn Javascript after.

My developer friend told me I should learn C++ because all languages are based on it.
Learn C++ after.

New programmers fear they could be wasting time learning the "wrong language". Programming is the fastest industry in history. Good developers learn new languages and frameworks on a yearly basis. Three years from now, your knowledge will be outdated. If that scares you then find a different career.

Trapped coders following directions too well.

Trapped programmers follow tutorials like mindless robots. Copying pasting code doesn’t teach you anything. Imagine starting a python tutorial that taught you how to print “hello world”.

print(“hello world”)

Most people copy/paste this and move on. If you were my student, I'd push you farther.

  1. Change the code so it prints “howdy”.

  2. Print two alerts. One that says “whats up?” and “take care”.

  3. Continue with the tutorial (usually goes to variables). After a few problems, print “hi” from mental recall.

  4. Since we probably encountered variables by now, what will the code print below? Why?

    greeting = “howdy”
    print(greeting)
    print(“greeting”)
  5. Fix the code below so it prints “hello”.

    Print(hello)

By the end of my exercises, you would have a strong idea of how print statements work. A simple line of code can create a myriad of problems. Most people brush past it only to get stuck in the future. I always recommend finding a school or mentor for guidance. If you can't do that, be proactive with your learning and keep at it.

Good luck!

1.7k Upvotes

349 comments sorted by

View all comments

Show parent comments

34

u/antiproton Feb 08 '19

The advice should be “just pick a language.” Not “pick Python”.

No. The advice is good. Because "Just pick a language" doesn't resolve the question of "which language is best". Beginners need to learn how to code. The best language is the language that teaches you how to think like a coder.

Ruby doesn't have nearly the resources that Python does and Javascript is an "easy learn difficult to master" situation.

Only people who already know how to code suggest absolute beginners learn things like Ruby or JS.

-13

u/PC__LOAD__LETTER Feb 09 '19

Disagreed on all points. There’s a metric shit-ton of Ruby documentation out there, and Ruby or JS are both fine languages to pick.

Only people who don’t really know how to code with anything other than one language that isn’t Ruby or JS would suggest that you can’t learn to program with JS or Ruby.

11

u/Zerocchi Feb 09 '19

I write in Ruby more than any other languages these days. The language is lovely and expressive but I would suggest beginners to stick on Python first since Ruby sometimes can be confusing due to its expressiveness and "more than one way" of doing things.

1

u/BadMinotaur Feb 09 '19

Don't most languages have "more than one way" of doing most things? I don't think that's a situation unique to Ruby.

7

u/Zerocchi Feb 09 '19

Python often encourage people to use one way to solve problem. This is from The Zen of Python:

There should be one-- and preferably only one --obvious way to do it.

While Ruby let people express themselves on how to solve the problem. As a beginner, you want to focus on learning first. So you want your solution to be consistent with others. Python is a good tool for that.