Chuck raw scores, beef up badges, use a log scale
This is a proposal for moving Stack Overflow to a slightly different scoring system that is less linear and encourages broad knowledge diversity. Instead of raw sums of reputation, we categorize it by tag and count it as badges. Badges are counted on a log scale (count the powers of two). Your reputation score is the sum of each badge's count.
Case study: Slashdot
Slashdot has an Achievements system (here's an example since the docs aren't so good) that could work here, with some modification. First, I'll describe how Slashdot's system works.
Slashdot achievements are basically badges. Some of them are one-offs while others are counted by powers of two (there are others, too: "years read" is summed while "Member of the x digit UID club" has its own logic (6-digits) to bolster older users). Total achievement score is the sum of the count of badges plus the sum of their powers of two (this extra counting allows immediate feedback for your first hit, which would be 2⁰). If you've visited the site ten days in a row, you get 4 points (8 is 2³, 3+1=4) and need six more days for the 5th point. If you've visited 64 days in a row, that isn't really different from 127 days (both are a lot!), so achievements aren't handed out as readily; find another way to bump up your score.
There are flaws in the Slashdot system; achievements were implemented as a persistent April Fools' Day prank and aren't actually worked into the site in any way. The Karma system, which is merely a linear count of your +1s vs your -1s, caps at 30, and merely wins you a base +1 to your comments at some threshold that I have forgotten. The count itself has been hidden for ten or so years. Another flaw is that nobody has more than fifty or so achievements (well, not counting the site founder, who awarded himself "the cheater").
Proposal for Stack Overflow
What if Stack Overflow (or all Stack Exchange sites?) had a similar system? Badges aren't really geared to be obtained at a frequency to be counted exponentially, which is fine. Count the existing ones (well, those that aren't adapted for the log scale) linearly. Add more badges (take examples from Slashdot). Take users' existing reputation and break it up by tag (just the prevailing tag for the question, and tag synonyms will be essential here) and you have something to count by powers of two. Then add up your badges as normal.
While this will result in far lower overall scores, users with the same diversity of answers should still have the same distance (though on a different scale). The permissions system would have to be reworked to handle this change. After it is reworked, it will actually feel more intuitive (it's already ~exponential, so most steps in reputation growth would coincide with new permissions).
Bounties would be their own badges, divided by tag and by color, at the cost of a badge of the same color, in the form of a "negative badge." I also see value in also rewarding positive badges for high volumes of bounties given (since it helps the community). This is fine as long as the pool of available badges for posting bounties doesn't count these particular positive badges or else you get a feedback loop (if it's scaled correctly, it's not a problem. It'd be akin to a "buy ten, get one free" program).
I'd also like to see a "green" badge for bounties that would allow people to post bounties with real money (and/or previously awarded green badges) rather than reputation (to prevent abuse, a payment source (think ~credit card rather than bounty poster) would be able to reward a green badge bounty only once per user), but that's an aside.
Badge colors (bronze, silver, gold) indicate their rarity. The final score should merely sum them all. No weights would be necessary. With each badge color, you have a separate bucket which holds its own value; you'll have lots of bronze badges and they'll increment slower, so you'll seek out the silver badges. Gold badges, being the rarest, will always have a bigger impact on your total score merely thanks to their scarcity.
This encourages users to help in less common categories. If you have 12 javascript badges (2¹¹+1) from 2k answers and zero java answers, you need another 2k javascript answers to get to 13 but only one java answer will increase your overall reputation by the same amount, so you are incentivized to diversify. This will help boost questions on obscure topics.
for
loop that looks like this:for ( ... ) ; {}
?" needs to be asked.