Break Time

When I first started this blog many years ago, my intention was to publish here regularly. I have never kept that schedule. My posts are sporadic at best. I’m often quite busy and when push comes to shove writing hasn’t been as big a focus for me. Sometimes I take my notes in paper journals, other times just in my head. Well, I’m going to make an effort to return here. Make an effort to contribute more. I’m also going to make an effort to consolidate my different personalities here. I have a bunch of websites where I post photos. I have a several places where I post personal thoughts. I’d like this place to be a hub for all of it. Hopefully you will be hearing a lot more from me soon.

Break time… is over. 

Villanova, Me, and Tech

Not sure about how many of my fellow Villanova Alumni are working as a software or hardware engineer in Silicon Valley. I know a few. One of my friends, Arts & Sciences 2005 is out here working on his own start up. Another ECE department grad is working for another software/hardware deal on security in SF. Not to mention John Hennessy, president at Stanford University.

In the mail today was another request to donate to the Alumni Fund and send in a note about where we are and what we are doing. While there is merit in sending this to the university, posting it here serves the same purpose in my book.

I’m working on as a senior software engineer for a start up RelateIQ that was recently acquired by Salesforce. I work on our iOS clients. Previous endeavors include Flywheel Software, Motorola Mobility, FactSet Research Systems, and Bloomberg. As an engineer I have experience with backend development in raw C++ and frameworks like Rails and NodeJS. I’ve helped develop a front end framework MontageJS, and have been working with iOS for the past two years or so.

Aside form my contributions to the tech world, I’ve been coaching cheerleading for San Francisco State University for the past four years, going from assistant to head coach, back to assistant coach. Before that I was at Woodside High School (which appeared in Waiting For Superman). I also cheer and help out at Rebel’s Elite Cheerleading Gym in South San Francisco.

In addition to coding and cheering, I can be found rock climbing at Planet Granite, biking on the streets of the bay, swimming in any pool I can find, eating out at local restaurants, or taking pictures of whatever happens to be in front of me.Not sure about how many of my fellow Villanova Alumni are working as a software or hardware engineer in Silicon Valley. I know a few. One of my friends, Arts & Sciences 2005 is out here working on his own start up. Another ECE department grad is working for another software/hardware deal on security in SF. Not to mention John Hennessy, president at Stanford University.

In the mail today was another request to donate to the Alumni Fund and send in a note about where we are and what we are doing. While there is merit in sending this to the university, posting it here serves the same purpose in my book.

I’m working on as a senior software engineer for a start up RelateIQ that was recently acquired by Salesforce. I work on our iOS clients. Previous endeavors include Flywheel Software, Motorola Mobility, FactSet Research Systems, and Bloomberg. As an engineer I have experience with backend development in raw C++ and frameworks like Rails and NodeJS. I’ve helped develop a front end framework MontageJS, and have been working with iOS for the past two years or so.

Aside form my contributions to the tech world, I’ve been coaching cheerleading for San Francisco State University for the past four years, going from assistant to head coach, back to assistant coach. Before that I was at Woodside High School (which appeared in Waiting For Superman). I also cheer and help out at Rebel’s Elite Cheerleading Gym in South San Francisco.

In addition to coding and cheering, I can be found rock climbing at Planet Granite, biking on the streets of the bay, swimming in any pool I can find, eating out at local restaurants, or taking pictures of whatever happens to be in front of me.

Custom UITableViewCell Layout

At work we were trying to create a custom UITableViewCell. We wanted something that looked like this:
tip cell

Here are some of the factors that made this problem more difficult:

  • Our one custom cell was in a UITableView of regular cells
  • The fonts for each of the items in the cell were pretty consistent with the rest of the table view
  • Like every other cell, we wanted to it to be indented based on cell.separatorInset

I looked at several ways to approach this. I tried using a custom table view. I tried subclassing a UITableViewCell. I finally landed on trying to override the tableView:willDisplayCell:forRowAtIndexPath: and it is worth explaining why.

First approach was getting a custom view in place. I turned this approach down because my view really wasn’t that custom. It was actually a tablevViewCell. It actually looked remarkably close to a standard table view cell. It had a text (in this case an NSAttributedLabel), and a detail text (the amount). Putting in a custom view would have required hard coding the layout to match the rest of the cells in the table and that seemed wrong. I also ran into a bit of confusion around getting my separator to be the correct size.

Then I tried subclassing the UITableViewCell. I know subclassing is frowned upon, but I only wanted to override layoutSubviews. I took the accessory view and tried and moved it to an offset of the tip label. I ran into a problem where the textLabel and detailTextLabel font color was being set to gray by the fact that I had userInteractionEnabled set to NO. If that sounds crazy, it should. Here’s a picture of what I saw:

cell

After overriding UILabel and trying to see who was calling setColor on it, I came up with nothing useful. This felt like the wrong approach.

Lastly, I looked at tableView:willDisplayCell:forRowAtIndexPath:. When you first get into this method, the cell’s subviews frames have yet to be calculated. I called [cell layoutSubviews]; which is costly, but get the dimensions I needed. Inserting the the editView after the label is then simple math. Here is what the code roughly looks like.

