ORM hatefest continues

S.query( Votes).filter( Votes.timestamp < (time.time()-432000)).delete()

creates this:

2010-01-26 15:23:28,395 INFO sqlalchemy.engine.base.Engine.0x...a56c SELECT votes.idkfa AS votes_idkfa FROM votes WHERE votes.timestamp < %s
2010-01-26 15:23:28,395 INFO sqlalchemy.engine.base.Engine.0x...a56c [1264105408.393384]
2010-01-26 15:23:28,402 INFO sqlalchemy.engine.base.Engine.0x...a56c DELETE FROM votes WHERE votes.timestamp < %s
2010-01-26 15:23:28,402 INFO sqlalchemy.engine.base.Engine.0x...a56c [1264105408.393384]


uniqurls = S.query( Votes.url).distinct().subquery()
S.query( Terms).filter( ~Terms.url.in_( uniqurls)).delete()

creates

2010-01-26 15:23:28,424 INFO sqlalchemy.engine.base.Engine.0x...a56c SELECT terms.idkfa AS terms_idkfa FROM terms WHERE terms.url NOT IN (SELECT DISTINCT votes.url FROM votes)
2010-01-26 15:23:28,424 INFO sqlalchemy.engine.base.Engine.0x...a56c []
2010-01-26 15:27:08,587 INFO sqlalchemy.engine.base.Engine.0x...a56c DELETE FROM terms WHERE terms.url NOT IN (SELECT DISTINCT votes.url FROM votes)


i.e., I'm basically running twice the queries I ever need to. And so
I spend extra time trying to coax sqlalchemy into just creating the
raw sql I want.

Posted
 

sqlalchemy and mysql, MY ARCHEST FOES

sqlalchemy.exc.OperationalError: (OperationalError) no such column:
votes._id u'SELECT votes._id AS votes__id, votes.timestamp AS
votes_timestamp, votes.url AS votes_url, votes.source AS votes_source,
votes.score AS votes_score \nFROM votes \nWHERE votes.url = ? \n LIMIT
1 OFFSET 0' [u'http://www.businessweek.com/news/2010-01-23/senators-dodd-gregg-confident-bernanke-will-win-second-term.html']


I just don't think that whatever "ease of use" value sqlalchemy (or
most ORMs, to be fair) bring to the table outweighs the nastiness of
generated code.

And you need to know SQL to debug it anyhow, so what's the point?

Posted
 

teaching as an open source bounty system

http://eloquentjavascript.net/ is a great example of what i'm going
for.. I might email that guy even.

if we have a finite set of "classes", right? from a technical
perspective this goes:

1: email

2: chat / voice

3: linux I - shell

4: linux II - hg (source control), vim (editors), permissions (security)

5: python

6: webservers

7: HTML

8: CSS

9: JavaScript

10: "PhotoShop"

and let's say

11: Writing

12: Reading

which are really.. prereqs for email, right? would it be insane or
impractical to do/require a non-tech "class" for every tech class?

