Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>look at a program and see the data structures rather than the code, and in my opinion that's a better way to think about a program.

that sounds pretty difficult for me to understand

when you read the code, analyze and understand it and due to your experience you see that something is bad (e.g poor api), then how can you "lose focus" from it / ignore it?

how it ain't just lack of experience or simply not caring?



It is a question of priority, I think what GP is saying is that programmers used to these contests will focus on getting their structures right first, and will take care of logic on a second time, if they have time for it. In programming contests, they don't have time.

And I think it makes sense and that is a hierarchy. Data structures are the most important, followed by logic (algorithms), followed by comments.

The reason is that if you change your data structures, you need to change your algorithms, and if you change your algorithms, you need to change your comments. Data structures define everything, comments define nothing but themselves.


Yeah exactly, thanks. I think I should've said "and focus on the data structures" instead of "and see the data structures"




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: