Community Manager at Infosec!
Who we are | What we do
What is the best way to learn to code?
Glldya
Member Posts: 1 ■□□□□□□□□□
I'm teaching myself to program in Python and I've hit a bit of a snag. I'm using a course on Udemy and it covers quite a lot; variables, if elif and else statements, while and for loops, booleans, lists dictionaries and tuples, functions, and object oriented programming. However, I've found that it's very, very difficult to take the lessons I've learned on the course and apply them more generally to other problems. The instructions are very specific to each exercise. The instructor will say "Give variable X this value, then give variable Y that value, then use a while loop, etc..." all the way through until the project is completed. The end result is that I've learned to complete that specific project, but only by following the instructions like a recipe. Ask me to complete a different project using the same techniques and I'm stuck, even if the second project is objectively easier than the first one.
It's getting very frustrating, especially since I don't currently have the money to pay for a real course and am basically stuck with teaching myself. What, in your experience, is the most effective way for a novice coder to learn the principles of coding so as to best expedite his ability to use code to solve different problems? Thanks in advance.
It's getting very frustrating, especially since I don't currently have the money to pay for a real course and am basically stuck with teaching myself. What, in your experience, is the most effective way for a novice coder to learn the principles of coding so as to best expedite his ability to use code to solve different problems? Thanks in advance.
Comments
-
Infosec_Sam Admin Posts: 527 AdminI think codecademy is a great resource as well, but it sounds like you have a different problem than you think you have. It sounds like you do know the fundamentals of programming (variables, conditionals, loops, etc.), but your problem is not knowing how to bring them together to make a project. This might be because you're scoping your projects too wide right now. Here's a link that includes 5 mini-projects for Python that are geared towards a beginner. This is the scope that you want to focus on while you build your skills, just single-function projects for right now. Once you feel confident in that, try to think of single functions you could add to your functions. Maybe you want to add a GUI to the random number guesser, so you can learn how Python interacts with HTML, or you want to see how to link to a database (Warning: Databases are hard and they suck, but they're super useful). It's all about incremental addition.
As far as additional learning goes, you should look into object-oriented programming. It's not Python-specific, but Python is an OO language. This will involve learning things like inheritance, abstraction, encapsulation, and polymorphism. Remember to pace yourself, and understand that it will take a while to progress. -
paul78 Member Posts: 3,016 ■■■■■■■■■■My personal opinion is that you ought to figure out some problem that you want to solve with a software solution. I.e. build a website to host a forum, build a calendar scheduler, recreate tetris, etc. Working to create an actual working application imo is the best way to learn how to program or to learn a programming language. That's what I did and it works well for me. If you are like most learners - hands-on experience and actual problem solving is usually the best experience to get. And with the abundance of resources on the internet - it's actually a very practical way to learn.Good luck in your journey!
-
rsxwithslicks Member Posts: 75 ■■■□□□□□□□I'm trying to learn myself and something that seems to come up a lot is don't get in a loop of just doing tutorials. It can create a false sense that you actually didn't learn anything. Try and build things, whatever they may be, to figure out how they work and are written. As paul78 mentioned.. Hands-on experience and actual problem solving is the best experience to get.
-
MontagueVandervort Member Posts: 399 ■■■■■□□□□□Having different books and applying what I learn from the books towards projects is what always worked for me.
Getting stuck in "Tutorial Land" just leaves you going around in circles.
To fully learn/understand you have to come up against things that you need to build/solve/fix and then learn ways to make them work.
That's the way it to get it all to "stick" in your mind.
-
jdancer Member Posts: 482 ■■■■□□□□□□Here are some resources:1. Think Python 2e http://greenteapress.com/wp/think-python-2e/2. How to Program https://www.thegreatcourses.com/courses/how-to-program-computer-science-concepts-and-python-exercises.html3. Snap! https://snap.berkeley.edu/
-
thomas_ Member Posts: 1,012 ■■■■■■■■□□Find something you want to automate and then work to automate it. When you run into problems research them on the internet. You'll slowly start learning things and it starts to make a little more sense. You'll start to remember how to do things without looking them up and you'll eventually get to where you are doing more advanced things.
-
JDMurray Admin Posts: 13,097 AdminThe book Automate the Boring Stuff with Python is good for beginner Python projects. The HumbleBundle book deal occasionally has Python books.
-
Roksana Member Posts: 2 ■■□□□□□□□□Thank you, this question was also relevant to me! Thanks for the cool information!
-
marknathon Member Posts: 2 ■■□□□□□□□□I think learning at your pace is more important. But learn regularly. Best master the basics so that your concepts are clear. Udemy is a great resource.
However, in my view, practice is more important. After 1 month or so of learning the basics, you should start making some good projects. Here is a list for 2020 projects ideas for python beginners by FavTutor .This is an updated list for this year and these small projects will be the best challenge to become a coding ninja. -
JDMurray Admin Posts: 13,097 AdminBoth Pluralsight and O'Reilly Media have lots of learning-to-code resources as well.
-
itdept Registered Users Posts: 275 ■■■■■■□□□□You learn to code by doing. Picking up a a book on coding or playing the piano might be good for theory but the doing is where the real learning happens. FYI, I love to learn by reading but the doing is where the "magic" happens
-
srothman Member Posts: 82 ■■■■□□□□□□I started working through some "Coding with Mosh" videos. It's very basic, but it's small enough chunks to not be overwhelming, and there is nice continuity as you work through the modules. Highly recommended.
-
LonerVamp Member Posts: 518 ■■■■■■■■□□The biggest suggestion on the best way to learn to code? To code.Find reasons to use your coding skills. Find projects or tasks or just small things to do and Google how to do them. Rename all your mp3 files to something else. Browse a web page using only Python. Submit a form!From my experience with many other IT folks, it's all about learning the basics, giving yourself a shot, and then FINDING PROJECTS. Maybe you have something at work that needs solving and you think that language will work.Another thing you can do is after following your course projects word for word, change something. Echo out all the variables to the screen. Add some comments. Add some better displays. Tweak the order. Make a function. Add input arguments rather than hardcoded variables.
Security Engineer/Analyst/Geek, Red & Blue Teams
OSCP, GCFA, GWAPT, CISSP, OSWP, AWS SA-A, AWS Security, Sec+, Linux+, CCNA Cyber Ops, CCSK
2021 goals: maybe AWAE or SLAE, bunch o' courses and red team labs? -
JoJoCal19 Mod Posts: 2,835 ModAgreed. Learning by doing, by having something you'd like to create, is the best. I've done that with scripting. I had a tedious and repetitive task that needed to be done at one job. I decided to learn PowerShell to automate it. Covered some basics and just did trial and error until I got a working script.
I'm at it again. At my new job, I'm looking to modernize an offering by creating a self service portal and a dashboard. Of course we have no access to dev resources. Well, time to learn JS (along with re-learning HTML and CSS since it's been forever), and a backend framework as well.Have: CISSP, CISM, CISA, CRISC, eJPT, GCIA, GSEC, CCSP, CCSK, AWS CSAA, AWS CCP, OCI Foundations Associate, ITIL-F, MS Cyber Security - USF, BSBA - UF, MSISA - WGU
Currently Working On: Python, OSCP Prep
Next Up: OSCP
Studying: Code Academy (Python), Bash Scripting, Virtual Hacking Lab Coursework -
gurwinderkaur Member Posts: 5 ■■□□□□□□□□Glldya said:I'm teaching myself to program in Python and I've hit a bit of a snag. I'm using a course on Udemy and it covers quite a lot; variables, if elif and else statements, while and for loops, booleans, lists dictionaries and tuples, functions, and object oriented programming. However, I've found that it's very, very difficult to take the lessons I've learned on the course and apply them more generally to other problems. The instructions are very specific to each exercise. The instructor will say "Give variable X this value, then give variable Y that value, then use a while loop, etc..." all the way through until the project is completed. The end result is that I've learned to complete that specific project, but only by following the instructions like a recipe. Ask me to complete a different project using the same techniques and I'm stuck, even if the second project is objectively easier than the first one.
It's getting very frustrating, especially since I don't currently have the money to pay for a real course and am basically stuck with teaching myself. What, in your experience, is the most effective way for a novice coder to learn the principles of coding so as to best expedite his ability to use code to solve different problems? Thanks in advance. -
JDMurray Admin Posts: 13,097 AdminSome other recommended sources for learning programming and computer science:
Hour of Code Activities at code.org
Free coding courses at edX
How to Code at edX
Teach Yourself Computer Science
How to Design Programs (free online book)
-
yuddhidhtir Member Posts: 197 ■■■■□□□□□□Currently I am learning to code. I have been trying myself to learn code since 8 years but every time i would go through all theories then end up abandoning it after getting lost. My problem was, not doing practicals or projects.
Recently I was working as database support, there I learned about functions,data types and realized how similar it is to programming.
Web developer is the most common route to a developer career as its visible with it's GUI and ignites interest.
I am studying a Udemy full stack developer course and learned a lot. On you tube, the video channel of Brad Traversy is so helpful. He also has a udemy couse of 20 Javascript projects which will get hands dirty with code.
So the path I am following,
HTML>CSS>JSS>any JS framework>SQL>server side framework like NodeJS,Laravel and so on.“Satisfaction lies in the effort, not in the attainment; full effort is full victory.” -
Athi123 Member Posts: 3 ■□□□□□□□□□The best way to learn coding is by combining hands-on practice with structured learning. Always start with beginner-friendly languages like Python or JavaScript, focusing on foundational concepts like variables, loops, and functions. Use online resources, coding platforms, or courses for guidance. Build simple projects to apply your knowledge and gradually tackle more complex tasks. Engage in coding challenges, join developer communities, and seek feedback to improve. Consistent practice and curiosity are key to mastering programming effectively.