News for hackers. Stuff that matters.
Re:Scaling lessons learned at Dropbox, part 1 by akent on Thursday July 12, 2012 @07:24PM (#4237395)
I noticed that a particular “FUUUCCKKKKKasdjkfnff” wasn’t getting printed where it should have

Why not take the extra half a second to make those random strings meaningful and hidden behind a DEBUG log level?

Re:Scaling lessons learned at Dropbox, part 1 by ephemeralgomi on Thursday July 12, 2012 @07:59PM (#4237490)
Probably most of their logging _is_ meaningful, but deciding how to professionally phrase each and every log message will eventually get you to decision fatigue.

The point that he was making with this was that over-logging is a good thing - this probably wasn't something the initial author thought was going to be terribly informative, hence the random string. And yet it ended up diagnosing a real world problem.

In a perfect world, by all means properly write out your messages - but if you're stalling on a log message because you're not sure how to phrase it, you may get concrete benefit from just dropping a FUUUCCKKKKKasdjkfnff and moving on.

Re:Scaling lessons learned at Dropbox, part 1 by christoph on Thursday July 12, 2012 @08:40PM (#4237626)
So, so true.

When the problem occurs, it's pretty quick for the guy who needs to fix it at 2am, to find where it exploded in the code base, while the original developer is (maybe) passed out in a bar somewhere.

Not much else matters. He could of just done :( x 10 and had the same result. The main thing is, it's easily traceable!

Re:Scaling lessons learned at Dropbox, part 1 by akent on Thursday July 12, 2012 @08:58PM (#4237692)
Sure, for fatal errors, random (greppable) strings aren't so bad, but the OP made it sound like his FFFFFFFFFFFUUUUUU message was expected all the time rather than an exception. If you're going to print something all the time in normal operation, make it meaningful.
Re:Scaling lessons learned at Dropbox, part 1 by aboodman on Friday July 13, 2012 @02:51AM (#4238553)
That isn't how I took it. I read it as: there was an error scenario that was clearly happening, which should have resulted in a particular log message. Except it wasn't, which meant that something was racing.
Re:Scaling lessons learned at Dropbox, part 1 by vosper on Thursday July 12, 2012 @10:58PM (#4237998)
I don't know how many new logging statements you commit to production code every day, but I can't imagine it averages out to more than one or two. If you can't take the time to phrase them both professionally and meaningfully then you're doing yourself and your team a disservice.
Re:Scaling lessons learned at Dropbox, part 1 by flatline3 on Thursday July 12, 2012 @11:22PM (#4238070)
Moreover, you have, in your head, the log message that should be written.

At the time of writing the code, you're hopefully thinking through "how could this fail?"

There's your log message.

Re:Scaling lessons learned at Dropbox, part 1 by crazygringo on Friday July 13, 2012 @11:08AM (#4240095)
I dunno. Sometimes there's just a scenario that isn't really easy to fit into a meaningful phrase, and that shouldn't happen too often.

"FUUUCK" is awfully good at conveying the seriousness of the error, and "aslfkhsdf37" ensures that the string is unique, so you can pinpoint it instantly in your gigantic codebase.

The fact is, it kind of works. Something like "missing record (line 38)" doesn't indicate the severity, there might be 10 different "missing record" error strings in your codebase, and somehow in real life, line numbers and filenames never seem to quite match up like they should (transcompilation, async callbacks, and so on.)

Re:Scaling lessons learned at Dropbox, part 1 by batista on Saturday July 14, 2012 @01:24AM (#4243227)
I think Dropbox did well enough financially and technically, so that the team doesnt need pedantic advice on professionalism...
Re:Scaling lessons learned at Dropbox, part 1 by pdeuchler on Thursday July 12, 2012 @11:18PM (#4238059)
Oh c'mon. Does HN have the capacity to not be critical 24/7? The guy is clearly competent at his job, there is no need to nitpick.

Let he who has never written a frustrated, nonsense, print statement throw the first stone, if you will.

Re:Scaling lessons learned at Dropbox, part 1 by eranki on Friday July 13, 2012 @12:28AM (#4238211)
^ For those that wonder why there is even a separate clean log.
Re:Scaling lessons learned at Dropbox, part 1 by batista on Saturday July 14, 2012 @01:22AM (#4243221)
Because a half and second here and a half a second there, and soon we're talking weeks.

Plus, the statement is not only meaningful, but also very expressive.