Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The /prog/matic programmer

Name: Anonymous 2012-09-27 15:16

ANyways, so... I was reading The Pragmatic Programmer [1] and it occurred to me that we should probably boil these principles down for the novices amongst us. ITT things you want to carve into your colleagues' faces.

* KEEP IT FUCKING SIMPLE, MOTHERFUCKER!
* You're code is not ``clever'', it is autistic.
* Code is /not/ poetry or art. Go away! Fuck your OCD.
* This shit has been solved a thousand times over.
* You do not need to design with the latest and greatest in gang-of-four approved OOP design patterns, using infinitely scalable NoSQL solutions in hip new languages that compile down to JavaScript (srsly WTF?!), just to create a CRUD application.
* Not everyone gets off on code, some of us just want to make a living doing the least amount of effort that is required to deliver a consistent quality for an extended period of time.

I swear by god if I see one more AbstractControllerFactoryInterface

[1] http://pragprog.com/the-pragmatic-programmer, easily found online.

Name: Anonymous 2013-05-13 12:38

>>75
I am wrong, okay? As you wish:
#include <stdio.h>

int main()
{
    unsigned int i = 1;
    int s = 1, c = getchar();
    while (c != EOF) {
        switch (s) {
        case 1:
            printf("%u ", i++);
        case 0:
            putchar(c);
            s = (c == '\n');
        }
        c = getchar();
    }
    return 0;
}


>>76
Fuck you, do you really think I have not tested unsigned int bounds?
Well, 2³²-1 equals UINT_MAX, so as long as the file has no more than 2³²-1 lines (4294967295), the program is right.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List