DerekAllard.com

Launching your browsers in Private Mode with Alfred

Alfred AppPreamble: I’m a huge fan of Alfred App. This post isn’t about Alfred per se, but if you’re a Mac user, do yourself a favour and grab a copy. There’s a free version, and the “powerpack”. The powerpack is what is needed to follow the rest of this post.

Recently I’ve been tackling a lot of projects where the state of the app when “logged in” was different then if you were “logged out”. In order to test the app in both phases, I spent a lot of time flipping between staying logged in, and also launching the site in private mode (or in Chrome, “Incognito”). To help speed up the process, I wrote a few extensions for Alfred to automatically launch my browsers in private mode.

The extensions support Firefox, Chrome, Safari and Opera.

Here’s what you’ll see now:

Grab the extensions and play around: alfred_private_mode_extensions.zip. Installing them is super easy, open Alfred’s preferences > extensions, and just drop them one at a time onto the “Drop to Install” box.

Simple vs Complex conditionals in ExpressionEngine templates

I’ve had a chance to be involved in some some pretty fun and exciting ExpressionEngine projects lately. Often, this means looking through sites that other developers had originally built out. Its always fun seeing how other smart people choose to solve a problem - often in a different way then I’d do it. Reading other people’s code is always a great way to learn.

That said, a recurring theme I see are poorly optimized EE templates. Usually, there are minor changes I can have a dramatic impact. The most common minor fix is simply understanding the difference between “simple” and “complex” conditionals. While digging around for a few good resources I could use to help explain it, I stumbled across a wonderful post on the EE forums by John D Wells that explains it masterfully, which I’m reposting here with his permission for my convenience. As an aside, John is a pretty prolific guy, and if you aren’t subscribed to his blog, now is a good time to check it out.

Firefox 4 alert boxes

I mentioned on Twitter that I’m impressed so far with Firefox 4. Here’s a very minor, change I’ve noticed, that I’m a fan of; the treatment of javascript terminal dialogs.

Firefox 4 alert box

The overlay makes it clear to the user that they need to interact with the alert box before they can use the page. Much nicer than the old style, where the page remained unaltered and the alert dropped from the top (at least on a Mac, I understand Windows versions appeared mid-screen).

Firefox 3 alert

There’s still some room for improvement here, and I don’t think this style of modal will (or even should) replace current solutions for modal windows, but I like how the Mozilla team is working to draw more attention to the box.

That said, I hope the Firefox team doesn’t give in to the inevitable cries from either the “we hate any and all change” camp, or the “now I want to use an image as the overlay and control the opacity” camp.

5 Things You May Not Know About CodeIgniter

Every time I start a new project with CodeIgniter I find myself tasked with something, often a small thing, that I’ve never “solved” before. I try to use these moments as opportunities to explore PHP and CodeIgniter a little bit deeper. Often times I surprise myself by learning something new, or surprise myself at having forgotten something relatively “basic”. Here are 5 things I’ve discovered or rediscovered in the last few years. If you’re a CI veteran, some of these will be old news to you, and some might be new. Maybe just like me you’ve forgotten about a handy trick. Regardless, they’ve become mainstays in my coding now, and I think they deserve a bit more recognition.

Keep reading to see the tips!

Modifying the default CodeIgniter Calendar template for fun and profit

A project I’m working on needs a monthly calendar. Naturally, I’m using CodeIgniter as the base of it. Here’s the default CI-based calendar:

default CI calendar

and here’s what I ended at (you can grab the files (CSS, config file, sample controller/view) below).

completed CodeIgniter monthly calendar

 

Javascript badass

Added:

jQuery.fn.utterlyDestroy = function() 
    
var jQuery(this[0]).remove();

to my global js file… because it makes me feel like a badass to write code like:

jQuery("#some-div").utterlyDestroy(); 

CodeIgniter Podcast: Episode #4

Yesterday I had a chance to sit down and do Episode#4 of the CodeIgniter Podcast with Phil Sturgeon and Kenny Meyers. It was a blast! I’ve known them (both in person and “virtually”) for several years, and have always enjoyed talking with them, but I wasn’t sure how it would translate to the “podcast” environment. Well, I think it translated great.

In my opinion, the best part of any free-flow discussion like a podcast is that you get the (reasonably) unfiltered thoughts of people who are just plain excited by what they do. Sure I wish I had a few less “um”s, but its a small price to pay to get to sit and chat with 2 of the smarter people in the community.

Phil did an amazing job - and heck, got it nicely edited and posted pretty much instantly; everything that guy does is fast and high quality (there’s a joke in there somewhere). Kenny Meyers is one of those guys who you just want to sit and talk with, his observation about the shift in server administration off the host and onto the developer still has me re-thinking how I approach things. Both of them were pretty merciful on making fun of my accent (what’s that a-boot anyhow).

I’m looking forward to doing it again, and to listening to future episodes from others.

If you have a half hour to kill, or can listen to talking and still get your work done (I’m not one of those people), then go have a listen.

Also, is it “eye-on” auth, or “eee-on” auth? These are the questions that keep me up at night!

(Fire)foxes can hold their breath!

Remember years ago when you didn’t have Dropbox or Air Sharing and you relied on a trusty USB pen when you went somewhere and needed to physically pass files around? I do. Having spent almost 10 years doing training and going from office to office, computer to computer, it saved my life many times.

In 2007, I met one of the Mozilla guys at a conference (I think it was Benjamin Smedberg) and he gave me the last USB pen I ever owned.

Firefox USB pen

I tucked it in my backpack, and that little guy has been everywhere with me, even causing momentary confusion in Germany when a customs agent pulled it out of my bag and excitedly showed it to me. At the time I thought I was about to get interrogated by a German Jack Bauer; turns out he just was a Firefox lover. It saved my butt once again late last week, when I was in a foreign computer lab with no internet access (wireless or otherwise). I’m sitting there with my laptop, needing to get files to another computer that’s hooked up to a projector, and drawing a blank. I momentarily contemplated burning a single file to a blank DVD, but then I remembered ol’faithful. So out it came, files got moved, and I tucked it away quickly into my pocket in case I needed it later.

...And then I did something stupid…

New Challenges

Its with a sad heart that I write that I’m no longer part of the wonderful team at EllisLab.

When I joined the company in 2007, there were interesting challenges ahead. I got to be the only developer working full time to bring ExpressionEngine2 to market, and along the way got to envision, design and build some of the most interesting aspects of it - the configurable publish screen and the file manager, among others.

After ExpressionEngine2 made it to market, I had the opportunity to really dig into a new challenge, a new product, with no legacy and no expectations. It was a joy to bring MojoMotor to market. I spent my days dreaming about how it would work, how people would interact with it, and even fussed over little details like naming and icons. It was a lot of fun. MojoMotor has only been available for a short time now, but it is by all measures a success.

EllisLab has a strong core of products now, and a large, engaged community; and also a new management and a new direction. The type of challenges that excite me, that drive me, aren’t available anymore, and so while it appears sudden to some, my time at EllisLab has reached a natural conclusion.

I’m off now seeking new opportunities and the next challenge. I remain passionate about what I do, and what I’m good at - building fun, engaging software.

New MojoMotor updater

Coming in MojoMotor 1.0.4, is a simplified version updater. Here’s a 17 second video preview.

new MojoMotor updater in action