.

Alex Cruz

AI Engineer

...a born-and-raised Miami programmer.

Bullets:

• Mentored for three years by an industry pioneer who brought to market a revolutionary product still used today.

• Overhauled the onboarding layer of the world's largest creator commerce platform with a GMV > $12 billion and tens of millions of users.

• Built from scratch, 3 iPad applications used by aviation companies such as JetBlue and Air Canada.

• Developed from scratch two crypto-wallets with a flow of value in the tens of millions.

Most recent accomplishments

At LTK as a Senior iOS Developer. A global creator commerce platform, LTK empowers thousands of digital lifestyle influencers to achieve economic success. I LTK I overhauled our legacy onboarding and authentication technology by leveraging modern authentication best practices to simplify new-user registration with various IDPs (FB, Gmail, Apple login, etc.) while maintaining the highest standards of modern security practices.

Followed by, being the Tech Lead at Minnect. A marketplace to book 1:1 video calls with experts. In my short stint at Minnect, I successfully led an aggressive 8-week goal to redesign Minnect’s native iOS, Android, and web app and a significant change of the core Q&A functionality to a modern chat-like interface using Swift, Jetpack Compose, and REST API, which increased engagements between experts and users and overall earnings for experts by ~10x.

Currently at Wamy, I build and deploy production-grade AI systems for a claims-intelligence platform, delivering end-to-end TypeScript applications backed by Supabase and AWS, and shipping retrieval-augmented generation (RAG) pipelines and prompt orchestration that power real-world legal workflows, customer onboarding, and agent-focused automation.

read more

Feb 28, 2023

Why You Should Use Async/Await Over Closures Moving Forward

Since Apple released Async/await in 2021, it has made writing asynchronous code amazingly pleasant for iOS developers. In addition to the out-of-the-box performance and safety benefits, writing asynchronous code with async/await feels like you're writing synchronous code, which we write most of the time. Writing straightline code rather than nested closures allows us to better express our intent to others. Using the combination of async/await and throws also makes handling errors straightforward.

Async/await was designed to resemble code we write everyday. It removed many of the frictions that came with writing and maintaining closures. For example, rather than capturing the return values on the right (like with closures), the return value of an async/await function is assigned to a variable on the left. This makes it just like your most basic function. You also no longer need to concern yourself with capturing the outer scope to access those values from within the closure. Which, if you had simply forgotten to add the weak keyword in front of your variables or self, you would have had a memory leak in your app, which is never a good thing.

Being able to write code that's idiomatic and easy to parse is beneficial in many facets. For instance, you'll write less lines of code which means it'll be easier to maintain. You'll also find the intent of your logic easier to maintain in your head. And it'll ultimately feel like the style of code you write the most often.

One of the features I find most useful is how easy it makes handling errors. Errors seamlessly propagate downstream and could be parsed by individual catch blocks that will execute additional code, such as triggering events and handling any unhappy path. Unlike with closures where you can accidentally leave out an vital completion call, using try await, Swift warns you if you leave out a throw, which makes our code safer.

Summary

This article introduces the core advancements that Swift has made in writing asynchronous code using Async/await. Async/await is here to stay, and iOS Developers should begin using it and advocating for its adoption in their organization if they aren't already.

That's all, my friends. I hope this post unblocks you from any ongoing challenge you may be facing. If you have any questions or edge cases you'd like to discuss, just leave a comment below. If you want to support this blog you can Buy Me a Coffee. You can also connect with me on LinkedIn and Twitter, where I share all my new posts.