Live data from Hacker News

How we rolled out one of the largest Python 3 migrations

blogs.dropbox.com

31–40 of 141 posts

Re: How we rolled out one of the largest Python 3 migrations

#31
post #18

Interesting write-up, though it leaves me terrified how a relatively small, more or less single purpose application like the Dropbox client has over 1 million lines of code in Python alone.

The size of a codebase is less about its function and more about the number of people adding code to it.

What would you consider the main cause(s) of that?

Re: How we rolled out one of the largest Python 3 migrations

#33
post #20
post #16

Earlier quoted context omitted.

Every other 5 lines being the equiv of: if err != nil { ... error handling ... } Python just uses exceptions, and they bubble up. No need for this excessively verbose error checking.

I'm not sure why it is downvoted. This is true. I write both Golang and Python as part of my day job. I love both languages, but this is definitely the truth. Go is more verbose. It also gives you the wonder of the compiler telling you about doing stupid things. That doesn't make it a worse language.

Does go not have exception handling?

Re: How we rolled out one of the largest Python 3 migrations

#34

Earlier quoted context omitted.

What does the Dropbox client do for me other than syncing files and exposing a bit of the online functionality such as generating share links? (Serious question...)

We can simply start by asking what does “syncing files” include? Watching files. Keeping backup of files. Keeping conflicts resolved. Watching Selective Sync files and folders. Watching Smart Sync files and folders. Notifications for synced files. Etc. etc. There’s way more the client does than what I mention.

I agree that syncing is far from trivial, but that doesn't change it's a single purpose.

Re: How we rolled out one of the largest Python 3 migrations

#36
post #17

Earlier quoted context omitted.

Probably because it was 2.7 only, and only 10% faster on Dropbox's code. https://blog.pyston.org/2017/01/31/pyston-0-6-1-released-and...

I'm surprised 10% wasn't enough - 10% bottom-line improvement in programming language implementation is normally massive. Twitter is singing from the roof-tops about 10% improvement in Java performance from the new Graal JIT compiler.

PyPy is already way better than that, and has a Python 3.5 implementation.

Re: How we rolled out one of the largest Python 3 migrations

#37
post #20

Earlier quoted context omitted.

I'm not sure why it is downvoted. This is true. I write both Golang and Python as part of my day job. I love both languages, but this is definitely the truth. Go is more verbose. It also gives you the wonder of the compiler telling you about doing stupid things. That doesn't make it a worse language.

Does go not have exception handling?

go has something in the same general area of error handling called panic/recover. It's not exceptions in the normal sense, and devs expect nothing should panic across api boundaries.

Re: How we rolled out one of the largest Python 3 migrations

#38
post #6

Earlier quoted context omitted.

Go wasn't created until 2009 and Dropbox already had tons of Python code by then as well as extremely accomplished Python programmers (they hired the creator of Python only a few years later). I also don't think Go would have allowed the tight integration with, for example, OS X where Dropbox actually superimposes their icons onto your Finder icons. As far as I understand, it was only because of smart programming and…

There’s an official API since 2014 (Yosemite): https://developer.apple.com/library/archive/documentation/Ge...

Dropbox predates that api though. They used to hack into Finder.app's api IIRC.

Re: How we rolled out one of the largest Python 3 migrations

#39

Earlier quoted context omitted.

We can simply start by asking what does “syncing files” include? Watching files. Keeping backup of files. Keeping conflicts resolved. Watching Selective Sync files and folders. Watching Smart Sync files and folders. Notifications for synced files. Etc. etc. There’s way more the client does than what I mention.

I agree that syncing is far from trivial, but that doesn't change it's a single purpose.

Not to build a straw man but by this logic also a browser is a single purpose application
Post reply on HN