Learning how to program iOS – Part 1

I’ve been wanting to learn how to develop iOS applications since the iPhone first came out, not because I have the perfect idea for an app but mainly just curiosity. I’ve dabbled a bit here and there, using some of the Apple documentation (which is pretty awful for those just starting out), but it’s just so graphically oriented, and that is so not my thing – that’s probably why I never really did it. I almost took an in-person class starting a couple of weeks ago – there’s something about having to actually show up at a specific place and time that’s very appealing to my procrastinational nature, but I was told by other iOS developers that it didn’t have a good syllabus and that it would teach me the bare minimum and also how most iOS developers DON’T write iOS apps so I skipped.

However, I’ve got a client with an existing iOS application that needs work, so now’s my chance to really jump in with both feet. I’m using a book I just bought: “iOS Application Development in 24 Hours”. It was the newest and highest rated book available (just released actually), and I have been told that Apple keeps changing Xcode and the libraries from version to version and sometimes they’re not backwards compatible, so it’s best to be developing with the latest information and the latest versions.

The first chapter was some good starting information about the the devices themselves, including the Retina display, which if you were using an earlier book, would not have mentioned. It also had some information about signing up for the iOS developer program through Apple, though not nearly enough in my opinion.

Congratulations Seahawks but there are some holes to fix

Let me first say, congratulations to the Seahawks! It was a great victory, a confidence-building victory, and I think it’s big to get that playoff road win under your belt. But I don’t think there was anyone out there that wasn’t sweating it out until late in the game.

You want the quickest of summaries? The Redskins had a 129-9 lead in yardage in the first quarter. After RG3 was injured, the Seahawks outgained the Redskins 371-84 in the remaining three quarters. Yet for as much as the Seahawks outplayed the Redskins after the first quarter, they didn’t actually take the lead until 7:08 remaining in the 4th quarter.

So let’s discuss some of the mistakes that were made to try and improve on their future playoff performances.

Giving up touchdowns to your homefield opponent on their first two drives is just a recipe for disaster. Good teams will put their foot on your throat and never let you up – it simply can’t be done. The Seahawks were lucky that RG3 was injured when he was, because it really limited the offense of the Redskins for the rest of the game, and obviously you cannot count on that happening each and every week. Had they put in Kirk Cousins at the start of the third quarter, and had they scored any additional points (touchdown or field goal), we might be talking about the Redskins moving forward instead.

I would say the most crucial play in the game was the shoestring 12-yard pass to Miller for the first down. If they don’t make that play, they give the ball back to the Redskins and who knows what happens at that point. That could have been where the blowout started. Instead, the Seahawks get the first down, the drive continues, they keep their defense off the field and they get a field goal and some points on the board. This, to me, was where the momentum shifted. The Redskins were 4-and-out on the next series and the Seahawks scored a touchdown after that. Probably the second-most crucial play was Lynch’s recovery of Wilson’s fumble. Again, it was right in the middle of the momentum shift, and solidified that shift towards the Seahawks.

The most glaring errors to me were in the red zone. One touchdown on six red zone possessions – that just isn’t going to cut it in the playoffs against the NFL’s elite. They had problems with this in the beginning of the year, and they resolved them from the mid-point on, but it really came back with a vengeance in this game. They need to fix this going forward.

Wilson had a solid day, but there is definitely room for improvement. He made some huge runs to extend drives, some great passes, made some clutch downfield blocks, and showed incredible poise and leadership. But he missed some wide open receivers, and took several unnecessary sacks while being chased when he had the opportunity to get rid of it.

In the end, the Seahawks outplayed and outcoached the Redskins. When the Seahawks went down 14-0 in a hostile road environment, they changed their strategy and found a way to win. The Redskins could not find a way to overcome the adversity of  RG3 not being able to perform.

Can the Seahawks win in Atlanta? Absolutely. I’ve always felt the Falcons were a paper champion this season. Per ESPN: “Schedule is everything in the NFL, and the Falcons benefited by playing the league’s easiest schedule. They won 13 games against a schedule with a .422 opponent winning percentage, a schedule that featured teams with combined records of 108-148.” I challenge you to go back and look at their schedule this year – who have they beaten? Sure, they beat Denver early in the year before the Donkeys got rolling and Manning threw 4 picks, but that’s about it. And none of the teams they’ve played this year had a good defense (except Denver).

