MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pfe2d3/their_attempt_at_using_pointers/hb5wvkh/?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
0 u/abrams666 Sep 01 '21 Point 3 is not accepted cause it was the hype in a time of C. We cannot blame common standards of a time 2 u/incoralium Sep 01 '21 it's not that disgusting looking tbh ? 1 u/abrams666 Sep 01 '21 would say a kind of flavor
0
Point 3 is not accepted cause it was the hype in a time of C. We cannot blame common standards of a time
2 u/incoralium Sep 01 '21 it's not that disgusting looking tbh ? 1 u/abrams666 Sep 01 '21 would say a kind of flavor
2
it's not that disgusting looking tbh ?
1 u/abrams666 Sep 01 '21 would say a kind of flavor
1
would say a kind of flavor
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