Earlier quoted context omitted.
And the content, for anyone too lazy to click: Commenter >what's really amazing is that twitter programmers thought about this edge case and made sure the tweet would not display itself Twitter Engineer >We didn't think of this edge case. Someone did this about 7 years ago and the recursive hydration would make a tweet service crash by simply loading the tweet in a browser. It took a principal engineer an entire day…
TIL: debugging via memory dumps is a Principal Engineer level skill. Anyone here actually do this? I read about it in Release It and it sounds by far like the closest thing there is to a super power when it comes to solving production incidents. I've never actually seen anyone do it though. Recently saw a video on this technique from Dotnet Conf. Piqued my curiosity again, and now this. I've really gotta learn this.
I Made a Self-Quoting Tweet
121–130 of 145 posts
Re: I Made a Self-Quoting Tweet
#122Earlier quoted context omitted.
Graph doesn't need to cycle to hit a node twice. Good code does not visit the same node twice.
When doing recursion (Postgres recursive CTE) I keep a path on the latest edges and check to see new edges aren't already visited, so same nodes can appear in multiple branches but not on the same branch. Works flawlessly.
Edit: is this an example? https://stackoverflow.com/a/1757915
Re: I Made a Self-Quoting Tweet
#123https://twitter.com/quinetweet/status/1309684114073808896
https://twitter.com/gzhdigital/status/1309684114073808896
https://twitter.com/donkeytron200000/status/1309684114073808...
Re: I Made a Self-Quoting Tweet
#124Earlier quoted context omitted.
It’d be a simple check that anything referenced has to have a lower ID (and hence time stamp). I find this bug more interesting: > Also, it seems like Twitter doesn't actually care about the username and just resolves URLs based on the tweet ID. I'm sure lots of people already knew that but it's new to me. They’re not validating the parent directory matches the actual tweet. I wonder if that’s an actual bug or intent…
That seems incredibly brittle due to making assumptions about the ID format that twitter has no obligations to keep. It just so happens that if your logic had been if(newId > olderId) you would have survived their new format (due to the fact that the timestamp leads the integer) but that'd be a win based on pure luck. The example the engineer came up with was seven years old so it had no way of foreseeing the ID form…
Re: I Made a Self-Quoting Tweet
#125Nice. But you didn't guess someone's tweet id, the name in the url is actually not used, these three links actually all point you to the same place because they have the same tweet id: https://twitter.com/quinetweet/status/1309684114073808896 https://twitter.com/gzhdigital/status/1309684114073808896 https://twitter.com/donkeytron200000/status/1309684114073808...
Re: I Made a Self-Quoting Tweet
#126Posted at 4:20 PM :)
Funny you mention that [0] as I'm actually in Ireland so it was 9:20 PM for me. I presume you're on the US East Coast? Being able to do one of these at a specified minute would be impressive though (of course you could just _only_ try during that minute every day and you'd eventually get it). [0] I had to first check that you were referring to the main tweet and not this post because I actually posted this on HN yest…
Just makes your tweet look even more "1337".
Re: I Made a Self-Quoting Tweet
#127To save people some time, here’s the tweet: https://twitter.com/quinetweet/status/1309951041321013248 In essence, the approach was: * Find out what the tweet id is of a recent tweet * Find out what a tweet is shortly after * Estimate the rate of new tweets appearing * Publish a tweet with a reference to a tweet with a now+guess id The write up is well done and interesting but a little long winded.
Re: I Made a Self-Quoting Tweet
#128Earlier quoted context omitted.
Recursion isn't the problem. Not keeping track of seen tweets is the problem. Recursion can be used to detect cycles and traverse a cyclic graph in a way that doesn't blow up.
Irritation would probably better in terms of not blowing up your memory requirements. Just keep hashes of all visited nodes and a stack or queue of to-be-visited nodes and loop until you have no more to-be-visited nodes.
Re: I Made a Self-Quoting Tweet
#129Earlier quoted context omitted.
And the content, for anyone too lazy to click: Commenter >what's really amazing is that twitter programmers thought about this edge case and made sure the tweet would not display itself Twitter Engineer >We didn't think of this edge case. Someone did this about 7 years ago and the recursive hydration would make a tweet service crash by simply loading the tweet in a browser. It took a principal engineer an entire day…
TIL: debugging via memory dumps is a Principal Engineer level skill. Anyone here actually do this? I read about it in Release It and it sounds by far like the closest thing there is to a super power when it comes to solving production incidents. I've never actually seen anyone do it though. Recently saw a video on this technique from Dotnet Conf. Piqued my curiosity again, and now this. I've really gotta learn this.
The call chain went through GTKWebkit, Wayland and all the way to Pango and Cairo. Getting that part untangled took a long afternoon. Figuring out the root cause was another two full days.
The topmost parts of the stack above could be dealt with breakpoints, but even with pango/cairo libs from a debug build it was painful. The failing function could only be single-stepped, trying to place breakpoints inside it would not work. In the end it was an unhandled divide-by-zero deep inside the rendering library.
ß: story for another time.
Re: I Made a Self-Quoting Tweet
#130Nice. But you didn't guess someone's tweet id, the name in the url is actually not used, these three links actually all point you to the same place because they have the same tweet id: https://twitter.com/quinetweet/status/1309684114073808896 https://twitter.com/gzhdigital/status/1309684114073808896 https://twitter.com/donkeytron200000/status/1309684114073808...
The author is aware of this and has a whole section in the blog post about it..