New House

May 29th, 2014

Today we are moving. A few days ago, Memorial Day, Shayna and I boxed up the last 6 years of our life in the apartment. The movers are now moving everything to our new house. I am sooo excited for our new house. Since we closed May 7, I’ve spent most of my free time there. Cleaning, fixing things, ripping out the basement ceiling. Work is much more fun when its your own. We bought the house as-is, so there’s several things we were unsure of. For example, the basement ceiling needed to be demolished and fixed – work in progress (thanks Sean!), and the lawn mower was a question mark at first, but last weekend I plugged it in (surprise, its electric) and cut the grass with great pleasure. But the entire process has brought me more deep satisfaction than I anticipated – Looking for houses for months, finding this one, knowing it was what we wanted, getting our offer accepted, getting our ducks in a row for the loan and everything else for closing, then signing the papers and walking away with keys. We still have much more to do, but I am looking forward to coming home everyday to OUR VERY OWN HOME.

Patagona and Buenos Aires

March 22nd, 2014

Just got back from the biggest trip I’ve done since my Round The World in 2007. Shayna and I spent over 2 weeks in South America, mostly to hike the mountains in southern Patagonia, but also to see glaciers and check out Buenos Aires. As you may or may not know, Patagonia refers the southern part of South America – both Chile and Argentina, covering mountains, lakes, and desert regions. Patagonia means “Big feet” – Spanish settlers apparently thought the natives had big feet. Some may call our trip a vacation, but if your definition of a vacation includes relation, pampering, and time to do whatever you want – this was not a vacation. It definitely was an adventure – and we enjoyed it tremendously.

Actual Itinerary (planned itinerary had more days in El Calafate area)
2/14 Fri ORD-GRU, Chicago – Brasil
2/15 Sat – stuck in Sao Paulo Airport, Brasil
2/16 Sun – GRU-EZE, Sao Paulo to Buenos Aires
2/16 Sun – AEP-FTE, Buenos Aires to El Calafate
2/17 Mon – Eco Camp 7-Day W-Trek Begins
2/24 Sun – Eco Camp 7-Day W-Trek Ends
2/25 Mon – El Calafate, Moreno Glacier
2/26 Tue – FTE-AEP – El Calafate to Buenos Aires
3/2 Sun – EZE-GRU-ORD Bye Bye Buones Aires
3/3 Monday, 6am, arrive back at Chicago O’Hare 

Our trip began on Valentine’s Day, Friday Feb 14, at 9pm by flying from Chicago to Buenos Aires through Sao Paulo, Brasil. We were supposed to only be in Brasil for a few hours (from 11:40am to 3:40pm), then spend saturday night in BA, then fly from BA to El Calafate on Sunday, then leave El Calafate Monday to begin our 7 day hiking trek in Patagonia. However, we ran into problems in Brasil. TAM, the airline in Brasil, said there was no room on the flight we booked 6 months earlier to BA. Of course this made us happy. But they found a spot on another flight later that night. Then when we were actually boarding the flight, they asked where our print out was of the Argentina reciprocity fee payment … we didn’t have it. Snafu part two. Glad they didn’t bother to ask us in the previous 7 hours we were at the airport. But its not hard to get – just go online, pay, and print. Of course there is like one printer shared amongst all the gates and wifi is soo slow its unusable. TAM did work with us and said they would print it once we paid. We went back to the United VIP lounge to use the wifi there (thank god for the VIP lounge), but we still missed the flight. TAM claimed that United in Chicago should not have let us board without it. Luckily, the United agent at Sao Paulo was extremely understanding and worked with us on getting to BA, as well as tracking our bags down. Between 1 and 2am, over 12 hours after arriving their, we had located the location of our bags (in Buenoes Aires EZE airport), confirmed a new flight to BA, and found a new flight from BA to El Calafate (since we were going to miss our previously planned flight to El Calafate). Also, you can’t purchase one-way tickets to/from El Calafate, so we had to leave El Calafate 2 days earlier than planned – meaning we had to remove El Chalten and Fitz Roy from our trip. The good news is that buying a brand new round trip flight last-minute costs almost the same as buying one a half-year ahead of time. Gotta love “emerging markets”.

Once we arrived in El Calafate, I felt like the Patagonia trip began. We had booked a 7-day W-trek in Torres Del Paine with EcoCamp. I know I wanted to do the W-trek, which is like the most famous trek in Patagonia. Normally we love planning and doing everything ourselves, but we liked how Eco Camp was environmentally friendly, had good food, and would take care of all the details for us – neither Shayna nor I speak Spanish. The first and last day were just getting to/from the camp. So day 1, Monday, we left El Calafate, Argentina, at 7:30am, crossed the border into Chile around noon, and met the EcoCamp guide at the bus station in Puerto Natales, Chile. We signed things, had lunch, and headed north to Torres Del Paine. On the way we stopped at a park and learned about Milodon, an extinct native animal to southern Patagonia. We got to the camp, had happy hour, ate dinner, and slept in our luxiourious bed in a canvas dome. No, really, the bed actually was amazing, had plenty of comforters to keep us warm – no heat and got down to near freezing temps (still warm coming from Chicago where it had not been close to freezing in weeks).

