Energize

One month ago today, I took a position at Developer Town and with new positions comes new energy, especially given the emphasis on craftsmanship and the culture of learning here.

I have used this new energy to up my game in iOS development; I've learned new tools, I've learned new ways to use my current tools and I've worked on creating some shortcuts and tools of my own to leverage this learning.

Customizing Bash

I come from the land of .net, guia and mice, and in the rush to figure out al of the archaic in's and outs of building an iPhone app and publishing it in a relatively quick and repeatable manner I never really looked at how to improve how I was doing work in OS X. My first taste of the power came when I attempted to do some freelance work for Expected Behavior in order to learn Rails development and was introduced to their common files project, which is a very specific to EB bash customization. After using that for about a year, unknowingly benefitting from the included git completions and completely failing to appreciate the aliases and ssh help that were included, I decided to dig into it and rip out the pieces that I didn't need (EB specific stuff), learn more completely the things I could use, and add some things of my own to prove the concept.

Thus was born:https://github.com/jonnolen/osx-basher

Installation was/is a manual affair prone to error but I'm confident now that given a couple of hours I can crack that nut.

Custom Xcode Templates

When I started at DT, the first thing I was introduced to was the cocoapods gem. RestKit, MRCEnumerable, JSONKit, all of these libraries that were an arduous mix of copy and paste or git submodules before are easy to add to an XCode project using a syntax very similar to the bundler Gemfile, what a win. After configuring my first xcode project with it, a process that includes adding a Gemfile with some boilerplate, adding a Podfile with some boilerplate, tweaking the unit test target in the Podfile, adding an rvmrc file to leverage gemsets and ruby versions, fixing the .gitignore file to add some osx cruft boilerplate, and then making sure to run bundle && pod install, I got the itch to automate most of that out. I researched Xcode templates and set out this past weekend to hack one together for my DT iOS projects going forward.

Boom: https://github.com/jonnolen/custom-xcode-templates

And a thing I learned to leverage (really late) in this was symbolic links in linux. Instead of having to copies of my git repo on my computer or a copy of the templates untied to anything, made a symbolic link to the template in my local repo in the required folder. Now I can keep my code organized where I like my code to be organized and do work there that automatically shows up in my xcode templates list.

Back to customizing bash

So last night I read this tweet:

and decided to add git-nuclear-option as an alias to my git_customization script. I cloned the repo to my code directory and made my change:

alias git-nuclear-option="git reset --hard; git clean -xdf"
alias gno="git-nuclear-option"

And then did the cross applying knowledge thing that new energy brings, I deleted the copy of .custom_bash from my home directory and symlinked it in.

ln -s ~/Documents/code/osx-basher/..custom_bash .custom_bash

Now I can work where I want to work and updates to my bash scripts will be automatically available to be sourced or the next time I open Terminal.

sources:

Comments