Well, it's plain and simple to express: Err and err and err again, but less and less and less.
As a web developer, I frequently use a lot of command line tools to make my life easier. I prefer to be able to assemble a computer from whatever hardware I want, so I don't like Macs and stuff like this. Linux desktops are good enough our days, but I love to play video games from time to time, and it wouldn't be effortless to keep two different operating systems for work and entertainment. My best compromise was to use Windows.
But Windows command line sucks. It sucks a lot. And I don't talk about the `cmd` shell — it's ridiculous to talk seriously about it in 2018. A little bit more modern command line attempt of Microsoft, the `PowerShell`, has a lot of power, but it lacks the elegance and composability of Unix tools. It's a whole new world where you need to learn funny wtf commands like `Remove-Item dir -recurse` to make the simplest things happen. And, of course, nobody outside the geostationary orbit of Microsoft supports this. To be productive with a command line in Windows you need to do some research, and your road won't be dull.Read more
Who needs all those paid certificate providers while we have such a brilliant project as Letsencrypt? It allows a domain owner to obtain a valid certificate for his domain in a matter of seconds without the boring stuff like generating CSR, making DNS verification records or even passing documents to the certificate issuer center. However, paid certificates most often have an expiration time of a year. And free Letsencrypt certificates live only for a couple of months. But it's definitely not a huge problem if there is a way to automate the renewal process. And there it is.Read more
The 2017 year was good for me. It's the second year in a line where I fulfilled all my new year resolutions, which is inspiring. That's why I decided to write a bit about it. The year totally earned it :)
I'm a married man now. I have such a beautiful wife! (and still can't fully believe that). But I don't see any changes inside me: I think I married her in my mind long before that, but it's great to have a real ceremony and to eat a real cake! :) The day before the wedding I fell from my bike and got a severe knee injury. I'll never forget dancing the waltz all in bandages like a mummy, with terrible pain and only one leg working fine, but it was worth all the efforts.Read more
Books were hard to get at a time when I was a kid. They were expensive and, moreover, there was a complete lack of them. Many people owned no books at all, and some other copied them manually (by hand). But there always were a lot of books in our family, and it was shocking to me back then — to see no books at all in a room.
Not all of the books from our family collection were good. Most of them were pretty cheap detectives and other silly novels from barely known authors. The only thing they were good at is the creation of the warm relationships between me and the book species. But among this mess, there were a lot of hidden treasures.
Once I spotted that my father left the book he was reading at that time, on the table. I, for some reasons, thought that I'm not allowed to read or even touch adult books as I was a nothing but the little child. No one was near, and I dared to take it and read it, secretly. It was «Lord Valentine's Castle» by Robert Silverberg.
To my astonishment, it was not too different by its nature from what I've read before. It was way better than all these child books, so I fell in love with it from the first pages. I was reading this book secretly for a long time as I wasn't alone most of the times and not every day I was even aware of the location of this book.
I think that at some point my secret love affair with this book was spotted by my father. He said nothing about it, so I'm not sure if that was the trigger. But sometime after that, he offered me another book from his collection of science fiction to read. It was the «Deathworld» by Harry Harrison.
From that time I created a personal ritual for reading. Every evening, I take a fruit or two, go to bed, take a book and read it for an hour or two. That was the time I first met Heinlein, Simak, Asimov, Zelazny, Sheckley and other cool guys I owe so much for my very own personality, consciousness and the way I see the world now.
Managing the state of an application with libraries like `redux` is awesome. It provides a really easy way to write simple and testable code for state transitions. You only need to decide on a structure of the desired state and write a corresponding pure function.
There is no doubt that a reducer could look super simple in the cases like the following one:
Our main task as developers is to keep all reducers as simple as possible. Simple reducer is easily understandable and it's not a big deal to write a couple of helpful tests for it. But the state grows bigger and becomes more and more complex as we add more cool features to our apps. We need a technique to hide this complexity somewhere.
Every reducer is just a common pure function. No magic at all. Therefore it's possible to write such a reducer function which will take a set of other reducers on its input to produce their results in a combination of some sort. Let's look at a few examples:Read more
Letsencrypt is an excellent service for obtaining totally free security encryption certificates. Fortunately, it also has a marvelous client named Certbot. Let's install it.Read more
Why yet another one tutorial?
A single-page application (SPA) is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience similar to a desktop application.
- What language should I use?
- How I should manage my dependencies?
Can I just copy them to the project? Or should I use git submodules? Maybe I could make a use of some package manager (npm, bower)?
- How should I assemble my code for frontend?
Isn't the old good «just concatenate them all» the best one? Or should I use browserify? A little bit of webpack?
- How should I use styles?
Can I just add a style tag with an external css to my HTML file? Or should I use something more complex like BEM? Or can I just inline it?
- What framework should I use for my application base?
- How should I manage the data in my application?
A lot of buzzwords here. Flow? Redux? Relay? MobX? Can't I just do it the old good way (like my father and his father did)?
- Can't I just shoot myself in the head instead of diving into this mess?
You should understand: sometimes you can definitely say that the tool named A is better than the tool named B. But sometimes you should also choose from tools with comparable awesomeness — just take the most beautiful one (as you see it now).Read more
- What language should I use?