360° IT Check #46 - Migrating 3.7 Millions Lines of Code to TypeScript, Flutter 3, And More!
Table of Contents

360° IT Check #46 - Migrating 3.7 Millions Lines of Code to TypeScript, Flutter 3, And More!

Aleksander Jess
Senior Content Marketer & Technical Expert
Jason Neale
Lead Generation Specialist

Migrating Millions of Lines of Code to TypeScript

Stripe, the company most famously behind a payment processing service, shared a blog post about their migration from JavaScript (JS) & Flow to TypeScript (TS). In the words of one of their employees:

Seriously unreal. I remember a short time ago laughing at the idea of TypeScript ever landing at Stripe, and then I woke up Christmas Monday morning and it was here.

Migrating more than 3.7 million (yes, really) lines of code must have been a tiresome and long process… and it was to an extent. The company used experiences that other companies, namely Zapier and Airtable, had with migrating from Flow to TS. They also reused their automatic tool to turn one way of ensuring type safety to another. During the initial pass of the tool, it uncovered many more problems than Flow did.  

An initial pass on the Dashboard codebase created over 97,000 error suppressions. With our iterative approach to updating the codemod, we were able to get that number down to 37,000, or about one per thousand lines of code. For comparison, the Flow code had about 5,000 error suppressions.

Error suppressions are not good because that means the lines of code that are actually checked is smaller, except… TypeScript was more useful than Flow, nevertheless! The team at Stripe attributed that to a superior third-party support.

The week before the migration, the team at Stripe started to introduce changes to their Continuous Integration (CI) & Testing environments. They did encounter some bumps along the way; however, the benefits far outweighed the struggles, as the team admits.

Now, the new engineers are enjoying being able to work in an environment they know and are more comfortable working in.

The Bottom Line

The memory of Flow starts to fade away, as more and more engineering teams start moving to TypeScript. There is a good reason for that – Microsoft’s project turns out to be more successful, a better solution, with better third-party support.

As Stripes’ case shows, even such a massive codebase (3.7 million lines of code) can be migrated to TS without many (relatively) obstacles. The whole undertaking took a year, which, even if it seems like a lot, is, in fact, not.

Importantly, the company has also openly shared the tool they used in their task. It is available for free on GitHub under the permissive MIT license.

Flutter 3

Flutter, the cross-platform app framework from Google, has received a new major upgrade. With it, the company from Mountain View, CA, promises many new features, and perhaps the most importantly, it promises “mobile, web, desktop, and embedded apps from a single codebase.”  

The ability to develop for so many platforms is a massive time-saver on its own. The team behind the cross-platform helper made sure to continue with their tradition of helping developers. For example, Flutter has always impressed with the depth of components provided out of the box (putting it in stark contrast with React Native).

What’s new in Flutter 3?

  • Stable support for macOS and Linux
  • Foldable phone support
  • iOS variable refresh rate support
  • Image decoding is now significantly faster in browsers

Additionally, the development team is hard at work behind a new rendering backend called Impeller that is mean to reduce “jank” on iOS.  

The Bottom Line

Flutter is an impressive tool for creating native-feeling apps. Its promise is well-fulfilled, many teams use it to create great experiences on countless devices. There are several problems with the framework, though. The promise is indeed fulfilled.  

The issue is how it does that. To be able to manage this many platforms leaves the team to have to resort to creating everything you see on the screen without using any native components. That leaves some developers feeling slightly disappointed, for sure.  

Another aspect is the forced opt-in to Google’s Material Design framework. Even though it’s an incredibly flexible design system, you are opting into it without a choice. Yes, you do get a rich set of components, but your app is likely to be using somewhat like Google’s apps; unless you heavily customize every bit.

Then there is the problem called “Dart.” Dart is a quite well-designed programming language that feels similar to Java and JavaScript. Developers get great tooling in VS Code, and the Intellij-family of IDEs, and null safety comes out of the box as well. It is, however, a whole other language. The problem with it is that you have to have a dedicated team of Dart developers vs. more closely integrated full-stack JavaScript teams.  

