Page 3 of 3

Some of you want to or thought about contributing into Node.js core but don’t know how to do it or don’t have enough confidence. Well, I’ll try to help you out with that.

I am an outside collaborator in Node.js and sometimes I look into issues and take some. Also, I already have a few pull requests successfully landed into Node.js core, so I will tell you about my experience.

Let’s start with running it locally.

Read Full Article

Last time, I showed you how to profile your application and find the place which slows it down — bottleneck. It helps a lot with finding the place in the code that executes slow, so you can fix that.

But, what if you don’t know how to fix that? How to find the reason for de-optimization in your JavaScript code when you have a lot of different variants of that de-optimization. How to trace specific de-optimizations in your code?

Read Full Article

In my previous article, I was talking about Node.js and why it’s fast. Today, I want to talk about V8.

I suppose some of you heard that JavaScript executes as fast as C++. Some of you don’t understand how it’s even possible. JavaScript is a dynamically typed language with Just in Time (JIT) compilation, when C++ is static-typed language with Ahead of Time (AoT) compilation. And somehow, optimised JavaScript code executes a little slower than C++ or even with the same speed.

To understand why that is, you need to know some basics of V8 implementation. It’s a huge topic, so I will only explain key features of V8 in this post. If you want more details, such as hidden classes, SSA, IC,… they will be in my next article.

Read Full Article

I was invited to speak about the current state of IT and what students should learn to get into IT and its commercial sector. After the speech, I’ve written an article, hoping someone else can find this useful.

Here, I will explain the basic things you need to know to get a job. I will give you a direction, then you will have to learn on your own.

Read Full Article

Happy New Year! I’ve finished Advent of Code and want to share my solutions with you. Of course, some solutions can be improved; I don’t claim these to be the best solutions possible.

When I started playing this game, I decided to write one paragraph with a solution and explanation to it. But you can see that I went a little further with that…

TL;DR: This isn’t really an article, more like a collection of gists with explanations. All of the solutions are available on my GitHub if you just want the code.

Read Full Article

Here I am again with an article about Node.js! Today I want to speak about another Node.js advantage — execution speed. What do I mean by “execution speed”?

It can be anything ranging from calculating Fibonacci sequence to querying database.

When talking about web-services, execution speed comprises everything that is needed to process requests and send the response to the client. That’s what I mean — time spent on processing request, starting from opening connection to client receiving the response.

As soon as you understand what’s going on in Node.js server when it processes the requests, you will realise why it is so fast.

But before talking about Node.js, let’s look at how request handling is done in other languages. PHP is the best example because it is popular and unoptimised.

Read Full Article

TL;DR If you are not interested in reading the post and want to see the results, check out my repository — generator-sails-rest-api.

Otherwise, let’s dive into terminology before reading. I want to be sure you understand terms and what I’m talking about.

What is REST API?

Let’s look at Wikipedia:

In computing, Representational State Transfer (REST) is the software architectural style of the World Wide Web. REST gives a coordinated set of constraints to the design of components in a distributed hypermedia system that can lead to a higher-performing and more maintainable architecture.

Building RESTful web services, like other programming skills is part art, part science. As the Internet industry progresses, creating a REST API becomes more concrete, with emerging best practices. As RESTful Web services don’t follow a prescribed standard except for HTTP, it’s important to build your RESTful API under industry best practices to ease development and simplify client adoption.

As Wikipedia said above, “REST is the software architectural style”. It’s not a library you can install and work with. It’s just a bundle of rules you need to follow when writing your web service.

Read Full Article

Hi everyone! My name is Eugene Obrezkov, and today I want to talk about one of the “scariest” platforms — Node.js. I will answer one of the most complicated questions about Node.js — “How does Node.js work?

I will present this article as if Node.js didn’t exist at all. This way, it should be easier for you to understand what’s going on under the hood.

The code found in this post is taken from existing NodeJS sources, so after reading this article, you should be more comfortable with NodeJS.

Read Full Article