
If you want to stand out in cybersecurity, learning to code is a must. It's the skill that separates the average cybersecurity professional from the truly skilled ones. In this post, I'm going to break down the best resources to get started with coding, how to keep your skills sharp, and common mistakes that can hold you back.
We'll be focusing on Python, the programming language I started with and the one I've spent the most time on. Python is beginner-friendly, widely used in cybersecurity, and a solid choice for anyone looking to level up. That said, the core lessons in this post apply to any programming language—so if you prefer something else, you’ll still benefit from these insights.
Related Video:
Do You Even Need to Learn Coding in the AI Era?
Some argue that with tools like ChatGPT and AI-generated code, learning to program isn’t necessary anymore. AI chatbots can pass entry-level coding interviews, and some junior coding jobs are even being replaced by AI. So, is learning to code still relevant?
Yes. Absolutely.
Here’s why:
AI is only as good as your prompts. If you don’t understand programming, you won’t be able to effectively prompt an AI to generate useful code.
Certifications require real coding skills. For example, OffSec's OSWE certification (OffSec Web Expert) requires you to write exploit scripts, and AI tools like ChatGPT are banned from the exam.
AI is limited. It struggles with anything beyond simple scripts, frequently makes errors, and cannot reliably debug issues.
Employers still value coding skills. If a hiring manager asks you to solve a coding problem in an interview and your only response is "I’d just use ChatGPT," you’re not getting that job.
The bottom line: knowing how to code makes you a stronger cybersecurity professional. Now, let’s talk about how to actually learn and retain those skills.
Best Resources to Learn Coding for Cybersecurity
1. Online Courses (Best for Structured Learning)
My top recommendation is Udemy—it’s where I learned Python, and I still think it's one of the best resources out there. The courses are comprehensive, beginner-friendly, and often go on sale for as little as $10 (even though the listed price might be $199.99—never pay full price!).
If you’re looking for other languages like Ruby (popular for security tools like Metasploit), there are great courses there as well. Keep an eye out for Udemy sales.
2. Books (Best for Self-Paced Learning)
Books are a solid starting point, especially if you like structured learning without distractions. My top recommendations:
Python Crash Course (3rd Edition) – A well-rounded introduction to Python.
Automate the Boring Stuff with Python – Focuses on writing practical scripts that can automate security tasks.
If you're learning a different language, look for similar beginner-friendly books.
3. Interactive Platforms (Best for Hands-On Practice)
If you prefer learning by doing, interactive coding platforms are the way to go. Some of the best options include:
Codecademy – Offers Python, JavaScript, and more. There's a free version, but the $14/month plan is worth considering.
Python Principles – A site with coding challenges to reinforce what you learn.
These platforms keep you engaged with immediate feedback, helping you retain knowledge better than passive learning.
How to Keep Your Coding Skills Sharp (and Avoid My Mistakes)
One of the biggest mistakes I made? I stopped coding regularly.
At one point, I relied too much on ChatGPT for writing small scripts. It was quick and convenient—but because I wasn’t actually coding myself, my skills deteriorated.
Here’s how to make sure you stay sharp:
1. Use Your Skills Regularly
Find real-world problems to solve (write scripts for automating security tasks, CTFs, or work projects).
If you can’t find real projects, work through coding challenges like PythonPrinciples.com
2. Set a Weekly Coding Challenge
I’ve committed to one live-streamed coding session per week to rebuild my skills. Find a schedule that works for you and stick to it.
3. Join a 100-Day Coding Challenge
I once did the 100 Days of Code challenge and documented my progress in my blog. It worked because I stayed consistent. If you want to accelerate your skills, this challenge is a great way to do it.
4. Avoid Relying on AI Too Much
AI is great for efficiency, bad for learning. Use ChatGPT only when time is critical (e.g., during an incident response or a fast-paced pentest). When you’re practicing or learning, write your own code.
Final Thoughts: Coding is a Game-Changer
If you want to move beyond the average cybersecurity professional, coding will set you apart. Here’s the game plan:
✅ Start with an online course (Udemy, Codecademy)
✅ Read beginner-friendly programming books
✅ Practice with hands-on platforms and challenges
✅ Code at least once a week to stay sharp
✅ Avoid over-relying on AI tools like ChatGPT
It won’t always be fun. It will be frustrating at times. But if you want to be a top-tier cybersecurity professional, you have to do the hard things that others avoid.
If you’re serious about learning, join me in my weekly coding challenge on my livestreams, where I work through coding exercises and projects. And if you want to build an even stronger cybersecurity foundation, check out my video on learning networking skills—another must-have for any ethical hacker.
Let’s level up together.