Oleg Romanovskyi

The experienced  Software architect NodeJS developer AngularJS developer

I already wrote about words count challenge. And couple weeks later I found another one about words. You can read detailed description, but the quote below is enough in most cases.

For the purposes of this problem, we define an English word as a word from the list included here as words.txt. (If you're interested, it's the SCOWL “insane” dictionary with flattened diacritics.) Membership in the dictionary is case-insensitive. You have to write a program that can answer whether a given word is English. This would be easy — you'd just need to look the word up in the dictionary — but there is an important restriction: your program must not be larger than 64 KiB. We don't think it's possible to write a program that fits in 64 KiB and always gives correct answers. But we don't require 100% correctness. For every program we will measure how often it answers correctly, and the most precise solution shall win.

I decided to spend some time to stretch my mind. Unfortunately, I wasn't on vacation, so the amount of time available was pretty limited. But it was fun, even though there's plenty of people beat my result. I found some weak areas in my approach to problem-solving. Here's what I did good and bad.

More

A lot of web applications start as simple as "take data from DB and apply some template". But more CPU and time-consuming tasks occur as time goes. It can be large photos processing for a photo gallery, sophisticated reporting, massive sending of emails, etc. That's where single threaded nature of node.js and its browser roots become a flaw.

More

Any application you write requires a configuration storage. And nodeJS applications are not an exception. Most typical config storage for node apps is a config file. It seems pretty simple at first glance but a lot of details and edge cases.

Let's check often used config approaches with their advantages and disadvantages.

More

Recently I found an article about word counting challenge. With unexpectedly bad results of nodeJS. Performance in handling of multi-gigs data set doesn't matter for most node-based web applications, but it still a fun challenge and a nice way to understand nodejs limitations.

I recently compared the performance of nodejs and c++ applications in iterating through a large memory buffer with performing of simple math on each byte. I got approximately 6x time difference. That's the difference I was ready for. But in word count challenge the difference is more than 15x.

Let's check how to get more than 6x performance improvement.

More