At many a workplace, I've had the fortune to step into the company around when they were starting to get serious about standards, code quality, and generally pivoting into a mature development organization.

When it comes to coding standards, everyone has strong opinions, though frankly consistency matters more than the standard itself. For example, with indenting, it doesn't really matter if you're doing Allman or something more K&R. Though we can all agree that anyone using [Whitesmiths] style has been hurt, and hurt deeply.

Which brings us to today's code, from Christopher, which introduces an entirely new style: inverted.

        void push(Node** headRef, int data){
Node* newNode = (Node*) malloc(sizeof(newNode));
newNode->data = data;
*headRef = newNode;
        }
        Node* pushtop(){
Node* head = NULL;
int i;
for(i = 1; i<=3; i++){
push(&head,i);
}
return head;
        }

Neither I nor Christopher is entirely sure what happened here, but it does meet my main standard: it was used consistently. Method bodies got de-indented. Was it an autoformatter gone wrong? Just badly copypasted code everywhere? Or did someone do this on purpose?

Regardless, it gives us something that's even more wrong than Pico indenting.

[Advertisement] Continuously monitor your servers for configuration changes, and report when there's configuration drift. Get started with Otter today!

Remy Porter

Source link

You May Also Like

Biden Airlifted To Standing Position

Read more… Source link

Mike Luckovich for Oct 22, 2023 – Mike Luckovich, Humor Times

Mike Luckovich of the Atlanta Constitution received two amazing honors in 2006,…

r/funny – First bubble bath in nearly 35 years. I think I did something wrong?

/u/Dev-N-Danger Source link

This Probably Wouldn’t Fly Today

“My brother cutting his birthday cake in 1967. Times were different then.”…