DEV Community

Cover image for 5 Things I Wish I Knew Before Learning to Code (With Simple Code Examples)
Marie Colvin
Marie Colvin

Posted on

5 Things I Wish I Knew Before Learning to Code (With Simple Code Examples)

Hi everyone!

I recently started learning to code, and it has been a fun and confusing journey. If you're just starting out or thinking about learning, I want to share a few simple things I wish I knew earlier.

This blog is written in simple words, for beginners like me, and I’ve added a few small code examples that helped me feel like I was really learning something.

1. You Don’t Need to Learn Everything on Day One

At first, I saw words like HTML, CSS, JavaScript, Git, and more. I thought I had to learn all of them immediately. But you really don’t.

Start small. For example, you can write your first line of HTML in under a minute:

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, world!</h1>
    <p>This is my first web page.</p>
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Just seeing this in the browser gave me a huge confidence boost.

2. You Can Look Things Up Anytime

You don’t need to remember everything. It’s okay to Google things. In fact, even pro developers do it every day.

If you ever want to change the background color of a page and forget how, just search: “CSS background color.”

Here’s an example:

body {
  background-color: #f0f0f0;
  font-family: Arial, sans-serif;
}
Enter fullscreen mode Exit fullscreen mode

This makes the background light gray and changes the font. Small changes like this make your pages feel cleaner.

3. Tools Are Helpful but Not Everything

Using tools like VS Code is helpful. But don’t spend hours picking themes or extensions. Focus on writing code and building things.

For example, I used the console.log() in JavaScript to test things like this:

console.log("I’m learning JavaScript!");
Enter fullscreen mode Exit fullscreen mode

It shows your message in the browser console. It’s simple, but you’ll use this a lot while testing your code.

4. Design Matters More Than You Think

Before coding, I never noticed how much design matters. Once I started building simple web pages, I realized that colors, spacing, and animations make a big difference.

Bright and bold elements, like gym neon signs, always grab attention. You can create something glowing too, just with CSS:

h1 {
  color: #00ffcc;
  text-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc;
}
Enter fullscreen mode Exit fullscreen mode

This gives your heading a neon glow effect! I used it on a fake landing page and it looked so cool.

5. The Coding Community Is Super Friendly

One of the best parts of learning to code is discovering how helpful the community is. You can ask questions on Reddit, Stack Overflow, Discord, or even YouTube comments.

If you don’t know something, just ask. For example, when I didn’t understand how buttons worked, someone shared this:

<button onclick="alert('You clicked the button!')">Click Me</button>
Enter fullscreen mode Exit fullscreen mode

This tiny line taught me how HTML and JavaScript can work together.

Final Thoughts

Learning to code feels like learning a new language. At first, it’s confusing. But every line you write adds up. You don’t need to know everything. You just need to keep going.

Maybe one day you’ll make your own website or app that looks awesome, with glowing buttons or animations like those gym neon signs that you see at cool studios or fitness pages.

Thanks for reading! I’ll keep sharing my journey and more small code examples as I go.

Happy coding!
Marie Colvin

Top comments (2)

Collapse
 
michael_liang_0208 profile image
Michael Liang

Nice post