A good information system design has grown from a luxury to a necessity. Solution Architect becomes one of the most top paid position in the world of software development. Why is that so?
Let’s see what does Alex Schleifer (CDO at Airbnb) think about designing a robust system:
Here’s a simple truth: you can’t innovate on products without first innovating the way you build them.
Have you ever had an idea that makes absolute sense in your head, but when you try to explain it to someone, it cannot understand? …
“Getting organized is a sign of self-respect.” — Gabby Bernstein
The whole idea of programming in JavaScript is to understand the system. One of the key hallmarks of a good programmer is to always know with which types is he working. We’re continuously adjusting a coding style which will make our variables and its types more obvious.
Up to 2012, we have used JavaScript without any variety of syntactical sugar. In 2012, TypeScript (abbr. TS) was introduced by Microsoft as a new tool which extends JavaScript by adding types to the language. …
“Any sufficiently advanced technology is indistinguishable from magic.”
— Arthur C. Clarke (3rd Clarke’s law)
Before we start to get familiar with JavaScript corner cases, I’d like to make a distinction between Corner Case and Edge Case.
We can say that Edge Case is an issue that can occur only at minimum or maximum parameters. Predicting it can be a significant task since those situations may be neglected or underestimated. For example, a PC at full power can overheat, and its performance may deteriorate a little.
I’d love to introduce a Boundary Case also (a subject of the doubt too). It can occur if one of the parameters is beyond the minimum or maximum limits. …
The best way to learn how to write code is to write code.
— Kyle Simpson
At the beginning of my career as a JavaScript Developer, I thought it’s not a bad thing to avoid learning how does that technology work under the hood. That seems to work, but in the end, my code was buggy.
One of the main things you have to understand is coercion. All I had ever heard about coercion is in blogs and books which rarely refer to the documentation.
Today, I know that only a valid source is documentation. At the end that’s a logic thing because who knows better programming language than a person who creates it? …
JavaScript will be a real functional language.
— Douglas Crockford
I was thinking about how to start this story, so in the end, it transpired to me that Douglas was expressly telling the story of JS. His prediction seemed to come true. JavaScript becomes a powerful functional language!
Since the power of dynamic typing, JS has successfully coped with all the new programming techniques.
You may sometimes be wondering why we aren’t having problems with arithmetic operators or conditional statements, but with equals. The biggest coercion which people struggle with is an equality checking.
In this story, I want to dig deep into some issues which are related to differentiating between loosely and strict equals. There is a big lie when we are comparing ‘==’ and…
Planning is everything, the plan is nothing!
— Dwight D. Eisenhower
If you’re planning to design your system and do all choose fancy diagrams( Data Flow Diagram, Use Case, JSP Diagram, Statechart, etc.), you should then prepare for bugs. It’s impossible to design a perfect system which scales perfect and has zero corner cases.
I’m going to give you 10 tips which I have learned in a hard way!
I have seen once an unusual way of code commenting. At first, it looks silly, but it can make sense. The only guy was maintaining that whole system… He separated code comments from code. He moved all his code comments into a separated folder called docs
. …
Quality means doing it right when no one is looking.
— Henry Ford
You may be wondering how this story can help you out…
The goal of this story is to help you to adopt the right mental model. You have to understand why are we testing our applications, and why the automation testing is roughly as same as the manual testing. One important note: Don’t treat your QA colleague as technological redundancy. At the end of this story, you are going to find out why is that the wrong move!
I don’t want to demoralize you, but I’m trying to increase your confidence that the subject of your test is running the way it should be. You have to be aware that not all tests provide the same level of confidence. If you’re not doing things correctly, you have probably wasted your time and giving the false sense of security. That’s worse than don’t have any test at all. …
JavaScript is the duct tape of the Internet.
— Charlie Campbell
Do people hate JavaScript because of the corner cases? It’s always interesting to watch how people are sanitizing the whole language because of the few cons. All programming languages have type conversions, so all programming languages have corner cases. It’s impossible to design a system that won’t have corner cases.
It’s a bad practice to avoid using coercion. Sorry for lying, it’s impossible to evade it! Don’t pretend to neglect coercion by using strict equals (===). In the end, that is a sort of coercion. Begin studying the specs rather than watching tutorials on YouTube on how to skip to learn coercion. Sit and learn. …
You can never understand everything. But, you should push yourself to understand the system.
— Ryan Dahl, creator of Node.js and Deno
JavaScript is the world’s most misunderstood programming language.
Abstract operations are the foundations, but that’s not the full capacity of the JavaScript mechanism. If you want to understand how the system works, you should check out another set of concepts. Get a deep breath, and don’t be scare of coercion.
We’ll start simple. I’ll give a few examples where you can guess (or not) JS coercion. We are going back to 2015 (ES6) - the year when JS is reborn! …
JavaScript has native functions.
In addition to primitive values, there are fundamental objects. What is the fundamental object? You cannot find it under this name in an older version of specs, because this is relatively new terminology, in the past, we referrer to them as the built-in objects (a.k.a native functions). Today, in modern programming approach, it’s better to referrer them as the fundamental objects.
The fundamental object is not a type like other types. This part can be tricky to understand, especially for beginners. …