Friday, March 21, 2014

Components to my home office

After some consideration, my wife and I have decided it is about time ... to upgrade our home office.

Our current situation is composed of laptops used on the living room couch or dining room table, which can be very uncomfortable. So, I've been researching the components needed for a home office. Here are the things I will get in the order in which I'd get them. 

Step 1. Desk
Img of Elfa Desk
We are thinking of getting an Elfa setup from the Container Store. For us, the key features are its dimensions - narrow (to fit in a small space) and tall (to effectively use all of the space).

Another consideration, which didn't quite make the cut was getting a desk that supports sitting and standing. I gave on the idea, due to cost and the amount of space it would take up.

After we have a desk, one of us can at least use the desk instead of the couch or dining room table. 

Step 2. Monitors
I bought two 24" Dell Ultrasharp monitors (U2410). We bought them refurbished from Dell, and they are a few years old. For these reasons, we ended up paying just under $200 each for them, which is a lot less than the full price.
Shopping for monitors is difficult. How much do you want to spend? What level of performance do I need for what I do in my apt ... ?  Rather than rehash the technical info, I'll boil it down to these reasons for picking these monitors.
  • These monitors are supposed to be good for office work and programming, which is our primary use case.
  • They are from Dell, and Dell has a good reputation for monitors.
  • While these are still widescreen monitors, they are slightly taller and less wide than a standard HD television, which is better for us (1920x1200 as compared to 1920x1080, if that means something to you).  
As an aside, I really wanted a PLP (portrait-landscape-portrait) 3 monitor setup, but I couldn't make it work for me (not enough desk space).

Step 3. External Keyboard and Mouse
I got the Microsoft Wired Keyboard 600 and a Logitech M100 USB Optical Wired Mouse. These are just about the simplest and cheapest options you can find.

So far, the mouse has worked with my Macbook air without any problems, but the keyboard hasn't worked so well. I can't seem to map over the ctrl, alt, and other modifier keys to things that the Mac likes. 

Step 4. USB Hub
In order to connect my laptop to the monitors I got two Anker USB 3.0 to HDMI / DVI Adapters and this Anker USB 3.0 7-Port Hub. I'm already using 5 of the ports (2 for 2 monitors, 1 for a mouse, 1 for a keyboard and 1 for a cell phone charger). The best thing about a hub is that I can easily swap out my wife's laptop with my laptop by switching one plug.

The usb to dvi adapters depend on software from DisplayLink. So far, this has been a bit buggy. With my Macbook Air, only one of the 2 external monitors work at a time. Things work better with my wife's windows laptop. However, we still haven't figured out how to make things work seamlessly when connecting to our work computers over Citrix.


Step 5. Computer
Since we have laptops already, getting another computer for a home office isn't necessary. If we feel that the constant plugging and unplugging of laptops is difficult, maybe we'll get a standalone computer. Getting a computer opens up another can of worms, so I'll just put it off for now and let my future self think about it.

The end or the start.
So far, the home office is nice to have. I think spurs me on to work more. The worst part about it, other than the cost, is setting up multiple monitors. The current level of hardware/software feels a bit hacky.

Sunday, March 9, 2014

A programmer's review of Jiro Dreams of Sushi

Last night, I saw Jiro Dreams of Sushi. It is a beautiful documentary about Jiro, possibly the best sushi chef in the world. I'd recommend this movie to anyone, especially if you are looking to be inspired.

Naturally, I compared Jiro's life as a chef with my life as a programmer. Here are some of my takeaway thoughts.

What's love got to do with it? More than love, I think effort, practice and reflection are the important inputs to Jiro's success. Some people may hear this line from Jiro, "You have to fall in love with your work", and think he is talking about the cliche, "You should find a job that you love". It may be a bad translation, but I think these are vastly different statements.

Finding (and looking for) a job that you love is nearly impossible. Love takes time to develop. How can you love being a chef or a programmer after one day or one hour? It takes a long time to understand something to know it enough to fall in love with it. The effort and associated pain of learning then mastering a skill creates a love.

Natural talent is very important, but you can still succeed with hard work. Jiro talks about another famous chef who has a better sense of smell and taste than he has. With better natural skills, Jiro believes that he might have been a better chef. Nonetheless, because of his incredible work ethic, he is still the greatest sushi chef in the world.

I know there are blogs and studies about people who can program and those who simply cannot. Maybe it is a case of Impostor Syndrome, but I often feel like I am one of those who cannot. And yet, somehow, I am a professional programmer. If you work hard, you can accomplish something.

Think about the client. There is a scene where Jiro is serving sushi. A food critic notes that Jiro watches his clients eat. If a diner is left handed, Jiro will place the next piece of sushi on the left side of the plate to make it slightly easier to eat. Does the client notice or care? Probably not. The important bit is that Jiro is always trying to improve the dining experience.

Practice, practice and practice. There are many more gems that you can take away from this movie, but this is my favorite. Whatever you do, practice it. You should improve, and that improvement is very rewarding. Of course, you need to practice smartly. Every night, Jiro reflects on the day and thinks about ways to improve. What a great lesson. Even the best chef in the world, at over 80 years old, is trying to improve.

