DEV Community

Programming Entry Level: tutorial portfolio

Understanding Tutorial Portfolio for Beginners

So, you're learning to code – awesome! You've probably followed a bunch of tutorials, right? But what do you do with all that code after you've finished the tutorial? That's where a "tutorial portfolio" comes in. It's a super important step for new developers, and it's something interviewers often ask about. They want to see you can not just follow instructions, but also understand and apply what you've learned. This post will walk you through everything you need to know.

Understanding "tutorial portfolio"

Think of learning to code like learning to cook. You can read a recipe (the tutorial), and follow it step-by-step to make a dish. But simply following the recipe doesn't make you a chef! A chef understands why certain ingredients are used, how different techniques work, and can even adapt the recipe or create their own.

A tutorial portfolio is like your "cookbook" of projects you've built from tutorials, but with your own personal touch. It's not just copying and pasting code; it's about demonstrating that you understand the concepts and can build upon them. It shows you can take something someone else created and make it your own.

You can think of it as a collection of projects that demonstrate your skills. Each project is a mini-story of your learning journey. It's a way to show potential employers (or even just yourself!) what you're capable of.

Basic Code Example

Let's say you followed a tutorial to create a simple counter in JavaScript. The tutorial might have given you this code:

let count = 0;

function increment() {
  count++;
  console.log(count);
}

document.getElementById("incrementButton").addEventListener("click", increment);
Enter fullscreen mode Exit fullscreen mode

This code creates a variable count initialized to 0, a function increment that increases the count and logs it to the console, and then attaches that function to a button with the ID "incrementButton".

Now, let's add a little something to show you understand it. Let's add a display to show the current count on the webpage:

let count = 0;

function increment() {
  count++;
  document.getElementById("countDisplay").textContent = count; // Update the display
  console.log(count);
}

document.getElementById("incrementButton").addEventListener("click", increment);
Enter fullscreen mode Exit fullscreen mode

Here's what we added:

  1. document.getElementById("countDisplay").textContent = count; This line finds an HTML element with the ID "countDisplay" and sets its text content to the current value of count. This means the webpage will now show the counter value.

This small change demonstrates that you didn't just copy the code; you understood how it worked and could modify it to achieve a slightly different result. That's the core idea of a tutorial portfolio!

Common Mistakes or Misunderstandings

Here are some common mistakes beginners make when building a tutorial portfolio:

❌ Incorrect code:

def greet(name)
  print("Hello, " + name + "!")
Enter fullscreen mode Exit fullscreen mode

✅ Corrected code:

def greet(name):
  print("Hello, " + name + "!")
Enter fullscreen mode Exit fullscreen mode

Explanation: Forgetting the colon (:) at the end of function definitions in Python is a very common error. Python uses indentation and colons to define code blocks.

❌ Incorrect code:

let message = "Hello";
console.log(mesage); //Typo!
Enter fullscreen mode Exit fullscreen mode

✅ Corrected code:

let message = "Hello";
console.log(message);
Enter fullscreen mode Exit fullscreen mode

Explanation: Simple typos! It's easy to make mistakes when typing, especially when you're still learning. Always double-check your code for spelling errors.

❌ Incorrect code:

<button onclick="increment()">Increment</button>
Enter fullscreen mode Exit fullscreen mode

✅ Corrected code:

<button id="incrementButton">Increment</button>
Enter fullscreen mode Exit fullscreen mode

Explanation: Directly embedding JavaScript code within HTML (like in the incorrect example) is generally considered bad practice. It makes your code harder to maintain and debug. Using IDs and event listeners (as shown in the basic example) is a much cleaner and more organized approach.

Real-World Use Case

Let's say you followed a tutorial to build a simple to-do list application. The tutorial likely showed you how to add items, mark them as complete, and remove them.

Now, let's extend that tutorial. Let's add a feature to save the to-do list to your browser's local storage, so it persists even after you refresh the page.

Here's a simplified example of how you might do that in JavaScript:

// Function to save the to-do list to local storage
function saveTodoList() {
  localStorage.setItem("todoList", JSON.stringify(todoList));
}

// Function to load the to-do list from local storage
function loadTodoList() {
  const savedList = localStorage.getItem("todoList");
  if (savedList) {
    todoList = JSON.parse(savedList);
  }
}

// Call loadTodoList when the page loads
window.addEventListener("load", loadTodoList);

// Call saveTodoList whenever the to-do list changes (e.g., add, remove, complete)
// (This would be integrated into your existing add, remove, and complete functions)
Enter fullscreen mode Exit fullscreen mode

This code adds two functions: saveTodoList and loadTodoList. saveTodoList converts the todoList array into a JSON string and saves it to local storage. loadTodoList retrieves the saved list from local storage and converts it back into an array. By adding this functionality, you've taken a basic tutorial project and made it more useful and practical.

Practice Ideas

Here are a few ideas to get you started building your tutorial portfolio:

  1. Simple Calculator: Follow a tutorial to build a basic calculator. Then, add features like memory functions or the ability to handle different number formats.
  2. Color Palette Generator: Find a tutorial on creating a color palette generator. Extend it by allowing users to save their favorite palettes or export them as CSS code.
  3. Basic Blog: Follow a tutorial to create a simple blog. Add features like commenting, tagging, or search functionality.
  4. Weather App: Build a weather app using a tutorial. Then, add features like displaying a 5-day forecast or allowing users to search for different locations.
  5. Quote Generator: Create a quote generator from a tutorial. Add functionality to share quotes on social media.

Summary

Building a tutorial portfolio is a fantastic way to solidify your understanding of programming concepts and demonstrate your skills to potential employers. Remember, it's not about just copying code; it's about understanding it, modifying it, and making it your own. Don't be afraid to experiment, make mistakes, and learn from them.

Keep practicing, keep building, and most importantly, keep having fun! Next steps? Consider exploring version control with Git and GitHub to manage your projects effectively. Good luck!

Top comments (0)