Engineering Empathy & Number Palindromes
I hope my previous two posts have made it clear that DBC is about a lot more than just learning to code. Every Wednesday we have a 4 hour 'Engineering Empathy' session, known by some as 'Touchy-Feely Day'. The basic (perhaps 'surface' is a better word?) rationale for EE - if you were to treat DBC as merely a coding program - is that to work successfully as part of a team of software engineers, you need to be able to interact with your teammates in a healthy, productive, and positive way.
But DBC isn't just a coding program.
Everyone dug really deep in our session this morning, and I can't describe it as anything less than intense. Steve and Shereef led us through a series of exercises that explored the way we perceive ourselves and others when we interact, forcing us to examine our prejudices and assumptions. We experienced what it might be like if we collectively decided to start trusting and loving each other, and what it might feel like to be comfortable and confident in the knowledge that everyone around you trusted you and loved you.
I recognized in a subsequent reflection session that my normal tendency would be to express skepticism around exercises like these, probably adopting some kind of 'too cool for school' angle, but I'd already swallowed the DBC pill, and I totally bought in- and I'm really glad I did. The exercises were fantastic- they brought out an incredibly powerful sense of casual, unshakeable intimacy with our fellow Boots in a profoundly positive way. I could sense the entire tone of the room change as we proceeded deeper and deeper into the exercises- and this occurred in a room of sixty people- keep in mind that I'm still learning half of the cohort's names.
At one point, Steve said something along the lines of 'recognize that every individual around you has a totally unique and unknown life experience, completely different than your own'. That really clicked for me. For as long as I can remember, I've tried hard to recognize that I've had an incredibly unique life experience, and that I would do a disservice to myself and others were I to assume that anyone else's life experience has been any less profoundly unique than my own. I don't always succeed in practicing this principal, but I hope that going forward, I can keep myself aware of it a little more often.
There's so much more to say about this morning's experience, but I'll wrap it up with this: in addition to everything I was feeling about myself and my fellow Boots, I also felt myself longing to go through the experience a second time with all of the other people in my life. I take a lot of pride in genuinely loving everyone I choose to surround myself with, and yet, despite the immense love I feel for all these people, my sense of intimacy in these relationships often comes up short. For how many of my friends do I know their dreams, aspirations, and fears? For how many of them do I know what they truly love? What drives them? What scares them? What keeps them awake at night, and what gets them out of bed in the morning?
I touched on the sense of reawakening I'm experiencing in my last post, and I choose that word intentionally, because I think at one point in our lives, even if it was early on, we entered this world sharing all these things, loving and trusting one another because we didn't know any better, until we were taught otherwise. Part of this reawakening is coming to an understanding that there are ways wholly within our grasp to get so much more out of our lives and our relationships than what we choose to settle for. I'm really looking forward to the next EE day, and I hope that I can find a way to bring what I'm learning from these experiences into those relationships that exist outside of DBC.
Oh sorry what? Coding? Yeah we did some of that today too. Powers and I paired together for the afternoon and since we'd both already gone through most of this week's DBC assigned challenges, we decided to try a Project Euler challenge. The objective:
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 x 99.
Find the largest palindrome made from the product of two 3-digit numbers.
Alas, I have forgotten to save the code as a gist, so it's currently occupying space on the desktop of one of the computers in the office, but the logic of our solution can be summed up pretty easily:
Create an array of palindromes between the lower limit (100 x 100) and the upper limit (999 x 999). A number is a palindrome if number.to_s.reverse == num.to_s
Reverse the array of palindromes so the largest palindrome is at the front of the array (so we can return the largest palindrome immediately rather than checking from the smallest one until we determine the largest one).
For each palindrome in the array of palindromes, divide that palindrome by all the numbers between 100 and 999. If a number divides into the palindrome and produces an integer (not a number with a decimal), and if the quotient of that operation is a 3 digit number (we tested this by seeing if the range (100..999) included the quotient), then return that palindrome as the answer, cause it's the biggest!
If I remember, I'll try and upload our code tomorrow. It ended up getting somewhat convoluted toward the end because as an extra challenge, we tried to build a program that could take the digit length of the numbers you wanted to test for as a parameter and then find the largest palindrome. For instance, if you entered "4", the program would return the largest palindrome produced by two 4 digit numbers. (Turns out that's not so easy...our program conked out after a few minutes of trying to figure that out, I might attempt to refactor our code tomorrow and see if we can get it to actually determine an answer).
As with so many of these problems, someone else often has a better way of doing it. Once we solved the problem with our dense program, we found this simple, elegant solution in the Project Euler answer pages (only unlocked once you submit the right answer- no cheating allowed...anymore!). Something to aspire to:
https://gist.github.com/d0b504641b94883d2b53