Joel Bradbury Everything 2011-12-30T10:42:54Z Copyright (c) 2011, Joel Bradbury ExpressionEngine tag:http://joelbradbury.net Prototype tag:jo3l.ee2,2011:index.php/1.179 2011-12-30T10:42:54Z 2011-12-30T10:42:54Z

What Should Happen

  1. Draft Idea
  2. Write Basic Code to test feasibility
  3. Iterate
  4. Release

What Actually Happens

  1. Draft Idea
  2. Write basic code to test feasibility
  3. Refactor code for new use case
  4. Rework base concept and abstract
  5. Write script to speed up abstraction
  6. Abstract script for abstraction
  7. Automate script use for abstracted abstraction
  8. Forget what original idea was
  9. Throw everything out
  10. Goto step 1.

--

Summer is Over tag:jo3l.ee2,2011:index.php/1.178 2011-09-06T08:00:18Z 2011-09-06T08:00:18Z

To conclusively put this to rest, today is officially 1 the first day of Autumn. I care not what the calendar says. The consulive proof is as follows :

1. I put the heating on today

To even get to the boiler moving a bulk-pack of Boneo’s that had been stacked up the closet since late April.

2. I have worn my office hoody 5 working days in a row

The office hoodie 2 has seen more usage in the past working week than any previous month in the last year.

3. I wore a hat today

It was cold, it was raining. A hat was required to walk to and from the shops.

Of note, I have a full head of hair unlike baldie-locks Steven Lewis, so this wasn’t a hair based (or lack of) coolness.


  1. Not officially

  2. It's not a yob hoodie. I've never been rioting.

--

Getting Terminalized tag:jo3l.ee2,2011:index.php/1.173 2011-09-02T17:24:44Z 2011-09-02T17:24:44Z

If it were possible I would live my terminal all the time.

It’s not. As much as I want to like vim, we just don’t get on. I used to be an emacs devotee back in the heady days of youth, but even that seems strangely antiquated now.

So, I have to leave the terminal now and then.

But to make the my time there as pleasant as possible there are a few little things I like to add to my .bash_profile to ease my working day.

Make it look nicer

There really is no choice for colour schemes other than homebrew. If you’re not using it you’re either too busy working to care, or a loser. I can’t decide right now.

While it’s does take the theme a step away from it’s roots, I like to make sure the text is set to anti-aliased. Why? Because I’m not that hardcore.

Make your path more obvious

There’s always the obvious pwd to get your current location, but those are 3 characters I’d rather not keep repeating, especially as I have a famously scattered memory for things like this.

Dropping

PS1="\n\w "

into you’re .bash_profile throws out the current path in your prompt changes the colour scheme slightly too. That makes it just dandy. We’re getting there.

Love your branches

Do you use git? If you do, you obviously love your branches. But oh noes! you say, I keep forgetting my current branch and have to go through the rigmarole of git stash, git stash pop all the time.

Well – to stop myself repeatedly (and I do mean repeatedly) working on the wrong branch, adding this :

parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

changes your prompt to append your current git branch (if you’re in a git repo) inline after the current path. With that on your side you’ll never need to worryingly do a git branch in panic again.

# Colours from http://wiki.archlinux.org/index.php/Color_Bash_Prompt
NO_COLOR='\e[0m'
CYAN='\e[0;36m'
ERED='\e[1;31m'

# Command prompt.
parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

PS1="\n\[$CYAN\]\w  \[$ERED\]\$(parse_git_branch)\[$CYAN\]\n➔\[$NO_COLOR\] "

Here we are, at then end of all things

So, with all those tiny tweaks I end up with a terminal prompt that looks somewhat like this :

Is it perfect? No. But it’s getting closer, and if you’re that way inclined, get my current .bash_profile.

*I stole some of these settings from other developers. I have no shame about this. I’m looking at you @monooso.

--

Let’s Play a Game tag:jo3l.ee2,2011:index.php/1.172 2011-08-31T20:23:08Z 2011-08-31T20:23:08Z

What time will the postman get here today?

Well – what’s a reasonable time for a postman to arrive you may ask?

8am? 9? Maybe a little later, just past 10? That would be a reasonable time for a regular national postal service in a medium density population centre.

The closest post office is 4.6 miles. The postal dispatch warehouse a comely 10.1 miles. I live on a totally regular street, in a populated town, not out in the sticks requiring some for of mule based transport to reach.

Even so I could honestly not tell you when the post will arrive on any given day.

To demonstrate the sheer variance of delivery times, heres the postman’s times for the month of August, 2011.

Postal Delivery times, August 2011

Mon 1 Tue 2 Wed 3 Thu 4 Fri 5 Mon 8 Tue 9 Wed 10 Thu 11 Fri 12 Mon 15 Tue 16 Wed 17 Thu 18 Fri 19 Mon 22 Tue 23 Wed 24 Thu 25 Fri 26 Mon 29 Tue 30 Wed 31
1412 1243 1342 1019 1120 1530 1350 1455 1522 1431 1503 1510 1242 1201 1220 0930 0945 0922 1123 1541 1312 0912 1402

some times are estimates

