Declarativity Comes at a Price

There is a widely held notion, and I agree, that declarative code is better than imperative. It is less error-prone, usually much more eloquent and neat and thus much more maintainable. It is a good principle to follow on a day-to-day basis when you use existing declarative libraries like the JavaScript standard library (Array/Object methods etc.), underscore/lodash or React. However, when it comes to making a decision to either write some declarative code (and therefore much more generalized) or just leave an imperative ad hoc solution, I suggest thinking at least twice.

Every algorithm has specific complexity; not only does it have computational complexity (declared by means of time/memory it takes to run on different input sizes), but also a complexity of writing and understanding the code that implements it. The latter primarily falls to programmers who work with the code, and in the world of budgets and deadlines is also a valid point of concern.

What I state in this article’s title can be split in a few theses.

Орегон и Северная Калифорния

В конце каждого 3-месячного модуля студенты Columbia West College отправляются на недельные каникулы. В прошлый раз я ездил исследовать Bay Area, в этот раз — решил поехать дальше, в Портленд, штат Орегон. Расстояние по Interstate-5 от Лос-Анджелеса до Портленда — около 960 миль, то есть полторы тысячи километров. За день проехать можно (и поначалу казалось, что придётся по пути назад), но сложно, поэтому первая остановка была в Bay Area, в городке под названием Hayward — чтобы заодно повидать напоследок друзей, живущих неподалёку, в Бёркли.

I-5, в отличие от легендарного и живописного Highway 1, идущего по побережью Тихого Океана, дорога прямая и скучная. Как только выезжаешь из Лос-Анджелеса и проезжаешь первые горы, начинаются калифорнийские поля (похоже на Ростовскую область или Краснодарский край, только есть горы на горизонте), виноградники и плодовые сады (ни на что не похоже). Температура в тени на этот раз была сумасшедшая, около 40 градусов выше нуля. На улице баня! Легендарная калифорнийская жара наконец-то показала себя во всей красе — чем дальше вглубь континента от океана, тем жарче. И эта температура относительно нормальная для лета в Калифорнии.

Продолжение про природу, климат, людей и другие детали поездки

What Are Your Career Goals?

I’ve recently joined a developer community dev.to. It is a really nice place where people spur discussions and ask questions that are not only related to technologies and software development but are incredibly important as well, for us as human beings constantly looking for meaning in life. One of these questions is moving: “What are your career goals?”

I’ve spent a decent hour writing and polishing the answer and it turns out to be so important and concise that I’d like to publish it on my own website. Publish in order not to lose it, share it with people who’re interested in me and emphasize this incredibly important reasoning I’ve happily derived from my latest experience. I hope my thoughts might be even helpful for those who constantly question their careers and even themselves.

Read the answer to the one of the most important questions in a developer’s life

Why Capitalists Lie

Warning! This is an essay written as a part of my English Listening & Speaking course in Columbia West College. It may contain mistakes I had made with no reason to fool anyone but by accident. The main reason for this essay to exist is the need to excercise in writing convincing and well shaped pieces of text. Please, don't use it as a source for your studies or cite as a proof of anything. All of the written below is my personal biased opinion not suitable to rely on.

Milton Friedman once said, “The poor stay poor not because they’re lazy, but because they have no access to capital”. Even though it seems to be obvious from a capitalistic standpoint, I claim that capital can only help after the system itself will have been transformed from within.

I understand the feasible influence of your opinion and wish to keep on reading

Первая неделя в Лос-Анджелесе

В начале прошлой недели я переехал в Лос-Анджелес, чтобы учить английский — на полгода, если следовать первоначальному плану. Цели перебраться сюда (в США) насовсем у меня не было и нет, но мысли такие, разумеется, проскакивают. В мечтах, взявшихся преимущественно из сериала Californication и отчасти из поп-культуры вроде клипов и маек из Pull & Bear, Лос-Анджелес представлялся райским местом. Мегаполис с вечным летом, на берегу океана, в Южной Калифорнии. На деле всё оказалось, естественно, не совсем так.