Tuesday, Day 2 of the 7-day trek was our first real day of hiking, roughly 11km (7miles) heading mostly west from Eco Camp (base camp elevation was around 150meters, or 450 feet above sea level). There were 12 of us that paid for this 7-day W-trek, 14 if you include the 2 guides. Each guide had 6 people – but after the first day or two we were just one big group. It was an easy day of hiking in terms of distance and terrain, but was the only day with bad weather – just cloudy, windy and light rain. We spent the night at our first “Refugio”, Refugio Cuernos (78m). Similar to US, backpackers are only allowed to sleep at designated areas in the park, the refugios. You can sleep in a tent or in dorm-style bunk beds. Thats where we stayed. It was packed, and got the late dinner shift. But thats ok, cuz they sold cold-ish beer, and the sun didn’t set till 9pm (summer down by the south pole). We played cards and walked around outside with some of our new Canadian friends. Food was not bad, but definitely not as good as the food at Eco-Camp.

Day 3 was one of my favorites of the trip – 23km (14 miles) in and out of the French Valley. We had a late start (3rd shift for breakfast), but had good weather. It took about 2 hours to hike 5km to Campamento Italiano. From there took another 2 hours to go 5km mostly north straight up the valley to our destination, the Mirador Britanico, aka Britanico Lookout. We had lunch on the way, and the whole way up was amazing views. West of us was the Glaciar del Frances (thats the French Glacier to you and me), and we heard several mini avalanches happening, but i only saw one from start to finish (it was far enough away that by the time you heard it and looked up, it was mostly done). After arriving at Campamento Italiano (170m) for the second time, we headed 7.5km southwest to Refugio Paine Grande (50m). This one was way better than the previous – more like a hotel. We still had dorm-style bunk beds and communal bathrooms, but we had huge cafeteria with good food, good company, great views, and refreshing beer and wine.

By the end of Day 3 we had made friends with everyone in our group. First there was the 2 guides, Nico (our guide), and Roberto. In our 6-person group there was Shayna and I representing Chicago, Rob and Laurie from Toronto, and Kyong and Marlene from Seattle. In Roberto’s group there was Petros and Lukas from NYC, Carlos and Laura from Mexico City, and Sharon and David from near Boston. Shayna and I were the youngest “couple” there, and Shayna was the youngest one except for the guides. Everybody spoke great English except the couple from Mexico City, who spoke good enough English. Everyone brought their A-Game to this trip. If they were tired you wouldn’t know it from their spirit, and talking on the trails and sharing dinner with everyone was one of the highlights of the trip.

Thursday, Day 4, involved a half day of hiking to the “Grey Glacier” followed by a boat ride and drive back to Eco Camp. It was 10.5km from Refugio Paine Grande to Refugio Grey, where awaited our boat journey. We hiked mostly north along Grey Lake, seeing little blue icebergs floating before we laid eyes on the big real glacier. Even though the lake and glacier were named “Grey”, the glacial ice was blue like most glacial ice. It’s blue because the immense pressure made the ice so dense that only the blue part of the light spectrum can pass all the way through. Although if you take a piece of blue ice and put it in your hands, it does not look blue any more, looks like regular ice. We had lunch at the refugio while waiting for our boat. Inside they had nice couches, hot cocoa, and beer and wine, of course. There was no dock for the boat, had to board via raft. The boat was big, and got close to the “Grey” glacier before zooming back south to let everyone off. The glacier was amazing, but I like Moreno Glacier more (details in El Calafate below). We got off the boat, walked to parking lot, took the standard 15-person Eco-Camp minivan back to basecamp where cocktail hour and dinner awaited.

Friday, Day 5, was our last real day of hiking, but one of the best of the trips. We did 18km (11miles) total, to get to Base Las Torres (886m) to see Mirador Las Torres, or as I call it, the lake with a view of the three spires. We hiked 5km north up a valley to Refugio Chileno, which was similar to Refugio Cuernos in size. We didn’t stop long. The next stretch involved hiking right along the river as well as through forests and then at the end a bit of hopping boulder to boulder. But the end was definitely worth it – beautiful. We all took lots of pics, had lunch, and I got a quick nap in. Even though I was still low on sleep, I felt better than I had at any point on the trip. All that exercise and fresh air makes me come alive. On the way down Shayna and I stopped at Hotel Las Torres for wifi and a fresh beer. Beer always tastes best after hiking all day. And shayna needed to check her work emails. The hotel was much nicer than our eco camp, the dining room had giant windows facing north so guests can be in awe of the mountains. And they also had a releif map by the front desk that made it easy to visualize all the mountains and trails we covered the last few days. Glad we stopped in. Then we headed back to camp for shower before cocktails and dinner. Knowing we could finally sleep in the next day, i had a few after dinner drinks and hung out more with people in our group.

