Need to display a date in your Rails app? First try:
Time.now.strftime "arrrround %H'ish"
To remove duplication, you imagine a time format initializer. Second try:
Time.now.to_s :pirate
Then you remember the :default localized key. Third time’s a charm:
l Time.now
It formats based on the config/locales/en.yml file:
en:
time:
formats:
default: "arrrround %H'ish"
date:
formats:
default: "arrrround %H'ish"
Dates work, too:
l Date.today
The same system lets you alter the display of “days ago” and “minute from now.”
When running Rails apps with Postgres in development mode, you might notice output like this when running tests:
NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
It’s noisier than you need for day-to-day development. To quiet the noise, you could change a setting in your config/database.yml file:
min_messages: warning
However, we can set this machine-wide instead of project-wide, similar to the global .gitignore file and set noswapfile vim setting.
psql -d rails_app_development
ALTER ROLE <user> SET client_min_messages TO WARNING;
Change <user> to be the user account for your machine.
Bueno.

I’m Jason Draper and I’m a developer apprentice here at thoughtbot in the apprentice.io program. Since the beginning of March it’s been a whirlwind of tests, code and agile development.
It’s no secret that Rails developers are in high demand right now. To offset this issue, companies have turned to training developers from the ground up and then hiring them for their own work or helping the developers find a job elsewhere. Living Social started Hungry Academy. There is also Dev Bootcamp and many others.
So why did I choose apprentice.io?
apprentice.io is heavily hands-on with actual client work. There are no “made up” projects. Sure, as apprentices we all work on our own side projects but during the day, I’m working on client code. Working on code for a client means you must write what the client wants and needs which may not be the same thing. The belief both here at thoughtbot and by myself is that you learn more by actual work.
In addition to hands-on development with client work, thoughtbot offers several workshops throughout our apprenticeship which complement our learning. The workshops give us a chance to go deeper into situations which would not otherwise arise during the course of working with clients. The workshops are immensely useful and an integral part of our training.
I’ve been writing Rails code for a while but I wanted to learn better coding skills from people who knew their stuff. If you’ve done any Rails work at all, you’ve heard of at least one of thoughtbot’s gems or projects. I’ve been using paperclip for a long time and factory_girl is amazing for getting rid of fixtures. So when I decided that I wanted to expand my knowledge, I could crack open their code and see exactly what these guys produce. I knew they had what I wanted to learn.
In Boston and in the Rails community, thoughtbot is well known and respected. I wanted to work for an organization that required a high level of quality in their code as well as their practices, not just a company that had a “one hit wonder” that took them to the top.
Though the apprentice.io program is new, for years thoughtbot has had apprentices (not interns) internally and trained outside developers via workshops.
Learning doesn’t stop outside the office. Boston has a strong tech community and groups such as BostonRB thrive with experienced and new users alike.
What I wanted to get out of the apprenticeship was going from a junior developer to the next level. I wasn’t sure where I wanted to work afterwards so I liked that apprentice.io has very loose employment restrictions. I couldn’t be more excited.

Do your co-workers snicker at your sentence-length shell aliases? I’m here to tell you it’s okay because my aliases border on the Dostoyevskian, too.
Some commands you do a thousand times a day. They deserve super-short aliases:
alias be="bundle exec"
alias s="bundle exec rspec"
alias cuc="bundle exec cucumber"
Like h() or t() in Rails, the more often you invoke a command, the more acceptable it becomes to have a short, cryptic alias.
However, there’s a class of commands I find myself running about 1-20 times a day: interacting with our staging and production environments on Heroku:
# Heroku staging
alias staging='heroku run console --remote staging'
alias staging-process='watch heroku ps --remote staging'
alias staging-releases='heroku releases --remote staging'
alias staging-tail='heroku logs --tail --remote staging'
# Heroku production
alias production='heroku run console --remote production'
alias production-process='watch bundle exec heroku ps --remote production'
alias production-releases='heroku releases --remote production'
alias production-tail='heroku logs --tail --remote production'
# Heroku databases
alias db-pull-staging='heroku db:pull --remote staging --confirm `basename $PWD`-staging'
alias db-pull-production='heroku db:pull --remote production --confirm `basename $PWD`-production'
alias db-copy-production-to-staging='heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging --confirm `basename $PWD`-staging'
alias db-backup-production='heroku pgbackups:capture --remote production'
alias db-backups='heroku pgbackups --remote production'
Here’s where Neckbeard next to you silently pities your Fisher-Price programming style. What self-respecting programmer would type all that?!
Well, through the magic of autocompletion, you never type more than a few characters for each command. They might look goofy, but they’re memorable.
If you’d like these aliases and other goodies, they’re packaged up in our dotfiles.
Then, the next time you feel your pair programming partner smirking over your shoulder, just tell ‘em: “I learned to alias shell commands with Hooked on Phonics!”
Does your Rails app have more than one locale? Is it a pain to edit your internationalized copy?
We’ve heard your requests to better support multiple locales, and are excited to roll out multiple locale support in Copycopter.

You can try out the new multiple locale support in your existing Copycopter-backed apps, read more about how it works, or check it out during a free trial.
You’ll be able to manage the copy for multiple locales, share this responsibility with content experts on your team, and continue to roll out fresh updated copy without the overhead of redeploying your app. Copycopter will continue to hum along, serving up draft content to your development and staging environments while delivering content you mark as “published” to production.
If you already have multiple locales in your Copycopter app, great news! The locales are already in Copycopter, ready for editing. In fact, adding new locales to Copycopter is as easy as adding them to your Rails app. We’re continuing to stick with the Rails I18n API as a solid foundation, and adhering to its use for Copycopter.
We’d love to hear how you are using the multiple locale support in Copycopter. Let us know how it fits into your workflow.
Want to edit live copy in your Rails app without redeploying? Try Copycopter free for 30 days.