the entrepreneur in me thinks the way to do this lucratively is $X /
class, which gets you X weeks personal attention from a "teacher", and
the opportunity to take a "test", and we offer certification (by
whatever made up org we are, I'm 99% certain nobody cares) that people
can put as a resumee bullet point.. so that's valuable.

because what i'm thinking about this is.. is it tutoring, one on one
style or is it communal class style, which are really just the same..
we offer a certain tier of knowledge at any time for $X, and then it's
organizing an event basically. like.. tupperware party style, you get
a group of people to meet once a week, or for a weekend, and you all
learn and pass the test..


now bear with me, sometimes i overthink things, but i'm convinced by
the growler that this is a brilliant idea forthcoming:

each class costs X, and we split that into equal shares x, and give
one share each to:

the current author/teacher of that class
whoever signed up the student
a pool that we split evenly amongst teachers

eg:

Anna teaches "Writing", and recruits 10 kids to take it at $30/head..
(let's say whoever teaches the class names their price).. you take a
week and meet with them, and prepare however you'd like, and they all
get one magic ticket to take a test on this webserver, and if they
pass, it's like a public certification, and you can give a piece of
paper or something if you want, if they pass, but it's archived in our
servers too, so an employer can always verify with us as a trusted
third party.. which is the real long term $$.

anyhow, so that would be $300, you would get $200, and the last $100
would be split between us 50/50, i.e. $250 for you and $50 for me.

ok, so maybe Japhy teaches "Computering", and charges $30 for a
class.. Anna finds the same 10 kids, and we all meet in a chatroom or
a coffee shop, etc. and Japhy does his song and dance, and then they
all get a chance to take this test.. Japhy would get $100 for
teaching, Anna $100 for recruiting, and both $50, for $150 apiece.

Now maybe Japhy teaches John how to teach a class he's set up, and
John becomes the teacher for "Computering" and changes the cost of his
class to $20 .. Japhy scores access to a computer lab and signs up 6
kids, Anna runs an ad campaign and signs up 53. John gives a paper
and does a lecture, Japhy and Anna give out testing tickets, and maybe
answer some extra questions. The total pot is (53 + 6) * $20 = $1180.
Anna gets $530 and Japhy gets $60 for signing kids up, John gets $590
for teaching, and they split another $590 three ways, for another $196
each. (that leaves $2 in rounding error, let's give that to a
charity) giving:

John, $786
Anna, $726
Japhy, $256
michigan, $2

Posted
 

What it's like to run a MUD

<pre>

15:56 -!- Irssi: Starting query in dal.net with Graatch
15:56 <Graatch> hey
15:56 <Graatch> i didn't realize
15:56 <Graatch> you're the imm on riftshadow running it these days?
15:57 <chalupah> yep
15:57 <Graatch> well I'm sure someone in there isn't really playing, kick out someone who
                hasn't played in a while
15:57 <Graatch> or just ad me
15:57 <Graatch> punk
15:57 <Graatch> ;)
15:58 <chalupah> no.. no favors, none of that
15:58 <Graatch> hahaha
15:58 <Graatch> the whole game is favors!
15:58 <Graatch> heh
15:58 <chalupah> everyone's joined in the past four or five days
15:58 <Graatch> I know
15:58 <Graatch> it's more fun though
15:58 <chalupah> for you maybe
15:58 <Graatch> come on I just want to see what it's like
15:58 <Graatch> everyone!
15:58 <Graatch> ;)
15:58 <chalupah> hang around a few days, one will open up
15:59 <Graatch> I played this when it opened many years ago
15:59 <chalupah> well, phalanx hasn't changed
15:59 <Graatch> I didn't play phalanx
15:59 <Graatch> I played horde and tribunal I think
15:59 <Graatch> I had an imm here during the beginning. not to do anything but to be able to
                look around. friends with the three guys who created the place
16:00 <Graatch> but I don't really remember anything
16:00 <Graatch> except something about stones in vaults for cabals
16:53 <Graatch> ok, how about phalanx now? ;)
18:11 <Graatch> hey you around?
Day changed to 11 Jan 2010
05:08 -!- Graatch [Graatch@cpe-66-65-134-61.nyc.res.rr.com] has quit [Quit: ]
21:07 <Graatch> yo
21:07 <Graatch> you here?
Day changed to 12 Jan 2010
02:03 <chalupah> what?
02:09 <Graatch> is it worth telling you when things are screwy? or don't much care
02:11 <chalupah> best way is to log bugs at nolimyn.googlecode.com
02:11 <chalupah> shoot up a pray, paste at me, it's fine
02:11 <Graatch> ok
02:11 <Graatch> well
02:11 <Graatch> turn undead is fucked
02:11 <Graatch> as is shield block
02:11 <Graatch> for paladins
02:12 <chalupah> it helps if you can be specific about what you think is broken
02:12 <Graatch> I noted it
02:12 <Graatch> for example
02:12 <Graatch> turn undead
02:12 <Graatch> "You don't know any prayers like that"
02:12 <Graatch> sorry, "of that name"
02:12 <Graatch> but of course I have it
02:13 <chalupah> isn't it a skill?
02:13 <Graatch> hahaha, so it is. in cf it's a commune
02:13 <Graatch> also a few places that have no keys. spoke to another imm who said yeah,
                they don't exist
02:15 <Graatch> are you playing a mort yourself? having any fun?
02:17 <chalupah> not much time to play, honestly, but i think it's fun
02:17 <Graatch> yeah, it is
02:17 <Graatch> if you want to help me a little, let me know, I've a question or two

</pre>

Posted