Release the source code to the site?

Locked
User avatar
taeli
Joined: Thu Mar 18, 2004 6:14 pm
Location: Manchester UK Rawr: Yay
Contact:
Org Profile

Release the source code to the site?

Post by taeli » Wed Apr 28, 2004 10:34 pm

I just looked at the todo list. Some of these things are fairly simple but time consuming to do. I know you're looking for programmers - but there's this big complex sign up thing. And I don't have much work on the web. (That and I'm a perl programmer, PHP kinda makes me freak for complex stuff ^_^)

Why not just release the source code? I'm not saying you should GPL it, (well you should, but that'd be askin too much ;)) but it'd be cool if you could just put it in a gzip file somewhere. You don't even have to write an installer - I'm sure I'd be able to get it runnin with a brief table set up export. If you did this then people could just send in patch files for the more basic things on the todo list, without any hassle or commitment.

Examples being - "Sort buddy list by entry date option" or "Link to member profile on banner winner". Little bits of PHP code are easily put in a patch. Anything which needs to edit the database would be out of the scope of this system tho.

Er, this whole post sounds kinda selfish I know, but it'd be cool to be able to help out with the site. (And cuz I want some of the stuff on the todo list - $limit >_<)

User avatar
Phade
Site Admin
Joined: Fri Oct 20, 2000 10:49 pm
Location: Little cabin in the woods...
Org Profile

Post by Phade » Wed Apr 28, 2004 11:24 pm

Hey,

One of my original intentions with the site was to make it a collaborative project with many programmers working on the site together. However, in the beginning, nobody cared. I just kept writing code good enough to make the site work for the most part.

A while back, I decided that I really needed some help with the site code. I tried to put together a coders group. However, getting a group of strangers access to the site's code in a way that they could contribute but not damage the site turned out to be a tricky task. If I gave out all the source code to whoever wanted it, security holes could be found and possibly exploited by malicious users. Allowing updates onto the live server by anyone could easily be disastrous.

The concept of a "test" and "staging" server in addition to the "live" server was tossed around. Again, having a tracking system for what code was on what server could not be found. Even tracking what server parts/pages needed to be moved to get the new functions working correctly would be a challenge.

Many people said "CVS is the answer", but I could not find an easy way to check which code was on which server, which code pages used which fields in what tables, how to move code between servers, rollback server code, rollback structure database changes, and so on.

Another problem is having an information baseline for the database that people could use for development. The DB is >1G in size. That is a large amount to download just to do development. Not only that, but some of the information is private, like private forum messages and private journal entries.

With no real solution to these and other problems, the programmers group essentially died.

Will the programmers group be revived? I hope so. More stuff needs to be done all the time and my personal free time is growing thinner each day...

Phade.

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Post by Zarxrax » Wed Apr 28, 2004 11:48 pm

Couldn't people just say to you, "I would like to implement this into the code" and then you just send them only the source code that is relevant to what they want to do? Or is the code set up in such a way that its a jumbled mess which refferences so much stuff that the person would HAVE to have the entire site in their hands to be able to do any work?
/has no clue how php and the like works.

User avatar
taeli
Joined: Thu Mar 18, 2004 6:14 pm
Location: Manchester UK Rawr: Yay
Contact:
Org Profile

Post by taeli » Thu Apr 29, 2004 12:32 am

Allowing live updates by anyone would be silly!

Your real problem with releasing the code seems to be security. I believe opening the site would indefinately improve security! I think the long term goals would be positive. Do you believe there are vulnerabilities in the code? Even if there are some it would be nice to get them found now rather than later.
Phade wrote:If I gave out all the source code to whoever wanted it, security holes could be found
You're strangely assuming that these holes are non-findable without the source code. Most holes in PHP work along exploiting a lack of validation in certain areas (eg inserting 's in http parameters rather than integers, inserting 's into cookies, assuming complex cookies cannot be spoofed, or assuming html form elements such as <select> cannot be spoofed). Further more, although I haven't tried (obviously >_<) some of the site could be open to cross site scripting attacks, which often allows a particularly skilled hacker to do bad things(tm).

Other problems:

Different servers for test, stable, and live: Sounds complicated. I don't think it's very relevant to releasing the code.

Information baseline: If you demand the data be realistic, couldn't you just export a seperate gzip of say 2000 random videos, and replace the journal entries with repeated words? Or just don't bother - let people make their own test data.

I think a good idea would be an extra forum on this board where people could post the code to patch files. They could then easily be peer reviewed by anyone who fancied having a look. This would expose people posting evil patches. It would also improve the quality of the patches before they got to you. And the code would be cleaner and checked by other people. It would also encourage people to learn about the site - a necessary step before being able to code on it. With the source code out there - a few people might install AMV setups on their servers. And then everyone could check everyone elses patches - it'd be like a massive distributed test server :D.

Granted this whole system would be for fairly simple PHP patches, but I think it's a good start in the direction of collobarative development. And you yourself seem to want this :). Further more it would create the culture and social network needed for the "group of programmers" idea to work.

I don't really know whats going on here in all honesty, but all this CVS/Database/live-submissions/programming-group confuses the matter. This topic right now is only the simple little thing of releasing the code so people can submit patches for stuff on the todo list. All that other stuff could be really cool and useful, but again why try and run before we're walking?

I don't mind you saying "NO! MYCODE! GRRR! DAMN HIPPIES!", but if you're worried about security then I think those thoughts are unfounded.
Zarxrax wrote:Couldn't people just say to you, "I would like to implement this into the code" and then you just send them only the source code that is relevant to what they want to do?
Yeah, that'd be cool. But also a lot more effort. For small things it wouldn't reduce Phades workload - just change it from coding to answering emails and checking code.

On the othre hand, people could write the code, but they couldn't check if it would work. So there could be bugs in the code which Phade gets, and then he'd have to send it back, and the whole thing would could end up a bit of a mess.

User avatar
Phade
Site Admin
Joined: Fri Oct 20, 2000 10:49 pm
Location: Little cabin in the woods...
Org Profile

Post by Phade » Thu Apr 29, 2004 9:44 am

Hey,

It's easy for people to view the source, create their own test environment, find things to fix, and then write up fixes to the problem. The main problem is: How do we get code back onto the live site without causing more work than I already have to do (more work than just fixing it myself)?

How I had envisioned it, the "testing" server would be more of a free-for-all testing environment so that programmers can upload their code to see if it works/breaks with a large amount of test data (so programmers wouldn't have to keep it on their own machine). The "staging" server would be a clean data environment refreshed daily for code that is about to go live. All code should work 100% here. This is where final code review would take place before going to the "live" server. The "live" server is, well, the live server that we all know and love.

Other issues are things like who is working on what code, how should the code be written, how are database schema changes handled, who get access to what source, and issues like that.

[brain hurts]

Phade.

User avatar
Kalium
Sir Bugsalot
Joined: Fri Oct 03, 2003 11:17 pm
Location: Plymouth, Michigan
Org Profile

Post by Kalium » Thu Apr 29, 2004 2:02 pm

First off: security through obscurity

That said, the test and stable servers wouldn't need to be big, right?

As for test/stable code, just do two different CVS branches. I think Debian has a setup like that. One for testing, and the stuff that works well gets integrated into the stable for further testing. When the stable's ready, export and go to the live server.

Actually, the test and stable servers could likely run on the same machine. As long as there's something running to make sure the test server bounces up everytime it goes down (as is bound to happen a lot).

Locked

Return to “Site Help & Feedback”