That’s not to say that Atlanta won’t score points – I think they will. But I think they’re going to find playing against a top-rated defense quite an eye-opener, even if Clemons is out. Wilson is probably going to need a 3TD+ (passing/running) performance in order to get by the Falcons. 187 passing, 67 rushing and 1 TD is not going to cut it in the playoffs.

There are intangibles to this game – travel and pressure. Let’s not discount that the Seahawks having to travel across the country for the 2nd time in two weeks to play in a charged up NFL playoff game. It has to be incredibly exhausting and confusing to your body to change time zones repeatedly while you’re trying to recuperate and prepare for the next game.

However, there is a tremendous amount of pressure on Atlanta to perform. They’ve had an incredible regular season, they’ve been scoring a lot of points, they secured the top seed, they’re playing at home, they are expected to hold serve at home and advance. But I just don’t see it happening – I think they run into the buzzsaw that is the Seahawks, and they learn what a real NFL defense is comprised of. I think Wilson has a much better game, the defense starts out much better and the Seahawks punish the Falcons from start to finish.

Prediction – Seahawks: 34, Falcons: 20.

Providing gun ownership to the public

I’ve held off on writing any political posts because I think a lot of people’s eyes gloss over, but I just can’t hold back on this particular issue: public dissemination of gun holder information.

My first reaction to this whole kerfuffle is: why on earth is any of this information widely available to the public? What the hell is going on in New York!? Why would any gun holder allow this law to be passed? But then I realized that NY is much more restrictive about guns than the “wild west” coast.

Even still, something about this really bothers me. I just don’t see why this information should be made public. What purpose does it serve? What’s the use case? So that you can check to see if your neighbor has a gun? Why is it any of YOUR (generically speaking) business whether your neighbor has a gun? If you really want to know, you can ask them – and the neighbor can decide if he/she wants you to know. It’s not your business to know.

Does it make you safer in any way to which of your neighbors has a gun? I hear the excuse, “I want to know who has guns so I can make sure my kids don’t go there”. What’s next, public maps on which houses have pools, trampolines, matches, small objects, solvents, alcohol, tobacco, and pornography? It comes down to you having to be a parent. You have to know where your kids are, who they’re with, and what they’re doing. If keeping your kids away from guns is that important to you, you will discuss your concerns with the parents of the kids play with, and if there are guns in the house (that the neighbors will cop to), then you take steps to deal with it. Incidentally, if your neighbors (as fellow parents) can’t or won’t tell you the truth about their guns, you probably have bigger problems to deal with.


Moving from Apache to Nginx – wow!

