Live data from Hacker News

I Made a Self-Quoting Tweet

oisinmoran.com

121–130 of 145 posts

Re: I Made a Self-Quoting Tweet

#121

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 did this in my second year as a professional coder and it took me a while (a week? a week and a half?) to understand what to do and what I was seeing. I would prefer never to have to do it again.

Re: I Made a Self-Quoting Tweet

#122

Earlier 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.

Can you provide an example of this? I’d like to understand this technique.

Edit: is this an example? https://stackoverflow.com/a/1757915

Re: I Made a Self-Quoting Tweet

#123
Nice. 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

#124
post #83
post #79

Earlier 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…

It's a good point but I would suspect that the timestamp being prefix is no accident. If your IDs were sortable in the past it's probably a good a idea to keep them sortable. And since tweets more often than not refer to tweets in the same time range or are paginated together with tweets in the same time range (roughly) having time as a prefix has other advantages

Re: I Made a Self-Quoting Tweet

#125

Nice. 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..

Re: I Made a Self-Quoting Tweet

#126

Posted 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…

I actually thought it was intentional also and I think every east-coast US person is going to think the same :)

Just makes your tweet look even more "1337".

Re: I Made a Self-Quoting Tweet

#127
post #17

To 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.

Long winded but appropriately so given the technical nature of the article.

Re: I Made a Self-Quoting Tweet

#128
post #69

Earlier 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.

I think you meant "iteration", not "irritation".

Re: I Made a Self-Quoting Tweet

#129

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 remember spending quality time with coredumps and gdb back in 2012/2013, when a prototype supercar dashboard we were building crashed on certain CSS animations.[ß]

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

#130
post #125

Nice. 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..

My bad! I missed the one sentence where he says that. And I even read it twice... need more caffeine.
Post reply on HN