So. What time shall we meet tomorrow Mr. Postman?

Your guess is as good as mine.

I just give up, I don’t even know anymore.

--

Unproductive Day tag:jo3l.ee2,2011:index.php/1.170 2011-08-29T16:57:08Z 2011-08-29T16:57:08Z

Today has not been productive.

It’s new Mac time, and even though I’ve got 16gb of ram, and more screen space than I can shake a window at, I’ve got basically nothing productive done today. (Other than making some lists, and sending a few “I’ll get back to you” emails).

Everytime with a new machine, it’s the same 4 basic steps :

  1. Unpack
  2. Hookup
  3. Setup
  4. Get Working

And somehow, as often as I’ve followed this little dance, I always trip up somewhere during step 3 the setup, and only eventually get to step 4, get working, sometime the next day.

This shouldn’t be. Setting up a new mac should be simple and straight forward, and for all intents and purposes it is. I just make it harder than it needs to be. So – to aid my future setup’s here’s exactly (* not exactly) what I’m putting on my machine – in order no order other than when I remember I need something.

App Store things

Ahh, if only everything was actually in the app store, it’d be so simple. Quickly click ‘install’ on all of these apps from the ‘Purchased’ tab (after signing in)

  1. Sparrow
  2. Xcode
  3. Pages
  4. Transmit
  5. Twitter
  6. Numbers
  7. Keynote
  8. Cloud
  9. MPlayerX
  10. Divvy
  11. Cinch

Stop a minute, and notice the size of Xcode compared to everything else. Pause it for the moment to give everything else a chance to catch up.

Scour the Web for Download links

  1. Chrome
  2. 1Password
  3. Alfred (I’ve got the power pack so can’t use the AppStore version)
  4. Dropbox
  5. Sequel Pro
  6. TextMate
  7. SublimeText2
  8. TaskPaper
  9. WriteRoom
  10. Tower (for pretty git history)
  11. VirtualBox
  12. MampPro
  13. Spotify
  14. Skype
  15. Adium
  16. Growl
  17. Logitech Trackball Drivers (yes – I use a trackball, the drivers aren’t really necessary but let me bind the extra buttons to specific functions)

Move over my old things

  1. Get all my transmit saved sites
  2. Move the saved sequel db connections
  3. Move everything over from my Sites directory
  4. Reimport my address book contacts

Set things up the way I like

  1. For better debugging setup XDebug and MacGDBp to play nice with Mamp following this tutorial
  2. Setup Divvy and Cinch to run on startup, and setup and bind oh so many window sizes for divvy. A pain to setup, a lifesaver to use
  3. Setup Adium – again.
  4. Set the default Terminal style to be a better looking ‘Homebrew’, and set text to be anti-aliased
  5. Setup better path variables for Terminal, giving more colours, and current git branches in the path.
  6. Add all my mail accounts into sparrow. Setup the respective signatures, and avatars, a pain but necessary
  7. Change the default dropbox menu bar icon to be black – Why isn’t that by default?
  8. Sync my 1Password with the keychain in Dropbox
  9. Install the browser extensions for Safari and Chrome
  10. Setup the Omnibar for Safari – again – why isn’t that by default, it feels so backward
  11. Generate new ssh keys for this machine and upload to beanstalk and github (deleting the old ones as appropriate)

And by then, I’m basically ready to start the day. But that took me all day. So now, I’ve got basically nothing done, and I’m doubtless going to find something that isn’t actually there when I start actually working tomorrow.

--

101 Ways to Skin a Cat tag:jo3l.ee2,2011:index.php/1.164 2011-08-26T07:14:41Z 2011-08-26T07:14:41Z

If youre only interested in the slides, get my deck for 101 Ways to Skin a Cat before you go any further.

Common Addons Extended Breakdown

As part of my talk at EEUK this year I sent out a questionnaire to ExpressionEngine developers. One of the most interesting parts of the responses was the distribution of third-party addons developers most commonly use in the majority of their sites.

The full breakdown of the responses is here:

Q. What #eecms addons are in your default build?

A. This chart.

Matrix Playa Structure Wygwam Freeform CE Image Assets imgSizer Low Seg2Cat Nav EE SEO Lite CP Analytics Channel Images Custom System Messages Freebie Low Variables NSM Transplant SuperSearch Switchee Template Variables Acc. Textile Editor Helper Zoo User Accessible Captcha Accessible Image Backup Pro BluePrints CartThrob CopeePastee Deploy Helper Deviant Draggable ED ImgSizer Espresso ForLoop GW Code Categories IfElse Last Segment Low Reorder Low Replace Low Title Menu Module Nav Minimee Mountee MX Extended Count MX Toolbox MX Jumper nGen FileField NDG Flexible Admin NSM Better Meta NSM Email Login NSM Live Look Partials PHP String Fun SafeCracker Spark Strip HTML Stash Toggle Children Triggers TruncHTML User VZ Bad Behaviour Word Limit Wyvern Zoo Flexible Admin
23 15 14 14 10 8 6 4 4 4 4 3 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Really interesting it shows a classic exponential trend, from the most common, to the little used addons.

