Ask HN: Is it worth it to learn C to better understand Python?
71–80 of 93 posts
Re: Ask HN: Is it worth it to learn C to better understand Python?
#72Earlier quoted context omitted.
Those are all vastly more complicated than C. And on top of that you have to learn three instead of just one! (Imagine trying to learn Rust without experience with C. Oh man.)
I think many programmers forget how it was to learn to program. Imagine the horror trying to make Rusts borrow checker happy without even understanding what an object scope or pointer is. C is a really good beginner's language, since any oop is explicit with function calls, kinda like Basic. No invisible destructors etc. Modern compilers even warns you on returning pointers to stack locals etc. I don't think Python i…
Re: Ask HN: Is it worth it to learn C to better understand Python?
#73Do you know any source to better study how python works? I mean something which are the steps to understand the internal CPython bindings and so on? I really want to step-up my Python skills but this part seems really hard for people with a non CS related background.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#74Earlier quoted context omitted.
For many people (myself included), the ease of writing python jumpstarted my journey to eventually learning everything else you mentioned gradually. If I would have had to learn it immediately I most likely would’ve felt disinterested and overwhelmed and given up since I didn’t know yet why I needed to learn it.
This is my major gripe with the college courses I took. They start at the molecular level and build to the planetary scale. This works for some people, but for me I had the hardest time finding a personal interest until I got to the application. It was the application I wanted to build, and to do actual work you don't manipulate the molecules directly. Build an application, then as you need to learn more to get thing…
Additionally, code is more collaborative than that, and it shows in a lot of engineering departments when people aren't trained on how to look at the shelf for existing parts before building something new.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#75Earlier quoted context omitted.
For many people (myself included), the ease of writing python jumpstarted my journey to eventually learning everything else you mentioned gradually. If I would have had to learn it immediately I most likely would’ve felt disinterested and overwhelmed and given up since I didn’t know yet why I needed to learn it.
This is my major gripe with the college courses I took. They start at the molecular level and build to the planetary scale. This works for some people, but for me I had the hardest time finding a personal interest until I got to the application. It was the application I wanted to build, and to do actual work you don't manipulate the molecules directly. Build an application, then as you need to learn more to get thing…
I wonder whether the fundamental structure of curricula could be changed to take advantage of this fact, because I think it's true for a lot of people.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#76Earlier quoted context omitted.
>when you only need to write two curly braces to create a “dictionary” (of course behind the scenes this is a hash table) many of the nuances of that data structure are hidden from you. You have no idea that accesses are on average O(1) but worst case are O(n). Well, that is wrong. Single value accesses are O(1) amortized. Also, Java is a lower level language but I don’t think simply programming in Java instead teach…
You got me curious there. Do you have any resource recommendation to learn about the cost of different data structures/algos and such?
With that said I highly recommend the classic Introduction to Algorithms (CLRS for short) by Cormen et Al. It is written in clear and straightforward language. And the lectures on MIT OCW by Erik Demaine are outstanding.
By reading and watching the lectures I deeply understood stuff that I had just muddled through previously.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#77When I look at a language like python or PHP I often just go down to the C code they call and use a tracer to watch calls to solve a problem without actually using the higher language.
Re: Ask HN: Is it worth it to learn C to better understand Python?
#78Re: Ask HN: Is it worth it to learn C to better understand Python?
#79Earlier quoted context omitted.
I think many programmers forget how it was to learn to program. Imagine the horror trying to make Rusts borrow checker happy without even understanding what an object scope or pointer is. C is a really good beginner's language, since any oop is explicit with function calls, kinda like Basic. No invisible destructors etc. Modern compilers even warns you on returning pointers to stack locals etc. I don't think Python i…
Agreed. C is a great starting point. It's a terrible continuing point though. Novice C programmers write seg-faulty code left and right, which is fine. That's not a problem; everything that's wrong is on the surface. In the mean time, they've learned how to implement a binary search tree or something, which is pretty cool when you do it in C. The intermediate two-star C programmer whose programs almost never segfault…
Re: Ask HN: Is it worth it to learn C to better understand Python?
#80Earlier quoted context omitted.
>when you only need to write two curly braces to create a “dictionary” (of course behind the scenes this is a hash table) many of the nuances of that data structure are hidden from you. You have no idea that accesses are on average O(1) but worst case are O(n). Well, that is wrong. Single value accesses are O(1) amortized. Also, Java is a lower level language but I don’t think simply programming in Java instead teach…
You got me curious there. Do you have any resource recommendation to learn about the cost of different data structures/algos and such?