Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mac-chaffee
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
121.
▲
by
mac-chaffee
6y ago
Do you mean in the send() function? No sorry I'm talking about a chatbot that forwards Jira comments into a chatroom, so usually the combination of the username and the message is unique enough on its own to produce a good hash for lru
122.
▲
by
mac-chaffee
6y ago
Maybe clock skew is the wrong word. Basically we'd run the script every 10 seconds, which would use the Jira API to fetch any comments made in the last 10 seconds. So sometimes Jira would return the same comment twice, causing the scri
123.
▲
by
mac-chaffee
6y ago
Maybe I'm abusing lru_cache but another use for it is debouncing. We had a chatbot that polls a server and sends notifications, but due to clock skew it would sometimes send two notifications. So I just added the lru_cache decorator to
124.
▲
by
mac-chaffee
6y ago
I think there's a tendency to believe that a microservice written by someone else can be replaced with a stub that just validates JSON or something. But in my experience, that thinking leads to bugs where the JSON was correct, but it s
125.
▲
by
mac-chaffee
6y ago
To the interviewee's credit, he specifically distances himself from this kind of situation: > Well, I'm certainly not talking about any kind of scenario where tomorrow someone just flips a switch and there are no police. What I
126.
▲
by
mac-chaffee
6y ago
One of my favorite features is pure speed, while still having a lot of functionality. If a production bug happens and I need to quickly debug, not much is faster than: - "k9s" (start the CLI) - "/myservice" (search
127.
▲
by
mac-chaffee
6y ago
My Django is a little rusty but I think now requests will return 403s by default if you forget to include the csrf_token tag: https://docs.djangoproject.com/en/3.0/ref/csrf/#rejected-req... Whereas the h
128.
▲
by
mac-chaffee
6y ago
I've found that a key part of CSRF protection is ensuring it gets added everywhere consistently. When new features need to be done yesterday and you have to review code from 20+ junior developers, it's easy to miss that extra hidd
129.
▲
Show HN: A crowd-sourced sorting algorithm in Elixir/Phoenix
(crowdsort.macchaffee.com)
2 points
by
mac-chaffee
7y ago
|
0 comments
130.
▲
by
mac-chaffee
7y ago
Great insight, thank you!
131.
▲
by
mac-chaffee
7y ago
Wouldn't the people putting out emergency website likely be local governments? If so, wouldn't there be hurdles to using cloud providers like Netlify? How do local governments usually host their websites?
132.
▲
by
mac-chaffee
7y ago
> For maximum styling control, SVGs must be inlined This was a real sticking point for me since editing and version-controlling a standalone SVG file is easier. I've had success with using Javascript to inline SVGs: https:/&#x
133.
▲
by
mac-chaffee
7y ago
The effect of pesticides and diseases on bees is a new angle I hadn't heard of before! The article ends by mentioning the water usage of almond milk, but I wish it would have contextualized that. Almond milk still uses about half the w
134.
▲
by
mac-chaffee
8y ago
I think I'd be more comfortable with customer scores if there's more "Access/Participation"[1]. Being able to see my scores, see how they're calculated, and dispute them would at least help with trust and preve