Can novice programmers write clean code

Learn to Code - 10 Step Tutorial for Beginners | 2021

Do you want to learn programming?

Write your own apps and program cool games? Then you've come to the right place with this tutorial.

Rise without prior knowledge programming step-by-step with this tutorial.

Let's start


Beginner FAQ: Common Questions and Answers

Which PC for programming / which laptop for programming?

In contrast to gaming, you don't need a fast and powerful computer for programming.

You can program on a 10 year old notebook or desktop PC. For 95% of the programming tasks a notebook or desktop PC is sufficient with Windows, Linux or macOS that uses more than 2 GB of RAM. As a beginner, you don't need a better PC because your first few programs never push your computer to the limit.

If a browser is running on your computer, nothing stands in the way of writing your first working program today.

Simple rule

Do I need prior knowledge of programming?

If you can read and write, you can learn to code too.

An understanding of logic and abstract thinking are beneficial. You don't have to have had a 1 in math in school or studied computer science. Most programmers have learned their programming skills through free tutorials like this one.

Learn every programming language and technique on the internet for free. The developers provide documentation and tutorials in many languages ​​and formats. You can choose between the various free resources.

How long do I need to write an app?

Short answer: You can create a simple sample program or app without prior knowledge in 10 to 40 minutes.

Steffen Lippke

A beginner needs 1-2 hours for a simple calculator app (with instructions).

The programming time of your app depends on the ...

  • programming language
  • Duration of the installation of the environment
  • Your requirements for the app
    • Function - What features should the app have?
    • Stability - What happens if a dork operates the app?
    • Appearance - 0815 modular design or a creative game?
  • Number of programming errors

Programming Mac vs Windows?

Is Mac or Windows (or Linux) better suited for programming? Many programmers treat this question very much subjective. In my eyes, that's one thing Question of faith and no objective comparison.

My answer: it doesn't matter!

Steffen Lippke

You can program with both operating systems. I programmed with everyone and tested them all.

You can use the same Programs equal fast and equal elaborately develop.

My tip: Use the operating system that you like or that you use most of the time.

Steffen Lippke

Why learn to code?

Programming is a key skill of the 21st century.

Programming is an art of transforming and controlling information.

A program can carry out repetitive work steps in an automated and rule-based manner. Those who can program can do their jobs faster. If you write good, error-free automation, Your workforce multiplies many times.

You understand how programs work and you can adapt programs to your needs. You can fix your computer problems more easily and you have a better understanding of the errors in other people's programs.

Where do you program JavaScript?

JavaScript is a client-side programming language for the browser.

You can create an HTML website and paste the JavaScript code there. Your browser executes the JavaScript code e.g. B. when accessing the website. Edit the JavaScript code within a file editor e.g. B. Visual Studio Code or Notepad.

Where do you program Python?

Python is a programming language that needs an execution environment because the computer does not execute it.

If the Python runtime environment is installed, you can start and run the Python file with. You write the program code with a simple text editor or an integrated development environment such as Jupiter Notebooks or Visual Studio Code.

Where do you program HTML?

Hypertext Markup Language (HTML) is a markup language for websites (not a real programming language) that a browser can use e.g. B. Firefox understands.

If the browser opens an HTML file, the program displays a website. You program HTML with a simple text editor or an integrated development environment such as Jupiter Notebook or Visual Studio Code.

Learn to program - the basics

Which programming language do I have to learn to program X?

Many beginners ask what they need to learn to program X, here is the solution

If you want to earn money after acquiring a programming language, learn ...

  • Cobolt - programming for insurance companies and banks
  • Python with numpy - machine learning etc.
  • ABAP - business applications in SAP

Learn to program? Entry without prior knowledge

Computer programs are like cooking recipes

Steffen's explanation
  1. Peel potatoes
  2. Fill up with water
  3. Add salt
  4. Turn on hotplate 4

Output: boiled potatoes

You are the cookbook author (programmer) and say what the assistant (computer) should do and when so that the result (output) is correct in the end.

Using clearly defined cooking instructions (commands) you explain the process to the assistant (computer) so that a good dish comes out.

The stupid assistant (computer) meticulously processes your commands. If you forget to write in your recipe that the assistant (computer) should switch on hotplate 4 (command), you will later be punished with raw potatoes (output).

As a cookbook author, you often provide the guest with various alternatives. The guest either prefers the potatoes as fried potatoes or cooked in salt water. The guest says which variant he prefers (input). Your recipe needs a branch:

Input: Cooking method: fry

  1. Peel potatoes
  2. When: fry –>
    1. Slice
    2. Oil in the pot
  3. If: don't fry –>
    1. Fill up with water
    2. Add salt
  4. Turn on hotplate 4

Output: boiled or fried potatoes

If you want to eat more than one potato, write in your recipe e.g. please jump to step 1 (grinding):

  1. Peel potatoes
  2. When: fry –>
    1. Slice
    2. Oil in the pot
  3. If: don't fry –>
    1. Fill up with water
    2. Add salt
  4. Jump to step 1 until number of potatoes = 5
  5. Turn on hotplate 4

