Live data from Hacker News

I Made a Self-Quoting Tweet

oisinmoran.com

131–140 of 145 posts

Re: I Made a Self-Quoting Tweet

#131
post #83

Earlier quoted context omitted.

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

> I would suspect that the timestamp being prefix is no accident.

Yeah, it's what they created Snowflake for.

https://blog.twitter.com/engineering/en_us/a/2010/announcing...

Re: I Made a Self-Quoting Tweet

#132
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.

Thank you! The reason for experimenting with a sort of blow-by-blow report style here and detailing the full and true journey of the idea was that I feel the whole process from idea to artifact is not written about enough. That said, it can often be hard to fully pinpoint the actual inception of an idea and just thinking about this one yesterday I realised that the idea likely came up while traversing a long chain of…

Also loved the write-up (have to, really, it's how I do it too.)

HN, 1950s edition: "Look, Mr Tolkien, what I want to know is does the ring go in the mountain? Why do I have to read about this journey?"

Re: I Made a Self-Quoting Tweet

#133

Earlier quoted context omitted.

Thank you! The reason for experimenting with a sort of blow-by-blow report style here and detailing the full and true journey of the idea was that I feel the whole process from idea to artifact is not written about enough. That said, it can often be hard to fully pinpoint the actual inception of an idea and just thinking about this one yesterday I realised that the idea likely came up while traversing a long chain of…

The write-up was great, actually. The whole point of sharing the article is to read about the process and the technical details, I don't know why people insist on these cheap TL;DRs.

I think enough people want that kind of TL;DR that it's reasonable to put one right up front. I see a similar sort of thing with DIY projects, where they tend to get better attention if the first picture is the finished product, and then it works you through the process. It's partly to placate people who only want to see the finished product, but it also gives enough of a hook to everyone else that I suspect some people will read the article who otherwise wouldn't.

Re: I Made a Self-Quoting Tweet

#135
post #125

Earlier quoted context omitted.

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.

There’s 3 paragraphs about it :) (the whole section with the “Shit gets weird” heading is about how only tweet IDs matter).

Re: I Made a Self-Quoting Tweet

#136
post #120

Earlier quoted context omitted.

WTF? If you already have the infrastructure to coredump, they are without a doubt the most convenient way to debug. A stacktrace does not even begin to compare. It is like limiting yourself to printf-debugging in the presence of gdb. Actually, it exactly is! Now I'm not sure if you were /s or not.

It all depends on how tangled your spaghetti are. For the code that implements basic state and invariant checks (ie ships with asserts compiled in), crashes are usually exceedingly rare and limited to one of these checks failing. Debugging them requires a stack trace and, optionally, some context related to the check itself. If the program dumps this info on crash, the fix can typically be made in less time it takes…

Sure, if by miraculous chance you happen to have printf'd exactly the state you required to figure out the assert/crash, "you don't need gdb". You could also find -- by divine inspiration -- what went wrong just by looking at the line number where the assert failed. But it's still WTF-y to argue that therefore, an actual {,post-mortem} debugger is "a last resort tool".

Re: I Made a Self-Quoting Tweet

#137

Earlier quoted context omitted.

Thank you! The reason for experimenting with a sort of blow-by-blow report style here and detailing the full and true journey of the idea was that I feel the whole process from idea to artifact is not written about enough. That said, it can often be hard to fully pinpoint the actual inception of an idea and just thinking about this one yesterday I realised that the idea likely came up while traversing a long chain of…

There seem to a be a couple of "camps" in HN. Broadly, those who enjoy reading, and those who don't, but endure it as a means to obtain information. I'm in the former camp, and enjoyed your writeup quite a bit. The latter camp will reliably show up when writing is any more long-winded than it absolutely must be, and will a) summarize (good) and b) complain (annoying). It is what it is. Congrats on your whimsical crea…

Maybe a constructive message would be 'please post a summary at the top and a stronger conclusion at the bottom' since we're conditioned this way by various written structures.

Re: I Made a Self-Quoting Tweet

#138

Earlier quoted context omitted.

I have done it once successfully in 10 years (.NET dev). Would recommend having any other kind of logging or instrumentation in place so you don't have to do it. It's still worth learning WinDbg and sosclr.

In my company, we used to have a plugin for our bug tracker to automatically analyze .NET core dumps with WinDbg (if they were attached to a bug) and extract some useful information. We used to do this relatively often, for a shipped product, not a live service, especially if we found memory leaks.

Would you say something like that is worth to set up?

I noticed EC2 now has an API to get memory dumps. Theoretically you could automate collecting memory dumps when an unhealthy instance is pulled out of a load balancer. Then some automated analysis could happen, and allow further manual analysis.

Re: I Made a Self-Quoting Tweet

#140
post #67

wow, i did this in 2015 https://twitter.com/kcimc/status/619889224909750272 https://gist.github.com/kylemcdonald/da198988061dce54bae6a67... it's great to see all the examples in this thread going all the way back to 2009! i had no clue this was a thing.

Belated congratulations! This is really cool and it's always interesting to see the different approaches people take, so especially valuable to share the code. I'll definitely put this one in the addendum. The hardcoded ID in your code was added after it was generated just before deleting everything else, right? Otherwise I'm stumped.

Thanks! I think you are correct, after the successful completion I added that statement as a safety before deleting all other previous attempts. Reading this code again it really could have used the data more efficiently to predict the correct ID faster, but if I remember correctly it didn't take very long to run so I never made another attempt.
Post reply on HN