Thursday, July 17, 2008

Use blank fixtures for Bj tables when testing with Bj

I have an integration test where I need to test a web process that starts a background process with Ara T Howard's awesomely named Bj plugin (Background Job - but never has overhearing talk about Rails testing cause so many funny looks and stifled laughs).

I found some great notes here: http://robsanheim.com/2008/07/10/notes-on-testing-bj-background-job/ which show how to wait for a job to finish during a test.

One problem I ran into, though, was that I somehow had a bad job that got stuck in the testing database table, and that was messing up testing results because Bj would wake up during the test, see the old bad job, and resubmit it. It took a while to track that down.

I fixed it by simply putting blank fixtures in test/fixtures for each of the Bj tables: bj_config, bj_job, and bj_job_archive. That way Bj starts from a blank slate when each test starts. There's a Bj protip for you. Another one is to watch the Bj logs for the test environment.

Monday, July 14, 2008

360's coming, did you bring your coat?

So Tom and John have really been putting on the pressure to blog, so here I am! Finally blogging!

I'm going to be at 360 Flex in San Jose on August 17th (register at http://360flex.eventbrite.com/), and if you're new to that conference, you should definitely think about going. 360 is more fun than a lot of other conferences I've been to in the past because of the close-knit community and the effort that Tom and John put into making the event work smoothly and fun for everyone.

I'm going to be speaking about my perennial topic, Flex and Rails, this time with more focus on RubyAMF and getting things connected. I'm also lucky enough to be presenting on Data Visualization with Juan Sanchez of ScaleNine.com fame, a friend and colleague. We're going to try to put on a good show for you guys, so, we'll see you there right?

Sunday, July 13, 2008

UIRC scores Iron Man Interview

Ok, maybe not with Iron Man himself, but close. The User Interface Resource Center, (UIRC) which is sponsored by my company EffectiveUI, has a great interview up with Kent Seki, the designer in charge of visualizations and HUDs for the Iron Man movie.

Not only is this a great interview, but I like the way the UIRC is approaching talking about UIs. This interview and another one a little bird told me is coming up are some great cross-cutting looks into people who think hard about designing innovative interfaces.

Wednesday, June 25, 2008

Flex Needs Some New Thinking

Anyone who's used Ruby or another dynamic language (I suppose Python is good, but I can't stand the syntax and whitespace-nazism) and started to really grok it and what you can do with a dynamic language with a friendly syntax generally feels a resistance from deep down in their soul-area when they have to go back to Java-land or worse.

I feel less of that resistance when I switch from Ruby to ActionScript via Flex, but it's still there. Especially since I know that a lot of dynamic capabilities are available, but bad for performance and confusing to other developers expecting the more common approaches.

I happen to like Cairngorm just fine, although a lot of people complain about its red tape and preponderance of boilerplate code and I would be happy to use something less bloaty. I like PureMVC as well, but I don't find it to be any better than Cairngorm at what people usually complain about Cairngorm for. There's nothing wrong with Cairngorm that a code generator and Prana won't fix for me, but I'm a little set in my ways, nothing against PureMVC at all.

In fact any of the other frameworks that are popping up as alternatives to Cairngorm, PureMVC, or Roll-your-own, like Mate and Swiz are mostly just cutting down on clutter, but using the same ideas. There's merit to that, but I want to see what thinking like a Rubyist could do for us.

I'd like to try to learn from the dynamic language community and try some new thinking and new approaches to solving framework issues, and it's good to see others thinking about it too:

Jay Fields has got a lot of experience from the Rails and Rails testing world and has some great thoughts on testing in Flex and on Flex in general that resonate with me. I'm excited to see some favorable views on Flex from the Rails community and I hope it continues so we can get some new thinking, new techniques, and get that stuff recognized and incorporated in the Flex community.

Saturday, May 31, 2008

I <3 Rails

Friday, May 30, 2008

AS3 Git Library

Scott Chacon, author of the Peepcode Git Internals pdf and of gitcasts.com, has released an Actionscript library for traversing local Git trees. A very cool starting point to being able to build Git visualizations at least... and maybe if someone's crazy enough to do the transport stuff a whole Git client - we'll see.

Very cool - check it out.

UPDATE:
How the heck did I not include a link? http://github.com/schacon/asgit/

AIR with Rails @ RailsConf

Thank you! to everyone that came to our talk today. It's a very hard balance to cover people who haven't heard of a technology to people who just want to hear one or two tips or tricks that get them to the next level all in a 4 hour talk with hands on code.

I think we did a fairly good job of covering the bases, and if you didn't hear something you were wanting to hear, let us know, here or over the channels we presented in the talk.

Once again, the slides and presentation examples are up on github at http://github.com/danielwanja/railsconf2008/

Thanks also to everyone who stayed a little bit extra to hear about RubyAMF as well. You guys are awesome!