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

imgboard . php

Name: Anonymous 2009-02-01 1:48

So I was browsing /b/ when it crashed, and a download popped up for imgboard.php

http://pastebin.com/m2c2883d7

Haven't gotten a chance to look through it yet. Is this win?

Name: Anonymous 2009-02-02 7:33

Why the hell do you want to look at the wordfilters? They're just a bunch of preg_replaces, and a bit of code to come up with random PENIS colors. You could probably write the file yourself in your sleep if you gave it a few seconds' thought.

Also, to the person who asked about a comparison to Trevorsaba, consider this: 4chan's code is quite compact. Yeah it's all crammed together, but really, that's much better than having everything spread out in 30 different PHP files, and requiring several different libraries for no real reason (lol, adodb and smarty) -- Kusaba is way too overengineered for the task at hand. 4chan's (and Futaba's) code might be a bit nasty looking, but dammit, it works. Once you learn what stuff does what, it's very simple to hack at the board a little bit and change something, and it's much easier to keep that code in your head all at once.

It all comes down to the YAGNI principle. Moot's not going to suddenly switch to MS SQL Server, so there's no need to abstract that sort of thing out. There's barely any HTML to output in the first place, so why bother constructing several templates and building the necessary scaffolding for them to execute? Just print the page out, and get on with it. Some of you so-called EXPERT PROGRAMMERS who praise abstractions and reusable code components and other such nonsense might scoff at this, but this is how code works in the real world. If it ain't broke, don't fix it.

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