User:Dantman/Code thoughts

Some thoughts on the code (some I'd like to fix myself):
 * Geonames is a little broken.
 * Could really use Sqlite support. I'd really like to be able to quickly spin up an instance using php 5.4's webserver and sqlite so I can actually test code without needing huge bloated daemons to do so.
 * Code style needs work. It's inconsistent. In most parts of the code Allman style {}'s are used. Yet in some parts of the code they seem to ignore that in spots or switch to K&R style instead. Indentation too is sometimes incorrect with some parts of code being less indented than the surrounding code. And the level of space indentation appears to be inconsistent; I won't push too heavily for the same {} style as other projects use. But that needs to be made consistent, and this indentation mess should be fixed simply by reindenting cleanly with tabs; It'll be hard to be taken seriously by devs when the code looks like patchwork.
 * The user feeds are going to need tokens. ie: Automatically generate a random token for a user then save it in their prefs. Allow the user to reset this on request. Then use this token for private feeds. Include it in the links from the UI. When present compare against the user's token as the method of auth. When not present only then do HTTP Auth; The biggest issue with the current dependence on HTTP Auth -- besides being unfriendly to users, potentially not working in some clients, and requiring passwords to be saved in 3rd party programs -- is the fact that HTTP Auth absolutely does not work if the Status.Net site is using some OAuth, CAS, etc... style login that does not use local passwords.
 * The common rand code looks good. Though it might be nice to split the MWCryptRand me and Tim wrote for MediaWiki out and use it.
 * I don't like the SQL concatenation I see in code.