Skip to content

Commit b945db3

Browse files
committed
new post
1 parent ca9171b commit b945db3

4 files changed

+109
-95
lines changed

Gemfile.lock

Lines changed: 57 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,46 @@ GEM
44
addressable (2.8.7)
55
public_suffix (>= 2.0.2, < 7.0)
66
base64 (0.2.0)
7-
bigdecimal (3.1.8)
7+
bigdecimal (3.1.9)
88
colorator (1.1.0)
9-
concurrent-ruby (1.3.4)
10-
csv (3.3.0)
9+
concurrent-ruby (1.3.5)
10+
csv (3.3.2)
1111
em-websocket (0.5.3)
1212
eventmachine (>= 0.12.9)
1313
http_parser.rb (~> 0)
1414
eventmachine (1.2.7)
15-
ffi (1.17.0)
16-
ffi (1.17.0-aarch64-linux-gnu)
17-
ffi (1.17.0-aarch64-linux-musl)
18-
ffi (1.17.0-arm-linux-gnu)
19-
ffi (1.17.0-arm-linux-musl)
20-
ffi (1.17.0-arm64-darwin)
21-
ffi (1.17.0-x86-linux-gnu)
22-
ffi (1.17.0-x86-linux-musl)
23-
ffi (1.17.0-x86_64-darwin)
24-
ffi (1.17.0-x86_64-linux-gnu)
25-
ffi (1.17.0-x86_64-linux-musl)
15+
ffi (1.17.1)
16+
ffi (1.17.1-aarch64-linux-gnu)
17+
ffi (1.17.1-aarch64-linux-musl)
18+
ffi (1.17.1-arm-linux-gnu)
19+
ffi (1.17.1-arm-linux-musl)
20+
ffi (1.17.1-arm64-darwin)
21+
ffi (1.17.1-x86-linux-gnu)
22+
ffi (1.17.1-x86-linux-musl)
23+
ffi (1.17.1-x86_64-darwin)
24+
ffi (1.17.1-x86_64-linux-gnu)
25+
ffi (1.17.1-x86_64-linux-musl)
2626
forwardable-extended (2.6.0)
27-
google-protobuf (4.29.0)
27+
google-protobuf (4.29.3)
2828
bigdecimal
2929
rake (>= 13)
30-
google-protobuf (4.29.0-aarch64-linux)
30+
google-protobuf (4.29.3-aarch64-linux)
3131
bigdecimal
3232
rake (>= 13)
33-
google-protobuf (4.29.0-arm64-darwin)
33+
google-protobuf (4.29.3-arm64-darwin)
3434
bigdecimal
3535
rake (>= 13)
36-
google-protobuf (4.29.0-x86-linux)
36+
google-protobuf (4.29.3-x86-linux)
3737
bigdecimal
3838
rake (>= 13)
39-
google-protobuf (4.29.0-x86_64-darwin)
39+
google-protobuf (4.29.3-x86_64-darwin)
4040
bigdecimal
4141
rake (>= 13)
42-
google-protobuf (4.29.0-x86_64-linux)
42+
google-protobuf (4.29.3-x86_64-linux)
4343
bigdecimal
4444
rake (>= 13)
4545
http_parser.rb (0.8.0)
46-
i18n (1.14.6)
46+
i18n (1.14.7)
4747
concurrent-ruby (~> 1.0)
4848
jekyll (4.3.4)
4949
addressable (~> 2.4)
@@ -95,58 +95,48 @@ GEM
9595
rb-fsevent (0.11.2)
9696
rb-inotify (0.11.1)
9797
ffi (~> 1.0)
98-
rexml (3.3.9)
98+
rexml (3.4.0)
9999
rouge (4.5.1)
100100
safe_yaml (1.0.5)
101-
sass-embedded (1.81.0)
102-
google-protobuf (~> 4.28)
101+
sass-embedded (1.83.4)
102+
google-protobuf (~> 4.29)
103103
rake (>= 13)
104-
sass-embedded (1.81.0-aarch64-linux-android)
105-
google-protobuf (~> 4.28)
106-
sass-embedded (1.81.0-aarch64-linux-gnu)
107-
google-protobuf (~> 4.28)
108-
sass-embedded (1.81.0-aarch64-linux-musl)
109-
google-protobuf (~> 4.28)
110-
sass-embedded (1.81.0-aarch64-mingw-ucrt)
111-
google-protobuf (~> 4.28)
112-
sass-embedded (1.81.0-arm-linux-androideabi)
113-
google-protobuf (~> 4.28)
114-
sass-embedded (1.81.0-arm-linux-gnueabihf)
115-
google-protobuf (~> 4.28)
116-
sass-embedded (1.81.0-arm-linux-musleabihf)
117-
google-protobuf (~> 4.28)
118-
sass-embedded (1.81.0-arm64-darwin)
119-
google-protobuf (~> 4.28)
120-
sass-embedded (1.81.0-riscv64-linux-android)
121-
google-protobuf (~> 4.28)
122-
sass-embedded (1.81.0-riscv64-linux-gnu)
123-
google-protobuf (~> 4.28)
124-
sass-embedded (1.81.0-riscv64-linux-musl)
125-
google-protobuf (~> 4.28)
126-
sass-embedded (1.81.0-x86-cygwin)
127-
google-protobuf (~> 4.28)
128-
sass-embedded (1.81.0-x86-linux-android)
129-
google-protobuf (~> 4.28)
130-
sass-embedded (1.81.0-x86-linux-gnu)
131-
google-protobuf (~> 4.28)
132-
sass-embedded (1.81.0-x86-linux-musl)
133-
google-protobuf (~> 4.28)
134-
sass-embedded (1.81.0-x86-mingw-ucrt)
135-
google-protobuf (~> 4.28)
136-
sass-embedded (1.81.0-x86_64-cygwin)
137-
google-protobuf (~> 4.28)
138-
sass-embedded (1.81.0-x86_64-darwin)
139-
google-protobuf (~> 4.28)
140-
sass-embedded (1.81.0-x86_64-linux-android)
141-
google-protobuf (~> 4.28)
142-
sass-embedded (1.81.0-x86_64-linux-gnu)
143-
google-protobuf (~> 4.28)
144-
sass-embedded (1.81.0-x86_64-linux-musl)
145-
google-protobuf (~> 4.28)
104+
sass-embedded (1.83.4-aarch64-linux-android)
105+
google-protobuf (~> 4.29)
106+
sass-embedded (1.83.4-aarch64-linux-gnu)
107+
google-protobuf (~> 4.29)
108+
sass-embedded (1.83.4-aarch64-linux-musl)
109+
google-protobuf (~> 4.29)
110+
sass-embedded (1.83.4-aarch64-mingw-ucrt)
111+
google-protobuf (~> 4.29)
112+
sass-embedded (1.83.4-arm-linux-androideabi)
113+
google-protobuf (~> 4.29)
114+
sass-embedded (1.83.4-arm-linux-gnueabihf)
115+
google-protobuf (~> 4.29)
116+
sass-embedded (1.83.4-arm-linux-musleabihf)
117+
google-protobuf (~> 4.29)
118+
sass-embedded (1.83.4-arm64-darwin)
119+
google-protobuf (~> 4.29)
120+
sass-embedded (1.83.4-riscv64-linux-android)
121+
google-protobuf (~> 4.29)
122+
sass-embedded (1.83.4-riscv64-linux-gnu)
123+
google-protobuf (~> 4.29)
124+
sass-embedded (1.83.4-riscv64-linux-musl)
125+
google-protobuf (~> 4.29)
126+
sass-embedded (1.83.4-x86_64-cygwin)
127+
google-protobuf (~> 4.29)
128+
sass-embedded (1.83.4-x86_64-darwin)
129+
google-protobuf (~> 4.29)
130+
sass-embedded (1.83.4-x86_64-linux-android)
131+
google-protobuf (~> 4.29)
132+
sass-embedded (1.83.4-x86_64-linux-gnu)
133+
google-protobuf (~> 4.29)
134+
sass-embedded (1.83.4-x86_64-linux-musl)
135+
google-protobuf (~> 4.29)
146136
terminal-table (3.0.2)
147137
unicode-display_width (>= 1.1.1, < 3)
148138
unicode-display_width (2.6.0)
149-
webrick (1.9.0)
139+
webrick (1.9.1)
150140

