Chamber đ° of Tech Secrets #13
Observations from returning to writing code after a 4-year hiatus
The Chamber đ° of Tech Secrets is open! In this weekâs humbling edition, Iâll share about my experience returning to writing code over the past 8 weeks after a 4-year break.
Return to the Code
Over the past 8 weeks or so, I have returned to writing code for a personal side project. I hate to admit it, but it has probably been 4 years since I wrote my last production-worthy lines of code, which were part of our IoT and Edge Compute platform at Chick-fil-A. I canât believe it has been so long!
Where have you been?
Over the past several years, I have shifted most of my focus to the leadership of our Enterprise Architecture practice, scaling our team, and figuring out how to pivot our model given the huge growth of our business (sales, restaurants, number of corporate staff, technology systems). I used my years of technical depth on cloud, edge computing, IoT, DevOps and software engineering to inform this direction and attempt to help our organization scale with growth. I spent a lot of time on launching our Business Architecture practice as well. These were smart decisions and I have no regrets. This is part of the âtheory of the wavesâ inherent in an influence-based architecture role.
The wave I was riding has had its time, broken and scattered over the shore. Hopefully that has and will result in positive influence and outcomes. Itâs time to go deep (and somewhat hands on) into the technology again.
What I am using
I am back in the software engineering game. Just for context, here is what I have been using (which is mostly a return to my practices from a few years ago):
IDE: VSCode
Languages: Golang and a little Python
GitHub: Local git client + monorepo for as long as possible
Local Dev:
Brew install
for everythingDocker Desktop: making sure everything can run in containers as I go
Database: Postgres
Cloud: AWS, Terraform, and likely K3s on EC2 (not there yet)
Observations
Reflecting on the past eight weeks, here are some observations I have had.
I felt pretty stupid for the first 48 hours: I have written a fair amount of code in my life and I was pretty efficient when I paused. I went through a deep season of 30 hours a week of Enterprise Architecture and another 30 hours a week of hands-on development for our IoT and Edge Compute platform. As I restarted, I really struggled to remember the syntax for anything. The last code I wrote was Golang and I went right back to it (still my fav), but I could not remember how to create a struct or write an âif blockâ⊠not to mention using channels and go routines. Embarrassing!
The âgetting startedâ friction is still real: I have always felt like setting up a functional local development environment was a major pain. Nothing ever works the first time. Installing programming languages, settings environment paths, configuring the IDE properly for debug purposes (launch.json), figuring out dependency / package management, spinning up local databases, local networking with Docker, on and onâŠ. Go modules were fairly new (iirc) when I stepped away so I had to learn about those, too. Writing about this now, its all sounds so simple and easy, and I could answer any question you ask⊠but when you are getting started or coming back, it can be a major pain and barrier to progress. I would guess there are tools that help with this now like Replit?
It comes back quickly: Thankfully, I can report that (at least for me) writing code comes back quickly. There seems to be a âmuscle memoryâ and within 48 hours, I was a good percentage of my previous ability (60%). A few weeks later, I am back to quickly navigating all the things, fixing issues, and not getting stuck anymore. I feel like I can churn out production services with moderate-to-good code quality every few days... and that is on a side project. My SQL skills returned. My docker skills, too. Iâm back, baby!
I know how I want to structure things: One thing I have not lost is a good understanding of how to write modular code. I have a good sense of how to structure things for composability and reuse at the code level. I know how to break things into packages that make sense. I think this architectural mindset towards how to write code is one of the most important things in a world where Generative AI can produce a lot of code quickly, but not necessarily .
Generative AI is a great helper: When ChatGPT 3.5 and 4 came out, one of the things I was curious about was its ability to write code. I have been using it endlessly in the development process, and I would rate it as a junior engineer that happens to know everything about everything. I say âjunior engineerâ because it needs explicit instructions on how to do everything, and its work requires lots of review and refactoring. Nevertheless, I find it to be an extremely useful assistant.
Getting started boilerplate: âwrite me go code that does A, B, and C. We should have a struct named X that collects this data. Yada yada yadaâ. This generally gives me a great base to build on. I find it is easy to end up with a lot of generated spaghetti code and some poor abstractions if you are not very detailed about these requests, but it tends to be more efficient to take the boilerplate and refactor yourself vs. trying to arm-twist GPT4 into it.
Debug Iterations: I usually try what GTP gives me and if I hit any errors, I pass them back into the next prompt. This (humorously) results in a âMy apologiesâŠâ, and then a good suggestion for how to fix the bug without me having to even consider thinking about what might have taken place. I find this really convenient so I can maximize the time spent on the more nuanced parts of the problem I am solving. I send the bugs I generate in as well and usually get an explanation and good fix.
Tricky functions: For anything that might be recursive or have multiple nested loops as part of the solution, I just ask GPT4 to handle them for me. I am capable, but those problems take a lot of focus, and I am trying to be productively lazy. The generated code is decent and something that I can refactor and modularize in a few minutes of work, which also makes sure I understand it well enough to interact with it going forward.
What does this do?: I ask this a lot less often, but sometimes itâs nice to find out what a block of code that I didnât write does without spending time to read through all of it. Efficiency.
Bard?: I have been switching over to Bard for places where I want up-to-date information about a language I am using. I donât want to miss âthe rightâ library to do a thing. I find the Bard-generated code to be inferior to GPT4 at present, but I am sure it will improve quickly.
I no longer google or stack overflow: In the past, I would google for answers to questions I had and then look at the first stack overflow links. I have done that precisely zero times the last eight weeks.
Writing Code has made me sharper in other areas already: I would not self-describe as dull or out of touch technically, but getting back to the front lines has made me noticeably sharper in my other work. I have another fresh context to help me think about things and I am seeing cross-disciplinary applications. I am having better technical conversations when networking. My speaking and writing communication feels clearer and better structured. Anecdotally, I also felt this way when learning Spanish and Italian, so its no surprise that a programming language would have similar effects.
I plan to never lose my programming chops again: While the first 48 hours (of time, not active work) were frustrating, I have found the return to programming to be really fun. I love creating things that work, and I REALLY love the accelerated progress that comes from having an assistant that writes average code but that knows everything (until 2021). I would wager that I have been able to build functional, medium-to-high quality things in a single sitting that would have taken many days in the past. I expect my âtheory of the wavesâ will prove true again and I will rise to some new crest, but I plan to keep the frequency of those waves smaller so that I do not go back to âstarting overâ in the future. For those who have shifted away from programming on a regular basis, Iâd encourage you to do the same. Find side projects that keep your skills in tact.
Should you return to the code?
If you are an architect that has not touched any code in a year, two, or more, I suggest finding a project you can work on ASAP. Keep those skills sharp. It will serve you in your day-to-day role. You donât need to write large-scale, production-level code, but do something.
If you have never written code before, it has never been easier to get started. ChatGPT can help you learn iteratively, from setting up a local environment to installing dependencies to writing your first working lines of code. That wonât land you a programming job anytime soon, but you might have some fun, build something useful, and enable yourself to perform your normal tasks more efficiently and effectively.
The Chamber of Tech Secrets is closed. Thanks for reading. I hope you found this helpful. If you did, Iâd love if you subscribed or shared with a friend. đ
Great post!
I have returned too. Rather than trying a project, I have started off with reading a book and trying things out in VSCode. The C# space has changed so much in the last few years, I genuinely feels like starting afresh. It feels like home now though!
Gran escritura y disfrutĂ© leyendo sobre su uso de GPT.đđŸ