?

Log in

No account? Create an account

Mon, Dec. 8th, 2008, 06:49 pm
Open source goodness!

Launchpad will be released under the AGPL on July 21st, 2009, yo!
Exciting times ahead!

Wed, Nov. 19th, 2008, 05:55 pm
identi.ca

I've created an identi.ca account. My username is jkakar. I'm not
sure I'll actually use it, as this is my first time trying
microblogging of any kind. I often have ideas I think I should post
about and end up not doing so because writing well tends to take
more time than I think I have. Maybe identi.ca will be light-weight
enough that I'll actually use it.

One of the obvious things I could do instead of posting more things
here is write on my Facebook wall or update my status, but I
generally find Facebook very boring to use. I'm not interested in
logging in a hundred times a day to see if anything has changed and
I also don't want to be bombarded by notification emails with
nothing in them but a link that invites me to login to Facebook.

From what I can tell, identi.ca is more about real-time
conversations than random status updates. There does seem to be a
lot of useless "Bob is just about to go to bed" tweets, but
hopefully subscription will make it possible to filter out people
that don't actually have anything interesting to say. I'm also
attracted to the fact that it's integrated with Jabber, which means
I can use the chat tools I'm familiar with to interact with it.

We'll see how it goes!

Mon, Nov. 17th, 2008, 12:24 pm
Secret languages

I often go to the Subway up the street to eat lunch. Most of the
employees there are Indian women that appear to be native Urdu
speakers. They all speak pretty good English, but most of the time
they talk to each other in Urdu, even while they're serving
customers.

I have a rudimentary understanding of Urdu--not good enough to
speak, but good enough to get the basic gist of a conversation going
on around me. Most of the time they chat about mundane things, but
every now and then they talk about the customers they're serving,
and typically in unfriendly ways. I get that it's more comfortable
for them to communicate with each other in their mother tongue, but
I find this behaviour, even without the unfriendly comments, to be
very rude. It probably doesn't help that they don't do any of the
social things I associate with being friendly, like smile or make
eye contact.

Am I being too harsh? Should people working with the public speak
whatever language they want with their colleagues? Does it matter
what the content of the conversations are?

Fri, Nov. 14th, 2008, 04:39 pm
Those special moments!

Yesterday I noticed something flicker on the dashboard while
driving. I looked down and noticed that the odometer read 111111.
It was a special moment.

I often notice when the time is 11:11 or 12:34 or 4:32. I don't
know why, but for some reason times or sequences of numbers with
patterns always make me smile. I feel like I've been part of
something, a little secret.

Thu, Jul. 3rd, 2008, 05:17 pm
Wed designer companies

I'm looking for a local (to Vancouver) web design company to work
with me to improve the look and feel of Landscape. Do you have any
recommendations?

Wed, Feb. 13th, 2008, 09:23 am
Time of day

The part about moving slowly like a relaxed cat sounds about right.

Sun, Jan. 13th, 2008, 06:09 pm
Analysis is hard

After even further analysis, it turns out that using or not using ON
DELETE CASCADE isn't the thing that really affects the time it takes
to delete the data. The speed-up is gained by using 3 separate
statements to delete rows from child tables first followed by the
parent table. The same speed-up is present when ON DELETE CASCADE
rules are present.

Sat, Jan. 5th, 2008, 01:51 pm
Database performance

A couple of days ago I debugged a performance issue that was coming up
when trying to remove rows from tables in a PostgreSQL database.
There were three tables involved:
parent:
    id SERIAL PRIMARY KEY

child_a:
    id SERIAL PRIMARY KEY
    parent_id INTEGER NOT NULL ON DELETE CASCADE

child_b:
    id SERIAL PRIMARY KEY
    parent_id INTEGER NOT NULL ON DELETE CASCADE

The parent table contained about 1400 rows, 700 of which I wanted to
delete. The child_a and child_b tables contained 5 million and 2
million rows, respectively, related to the 700 parent rows I wanted to
delete. The first thing I did was run a delete query without changing
anything about the schema. The query took 198 minutes to run.