151141
PLATFORMS
152142
aarch64-linux
261 KB
Binary file not shown.

_posts/2024-08-11driving-growth-real-world-ai-and-ml-use-cases-for-increasing-business-revenue.md renamed to _posts/2024-08-11-driving-growth-real-world-ai-and-ml-use-cases-for-increasing-business-revenue.md

File renamed without changes.

_posts/2025-01-08-how-google-uses-ai-for-code-migrations-insights-for-legacy-system-modernization.md

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "2025-01-08-How Google Uses AI for Code Migrations: Insights for Legacy
2+
title: "How Google Uses AI for Code Migrations: Insights for Legacy
33
System Modernization"
44
description: Google employs Large Language Models (LLMs) to automate large-scale
55
code migrations, reducing manual intervention and accelerating timelines.
@@ -10,7 +10,6 @@ author: Shyam Mohan
1010
category: AIML
1111
date: 2025-01-08T00:51:00.000Z
1212
---
13-
### **How Google Uses AI for Code Migrations: Detailed Insights for Legacy System Modernization**
1413

1514
Over the weekend, I delved into Google’s research paper on utilizing **AI for internal code migrations**, which is packed with fascinating insights into modernizing legacy systems. The strategies highlighted in the paper offer a comprehensive framework for addressing challenges related to outdated codebases, technical debt, and system upgrades. In this blog, I will explore these insights in detail and discuss how organizations can leverage similar approaches for modernization.
1615

