Writing an Emulator in JavaScript

Interfacing with multiple platforms to create a web, CLI, and native app

Hey there,

It’s been a while since I’ve sent out a message, but I like to make sure I have a good amount of content or something really cool before I send out a message.

Recently, I took on a big project and I wrote an emulator in JavaScript for a system called Chip-8. Here’s a demo of the project. I finally got around to documenting the whole process, so please check it out here:

Writing an Emulator in JavaScript

Chip-8 is the simplest emulator project you can take on, so it’s the starter project for people who want to learn how to develop emulators. However, it’s useful for more than just that niche interest - if you have any interest in learning low-level programming, how a CPU works, what memory and stack mean, I would highly recommend checking out the project. These concepts also apply to working with JavaScript in general.

But that’s just part one of the project - in the second part, I write interfaces that allow me to use the same CPU as the source of a web app, CLI app, and native app, which makes this emulator unique.

These are some of the topics covered:

  • Memory

  • Stacks

  • Input/Output

  • CPU instructions

  • Working with bits, bytes, and bitwise operators

  • Buffers

  • Interfaces

  • Working with the DOM (Canvas API) and the terminal

I’ve written one other article since I sent out a message, part of the Advanced JavaScript series for DigitalOcean.

Understanding Default Parameters in JavaScript

Have a good weekend!

Tania

Learning Redux

A tutorial to build a real-world style application with React and Redux

Happy Monday! I have a new tutorial for you.

Using Redux with React: Complete Tutorial with Real-World Examples

Redux is software that helps manage global state in a JavaScript application.

When I first learned React, I put off learning Redux because it was too much to learn at the same time. I continued putting it off for a long time after that, because it always seemed overwhelming to get started with.

I wanted newcomers who already know React to have a straightforward article to learn Redux for real world applications, not just little todo snippets. So I wrote this tutorial, which consists of demo apps for both the traditional Redux approach and the newer Redux Toolkit approach.

If you want to learn Redux, or even if you already know Redux and want to learn the new Redux Toolkit approach, check it out!

Have a nice week.

Generators in JavaScript

Working with infinite data streams

Hi! It’s Tania.

If you’ve never used generators in JavaScript but are curious about what they’re capable of, check out my latest article:

Understanding Generators in JavaScript

Generators are great for working with infinite data streams. Generators can do everything async/await does, and more. They’re a pretty powerful feature of JavaScript, so I encourage you to check it out!

I’ve also been working on writing an article about React/Redux, so if you know React but haven’t delved into Redux because it looked too confusing, that will be coming up soon.

A newsletter post by Joel Hooks (of Egghead.io) recently got me thinking about how a blog is laid out. Right now, for example, my site is simply a list of posts from newest to oldest. But this isn’t very useful for anyone. As he states:

Seriously, who cares when anything on my site got posted. For the vast majority of things I'm writing it makes absolutely no difference what-so-ever.

Using this newest-first approach makes the site impenetrable and less useful for me and especially for anybody that might be visiting to learn or research.

I wholeheartedly agree with this digital garden vs. blog approach, but I’m not personally sure the best way to go about organizing it. Aside from having some tags and categories, which I do, it’s still just a list of links by date. I’d like to curate the content to make it easier to find what you’re looking for, and also potentially add more varied content (right now, I don’t feel like anything but tutorials fits in to my blog, but I might add snippets, or more personal writing otherwise).

Anyway, if anyone has any ideas along those lines, I’d love to hear it! Otherwise, I’ll be writing again soon with more content. Have a great rest of the weekend!

Map, Set, and macOS Catalina

JavaScript data structures and setting up a new MacBook

Happy Tuesday! It’s Tania. I have one new article for you today, and one revised article.

Understanding Map and Set in JavaScript

If you’re familiar with Objects and Arrays but haven’t gotten around to using Map and Set yet, take a look at this article. Set in particular is extremely useful for working with unique values, and Map adds a lot of functionality to key/value pair storage.

macOS Catalina 10.15: Setting up a Brand New Mac for Development

I originally wrote this article in 2015/2016 and I’ve revised it here and there, but it needed a total overhaul as my career has evolved. I’ve had to set up a few Macs recently, and I like having one place to look to do all my initial setup. It’s an opinionated guide, but it might help you out if you’re a web/JS developer setting up a Mac.

That’s all for today, have a nice week!

Building a Continuous Integration & Deployment Pipeline Using Docker

Learn about Docker and CI/CD for a Node project

Hey there, it’s Tania. Happy Friday! I have a new article for you today.

Building a Continuous Integration & Deployment Pipeline Using Docker

If you’ve heard of Docker but don’t know really know what it does, or how to use it, or found their getting started page way too confusing, this article is definitely for you

In a professional setting, you will usually be able to automatically deploy a website to production. You shouldn’t have to manually upload files anywhere. 

For a personal project, I wanted the same convenience - the ability to be able to merge code into master, have it run tests, and have it deploy to a production server.

I documented the process of getting this set up for my Node.js application, using Docker and Travis CI. Hope this article helps you as much as it has helped me!

Have a great weekend. I have articles on Map/Set and Generators written and ready to publish, and I’m also writing about React + Redux and Webpack right now, so I’ll be writing again soon.

Loading more posts…