Agile Ajax

Firefox Plugin Malware ‘Trojan.PWS.ChromeInject.A’

You knew it had to happen. Malware for Firefox. It happens all the time with IE (so much so that my 17-year-old niece needs a fresh install of Windows every 3 months), but Firefox has been a little less prone -- though not imune -- to malware. See the BitDefender blog post and the Infoworld article which has a bit more detail.

Now Firefox 3 does contain Malware protection, but apparently this plugin is delivered via other system compromises to the filesystem, and apparently Firefox doesn't question already installed plugins.

BTW, the malware registers itself as GreaseMonkey. If you care to, you can follow the Slashdot food fight on this topic.

More as I find out more...

Pathfinder releases version 1 of the its Flash Platform microsite (codename Mica)

You can see the site here. Come often as it will be updated on a regular basis.

The goal of this site is to shed more light on what is it that we do here at Pathfinder with the Flash Platform.
We would be very grateful to hear feedback about the site from any perspective.

Continue reading »

Pimp my Rails: Five Plugins & Gems to Make Rails Better

Shamelessly dovetailing off our very own Brian Dillard's blog entry earlier this week, Pimp my jQuery, I wanted to jot down a few of my favorite Ruby on Rails tools that I would find life completely unbearable to be without. While they might seem like simple, small changes, these plugins have saved me huge amounts of time and I think the least their authors deserve are some nice shout-outs.

Continue reading »

Topics:

iPhone: Using Pre-processor Directives for Device Testing

iPhone in Dock
There may be cases where a certain setting needs to be tweaked based on whether you test on the device or simulator. It took me a while to find the pre-processor directive to detect whether or not the current build targets the iPhone device or the simulator, but with a bit of searching through the GTM code, I found everything I needed in "TargetConditionals.h". An obvious place, in retrospect, but I wasn't able to find this information easily elsewhere on the web, so I mention it here in case you find it useful.

Here's an example of how I've used it:

#if TARGET_CPU_ARM
	// Device will hit external server over cell network
	NSString const *ROOT_URL = @"http://www.external-site.com";
#else
	// Simulator will hit local server over LAN
	NSString const *ROOT_URL = @"http://localhost:8667";
#endif

This kind of tweaking is particularly important when the device itself can not participate on the local network, but needs to access some kind of external environment (or proxy server). Conversely, targeting the simulator to use a local 'development' server is often faster when deploying and debugging issues in your application, particularly if you are developing the server component in tandem.

Another example involved certain audio playback features which work fine on the device, but run into hiccups running on the simulator. Since in this case the functionality is not critical to test, I ignore it in the simulator.

Topics: , ,

Subtle OpenGL Projection Matrix Difference Between iPhone Simulator and Device

iPhone in Dock

If you are deploying to the iPhone simulator instead of to a device, you can get away with not loading the identity matrix for the projection matrix so long as you do not want to draw over any bound textures which are drawn.  However, on an iPhone device, you will notice some serious artifacting if you attempt this.  The artifacts will be related to the last drawn textures, even if they were drawn from a different application (except if the phone was turned off in the interim, in which case you will get a black strobe effect).

This implies that the simulator loads the identity matrix automatically for GL_PROJECTION when loading your application, where as the iPhone itself will maintain the matrix's state between applications.

App Security: Throw Out the Org Chart!

Traversing The Org Chart
"Only administrators can add users-- no exceptions! ...except Bob in accounting, but that's because he's covering for Sally. But only until February. And this sort of arrangement might happen again. But most of the time, it won't. I mean.. ninety-nine point nine percent of the time. But there might be exceptions... ".

Sound like a requirement you've heard before? How did you handle it?

In an earlier post, I stated that all security models are idiosyncratic, and that the way you go about designing for security must reflect the nuances and -isms of your organization. You might mistake the form used to express the model (HR records, existing databases, or some XML schema) as your security model, but you risk an uphill battle getting your organization (and I mean the people here, not boxes and circles on an org chart) to accept the result.

All of this has less to do with how we design software and everything to do with the way people organize into groups..
Continue reading »

Pimp my jQuery: Five plugins to replace the features Prototype and Scriptaculous users expect

jQuery logo

