Vixiom Axioms

November 27, 2007

The Big Idea

Filed under: Misc. Alastair @ 12:53 am

My credit card company has a new site where you can win $10,000 if your idea is voted the monthly winner. I’m not too sure the risk/reward ratio is good enough to put your idea up on a public site (maybe lock down a trademark and submit some patents first).

My favorite show lately is The Big Idea with Donny Deutsch. Donny is a fiery character so if nothing else the show is like a daily pep talk that gets you motivated to work after dinner rather than sit in front of the teevee. The show doesn’t focus too much on tech/internet but once you put yourself in an entrepreneurial mindset you’d be amazed how ideas just start popping up in your head.

Digg! submit The Big Idea to stumbleupon.com submit The Big Idea to del.icio.us submit The Big Idea to reddit.com Like this post? subscribe to the feed.

November 23, 2007

Reduce your Rails RAM Usage with MiniMagick

Filed under: Ruby, Ruby on Rails Alastair @ 12:36 pm

If your Rails app uses Rmagick to resize images on shared hosting you may have had your app shut down because of a RAM spikes (the spike can be > 40mb when processing an image > 2mb).

MiniMagick to the rescue!

MiniMagick accesses ImageMagick directly, similar to exec(’my ImageMagick command’); in PHP. Since shared hosts are looking for Rails spikes not ImageMagick spikes your app won’t get killed. If you use Rick Olson’s excellent attachement_fu plug-in MiniMagick support is baked right in.

Digg! submit Reduce your Rails RAM Usage with MiniMagick to stumbleupon.com submit Reduce your Rails RAM Usage with MiniMagick to del.icio.us submit Reduce your Rails RAM Usage with MiniMagick to reddit.com Like this post? subscribe to the feed.

November 21, 2007

Droid Sans Mono funk dat sh!t, Bitstream Vera Sans Mono!

Filed under: Misc. Alastair @ 8:05 pm

It’s thanksgiving eve so I was being super productive by surfing every blog known to man when I came across one of my favorite topics, programming fonts, which is so nerdy that it occupies it’s own brane.

And while Droid Sans Mono doesn’t suck as much as Courier Mono it can’t even touch Bitstream Vera Sans Mono bitches!

Digg! submit Droid Sans Mono funk dat sh!t, Bitstream Vera Sans Mono! to stumbleupon.com submit Droid Sans Mono funk dat sh!t, Bitstream Vera Sans Mono! to del.icio.us submit Droid Sans Mono funk dat sh!t, Bitstream Vera Sans Mono! to reddit.com Like this post? subscribe to the feed.

November 9, 2007

Evaluating Flex Application Frameworks

Filed under: ActionScript, Flex Alastair @ 10:34 am

If you can’t decide between Cairngorm or PureMVC, Luke Bayes and Ali Mills have a presentation up that walks through the pros and cons of ten different frameworks:

  1. Slide (not yet released)
  2. ARP (I read somewhere that v3 was going to be Rails like in it’s ease of use ARP development seems to have stalled now that Aral Balkan is focusing on SWX)
  3. Servebox Foundry (tied to a Java server product)
  4. Guasax
  5. Flest
  6. MVCS (they mention in the presentation that it’s not really a framework but a blueprint, UPDATE: it is a framework after all see comments)
  7. Model Glue: Flex
  8. Cairngorm
  9. PureMVC
  10. None of the Above

Of the above I’ve tried/used ARP, MVCS, Cairngorm, and PureMVC. My favorite being PureMVC, I was using Cairngorm for a while but most of my Flex projects are one developer (me myself and I) and don’t last longer than a month. I know a lot of enterprisey applications use Cairngorm but everytime I write (or generate) a bunch of files or whatever for just one user gesture I have voice in the back of my mind - with a Danish accent eerily similar to David Heinemeier Hansson’s - saying “six files to do one thing? AYFKM?”. PureMVC takes it down to like three files, but as with Cairngorm unless you have Computer Science degree to learning curve is still quite steep.

Luke and Ali included ‘None of the Above’ as one of the choices and that’s what I usually go with for my two day to two week projects. Flex is a framework itself and with my simple custom MVC setup adds what’s missing (basicly a way to consistently structure the files). I still wish there was a Flex framework that’s as accessible as Ruby on Rails, I think much of the problem is that Flex was originally targeted (and often still is) as a front-end for Java apps so framework developers bring all this Java baggage to with them. Where’s the friendly Flex framework?

Digg! submit Evaluating Flex Application Frameworks to stumbleupon.com submit Evaluating Flex Application Frameworks to del.icio.us submit Evaluating Flex Application Frameworks to reddit.com Like this post? subscribe to the feed.

Get Flex Builder for half price

Filed under: Flex Alastair @ 9:32 am

Adobe is now selling Flex Builder 2 for $249, still no word on the pricing for upgrading to Flex Builder 3 (how about free for everyone who paid $499 for FB2?) :P

Digg! submit Get Flex Builder for half price to stumbleupon.com submit Get Flex Builder for half price to del.icio.us submit Get Flex Builder for half price to reddit.com Like this post? subscribe to the feed.

November 8, 2007

1 Out of 4 Homeless Are Veterans

