Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Winglang: Cloud Development Programming for the AI Era

Tags: cloud code human

As long as AI serves as a co-pilot rather than an auto-pilot, there’s room for a language that facilitates effective collaboration between humans and AI. This can be achieved by reducing cognitive load and enabling rapid testing, significantly cutting iteration times. Moreover, AI simplifies the adoption of new languages.So, why invest time and effort in the development of a new programming language (for humans) today when AI is rapidly advancing and taking over more coding tasks?I often encounter this question in various forms:First, I must admit that I cannot predict the pace of AI advancement. Reputable experts hold differing opinions on when, or if, AI will replace Human developers.However, even if AI does eventually replace human developers, it may not necessarily write machine Code directly. Why would an AI choose to reinvent the wheel for each app by writing machine code directly when it can rely on proven abstraction layers and compilers, allowing it to efficiently focus on the unique aspects of the business it serves? By building on existing work and focusing on smaller, simpler tasks, the AI can yield faster, higher-quality results.Having covered the more distant future, I now want to focus on the more immediate future for the remainder of this post.I believe that, given human limitations and psychology, change will likely be gradual despite AI’s rapid progress, leading to a significant transitional period with humans remaining in the loop. For instance, it’s hard to imagine organizations not desiring a human to be accountable for the AI’s output. That human would be very reluctant to let the AI do its work in a way that the human cannot understand, modify and maintain.Think about it, would you let ChatGPT write a professional article for your peers, in your name, in a language you don’t speak? Would you publish it without being able to read it? Probably not. Similarly, would an engineering manager release a mission-critical app to production knowing that it was written by AI in a way that would make it hard for humans to step in if something goes wrong?Additionally, while it is true that AI is an equalizer between tools to some degree, it still doesn’t completely solve the problem. Let’s take the Cloud portability example from above: Even if the AI can port my code between clouds, I still want to be able to read and modify it. As a result, I must become an expert in all these clouds at the level of abstraction the AI used. If a new language allows it to write at a higher level of abstraction, it will be easier for me to understand and modify it too.Assuming AI empowers us to rapidly generate vast amounts of code, the bottleneck inevitably shifts to the testing and validation phase. This occurs not solely due to AI’s inherent limitations, but primarily because of our own imperfections as humans. We are incapable of flawlessly articulating our requirements, which necessitates experiencing a working version of the end product, interacting with it and determining whether it fulfills our needs or if we’ve overlooked any edge cases. This iterative process continues until our creation reaches perfection.In a landscape where testing and validation consume the majority of software delivery time, there is ample opportunity for tools that significantly streamline this phase. By reducing the time required to deploy and evaluate an application within a development environment, these tools can greatly enhance overall efficiency.Therefore, I believe that for the foreseeable future, there is room for tools that make it easier for both humans and AI to write quality code swiftly, collaborate effectively and test more rapidly. Such tools will allow us to enhance the quality and speed of our application delivery.Whether you’re an AI or a human developer, reducing complexity and iterating faster will result in better applications developed more quickly.So, what can be done to make these improvements?Utilizing a higher level of abstraction offers the following benefits for both human and AI coders:Presently, deploying and testing cloud applications can take several minutes. When multiplied by numerous iteration cycles, there’s substantial potential for improvement. Particularly, as our AI friends assist us to accelerate code writing, the proportion of time spent on testing and validation within each iteration cycle becomes increasingly significant compared to code writing.A prevalent workaround is running tests locally, bypassing cloud deployment. However, this approach presents its own challenges, as it necessitates simulating the cloud environment surrounding the tested components. Consequently, these tests are constrained in their scope, often requiring supplementary tests that run in the cloud to confirm code functionality within the actual environment.Yet this is not the end of the journey. Such solutions primarily cater to automatic tests, while developers frequently desire manual interaction with applications during development or seek feedback from various stakeholders (product, sales, management, potential users, etc.). Achieving this without cloud deployment and its associated time penalties remains a challenge.Hence, we need to be able to generate tests that can operate both locally and in the cloud and be executed swiftly. Additionally, we must enable rapid deployment of cloud applications and facilitate easy access for stakeholder validation.By achieving this, we can significantly enhance iteration speeds, regardless of whether the code is created by AI, humans or is a collaborative effort.So, how do we bring this vision to life?Wing is a new programming language for cloud development that enables both human and AI developers to write cloud code at a higher level of abstraction, and it comes with a local simulator that lets developers test it quickly.As we’ll demonstrate below, we’re talking about a 90% – 95% reduction in code, and orders of magnitude increase in testing speeds.Here’s an example of a small app that uploads a file to a bucket (think AWS S3, Azure Blob Storage or GCP Bucket) using a cloud function (AWS Lambda, Azure Function or GCP Cloud Function).This is the code in Wing:As you can see, whether a human or an AI coder is writing Wing code, they work at a high level of abstraction, enabling the Wing compiler to handle underlying cloud mechanics such as IAM policies and networking (don’t worry, it’s customizable and extensible, ensuring you maintain control when needed).Unlike human and AI coders, the compiler is infallible. Additionally, it is faster, deterministic and doesn’t lose context over time. As a result, the more responsibilities we delegate to the compiler instead of humans or AI, the better the outcomes.The compiler can adapt the app for any cloud provider, necessitating that humans only need to know and maintain the higher-level, cloud-agnostic code. The generated compilation artifacts, Terraform and JavaScript, can be deployed using proven, dependable tools.Now let’s take a look at the same code in one of the leading cloud development stacks today — Terraform + JavaScript.As you can see, the Wing code is seven lines long, while the Terraform and JavaScript code is 122 lines, or ±17X more code. Not only that, it dives deeply into lower layers of the cloud stack.You might be wondering if there are newer solutions against which Wing’s gains are less significant, or if the same results can be achieved through a library or a language extension. You can see how Wing compares to other solutions and why it’s a new language rather than some other solution here.Wing comes out of the box with a local simulator and a visualization and debugging console.These tools enable developers to work on their code with near-instant hot-reloading and test cloud applications very easily without having to mock the cloud around them.In the example of our very simple app above, deploying to any cloud provider in order to run tests would take close to a minute, whereas with the Wing Simulator it takes less than a second — or two orders of magnitudes less. Moreover, with Wing, you can write tests without mocking the cloud and run the same ones on the simulator and in the cloud.You can get a first-hand sense of it in the Wing Playground.Although Wing introduces significant improvements in cloud development, we understand that migrating to a new language is a substantial undertaking that may be hard to justify in many cases.We’ve gone to great lengths to make adopting the language as easy as possible with the following features:Furthermore, we believe that in the era of AI, adopting a new language like Winglang is easier for humans as AI assists with writing code in unfamiliar languages and frameworks and simplifies the migration of existing code to new languages.As we move toward a future where AI plays a more significant role in code development, the creation and adoption of languages like Winglang will ensure better collaboration, faster development and higher-quality applications for both human and AI developers.To get a glimpse of the future and experience writing code in Wing and testing it instantly, you can visit our playground.Community created roadmaps, articles, resources and journeys fordevelopers to help you choose your path and grow in your career.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

Winglang: Cloud Development Programming for the AI Era

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×