Output: boiled or fried potatoes

The "number of potatoes" is a variable for the computer. A variable is a memory location that can contain numbers, texts, a combination of numbers and texts (arrays). If you call up the "number of potatoes", you will receive the value that is saved. You can overwrite or delete the value.

Now we have everything together. The computer …

  1. ... processes commands one after the other
  2. ... accepts inputs, processes them and outputs outputs
  3. ... remembers values ​​with variables
  4. ... and can be controlled with branches and loops

The computer can remember things

Learn to program in 10 steps

I have put together 10 steps for you on how you can go from a beginner (without prior knowledge) to a programming geek.

# 1 Soak up motivation

Before you start hacking wildly on your keyboard, you need a good dose of motivation to program.

Here are the TOP 6 advantages of being able to program:

  1. Code and get rich: In software development, margins are 40% to 70% realistic. You develop a program once and the free copies sell millions of times.
  2. Creative hobby for free time: As with wood DIY projects, let off steam artistically in the programs. Develop your own features and the user interfaces of tomorrow.
  3. High salaries in the IT industry: Programmers (software engineering) earn a very good salary even as career changers or with a secondary school leaving certificate. The top salaries for experts are 150,000 euros gross annually without personnel responsibility (with sufficient programming skills).
  4. Develop apps according to your needs: You don't like something about your favorite app? Change the app to your programming skills if it is open source.
  5. Solve errors on the computer faster: Instead of desperate when the computer goes nuts, you will find the solution to your problem in a structured and quick manner.
  6. Independence from geeks: The Telekom technician doesn't come. Apple Support is not responding. Your laptop hangs up all the time. With the new skills you are more independent of the geeks who can use the computer.

Programming, like any other activity, has it a light and a dark side. Errors that you cannot solve immediately are not always pleasant. If you make a mistake or incorporate a logic error in your program, the computer will display an error message.

Many beginners throw in the towel after 10 minutes and claim:

"I have no talent for it." - "I don't understand the math stuff." - "I'm just too stupid."

The impatient beginner

Motivate yourself and look for a motivational advantage from the list above. Ask others for help when you get stuck. Don't give up after 30 minutes. Take a closer look at the instructions and compare them with your code!

