Daily 374th day streak
WTF 35% acceptance rate for easy???
Btw to me problem was not hard, if you just go and do bruteforce. So go for it, it has pattern.
https://leetcode.com/problems/find-the-largest-almost-missing-integer/description/?envType=daily-question&envId=2026-08-18
#daily #easy #pattern
WTF 35% acceptance rate for easy???
Btw to me problem was not hard, if you just go and do bruteforce. So go for it, it has pattern.
https://leetcode.com/problems/find-the-largest-almost-missing-integer/description/?envType=daily-question&envId=2026-08-18
#daily #easy #pattern
❤3
Legend. After doing low level kernel stuff with rust, ebpf with c, semi custom tls psk with custom pki. I agree with him.
“Just do actual thing, actual programming“😁
https://youtu.be/2jqS7wN-yzs?is=hKYv1LzVn6WwswD0
“Just do actual thing, actual programming“😁
https://youtu.be/2jqS7wN-yzs?is=hKYv1LzVn6WwswD0
YouTube
The Problem with the Web
Jonathan Blow explains what is wrong with the web.
Tip me: https://ko-fi.com/blowfan
Jon's Twitch: https://www.twitch.tv/j_blow
Tip me: https://ko-fi.com/blowfan
Jon's Twitch: https://www.twitch.tv/j_blow
❤3
andreyka26_se
Legend. After doing low level kernel stuff with rust, ebpf with c, semi custom tls psk with custom pki. I agree with him. “Just do actual thing, actual programming“😁 https://youtu.be/2jqS7wN-yzs?is=hKYv1LzVn6WwswD0
I am myself web dev to some extent, at least I was, and I dont find it insulting or something for some reason - more like funny. Maybe I like the guy, he has low level c aura.
Dont get me wrong, there is actual complexity in backend and frontend to keep code easy to read and update.
BUT, you all probably saw https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
Which is good example of making flexible and extendable things that do not need it, and putting all tons of SOLID/patterns where they are not needed. It is like applying DDD and clean architecture for btree impl(I was doing that at some point)
Dont get me wrong, there is actual complexity in backend and frontend to keep code easy to read and update.
BUT, you all probably saw https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
Which is good example of making flexible and extendable things that do not need it, and putting all tons of SOLID/patterns where they are not needed. It is like applying DDD and clean architecture for btree impl(I was doing that at some point)
GitHub
GitHub - EnterpriseQualityCoding/FizzBuzzEnterpriseEdition: FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz…
FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes. - EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
❤3
Daily 375th day streak
Pretty easy, just you should be careful to not hit Memory Limit Exceeded (check the comments)
No pattern though.
https://leetcode.com/problems/cinema-seat-allocation/description/?envType=daily-question&envId=2026-08-19
#daily #medium #nopattern
Pretty easy, just you should be careful to not hit Memory Limit Exceeded (check the comments)
No pattern though.
https://leetcode.com/problems/cinema-seat-allocation/description/?envType=daily-question&envId=2026-08-19
#daily #medium #nopattern
❤2
We were all talking about the AI costs. Today I realised what is my number😁
❤1
How much I spend a month (corpo only, not personal)
Anonymous Quiz
17%
50 usd
16%
200 usd
13%
500 usd
23%
1000 usd
16%
2000 usd
8%
5000 usd
7%
10000 usd
🤯5
andreyka26_se
How much I spend a month (corpo only, not personal)
So yea, I am spending on average 1k usd. Which seems crazy to me tbh. I never even thought about it, as for personal development I have 20$/month sub.
But here we go, I know one guy, ic1/jun position. He is spending 10k USD A MONTH.
Like wtf is that😁😁😁 what is he even doing, I have seen PRs
I think this is the point when some companies might rethink tokenomics
Because due to this 10k spending - you spend even more tokens to understand and review this - you spend even more money on cicd for that, as number pf PRs dramatically increased. And then you spend even more tokens for oncall after this code.
But here we go, I know one guy, ic1/jun position. He is spending 10k USD A MONTH.
Like wtf is that😁😁😁 what is he even doing, I have seen PRs
I think this is the point when some companies might rethink tokenomics
Because due to this 10k spending - you spend even more tokens to understand and review this - you spend even more money on cicd for that, as number pf PRs dramatically increased. And then you spend even more tokens for oncall after this code.
🤯6👍3❤1
andreyka26_se
Need to explain these stats, I was talking with one guy, who is doing target, and he assumed I wanted to do a marketing campaign or something and while I was sleeping "he tried" some stuff to see how it goes. so from 995 -> 1049 subs: these might be some…
Probably half of them were bots from some farm, as I got like huge spike of unsub back. Which is I am happy, we dont need bots here.
❤5
Daily 376th day streak
Bullshit problem tbh, took me much more time to understand description than actually code it up.
Just follow blindly and formally the description, you don't need to understand the problem and build the mental model for it.
No pattern.
https://leetcode.com/problems/distribute-elements-into-two-arrays-i/description/?envType=daily-question&envId=2026-08-20
#daily #easy #nopattern
Bullshit problem tbh, took me much more time to understand description than actually code it up.
Just follow blindly and formally the description, you don't need to understand the problem and build the mental model for it.
No pattern.
https://leetcode.com/problems/distribute-elements-into-two-arrays-i/description/?envType=daily-question&envId=2026-08-20
#daily #easy #nopattern
❤3
andreyka26_se
Hopefully somebody is interested. This is what is going on in the kernel for blocking socket.read() -> blue line Blocking -> means the thread in usermode that called it goes to sleep up until there is ready response in socket buffer. Then interrupt (push…
Now, how your nodejs/python/c# ASYNC AWAIT WORKS???
Under the hood, on the kernel level it is done via epoll. Epoll is specific kernel construct that can watch MULTIPLE blocking calls, e.g. multiple socket FDs and their .read() or .accept().
Before in blocking example, thread got blocked during .read(). It means it will wake up only when wait_queue of socket itself will be triggered by interrupt.
In THIS example, we are blocking the thread only on epoll_wait(). For that we have specific epoll wait_queue, that is interrupted by ANY FDs that were registered to epoll.
Now, how registration works? Whenever you create socket fd -> you are adding this fd to epoll red-black tree and connecting epoll callback with socket wait_queue. You can do that with MULTIPLE SOCKETS, thus waking epoll on earliest update.
It is pretty much JS event loop approach.
Now socket wait_queue gets interrupt and triggers epoll wait_queue and code gets update. Then we read socket buffer
#kernel #network
Under the hood, on the kernel level it is done via epoll. Epoll is specific kernel construct that can watch MULTIPLE blocking calls, e.g. multiple socket FDs and their .read() or .accept().
Before in blocking example, thread got blocked during .read(). It means it will wake up only when wait_queue of socket itself will be triggered by interrupt.
In THIS example, we are blocking the thread only on epoll_wait(). For that we have specific epoll wait_queue, that is interrupted by ANY FDs that were registered to epoll.
Now, how registration works? Whenever you create socket fd -> you are adding this fd to epoll red-black tree and connecting epoll callback with socket wait_queue. You can do that with MULTIPLE SOCKETS, thus waking epoll on earliest update.
It is pretty much JS event loop approach.
Now socket wait_queue gets interrupt and triggers epoll wait_queue and code gets update. Then we read socket buffer
#kernel #network
❤4👍2
andreyka26_se
We found the root cause. I mean one senior in US (blindly or not) did a fix and it helped. However it shouldn’t. Then I investigated why it helped? And it took me 4 hours of checking how rust runtime and thread pool works internally, what kernel does with…
So before we deep dive into that bug, lets recall again.
Blocking .read -> puts the task to sockets file descriptor wait_queue -> later on interrupt from NIC wakes this task by going to this wait_queue and call .wakeup()/marking task runnable.
Non-blocking .read with epoll - does not block, if the receve_queue (read buffer) in socket descriptor is empty it will return EAGAIN instead of blocking the thread. The blocking part is on epoll_wait -> that parks the task in epoll waiting queue (not socket fd waiting queue). And gets woken up by socket wait_queue task being calling epoll callback that wakes up epoll wait_queue task.
This way, epoll can “react” to any interrupt on any socket fds, not just single one (it has many of them), while blocking .read() will wait for this specific socket wakeup only.
Blocking .read -> puts the task to sockets file descriptor wait_queue -> later on interrupt from NIC wakes this task by going to this wait_queue and call .wakeup()/marking task runnable.
Non-blocking .read with epoll - does not block, if the receve_queue (read buffer) in socket descriptor is empty it will return EAGAIN instead of blocking the thread. The blocking part is on epoll_wait -> that parks the task in epoll waiting queue (not socket fd waiting queue). And gets woken up by socket wait_queue task being calling epoll callback that wakes up epoll wait_queue task.
This way, epoll can “react” to any interrupt on any socket fds, not just single one (it has many of them), while blocking .read() will wait for this specific socket wakeup only.
🔥3❤1
andreyka26_se
We found the root cause. I mean one senior in US (blindly or not) did a fix and it helped. However it shouldn’t. Then I investigated why it helped? And it took me 4 hours of checking how rust runtime and thread pool works internally, what kernel does with…
The root cause was essentially the following: tokio runtime (shortly: rust multi threading async/await) was expecting socket calls to be non-blocking (via epoll). But socket was blocking one (by default), so every new connection put thread to sleep for duration while it waits for blocking .read().
Single runtime had , lets say 10 threads. So once we have 10 threads, 99% of the tome they are sleeping, then wake up for few ms, process result of blocking read and go sleep again.
No free threads to handle new connections.
Single runtime had , lets say 10 threads. So once we have 10 threads, 99% of the tome they are sleeping, then wake up for few ms, process result of blocking read and go sleep again.
No free threads to handle new connections.
❤3
andreyka26_se
The root cause was essentially the following: tokio runtime (shortly: rust multi threading async/await) was expecting socket calls to be non-blocking (via epoll). But socket was blocking one (by default), so every new connection put thread to sleep for duration…
Once socket was switched to non blocking, it started using epoll mechanism, and threads were free to go and process much more than 10 connections.
❤3
andreyka26_se
Now, how your nodejs/python/c# ASYNC AWAIT WORKS??? Under the hood, on the kernel level it is done via epoll. Epoll is specific kernel construct that can watch MULTIPLE blocking calls, e.g. multiple socket FDs and their .read() or .accept(). Before in blocking…
Now I am switching to another level of bullying people about async/await😁
🔥3❤1
andreyka26_se
Now I am switching to another level of bullying people about async/await😁
No offence to JS folks, it is just joke, I am JS dev to some extent as well.
And it will be the same question about async state machine for dot net, and event loop in python.
But probably not that many people went SO deep about async await. But you are the ones who know now.
I hope some of you would destroy interviewer that will ask about async await. Share such stories here please.🙏
And it will be the same question about async state machine for dot net, and event loop in python.
But probably not that many people went SO deep about async await. But you are the ones who know now.
I hope some of you would destroy interviewer that will ask about async await. Share such stories here please.🙏
❤4