AI can now write code for you - OpenAI Codex, discovering Supabase and more
This week OpenAI released Codex - a descendant of GPT-3, trained on public GitHub repositories to write code for you. GitHub Copilot also uses Codex behind the scenes.
It basically converts natural language to code. This means that you simply describe what you would like to do in english and the model will convert it to code. It performs best with Python, but also supports a dozen other languages.
Here is great demo video from the OpenAI team:
Why is this impressive?
The sheer amount of data it was trained on and the size of the model (a few billion parameters) - this shows how good our hardware capabilities have become recently.
Coding is not a trivial task. The fact that an AI model is able to understand intent from text, remember previous context, reason about it and break it down to logical statements and finally convert the logic into multiple programming languages by following correct syntax can be challenging for humans too.
The model was trained on unstructured data in the wild and is able to produce great results shows how much deep learning methods have improved over the last few years.
Potential Use Cases
Automate the boring parts of coding - it could automate and help to speed up writing many small and simple functions. Think of it as a replacement to stack overflow - for example, imagine you need to call an API endpoint and you don’t remember the exact syntax or packages to import. Instead of looking it up on stack overflow Codex can easily help you out, so you can focus on the bigger picture and save time.
It could help you test out different libraries to understand the working and see how code is written. This could be a huge time saver, by helping you make tooling decisions easily.
It could generate great boilerplate code for you to build upon.
Maybe automate software testing and documentation.
Having said all this I am pretty sure this is nowhere close to replacing humans in any capacity. Tools like Codex cannot be a replacement for a human programmer, they can only make us more efficient so we can focus on things we enjoy doing more.
It cannot handle long connected logical statements, and basically is limited to whatever it was trained on. So if you want to write code that is completely original this cannot help you.
I am quite excited for a future where software engineers are assisted by AI so we can focus more on the engineering parts and the coding parts can be automated.
A great alternative to Firebase - Supabase
Supabase is an open source alternative to Firebase and gives you a managed postgres database, authentication and a file store. I came across this while researching for something work related.
What I really like about it is that it is open source, and basically built with other open source software out there. Also the supabase organization is doing a great job building a lot of other open source tools that they are using for their main project.
Some of the most interesting projects I found were - realtime, postgres-meta & gotrue.
I also love their clean and simple UI, and their overall documentation is nice. Since this is open source, you can even self host their entire backend (the frontend is in the process of being open sourced).
One thing that stood out was their database management dashboard. It lets you do everything a database GUI tool does, but has a simple, intuitive UI. It also has a feature that let’s you click on the foreign key column and it takes you directly to the corresponding row that was linked - like this. There are a lot of other interesting features, and would highly recommend checking out their docs.
The dashboard crashed for a a few times for me, and there were a few bugs - but it is a work in progress and I am really excited to see where it goes.
What I read this week
A Philosophy of Software Design by John Ousterhout
This is a great book for people who care about good software design. I am halfway through it and learned a lot of ideas, like Strategic vs Tactical Programming. Although one or two chapters so far were not that interesting to me, I am looking forward to finishing the book.The Power of Now: A Guide to Spiritual Enlightenment by Eckhart Tolle
This is about mindfulness and the importance of staying present in the moment, I picked this up last week and enjoying it so far.Read quite a bit about the concept of closures and some common patterns they are applied in - if you use JavaScript then you are definitely taking advantage of closures a lot more than you think you do.
Favourite YouTube videos for the week
TechLead Scammed You With Million Token (as a millionaire) by Coffeezilla
I am a Coffeezilla fan and watch all his videos. If you are aware of who TechLead was, you will enjoy this.YOU can beat Google the way Amazon does. Here’s how. by Garry Tan
A classic Garry Tan video explaining how big companies run out of ideas and what can be done about it.Samsung Galaxy Z Flip 3 and Z Fold 3 by MKBHD
OpenAI Codex Live Demo by OpenAI