Articles

Creating a simple form with Flexbox

The simplest form on the web contains an email field and a submit button. Sometimes, the email field and the submit button is placed on the same row, like this:

Email and submit button on the same row
Email and submit button on the same row

This UI looks simple! But it can be difficult to build if you’re using older methods like inline-block. The hard part is getting the email field and button to align visually.

The great news is: CSS Grid or Flexbox can help you build this form easily.

Read more

How I remember CSS Grid properties

The syntax for CSS Grid is foreign and hard to remember. But if you can’t remember CSS Grid’s syntax, you won’t be confident when you use CSS Grid.

To wield CSS Grid effectively, you need to remember its properties and values.

I want to share how I remember the most common CSS Grid properties today. This will help you use CSS Grid without googling like a maniac.

Read more

Semantic Versioning

We created numbers like 1.0.0 and 1.0.1 for releases and hotfixes when we worked on Git Flow. What do these numbers represent, and why do we use them?

These numbers represent the version number of the product we put out in the world. We use them because we’re following a best practice called Semantic Versioning.

When we use Semantic Versioning, developers will know whether a change will break their code. The numbers give a clue to the kind of changes that have occurred.

Many popular projects use Semantic Versioning. Examples are React and Vue.

Read more

Becoming more productive while working less

I don’t have time to learn.

Many people say that to themselves. I say that to myself too.

I haven’t learned much this year because I was on a tight schedule to create content. I had to create one article and one video every week for the blog. I also had to create as many Learn JavaScript lessons as I can.

And I was almost burned out. I was unhappy and depressed.

Learning is important to me. When I don’t learn, I start to feel guilty.

One day, I decided enough was enough. I had to change up my schedule to allow time for learning. I did some experiments over the new few weeks and found a way where I could give myself 1.5 hours to learn every day. The best part is, I created even more content than I did before!

I want to share with you my experiment and how I tweaked my schedule to allow time for learning. I hope it’ll help you find some time to learn as well.

Read more

Managing your Git branches with Git Flow

How do you manage your git branches if you have many of them? For this, we have a well-known method called the Git flow.

It contains five types of branches:

  1. The production branch
  2. The develop branch
  3. Feature branches
  4. Release branches
  5. Hotfix branches

We’ll go into what each type of branches do and how to create them in this lesson.

Read more

When will Learn JavaScript be completed?

The most common question I get about Learn JavaScript is: “When will Learn JavaScript be complete?”

If you don’t know, Learn JavaScript is my flagship JavaScript course. You can find out more about the course here.

The best answer I could come up with was: “I don’t know”.

I hated myself for saying that.

I’ve been writing Learn JavaScript since last August. I promised myself a certain deadline twice. And I failed to hit the deadline twice. I feel ashamed for creating content so slowly.

I came to a point where I’m scared to promise a deadline. I don’t want to disappoint my students. I don’t want to disappoint myself either.

But I realize that I can’t say “I don’t know” to students who already bought the course. They have a right to know. So today, I’m going to overcome my fear and provide you with a proper estimate.

Read more

What is a branch in Git?

Note: This the seventh video in the Git for beginners series. Watch the first video here.

Imagine there are parallel worlds. We have:

  1. A world where I have created this video, and you’re watching it.
  2. A world where I have created this video, but you’re not watching it.
  3. A world where I did not create this video.

In this parallel world concept, a Git branch is a parallel world.

You can have a branch that stays the same in one world. Then, you branch off into a different world. Once you finish your code, you can complete the initial world by merging the changes into it.

Read more

Changing my refund policy

When I launched Learn JavaScript in July 2018, I used a refund policy that says:

“I’m happy to refund your money if you don’t manage to learn JavaScript through this course. Send me an email within 60 days, show me you did your homework and I’ll send your money back.”

I want to let you know that I’m changing to a new refund policy. I want to tell you about the new policy, and why I’m changing it.

Read more

Resolving Git conflicts

Note: This the sixth video in the Git for beginners series. Watch the first video here.

Let’s say a friend of made a change to your repository and pushed the changes to the Git remote. At the same time, you also made a change to the same line of code.

When you pull their changes into your local repository, you’ll notice that there is a conflict.

This happens because Git no idea whether their version is the updated version or your version is the updated version.

This is what we call a Git conflict.

You’ll learn how to resolve a Git conflict today.

Read more

:empty and :blank

I made a terrible mistake when I tweeted about :empty and :blank a month ago. I said that :empty wasn’t useful, and :blank is much more useful than :empty.

Blank is not supported by any browser

I was wrong!

:empty is actually good enough. We don’t even need :blank!

Read more

Hold on while i sign you up…

🤗
Woohoo! You’re in!
Now, hold on while I redirect you.