@@ -31,9 +30,11 @@ This synergy of AI and engineering tools demonstrates the importance of building
3130
#### **3. Reusable Migration Workflows**
3231
Google has developed **modular workflows** for its code migrations, enabling them to standardize and reuse processes across projects. By building a library of customizable tools and prompts for LLMs, they’ve streamlined recurring migration tasks such as:
3332

34-
- Framework updates (e.g., JUnit3 to JUnit4)
35-
- API deprecations
36-
- Library migrations (e.g., Joda Time to Java Time)
33+
1) Framework updates (e.g., JUnit3 to JUnit4)
34+
35+
2) API deprecations
36+
37+
3) Library migrations (e.g., Joda Time to Java Time)
3738

3839
These workflows allow teams to onboard new projects quickly and ensure consistent results across diverse product areas. Organizations facing frequent modernization challenges can benefit from adopting a similar toolkit approach to reduce overhead and enhance efficiency.
3940

@@ -50,8 +51,9 @@ For organizations handling complex migrations, this controlled rollout strategy
5051
#### **6. Strategic Use of AI Models**
5152
Google employs a combination of **custom fine-tuned AI models** and general-purpose tools, tailoring their approach based on the complexity of the task. For instance:
5253

53-
- **Fine-tuned models** are used for domain-specific migrations (e.g., Ads code migrations).
54-
- **General-purpose models** handle simpler, repetitive tasks across different teams.
54+
**1) Fine-tuned models** are used for domain-specific migrations (e.g., Ads code migrations).
55+
56+
**2) General-purpose models** handle simpler, repetitive tasks across different teams.
5557

5658
This strategy provides flexibility and scalability, ensuring resources are allocated efficiently without compromising quality.
5759

@@ -63,34 +65,48 @@ Here’s how organizations can implement Google’s approach to streamline their
6365

6466
#### **1. Leverage AI Tools**
6567
Utilize AI models like LLMs to automate tedious tasks such as:
66-
- Refactoring legacy code.
67-
- Replacing deprecated libraries.
68-
- Resolving dependencies.
68+
69+
1) Refactoring legacy code.
70+
71+
2) Replacing deprecated libraries.
72+
73+
3) Resolving dependencies.
6974

7075
These tools can dramatically reduce manual workloads and accelerate project timelines.
7176

7277
#### **2. Adopt a Hybrid Approach**
7378
Combine AI-powered automation with engineering tools like ASTs to:
74-
- Ensure the accuracy of transformations.
75-
- Validate changes through static analysis.
76-
- Safeguard critical systems from errors.
79+
80+
1) Ensure the accuracy of transformations.
81+
82+
2) Validate changes through static analysis.
83+
84+
3) Safeguard critical systems from errors.
7785

