lunatechian (lunatech-ian)

one relating to, belonging to, or resembling lunatech

interesting meetup on July 14

I attended the Hackers and Founders meetup yesterday. It was a high energy meetup and I liked it. When I walked in, I was already 2 hours late but there were still quite a few people around. I walked in, took a name tag and tried to "merge in". Merging was easy - the folks were friendly and did not mind if you joined the discussion.

Some observations

  • I did not have a good answer for "what are you working on right now" :-) . This made me realize that from a technology perspective, I have not worked on anything interesting for some time now. I have tinkered with a few things in the past 6 months (man!), but have not really done a deep dive on any of them.
  • There was a focus on programming language in the group. I am not sure if the choice of a programming language is really a big deal when creating a webapp. Rails, PHP, Python, Perl, Java - all have a good web framework. One of the arguments was that it would be difficult to organize PHP code in a coherent manner. In my opinion, that is a matter of discipline instead of language.
  • I did not find people thinking of totally different ideas. Or maybe, the folks were not telling those ideas :-) . The ideas floated around ads, community, social networking, websites etc.
  • I am not a unique case when it comes to the case of creating a startup. A few folks there had a regular job and were planning on side projects.
Defined tags for this entry: , , ,

git-svn on macports

If you are using macports, you will notice that git svn init will give you this erro git: 'svn' is not a git-command. This is because the default build of the macports git does not build git-svn. You can do the following steps to fix this

sudo port deactivate git
sudo port install git +svn
Be preapeared for a long build - this will pull in svn and related dependencies.
Defined tags for this entry:

optmizing ORDER BY in MySQL

A few days back we were trying to optimize a sql query that was using an ORDER BY clause. When we ran an EXPLAIN on the query, we saw that the query was Using filesort and Using temporary. Since this query was run quite frequently, there was a benefit in optimizing this.

I had been under the impression that if your query uses filesort and then has to use temp tables for sorting, you cannot do much to save the query. However, that is not the case. If you have an index on the column being used to do the order by , mysql will use that index for sorting. Of course, there are caveats to this, the most important one being

The key used to fetch the rows is not the same as the one used in the ORDER BY: SELECT * FROM t1 WHERE key2=constant ORDER BY key1;

Hence, if you have a query which requires to be sorted, and it is being run quite frequently, it makes sense to add an index on the column on which you are doing the sort.

Defined tags for this entry: ,