Лос-Анджелес (а точнее весь округ, LA County) очень большой, размазанный по побережью и предгорьям. Живут тут преимущественно в частных домиках, как и везде в Америке (это вам не Манхэттен!). Все ездят на машинах. Людей на тротуарах нет! Конечно, есть подходящие для пешеходов островки жизни, но их я пока нашёл всего несколько штук. Скамеек на улицах нет, сидит народ только в уличных кафе, но и тех на улице раз-два и обчёлся. Не Италия.

Читать дальше про климат, людей, цены, язык — с картинками

Explore, not Judge

During almost all of my life, I used to judge everything I encountered. Among usual subjects to judge were people with their decisions and opinions, computer technologies, books and movies, ideas from anyone and anywhere, even the vaguest ones—that were better to explore rather than evaluate. Short story long, I’ve thought I knew everything and tried to live according to that principle. Anytime I was hit by anything new, I tried to do my best just to fit that event into the system I was already familiar with. My own judgment and decision-making matrix.

Whether the event was positive or negative, brought me something useful or hurt, I was instantly up to put a particular label onto it. Just good or bad. Nothing worth craving. Too shallow or way profound for such a simple idea. Stupid. Jerk. Asshole. Or even the-future-mother-of-my-children-and-fuck-what-you-could-think-about-it. As you’ve probably noticed already, I was hardly to be called an easy-going positive thinking person. And despite the fact I hate self-help crap filled with affirmations, the way I used to perceive the world was neither useful nor pleasant.

Find out what I realized about perceving the outside world

Abandoning Blogging

I’ve tried to maintain a blog a few times during the last 8-10 years. First, I had nothing to write about. Then I had a great idea to write about projects I’ve been working on as a freelance developer, but I haven’t had enough really good projects to be proud of. Neither I had enough passion to write about my job because it turned out to be another job itself and take too much time for a guy who earned money for coding, not writing. I also tried to write about my personal experiences, particularly in Russian, which was probably a good idea, but I abandoned it quickly.

About a year ago, in the beginning of 2016, I took another attempt to write. That time, it was about my experience as a professional software developer at Yandex. Potentially, the job and tasks I was responsible for were, and still are, very interesting. Sometimes hard and sometimes not, with tough and loose deadlines, all of them were more about juggling with lots of different parts: figuring out what to do; decomposing projects into individual tasks; managing people to make them understand the meaning of the task, and finally making sure they'd done the job as was intended. I was a manager, not just a developer who had lots of time to spend on coding. But I wanted to write about coding challenges actually not having them in real life! That attempt failed too.

Proceed to my reasons to abandon blogging

Weekly interesting reads on science, self-development and maintaining a non-commercial open-source project

Today I share with you the list of non-development articles which I collected during the last few weeks. There's a very interesting narration by Remy Sharp about his experience in creating and maintaining JSBin, useful articles on time perception and human psycology, some intriguing physics discoveries and wonders of the nature and finally a link to the NYC pictures pinned to the map.

Proceed to reading

Developer's bookmarks #1: progressive web apps, automated testing pyramid, thoughts about good code and some CSS fun

This time I decided to separate all related to software development stuff from personal and other things that are interesting but are off the topic.

Here is a huge list of articles which I, by means of some unknown magic (even for me!), could read in the course of the past week. The most interesting and fun story which I'd like to start with is the history of the blink tag. This is an amazing read of the kind I like most of all: an amusing story on something very related to me and my experience (of course, technologies and guys who invented them). Must read for everyone!

Proceed to a huge list of notes on web apps, automated testing, CSS, variable declaration types in JavaScript and so on

Bookmarks #2

This week's bookmarks list can be way more interesting for programmers than the previous one because there's one very interesting historical narration and some links about front-end development. There're also some links for those who like science and is interested in world's experience of avoiding traffic jams.

Read more about e-mail history, birds and something else

The splice error pattern

Imagine you’re writing an algorithm which performs looping over an array with any type of pointer (for or while loop, forEach, map etc). Each iteration the pointer moves in any direction, but you never force it to come back in the most of cases. Why should you? This mode of manipulating data is so much usual that your probably have never ever thought of its liability to hard-to-find annoying errors which will lead you toward wearing debugging!

The erroneous pattern is very simple and obvious. Say you need to map some action to all array elements and write.

Already understood what happens?