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

8

u/blindgorgon Feb 09 '19

It’s not, though. It starts strong and then provides a huge straw man for devs to get hung up on, while also damaging his credibility because of obvious bias. It’s not that he’s empirically wrong, it’s just that he’s communicating the underlying concept in a poor (and kinda dumb) fashion.

I have 0 reason to learn Python, and when he adamantly stated it I was like, wtf. 🙄

He should’ve encouraged devs to pick one—any one—that they’re interested in, and learn it.

An interested dev goes much farther than a disinterested one.

Edit: typo

22

u/pixeltrix Feb 09 '19

Well I think their whole point was rather than having decision anxiety, which many new starters do, just learn how to code in python. Once you understand the basics, it is transferrable to your next language.

I started learning C in college, which didn't really stick. Then I learnt C++ at university, again didn't stick. Started learning python to help with my work and I found it extremely easy to get up and running. After getting confident in it, I'm now proficient in C# and getting started in C++ again, which I'm loving.

I guess what I'm saying is, not everyone is ready to learn proper programming techniques, but everyone should learn them. Give them a taste of what you can do with coding, which python has one of the largest hobiest info bases on the internet, so everyone can access something they would find useful. Then once they get hooked, they can dig a little deeper into theory and start to branch out into other languages.

-1

u/blindgorgon Feb 09 '19

Yeah, I agree with his point, and if you have devs that are pretty equally open to all languages, then sure. Learn Python first.

I just think his presentation of this tactic is poor. It comes across as bias toward Python, or even compiled languages. It’s relatively easy to make a whole career on JavaScript, or Ruby, PHP ... &c.

Yes to learning good coding conventions. Also yes to discovering what your students care about and helping them run with that.

7

u/FoolishDeveloper Feb 09 '19

He should’ve encouraged devs to pick one—any one—that they’re interested in, and learn it.

Saying "just pick one" or even "pick one you are interested in" does not resolve the issue of language selection anxiety. Making the selection for them does. The point OP is attempting to take the decision out of their hands so they stop wasting time on it. You just put language selection back in their lap with added task of contrasting and comparing their interest level of languages they do not know. Yeah, that'll fix it.

1

u/blindgorgon Feb 09 '19

Yeah, like I said, I get his point.

He should help provide a process by which the dev can pick something, not just pick for them. Picking for them he may pick something they hate or find useless. If he takes even a few minutes to learn what the dev is excited about he can then point them to the best choice for them.

This is just basic teaching. You find students’ passions and run with them. Force feeding them your biases without caring what they enjoy is a sure way to make the “out of touch teachers” list.

2

u/FoolishDeveloper Feb 09 '19

> He should help provide a process by which the dev can pick something

I know what you are thinking. Give them tools to help work through the problem. But they are getting ideas on how to make their choice from many sources and those ideas conflict. You know how many articles and threads there are for "PHP vs Ruby vs Python vs C#...." There are so many damn opinions (See: This thread). That is how the language selection anxiety is born.... everyone trying to help you make the decision. It all mixes together and just turns into mud.

It is similar to that XKCD on competing standards.

I have 15 ideas on how to select a language.
"I'll help clarify your choice!" - said the Helpful Programmer.
Now I have 16 ideas on how to select a language.

I experienced this very thing myself during the initial growth of Ruby on Rails. I was a web designer wanting to get into web development and I wasn't sure where to focus my time. Javascript was not taken seriously at all back then. PHP was everywhere but nearly everyone hated it. Java was taught in schools, but everyone complained it was too verbose and cumbersome. Ruby on Rails was taking off, but people complained about performance and scaling. Python seemed like a friendly language, but Django didn't have quite the buzz of Ruby on Rails. So many opinions. The end result was gridlock in my brain and I just waited until the decision could be more clear...and waited...and waited. I would have been WAY better off if someone said "Just learn PHP" or "Just learn Ruby" or "Just learn Python" so I could stop wasting my time on solving that problem and I could start learning programming.

I had no way of really knowing what my interest was. Sometimes, you just have to dive in and figure it out later.

1

u/blindgorgon Feb 09 '19

Yeah, that’s a good story to share here. It can be paralyzing!

My thought is this:

  1. Let them try to figure it out first

  2. Provide personalized discussion about their goals/wants

  3. If they still don’t pick, pick for them

It’s really important that if there’s passion to be found the student finds it. Following a process like this may help uncover it. If it doesn’t, than the OP’s route is the only thing left.

It’s just that he jumped to the last step without considering the benefits of 1 or 2. It just felt rash.

1

u/Jrobah Feb 10 '19

OP used Python as an example to mean learn and stick to one language first before you try something else. You can replace Python with C, Java, C# or any other language in that context