Monday, August 5, 2013

Searching for a needle in a hay stack

I have a lot of faith in modern search engines.  If I want something to eat, need directions, or want to learn something, Googling for the answer will amazingly give me the answer.

But today I had some trouble finding some information.  I wanted to know how to construct a query for a google appengine app that would search over a group of values.  In SQL, the query would look something like:
select * from mytable
where field IN ('someDataToMatch', 'anotherGoodValue', 'and so on');


I figured that the syntax would be similar, but googling for something like
"Google appengine datastore query IN"

sent me in the general direction of where my answer was, but it didn't give me the answer.  The problem of course is that "IN" is a very common word and it doesn't really give the search engine much to work with.  As an aside and for future self reference, the answer I was looking for is here: https://developers.google.com/appengine/docs/python/ndb/queries#neq_and_in.

I imagine that Google and others are working on improving searching and probably have lots of great things that they are building and testing, but here a couple quick thoughts on improving search:
  1. Allow users to opt-in to a program where Google or any other search engine can essentially spy on you.  If a search engine knew that I was a software developer, who has been working on a google appengine project for the past few days, has spent some time going through a few tutorials, and reading stackoverflow questions about google's datastore, I would hope that they would have a better chance at helping me find the page that I want.  
  2. I need a browser extension that monitors all of the pages I look through after I start searching for something.  If I find the answer I am looking for, I can hit a button that says "I'm done".  I think this will be the only way to map search terms to pages that are good hits for me. 
I guess I think that improving internet search will be similar to the future of medicine - personalized just for me.

Sunday, August 4, 2013

Weekend coding

This weekend was a typical one for me (at least for the last few years).  I spent the majority of the time with my family, hung out with some friends on one night, and did some household chores.

During the weekend, I managed to spend about 1.5 hours working on my latest project (this google app engine).  Given it was only a small amount of time, I made some decent progress. 

In my day job, my objective is to build reliable, maintainable, error-free performant code.   
At home, my objective is to build things that are interesting and fun, while learning something along the way.  Given the difference in weekend coding from real-job coding, here are some pointers on how to make progress on a hobby project successful.
  • Keep a list of work items that you may want to work on next. This list should be varied like, "updating the database schema to hold a user's dataset" or "update the UI to align all the buttons on the page".  I never know what mood I will be in when I return to a project. If I feel like making UI updates, working on back end tests or whatever, there should always be something ready to work on.
  • Make quantum updates.  This means take small steps that a make a difference.  If you try to accomplish a big task within a small amount of time, you may not finish anything tangible, which is disheartening.  
  • Code first, fix errors later.  This is probably the one that is the biggest departure from my normal habits.  For weekend coding, it's most important to get something working, so that you can give yourself a job-well-done pat on the back.  If you spend too much time harping on every edge case, you again might run out of time.