Saturday, April 26, 2014

All In on a Mac

I thought this day would never come.  After decades of swearing I hated Macs and would never own one, I finally took the plunge and got my own Macbook Pro 15".   For the majority of my lifetime, I swore I would only use "open" and easy-to-hack on (like Windows!  ha ha) systems.   At some point along the way, the value proposition changed, and a Mac became a better choice for coding, gaming, and cost of maintenance.



It wasn't like I didn't try to look at other systems.  Of course, I went straight to Chromebooks first, but knew that I would have to wipe / dualboot it to even get Linux on it, and even then, the modest computing power wouldn't be able to handle heavier applications.  On my way to the Mac counter at Best Buy, I even stopped over at the Windows laptops.  There were dozens of them, all happily running their Windows 8 kiosk-style and not another soul in sight around them -- when I touched one to try to launch the big "weather" app from Metro mode, it then went into "edit your Metro tiles" mode.  Huh?  I just wanted the weather, and clicking on this thing makes me edit my tiles.  Nope, I'm out.

Instead, I plunked down several thousand bucks and walked out with a small, thin white box.  Giddy.

One week in, I have to admit that I'm happier than ever, and I've been extremely surprised by the experience:
  • Finding applications that run on Mac is easy.  Everything I wanted to run, including IDEs I've used before, and games I was playing on my Windows Doorstop all have Mac versions.
  • It had all the "power" of Linux already in it.  I fired up a terminal and checked the version of git.  It was all ready to go out of the box.
  • Navigating around the OS was not a problem.  I always thought "I know where to find everything on a Windows/Linux machine, but not on a Mac." -- turns out, it's just a matter of running the Finder or Launcher. 
  • I was able to easily install Hearthstone and battle.net, and they ran smoothly without even making the fan run.
Even so, there have been a couple of rough edges.  The first thing I did was to reverse the two-finger inverted scroll nonsense.  The App Store concept was weird -- do I buy apps from Apple's store thingy, or just download them from somewhere else?  The number and quality of apps is questionable.  I wanted an IDE to be there, but the closest one was like $70.  Huh?   And the "app still running until you go to Menu -> Quit" is still bizarre to me.  

Anyways, it's been a helluva purchase, and it's helped me get a couple of broken-then-fixed versions of my extension out.  I'm considering my all-in bet a pretty good one so far.

Sunday, April 6, 2014

Back in the Saddle

My next 30 day challenge hasn't gone so well.  It turns out that sometimes it's easier to commit to something larger and execute on it than commit to something smaller that's easily forgotten.  Oh well, I guess I'll just hit the reset button and try something else.

In the meantime, I found out from a friend who uses my spoofer extension that it completely stopped working with Chrome 35 (dev channel).  This usually happens when Chrome changes APIs that extensions can use to do certain things, and indeed, this is what happened.  Looking through all of the chrome.* APIs I was calling, half of them were deprecated and replaced with something else.  So much for a stable development platform.

So this pushed me a bit on releasing my half-baked 1.0.30 version, that was a significant rewrite from 1.0.26.  Thanks to some very cool and helpful G+ commenters, I isolated a couple of bugs in the 1.0.30 version and knew I needed to get back on the horse and start hacking again.

But, there were several problems:  One, all of my source code was on a 5-year-old laptop that is one power supply away from being a doorstop.  Second, none of the source code is under source control.  And last, I had no error reporting in the extension at all -- it could be failing horribly and I would never know.  I set out to change that and learn new stuff along the way.

First, I set up a bitbucket account, where I could have multiple projects for free.  Usually for open-source stuff, people pick github, but I went otherwise because of (a) all of that weird BS going on around github in general, and (b) bitbucket is free.  I also started using git, and tracking / tagging / etc. the source, so that's good.  Second, I polished off an old CodeEnvy account I had and started and connected it to my bitbucket repos and started hacking online (on my Chromebook, naturally)


CodeEnvy has been surprisingly responsive and usable.  I can deploy an app engine app right from the IDE, push and pull from bitbucket, and can edit multiple languages.  I'm impressed with it so far....I daresay it might be something I'd pay for.

Lastly, I started fixing up the bugs in 1.0.30 and implemented a weak (but workable) error reporting system.  It's anonymous, and just reports how often an error occurs.  I don't have it sending anything back yet, but it's a good start.

Also, I think I made a decision on upgrading my workstation to a Macbook Pro 15".  Now, if I can just get the guts to spend $1900 on it...

Monday, March 31, 2014

Confusing Error

I've been hacking away at my extension again, based on the fact that the old version is completely broken by Chrome version 35.

One of the major operational pieces that I did not have in place is error reporting -- I relied on anecdotal error reports from users, which have typically been enough in the past.  However, with a major refactoring and rewrite, there are so many problems that can pop up, and I have no way to know if I'm causing bad regressions.

