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

68

u/desrtfx Feb 08 '19 edited Feb 08 '19

You are attacking the problem from the completely wrong end.

Instead of "LEARN PYTHON", any good teacher would have said "LEARN PROGRAMMING".

Since you are so focused on the programming language, you completely forget that the actual code is only the very last step in a long journey.

Far more important than whatever you have listed up there is:

  • Learn problem solving - solve problems in a methodical way

  • Learn to break down problems into atomic subproblems

  • Learn abstract/algorithmic thinking

  • Learn to describe solutions with algorithms - language independent

  • Learn to convert algorithms into code - no matter what programming language you learn

Nearly every programming tutorial is about "learn language x", "learn framework Y", etc, but hardly any is about "learn programming" - your elaborate from above is no exception to that rule.

Obviously, you are also teaching your students to become "copy-paste code monkeys" instead of "real programmers". It also seems that you have zero real world practical experience, along with not really much teaching experience.

I've been teaching over 15 years, and have written plenty courses (including a couple for the European Union), besides that I've been programming as a professional for over 30 years.

While your advice is not the most destructive we've had here, it is definitely neither good advice.

3

u/[deleted] Feb 09 '19 edited Feb 09 '19

I'm starting to teach myself to code, and what you're referring to has honestly been my biggest struggle. I'm able to read guides and watch videos. I can pick up the language being taught reasonably well, and I don't struggle to follow along with the guides to solve simple problems. But it seems like there's very little out there to teach me how to apply these simple concepts to complex, real-world problems that I will actually encounter. Or even practice material of gradually-increasing difficulty to make me think harder and apply the concepts better. I look at code that my company uses, and it's like a foreign language where I know some of the vocabulary, but not the grammar or the overall meaning. It's been very discouraging, and I keep hitting the end of available online guidance before I'm really able to grow my understanding.

So since you seem to be one of the few that has identified my actual problem, and have a good deal of experience to go with it... What would you recommend that I do to actually learn these real-world problem-solving skills? If it helps at all, I'm currently in an IT-lite kind of job (mostly using proprietary software, with some very limited and template-based actual coding), trying to move in to a more technical job at my company. I have some access to outside learning-center online classes paid for by my employer, if I request and justify the expense. I'm also willing to pay some out of my own pocket, if needed, but going back to school and earning an entire degree on my dime isn't an option. The languages most related to my job, and thus easiest to justify, are VBA and SQL, though I'm also open to Python or really any other language for general learning purposes. Even just a guide that teaches the problem-solving better would be a godsend.

Thanks in advance if you're able to respond.

2

u/p1-o2 Feb 09 '19 edited Feb 09 '19

There are lots of good services out there which are focused on these skills. Destroy All Software is the one I typically recommend to people. I know that's kind of a terse answer but DAS really is just a library of lessons and examples of those real-world problems you're asking for.

1

u/[deleted] Feb 09 '19

I'll check it out, thank you!

1

u/[deleted] Feb 09 '19

Math helped me to learn problem-solving skills and how to break problems down