I have been meaning to switch this site from Apache to Nginx for a while now – actually, to tune this website a bit better as a whole. I’ve been using various tools (Google PageSpeed, http://www.monitor.us, http://www.pingdom.com) to track the results and I thought I would recap how things have gone.

When I first started this project, I had a plain vanilla WordPress with no optimization running a handful of plugins on an old Dell 1U Solaris server using Apache+mod_php. PageSpeed showed my initial score to be 75. An infrequent monitor.us performance monitoring was telling me the average response time was about 650ms as a baseline.

My first step was to resize all the “system” images (NOT the gallery images). This bumped the PageSpeed score up to 77.

I tried installing W3 Total Cache, but the whole install was a mess. It wants to run to /wp-content, requests 777 permissions, etc. I had problems with the page display getting messed up, even after clearing the cache. Even though the pages were messed up, the PageSpeed score went to 81. I’m sure I could have figured how to actually get it up and running the way I wanted, but I wanted to do all this by hand anyway, so I scrapped Total Cache and moved on – back to Page Speed score 77.

Next up – enabling mod_gzip on Apache. PageSpeed score increased to 81 – not bad for a simple modification.

I was going to try and install mod_pagespeed from Google, but I had no luck getting it to compile with gcc under Solaris. I love Solaris, but I swear I need to switch to Linux one of these days. None of the new software compiles under Solaris. My list of stuff I can’t get to compile is long: mongodb, mcrypt, mysql-5.5.x, newrelic – and those are just the relics sitting in my /usr/local/src directory that I haven’t deleted in frustration.

Next I installed some object caching via APC, but the PageSpeed score stayed at 81. Adding sendfile and MMAP via the Apache httpd.conf bumped it up to 83.
It was at this point that I started a trial of Pingdom to track the page response times on a more granular level. However, Pingdom was showing page response times of around 975ms, which surprised me since monitor.us showed a drop from 650ms to around 587ms. I wish now I had a baseline number from Pingdom before starting any of this, but oh well.
Next up was the big change – moving from Apache to Nginx+php-fpm. After getting everything configured and tested, I switched. WOW! PageSpeed reports 94, and Pingdom reports response time dropping from 975ms to 237ms (see graphic). Talk about immediate results!
There’s more tuning I plan on doing (like implementing a CDN via S3), though I think all the big gains have been achieved. I’ll update the blog as I get the results.

Pho Fuchsia in Pioneer Square

I’ve been on quite the “office shopping” trip lately, first trying out Office Nomads for a couple of months (details here), and now here at SURF Incubator. Part of the excitement of a new place is trying out all the nearby restaurants. There are quite a few options so far, but I’ve struggled to find a good pho/banh-mi joint close by (I need to explore the International District much more).

But I think I’ve found a very good stand-in for my pho cravings, Pho Fuchsia. I was pleasantly surprised at a solid chicken banh mi – not as good as Pho Mimi on Aurora, but better than anything else I’ve tried down here. And the pho tai (rare beef) was delicious. Broth was dark and flavored well. Beef was good quality and accoutrements were acceptable.

Service was solid, although the server did warn me that it gets massively busy during the lunch rush (I’m not surprised).

At any rate, this will probably become a once or twice a week spot for me – I definitely recommend it.

How to process your RSS feeds quickly and easily

This blog post has been a long time coming, but better late than never!

I’ve talked to a lot of people who say they can’t keep up the flood of information these days, so I wanted to share my system for processing RSS feeds. I’ve got about 600 (!) active feeds that update at various intervals, but it’s certainly a chore to keep up with them.

I use my iPad 3 with Feeddler Pro to quickly scan feeds. I’ve tried almost every RSS feed reader on the iPad, and Feeddler Pro’s interface is the best for skimming/scanning feeds. It interfaces with Instapaper (another one of my favorites) for saving a long-form article in the cloud that I want to read later (on my iPad, my iPhone, my laptop or my desktop).

However, sometimes there are articles that I specifically want to open and read on my desktop (or laptop), and saving in Instapaper doesn’t quite work for me. Luckily, Feeddler Pro’s interface allows you to “star” (or mark as favorite) articles trivially easy. So you can zip through your feeds, starring anything that’s interesting.

My problem was I never remembered to go back and dig out those articles from the Starred Article section.

So I wrote a script (https://github.com/heybige/greader) to log in to my Google Reader account, grab (and delete) all the starred URLs and send them to me in an email via a crontab every day at 11:59pm:

59 23 * * * ( /usr/local/bin/daily.php )

For those of you technical enough to understand crons and PHP, enjoy!

Bad ass Blue Angels photos

[nggallery id=3]

Better late than never – my Van Halen pictures

[nggallery id=1]

I hear some people complaining about it, but god damn I loved it! I feel incredibly fortunate that I got to see them before they shut down the tour..

[nggallery id=2]

And The Black Keys 3 days later.. my new favorite band – horrible seats, but all great songs.

Nikon D4 – you will be mine!

This article (D4… GRIZZLY Proof, with killer images!) just makes me want a D4 all that much more.. It will be mine! Oh yes, it will be mine!

Jersey’s Sports Bar in Shoreline

Jersey's Short Rib SandwichThere are no good sports bars in North Seattle. Hell, there aren’t even any really good sports bars in Seattle, at least compared to San Diego, although there are some kick-ass soccer bars (San Diego has those too though).

But one bar that I really wish more people went to is Jersey’s Great Food & Sports at 1306 N 175th St in Shoreline. It’s a funky little place tucked away off Aurora on 175th, but man they’ve got some really good food!

This is a picture of their Short Rib sandwich with coleslaw on top – I’m telling you it’s frickin’ awesome! Love the cibbatta bun especially, and the fries are addicting. This ain’t no Sysco food wagon.

And they’ve got a Chipotle burger that’s just unbelievable. Good food, cheap drinks and beer.. not sure why more people don’t come here? Especially during football season. Especially in the North End where there ain’t shit-all to hang out (what, Bleachers? Please.)

If you read their Yelp reviews, you’ll see everyone typically loves the food, but dislikes the service, at least in the restaurant – wouldn’t know, I always sit at the bar, or on the bar, or near the bar, just to make sure I get good service.. you know, the hard-to-ignore jerk?

I do think they’re kind of floundering a little bit – are they a family restaurant? a sports bar? a disco/nightclub thing in the evening? Sheesh.

But in the end, the food is damn good, and if you need a place to eat and watch a sporting event, then you should keep Jersey’s in mind!