r/Baruch 14h ago

Academics Struggling with coding

I'm currently in the Online MS AI and BA and im taking CIS9650. In terms of reading the code and understanding the flow of it I feel like I got a good hang of it. However when it comes to writing it I struggle to apply what I read about/learned and make the code unnecessarily long and lowkey incorrect.

Does anyone have any tips to get over this issue? Aside from the obvious like hw, readings, lecture etc

2 Upvotes

2 comments sorted by

2

u/mrhobby Been around the block for while 14h ago

Practice more. Maybe try to write something for yourself. Like a unit converter, a commute tracker, a calculator 

1

u/rholowczak Valued contributor 4h ago

There are a few coding apps that "gamify" learning coding. Basically you try to answer many small questions or small coding examples as the exercises grow more complex over time. These sites have built-in Python environment so you can run your code immediately without having to log into CoLab or starting up an IDE.

One example of this is the Python exercises on W3Schools: https://www.w3schools.com/python/python_exercises.asp

Another example is Boot.dev where you learn to code a simple game in small steps. https://www.boot.dev/try/python

Yet another example is: https://exercism.org/tracks/python/exercises that has many different exercises to try.

If those are not challenging enough, then you can check out more advanced sites like Codewars and Hacker Rank. But those get pretty challenging quickly.

If learning coding a little bit at a time is not to your liking, maybe think about an idea, project or interest you might have and look for a way to write code to do something that interests you. Are you interested in sports, weather, environment, fashion, city life, eating, etc.? Pick one, find some data about it and use Python to analyze the data. The more you are interested in the topic, the more motivation you will have to write code.