Filed under: Misc. Alastair @ 1:01 am

I try to keep this blog free from my political views (go Ron Paul!) but this is one topic that never gets enough coverage in the news. You may have noticed that at the bottom of a post’s permalink page I have an appeal to donate to the National Coalition for Homeless Veterans, today there’s a story that veterans of the current wars are becoming homeless faster than ever. Whether you think a war is just or not it always has one by-product; scores of mentally ill veterans many of whom become homeless.

These are not your father’s Vietnam era veterans, they are the same age as you and me.

Study: 1 out of 4 homeless are veterans

Veterans make up one in four homeless people in the United States, though they are only 11 percent of the general adult population, according to a report to be released Thursday.

And homelessness is not just a problem among middle-age and elderly veterans. Younger veterans from Iraq and Afghanistan are trickling into shelters and soup kitchens seeking services, treatment or help with finding a job.

Some advocates say the early presence of veterans from Iraq and Afghanistan at shelters does not bode well for the future. It took roughly a decade for the lives of Vietnam veterans to unravel to the point that they started showing up among the homeless. Advocates worry that intense and repeated deployments leave newer veterans particularly vulnerable.

“We’re going to be having a tsunami of them eventually because the mental health toll from this war is enormous,” said Daniel Tooth, director of veterans affairs for Lancaster County, Pa.

The end of the year is coming up, if you’ve been a productive web developer you’ll need some tax deductions to reduce the amount the government takes from you. Why not make a donation to the NCHV throught Network for Good.

Digg! submit 1 Out of 4 Homeless Are Veterans to stumbleupon.com submit 1 Out of 4 Homeless Are Veterans to del.icio.us submit 1 Out of 4 Homeless Are Veterans to reddit.com Like this post? subscribe to the feed.

November 7, 2007

Merbivore

Filed under: Merb, Ruby Alastair @ 3:17 pm

Merb gets a slick new site.

Digg! submit Merbivore to stumbleupon.com submit Merbivore to del.icio.us submit Merbivore to reddit.com Like this post? subscribe to the feed.

The ruby logo contest winner has been announced

Filed under: Ruby Alastair @ 9:15 am

and it’s not me :(

Ruby logos

Part of the brief was the ability to print at small sizes and to work in black and white, it might be sour grapes coming through, but I don’t think the winner would hold up. The ruby masses don’t seem too pleased…

Update: actually I know why I lost my logo looks too much like a) superman’s b) a strawberry c) the bad guy from Tron (or is that a plus?)

Digg! submit The ruby logo contest winner has been announced to stumbleupon.com submit The ruby logo contest winner has been announced to del.icio.us submit The ruby logo contest winner has been announced to reddit.com Like this post? subscribe to the feed.

November 4, 2007

Flock this

Filed under: Cool Shise Alastair @ 11:31 pm

This post was written from Flock…

Meet Your New Favorite Browser - Flock 1.0!

Blogged with Flock

Tags: ,

Digg! submit Flock this to stumbleupon.com submit Flock this to del.icio.us submit Flock this to reddit.com Like this post? subscribe to the feed.

November 2, 2007

Flex Image Component: Loading, Resizing, Aligning, and Smoothing

Filed under: ActionScript, Flex Alastair @ 11:04 am

Here’s the brief load an external image into Flex, resize it to fit in a container (but don’t make it bigger than the original), center it in the container, and smooth the image to get rid of any aliasing. Sounds like a simple job, slap down a VBox, set vertical and horizontal alignment, add an Image component and set it’s width and height to 100%, grab some handy image smoothing code, you’re done no? No. There’s a issue with every one of those steps.

First up the VBox. If a VBox contains a dynamic image (who’s size is undermined) the VBox will no pick up the Image component’s new size once the image has loaded so it can’t adjust the image to be centered properly.

Next is the Image component, setting the Image Component’s width and height to 100% seems like a good idea until you get an image with smaller dimensions than it’s container. The image will stretch to fit and become blurry. Setting the scaling to false will then not allow images that are larger than the container to scale down. We’ll have to handle image resizing manually.

Finally smoothing, dynamically loaded images do not smooth when you change their size. The solution is to use Ben Longoria’s image smoothing component but it if you don’t set your security model property your app will still crash and burn as you can’t get an image’s properties if the Flash player barfs a security sand box violation (no smoothing and no resizing as you can’t even get contentWidth or contentHeight).

Anyways long story short here is my solution to the problem:

  1. Don’t set any image component properties before hand, once it’s loaded use it’s ‘complete’ event to resize it.

  2. Use a Canvas instead of a VBox and handle positioning by hand
  3. Set a loaderContext for the image, and make sure your cross domain policy is set up correctly

Here’s an example. The top image isn’t centered correctly and it’s aliased because it’s a regular Image component (you can see jaggies on the curves and angles). Right click to view source.

Digg! submit Flex Image Component: Loading, Resizing, Aligning, and Smoothing to stumbleupon.com submit Flex Image Component: Loading, Resizing, Aligning, and Smoothing to del.icio.us submit Flex Image Component: Loading, Resizing, Aligning, and Smoothing to reddit.com Like this post? subscribe to the feed.

Powered by WordPress