180 lines of code

>180 lines of code
>already spaghetti

How do i learn to write clean code thats well structured?

Attached: 1658346884477961.jpg (1289x967, 522.46K)

Other urls found in this thread:

ioccc.org/
twitter.com/NSFWRedditGif

Start with your programming socks, are you washing them properly? Do you wear clean ones every day?

rewrite it

Attached: shit.jpg (1600x1373, 238.26K)

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

Attached: images[1].jpg (800x1057, 56.51K)

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.

Attached: 1644681224497.jpg (980x980, 132.36K)

No