The Official Kountr Blog

Just another WordPress.com weblog

Archive for May 2008

Where Should the Logic Go

leave a comment »

One of the features I added for someone was the days since last click, on a kount. Of course if the answer is 0, it reads “0 days ago” which, although true isn’t very smooth.

Someone suggested that if it is 0 it should just say “today”. This is an easy change to make, but I have an option. Currently I pass the number from the server to the template, where it is added to the string “ days ago” to produce the resultant phrase. Now I need to add logic to check for zero and change the string appropriately. I can do this logic in the template, or I can do it in the view and pass a string.

This isn’t a question of server vs. client because both of these will be executed on the server. It has to do whether this is presentation or not. I would argue that this is purely an issue of the presentation of the data, as such, it should be done in the template. I wasn’t sure when I started typing the post but I am sure now.

Use your views to serve up the raw data, as much as you can, and use the template for the presentation of that data. It is a soft rule because there are going to be cases where the power of python is necessary to solve the presentation of the information. I was working with date formats yesterday and I absolutely required the dateutil package to create the desired human readable date string. I couldn’t have done that presentation in the django template.

Written by Michael Artemiw

May 23, 2008 at 3:09 pm

Posted in Uncategorized

Intuition Can Lead You Astray

leave a comment »

Myers and Briggs would consider me an ENTP. I rely on my N quite a bit. I just ran into a painful to debug issue with Django templates thanks to my oh so helpful N.

I had an ‘if’ clause and I put a  ‘block’ inside it. I only want to update the block if a certain condition is met. Intuitively I could read {% if … %} {% block … %} … {% endblock %}{% endif %}. I guess the precedence comes into play, the block gets read no matter what, so here I was debuging the variables in the if clause only to find out they were being ignored.

The solution is to invert the block and the if tags. I guess if you wanted to set the contents of the block on a conditional but have it remain as an ancestor template had set it, then you could use the {{ block.super }} tag to import that value.

The bigger picture solution is keep intuition in check when debugging. I suspect the counter point it true for all you Myers-Briggs S’. Keep you N and your S in balance.

Written by Michael Artemiw

May 21, 2008 at 6:06 am

Posted in Uncategorized

What I’ve Been Up To

leave a comment »

Not blogging, that is for sure. I have been working on a backlog of feature requests. You can now easily post a Kountr widget on your blogger or blogspot blog. And there is a new type of kount, the KountUpOrDown (we need a marketing department bad)

I mocked up the UI for this new kount type and it made me question the UI for all the other kount types. Once I was done implementing the KountUpOrDown, I cleaned up the other kount types to use the same UI elements. I am learning valuable lessons from all of this feedback.

A great product/service vision should tell you how to implement your users’ requests. This is in direct contradiction to the common vision as an explanation for why you shouldn’t implement your users’ requests.

We are doing an experiment with Kountr, implementing all user feedback as quickly as possible. If our vision is sound, then the features we create in response to this feedback will lead to a great service.

The next time you find yourself wanting to refuse user feedback because it is out of line with your vision, ask yourself how you would solve the problem in line with your vision.

Written by Michael Artemiw

May 20, 2008 at 5:17 am

Posted in Uncategorized

There Really isn’t Going to Be a Day Off Ever Again

leave a comment »

And I am loving every minute of this. Once the kids were asleep I started working in earnest on a new widget for Kountr. This is something Antoinette and I have talked a lot about but no one had asked for it. Until today. A coworker sent me feedback asking for an iGoogle widget. This was great because I wasn’t sure what type of widget to create. Rule of thumb, develop the one your user wants.

It turns out it is really easy to create widgets with the framework that Google has created.

If you would like to try out the widget go to iGoogle and click on “Add stuff>>” it is in the top right corner. On the left side there will be a link “Add feed or gadget” click on this. In the text box type “http://www.kountr.com/media/counter/kountr_widget.xml” and type Enter. The widget will be added to your page.

To select the kount to display, find the kount at http://www.kountr.com, then look in the url. The number at the end of the url is the kountr id. Back on your iGoogle page go to the widget menu and select “Edit settings” then enter you kountr id in the text box.

I haven’t got it perfect so your feedback is very welcome. I think this will be a great feature and I need your help to make that happen.

Written by Michael Artemiw

May 8, 2008 at 4:57 am

Posted in Uncategorized

When Was the Last Click and Let Me Delete

leave a comment »

More feedback from one of our regulars. He wanted to know how long it had been since he last incremented his kount. He would like to do it daily, but forgets, so this info would help him keep it in the right ball park. Check out his kount with the new ‘Last Click’ details.

I like all the meta data we are starting to collect about the kounts. I suspect we will hit some critical mass at which applications of this explode.

The other request was for the ability to edit a kount name or delete it. Creating a generic edit looked like a little more work then I was prepared to do tonight. I implemented the delete. Now on the page for every kount you have created their is an ‘X’ in the bottom left. Clicking on this ‘X’ will take you to a confirmation page and clicking delete will remove the kount permanently.

Now if you create a kount but want to change it, you can delete and create a new one. Anticipating this use case I made the create page the destination after performing a delete.

Written by Michael Artemiw

May 6, 2008 at 7:27 am

Posted in Uncategorized

TextMate

leave a comment »

I used textmate about a year ago, when I first started working on Kountr. I stopped, and I had thought I had a good reason. I was lured back today and I am hoping my reason last time was me being cheap. I love TextMate. It is so much better than Text Wrangler, which I had been using most recently. I also really liked Vim, but that was weak on multiple files.

Best stuff so far is the handling of whole nested directories in the file pane. Also the snippets make life so much easier.

Written by Michael Artemiw

May 4, 2008 at 5:44 pm

Posted in Uncategorized

Most Active Kounts

leave a comment »

A friend, using the site, and realizing how much we relish (I like relish) feedback, suggested we have a most resently active page, like our newest and highest pages.

And I am now done. The ‘Most Active’ page is up and running.

This was actually a quick change to make for a couple reasons

  1. Django has this great ‘auto_now’ switch for date fields that takes care of auto updates on each save of the object.
  2. I had already organized by views.py so that adding a new multiple kount view, like Newest and Highest, is just 3 lines of code.
  3. I am making good use of Django’s templates so I only needed to add the menu link to a single template.

Django really is the web dev framework for perfectionists with a deadline. Which is awesome because I am by no means a perfectionist, so it is wicked fast for me.

Written by Michael Artemiw

May 2, 2008 at 7:17 am

Posted in Uncategorized

Feedback Feedback

leave a comment »

Got some more great feedback today. I was wondering why most people didn’t leave an email address with their feedback, and I got a possible explanation today. On some browsers the feedback form may be drawn incorrectly so that it looks like the Email text box is missing.

It renders fine on the two test systems I have here (Firefox on OSX, IE7 on WinXP). I have made the width of the text boxes smaller so that I might avoid any overflow issues. I’ll wait to hear if this has resolved the issue.

Written by Michael Artemiw

May 2, 2008 at 5:57 am

Posted in Uncategorized