HNHacker News
TopNewBestAskShowJobs

drinchev

3,581 karma · joined October 4, 2011

Freelance web developer, based in Berlin.

http://www.drinchev.com

[ my public key: https://keybase.io/drinchev; my proof: https://keybase.io/drinchev/sigs/DoNkf0DJhCHcuXXwrX-M5M-qqQV3NqJQJO518YFb8zY ]

submissionscomments
drinchev··on Russia to disconnect from the internet as part of a planned test
This "experiment" looks like a way to enforce DNS / caching services / mail services to store their data inside Russia. Which makes it easier for anyone with just a letter from the court to get it.
drinchev··on Show HN: Leave Me Alone – A privacy focused email unsubscription service
Btw since about 3 years I'm using lots of gmail filters ( like around 200+ and counting ) to separate mails to different labels and it kinda works.

I have lots of labels for each service that I use. They all include unicode symbol character, to visually separate it from untagged mails. For example " DHL", " UPS", " fitbit", "︎ Uber", "︎ Austrian Airlines", " O2" and others.

The logic is all e-mails coming from the specified domain e.g. dhl.com goes to the DHL label. Then another filter that takes newsletter@dhl.com which goes to newsletters and skips the inbox. This way I was able to handle the e-mail clutter and not rely on 3rd party service that I might be afraid will reduce my privacy concerns.

P.S. Ha. Bummer HN trimmed my unicode symbols anyway here is a screenshot : https://imgur.com/fpX8OLH

drinchev··on Our Software Dependency Problem
JS Code runs on so many VMs, which makes trivial things difficult. Imagine you have 10 different JDKs and you want to support all of them.

Of course you can write your own code, but you will be in a bubble then and "works for me" will be something that you say very often.

On the other hand maintaining this code means that you need to have quite solid tests for it, which means that it would be easier to just separated in a module.

Modules are published on npm. Yeah there are lots of them.

drinchev··on Why We Chose Rails to Build Gitlab
I was looking for a comment like this. I also assume the decision was influenced by GitHub which put RoR at it's high as well as what the original author ( Dmitriy ) decided to do so.

Anyway, why they stick to RoR these days is probably because they have invested too much into it ( same reason as of why FB is kinda stuck with PHP ).

This article doesn't make a lot of sense btw, since "they" ( hundreds+ people org ) did not choose anything as the reality is probably that one person ( Dmitriy Zaporozhets ) woke up one day and said "Hey let's see how far I can go with this."

drinchev··on RunJS
That's awesome. I have always wanted something like this. I was even looking for some sublime text plugins that evaluate code on the go, but was out of luck.

Some use cases :

- Coding interview

- Stack Overflow answers playground

- Instead of "node -pe ..."

drinchev··on Steve Jobs on why Xerox failed
If only they have left the Esc key.
drinchev··on Google shifted $23B to tax haven Bermuda in 2017
It's not like the companies are not in politics these days. I rarely see laws, which are not made by lobbies representing the richest people in the world. Here in EU Monsanto lobbied a controversial regulation about a weedkiller ( RoundUp ) not a long time ago [1].

If we can't have non-corrupted politicians. Who should we blame then? Maybe the people that get most benefits from that fact. Like the top management level of those corps.

1 : https://www.reuters.com/article/us-germany-politics-glyphosa...

drinchev··on Letter from Tim Cook to Apple Investors
What is worrying in addition to the global economy slowing down is the volatility and how the stock market closed 2018. I believe a new crash is imminent and I hope this time we have our seatbelts on.
drinchev··on Austria is the next country working to impose a tech tax on companies like Apple
Totally agree. I believe that having a specific category of tax for a specific type of company is something that goes hand in hand with nationalizatio. What is worrying is that these companies probably doesn’t have lobbies in all world wide government, which means that they are not able to avoid signing such bills. Most of the other ( automotive in Germany, banks everywhere, etc. )have some government handles which makes them out of that scope.
drinchev··on Making Bluetooth Work on Lenovo X1 Carbon 6th Gen with Linux
I spend 2-3 days around the holidays to revive an old HP laptop with a Debian desktop distribution. I had problems with hibernation / suspend, but what was the show stopper for me was that there is still no smooth scrolling on Linux. [1]

1: https://www.reddit.com/r/linux/comments/2qd564/why_no_smooth...

drinchev··on V8 release v7.2
Reading / maintaining / working with other people's code?
drinchev··on V8 release v7.2
The solution that TC39 voted is based on requirements that can only be satisfied by having the ugly `#`.

Namely they voted for encapsulation / hard-private [#33] as well as comparing private properties of two classes [2], which as a result makes the only possible syntax the one with the `#`.

Unfortunately this comes at the price that once browsers implement this it will become history ( same as the `with` statements [3] and `labels` with `continue` [4] ). Because of backwards compatibility these will never be removed.

Maybe in 2022 TC39 will decide that "use static-type;" will be a mode, such as strict mode, where you can write statically typed JS ( great idea, btw ), where this proposal will make no sense. Another "use class-inheritance;" mode would also finally end the abuse of prototype inheritance with syntax sugar. In this future the `#` will be just a huge annoyance.

#33 : https://github.com/tc39/proposal-private-fields/issues/33

2 : https://github.com/tc39/proposal-class-fields/blob/master/PR...

3 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

4 : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

drinchev··on V8 release v7.2
There is even an issue [1] that counts the votes for stopping this proposal.

IMHO "No solution" would be better than "bad solution" in this case.

1 : https://github.com/tc39/proposal-class-fields/issues/100

drinchev··on V8 release v7.2
> V8 v7.2 adds support for public class [1] fields. Support for private class [2] fields is planned for a future V8 release.

For those who don't know private class fields add the weird "#" character for defining them inside the `class {}` block.

    class IncreasingCounter {
       #count = 0;
       get value() {
           console.log('Getting the current value!');
           return this.#count;
       }
       increment() {
           this.#count++;
       }
    }
This looks way worse than having what TypeScript did by introducing `public` / `private` keywords. Is there any body which votes for es-next features such as this one? I wonder how the "#" private field popped up in Chrome specs.

1 : https://developers.google.com/web/updates/2018/12/class-fiel...

2 : https://developers.google.com/web/updates/2018/12/class-fiel...

drinchev··on Microsoft Edge
My best case scenario would be for Chromium codebase to be donated and governed by a board of non-profit organisation ( why not WHATWG ), which includes the major players in the field.

Doing this would be far more safe in terms of having at least some method for controlling what the engine will look like other than "hope Google don't, hope Google do..."

The only way that I can feel a bit safe when a browser engine dominates ~90% of browser base.

drinchev··on Ask HN: Which abandoned proprietary software would you resurrect?
I’ve been a heavy user of FoxPro [1] back in time. I would really love someone to make a better version of it.

Although these days you have Airtable [2] and Ninox [3] they are having different user base than good old FoxPro.

1: https://en.m.wikipedia.org/wiki/Visual_FoxPro

2: https://airtable.com

3: https://ninoxdb.de/en/

drinchev··on They Rejected Us
Sometimes rejection comes from an inside company politics, like the person that is leaving is too stubborn to approve a replacement or something similar to "we decided not to hire her, because we think she won't fit our culture, but we can't legally justify it, so it's better to just write back that she can't code".
drinchev··on Use `make` to save time
As much as I love unix philosophy and tools that follow it, I would point out that using the build tool that comes with the language is usually the better option.

Nobody would use make instead of maven [1] with Java for example. Ruby uses Rakefile instead of Makefiles. You will probably confuse lots of developers that work on your project if you do that.

On top of that Makefiles are known to be generated these days ( CMake ).

1 : https://stackoverflow.com/questions/2209827/why-is-no-one-us...

drinchev··on The State of JavaScript 2018
My bet is that Angular pushes for using TypeScript too much, which makes you wonder where to start. On the other hand ReactJS & Vue work with TypeScript, but are not designed to embrace it.

I've seen lots of questions about Angular on StackOverflow which should be classified as TypeScript questions, since they have nothing to do with Angular itself. I guess that's the confusing and non-attractive part of Angular.

TypeScript is awesome and I love to use it, but some of my clients ( freelancing ) don't want me to write TS code, since they are afraid that it will be harder to find a substitute and will increase complexity - both are reasonable arguments.

drinchev··on Show HN: Smallest Node.js Docker images
That's something that I ask myself everyday. Is it worth it to push the big O notation to the limit, saving couple of megabytes RAM or I can simply deliver and have a happy boss.

I've always been fond of "premature optimisation is the root of all evil" [1], but still... wasting resources makes me feel bad. I feel like the guy that buys 10 plastic bottles of 0.5l water instead of 2x2.5 litres.

The guys building ( owning ) Slack, cryptocurrencies, e-commerce websites are on the other end though. I hardly can count a day when my MacBook's fan doesn't spin like crazy, because I'm just visiting an HTML page to read the text.

In other words. Yeah ... you can save some precious time to optimise that, because you don't want to be the person that starts the fans of colleagues' Macs ( having a docker image with your app running on my Mac ). Energy is what you are saving and that's priceless in today's polluted world.

1: http://wiki.c2.com/?PrematureOptimization

drinchev··on Ask HN: Should I Be Ashamed to Love JavaScript?
Although most of the replies will be "No, because <REASON...>", what is more important is to find the reason that suits yourself. You can of course find :

- Libraries that makes it efficient ;

- Plenty of styleguides / do / don't rules which makes it tidy ;

- TypeScript, where JS becomes statically typed ;

- Find beginners in any other languages, although "full of beginners" is actually positive, rather than negative.

- You can feel like a real pro if you write C / C++, but you will rarely be hired to make a REST API with that stack and you will not be hired to create a web app with it. So your statement might be more accurate if you say "Web development is downplayed as a newb", which is obviously wrong. Sure I would not recommend to write a database based on NodeJS or a search engine, or a space shuttle program, or a ... you name it, but you can't write with anything else ( at least serious ) than JavaScript or something that compiles to JS, for web development.

- Cool is also relative. I was writing Perl for 6 years, before I run out of job prospects and switched to NodeJS.

drinchev··on GitLab Made $10.5M in Revenue with Every Employee Working from Home
It's almost everywhere the same for remote gigs. I guess a way to "trick" that system is to find a remote gig as a tourist and then go back where you want to live originally.
drinchev··on React Hook recipes every day
Is there any benefit of using hooks with stateless components versus just having a class component?

Can't reusability come via abstract components, instead of hooks?

drinchev··on Linus Torvalds announces Linux (1991)
Although I’ve read this probably a dozen times. What I think about this today, as I’m about to reviel my next project is that it’s so crazy how things evolved for open source. Nowadays people compete with companies and having an announcment like this usually includes :

- website explaining as a pitch what is better about your software

- ready to use examples and templates to support your claim

- branding with a logo that makes you look more professional

- issue tracker

- github repository ( even mirror of yours )

- bugfree software ready for production from day one.

And many more which I probably miss.

Writing something “cool” nowadays is not enough to be taken from the folks seriously.

drinchev··on Stop using JWT for sessions (2016)
What's the point of having a token if you need to check it with a database on every request?

Instead of `SELECT isValid from tokens where token="<TOKEN>"`, why not `SELECT user from sessions where session="<COOKIE-SESSION>"`?

drinchev··on Stop using JWT for sessions (2016)
I bruteforce a password for your JWT-enabled app. Then I have a token. Copy the token from my browser ( usually just open Network tab at the inspector and copy the headers for the request ). Then I store the token at my server and make it execute a request to the app on intervals to prevent from expiring ( reissue ) the token.

How can you invalidate my server now?

drinchev··on Stop using JWT for sessions (2016)
Top reason for me always was :

> You cannot invalidate individual JWT tokens And there are more security problems. Unlike sessions - which can be invalidated by the server whenever it feels like it - individual stateless JWT tokens cannot be invalidated. By design, they will be valid until they expire, no matter what happens. This means that you cannot, for example, invalidate the session of an attacker after detecting a compromise. You also cannot invalidate old sessions when a user changes their password.

> You are essentially powerless, and cannot 'kill' a session without building complex (and stateful!) infrastructure to explicitly detect and reject them, defeating the entire point of using stateless JWT tokens to begin with.

drinchev··on Stop using JWT for sessions (2016)
What about a stolen user password and an actor, who already uses your token? Can the targeted user kick him out by resetting his / her password?
drinchev··on Ask HN: Why gmail and Facebook websites are so slow and buggy?
Because software these days is crazy complicated. You would expect lots of features from any web app that you visit :

- Autocomplete for most used items ( emails, users, etc. )

- Some real time tagging / categorising feature

- Confirmation blockers on dangerous actions

- Undo button for almost any action

- Fine-grain privacy related functionality

- Text editor with features, which renders whatever you type nicely formatted

- Tons of helpers, video playback functionality, photo gallery, photo uploads, etc.

- All of the above free and because of that, tons of analytics included in the page, which show you a relevant advertisement.

Yeah if you don't like all this you can replace Gmail with Mac's mail app or any other program that sends / reads mails.

You can also replace facebook website with the app on your phone.

But you can't have all those features run fast on slow computers and a slow computer for me these days is something < 16GB RAM or < i7.

drinchev··on Astronauts escape malfunctioning Soyuz rocket
There are currently 3 people in space [1] and they are there for 127 days on the ISS.

Serena Auñón-Chancellor

Alexander Gerst

Sergey Prokopyev

1 : https://www.howmanypeopleareinspacerightnow.com

← PreviousPage 3 of 30Next →