7886
#### **3. Build Modular Workflows**
7987
Develop reusable workflows tailored to your organization’s modernization needs. For example:
80-
- Create scripts for common migration patterns.
81-
- Design prompts for AI tools that reflect your specific codebase.
88+
89+
1) Create scripts for common migration patterns.
90+
91+
2) Design prompts for AI tools that reflect your specific codebase.
8292

8393
#### **4. Align with Business Goals**
8494
Define success metrics that focus on measurable business outcomes, such as:
85-
- Faster time-to-market.
86-
- Improved system performance.
87-
- Cost savings from reduced technical debt.
95+
96+
1) Faster time-to-market.
97+
98+
2) Improved system performance.
99+
100+
3) Cost savings from reduced technical debt.
88101

89102
#### **5. Plan for Phased Rollouts**
90103
Develop a roadmap for deploying AI-driven changes gradually. Include:
91-
- Rigorous testing phases.
92-
- Human reviews for high-risk updates.
93-
- Monitoring mechanisms to track stability and performance.
104+
105+
1) Rigorous testing phases.
106+
107+
2) Human reviews for high-risk updates.
108+
109+
3) Monitoring mechanisms to track stability and performance.
94110

95111
#### **6. Tailor AI Models to Your Needs**
96112
Evaluate when to invest in custom fine-tuned models versus using off-the-shelf AI tools. For complex migrations, customized models can provide better accuracy and context.
@@ -101,23 +117,31 @@ Evaluate when to invest in custom fine-tuned models versus using off-the-shelf A
101117

102118
Google’s paper highlights several case studies that demonstrate the effectiveness of their approach:
103119

104-
- **JUnit3 to JUnit4 Migration:** Google migrated 5,359 test files, modifying over 149,000 lines of code in just three months using their AI toolkit. This migration addressed long-standing technical debt and simplified future updates.
120+
**1) JUnit3 to JUnit4 Migration:** Google migrated 5,359 test files, modifying over 149,000 lines of code in just three months using their AI toolkit. This migration addressed long-standing technical debt and simplified future updates.
105121

106-
- **Joda Time to Java Time Migration:** Tackling one of their largest migrations, Google used LLMs to replace outdated Joda Time APIs with Java Time. By clustering related changes and automating validation, they achieved significant time savings while ensuring code quality.
122+
**2) Joda Time to Java Time Migration:** Tackling one of their largest migrations, Google used LLMs to replace outdated Joda Time APIs with Java Time. By clustering related changes and automating validation, they achieved significant time savings while ensuring code quality.
107123

108-
- **Experimental Flag Cleanup:** Google’s AI-powered tools removed thousands of stale experimental flags, reducing technical debt and improving code maintainability.
124+
**3) Experimental Flag Cleanup:** Google’s AI-powered tools removed thousands of stale experimental flags, reducing technical debt and improving code maintainability.
109125

110126
---
111127

112128
### **Conclusion: The Future of Modernization with AI**
113129

114130
Google’s innovative use of AI for code migrations provides a compelling blueprint for modernizing legacy systems. By combining AI-driven efficiency with engineering best practices, organizations can achieve:
115-
- Faster migrations.
116-
- Safer deployments.
117-
- Greater alignment with business goals.
131+
132+
1) Faster migrations.
133+
134+
2) Safer deployments.
135+
136+
3) Greater alignment with business goals.
118137

119138
Whether you’re facing outdated frameworks, complex dependencies, or technical debt, Google’s strategies offer actionable insights to tackle these challenges effectively. For a deeper understanding, I’ve attached the full research paper—let’s discuss how these ideas can be applied to your projects!
120139

140+
<br>
141+
142+
## [Click here to read Google.com white pager](https://codecrux.com/How-is-Google-using-AI-for-internal-code-migrations.pdf)
143+
121144

145+
<br>
146+
<br>
122147

123-
## Click here to read Google.com white pager https://codecrux.com/How-is-Google-using-AI-for-internal-code-migrations.pdf

0 commit comments

Comments
 (0)