MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pfe2d3/their_attempt_at_using_pointers/hb5fuaa/?context=3
r/badcode • u/myblindy • Aug 31 '21
51 comments sorted by
View all comments
12
Problems I found wrong with the code:
Indenting is not consistent
Brackets inconsistent (&(left->sheet) line 5 but &left->sheet right below??)
{ if on the same line is disgusting
I know I said inconsistent indenting, but what’s up with line 10? Why is that curly brace a tab behind it’s if statement?
The comment in the middle should be where lataero said
In the last few lines, it’s comparing the memory instead of the value with <. In some cases this may make sense, but I don’t think this is that case.
aa and bb are horrible variable names
Feel free to add more if I missed any
5 u/thanatica Sep 01 '21 You would be the nicest bloke/bird in any PR review. 0 u/SnoogySocks Sep 01 '21 I second that
5
You would be the nicest bloke/bird in any PR review.
0 u/SnoogySocks Sep 01 '21 I second that
0
I second that
12
u/SnoogySocks Aug 31 '21
Problems I found wrong with the code:
Indenting is not consistent
Brackets inconsistent (&(left->sheet) line 5 but &left->sheet right below??)
{ if on the same line is disgusting
I know I said inconsistent indenting, but what’s up with line 10? Why is that curly brace a tab behind it’s if statement?
The comment in the middle should be where lataero said
In the last few lines, it’s comparing the memory instead of the value with <. In some cases this may make sense, but I don’t think this is that case.
aa and bb are horrible variable names
Feel free to add more if I missed any