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: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-05-15 7:37

>>94
Something like this.

>>97
stdio includes buffering.

>>98
A "safety vent" to prevent hard crashes. You should never be running a system at that load level, because it'll be unacceptably slow. Some of the systems I work on don't even have secondary storage.

>>104
getchar and putchar will do buffering for you automatically, and they're inlined because they're macros in any good C library, so you're introducing additional overhead by buffering twice. MSVCRT's default buffer is 4K, glibc is also 4K.

>>106
This *might* be faster but you should then turn OFF stdio buffering. Either way I'm not interested in absolute speed with this question, and using 1000x the memory for <1000x speed increase is inefficient (see also: 10KB --- yes, ten thousand bytes --- implementations of memcpy() that achieve maybe a few % speedup in careful benchmarks over rep movsd and probably much less on Nehalem and Sandy Bridge).

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