This weekend’s assignment at the Flatiron School involved watching a slide deck on a technical Ruby topic on Speaker Deck. It’s a great website for sharing presentations online that was created by the wizards at GitHub.

I chose a presentation by Anatoli Makarevich called “Refactoring. Ruby Edition.” As a student at the Flatiron School, we had recently covered refactoring in class and thought it would be entertaining to delve into the formal process.

Refactoring, per Wikipedia:

According to Wikipedia, refactoring is a “disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.”

English, please?

Refactoring 101:

The purpose of refactoring is to reduce complexity and improve readability, maintainability, and extensibility. When a developer refactors, he/she is not adding new features. Instead, the developer is writing tests, changing code, and removing complexities.

Pepé Le Pew? No, it’s “Code Smell”

One of the topics covered in the slide deck is “code smell,” a phrase coined by Kent Beck (follow him on Twitter @kentbeck). Code smell is “any symptom in the source code of a program that possibly indicates a deeper problem.”

The Refactoring Cycle:
  1. Find code smells

  2. Check test coverage

  3. Write new tests, if needed

  4. Refactor

  5. Change code

  6. Ensure that tests pass

  7. Automate complexity analysis

My Favorite Slides:
  • “to grow fast, you must grow right”

  • reFACToring != reHACKing

Refactoring, In Real Life

One week into class at the Flatiron School, I briefly caught up with my cousin, Rajiv Makhijani. Rajiv is a software developer at Hulu and is currently developing an application for Google Glass. He was ecstatic that I’m learning how to code and making a career switch (read here). He mentioned that he was looking back at code he had written less than a year ago and was amazed at how verbose it was and how much better he could have written it now. It’s comforting that other seasoned developers aren’t spewing out perfect code and they too, must revisit older code.

The greatest takeaway from this slide deck is that we’re not reinventing the wheel. Instead, we’re improving upon its design. As with all things tech, code isn’t written in stone. It’s digital, ever-changing, and increasingly elegant.

Digging Refactoring? Read More About It, by Martin Fowler:

A Coding of Age Story: Why Coding?

I started to learn how to code for a few reasons other than the gems of wisdom that are floating around the tech blogs — i.e. “everyone should learn how to code.” I’ve always wanted to make something, but I didn’t believe I was capable or had the tools to do so. The misconception stemmed from the idea that all computer programmers are like my cousins, who tinkered with terminals since their pre-tweens. One works at Google, one at Hulu, and another designs Android apps. Two are younger than me. You could call me intimidated.

When I realized I wanted to embrace my attraction to the technology space, I began to frequent many Los Angeles tech events hosted by co-working spaces. As you’d say in beer pong, Silicon Beach was “heating up.” At one memorable event — a women in technology panel — I met Eva Ho from Factual, a location platform and data mining company. One of her messages to the audience (of both genders) was to stop making excuses about not learning to code: it isn’t too late and the resources are plentiful. A seed had been planted.

It took another month for me to realize that if I was unhappy as a Big4 tax accountant, that I would have to make moves. It didn’t matter how cool it was that I worked on the corporate tax returns of major film studios and high net-worth actresses — Twilight, anyone? In February, I gave my firm an one-month notice and soon enough, I entered full-time funempoyment.

During this so-called funemployment, I attended many more events and live courses. I read a lot of books. I also explored free resources such as Codecademy and Coursera. I wasn’t satisfied. As I kept exploring programming languages, I realized that my learning style would benefit from the community and the immersion of a 12-16 week course. I did not imagine that my next step would be going back to school. That was, until I found the Flatiron School.

Coffee: Inspiration Comes From Everywhere

On Monday, my friend sent me a screenshot of a Facebook advertisement for the City of NY. It consisted of Mayor Bloomberg’s commencement speech at Stanford University:

I believe that more and more Stanford graduates will find themselves moving to Silicon Alley, not only because we’re the hottest new tech scene in the country, but also because there’s more to do on a Friday night than go to the Pizza Hut in Sunnyvale,” he said. “And you may even be able to find a date with a girl whose name is not Siri. Stanford graduates thrive in New York City–because both places thrive on innovation and entrepreneurialism.

It made me chuckle, since I made the move from the Beach to the Alley, three weeks ago today. It reminded me of a NY tech resource called We Are Made in NY, where you can find an abundant list of job postings from startups, educational resources, and volunteer opportunities in the technology space. Although I’m in no position to look for jobs until closer to the completion of the course, I playfully browsed the openings for developers.

I came across one startup called Craft Coffee, a monthly, curated coffee subscription service. Perks for developers include an one-week trip to a coffee-growing country, $2,500 on preferred hardware, and another $300 on coffee-making hardware. Their culture statement boasts that they encourage developers to “blog, open-source, and contribute to the NYC Ruby Community.”

First, I’m an espressophile. If you’re cognizant of my coffee addiction, you’ll know that:

1) I care deeply about microfoam and post many pictures of latte art.

2) Before moving to NY, I assembled a list of coffee houses to frequent. The closest ones to Flatiron School are Birch Coffee on 27th and Stumptown Roasters at the Ace Hotel on 29th.

3) I’ve been drinking coffee since I was six months old. Needless to say, I’m shorter than both of my parents.

All perks aside, it reminded me how special the opportunity is to learn at the Flatiron School. In ten short weeks from now, I will be able to do something that I really enjoy. That too, I’ll be able to work for a company whose product or purpose aligns with my interests. With Flatiron School under my belt, I hope to join the workforce as a junior web developer at a company with a strong emphasis on mentorship and continued learning.

Community: Embrace It

The technology community is akin to that of the food blogger community. For two years, I blogged under the handle “foodismynish.” Get it? Niche, A-nish-a? I wrote restaurant reviews, was invited to press-only events and dinners, and got to mingle with celebrity chefs. I was even a judge at the LA cupcake competition. Ever wondered where my 2,000 Twitter followers have come from? Now you know.

I often reflect why I enjoyed being an (then, active) food blogger. I had a creative outlet. I was creating content. I was a maker and not just a consumer. These are all traits that I value about developers. Programming is creative. In Ruby, you have numerous methods to manipulate code. Food bloggers open source content via well-lit food porn and wax poetic about the ingredients in a dish. Developers open source code and defend their choices of programming languages and environments on platforms like Reddit of Hacker News. In both cases, there is discourse. In both cases, they embrace social media.

It’s important to become a part of the community by contributing to it via open source. In my opinion, it’s equally important to not be selfish with one’s education or those of others. If you have a skill to teach, share it with someone. Simply put, you’re paying your education forward.