Capistrano SuperDeploy script v2.3

  • May. 11th, 2008 at 7:16 PM
http://pastie.caboo.se/195345

* Trimmed-down easy config file
* Lots of utility functions
* Smart log tail-er (cap util:logs:smart) that will show aggregate times, hits, errors, etc in pretty format!

Enjoy. :)

Edit 8:05pm: Added exponential weighted average for hits/min counter; fixed regex bug w/ multiple errors in one chunk

Rails query analyzer plugin

  • Mar. 19th, 2008 at 12:02 AM
Improved SQL profiling (w/ timings etc) to CSV spreadsheet plugin: http://pastie.caboo.se/167685
*stops banging head against desk in favor of dinner and sewing*


In other news, my apartment manager gave me a letter saying that to get my parking restored, I would have to submit an inspection report from an official Acura dealer oil change to prove that my car is drivable.

This is several MONTHS into things. Last time I talked to her she said nothing about it. And after I drove my car off the lot. And submitted requests 2-3 times 'cause she "lost" them.

What started it? I had to replace my battery. I fixed it by buying a battery at the local shop, and replacing it myself. And gave her a written notice that yes I had fixed it. She did not find this to be adequate proof that I had done so, nor was the fact that I could drive the car off the lot. (Which I did when they threatened to have it towed... for not being drivable.)

At this point I think she's just being intentionally obstructive.

At least I'm leaving soon.

Deploy!

  • Apr. 10th, 2007 at 12:17 AM
So today I deployed the huge set of changes I've been working on.

Took a mere 13 hours straight o.o but now it's mostly working. Mostly.

Some things are wonky and some are broken and some are working awesomely and I am too fucking tired and am going to bed.

Oy, if I see another bloody obscure bug having to do with little differences in production vs development mode that causes completely useless or outright false error messages that only crop up on the production server...

Oh, and the bossman wants to demo the NEW functionality - i.e. the stuff I've only barely started on - early next week.

o.o


Add to that a wide assortment of things going both wrong and right in other aspects of my life, and the fact that I'm pretty much out of time for moving so that needs to happen somewhere around NOW and that requires time too etc... mrr.

For some reason I'm not actually panicking, but I get the feeling that I would be if I were normaler.

Whee, total overhaul!

  • Mar. 21st, 2007 at 3:57 PM
Migrating to Rails 1.2, REST, ActiveScaffold, ... wheeeee.

A bit of a PITA but hopefully will make for a nice DRY Saibase that functions better (perhaps even more leanly... right now all the ruby instances are 30mb, which with a 100-200mb mem cap and multispawning ruby instances can get a bit ugly). :-)

And then I get to fix various bugs, and add stuff, and tweak it, and add the new email-based interface, and stuff! The email thing might actually be easier with REST; dunno if it could do responds_to or not. But it'd make it eas(ier) to do a crackberry/treo specific interface, which is what all of middle/upper management and almost all of sales are tied to (and guess who my clients are).

Huzzah work geekery anyhow.

But in the meantime I get to wait for gem update -y to finish. Looks like I'm fairly behind...

Hopefully most of the code I already wrote should port to the new version relatively easily (or perhaps even not be needed).

Edit: Yay, massive bugs on framework updates. Oy. Looks like I'll be redoing the login/authentication stuff too. Fun.

BrainBuster CAPTCHA

  • Dec. 5th, 2006 at 3:30 PM
http://www.robsanheim.com/brain-buster

Uses simple logical questions instead of the "recognize these letters" image. Ruby on Rails plugin.

Mostly posted for my own later reference, but some of you might be interested.

Today's lesson

  • Nov. 8th, 2006 at 1:23 PM
[With many thanks to Jamis Buck for his sage advice as always.]

Doing eager loading pagination on multiple many-to-many tables in Rails is VEEERY SLOOOOW if you have more than a couple (or a lot of records).

Why?

Well, my primary table is 'projects'. It has 6 associated tables, variously many-many, 1-m, m-1 or 1-m-1.

SQL load time for the pagination query with :include -ing 0-6 of those associations is respectively (in seconds, one run): 0.001, 0.004, 0.012, 0.12, 0.17, 0.8, 3.8. Not hugely bad except toward the end, where it's joining a bunch of m-m tables and getting too big for its buffer and thus resorting to filesort. Which is slow. This is with everything using indices BTW.

However, Rails then instantiates an object for every Cartesian product thereof. So you multiply each previous set but the number of rows in the next-added join table. Yes, that's exponential. Time for this: 0.091, 0.171, 0.168, 0.48, 1.2, 4, 5, 26.2. At that point it's a Problem.

So what to do now? Denormalize - i.e. store the result of some those associations in the table itself, so it doesn't have to actually look 'em up and thus do the mean many-many eager load. Which implies hooks and updating and making sure everything's synchronized and all that. Won't that be fun...

But at least I won't have my primary page either taking way too long to load, or crippled 'cause I have to nerf it to remove those eager loads for now. But I'll nerf it for now anyway 'cause it's not a priority so long as it's at least functional an not taking forever. Extra sorts is a bonus feature; tolerable speed is a requirement. And I have other priorities for what to do next. At least I know where it's going wrong now. :-)

Nifty!

  • Oct. 16th, 2006 at 6:08 PM
http://www.ajaxscaffold.com/

It's like regular scaffolding... but all pretty and ajaxified!

Profile

hill, chao, wtf?, ki, relationships, brain, aikido, beach, conlangs, mrr?, cogsci, ponder, grin, glyph, gender
[info]saizai
Sai Emrys

Latest Month

May 2008
S M T W T F S
    123
45678910
11121314151617
18192021222324
25262728293031

Syndicate

RSS Atom
Powered by LiveJournal.com
Designed by Lilia Ahner