Articles

How to build a calculator—part 1

This is the start of a three-part lesson about building a calculator. By the end of these three lessons, you should get a calculator that functions exactly like an iPhone calculator (without the +/- and percentage functionalities).

Here’s what you’ll get:

GIF of a calculator you'll build
GIF of a calculator you'll build

Experiment publicly

I’m going to be honest with you. This video is probably going to suck. Why? Because I’m experimenting with something new.

I’m going to tell you what I’m experimenting with, why I’m experimenting and why you should conduct your own public experiment.

Case study—a project from hell

Project T is a project that I don’t want to remember. It was a big project for a big company—a project that I thought I would be proud to include in my portfolio; and boy, I was wrong.

Project T was bad. It lasted nine months when it was supposed to last three months. At the end, I gave a huge discount to the agency because they lost money on the project; as a result, I lost big time too.

Of the original team—a project manager, a visual designer, a UX designer and a frontend developer (me), I was the only member that survived the project till the end. Largely because of two reasons:

  1. I was stupid and naive
  2. My sense of responsibility didn’t allow me to abandon the project halfway.

By the end of the 9-month long project, I was burned out, and I quit freelancing for a year.

How do you decide what to build?

“Can you tell me what should I build? I don’t have any ideas!”

This is one of the biggest problems that stop developers from becoming better at their craft. Upon investigation, I discovered that people have ideas; they’re just afraid their ideas are bad, would fail, or nobody would use the thing they made.

These feelings are normal. We’re afraid to make things that kinda suck because we’re afraid others will shame us for it. We’re afraid the very thing we make will convince us that we’re the useless fraud that should never have existed in this world.

Then, we freeze in fear.

It’s a big problem. I can’t solve the problem for you, but I hope the lessons I share in today’s article can help you push yourself out of paralysis.

How to use a linter

Today we’re going to talk about linters.

When you use a linter, you will see red squiggly underlines all over your code. If you’re not used to using a linter yet, it’s hard not to feel like you’re doing something wrong!

You don’t have to feel that way.

A linter is there to help you write better code. There are reasons for the red squiggly underlines. Once you know what brings these underlines out, you’ll know what to ignore and what not to.

Responsive Vertical Rhythm with CSS Custom Properties and CSS Calc

Vertical Rhythm is an important concept in web design. It has the ability to bring a design together and make different elements feel consistent on the same page.

It was impossible to change Vertical Rhythm at different viewports previously, because we didn’t have the right tools. But now, with CSS Calc and CSS Custom Properties, we can change Vertical Rhythm at different viewports. This article explains how.

Useful VS Code keyboard shortcuts

Today, I want to share vs code shortcuts I use on a daily basis. Here’s a list of what we’re going to go through:

  1. Opening and closing the sidebar
  2. File explorer
  3. Marketplace
  4. Switching workspaces
  5. Opening the terminal
  6. Go to file
  7. Go to line
  8. Go to symbol
  9. The command palette
  10. Split editor
  11. Toggle editor group layout
  12. Working with tabs
  13. Select word
  14. Folding and unfolding
  15. Move line upwards or downwards.
  16. Split lines
  17. Pageup/pagedown
  18. Jump to word
  19. Expand region

Setting up Visual Studio Code (Part 3)—Extensions

Welcome Part 3 of the VS Code setup series.

If you haven’t watched the first or second parts yet, I suggest you go watch them first. Everything I’m sharing today builds on what I showed you before. For today, I want to share the extensions I use on a daily basis.

Intro to Object Oriented Programming in JavaScript

Object-Oriented Programming is a popular style of programming that has taken root in JavaScript since the beginning.

It’s so deeply rooted in JavaScript that many of JavaScript’s native functions and methods are written in the Object Oriented style; you’ll also find many popular libraries written in the Object Oriented style.

In this article, you’ll learn what Object Oriented Programming is and how to begin using it in JavaScript.

Faux Subgrid

I was super excited when CSS Grid landed in major browsers back in March/April 2017. I thought CSS Grid was going to change the way we make layouts; it did. We gotta thank Rachel Andrew and Jen Simmons for teaching all of us us about CSS Grid.

Unfortunately, even though CSS Grid has landed, subgrid (which I consider one of the most important CSS Grid features) didn’t.

But thankfully, there’s a way to create subgrids with pure CSS (no hacks at all!). This method works with all browsers that support CSS Grid.

Hold on while i sign you up…

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