Experienced programmers stare at your code for 60 minutes on many days to notice that they have forgotten a semicolon (beginner's mistake). This is human, normal and part of programming.

Reality speaks

# 2 Write Hello World first

The entry-level project into programming in every programming language is traditionally called "Hello World". You try to have a "Hello World" appear on your screen when you run your program.

If the computer displays "Hello World", you can already install the programming tools and know the structure of how a program is structured. Installing the environment is often more difficult than actually programming the Hello World project. For beginners, I've put together many step-by-step installation guides for popular programming languages ​​and frameworks.

  • TypeScript (JavaScript only better)
  • Java
  • python

# 3 Write according to instructions - learn to program

Do you want to program more than just "Hello World"?

More features! More buttons! More expenses!

In order to build your desired features, you have to understand the basics and data structures from programming. You don't have to suck everything out of your fingers. I've written basic tutorials for you that you can use to build useful applications.


# 4 Learn to read documentation

After you have roughly understood the basics of a programming language, you should read the documentation for the programming language.

Every programming language and framework should provide technical documentation with continuous text comments. This information comes first-hand from the developers and is the most up-to-date. A lot of documentation uses versioning for the releases of the programming language or framework. In return, many documentations are difficult to grasp and understand.

If you google for a coding question, you land on 80% on stack overflow. Stack Overflow is a platform where inexperienced programmers can ask questions and other programmers answer.

Think about Stack Overflow: Lots of respondents ...

  • ... only shine with partial knowledge
  • … Write inefficient code
  • ... do not update their answers when the version changes

A quick copy-paste from a Stack Overflow solution works in most cases, but ...

  1. You didn't understand what the code was doing
  2. You don't know the connections
  3. The naming is often horrific (see Clean Code)

Use Stack Overflow. But keep my warnings in mind.

Steffen Lippke

# 5 Write clean code

What is clean code? Clean programming code? Yes, that's right.

You should get into the habit of producing high quality code with your first line of code:

  1. Give the files, variables and functions meaningful names.
  2. You call the similar similar and the different different.
  3. Write short and many
  4. Keep it stupid, simple: the simpler and shorter the code, the better the quality (except for the naming of variables and functions).

Why should I put in the effort for clean code?

Other people want to read your code. If you name the variables x, y, z, k or n, it will take significantly longer for the other person to understand the code. If you name the text field variable for the account number txtfieldAccountNumber, then the other programmer will find his way around faster.

Reading tip: My Clean Code Guides with many practical examples

# 6 Working together as a team

If you can program on your own, you have reached level 5.

The next challenge is developing a program as a team. A team consists of several programmers who are different

  • Level of knowledge
  • training
  • background
  • and preferences

… to have. You have to set up rules for the clean code, think about the structure of the project and architecture. A sensible distribution of tasks according to strengths is part of it.

Every team goes through phases of discord. The program reveals many unexpected bugs that the programmers blame each other for.

The code is composed by a versioning program (e.g. Git). The program compares your changes to the code with the changes made by the others and merges them into a project.

Many teams use digital tools such as Todoist, Trello or Jira to organize themselves. The project is documented in the code base, which a program extracts later (Swagger).

# 7 Learn advanced programming techniques

If you code in a team, you will quickly learn new programming techniques. Other programmers recommend tricks and tips that will help you move forward.

A so-called “code review” is worth its weight in gold for beginners. Other experienced programmers go through your code with you in a meeting. They look for bad code, structures and (hopefully) give you constructive criticism and suggestions for improvement to the code.

I cover advanced topics on this blog:

# 8 Self-Marketing and Coding Effectiveness

The best programmer never stands out as the best programmer if he does not sell or market his services. I don't mean that you should shout like a barker, but rather draw attention to the work you have done well in serving meetings, presentations and code reviews.

Danger: Do not try to program most lines of code or do todos, but try to create a high coding effectiveness.

  • Effefficient - Do one thing well B. Concentrated and quickly finish a feature.
  • Effective - Do the right things e.g. B. consider which feature the customer really needs and implement it.

Find the one Key challenges of the project out and do them. Find the key building blocks of the product and do them well!

Example task list: The app should reliably synchronize the tasks between the devices. A bad developer first installs features such as dark mode and internationalization. A good developer first builds the synchronization algorithm and makes sure that the app never deletes a to-do early.

# 9 Implement new technologies in reality

The media practice a buzzword bingo in connection with software and Silicon Valley:

The highly-touted technologies that are supposed to change the world work only most programmers don't use them. Young programmers get to know the latest technologies at the university.

"Can I program a blockchain for the reliability of our supply chain?"

Freshly baked programmer

"Good idea. Put it at the back of the to-do list (and forget about it again) "

Boss (45 years old, two whining children)

Many companies do not want to spend time and money on "unknown" technologies because this often entails a high initial investment with little output.

try to Private to incorporate, understand, test and play with the technologies in your projects. The private project is a good argument that will help you convince your boss of it.

# 10 Create something new and make it useful

If you have been able to apply the latest technologies in practice, think about how you implement novel implementations. Use the latest abstract concepts and problems in math, physics, or science to solve them with code.

Go new ways. Test it out and share your idea as an open source project.

7 habits of highly effective programming

Habit 1: Code every day

The difference between a bad 40 hour full-time programmer and a good one is that the good programmer codes projects every day.

He not only codes at work, but also lets off steam on a few fun projects in a private setting, e.g. B. at the

  • Participation in an open source framework such as Angular, Ionic or Vue
  • Adaptation of software that he uses every day
  • Own website, online CV or app
  • Other crazy projects of their own.

In his private life, the good programmer can try everything and learn new things without having to get permission from his boss or product owner.

Habit 2: self-troubleshooting

If you work in a team and the code base is large, then "inexplicable" errors occur. Instead of looking for the fault with the others, you check your own code in the first step.

In the next step you actively look for the errors in the related modules and try to fix the error together with the author-developer.

Habit 3: persevere

Bugs are annoying.

Bugs are exhausting.

Everything is illogical and nonsense!

Some mistakes (challenges) in coding are really tough nuts. The boss is under time pressure. The colleagues are busy or cannot (really) program. You have to persevere and keep trying new approaches and trying to break the problem down into individual parts.

Habit 4: reading the documentation

Always read the documentation first. Don't copy anything, just type the lines yourself to get a better understanding and make adjustments.

Use Stack Overflow as a source of inspiration to come up with a new approach.

Habit 5: Programming Clean Code

Name the variables speaking and make no exceptions.

Document your code. Write self-explanatory code and conduct code reviews.

Habit 6: Communicate every day

If you work in a team, you are not allowed to lock yourself in the basement and come out with the finished program after 3 months.

In the end it turns out that the customer wanted something different. Either…

  • ... the customer does not speak clearly
  • ... the customer doesn't know what he wants
  • ... the developer only understands pears instead of apples
  • ... or code something "beautiful".

Habit 7: Take breaks

Overtime is common in the IT industry.

In China, 80 hour weeks is normal and sleep is unnecessary.

Good code and stable software are only created when the programmer is rested. Do not work as long as possible, but work efficiently and effectively on your projects.

  • Which features are really necessary?
  • What is superfluous?
  • Is there another, simpler approach possible?
  • Do we really need this complex architecture?
  • What is our goal and what is not the goal?

My tips for dealing with breaks:

  • Work with Pomodoros
  • Bundle tasks
  • Shield yourself from distractions
  • Take a lunch break
  • And after 8 hours it's over
  • Question what you are doing "Does this activity bring you closer to your goal?"

Source reference images: Icons and SVG graphics in the cover image of Microsoft PowerPoint 2019, freely available according to EULA
*) By subscribing to the newsletter, you agree to the analysis of the newsletter through individual measurement, storage and analysis of opening rates and click rates in profiles for the purpose of designing better newsletters in the future. You can revoke your consent to receive the newsletter and the measurement with effect for the future. The dispatch takes place with MailChimp. More in the privacy policy.