knuthsat
Joined 6 years ago
Joined 6 years ago
Whenever I try the winning font (b612, fira mono), I always go back to Liberation Mono.
It was incredible, the accent was impeccable.
If you have to chain network requests but each request depends on results of the former ones, then async/await makes it really pretty.
I have no idea how much async/await is too much.
What I do dislike is that storage loads, network requests and other things are tied to the same type, so when you look at code, you have no idea what's happening inside those async functions, but that story is for some other time.
When code is sloppily written you realize that at some point you can't use much of the existing code outside of async.
One nice example of polluting the codebase is having async local storage. Now everything that reads from the storage needs to be annotated async and now your initialization pipeline might be insanely async. Good way to avoid it is to read the whole local storage at the beginning (having a sync interface) and then everyone just reads without await.
From recent experience, I did exactly that with storage and ended up removing thousands of async annotations that were no longer necessary.
Similar "mistakes" happen for other things and then at some point you are putting loading guards everywhere because your async operations are always awaiting and letting the UI update when it should not.
Using fp-ts there is never a need for async/await and the code is still linear, (Promise is transformed to TaskEither<Error, Result>, similar to the example in the article, although you can ignore the error and just map over the result, handling the error somewhere near the end of the chain).
Problem with async/await is that the syntax is so easy that eventually the whole codebase gets polluted by it, even parts that could have been completely separated.
From the coding perspective, the problem with promises arise when there is a need to bind the intermediate results. You can either store them in an object and return that object for the next .then(fn) call, or you can nest inside a promise. I guess nesting is what annoys people the most (pyramid).
I was fortunate enough to pass everything without additional attempts and had no job at that time. Some of my friends got in after 1 year (after you fail at some step, 2nd attempt is delayed), some never managed to complete the whole process.
I started at Upwork and was constantly writing proposals and struggling with the search to find relevant jobs.
But on Toptal, even after an abrupt end of the contract I get something else in less than a week and it's zero effort from me and all effort from the Toptal team.
Even if I get bored and want a change, announcing the end of contract turns on the avalanche of offers from the Toptal team.
It's just insanely smooth and I had no idea I'd find something like that, initially.
Bitmap version of the font, I guess.
For example x^2 is in O(x^2) but is not in o(x^2).