So I've been building version 1.0.31, with opt-out error reporting.  But when making the changes and firing it up for the first time, I kept seeing this error in the console:

Error in event handler for (function name here): TypeError: The first argument is the receiver and must be an object.

WTF?  It only seemed to come up when registering a callback, but I didn't change anything significant with any callbacks, I just added some error aggregation and reporting.  After struggling with finding the cause, I used the time-tested method of commenting out large blocks of code and then un-commenting until things work.  I eventually narrowed it down to this new function-class that I added:

function Error(code, message) {
  this.code = code;
  this.message = message;
}

Why would this class cause problems, it's as basic as it gets...?  And why would it cause this weird error? The only answer I could think of was that "Error" is a reserved name and declaring this function effectively overwrote it, causing all sorts of disaster.  So I renamed the class to "ErrorReport" and things worked again.

If you encounter this error, there's a chance somewhere that someone is inadvertently clobbering a "protected namespace" function...one of the wonderful joys of Javascript is the ability to shoot yourself in the foot in mysterious ways.

Sunday, March 23, 2014

Brew For You Service

Here is a quick double feature of what I'm grateful for, and some ideas I came up with:

I'm grateful for:


  • Staying in touch with good friends over 20+ years leads to some awesome (hilarious) reunions that seem like you never drifted apart.  I'm grateful for having life-long friends.
  • I'm grateful for the opportunity to get 5+ free hours to brew.   That picture below is a Belgian Wit, which I'm hoping will come out with a nice light orange-y flavor.  My feet are up on top of the mash tun.



[Bad] ideas of the day:

  • A "brew-for-you" service where you specify the recipe that you want to brew, and the service gets all the materials, brews a 5 gallon tester batch for you, and you pick it up when it's fermented and ready.  I would love this service so I could try out new recipes or tweaks without having to commit an entire afternoon of working to find out if it worked.
  • A DSP that targets mobile ads specifically at *mobile web* rather than mobile app, and detects when users are zoomed in & in a residential geolocation (i.e., at home, browsing).  Not sure if that would be all that useful.

Sunday, March 16, 2014

A new 30 days

So I've reached the end of my 30 day challenge to write a blog post a day.  It's taught me a lot about both trying to do something regularly (set a schedule and do it the same time every day) and writing (super hard, kudos to people who do it full time).

But now I need a new challenge to do something completely new for 30 days.  I thought about all the things I wrote before, like writing code every day, doing shoulder mobility drills, etc.  But these are things I kinda-sorta do now; they're not completely new.  It's like setting a goal to floss twice a day instead of once.

I've been feeling dissatisfied with my professional work as of late, and it's made me more mopey, and probably not fun to be around.  I want to be able to focus more on the positive, be grateful for what I have, and be a better person to be around.  There are studies that have shown that just reflecting on what you are grateful for will make you happier and more satisfied with your life.  But I also want to do something beyond just improving my attitude -- I also want to actively work on something that could build into another professional opportunity.

So I can think of two things that will help me do this:
- every day for 30 days, think of and post something I'm grateful for
- every day for 30 days, at the same time, I'll post an idea for something I'd want, or want to build

I'll either post them on G+, which is where short stuff like this will likely be more 'visible', or the blog, if there is an idea that I really need to write about (or talk myself out of.)

So, day 1-  March 16.

What I'm grateful for:

I get time every day after the kidlet goes to bed to work on my "own stuff", writing blog posts, checking facebook, etc.

Idea of the day:

Wind chimes that make the sound like palm trees do in the wind.  I dunno, it sounds dumb, but I like the sound of palm trees when they blow in the wind, but they can be nasty to maintain and get really tall.

Ok, so maybe that's in the "talk myself out of it" category?

Thursday, March 13, 2014

The Old Startup Guy

I'm sure many of you spotted this article about the "new guard" versus the "old guard" of Silicon Valley.  The article is uniquely insightful and detailed, a pretty accurate view of what draws and keeps people in Silicon Valley.

As someone who is nearly 35 and "over the hill", I'd like to give my own perspective on the topic.  I feel somewhat knowledgeable on the topic, since I lived and worked in the valley for nearly four years, and I worked at several  startups over my life, and now I work at one of the "old guard" companies named in the article.  I guess I fit the mold pretty well.

I loved working at a startup when I was young.  We wrote code, played video games, had nerf wars, played soccer, had parties together and generally just tried shooting the moon and having good times as a group of friends trying something big.  We worked long hours (we actually got paid by the hour, which when you are 21, was amazingly good pay, and for the company, it was a steal to get developers that cheap)  Those times were perhaps the most fun and memorable times of my life, and I would give nearly anything to do them again.  It all worked out at the time because the pay was really good for living in a house of 7 roommates and eating Domino's pizza.

