Remote was not that popular just a year ago. Is your memory good enough to remember that dark age, hm? As an old fanboy of the remote first culture I remember having endless conversations on this topic with my colleagues, team leaders, bosses and CEO-s of other companies where I did consulting jobs. Many words about “special magic” of the office space and security issues have been said back then. I was not denying them, but making a statement that all of the raised questions are answerable while possible benefits of remote first approach can beat any disadvantages 100 times. Yet offices kept growing. …


About 2 years ago I wrote an article about making friendship between create-react-app generated application and simple HTTP server written on Golang. Here is a link to it: https://medium.com/@kimrgrey/integration-of-create-react-app-into-golang-server-47074b8dcd7d. As it was mentioned in responses there new release of create-react-app made asset-manifest.json almost useless. It contained all the assets names generated by Webpack, but it was not possible to determine which ones are entry points there and should be used to construct HTML file and which ones are just chunks. As a result approach described in original article become irrelevant and not working.

For a while no fixes for this unfortunate issue were done. But in September of 2019 following PR has landed to create-react-app: https://github.com/facebook/create-react-app/pull/7721. Let’s look if we can use it? …


Recently reviewing few different projects I’ve noticed that method has_secure_token provided by ActiveRecord is used a lot here and there for different kind of situations where it’s actually not very good idea to use it. Specifically, different scenarios of email / role confirmation or even some user authentication flows.

TL;DR. Please, do not use this method for generating reset password tokens or anything like this. That’s it. Now if you would like to know more about why not and how you could replace it then everything written below is for you.

My guess is that a lot of misunderstanding around has_secure_token is coming from another helper method available in ActiveRecord models and called very-very much similarhas_secure_password . …


Lately I’ve been spending all my evenings and nights on classic ETL process development. We in Spectoos are migrating users and their data from original version of the app which exists for many years to completely new version we developed recently which is in private beta currently. It’s quite complicated multistep process since our new implementation has completely reworked model under the hood: improved and enriched in comparison to what we had previously.

ETL = Extract, Transform, Load

From the beginning it was decided that once development will be more or less finished we provide some of our users ability to switch and give us some feedback without loosing their access to Spectoos 1.0. And it was important to keep in mind that, as a consequence, migration is not going to be one time process. First of all, because users who participate in beta can keep using Spectoos 1.0 and we somehow need to keep their accounts synced. And secondly, because migration never being successful from first attempt. …


Let’s say you have API which you want to be available for multiple consumers. For example, your clients are mobile application and web. What do you use for communication between server side and client side developers? You may write down documentation in plain text, use some spreadsheets or whatever you prefer. It’s ok while it works. But it’s good to know that there is pretty standard way for such kind of things — Open API. Previously known as Swagger. You also have other options such as enforced data schemas (gRPC, thrift) or even GraphQL. …


With time and practice I found out that usage of additional shortcuts available in Rails for routing (such as resources, or member , or collection ) usually makes more damage than good. Especially when project grows up and file config/routes.rb become pretty nice and self documented way to find out which endpoints are available and what goes where.

In addition to my native feelings about such shortcuts recently I got a task which required separation of available endpoints on “read” and “write”. It was needed to put them under different constraints in URL-s. As a result, for every resource :something actions index / show were supposed to go here and create / update / delete — there. Service had not so many routes so I splitted them by hands. Code review went well. All tests passed. But who believes that green tests are guarantee for production well being will never sleep well at night, right? …


I’m not devops or admin. My day to day job is software development. Mainly back-end (Ruby / Golang). Sometimes front-end (React). Additionally I’m dealing with databases, API-s, all the stuff. And I’m here to say that truthfully speaking nowadays it’s not needed to have any knowledge about infrastructure or deployment strategies if you just want to run another one web app. So, why should we, developers, care about devops?

For the beginning, let’s admit that PaaS platforms like heroku.com or now.sh are amazing game changers. They reduced cost of infrastructure support for initial stage of the project dramatically. If you just want to test an idea or launch simple utility which will make your life easier you can get it up and running with almost zero effort. During my career I’ve seen companies which were able to built their successful online businesses from scratch without having in-house admins or devops for pretty long period of time just by using PaaS. …


UPD: Since this article has been published in 2018 a lot of changes were done to create-react-app. Some of them were breaking an approach I described here. So recently I published a new article, which contains all the fixes required to make everything work again. Here it is: https://medium.com/@kimrgrey/integration-of-create-react-app-into-golang-server-in-2020-1aff6e93ee5a. It’s still better to start from this one, since it describes in details the idea itself and only after switch to the second one, to know what has to be changed to make it work in 2020. Have fun!

Nowadays create-react-app is de-facto official and definitely most popular way to initialize React.JS application. Truthfully speaking, it solved a lot of problems. …


Hey, pal!

I’ve heard you has been offered to be promoted and your company is actively hiring now. Wanted to talk with you about it.

Even during my student being there was no doubt that software development is a kind of stuff I can, know and love to do. Even after many years in front of keyboard making code is still my job and my hobby in the same time. It’s great, isn’t it? And, as for me, this is the basic recipe of being free. This is your “don’t give a fuck” kind of ticket to the life. What does it mean? …


Hi, bro!

What’s up? How is it going? Hope, you are well. Yes, I know you don’t like long texts as any busy person today. Twitter is our everything. But story which took about 2 years deserves few words, right? Please, take a look at this stuff and think about it for at least a second. I think it’s important and would like to discuss.

Let me start the story from the beginning. About 2 years ago I joined amazing company to be smallest and most useless person in the team. Working with guys who designed and created everything around was pure happiness. I learned a lot each day. After half of the year it has come to my mind that maybe I can help to improve one thing — how everything looks and how it feels. I’m not the best front-end engineer you have ever seen, bro, believe me. But I know few of them. After couple of conversations with great people from my network I found right designer who understood what should be done after 5 minutes of Skype call. …

About

Sergey Tsvetkov

Let's get it up and running 👌

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