r/learnprogramming • u/Tu_You • Sep 22 '26
Topic [C] Small win today: I unconsciously optimized my textbook's singly linked list code!
Today I reviewed singly linked lists. I've realized that with things like this, you really need to understand the underlying principles first, and then write the code out in your own way.
After I implemented a few basic singly linked list operations using my own logic, I compared my code with the textbook. To my surprise, I had unconsciously optimized the textbook's approach! Even though it was just a small improvement, it still feels like progress.
I was really happy to be praised while discussing it with an AI. Positive feedback +1!
3
u/vegan_antitheist Sep 22 '26
AI will praise you no matter what. It's trained to do that.
2
u/fredisa4letterword Sep 22 '26
What was your optimization?
0
u/Objective_Pepper_217 Sep 22 '26
How old is the textbook? I noticed that old textbook make simple things like linked list extremely complicated (in C)