Live data from Hacker News

4chan source code leaked (2010)

pastebin.com

61–70 of 114 posts

Re: 4chan source code leaked (2010)

#61
post #51

Earlier quoted context omitted.

Wouldn't the ideal solution for 4Chan be an external data/processing server that dials in to the hosting server to dump out static files? That way the location of the external server remains, at least partially, a mystery, even after the main box is hacked?

Why? 4chan is not a high target. There is no reason to over engineer it. Mostly it will be prepubescent teenagers throwing a fit and bombarding the server with bandwidth. The hack of earlier today was due to an obsession over a female 4chan moderator. That should say enough.

CloudFlare was hacked with the sole intention of taking over 4chan.org's domain. They're a huge target.

Re: 4chan source code leaked (2010)

#62
post #35
post #11

Earlier quoted context omitted.

No serious, modern PHP developer writes code like this. If it were a code sample for any respectable PHP job, it would be a massive "do not hire" flag.

that's just not true. Given my experience, most PHP devs dont use a framework or even composer. When the forefront of your language is wordpress, it doesnt help spread best practices.Agreed you can write crap in every languages,you can write jsp pages, but it's unlikely you'll get a java job if you dont know OO or Spring.

Come on now, I hate PHP more than anyone else, but seriously, wordpress is the best that PHP has to offer. It doesnt suck. It has a quite nice API - its the plugins around wordpress that have quality similar to this 4chan source code.

Ive also seen much worse in Java world, with JSPs and all kinds of taglibs and action-handlers mashed up to create a soup which would make you crave for PHP.

Re: 4chan source code leaked (2010)

#63
post #3

It seems that it's too terrible to be the true code. "if($_COOKIE['4chan_auser']", "extract($_POST); extract($_GET); extract($_COOKIE);"

What's wrong with the if cookie check? Don't the following conditionals for the mode make sure they still cannot post, which is the point? And the rest of the code is still run so any other security checks are still performed. extract is one of those moronic things though that only exists to create security holes and other bugs.

http://pl1.php.net/extract

OMG, it's horrible :D

Re: 4chan source code leaked (2010)

#64
post #51

Earlier quoted context omitted.

Wouldn't the ideal solution for 4Chan be an external data/processing server that dials in to the hosting server to dump out static files? That way the location of the external server remains, at least partially, a mystery, even after the main box is hacked?

Why? 4chan is not a high target. There is no reason to over engineer it. Mostly it will be prepubescent teenagers throwing a fit and bombarding the server with bandwidth. The hack of earlier today was due to an obsession over a female 4chan moderator. That should say enough.

>female 4chan moderator.

No, FWG wasn't a moderator.

Re: 4chan source code leaked (2010)

#65

Earlier quoted context omitted.

The original 4chan code was in Japanese and moot used Babelfish to try figure out what did what. From what I remember, the original Futaba code is just as bad ( http://www.2chan.net/script/ ). It's no secret that 4chan is cobbled together with glue and string, moot has said this several times before.

Also, moot was a teenager at the time.

Yep. IIRC the code hasn't really be updated or redone since then.

Re: 4chan source code leaked (2010)

#66
post #30

And yet, despite the horrible code, it's still powering an Alexa Top 500 page without any huge problems I've heard of.

Crazy. I knew PHP was bad, but this is just terrible.

what if I told you PHP does not require you to write ugly code? You can do the same in any other language.

Re: 4chan source code leaked (2010)

#68

Earlier quoted context omitted.

Also, moot was a teenager at the time.

Yep. IIRC the code hasn't really be updated or redone since then.

4chan has grown to be quite obviously more sophisticated than Futaba, which really has stayed pretty much the same for over a decade. You can see for yourself:

http://may.2chan.net/27/futaba.htm

(that's their board for cat pictures, the most SFW one I could find, but the banner ads are probably still NSFW, so keep that in mind)

Re: 4chan source code leaked (2010)

#69
I wonder what is the site's infrastructure_cost/ad_revenue ratio, because I have long had a feeling that it could be greatly improved. Moot has always been skeptical about innovating the board, even the iOS layout is still incomprehensible since the CSS shim has been added.

Imageboard is dead easy in it's essence, so why not rebuild it from scratch, instead of feeding new bells and whistles to the existing spaghetti monster?

Re: 4chan source code leaked (2010)

#70
post #67

Ask HN: Would you rather have a beautiful source code with 1000 pageviews/month or an ugly source code with millions of pageviews/month?

>millions of pageviews/month

That is technically correct but does not covey the scale at which 4chan operates. According to http://www.4chan.org/advertise,

    Page impressions per month: 575,000,000;
    Unique visitors per month: 25,000,000;
    Posts per day: 1,000,000; 
    Alexa Traffic Rank: 836 (Global) & 371 (US)
    Quantcast Rank: 305 (US)
    Google PageRank: 6
Makes me wonder if WebM will increase or reduce 4chan's total traffic (when measured in bytes, not clicks).
Post reply on HN