Ajax pros, especially in the Rails world, often know the Prototype and Scriptaculous JavaScript libraries inside and out. When faced with the prospect of writing on top of the competing jQuery framework, they may quickly stumble upon seemingly missing features.

The culprit? jQuery's less-is-more approach, in which advanced or specialized features come via plugins instead of the core library. The greater reliance on single-purpose plugins gives jQuery a lean footprint and a vibrant ecosystem, but they come at a cost. You often must rope in several plugins to accomplish things Prototype and Scriptaculous can do out of the box.

If you want to encourage your team to step out of the Prototaculous mindset, it helps to have a readymade list of plugins that approximate those libraries' core features. At this point jQuery and Prototype approach feature parity, but once Scriptaculous is in the mix, jQuery relies on multiple plugins to keep up with the Joneses. Here's a quick stab at how to trick out jQuery:

Continue reading »

Thanksgiving 2008: What We’re Thankful For (In Rails)

Since it's Thanksgiving and all, I asked our Rails developers to briefly mention something in Rails that they are thankful for. You'll notice some common threads -- nobody consulted with anybody else as far as I know.

Anthony Caliendo

I'm thankful for the "convention over configuration" mindset, as it saves me so much time and removes all the plumbing and wiring I needed to do when developing java apps just to get it running.

Jason Sendelbach

I am thankful that Ruby on Rails has conventions and code that reads like prose. Because of this, I can join an existing project and be an effective resource immediately. If I am fixing a bug, I simply look at the URL to figure out where to start. If the code is good (most of the code in Models and Helpers and not in the Controller), there are few bugs (did I mention the code was generated with TDD) and I can quickly start coding without much overview from any of the other developers. The entire project and code is self explaining. There is almost zero ramp up time. Thanks Rails (and Ruby).

Josh Symonds

Definately ActiveRecord. Particularly associations and association methods, and named scopes (because they feel like association methods but on one model).

Sharad Jain

I am sure ActiveRecord is the crownjewel. Outside of that, support for testing (unit, funcational) and supporting classes inside of rails are great.
Standardization of how libraries are installed (gems, plugins) etc. and convention of configuration in general is also something that I am thankful for.

Karthik Muthupalaniappan

I think the best thing for me about Rails is it lets me worry only about how I should/can code a functional requirement of an application by taking care of most of the other configurational/operational aspects of the application

John McCaffrey

Thorough implementation of Regular expressions throughout ruby and rails.

Noel Rappin

I get to go last, so I won't repeat anybody else...

I honestly love the ActiveSupport library, with all its 2.days.ago and 10.kilobytes and even array.second. I'm thankful for the attitude encapsulated by all these methods -- "if I needed to this, a lot of other people probably will, and I want to make sure they don't have to write it again". It's DRY at the community level, and it's part of what makes working in Rails so satisfying.

Have a great holiday weekend, everybody. Thanks to all of you that read and comment.

Topics:

iPhone SDK: Testing with TextMate & GTM

iPhone in Dock

Developing in Xcode, I keep my project default "SDKROOT" and Target set to the default for the iPhone device and 'Release', respectively.

That said, I have been trying out TextMate as an alternative to Xcode, thanks to all of the great things TextMate provides (I won't go into all that here, since there are already many great resources on the web). For those iPhone developers who are new to the Mac platform, or to TextMate for that matter, here's a quick tip (and be sure to check install Xcode bundle first).

First, as always, an obligatory shout-out to Google Toolbox for Mac. I am testing my code with GTM, and set the following environment variables so that Xcode plugin for TextMate could run a build / tests accordingly.

  TM_BUILDSTYLE = "Debug"
  TM_TARGET = "Test SDKROOT=Test SDKROOT=iphonesimulator2.1"

This presumes you followed the GTM directions by creating a 'Test' target to run your tests, and also that you are targeting the 2.1 version of the iPhone simulator's firmware. Replace that last argument with 'iphonesimulator2.2' if you are targeting the recently released 2.2 firmware.

With these two settings, everything works great. I can write a bit of code, and run the build. Xcode definitely does a lot, and has its place in development, but I feel that the ease of use in TextMate outweighs the code completion of editing files in Xcode in cases where the code that I am working with is familiar to me.

Wherever I am working with new API's or need to constantly refer to documentation, Xcode is still worth it, particularly after you map some essential keyboard shortcuts (but that's another post). For familiar API's however, you can't beat the productivity gains of just coding in TextMate.