https://gist.github.com/zacharyc/8141791.js
gist

The downsides of this approach is the double rendering of the cell, but the benefit is that we get to keep our cell as close to factory as possible. In our case, we have one custom drawn cell on the page, so the performance doesn’t take that big of a hit.

There are other approaches to this problem, namely Mensa Smart Tables, but including another library seemed like overkill for what we needed.

I Work For Flywheel

Over a year ago I switched roles in the software engineering field. I started working as an iOS developer for a company called Flywheel. We are a start up in the transportation industry. Our goal is to provide safe, reasonably priced rides from professional drivers with the entire hailing and paying process handled from your personal mobile device.

flywheel logo

The goal is to make the experience as seamless as possible for the end user. You take out your phone, find a pickup location, the app hails available cabs, and you are notified when a car is on it’s way. When you get to your destination you can adjust the tip or just leave your default. Your credit card is automatically billed so you can worry about what you need to do next.

Making this process simple is a lot more tricky than it sounds. We’ve been working hard to make the experience better for the passenger and there will continue to make improvements over the next couple of months.

We have a blog that covers our feature set on a higher level as well as current promotions. I hope to cover some of the more interesting technical challenges and solutions we have run into.

Screening The Past

It’s been over a year since I left my roll at Motorola working with a team of very talented web developers on Montage. During my time with that group I worked on a side project for automated testing called “Screening”. I wrote a couple of posts (or at least one post) about chromedriver which we used to power screening. Still, one of the big personal accomplishments for me during that time was being published at Ars Technica. I was one of three authors on a post about the tools we were working on. The project has since been abandoned, but you can read about it here.

Amplifying Education, $5 fifth of the month

This charity is a bit more specialized in the past. I tend to rally around Education, and this is tied to that, but is more directly associated with Dispath, the band. They make great music and I’ve been a huge fan for about 2 or 3 years and seen them in concert several times. Along with their performances, they believe in community service. The current charity is called Amplifying Education, and they volunteer while they are on tour. The money raised is distributed to several worthwhile educational funds. So, here is Amplifying Education, pass it on.

Five Dollar Fifth – Podcasting

I saw a link on Daring Fireball the other day about the EFF going after a case involving royalties on Podcasting. This whole patent troll thing has gotten out of control and to think that all podcasts might be subject to a fee just for existing is beginning to scare me. There was also an interesting show from This American Life about it.

Bottom line, this month, after taking a little brake, I’m back with donating $5 on the fifth. You can join me at the EFF Help Save Podcasting page.

Harper High School, $5 Fifth of the Month

I’ve been commuting a lot more. Every Monday morning I hop in the car and start with my favorite podcast, This American Life. (Short aside, I got into this show because of piece I posted about here). Three weeks ago I heard the first of a two part series on Harper High School. To say I was moved is a catastrophic understatement.

This American Life chose Harper because they were in their home city of Chicago and last year there 28 shooting incidents with current and former students. The stories of the lives of the students is a strong juxtaposition with my own childhood. They are forced into gangs that are about protection, not crime. The school is the place they feel most safe. And it has been under a special grant to provide great services for these kids. The grant is ending next year, and many of the support positions will be losing funding. They are collecting donations to support these kids.

I did the math with some friends. If two of my friends pay 5 dollars, and two of their friends pay 5 dollars, and the cycle continues, we would only need to have 18 exchanges to raise 200,000 people. If they each payed me $5, we would have $1,000,000.

Please donate $5 or more, and pass on the link.

Donate $5

If you still need convincing, go listen to the PodCast, it’s tough, but worth it.

Five Dollar Charity on the Fifth of the Month

I’ve been talking about this for a while with a close circle of friends. I’d like to start a trend of donating $5 a month to different charitable causes. The goal being if I can get enough people behind the idea, we could make some significant impact to the charitable space. Each month, I’m going to come up with a new charity, and provide instructions for donating to them. I’ll try not to hit the same charity too often, but there are a couple of causes I feel particularly passionate about.

This month I’d like to pitch one of my favorite charities: Charity:Water. They use all money donated to fund water projects in Africa. Providing clean and drinkable water to people who don’t have easy access. I’ve been donating to them for several years. To donate, just go the website and click donate. Fill out the instructions on the site.

If you donate, please leave a comment, message me on twitter, send me an email or whatnot. I’d like to do a follow up on how much we put to each of these charities over time.

Greatness

I saw this on Devour, this video embodies why I train for sports:

The video and the music are compelling, so watch the video, but here are the words:

There are no grand celebrations here.
No speeches, no bright lights, but there are great athletes.

Somehow we’ve come to believe that greatness is reserved for the chosen few, for the superstars.

The truth is, greatness is for all of us. This is not about lowering expectations, it’s about raising them for every last one of us. Because greatness is not in one special place, and it is not in one special person. Greatness is wherever somebody is trying to find it.