I imagine this is exactly what Silicon Valley is like today, and this article seems to confirm it.  Trying to make something cool and fun while working / living / partying with smart people, and having one small sliver of a shot at making it really big.  It gives me chills just thinking about it.

But it doesn't last forever.  You eventually either get old, or sick of it, or find someone and settle down and have kids, or really sell the company for a billion dollars, or fail so hard you have to move home, or whatever.  Then what?  You have to pay a mortgage, take kids to soccer practice, work less than 80 hours a week because there are people who want to see you, live in the valley because soma got too expensive, and work at a job that will really be there next week because health insurance ain't free.  And then you're working the "old guard" making routers and measuring email uptime because it means all of those things.  

There's a generation of us "old people" working at those "old guard" companies because risk tolerance is lower and having a family will always come first.  Hell, I'd work at a startup in a heartbeat if it meant I knew I loved what they were doing, it would afford my mortgage, and I could see my kids.  I'm sure a standing army of similar "over the hill" hackers and hustlers working at the old guard companies are in a similar position.  

These "new guard" companies are designed specifically to work as high-risk-high-reward, time-intensive ventures that don't fit the needs of someone with something to lose.  When I kick off my startup -- and I will -- there will be several rules that I will need it to live by to make it viable for me, as someone with something to lose:
  • There is a clear separation between work and home life.  I'm all for being good friends with who I work with, but you've got to have time apart to stay sane.
  • Some time during the day is going to be for my family, and is non-negotiable.
  • The benefits have to work for everyone.  Having unlimited Ramen and Mountain Dew is great but pales in comparison to health insurance.
  • If and when I sell, I want to make sure every employee walks away well-off.  None of this "liquidation preferences" bullshit.
Anyways, perhaps it's all just hot air because I haven't gotten off my butt and just done it.  But perhaps these are just the words to my future self.  Good luck, buddy.


Wednesday, March 12, 2014

A few lessons learned about writing for 30 days

So my personal challenge is almost up, with a month coming up tomorrow (I think I may have a few days left to write to get to 30 full days...) And there are a couple of things I've learned from my daily habit:

  • Coming up with a new, interesting idea every day is tough.  There are some days where I want to take a picture of a sandwich, or post a link to an article, or something more fit for a social post somewhere.  But coming up with a lot of thoughtful things to say on a daily basis is hard.
  • It's hard to come up with ideas on work days.  Not a whole lot new happens during a long day of the same ol' same ol'.  Plus, fewer free hours in the day to write / take pictures of stuff.
  • It takes a long time to write the posts themselves.  It's an hour-plus to write, and if you're strapped for time, sometimes you have to quickly write something out before the end of the day.  Maybe if you don't have to write every day, you can let posts "brew" over a couple of days and get something well-crafted out.
  • You can't always write what you really want to say, mostly because it will be public forever.  So I would sometimes start writing furious rants just to stop myself and back off to write something else (except in the case of texting and driving).  Maybe that was therapy in itself?
  • Sharing on G+ generated far more traffic than not sharing.  So I would sometimes not share on days I knew it would be really short / boring to spare people from G+ feed spam.
  • Motivation is high at the beginning and at the end.  Maybe I had a lot of writing topics ready to go at the beginning -- it's different and new.  And by the end, it was old hat and the light was visible at the end of the tunnel.  But the middle is what required the consistent reminder and daily routine to build up the motivation.
Anyways, I still want to write, and going through this experience has made me want to write consistently.  However, I don't think I could do it every day.  I'd save up my most interesting thoughts and maybe post every couple of days.

I do have several options of things I can do for 30 days once this challenge is over, and I have yet to decide between them:
  • Write some code every day.  I'd have to get my dev environment up to speed, but man, I'd love to get some hacking in every day
  • Do 100+ shoulder pass-throughs with my PVC every day.  This would greatly help with my terrible shoulder mobility
  • Come up with 3-10 ideas every day (even if they're bad).  I had a few previous posts on this that showed my terrible "ideation range"
  • Take a photo/video every day.  I certainly don't take enough, and I'd like to leave them all for my kids to see one day
  • Meditate / breathe thoughtfully for some amount of time every day.  I had a former boss who did this every day and it certainly helped focus and de-stress, it would be nice to do with all of the stress that I get from work these days (probably worth a post of its own -- maybe tomorrow)
Anyways, I'm digging the challenge of doing something every day for 30 days, now I get why it can have such an impact on your life -- the muscle memory and consistency of doing something every day makes it part of your daily routine.  I'd recommend it for you too, it will make you a better person!