>180 lines of code
>already spaghetti
How do i learn to write clean code thats well structured?
>180 lines of code
>already spaghetti
How do i learn to write clean code thats well structured?
Other urls found in this thread:
Start with your programming socks, are you washing them properly? Do you wear clean ones every day?
rewrite it
Separate logically related things into dedicated classes/functions.
Read other people's code.
Make a class and make separate files
Stop using seeples
do you make some sort of plan for the project before you start coding, or do you go for the fun part first and then add the other stuff?
Test
I've heard this book aged terribly. Is that true?
refactor once in a while
make your code modular so you can replace it piecemeal
>well structured
make it data-structured.
That's sick and disgusting.
Give up and start submitting your code to The International Obfuscated C Code Contest. ioccc.org
organize it in modules with clearly defined apis
kill yourself
pretty much
90% of writing code is reading code
9% is rewriting it
1% is actually writing it for the first time
Don't just blindly apply everything it says. Read it and then think for yourself.
Sounds like someone hasn't been taking proper care of their socks. That would explain the crankiness.
You don't, just keep writing spaghetti. It's all fucking spaghetti anyway, you might as well get some practice dealing with it.
No