DEV Community

Ivo
Ivo

Posted on • Edited on

What are the most important things to teach a complete novice dev (and how)?

A year ago I gave my brother a book on how to write Minecraft plugins in Java. It's a beginner book starting at the absolute basics in a fun context. He played a lot Minecraft (maybe a bit too much) and I was hoping to turn that into something useful.

Now about a year later (he's 16 now) he actually picked it up and started asking me all kinds of questions. Whilst I'm psyched that started learning on his own I do have the impression that many of his questions could be answered by reading more thoroughly while others just seem trivial to me (I am aware that they might not be for a beginner though). When I look at his code I'm kinda horrified and at the same time not sure if it makes any sense to teach naming conventions etc. at this point.

My current approach for answering questions/giving tips is to just give the solution in case of language specific questions (like that you need to compare strings with equals in Java) and try to give hints in case of command/data flow issues in his program and have him google the answer in case of simple knowledge questions (like what the % operator does). The intention here is that he learns how to find answers and find errors by himself whilst not getting demotivated by stupid little issues that you just kinda learn with time.

So my question/topic what you think of my approach and how much in the direction of best practices like naming conventions I should try to teach at this point.
For all answers I'm also interested in what your current status is i.e. if your a beginner yourself, have mentored before or just sharing thoughts.

Top comments (5)

Collapse
 
davidmm1707 profile image
David MMπŸ‘¨πŸ»β€πŸ’»

Your brother is 16 so try to not overwhelm him with too much. Try to introduce something new every time he shows you the code. For example:

  • Oh, that's cool! Now you can do X! But...what does it mean 'String usrnm = "John Doe"'?
  • It's the username!
  • Ah, ok! It was a bit hard to understand to me. Why don't you use 'userName' instead? This way it is easier to read

Don't be too hard on him and if someone has to feel like a fool, it is better if you pick up the task (Like here, where you are pretending to not understand something instead of saying "LOL usrnm that's stupid").

About googling...

Next time you get asked a question, ask himself if it can simplify it/simplify it yourself, and then do the same on Google. Like this:

  • Ivo, I want to remove an item from the backpack but I don't know how to do it
  • So...you want to remove something from a list, right?
  • Yes
  • Ok, let's see (Open Google and start to type 'Java remove one element from array') seems like that's a pretty common question. Let's open this StackOverflow link...

Try to present its questions as something simple, that everybody can do with a bit of direction (instead of something so simple that everybody should know. That would make him feel like an idiot).

Many people have a different approach to learning/teaching but forgot one of the main points: Make it interesting and fun.

Your brother is learning right now, not to shuffle excel files in the future, but because he's having fun. Let him learn while having fun too.

Collapse
 
ivoberger profile image
Ivo

Thanks for the reply!
One thing at a time sounds like a great idea and showing how to break problems down to simple questions too.
Main thing I need to learn here is patience and some restraint :)

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

When I look at his code I'm kinda horrified and at the same time not sure if it makes any sense to teach naming conventions etc. at this point.

Good coding habits are important, it's never too early to start teaching them, especially since it becomes harder to learn the longer you put off learning it.

The important thing here is to explain why it matters. Most people have a much easier time learning stuff if they understand why it's important to learn it. Once you've got that, show him how to set up some kind of linting program to help him check his own code (I don't know of any good linters for Java, but I'm talking something akin to ESLint or flake8 here), and configure it so that it just reports errors/warnings instead of fixing them for him. That way, he'll learn over time to recognize and correct such things himself, and eventually start just writing the code that way to begin with.

Collapse
 
badrecordlength profile image
Henry πŸ‘¨β€πŸ’»

Starting with Java? Birth by fire, ey? Hahaha, Java ain't so bad really, my first language was VB.net 😬.

I'd definitely make sure to teach him basic naming conventions, camel-case, etc early on. It's a lot easier if you start by doing the right thing instead of trying to break bad habits later. If he wants to start moving away from Minecraft and onto bigger projects later, I'd also recommend teaching him Git fairly early on to avoid the mess of manual version control.

Also, also, if you find that he's finding Java too confusing or difficult (but he's still interested in learning to program), consider steering him towards the basic concepts using Python, I'd bet it's a lot easier for a beginner to get a grasp of.

Collapse
 
anpos231 profile image
anpos231 • Edited

Is he 16?
Just a right time for this book: Head First Design Patterns
Then this: Clean Code

Especially if he's coding in Java, Head First was a book designed for Java programmers.