From The Challenges - Curl
Exploring the software engineering lessons we can learn from the solutions I've seen.
Hi this is John with this week’s Coding Challenge.
🙏 Thank you for being one of the 91,972 software developers who have subscribed, I’m honoured to have you as a reader. 🎉
If there is a Coding Challenge you’d like to see, please let me know by replying to this email📧
Welcome To Coding Challenges - From The Challenges!
In this Coding Challenges “from the challenges” newsletter I’m sharing some of the common mistakes I see software engineers make when tackling the Coding Challenges.
I’m sharing both the mistakes people make and some thoughts on how you can you avoid making the same mistakes when taking on the coding challenges or when writing software professionally. Sometimes we have to make mistakes to learn from them, somethings we can learn from other people’s mistakes, then make our own new ones! 😀
Recapping The Curl Coding Challenge
In the build your own curl coding challenge the goal was to write a clone of the command line tool curl.
So what is curl? It’s a command line tool for transferring data with URLs - for the sake of this challenge though we’re going to focus on it’s use as a tool for sending HTTP requests. As such it’s often used to test or demonstrate RESTful APIs. Many REST API’s provide examples using curl in their documentation.
It’s also one of the example projects I use in my course teaching software engineers Go.
More Videos Added To The Coding Challenges YouTube Channel!
I’m continuing to add new videos to the Coding Challenges YouTube Channel, if you’re interested please consider subscribing to the YouTube channel. If you have suggestions for content, please hit reply / send me a message with them.
Recent videos cover:
An interview with a Principal Software Engineering Manager at Microsoft about the benefits of building projects (like Coding Challenges).
You can find these videos and several others on the Coding Challenges YouTube Channel.
If you’re interested in AI engineering or leveraging AI for developing code you might also enjoy the interview I did with a Director of Software Engineering at Oracle Cloud.
If You Enjoy Coding Challenges Here Are Four Ways You Can Help Support It
Refer a friend or colleague to the newsletter. 🙏
Sign up for a paid subscription - think of it as buying me a coffee ☕️, with the bonus that you get access to a monthly AMA, a monthly workshop and 20% off any of my courses.
Buy one of my self-paced courses that walk you through a Coding Challenge.
Join one of my live courses where I personally teach you Go by building five of the coding challenges or systems software development by building a Redis clone.
Five Common Mistakes Software Engineers Make Solving The Curl Coding Challenge
I’ve pulled together this list of common mistakes from the hundreds of submissions I’ve been sent privately and the many shared in the Coding Challenges Shared Solutions GitHub Repo.
Mistake 1 - Using The Built-In HTTP Library
The goal of this project is to learn about TCP and the HTTP protocol. You don’t learn if you just use the HTTP library from your programming language.
Sure you should use the HTTP library when you’re building a production client, but we’re not building for production in Coding Challenges, we’re building to learn. That doesn’t mean you shouldn’t try to write the best quality code you can. It does mean sometimes you should re-invent the wheel so you have a better understanding of the wheel, how it works and how it can fail. That knowledge helps you build more robust software systems.
Mistake 2 - No Validation
Whenever you let a user provide input, be it from the command line, via a graphical user interface, web page or API call, you should validate the input. Users make mistakes, good software allows for that and guides to user on how to fix the mistake and get the best from the software.
For example, too many solutions to this coding challenge never checked the provide URL wasn’t malformed.
Mistake 3 - No Error Handling
This mistake follows on from the lack of validation. If you don’t validate user input, you will get errors. Equally when you do something that is inherently unreliable - yes network calls are unreliable - you need to expect failures.
You code should check for failures and errors and handle them gracefully. Assume a network request will fail and allow for it. If you don’t think they will, just remember how many recent outages we’ve had from big cloud providers or key Internet infrastructure providers that took down large parts of the Internet for hours at a time.
Mistake 4 - No Testing
Testing your code has always been important. Learning to test code is becoming even more important now that we’re having AI write code. It’s a mistake to skimp on testing and deprive yourself of the chance to learn and perfect this skill.
Mistake 5 - No Readme
If there’s no README for your project someone new to it has no idea where to start. For that matter, you returning to it in a year or so might not either. You’ll probably have forgotten the context.
Creating a README that tells the user what the code in the repo does, how it does it and how to both work on it and deploy it makes your code much more accessible to future users, whether that’s you / a team mate in 6-12 months time, a hiring manager that you’re showing the repo to or an AI coding agent you want to use to help you develop it.
Request for Feedback
I’m writing these coding challenges and this new from the challenges series to help you develop your skills as a software engineer based on how I’ve approached my own personal learning and development.
What works for me, might not be the best way for you - so if you have suggestions for how I can make these challenges more useful to you and others, please get in touch and let me know. All feedback greatly appreciated.
You can reach me on Bluesky, LinkedIn or through SubStack
Thanks and happy coding!
John
P.S. If You Enjoy Coding Challenges Here Are Four Ways You Can Help Support It
Refer a friend or colleague to the newsletter. 🙏
Sign up for a paid subscription - think of it as buying me a coffee ☕️ twice a month, with the bonus that you also get 20% off any of my courses.
Buy one of my courses that walk you through a Coding Challenge.
Subscribe to the Coding Challenges YouTube channel!

