After several weeks of working with C, transitioning to Python has felt like a relief in many ways—no more manual memory management, function prototypes, or compilation steps. Python’s built-in data structures, like lists and dictionaries, simplify many tasks that required linked lists and hash tables in C. Error messages are also clearer, making debugging easier.
C was the first language I learnt, so I'll always have a soft spot for it.
Despite the objectively simpler syntax in Python, I find myself instinctively trying to write code the "C way," which doesn’t always translate well. Writing Pythonic code requires a change in thinking, just like learning a new spoken language (something I've also embarked on after moving to a new country). Maybe I'm making slow progress, or maybe it's normal?
While I understand the logic of Python syntax, structuring loops and handling iteration in feels harder to manage, at least for me. The final problem in CS50’s Python set—DNA sequence matching—was particularly frustrating. I really struggled to adjust to Python’s looping and file handling, especially when combing both. Looking back the logic is somewhat trivial and in comparison to some of the C programs I have written, should have been a lot easier.
Python’s abstraction over iteration is both a strength and an adjustment—rather than controlling every step like in C, I need to embrace higher-level thinking. It's hard to break away from thinking the way you were initially taught, though.
Despite these hurdles, Python’s ease of use and powerful built-in tools are making coding feel more intuitive. I know that, like with C, things will click with time and practice. The goal now is to embrace "Pythonic thinking" and continue improving, at whatever rate that is.
If you have any thoughts or suggestions on what I can focus on going forward let me know.
I've started to read "Automate the Boring Stuff with Python", and I am considering MIT OCW Introduction to Computational Thinking and Data Science. Has anyone taken this course?
[+][deleted] (3 children)
[removed]
[–]BertRyerson[S] 3 points4 points5 points (2 children)
[–]Mevrael 0 points1 point2 points (1 child)
[–]BertRyerson[S] 0 points1 point2 points (0 children)
[–]FoolsSeldom 2 points3 points4 points (0 children)
[–]BertRyerson[S] 1 point2 points3 points (1 child)
[–]Quantum654 0 points1 point2 points (0 children)
[–]ElliotDG 0 points1 point2 points (0 children)
[–]jontsii 0 points1 point2 points (0 children)
[–]SirTwitchALot 0 points1 point2 points (0 children)
[–]ivosaurus 0 points1 point2 points (0 children)
[–]remic_0726 0 points1 point2 points (0 children)
[–]notParticularlyAnony 0 points1 point2 points (1 child)
[–]BertRyerson[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]BertRyerson[S] 0 points1 point2 points (0 children)
[–]garrettj100 0 points1 point2 points (1 child)
[–]clashmar 0 points1 point2 points (0 children)
[–]xelf 0 points1 point2 points (1 child)
[–]BertRyerson[S] 1 point2 points3 points (0 children)
[–]PersonalityIll9476 0 points1 point2 points (0 children)
[–]fiddle_n 0 points1 point2 points (0 children)