Days 6 and 7, the end of the trip, were less exciting, but still interesting. Saturday, Day 6, all 14 of us drove around and looked at the geology and animals. Chile protects the Guanaco, an animal native to patagonia similar to a deer. Well, Chile law forbids humans from killing the Guanaco, but not mountain lions, or Pumas as they prefer to call them. We saw several carcasses – apparently the mountain lion will kill, eat some, then take a few of the good bits back to the kids. They may come back in a day or so to get more. Vultures or other smaller animals might have a snack, too. We also got a little biking in – that was fun – but the bikes were a bit rusty and it was super windy – made it quite a challenge. The day ended early with the standard shower, cocktails, dinner. After dinner everyone had some drinks, told stories, and played Jenga. It was our last night and it was bittersweet. Ok, not really, but i always wanted to say an ending was bittersweet. We had gathered everyone’s emails and promised to share pictures. Day 7 was another early departure – had to leave at 6:30am to catch the bus back to El Calafate. There was a little concern that Marlene might not make it back into Argentina since she didn’t have the correct print out of her Reciprocity fee – but it all worked out.

We arrived in El Calafate around 1pm on Sunday. Our hostel room was not great, but it was sunny and grassy out front and I laid down for an hour. That was very nice. Shayna did some work emails (she would spend at least an hour on her laptop each day for the rest of the trip. We also booked our glacier adventure for the next day – we decided to do the mini-hike on the glacier, which includes boat ride and bus. Then we wandered around town looking for dinner, ended up at an Italian-pizza joint (80% of all restaurants in argentina serve pizza or italian). Patagonia Lamb is supposed to be the best meat in the region, and as an avid lover of lamb, I was anxious to try it (never had lamb option in Chile). I wanted the Lamb stew special, but they were out, so I had lamb on my pizza instead. And it was sooo good. I also had a great local weisse beer. El Calafate is approved.

Monday was another one of my favorite days of the trip – seeing Porito Moreno Glacier. This was not my first time on a glacier – i walked around Franz Josef Glacier in New Zealand in 2007. But this one was visually much more impressive. Right up there with mountains as one of the most beautiful awe inspiring things on this planet. We had to pick up lots of people in Calafate, then 60ish of us made a bee-line to the boat, leaving the dock around 11am. We split into 3 groups, one english, two spanish, put on our ice cramp-ons, and climbed around the glacier for about 2 hours. At the end we had some scotch on the rocks, where the rocks where made fresh from glacier ice. Then off the glacier, off with the crampons, ate some lunch, and waited for the boat. On the other side we drove around to the parks main viewing center, and we had an hour to wonder around and see the glacier head-on. It was just so amazing. We were hoping that we’d get to see a big chunk of ice fall in the water, but no dice. Then we took the bus back to Calafate, where we had dinner at El Cucharon. I finally got my Lamb stew and it was deeelicous. Altho I might have enjoyed the lamb on the pizza a bit more. After dinner we did a little shopping and I bought Shayna a ring made from a local artist. Awwww.

Tuesday we had a flight to Buenos Aires later in the afternoon, so we killed time by going to Glaciarium. It’s a glaciar museum with a Ice Bar. We did both. The museum part was very well done, we covered it in one hour. perfect. Then we had a drink in -13 Glacio Bar. Back in Calafate we did some more shopping and headed to Airport. Our flight was uneventful and we arrived at our friend TJ’s apartment in the Palermo district of Buenos Aires. I tried to go out exploring but couldn’t figure out how to leave. Luckily we already ate and didn’t need anything. The next day i figure out that you have to touch the key fob to the special part of this metal box by the gate. Ok, i didn’t figure it out, somebody showed me.

Wednesday through Saturday was mostly sightseeing in Buenos Aires. Highlights include the paid 1 hour tour of Teatro Colon, the Buenos Aires Opera House.   We didn’t make it to Mendoza, Argentina’s wine country, but enjoyed wine tasting with Anuva wines, followed by an amazing Italian dinner. We also got a free english guided tour of Recoleta Cemetery where Evita is buried, followed that with Lunch at La Biela, a famous outdoor cafe that comes with a clown playing an accordion.  We saw a professional Tango Show as well as Tango in the streets of  San Telmo.

We walked alot around down Buenos Aires – in awe of the grandeur and humbled by protestors, squeezed in some shopping, bought shoes for shayna, and pants and shirts for me.  And many delicious meals, including an amazing middle eastern joint called Sarkis, our favorite cafe, Sans, in Palermo Viejo, which was about 20 minute walk from TJ’s apt where we stayed.  Last but not least, we had to eat what Argentina’s famous for – great steaks.  We hit 2 parrillas – La Brigada and Don Julio.  We both like Don Julio better, probably because we had meat more like a filet mingon.

In conclusion I’d recommend Patagonia to everyone who likes the outdoors, loves  to travel, or wants something awe inspiring.  It’s up there with my favorite mountains in the world – others being Sierra Nevadas (Yosemite or Kings Canyon), Rocky Mountains (Glacier National Park), and Himalayas (Lamayuru Trek), and maybe the Swiss Alps.  However, if you are watching the wallet, skip the EcoCamp and plan the W-trek hike yourself.  Make sure you check out all my “Best of” pics, either on flickr or in my facebook album (assuming we’re connected). If you’re daring, you can check out all my pics on flickr (635 in patagonia, 143 in Buenos Aires). Note that we whittled those 800ish pics down from 2,000.   The next big trip is Alaska – shooting for summer 2015.

Chicago Roots Down

September 14th, 2013

Back in 2008 Shayna and I moved from SF to Chicago. I ended the longest stint living in one spot – 13 years in the San Francisco Bay Area. The second longest time living in one spot was 11 years in Atlanta where I grew up. So when I left SF it felt like I was leaving home. I was always thinking in the back of my mind I’d return one day. Well, here I am, 5 years later in Chicago, and I finally accepted Chicago as home. We’ve decided it’s time to put some roots down and buy a house.

I still love California. I think I will always consider it home. The Sierra Nevada mountains may be my favorite outdoor place in the world, whether I’m snowboarding in Lake Tahoe or Backpacking in Kings Canyon. I’m always in awe. Besides the mountains, there are tons of other amazing outdoor options – Camping along rivers at the foothills, driving along the windy coast, Pismo sand dunes, Sonoma and Napa wine country, etc. And as a techie, there’s no place better to work – its like LA for movies, NYC for finance, and Washington DC for politics. And of course the people I’ve met over the years are really what make it home. The biggest group of crazy, goofy, smart, hard working, creative, people I may ever know. I was lucky enough to make some great friends and had more good times than I can shake a stick at (can’t shake them old sayings). I miss you guys.

Chicago gets better every day. There’s so much to love about this city, as long as you look. Thanks to burningman, I immediately found lots of people in Chicago that liked to get goofy, get creative, and get down to good music. Then there’s the obvious stuff about Chicago like how beautiful the architecture is, how big a city it is (feels so much bigger than SF and LA, only NY seems bigger in the US), how many museums, parks, and festivals there are, and how great the summer is. The summer really is fantastic. Really. Sure the winters can seem long come march, april, and sometimes may. But that makes the summer that much more delicious. And the tech scene will never be better than SF, but its getting better all the time, its a huge city, and my current job shows me that there are still plenty of exciting and challenging tech opportunities in Chicago. It still doesn’t have mountains close by, that will always suck, but there are direct flights from O’Hare to the Rockies. Just got to make enuf green so I can fly to the mountains for the weekend, like the way we drove to Tahoe on the weekends.

More specifically, it’s house time. Shayna and I have been through alot over the years and decided it’s time. Time for more room so we can do more with our lives. Time to customize stuff to make our lives better. Time to have a place that we can control and is ours to mold for us. The only question is, which house will be lucky enough to have the Norwoods? The first question our friends ask is where are we looking. Right now we have few constraints – in the city of chicago, but basically anywhere from Bridgeport (just SW of downtown) heading north as far as Lincoln Square. But more likely it’ll be closer to Logan Square (our current residence, which we LOVE), Bucktown, Humboldt Park, or spots ’round there. More important to us than the location is the house itself. But we are still early in the process, and even though we’ve made a prioritized list of what we’re looking for, we expect it to change after we start going to see more houses.

Oh, and totally unrelated .. we are planning a 2 week trip to Patagonia, South America, in February 2014. Hurray! Stay tuned for more Norwood Adventures !!!

 

New Job – OpticsPlanet

September 14th, 2013

After a year of contract work, I returned to full-time employment in May. I really enjoyed contract work, it allowed me to focus more on the technical side, spending a vast majority of my time coding and catching up with the latest technologies. That is something I had not done in years – most of my time previously was spent in meetings, working with coworkers, managing, dealing with clients, etc. I also enjoyed the enoromous flexibility in my schedule to take as much vacation as I needed – I love to travel, as you probably know if you’ve read this blog. And my third favorite aspect was working from home, which allowed me to exercise any time of day, to take long lunches as needed, and to work in concentrated bursts for days followed by taking it easy. Despite all that, I really missed working with people, so I made the decision to go back to the full-time world.

After 4 months of OpticsPlanet (OP) I can safely say I’m siked to work here. At first I wasn’t sure if I should take this job, mainly because it was in Northbrook. I’m a city boy, and wasn’t excited to commute to the Chicago suburbs. However, after interviewing around I realized OP had alot going for it. The company itself is uniquely positioned to keep growing fast as it has done the last few years. The software department works on all kinds of projects, dealing with vendors, internal tools, warehouse and order systems, and of course, the websites (my area of expertise). OP is still small enough to adept quickly, using the latest tools and technologies, plus they have lots of perks like flexibility work hours.

My job was initially supposed to be a mix of managing a team and being a developer (php and javascript), but management took all my time. I’ve actually been surprised on how much I’ve enjoyed this new challenge, I attribute my enjoyment to the people I work with. It’s a place where the better idea wins, which is huge for me – many places don’t want change (even for the better). However, there’s not always time to do everything the right way, and there is constant pressure to for the team to perform better, but that’s not unusual. In fact, we are starting to adapt more agile principles and I will be doing more of an agile coach role soon, which will be a new challenge.

Looking forward to growing my career, with the team, department and company.  Cheers!

Fluent 2013

September 14th, 2013

The Fluent conference this year was just as good as Fluent 2012 last year, and bigger and better in some ways. I still loved how at then end you walkaway realizing how popular, important, diverse, and interesting javascript still is. I want to echo what I said in last year’s post, that I love seeing javascript used to solve real business problems, but the conference was much more than that.

Here are some of my highlights from the few talks I attended out of the 80-ish talks across 8 Topics: Doing Business on the Web Platform, The Server Side, Front End Frameworks and Libraries, HTML5 and Browser Technologies, Mobile, Pure Code and JavaScript, The Leading Edge, Tools, Platforms, and APIs

Noteworthy Speakers

  • Paul Irish – Google Chrome Advocate / Wiz [Wed 9:45a]
    • Insanely fast with chrome and sublime.
    • Talked about workflow, similar to 2012 (editor, browser, etc)
    • Chrome workspaces (in canary) – maps local files to what chrome gets over network
  • Sylvain Zimmer (french guy, scraping sites) [Wed 4:15p]
  • Eric Elliot – Adobe – [Wed 5:05p]
    • Classical Inheritance is Obsolete: How to Think in Prototypal OO
    • npm install stampit (stampit on github)
    • Classes deal with the idea of an object, Prototypes deal with the object itself.
  • Ariya Hidayat – Sencha – [Thu 11:50a]
    • Code quality tools are very important for good software dev
    • Feedback is important: tools <–> engineer
    • CI server, build tools, editors, code testing, code coverage (istanbul)
  • Sarah Mei – Pivotal – [ Thu 2:35p]
    • Emphasized importance of team communication ==> good code
    • One study said biggest predictor of good code was (in order)
      1. team communication, more so than
      2. tech qualifications
      3. experience with code base
    • Great book (for js, too): “Practical Object-Oriented Design in Ruby: An Agile Primer” by Sandi Metz
    • Loves pair programming.  good speaker
  • Brian Rinaldi (Adobe Systems)
    • NodeJS is more than just server js – offers lots of command line tools: UglifyJS, Grunt, GruntIcon, JSHint and HTTPster
  • Nick Zakas
    • Say Thank You.   author of 4 books.  Good speaker.

Other Takeaways

  • Websites need fast page load
    • About 250ms is google’s max page load time
    • 1000ms is max time users wait before mental context switch
    • 2000ms delay on bing/google SRP made 4.3% drop in revenue/user (HUGE)
  • Improving page load
    • Tie performance improvement goals with biz goals
    • Test your site with google’s pagespeed
    • Render Above The Fold (ATF) ASAP - inline critical css, logos, so browser can render at least part of page fast.
  • SPDY
    • HTTP 2 today, avail in chrome, ff, opera (no IE), apache, node, nginx
    • Requires TLS (HTTPS)
    • Many big sites adopted in 2012: some google, facebook, twitter, wordpress, cloudfare
    • Really only need 2 domains to serve images (google says 10 images is enuf)
  • Refactoring JS – lots of tips
  • Games
    • asm.js is da shit (runs C code in js)
    • Brendan Eich (Mozilla) demo’d game “Unreal”, ported to js/html5
  • Google Glass
    • Android, like TV. camera, geolocation
    • Simulator on github, mirror API
    • Avail in 2014, $200-$600

 

Heroku, Node.js, Performance and profile_time

I’ve been using Heroku for about 10 months now, mostly with node.js. Recently one of our apps was using more web dynos than we thought it needed, so I looked into analyzing performance. I ended up writing my first node packaged module (npm) to solve my problem.

We have one Heroku app that is our main http server, using node.js, express, jade, less, and connect-assets to serve primarily html pages. This talks to a second Heroku app that we call our API server. The API server is also a node.js http server, using mongo as its database, serving json in standard RESTful way. The API server is fast – when the html server is under such load to need 10 web dynos, the api server can easily keep up with only 1 or 2 web dynos. My gut was asking me, are 10 web dynos necessary? And even with 10 web dynos, there were times when requests would timeout or other errors would trigger. Maybe some error or timeout has a huge ripple effect, slowing down things.

So the problem is not to just figure out where time is spent on any one particular request, but where time is spent on average across all requests and all web dynos for the html server. How much time is spent while communicating with the api server? doing some internal processing? or something else in the heroku black box?

The first step was educating myself on existing tools that could help me. We already use New Relic, which is awesome and I highly recommend it to anyone who uses Heroku. At the time New Relic support for node.js was still in beta (still is as of this writing), and one the features supported in other languages (like ruby) is the ability to use a New Relic api to track custom metrics. I thought this would be a great way to track down how much time, on average, is spent in various sections of our code.  Too bad it doesn’t work with node.js.

I considered other tools (like these) but the only one worth mentioning was nodetime. For us, nodetime was somewhat useful in that it offered details at levels outside of the application, such as stats on cpu, memory, OS, and http routing. This did not appear to solve the problem (I admit i didn’t read all their docs), but did provide some insight and some validation that things are setup as they should be based on documentation from Heroku and Amazon (Heroku runs on Amazon EC2).

However, nothing gave me what i needed – a high level way to see where time is spent. So I built profile_time (code on github). Here’s a description from the docs:

A simple javascript profiler designed to work with node and express, especially helpful with cloud solutions like heroku.

In node + express environment, it simply tracks the start and end times of an express request, allowing additional triggers to be added in between. All triggers, start, and end times are logged when response is sent.

Where this shines is in the processing of these logs. By reading all logs generated over many hours or days (and from multiple sources), times can be summed up and total time spent between triggers can be known. This is useful when trying to ballpark where most of node app time is spent.

For example, if 2 triggers were added, one before and one after a chunk of code, the total time spent in that chunk of code can be known. And more importantly, that time as percent of the total time is known, so it is possible to know how much time is actually being spent by a chunk of code before it is optimized.

In conclusiion, jade rendering was the culprit. More specifically, compiling less to css in jade on each request was really time consuming (around 200ms per request, which is HUGE). To summarize the jade issue:

JADE BAD:
!= css('bureau')

JADE GOOD:
link(rel='stylesheet', href='.../bureau.css', type='text/css' )

Overall I am impressed with Heroku and am quite pleased by how easy it is to creatie, deploy, and monitor apps. Most of my apps have been in node, but also have run php, ruby, and python on apps as well. Heroku is not perfect, I would not recommend for serious enterprise solutions (details on that in another post). It’s great for startups or small businesses where getting stuff up and running fast and cheap is key.

Mobile: Native or Web App?

Before trying to build a mobile app, this should be the first question you should ask yourself.  And by native, I mean an app that runs on Android, iPhone, iPad, Windows Mobile, or Blackberry. And by web app, i mean something that runs in a mobile browser.

Short answer:  If you got deep pockets and lots of developers (like Facebook), and you want features HTML5 can not provide, go native.  But really it depends on what you’re trying to do and what resources you have.

The right answer only happens after goals have been identified, both short term and long term. This blog post will not cover all the details needed to answer the question, instead it will provide a few links that cover the details.  Note there is also a third option of building a hybrid apps (native apps that get the latest content from the web).

Overview:

Trend towards HTML5 (aka web apps)

Still want native

Option 3: Hybrid

HTML5 Facebook Announcement, Sept 2012

For techies: The details

I hope the links above helped. Remember not to confuse whats best for your app with what other apps do or how they do it.  If you’re still not sure, one approach is to design a web app first, and if it doesn’t meet your needs (which should be fleshed out during the design phase), then go native.

 

Best Music and Audio Players on Android

July 21st, 2012

Last fall i switched from iPhone to Android and for the most part am happy I did.  Apple has great design, but you can only do things the apple way and i wanted more options.  One of the things I wanted was more audio playing/managing options.   I don’t just want any player, I am picky – I’ve listed my requirements below.

Goal

Sync audio (music and talk/news radio) with Android.  Specifically:

  • Make it easy to create/edit playlist on mac, and sync it with bionic, the way iTunes and iPhone work.  Includes adding and removing songs from a existing playlist, and those songs get sync’d .. easily.
  • Make it easy to do daily syncs of podcasts from iTunes (or skip itunes and sync android with internets)
  • Make it easy to delete songs/playlists from android.
  • Do it all for Free.

Environment:

  • Mac with 5,000+ songs and podcasts in iTunes.
  • 400GB of mp3s on backup drive.
  • Fast wifi at home, but dsl (slow) between home and internet.
  • Android bionic phone, limited storage (8GB, can only sync a few playlists of songs from my collection).

Solutions

.


Winamp is similar to the classic program from the 90′s. For android, its a complete and quality program, few bugs.  Similar to Doubletwist.

Pros

  • UI is functionally complete and then some.
    • Bottom always has a drawer that you can drag up to get info on what is currently playing.
    • Clicking on winamp lightening bolt logo in bottom right goes to main menu
    • Has a progress bar showing elapsed and total time of current track, and you can drag current position marker to move to end or beginning of track.
    • Pressing and holding next/prev arrow buttons goes fwd/back a few seconds in track.  Great for fine-positioning tracks over an hour (too hard to do with position marker on progress bar).
  • You can’t sort songs, but there are 3 useful built-in playlists: Recently Added, Recently Played ,Top Played
  • Pauses when headphones are pulled out
    • nice if you’re out and about listening on your headphones and someone asks you a question, you can immediately pull out cord, talk, and then spend time with android to start playing where you left off.

Cons

  • Updating playlists duplicates them, should replace. You can manually delete older ones by tap and hold, but if you want to auto-sync 5 playlists, you will have to manually delete 5 every time you sync.  Gets old real quick.

.

Doubletwist is complete music app, appealing to those who like iTunes

Pros

  • UI is functionally complete and then some.
  • Very easy to manage through iTunes, then ready to sync, launch doubeltwist, connect phone via usb, and done

Cons

  • Adding new songs to existing playlist in iTunes does not update playlist in Doubletwist on phone.  However, there is a fix – open Winamp and delete all but most recent version of a playlist, then come back to doubletwist to see most updated version of playlist (see Winamp Cons)

.

Google Music Beta, now Play Music, is Google’s version of iCloud.  You sync your music from your computer to the cloud, then either download to android or stream real-time.

Pros

  • Sync without wires, over the cloud
  • Stream is useful if you have fast connection and not enough space on device

Cons

  • Cloud syncing is WAY too slow.  Syncing one or two songs is fine, but to sync GB from mac to internet and back to android takes forever.
  • UI for app is pretty basic
  • Has bugs .. like syncing unknown albums

.

DoggCatcher (DC) Podcast App, is for the android only, does not run on a computer (a mac).  You  setup your podcast feeds directly on your phone.

Pros

  • Best way to manage podcasts – on phone directly
  • Intuitive interface
    • Feeds – lists all your podcast feeds, add by category or suggestions or search. Perfect.
    • Playing – summary and complete description about podcast (other players cut this info off)
    • Audio – lists all downloaded podcasts, tap and hold to reveal many options
    • player at bottom – always there, pause easily.
  • Free for trial period

Cons:

  • Content is very limited compared to what is possible with iTunes
  • When the headphones pull out, it plays off speaker (winamp pauses automatically)

.

I want to use these a bit more before I review them

.

Summary

I have been using a combination of the above for months now. I love winamp the most for playing audio for all reasons listed above.  I use Dogcatcher to automatically get the latest news and talk radio podcasts, like NPR’s This American Life, AC360 from CNN, the Nerdist, and Comedy Bang-bang. And I like doubletwist to easily keep iTunes playlists on my mac in sync with my android.

Note: I will update these as i try new music apps.

 

 

Kings Canyon: Goddard Canyon

June 18th, 2012

Got back last week from a very much needed backpacking trip in the California mountains.  I was out in SF for a conference, and decided to stay a bit longer to see old friends and get some time out in the mountains, enjoying nature, and being offline (for more reasons why i love backpacking, see my honeymoon post).  I was prepared to go solo, but was happy that my friend and old roomate Damian Spain could join me.  I chose Goddard Canyon because it had plenty of water along the route, the trailhead was in a national forest (easier to get permits vs national parks or wilderness preserves), had a ferry, hot springs, and a waterfall, several options for camping (campgrounds are * on key points) and was below 10,000 feet so we could have campfires. We planned for 5 days, but on the fourth day we decided to hike extra and drive home that night.  It was an amazing trip and would totally do it again.

Day 1:  Drove 4 hrs from SF to Prather, CA (got permit), 2.5 more hrs to trailhead at Florence Lake.  Hiked almost 8 miles to Muir Trail Ranch. Elevation from 0 to 7,700′

This was a busy day. We left SF at 7am, got permit around 11, had leisure lunch and drive to Florence lake, stopping by other dams and lakes, campgrounds, and ranger offices, arriving at the lake around 3.  The ferry was not operational for the season yet, so we had to hike 3.4 miles more than we planned, putting us around the private ranch around sunset.  We had trouble finding the campground by Blayney Hot Springs, so we just put up our tent along the jeep trail near the ranch. (Day 4 we found the campground, see below). If you arrive at night, another option would be to camp at one of the many car-camping campgrounds along the road about an hour from Florence lake. You can get a backcountry permit at a smaller High Sierra ranger office near Mono Hot Springs (map) the next morning, and have plenty of time to hike to the nice campground by the river and the hot springs.

Day 2: Hiked over 7 miles to the campground right passed the bridge 2 miles from the bridge marking Kings Canyon Boundary. Elevation from 7,700′ to 8,700′

This was a much easier day then the previous day.  We stopped because the campground was so nice – part shade, part sun, nice campfire ring,  plenty of wood, 50 yards from river and a little off trail (but still very visible to hikers).  One of the more interesting moments of the trip was when i stopped to fill up water in a small stagnant lake – a few leeches got on my water filter.  There were always tons of large black ants around, so i decided to give the ants some lunch.  Upon arriving at the campsite we took a nap and had a late afternoon campfire.

Day 3: Dayhike – Hiked about 10 miles up Goddard Canyon to see the falls, turned around before hitting Hell For Sure Pass.  Elevation 8,700′ to 9,700′ back to 8,700′.

This was another easy day, we did it without packs and returned to the same campsite.  Goddard Canyon was similar to what we had seen so far, just more granite and a more narrow canyon.  The river was also a bit more interesting, having 5-10 feet granite walls in several places.  The falls were impressive, but next time I’d like to try going up Evolution Canyon instead.

Day 4: Hiked 16-ish miles back to car.  Elevation 8,700′ to 7,326′ (Florence Lake), drive back to SF.

By this point we had acclimated well to the elevation, so hiking was easy.  We made it from our campsite to Blayney Hot Springs campsite by lunch time (over 7 miles).  As it turns out, the campsite is right by the river, about a half mile from the main trail (just follow signs to Blayney Hot Springs).  We found campfire rings but could not find the hot springs – later we figured out you must cross the river to the hot springs which lie in the meadow.  At lunch we decided to cut the trip short and hike all the way back to the car and drive home.  Damian said he had to be back to try on some dresses (or something like that).  I actually had a blister on the bottom of my left foot so I was also down to finish off hike.  We had an amazing time up to that point and I was completely satisfied.  On the way home we stopped in Fresno for enchiladas, only Damian was too tired to read the entire menu and got something else instead.  We arrived in SF about 2am thanks to D’s mad driving skills.

In summary we hiked about 40 miles, drove 13 hours, saw beautiful mountains, lakes, amazing trees, and animals, had time to relax, play with fire, get lots of exercise and fresh air, and had that reset button pushed hard.   Can’t wait to make it to the Sierra Mountains again.

Fluent Conference Wins


I just completed one of the best tech conferences i’ve ever been to – Fluent javascript conference in SF. O’Reilly did a great job of providing many opportunities to learn more about various facets of the javascript world. These include business, mobile, gaming, tech stacks, detailed in the very useful fluent schedule. There was also tons of buzz around web apps (code shared on client and server), backbone.js, node.js, among other things. It was well organized, with usually about 5 parallel sessions, and enough breaks to consolidate notes, meet other attendees, explore the exhibit hall, or just catchup with email. There was also a few organic meetups at night, but I did not make it to any of those.

I was happy to see discussion around business side of javascript, mainly due to the rise of web apps and HTML5. Even though javascript has been around for 17 years, only in the last few years has there been an explosion of js frameworks and libraries. This is partially attributed to mobile explosion, apple not supporting flash, and a really great dev community (yay github). With all these new tools available, companies can focus more on the bits they care about, allowing them to get new apps, features, and fixes in front of their users faster than ever. Web apps were a very popular discussion area, from the business and develpment side. Specifically two sessions highlighted this. First was how business are “Investing in Javascript” (pdf presentation by Keith Fahlgren from Safari Books. The other was by Andrew Betts from labs.ft.com, discussing the financial time’s web app which allows users to view content offline. Most people know that traditional newspapers are dying, but I liked how Andrew points out “newspaper companies make money selling *content*, not paper”. Also Ben Galbraith and Dion Almaer from Walmart had a fun-to-watch Web vs Apps presentation (yes, its true, tech isn’t always DRY). The main takeway from them (which was echoed throughout the conference) was that web apps are better than native apps in most ways except one – native can sometimes provide a better user experience (but not always). Of course you may still want to build a native app using html5 and javascript, and there are 2 great ways that people do this, using Appcelerartor’s Titanium or phoneGap (now Cordova, apache open-source version). One of the coolest web apps I saw at the conference was from clipboard.comWatch Gary Flake’s presentation (better look out, pinterest).

For the uber techies out there, there were lots of insights on how companies successfully used various js libraries and frameworks (in other words, whats your technology stack). This is important to pay attention to, since not all the latest and greatest code is worthy to be used in production environments. You should think about stability, growth, documentation, and community involvement. Here’s a few bits I found interesting

  • Trello (which supports IE9+ only): Coffeescript, LESS, mustache templates, jquery/underscore/backbone
  • just.me: jquery, less, node.js
  • new soundcloud: infrastructure: node.js, uglify, requreJS, almondJS .. served using nginx. Runtime: backbone, Handlebars
  • twitter: less, jquery, node.js, more twitter tech stack
  • clipboard.com: Riak, Redis, NGINX, jQuery, Node.js, node.js modules
  • pubnub: custom c process faster than memcached and redis
  • picplum tech stack: coffeescript, backbone.js, rails 3.2.3, unicorn + resque, heroku postgres, heroku (nginx), AWS couldfront & S3
  • stackmob: uses backbone, mongoDB, Joyent and EC2, Scala and Lift, Netty and Jetty

Finally, here are a few other cool tech-related tidbits from the conference. There was soo much good stuff, this is not a complete list, but just a few highlights from my notes