4 Replies - 361 Views - Last Post: 25 July 2017 - 06:15 PM

#1 bobsmith76  Icon User is offline

  • New D.I.C Head

Reputation: 8
  • View blog
  • Posts: 36
  • Joined: 14-February 17

Google's code may be 2 billion lines long

Posted 24 July 2017 - 02:39 PM

According to this article
https://www.wired.co...eand-one-place/

Google's code is 2 billion lines long. What would you do if a new and better language came along and you wanted to rewrite the code in that language? Suppose the code begins to rot, slow down and it becomes too hard to change. How would you refactor the code to get it back up and running? Suppose the code is written in a certain language but the language updates such that the old language is backward incompatible. What then?

Is This A Good Question/Topic? 0
  • +

Replies To: Google's code may be 2 billion lines long

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13382
  • View blog
  • Posts: 53,406
  • Joined: 12-June 08

Re: Google's code may be 2 billion lines long

Posted 24 July 2017 - 02:41 PM

Quote

if a new and better language came along and you wanted to rewrite the code in that language?

Break up the task into teams.
Everyone gets chunks.
See how the architecture actually flows vs the documentation.
See what can be tuned, removed, or done differently.
Parse out the tasks into logical sections.
Doll out the work.
Do the work.
Meeting weekly.
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is offline

  • lashings of ginger beer
  • member icon

Reputation: 6333
  • View blog
  • Posts: 25,530
  • Joined: 12-December 12

Re: Google's code may be 2 billion lines long

Posted 24 July 2017 - 02:48 PM

Find & Replace ;)
Was This Post Helpful? 0
  • +
  • -

#4 jon.kiparsky  Icon User is offline

  • Screw Trump (before he screws you)
  • member icon


Reputation: 10622
  • View blog
  • Posts: 18,172
  • Joined: 19-March 11

Re: Google's code may be 2 billion lines long

Posted 24 July 2017 - 04:16 PM

Fortunately for everyone depending on it - not to mention those working on it - Google's code is not a monolith. It's presumably getting rewritten all the time, as teams working on different pieces add features, fix bugs, refactor the resulting code, and so forth. Over time, some code will turn out to be no longer needed, and will be removed, whether it's because the product went away (goodbye, orkut! so long, google code!) or because the functionality is delivered in a new way (google translate seems to have seen some of this over the years). At some point a team might decide to start using a new language as part of their toolkit, and then you have changes that come out of that.

If a language experiences an incompatible change, that's not a big deal - generally you have plenty of warning, you schedule the time to make the needed changes, and you upgrade. Surprising changes are more annoying, but that's why we test our code before it goes to production.

What doesn't happen a whole lot is a wholesale rewrite from one language to another. This is usually a really bad idea, since you're going to be spending a lot of time writing code to do stuff that you can already do, which does not deliver useful functionality to the user. For a monolithic architecture, this is going to be an expensive and risky proposition, and will generally be hard to justify. One approach, if such a venture is needed, would be to break up the monolith into microservices and write the microservices in the new language - but this has plenty of complications.
Was This Post Helpful? 1
  • +
  • -

#5 bobsmith76  Icon User is offline

  • New D.I.C Head

Reputation: 8
  • View blog
  • Posts: 36
  • Joined: 14-February 17

Re: Google's code may be 2 billion lines long

Posted 25 July 2017 - 06:15 PM

Thank you, Jon. I can always count on you for expert analysis and very detailed descriptions. I enjoy reading your posts.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1