and this works well enough almost all the time but then one day they run into a problem caused by something underneath the abstraction and are totally fucked
-
-
Replying to @alicemazzy @sonyaellenmann
there was an amusingly common pattern with activerecord (rails db interaction thing) misuse I saw twice when freelancing and is apparently pervasive among rockstar ninja types
1 reply 0 retweets 6 likes -
Replying to @alicemazzy @sonyaellenmann
where because they didn't know sql and only ever used activerecord they manage to accidentally make simple, fast queries incredibly slow
2 replies 0 retweets 3 likes -
Replying to @alicemazzy @sonyaellenmann
eg `select * from table where column = 'whatever'`, with an index (thing that organizes values, usually in a tree, for faster lookups) this is probably O(log n)
1 reply 0 retweets 2 likes -
Replying to @alicemazzy @sonyaellenmann
meaning, for a table of n rows you have to touch log n of those rows at worst to find your things, because the way a tree is organized you automatically exclude half of things from consideration each step
1 reply 0 retweets 4 likes -
Replying to @alicemazzy @sonyaellenmann
what they'd manage to do is turn it into an O(n^2) operation: pull out *all the rows*, check the *one row* you're interested in, repeat both steps for *every* row
3 replies 0 retweets 5 likes -
-
SQL feels so good to write though.
1 reply 0 retweets 1 like -
at current job I spent a good couple months a while back methodically removing thousands of handwritten update and delete statements from a 1.5m line codebase
1 reply 0 retweets 2 likes -
Replying to @alicemazzy @orthonormalist and
and replicating their effects through a handrolled 15-year-old internal orm
1 reply 0 retweets 0 likes
as a result I now hate both sql and orms
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.