The first obvious problem, exposed by PostgreSQL's EXPLAIN statement,
was that the foreign key columns in the child tables weren't indexed.
Running the same delete query took 97 minutes after adding indexes for
the parent_id columns in the child_a and child_b tables. A
significant win, but still far too long. It's not acceptable to run a
query on our production servers that would effectively make the
database unusable for 97 minutes.

I dug further into PostgreSQL's EXPLAIN documentation and discovered
EXPLAIN ANALYZE. When the ANALYZE keyword is provided the query is
executed to help produce a more detailed query plan. Running the
query with ANALYZE showed that a significant portion of the time was
taken up with foreign key triggers. I wondered if the issue was
related to foreign key constraints. I removed the constraints
entirely and ran queries to remove the same set of data. They ran in
77 seconds. What a huge performance gain! I then wondered if the
issue wasn't really with the foreign key constraints themselves but
with the ON CASCADE DELETE rules. I added the constraints back
without the ON CASCADE DELETE rules and the delete query ran in 148
seconds. That's still fast enough without giving up the safety
provided by foreign key checks.

The conclusion is that ON CASCADE DELETE is not suitable for anything
beyond very small datasets.

Sun, Nov. 25th, 2007, 01:00 pm
Quality is a habit

The way I write software has evolved over time. Over the years I've
learned a series of practices that are now core parts of the way I
work. I do branch-based development, which means I make small changes
in short iterations so that I can start and complete a task in a
matter of hours or days. This keeps me motivated because I'm
constantly accomplishing little goals. I do test-driven development,
which means I write tests that my software has to pass before I
consider it complete. This builds self-validation into the software
and helps me focus on the behaviour the software must implement to
solve the problem I'm tackling. I participate in code reviews, which
means other people look at the changes I've made and give me feedback
soon after I complete a task. I'm constantly learning from the people
around me and am continually growing my overall knowledge of the
software we work on.

I have a theory that "the things that contribute to quality need to be
part of your daily work flow." One of the key aspects of the
practices I described above is that I apply them daily. In software,
and in life, problems tend to be harder to fix the longer we leave
them unfixed. As time goes on the problems become more and more
deeply ingrained. The practices above cause problems to be caught
before they're hard to fix and a focus on quality encourages us to fix
them before we move on. I think this applies to most of the things
people do. You don't improve your health by eating a really healthy
meal once-a-week. Neither do you improve your fitness by exercising
for several hours only on the weekend. Learning anything is very
difficult if you don't practice regularly. Maintaining a friendship
is hard if you don't have frequent contact. I think that good habits,
those that contribute to quality, are about course correction. If you
apply them frequently you stay on course because you are constantly
correcting. If you apply them infrequently you get some benefit but
it's easier to veer off over time and end up on the wrong path.

When I reflect on my life and identify things that I want to change
I'm increasingly asking myself the question, "What do I need to change
in my daily routine to realize the results I desire?"

Fri, Sep. 7th, 2007, 05:46 pm
Facebook

Only a few hours after deactivating my Facebook account I've gone and
reactivated it. I was walking to the studio today to play some drums
and thinking about the whole thing when I realized that my decision to
deactivate the account goes against my basic principles. That is, I
don't believe in making decisions based on fear of the unknown. If
you know something is dangerous, then sure, weigh the risks and make a
decision about whether you want to go further.

I think that making decisions based on the fear that some unknown bad
thing might happen is a very negative way to live. That kind of
behaviour excludes a whole range of positive things that could happen.
It also excludes bad things from happening. No one wants bad things
to happen, but on the other hand the only way you grow is to
experience adversity and learn how to deal with it. If you're
comfortable you're probably not growing. I want a positive attitude
that treats adversity as an opportunity for growth.

I believe an important part of this is having a soft mind. By that I
mean that it's important to have a mind able change when it discovers
a better way to do things. In this particular case the change is very
trivial and easy. Nonetheless, part of the reactivation is about,
given that I realized my behaviour is not in line with the way I want
to live, changing myself to be in line with how I want to be.

10 most recent