Best Practices: Learning To Code

For years, the education community has debated the best approach for homework. Should it be scored or not? What is the proper amount? Should it be even be assigned? Should it even be done at home? Many reports begin with “Studies have shown…,” but no universally accepted conclusion has emerged.

We cannot possibly restate all the conclusions here, nor will we present any part of the debates. Instead, here are a few simple facts for this program:

  1. Yes, there is a lot work, which consists of prep work: the reading, concept checks, exercises, the hands on work: the studios. Daily.

  2. The prep work and the hands on work are building skills for the assignments.

  3. Only the assignments count toward your final grade.

  4. You do not have to do the ungraded prep work or hands on work, but you absolutely SHOULD.

The rest of this page is our attempt to motivate you to complete ALL of the work for this program. How much encouragement you need depends on your personality. Read the sections that appeal to your psyche and are most likely to encourage you.

“Thanks, LaunchCode, but you convinced me at, ‘Do all the work.’ “

If this is your thinking, then bless you. Skip to the best practices listed in the last section of this page. You’re awesome!

Otherwise, on to the motivation…

Philosophy & An Appeal to Wisdom

I hear, and I forget. I see, and I remember. I do, and I understand. - Chinese Proverb

Experience is definitely the best teacher. You could read pages and pages about for loops, which will give you a handle on the vocabulary. However, until you actually construct your first working loop, your understanding will be incomplete.

Tip

You learn to code by coding. Do the work.

Job Success

Imagine you land a sweet tech job, and on your first day your boss says to you, “Implement a recursive algorithm to flatten our data structure.” If your entire prep for this job was reading with very little coding, you might understand each individual word, but actually accomplishing the task would be a disaster.

Now imagine your prep involved using recursion and constructing algorithms over and over again. You would not only understand the words, but also have a strong idea of how to convert those words into working code.

Tip

Be ready for day one on the job. Do the work.

Personal Drive (Grit)

Does the following statement resonate with you? If so, perfect.

“If I stumble, I WILL pick myself up, brush off the dust, and try again.”

Every day throughout this program, you will be asked to code. Each exercise, studio and assignment is designed to give you experience through practice. You WILL make mistakes, and that is OK. Often, our mistakes teach us more than getting the correct answer on our first try.

Every genius programmer you see on Facebook or YouTube started out in front of a screen saying, “Oops,” “ARGH!” or “#*&%%@#!” No one simply “gets” coding without some trial-and-error.

Tip

Use your mistakes as learning opportunities. Do the work.

Effort = Outcome

Let’s take a look at a sample coding task: “Prompt the user to enter a number, then print ‘Even’ if it is divisible by 2, otherwise print ‘Odd’.”

Now let’s take a look at an imaginary student’s attempt at solving this problem:

1.
2.
3.
4.
5.

Hmmm. A blank answer space. What might be the reason?

  1. The student did not understand how to solve the problem.

  2. The student knew how to solve the problem and decided to skip the task.

  3. The student tried to solve the problem, could not get the program to work, so deleted the code.

  4. The student ran out of time when trying to complete the prep work before class.

From a teacher’s perspective, ANY of these reasons could be valid, and we have no way of determining which is true. This prevents us from knowing how to best help the student. Where would we begin?

For the student, a blank response provides no benefit because the necessary practice was either ignored or incomplete. Students gain only as much as they put in. SO:

  1. Even if you have no clue how to approach a task, MAKE AN ATTEMPT ANYWAY, then ask questions.

  2. If you know how to solve the problem, COMPLETE THE TASK ANYWAY, because practice makes better. Also, you could use your code to help answer a classmate’s question.

  3. If you tried to solve the problem, but your code did not work, DO NOT DELETE YOUR ATTEMPT. Ask a question. Showing your work to your teacher, TA or classmates will give them a clear idea about your thought process.

  4. If you ran out of time, GO BACK AND FILL IN THE BLANKS LATER. Practice makes better. If you neglect one set of skills, then the tasks that come later and depend on those skills will be more difficult.

Tip

Learning takes work, and you need the practice. Do the work.

Sports Motivational Stuff

Attention sports fans! Embrace your favorite quote(s):

Sport

Quote

Baseball

“There may be people who have more talent than you, but there’s no excuse for anyone to work harder than you do.” - Derek Jeter

Gymnastics

“I’d rather regret the risks that didn’t work out than the chances I didn’t take at all.” - Simone Biles

Football

“I was always willing to work. I was not the fastest or biggest player, but I was determined to be the best football player I could be on the football field, and I think I was able to accomplish that through hard work.” - Jerry Rice

Soccer

“The backbone of success is…hard work, determination, good planning, and perseverance.” - Mia Hamm

Tennis

“If I don’t get it right, I don’t stop until I do.” - Serena Williams

Optional

Imagine your favorite motivational phrase here. - Some admired person

Tip

Your heros worked really hard, so should you. Do the work.

Social Media

wnt motivation n 140 caractRs r less? Try these (LOL):

  1. #hardworkworks

Tip

Do th Wrk.

Marathon Analogy

Pretend you are not a runner (complete with the “0.0” sticker on your car), but you decide to compete in a marathon. You cannot just drive to the starting line, put on your running shoes and go.

You have to train:

  1. Begin by getting good at running 1 mile.

  2. Then get good at running 3 miles.

  3. Then get good at running 6, then 8, then 10 miles. By now you could try a half-marathon, and proudly slap a “13.1” sticker on your car.

  4. Continue training and increasing your distance. You WILL earn that “26.2” sticker, which will look GREAT when placed in line with 0.0 and 13.1.

  5. Your stickers demonstrate your commitment and might even inspire other non-runners. They will see how you started “just like them” and notice how your effort spurred personal growth.

Learning to code follows the same idea:

  1. Begin with “Hello world!”

  2. Then learn variables, strings and arrays.

  3. Then learn if/else statements and loops, followed by functions and modules.

  4. Then code your first “half-marathon”.

  5. Continue practicing to increase your skills. You WILL earn that marathon.cs sticker as you build solid demo projects and complete more interviews.

  6. Welcome, fellow coder. Don’t forget to inspire others.

Tip

Do the work, and you will consistently get better.

Best Practices

Whew! You made it to the bottom of the page. Good job. Here are some final bits of advice:

  1. DO try every exercise, studio and practice problem.

  2. Repeated practice helps master the basic syntax quirks for a given programming language.

  3. DO experiment. Once your code correctly solves the given task, feel free to tweak it. Great fun can be had if you ask, “What if I try ____,” and then go and do just that. For example, if a problem asks you to sort a list alphabetically, can you order it from z to a instead?

  4. ASK FOR HELP when you get stuck. We’ve all been there, and there is no shame in seeking advice. Use your instructors, TAs, classmates, Stack Overflow, and Google as the brilliant resources they are.

  5. The only “dumb questions” are the ones that are not asked.

  6. The rubber duck method works. Sometimes just describing a coding problem out loud (to your screen, a co-worker, the wall, or a rubber duck) sparks an idea about how to solve it.

  7. DO NOT copy/paste answers. There are plenty of websites where you can find complete code posted. A simple copy/paste into the assignment box will give you a correct result, but you have completely skipped your learning opportunity.

And don’t forget:

DO THE WORK!!!!