So far, the popularity of Flutter has slightly disappointed, though maybe what the framework needs is the introduction of Fuchsia, the mysterious OS from Google. It is rumored that the aforementioned tool will be the default way of creating apps.

The Guide To A Successful Mergers & Acquisition Technology Integration for CIOs

Mergers & Acquisitions (M&A) are a tough nut to crack. Legal departments have a hard job to do, and the IT department often has a hard time as well.  

Large parts of businesses’ codebases need to be integrated. As Stackshare.io points out, there are few common pain points:  

  • Inaccurate budgeting
  • Higher security risk
  • Redundant of ineffective tooling

The company also shares two lists: Pre-Merger, and Post-Merger steps to complete. To read them, please refer to the original blog post.

The Bottom Line

The success of the M&A process in 40% of times comes down to how effective Chief Information Officers are in their work or if they have a seat at the table. As the publication CIO highlights, that’s how frequently IT integration issues are responsible for M&As failing to deliver benefits.  

It does not stop there. For example, using AI for due diligence is a gigantic time-saver. Moreover, what if the company your company intends to purchase runs on outdated software? There are many more aspects that call for the inclusion of CIOs to the table.

Lastly, CIOs need to approach these processes seriously, and also seize opportunities to modernize their tech stacks. After all, what other time is better than the time when everything can be broken down for wider compatibility?

“Digital Transformation 101” – Stackshare’s Take On What CIOs Need To Succeed In 2022 Onward

https://stackshare.io/posts/digital-transformation-101-what-cios-need-for-success-in-2022-and-beyond

The Global digital transformation market is expected to grow to over $1 Trillion by 2025 at a CAGR of 16.5% from the period starting in 2020. But where do you start and does your company even need to go for this in the first place?

What is a “Digital Transformation”?

Quite simply, digital transformation is the process of using digital technologies to create new or improved business processes, products, and services. This can be anything from automating manual processes to improving customer experiences. The result is the creation of new business models and improved revenue streams.  

Creating A Solid Digital Transformation Framework

First, one of the most important factors for a successful transformation is the buy-in from the executive team. Without alignment on financial, operational, and cultural views, the chances for success are slim.

Now that we have the management buy-in, the next step in creating a solid framework will require answers to the current state of the business and processes, company data, and identifying goals and objectives.  

A digital transformation can be a daunting and costly undertaking for any business and before deciding whether or when to embark on such a journey, it is essential to have a solid framework in place.  

  • Full Visibility
  • Data-Driven Decisions
  • Swift Action
  • Identifying Future Goals
  • Action Plan

Full Visibility

As your team looks for digital solutions, an organization needs to understand its current process and operations. This will help identify business priorities and address the most critical factors. By taking a systematic approach, you can ensure that all facets of the business are considered and understood. Once you have that information, you can begin to map out a plan for change.

Data-Driven Decisions

All too often, teams make decisions based on gut feelings or opinions. While there is nothing wrong with using your intuition, it’s essential to supplement it with data. By basing your decisions on quantifiable facts, your choices will lead to better results and instill confidence in your team members.

Swift Execution

Organizations need to ensure that their teams can execute strategic decisions with speed and precision. Providing your team with streamlined processes and limited red tape will empower employees to make decisions independently. Solutions for a digital transformation have many paths that can change, allowing for employee flexibility will speed up the process.

Identify Future Goals

Understanding the future state of the business and where it is trying to go digitally is crucial. Once the desired destination is known, it becomes easier to determine the steps that must be taken to get there. Creating a system that doesn’t consider how it will be used in-house or on the client-side is counterproductive and a waste of time and resources.  

Creating the Action Plan

Setting a goal without a plan is like setting sail without a rudder; you may end up somewhere, but it likely won’t be where you intended to go. The same is true for a business’s digital transformation. To achieve specific goals, you need a detailed action plan that outlines the steps you need to take. This should contain a digital transformation roadmap, which will help you integrate new technologies into your business. By taking the time to map out your path, you’ll increase the chances of successfully reaching your goal.

