Posts filed under 'Ruby on Rails'
This is one of my very favorite ruby tricks that I use every day:
irb(main):007:0> a = [1, 2, 3]
=> [1, 2, 3]
irb(main):008:0> x, y, z = a.collect{|i| i * 2 }
=> [2, 4, 6]
irb(main):009:0> x
=> 2
irb(main):010:0> y
=> 4
irb(main):011:0> z
=> 6
May 23rd, 2013
Is comparing software engineering to a career as an artist way off base? What does the term ‘disruptive innovation’ mean to you?
One of the basic tenants of wisdom in The Artists Way is to take good care of yourself. This book is known in the art community as a guide toward unlocking creativity. I have seen these same strategies espoused when folks discuss how to enhance productivity.
What the hell does becoming a more creative person have to do with productivity and becoming a better programmer? I guess that depends upon your definition of ‘better’.
No one expects a composer to sit at the piano 60 hours a week churning out symphonies. Prolific writers don’t sit at their desks for endless hours either. The idea is ridiculous.
Well documented is the fact that productivity goes down when the work week exceeds 40 hours. Programming is hard mental work and sitting for prolonged periods of time doesn’t help either.
I have spent the last few years exhausting myself trying to “level up” as a rubyist. I can honestly say that my best work and ah-ha! moments occurred when I was awake and refreshed. And when my mentors were awake and refreshed as well.
One of my favorite exercises from the book is The Artist’s Date. It’s a once-weekly, festive, solo expedition to explore something that interests you to spark whimsy and encourage play.
How many times have you solved that vexing problem the moment you stepped away from your desk? When do your best solutions pop into your brain? When you are tired, beat down and depressed?
Thanks to Luminosity, I have first hand, tangible evidence that my brain improves with a regular diet of sleep, creativity and connection with my family.
This is the part where I share my personal brain performance index starting from a deeply stressful, sleepless period in my life to a much happier place. These are sans numbers of course but you get the idea…

This success is due to a strong effort on my part to truly seek out work life balance. I’m a better mom and a better programmer today. What steps have you taken in your life to not only become a better and more productive programmer, but to become a better YOU?
March 24th, 2013
Here’s an excellent post by Amanda Blum discussing the latest Women in Tech tragedy. I call it a tragedy because people got hurt and damage could have been avoided every step of the way but instead spiraled out of control.
Standing up about women’s issues is hard. Choosing which issues are worthy of fighting the good fight and how best to handle a situation are not always obvious. It’s a touchy subject. Folks are nervous.
Sometimes the pendulum has to swing too far in the other direction before things right themselves. Was her public response an overreaction? Christie Koehler makes a good point in a recent post Bold IdeasUttered Publicly: “…as someone not part of the dominant social order you have limited options for calling attention to transgressive behavior.”
Read the entire post for a thoughtful explanation of what that means, but my take (and from personal experience) is that it’s really, really hard for a minority to speak up directly.
Let’s be honest, when was the last time you called someone out for bad behavior to their face?
Regardless of whether you side with Adria or with how she handled the incident, all can agree that things definitely got out of hand thereafter.
Honestly, I feel bad that someone was fired over something that could easily have come out of my own mouth but it’s the subsequent nerd range and death threats against Adria that make me even more afraid to speak up (about anything) than I was before.
As a dear male colleague said to me, “Why can’t we talk openly about these things without it exploding?”
March 22nd, 2013
I can already tell that .not is going to be my new favorite thing in rails 4.
i.e.
Article.where.not(name: "Hello")
That is all.
March 19th, 2013
Since I’ve been wanting to try out CanCan and Twitter Bootstrap this holiday, I spent a few hours creating a silly game called Recycled or Not.
My app was generated with Rails Apps Composer. The rails_apps_composer gem installs a command line tool to assemble a Rails application from a collection of fully-tested “recipes.”
It’s too bad the core recipes don’t include MiniTest, although this is a option when creating recipes from scratch. And the core example recipes use Cucumber which has fallen out of fashion around here of late. But other than that, I really loved using this tool because it allowed me to get started with the features of my project in a snap.
In addition, I enjoyed working with Devise, Rolify and CarrierWave. But I think my favorite discovery was that the load_resource method from Cancan will set up a before filter in your controllers which loads the model resource into an instance variable for you. Love that!
January 1st, 2013
Dan Pickett, who I think is an awesome rails dev and truly outstanding person, posted a link today about the show MasterCrafts and how it relates to startups.
Well, this kind of stuff really speaks to me. And it put me in mind of lyrics from my favorite composer.
Bit by bit, putting it together
Piece by piece, only way to make a work of art
Every moment makes a contribution
Every little detail plays a part
Having just a vision’s no solution
Everything depends on execution
Putting it together, that’s what counts!
Ounce by ounce, putting in together
Small amounts, adding up to make a work of art
First of all you need a good foundation
Otherwise it’s risky from the start
Takes a little cocktail conversation
But without the proper preparation
Having just a vision’s no solution
Everything depends on execution
The art of making art
Is putting it together, bit by bit
Making art is HARD. But so worthwhile.
August 30th, 2012
if a ^ b
What the hell is that carrot doing there? ….It’s an “exclusive or”.
It’s the same as saying:
(a && !b) || (!a && b)
which also means…
a | b |
0 | 0 | f
0 | 1 | t
1 | 0 | t
1 | 1 | f
Damn, useful… sometimes.
August 20th, 2012
Just came across this blog post randomly… love it when I come across tidbits like this.
Although, &&|| might actually be more useful than Billy Baldwin. Just sayin’.
June 8th, 2012
Nola Stowe, Jennifer Stander, Liz Cortel, and Desi McAdam are the originators of the DevChix website where women programmers meet virtually to support one another in one of the best careers in the world!
I find myself constantly referring women to this wonderful community and if you don’t know about it… you should!
Over the years, I’ve watched this community grow and I’m so proud to be a part of it. It’s one of the few sites where you can find truly hardcore technical, accomplished women… and ask their advice. You’ll find mentors, a new job, speaking opportunities, and role models.
These aren’t a bunch of craggy, stiff, feminist man-haters… (seriously, no one wants to hang out with those party poopers)… These are cool, fun, DevChixen who love to code and can hold their own against any “bros” out there.
May 28th, 2012
I’ve mostly been MIA this past year on this blog and in the community while I’ve been focusing on “leveling up”. But sadly my endeavors in the community have suffered.
I have either led or participated in the various incarnations of ruby women’s groups in town for the past few years. With toddlers of my own and a husband who works in the evenings it’s been tough keeping something going.
But I’m thrilled to see a passionate group at BostonRB that are working on ideas and events directed at growing and diversifying the ruby community.
It would be really wonderful if there were more local women adding their voices to this conversation.
Checkout the Google Group here: http://groups.google.com/group/bostonrb-…
May 25th, 2012
Previous Posts