Image for post
Image for post
Photo by Martin Sanchez on Unsplash

If you are using React or React Native to build web or mobile apps, you probably know that managing the state of the app is key, and with hundreds or — even thousands — of components it can quickly become a complex puzzle. So what are the different methods used currently, and what are theirs pros and cons?

The Old Class Components Way

React has two types of components: class and function. The function components were initially meant to be “dumb” and not contain any state, while the state was meant to be stored in class components. The state values get initiated in the state object and updated via this.setState() which takes values to update as arguments, for example this.setState({ …


Math problem on a chalkboard.
Math problem on a chalkboard.
Photo by Roman Mager on Unsplash.

JavaScript is notoriously bad with numbers, and calculations involving decimal precision are likely to leave you with some surprises. Fortunately, there is a lightweight library that provides us with a range of tools to deal with this: BigJS.

Let’s see what we can take from it.

The famous example of 0.2 + 0.1 === 0.3 returning false usually gives a small headache to coding apprentices. In fact, this is not only a typical JavaScript issue but is also found in many other programming languages (more details on that in this article).

Thankfully, there are simple ways to deal with this without wasting much time. One of them is a library called BigJS. As its name implies, it was initially built to deal with big numbers by using JavaScript classes. …


Cat hiding under a blanket.
Cat hiding under a blanket.
Photo by MIKHAIL VASILYEV on Unsplash.

As a developer, good knowledge of Git or any version control software is more than a skill — it is a must. And among the many good things that Git has to offer, there is Git Stash. Why is it great? Because it prevents you from committing every tiny change when working on several Git branches at the same time.

Discovering it as a junior dev helped me a lot, so here is a basic rundown of the main commands and the way they can be useful.

In an ideal developer workday, one would be able to focus on a single task until completion and then switch to the next. But in reality, there are always smaller urgent issues that need immediate attention and longer-term work that requires more thinking and trying. …


A guide for career changers (part 1)

Image for post
Image for post
Photo by Infralist.com on Unsplash

I became a developer without following the “traditional path” of computer science or engineering degree, but through a mix of self-learning, attending a bootcamp, and then learning on the job for while working as a developer. We are quite many in the same case, and this is perfectly fine, as most of the needed skills are learned by practice. But why tickle our curiosity a bit and check what it takes to know in depth the fundamentals of computing? In this article, I decided to explore and share some of the most meaningful resources I found.

Computer Science studies usually consist in 3 to 5 years of university studies that are split between theoretical courses, workshops, group projects and dissertations. They highly depend on the country and university, but some of the following courses are commonly…


Image for post
Image for post
Photo by Brett Zeck on Unsplash

MapBox allows lots of customisation, including the total freedom in designing own pins to spot locations on the map. As their official tech documentation shows, the pin is basically a div which is rendered on a location specified by coordinates, and the inside of the div can be tailored to fit any app. What we’ll focus on here is the exact location shown by our custom Marker if it is in form of a pin or pointing object.

Like in other map providers, the size of the pin remains exactly the same when zooming in and out, while the map expands or gets smaller. …


Image for post
Image for post
Photo by Zorik D on Unsplash

In part 1, I described how to use async functions in JavaScript to play a series of sounds at a specific interval, with all of it being controlled by a pad. After each interval, a loop iterates through the sounds again and plays the ones that are switched on.

Let’s now go through the gaming logic and explore how the score, timer, win and lose mechanics are done.

When the user plays, they hear a beat coming from the computer, and then they have a limited time to recreate it. …


Image for post
Image for post
Photo by Anastasia Petrova on Unsplash

Beginning of 2019, I decided to switch career and become a web developer. Although I started my learning journey in an autodidact way, the decision to attend a coding bootcamp started to make more and more sense: it should help me getting to the next level, learn faster, and — probably above all — be among a community of people like me. This is how I hopped on board of Ironhack Web Dev Bootcamp: an intensive 9 weeks full stack training.

Some common interrogations about this type of programs are:

  • Is it really that difficult? …


Image for post
Image for post
Photo by Eric Nopanen on Unsplash

For my first project at Ironhack, I had to build a mini-game in four days. I chose to play around with DOM manipulations and the HTML audio element to build a 4x6 pad where the 4 columns are “beat times” and the 6 rows are different sounds that can be played at these times.

To add spice, the player has to hear a rhythm and then reproduce it in a limited time to score points.

The entire code is available on GitHub. It is a framework-free app and only Vanilla JavaScript was used building it. …


Image for post
Image for post
Picture from: The Coding Train

In the last article, I spoke about the the online tools that can help you to learn coding. What I didn’t mention is that I owe my first ever lines of JavaScript to a tutorial video about building a snake game.

Yes, that’s right, as trivial as it sounds, we all enjoy learning by watching, and that’s why Youtube channels are a goldmine in terms of learning resources. In this article I will talk about some “code-fluencers” whose content deserves some attention.

Mmtuts

Mmtuts channel includes several series of tutorials on web development and covers frontend mainly (Javascript, Html, CSS, Bootstrap) but also backend backend (Php) and UI design. Daniel, the host, leads the viewers trough beginner friendly, step-by-step tutorials and exciting mini-projects, such as a mini RPG game in Javascript. …


Image for post
Image for post
Photo by Pexels.com — Eduardo Dutra

Beginning of 2019 I decided to learn web development, focusing on JavaScript, and before going trough an intense bootcamp, my wish was to progress as much as possible on my own, using online resources.

JavaScript was quite new to me… but programming in general — as well! Beyond the fascination, fear and excitement, I was asking myself: “How far can I progress on my own?”.

It turns out: quite far! Many people have been in my situation once and their efforts to help others along the way resulted in an impressive collection of high quality tools, resources, videos and platforms. …

About

Iouri Sorokine

Full Stack developer — React | React Native | NodeJS | GraphQL | TypeScript. Writing about Code for: Learnings, Problem Solving and Music.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store