The Bottom Line

All too often, we want the shiny new toy everyone else has. With many customers and companies looking for new ways of doing business, it’s only reasonable we have many more wants than actual needs.  

Performing a detailed analysis of your business priorities and the problems you are trying to solve is extremely important. Ensuring you have identified your strengths and weaknesses will provide you with a solid base for creating an informed journey to a digital transformation.

Is Ruby on Rails Still A Good Choice Today?

Vinted, the company offering an online marketplace for selling second-hand clothing, wrote an article about their back-end stack. They are defending their choice. As it turns out, they are using Ruby on Rails (“RoR”) – one of the most iconic and popular frameworks.  

Its main selling points were its ease of use and development speed. The prototyping process became much quicker, and the text interface developers received was comfortable for quick scaffolding.  

Many companies, besides Vinted, ran on RoR: perhaps most famously Twitter. Not anymore, though. Twitter had major problems with the performance of their back-end. Whenever their service failed, a whale would pop up. Sadly, it happened too often, which decreased the satisfaction of the platform’s users.  

The company then switched to another framework, and… the whale appeared much less often.

The Bottom Line

They say that programming languages and frameworks are only tools to solve problems. That is true, and there’s no debating that. What’s important, however, is whether we may solve an issue effectively or not.  

Ruby on Rails is not the best tool, anymore. It’s sluggish, and heavy. It will work for many companies, sure. Furthermore, it will also work for fast prototyping. Ruby’s big pro is a natural-feeling syntax. It’s similar to Python’s, arguably even more legible, though.  

Programmers should not have a hard time adapting to it, and they don’t. There are some, who are joining Vinted, who have no prior experience in writing Ruby. “Most newcomers start writing code in two weeks and get fluent in a few months.”

The list of pros ends here. Firstly, Ruby is. Really. Slow. It may even be 27 times slower than JavaScript. Secondly, the community support pales in comparison to the support JavaScript, Java or C# have. Lastly, if that was not enough, its future is likely dim. Ruby was never the most popular programming language. The popularity peaked mid-2008, and since then, it was either stagnant or falling. Nowadays, it’s a marginal programming language, at best, alive only thanks to Rails.  

The concept behind Rails is nevertheless a good one, for start-ups at the very least. A recently introduced framework, Redwood.js, wants to be the new Ruby on Rails, with a hyper-specific goal. The team behind the tool has one aim: creating a tool for start-ups to get from a side-project to a full-time project.

Bonus Topics:

Math in Markdown on GitHub

https://github.blog/2022-05-19-math-support-in-markdown/

Accessibility in iOS 16

https://9to5mac.com/2022/05/18/ios-16-accessibility-features-benefits/

Liked the article? subscribe to updates!
360° IT Check is a weekly publication where we bring you the latest and greatest in the world of tech. We cover topics like emerging technologies & frameworks, news about innovative startups, and other topics which affect the world of tech directly or indirectly.

Like what you’re reading? Make sure to subscribe to our weekly newsletter!
Categories:
Share

Join 17,850 tech enthusiasts for your weekly dose of tech news

By filling in the above fields and clicking “Subscribe”, you agree to the processing by ITMAGINATION of your personal data contained in the above form for the purposes of sending you messages in the form of newsletter subscription, in accordance with our Privacy Policy.
Thank you! Your submission has been received!
We will send you at most one email per week with our latest tech news and insights.

In the meantime, feel free to explore this page or our Resources page for eBooks, technical guides, GitHub Demos, and more!
Oops! Something went wrong while submitting the form.

Related articles

Our Partners & Certifications
Microsoft Gold Partner Certification 2021 for ITMAGINATION
AWS Partner Network ITMAGINATION
ISO 9001 ITMAGINATIONISO-IEC 27001:2013 ITMAGINATION
Great Place To Work
ITMAGINATION Winner Great Place To Work Best Workplaces Poland 2021
© 2022 ITMAGINATION. All Rights Reserved. Privacy Policy
// Opening all links in new tab // Syntax Highlighting Code