The most popular, Matrix has 50% more results than the number 2 addon, Playa. Once you’re out of the top 8 most common addons, the popularity shelves off dramatically.

Note

This was only an informal questionnaire, and had the princely sum of 74 responses. While trends can be inferred from the results, it’s hardly a large enough sample set to say anything for sure. So – take the results with a pinch of statistical salt.

Dry Templates

The DRY template style was one I’d never previously encountered, but rather than repeating it here, John Well’s has an excellent write up of the specifics.


--

Focussed like a laser tag:jo3l.ee2,2011:index.php/1.162 2011-08-20T15:00:30Z 2011-08-20T15:00:30Z

Things to do to avoid writing your looming presentation

  1. Find, dust off and hook up the printer
  2. Watch the printer try, and fail, it’s self alignment test.
  3. Repeat the alignment test
  4. Google hp c4380 alignment fail
  5. Click around
  6. Realise you dislike printers and all associated activities
  7. Open email
  8. Read unread emails
  9. Realize you’re not working
  10. Make a list of what needs to be done, in what order
  11. Observe the ominous length of the list
  12. Thoughtfully add ‘Make a list‘ to the top of the list
  13. Check off ‘Make a list
  14. Reward clearly evident progress by making a coffee
  15. Return to desk to drink coffee and check twitter
  16. Click a link that leads to an article about Presidential reading materials
  17. Follow a link to wikipedia
  18. Read about President Roosevelt’s safaris
  19. Find this image
  20. Remember you need to move your sites away from Godaddy
  21. Go over to godaddy.com, try to login
  22. Realise you’ll have to search for you user_id. Close Tab
  23. Find open tab on the Construction of Mount Rushmore
  24. Read entire article
  25. Proceed to read the article on Historical Rankings of United States Presidents
  26. Remember you’re meant to be writing a presentation
  27. Shut off wifi
  28. Reconnect to wifi to get to Google Docs spreadsheet with all the presentation info in
  29. Accept defeat, as a cleansing attempt, create a list of everything done in the last hour, that wasn’t what I was supposed to be doing
  30. Post list online for public shaming

// End

--

Lessons Learnt tag:jo3l.ee2,2011:index.php/1.161 2011-08-16T19:42:25Z 2011-08-16T19:42:25Z

In an attempt to avoid working on something I really should be, here’s a dump of exactly what’s on my mind right now.

Textmate is dead, long live SublimeText2

Since moving to Lion how I’ve moved all my development over from TextMate to SublimeText2. It takes TM’s themes, and the bundles can easily be updated for it (most of them are already there). The best indicator of why I think ST is the future :

Number of updates to TextMate in the last 3 years : 2 (bugfixes)
Number of updates to SublimeText in the last month : 3 (feature releases)

Not even a contest

My gut isn’t the most resilent beast

By a process of concerted (and sometimes unpleasant) testing and ellimination, eating any of the following 5 things causes a movement that can actually by timed. To the minute. Not Good.

  1. Hotdogs
  2. Anything hotter than a madras
  3. Sausage Rolls
  4. Scotch Eggs
  5. Meatballs (especially Ikea meatballs)

You can’t force code

Now that I’m developing for Solspace I’m reminded on the difference between good code, and great code. An hour of great code is worth far more than a day’s worth of meerly ok code. Sometimes the best thing for it is to step away and do something else. Nobody wins by just sitting staring at a screen.

CMSes are built for clients, not developers

Yes, yes. #eecms is nearly 95% of my business. It’s a great tool, and I’m consistenly learning (and making) new ways to bend it to my will. But after 4 years of working with it I’ve realiased I’m not it’s market. For clients it’s brilliant. But for me – give me a text editor and a python script any day.

TV is a total waste of time

We got rid of our TV license 4 months ago. The only regret I have is not doing it sooner.

A 16kg kettle bell is surprisingly heavy

And I mean heavy. Easy enough to handle, but try throwing it above your head repeatadly for 20 minutes.

--

Blue Lights tag:jo3l.ee2,2011:index.php/3.159 2011-02-17T09:00:44Z 2011-02-17T09:00:44Z

February 17th, 2011

Bike Store tag:jo3l.ee2,2011:index.php/3.158 2011-02-16T09:00:34Z 2011-02-16T09:00:34Z

February 16th, 2011

THE Matt Weinburg tag:jo3l.ee2,2011:index.php/3.157 2011-02-15T09:00:01Z 2011-02-15T09:00:01Z

February 15th, 2011

Windmill tag:jo3l.ee2,2011:index.php/3.156 2011-02-14T09:00:09Z 2011-02-14T09:00:09Z

February 14th, 2011

Fly Away With Me tag:jo3l.ee2,2011:index.php/3.155 2011-02-11T09:00:25Z 2011-02-11T09:00:25Z

February 11th, 2011

Eva Bump tag:jo3l.ee2,2011:index.php/3.154 2011-02-10T09:00:43Z 2011-02-10T09:00:43Z

February 10th, 2011

Garden Fire tag:jo3l.ee2,2011:index.php/3.153 2011-02-09T10:12:56Z 2011-02-09T10:12:56Z

February 09th, 2011