What do you consider "good programming practices", Cred Forums?

What do you consider "good programming practices", Cred Forums?

This is not a thread, these are the desktop thread faggots finding an excuse to post anime. Do not reply, or reply only with sage.

Looking at Nozomin pictures to clear my head!

commenting code
its not a meme and will actually help in the long run when whatever you make gets large enough that you forget what shit actually do and how to use them

Dont stop, do not stop. You will not stop. The best way to get better is to keep on doing it, find a way to be constantly active and challenge yourself.

Also, having a goal waifu.

Commenting. Using source control. Making code as modular as possible

Consistency is the utmost important practice adopt. Bar none.

Spaces instead of tabs :^)

Dress up as a woman while programming.

looking at nozomi pics does exactly the opposite for me

admiring Maki

This 90% rest is following linus' kernel style guide

using the loo to poo

It is good programming practice... to always wipe the end of your wet glans on the secretary's skirt after fucking her in the printer/photocopier room... since she won't suck you clean in case it smudges her lip gloss.

Testing
Refactoring
Small functions (around 8 lines)
Sensible namegiving

> tfw I don't have enough images to be an anime shitposter

> Testing
> Documentation
> Version control is essentially a requirement at this point. > Laying out a plan before you start implementing is also important. Some people make OOP graphs on paper, others write function prototypes with documentation, some do both.

What anime is that pic from op?

Make stubs for unit testing and debugging. Also bully the debuggers while you're at it.

>Also bully the debuggers
Oh yes~, gdb step through the code one instruction at a time you slut. Are you almost reaching the breakpoint?

>gdb
Disgusting.

Umiko a shit!
SHIIIITTT!

No, you. Now delete this.

Learned this the hard way. Not a good feeling.

Do whatever the fuck you want but only do what you need.

I never had this problem in my life.

What anime?

New Game.

Love Live.

Thank you

thx

For me, good code is code that focuses on readability and comprehension first and foremost. After readability, the next highest priority is correctness.

What's the largest code base you've ever written and maintained, and for how long?

30k LOC probably one year and had no problem to jump back in after a 6 months pause.

Don't write big monolithic functions. Unless you're a sadist.

God, Nozomi is so fuckable

Not comment. Document.
Basically every language has some form of docblock comment type that can be used to document about everything in a standard, structured way.
Random sentences here and there don't help.

Of course you don't just have to comment your classes, functions and methods, you also have to somewhere have a readme that tells other devs how those components actually work together.

However... no employer will ever give you the time to document your stuff. In fact, you don't get enough time to even get the code done - untested.

>Random sentences here and there don't help.
Beg to differ

When programming, the code is my main source of documentation, including comments in the code.

Who /no comments/ here
I have pretty thorough function and variable names though

>Adding doc comments like Javadoc or Python docs (the """ thing)
>laying out the basic structure of a program before writing it using UML
>Choosing a coding style and sticking to it, bonus points for using official language guidelines
>apply the SOLID principles always
>set up a tight-knit set of tools
Can't think of anything else right now.

>laying out the basic structure of a program before writing it using UML
I will never understand people who use UML to design programs, rather than just inspect them.

If you care about implementation details, then you might as well just write the stubs directly (which is going to be less work assuming you have a non-shit editor; and for UML you need a dedicated editor either way - may as well just have it generate the stubs)

If you don't care about the implementation details, then you're probably making sketches on a whiteboard one way or the other, without caring about the function signatures and visibilities (i.e. implementation details).

UML as a design language is just so pointless - the only benefit using it in reverse (i.e. turning your code base into an UML diagram so you can more easily get an overview).