Live data from Hacker News

Digg's v4 launch: an optimism born of necessity (2018)

lethain.com

11–20 of 358 posts

Re: Digg's v4 launch: an optimism born of necessity (2018)

#11
post #4
post #3

> Our API server was a Python Tornado service... and one of the most frequently accessed endpoint was used to retrieve user by their name or id. Because it supported retrieval by either name or id, it set default values for both parameters as empty lists. This is a super reasonable thing to do! However, Python only initializes default parameters when the function is first evaluated, which means that the same list is…

Humans aren't perfect. Open source projects have missed unescaped spaces in directory paths that caused the deletion of /usr (Bumblebee), video games have forgotten to check the cwd and deleted vital windows boot files (Eve Online) and operating systems have forgotten to check passwords (MacOS). Given this was 2010 I wouldn't be surprised if they had a less mature development process that doesn't use things people ta…

Still... did no one with even moderate Python experience even glance at this very important endpoint at any stage during those 4 weeks? Like I say, this is the kind of thing that jumps out of the screen for an experienced developer.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#13
post #11
post #4

Earlier quoted context omitted.

Humans aren't perfect. Open source projects have missed unescaped spaces in directory paths that caused the deletion of /usr (Bumblebee), video games have forgotten to check the cwd and deleted vital windows boot files (Eve Online) and operating systems have forgotten to check passwords (MacOS). Given this was 2010 I wouldn't be surprised if they had a less mature development process that doesn't use things people ta…

Still... did no one with even moderate Python experience even glance at this very important endpoint at any stage during those 4 weeks? Like I say, this is the kind of thing that jumps out of the screen for an experienced developer.

In 2010? You'd be surprised before widespread adoption of git at how many places the process was individual developers committing changes unsupervised. I'm not sure we even disagree that's the problem - you feel a second person should have looked at it, I feel the process should require that. A code review might be something that they'd sit down with a selected piece of code that they felt was risky on a biweekly basis or something.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#14
post #3

> Our API server was a Python Tornado service... and one of the most frequently accessed endpoint was used to retrieve user by their name or id. Because it supported retrieval by either name or id, it set default values for both parameters as empty lists. This is a super reasonable thing to do! However, Python only initializes default parameters when the function is first evaluated, which means that the same list is…

Having done this same mistake myself, it's just such an easy mistake to make. Most likely you're writing two or three programming languages in the same project, and the others work differently from Python. So it's very easy to miss an errant `foo={}` in a function definition when reviewing a commit of several hundred lines. Especially as the only indicator of something being wrong is the lowest priority warning PyCharm has, meaning the background colour `{}` is only slightly different.

These days I'd set up a linter that enforces these things do not happen, but it's easy to be smart after the fact. You say "once you've been trained by bitter experience it's very easy to spot", which I feel is true. You just need that bitter experience first, and for me it came in the form of a production issue.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#15
post #9

Kevin Rose: We migrated from LAMP to Cassandra because LAMP doesn't scale and Cassandra does. https://www.youtube.com/watch?v=eQNBcIPSROs

Hasn’t Facebook moved away from LAMP because of… scale?

Given how many users they have I suppose they know a thing or two about scale.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#16
Albeit unpopular opinion, this kind of things is one of the reasons why I'll always push for Java instead of a jigsaw of different languages that sound cool.

Stability, scalability and simplicity. Yes, you read correctly.

Whomever complains that Java is bloated or complex, needs only to look on who is writing that "piece" of code. Expert developers will write proper code that anyone can maintain and keep simple.

Too bad for Digg. Was a good site.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#17
post #10

Earlier quoted context omitted.

Not knowing Python, but I have a feeling things like this weren't as well known back in 2010 and the reason they're so well known is from people doing it at sites like Digg and then telling everyone that's a really bad idea. There are so many things that I know now for programming that were pretty much unknown 10-years ago because no one had really encountered them in a large scale setup.

Nah, this has been very well known since decades and is very easy to spot.

Yeah this is covered in pretty much every style guide, tutorial, and reference. And is an easy screener in an interview. I'm also surprised anyone using Python as more than a toy experiment had this issue, especially in such a critical service.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#18
Good read. Interesting that the author’s takeaway is that folks consider Digg v4 to be a catastrophic launch because of the myriad technical issues.

I don’t even remember there being technical issues, I just remember logging in one day to find a website I enjoyed replaced with a bunch of crap I wasn’t interested in.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#19
post #3

> Our API server was a Python Tornado service... and one of the most frequently accessed endpoint was used to retrieve user by their name or id. Because it supported retrieval by either name or id, it set default values for both parameters as empty lists. This is a super reasonable thing to do! However, Python only initializes default parameters when the function is first evaluated, which means that the same list is…

Forget about production, how did this make it into python? This is so unbelievably stupid it makes PHP look like a sensible language.

Re: Digg's v4 launch: an optimism born of necessity (2018)

#20

Albeit unpopular opinion, this kind of things is one of the reasons why I'll always push for Java instead of a jigsaw of different languages that sound cool. Stability, scalability and simplicity. Yes, you read correctly. Whomever complains that Java is bloated or complex, needs only to look on who is writing that "piece" of code. Expert developers will write proper code that anyone can maintain and keep simple. Too…

That's not a function of Java.
Post reply on HN