Wednesday, March 5, 2014

Learning on the internet

In the few years that I have been programming, I have learned a mountain of stuff; yet there is an ever expanding galaxies of things that I don't know.

I'm always trying to bridge this gap by learning. Lately, I've tried out two platforms, Codecademy and Coursera. These are both excellent and free resources. The material on both sites is amazing. Neither are magic. You still have to work to learn the material, but the fact that this sort of material is out there is amazing. Stop surfing the web and try it yourself.

Coursera
Coursera has a number of courses given by college professors. The courses have video lectures, homeworks and exams. There are also online discussion forums where students are asking/answering questions moderated by administrators of the course.

I've worked through a few courses (Computer networks, Algorithms, and Databases). I cannot say I completed the courses, because I didn't do all the lectures and exams, but I think I still learned a lot, which is the purpose of it all.

Coolest things about Coursera - the video lectures are insanely good. You get lectures from professors from the best schools in the world for free. If I were a paying student, I'd feel a little bit cheated!

Worst thing about Coursera - I'm not sure why, but some of the courses start and end on a fixed schedule. Once the video lectures and other material is created, I'd like for the material to just stay online so that I can go at my own pace. I found that some weeks would go too slow, and I'd be waiting on material and some weeks would go too fast. But this is a minor gripe, as many of the courses repeat.

Codecademy
Codecademy has a much narrower focus, to teach people how to code. Instead of video lectures, homework and tests, they have a very nice text editor that you can use to interactively code and learn.

I took the web course which focuses on HTML and CSS. Relative to my experience it was a little bit too basic, so I wanted to skip ahead a bit. In any case, due to the fact that it was gamified (I got points and badges along the way), things felt fun and I continued until the end.

Coolest thing about Codecademy - as mentioned before, the editor is great. It allows you to immediately try out the code you are learning without setting up a test development environment.

Worst thing about Codecademy - I haven't encountered anything bad yet. I wonder how things will go as I advance. I will take the JQuery course and see what that's like.

Conclusion
I plan on continuing to use both Coursera and Codecademy. I can't believe such great resources are free.

I imagine that this will be the future of learning. It is much more efficient, convenient and scalable. I am not sure if it is as effective as the traditional mode of learning, but it's working for me. Give it a try!

Sunday, March 2, 2014

Posting flickr photos

I have been trying to add more pictures to my blog. The problem is that I have so few good pictures of my own to share.

As usual, the internet has the solution. Using Flickr, I can find interesting, apt, and free pictures. For example, the image in this blog is from Flickr.

As a good netizen, I'd like to give proper credit to whoever has generously created and shared this image for anyone to use. For any image I post (if all has worked well), you should see a few things:
  • a clickable image that links back to the original.
  • a creative commons attribution.
  • a credit to the original artist linking to their flick account page.
As you might guess, getting this image with all the proper credits is a bit more difficult than just cutting and pasting, but it's not so hard either. Here are the steps I take.
  1. Do an advanced search on Flickr.
  2. Enter your search terms. 
  3. Scroll down to the bottom of the page, and make sure you turn on all these options (Only search within Create-Common-licensed content, Find content to use commercially). 
  4. Click Search.
  5. Click on one of your search result images. It should bring you to another page. Copy the web address.
  6. Go to http://www.imagecodr.org/get.php, and paste in the web address. 
  7. When you hit submit, you should get further validation that the image is free to use, and some html code that you can cut and paste into your blog. 

Saturday, March 1, 2014

Enough with the statistics

For the last couple of weeks, I have been rolling out a change where my Android app would connect to an App Engine Backend.

The reason for this change (as always) was for me to provide better functionality and for me to learn.

Unfortunately, an unintended consequence of this change is that I have become totally obsessed with tracking the statistics related to my app. (I'm hoping that if I write about it now, I can clear my head of these thoughts and move on.)

Before, I didn't really pay any attention to how many users installed my app. The numbers were always so small that there wasn't really that much to examine.

After connecting my Android app to this cloud application, I noticed that I was exceeding the free datastore limits everyday! In particular, I was trying to do more than 50,000 datastore write operations per day. This was surprising. I checked the number of people who installed my app, and it was an order of magnitude higher than when I last looked. It still is a pretty small number, but geez, I couldn't believe that I had a real life scalability issue!

I then went on a downward spiral of religiously checking stats related to my app. This can be very addicting. Also, the marginal benefit of looking at your stats every day as opposed to once a week or month was very small for me.

I eventually pulled my head out of the mud and started thinking about solutions for my resource limitations problem.

Technical fix. I've made a bunch of changes. I removed nice-to-have but not necessary attributes (like update time), removed indexes created by default that I didn't need, and modified indexes to optimize for minimal writes but slower query speeds.

Financial fix. I haven't made any changes yet. If the trend continues, I may need to start paying for some support above the free quota. Ideally, I hope that my small ad revenue could pay for this app, so that it was self sustaining.

In response to these statistics, I've spent a decent amount of time optimizing my code, way too much time day-dreaming, and not enough time working on something else. I want to move on now. Getting cool stats feels good, but it's not what motivates me to build applications.

Onto the next buggy feature!