How do I force myself to write poor code? I can't really finish any project...

How do I force myself to write poor code? I can't really finish any project, when i start one after I finish 500 lines I start optimizing every bit of code I can. Until the 500 lines become 100 lines of obscure but very efficient code. This is a very bad practice because i want to finish the projects i create instead of just re-doing the same functions over and over, i want to move forward but i cant, how do i stop writing clean code?

Attached: 220px-Bandeira_Federalista_Ibérica_(1854).svg.png (220x147, 550)

Set time constraints and only optimize code if you have 'free' time left.

dont be gay lol

>100 lines of obscure but very efficient code
>clean code
no

It's not that you're writing good code, you're simply writing poor code and optimizing that. If you write good code from the start you wouldn't spend time optimizing it.

You have autim

Just limit yourself to 1 rewrite.

This is fine. Just be sure to find the right balance between conciseness and readability. After a while of refactoring your own code for far too long, you'll start to get better at it and recognize better ways to solve your problem (e.g. how to best apply design patterns) the first time, cutting down on the time you spend refactoring after the fact.

premature optimization is a sign of bad code and coder. You already are writing bad code.

You must use your willpower.

Do not optimise your program until after it is working.

Nothing of what you're doing is efficient at all and it will probably result in rather poor code which is a pain in the ass to modify to suit upcoming requirements, stop being a brainlet for once in your life

Don't optimize until after your code performs the intended function

finish the project and then optimize?
Take notes of any optimizations and do them after you're done writing your shit

>obscure code
>clean code
pick one. Also the saying goes "premature optimization is the root of all evil". You should optimize your code after you've seen the profiling data, not because muh can.
Also I very doubt you can truly optimize your code, you'll probably just use more compact notation and less spaces.

>Until the 500 lines become 100 lines of obscure but very efficient code.
>how do i stop writing clean code?
Yep, this one is going in my cringe compilation.
"Jow Forums on programming" subfolder.

Attached: 1532936938670.png (1076x779, 523K)

freelance

what kind of "optimization" do you do that leads to less lines?

Make a todo list of features you want
When you are done implementing them THEN you optimize

If you can't do that then split your features into a release road map and then optimize
As in you only implement a few features, then make them efficient, then increment the version number

Attached: 1533421204325-g.png (426x364, 50K)

redundant shit, implementing functions from the standard lib instead of creating then, using less variables, etc...

Don't be an autist.

>500 lines become 100 lines of obscure but very efficient code
>how do i stop writing clean code?

Attached: 1475549948203.gif (250x251, 999K)

Just run some benchmark on the program after you finish and only optimize the functions that are actually expensive.

Focus on the end rather than the means. If it works as intended then it doesn’t matter. If there’s performance issues then go back and optimize.

Make it work, make it clean, make it pretty...