GWTQuery - JQuery-like Syntax in GWT

Many times open source projects are mute -- they have insufficient documentation. Good technical blogs can function as a sort of ad-hoc documentation. That's what I've tried to do, most recently with my series of posts on GWT and OpenSocial. Vinay, over at Web Technology I/O, often does the same. He's got a great post about Ray Cromwell's GwtQuery (JQuery-like syntax in GWT) and how to make it work.

I've been tinkering with this tool as well and am going to do my own writeup, but thought I'd give you all the heads up. BTW, according to Vinay, the compiled GWT JavaScript for GwtQuery clocks in at 712 bytes!! So much for GWT bloat.

Topics: , ,

Ask the readers: How do I fire native browser events in Prototype.js?

I've been pairing with my colleague Noel Rappin on a cool Rails project lately, which has helped me turn a bunch of conceptual knowledge into real-world experience. I'm writing Ruby code, doing things the Rails way, and hewing faithfully to test-driven development.

I'm also returning to Prototype for my JavaScript needs after almost 15 months of daily jQuery use. The framework has matured nicely while I've been away. One surprise popped up today, however: Prototype 1.6 lacks the ability to simulate native browser events. jQuery offers this in the form of jQuery.trigger, which can simulate both native and custom events. But Prototype's Element#fire supports only namespaced custom events. (Read this mailing-list thread for more analysis.)

I did a couple hours of digging around today - including a trip to Scripteka - and haven't really found a canned, cross-browser solution to this issue. I'm looking for something that offers jQuery's native event firing in a tidy little Prototype extension. Anyone know of such a tool?

News Rollup for the Week of November 17, 2008

Two major bits of news from this week:

  • Amazon has gone live with their new CDN (Content Delivery Network), CloudFront. Think Akamai for the rest of us. Pay as you go, hooks into S3. If you want to get a jump start on this, get yourself the latest version (0.4.5) of S3Fox, the S3 addon for FireFox. Getting started is easy: sign up for CloudFront (or sign up for Amazon Web Services if you haven't already, then sign up for CloudFront), create a bucket, put content in it, make it publicly readable, create a 'distribution', enable it and map a CNAME to the cloudfront.net hostname that corresponds to the distribution. We'll be doing some testing of the Amazon CDN over the next few weeks and do a review.
  • Adobe AIR 1.5 has been released. Among the improvements: encrypted local database, Flash Player 10 support (no H.264 for Flash 10, though :-(), and an update to the WebKit bundled with Air. InfoQ has a nice summary of the Adobe MAX Air 1.5 buzz.

If you've got any news that you'd like to announce, ping us at ajax@pathf.com.

Rails ThreatDown!

It may help to read this one in a Stephen Colbert deadpan voice...

You want Fear, Uncertainty, and Doubt. I'm just the fuddy-duddy for the job...

This is the ThreatDown!

Continue reading »

Topics:

Automated Deployments Rock

I have been a developer for many moons, and have taken many systems to production. I must say that production deployments were never on my list of things that make me warm and fuzzy. This was due to the fact that they weren't automated, or the automation was poor. On a recent java project, we had a series of simple sh scripts that did the work of deployment. We deployed war files to 12 application servers and to about 60 JBoss nodes. Before the automated scripts, a developer who typed wicked fast did all of the deployments. Without him, deployments would have been a nightmare.

I learned Ruby on Rails last year, and was delighted when I found Capistarno. I wanted to share the things I love and hate about capistrano.
Continue reading »

Bandwidth profiling Flex projects and more with Charles

Adobe Flash comes with a very useful feature for bandwidth profiling. It allows you to see how will your site/app act under certain network conditions.

Flex Builder unfortunately does not have that option so we have to look somewhere else for a solution for testing.

While there are many applications that simulate various network conditions, Charles stud up as the most practical for Flex developers, in my opinion.

Continue reading »

About Pathfinder

  • We design and build extraordinary applications for companies looking to make the next great idea a reality.
  • learn more

Topics

WordPress

Comments about this site: info@pathf.com