Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Alfer5538yThere's a million way to code something. Some of them are good, some aren't.
This is not good tho
Srsly
Slap the cunt who made this -
kaku013338yI am asking for a "Friend" how van you it better.
My friend would really like these help. -
Code before:
for (i=1; i <= 10; i++) {
if (i == 0)
printf("0\n);
if (i == 1)
printf("1\n);
if (i == 2)
printf("2\n);
// ...
}
Someone: Did you know that you can put a %d and the i variable will be inserted in the string?
Him: Really?? COOL!
Him:
for (i=1; i<= 10; i++) {
if (i == 0)
printf("%d\n, i);
if (i == 1)
printf("%d\n, i);
if (i == 2)
printf("%d\n, i);
// ...
}
I'm pretty sure he missed the point. -
@stormwise example -> move mouse.
moveRight():
if cursor.x == 0:
cursor.x = 1
# and so on until the maximum of screen width (imagine if it 8k lcd)
Related Rants
What a genius way to print numbers.
undefined
programming
algoritm