On hackernews today ... The cost of forsaking C | discussion
Interesting discussion, I'm liking the way c makes me think about programming but I'm having trouble finding good ways to practice. I wrote out a few basic sorting algorithms in c, spent awhile watching videos, visualizing them and staring at the code, then tried to wrap my mind around merge sort. I get the idea but I think I need to work with recursion a bit to really get what the code does. I think what I really need is just clear reasons and exercises to write more code.
My first reaction to what you've submitted here is the same as what I've said to almost everything you've submitted:
Usually functions have (a) API docs i.e. inputs, outputs, and (b) implementation comments as needed. It's true that these are short fairly simple examples. But if you don't get into the habit of doing this stuff now, as your coding practice becomes ingrained, then people who you work with later - and you looking at your old code - will either do lots of extra work and/or end up starting from scratch rather than building on what you did before.
... I've uploaded C files that we worked on in class. Somewhat random but might be helpful reminders.
We talked about doing next something like
While it isn't in C, this may be a good resource :
last modified | size | ||
bubbleSort.c | Sun Dec 22 2024 05:12 am | 592B | |
insertion.c | Sun Dec 22 2024 05:12 am | 542B | |
jim_time.c | Sun Dec 22 2024 05:12 am | 169B | |
selection.c | Sun Dec 22 2024 05:12 am | 656B |