Friday, October 8, 2010

Pink Mayor


Pink Jon Gnarr, originally uploaded by a13xnet.

I guess you can call it luck. I was passing the Mayor's office in Reykjavík today with my camera in hand, when the Mayor of Reykjavík, popular comedian Jon Gnarr appeared. As he moved quickly towards the awaiting car, I grabbed my camera and took couple of photos.

Since it's Breast Cancer Awareness Day, or Pink Friday (as it is known here), it's only appropriate that he's is dressed in pink, as well.

Wednesday, September 8, 2010

Showing your work


Many dots, originally uploaded by a13xnet.

Learning curve of every aspiring photographer has to, at some point, reach a part where the photographs are shown to (very) critical eyes of others. Beginner photographers mostly dread to the thought of being criticized while still learning the trade. That's happening not just with photography or art, but with every skill that involves producing something.

I went through the same dreadful process while learning icelandic language; fear of speaking, fear of saying something wrong and weer into the uknown parts of the grammar. Let me tell you, it's not pretty. Contrary to my belief, doing exactly what I feared of doing helped me improve, both my skill and my knowledge; I spoke icelandic even if it was terrible and completely gramatically wrong and it payed off.

I am sure that there are many talented photographers and artists out there that still keep their work to themselves and that is a shame. No matter how good or bad you are, you will never know that for sure unless someone else sees your work. It is simply not possible to improve if you don't know for sure what to improve and where.

Today I joined a huge community of photographers and artists on flickr.com - it is time for me to show my work. I wish to improve my skill, wish to learn new techniques and fine-tune ones I already am familiar with. Being in contact with others that share the same passion as me is incredibly valuable and I don't want to miss on that.

So, expect to see more of my work over there and I hope I'll get comments and guidelines where to improve.

Tuesday, August 17, 2010

Point of View matters

Photography is a big interest of mine and I have been enjoying taking photos for quite some time. As an aspiring hobbyist photographer, I always try to find ways to improve my skill and better define my photography style. I try not to worry too much about the equipment, but rather how to use it; although, I must admit I have just recently succumbed to the equipment bug and replaced my Olympus E-510 with a Nikon D90. So far, I'm quite happy with that decision. But I digress.

I went out in the garden with my son to play the other day, and took my camera with me, just in case. It was a sunny morning with not a cloud in the sky. As I was coming out I noticed a little patch in the grass. The sun was shining on it and it produced vibrant greens as the light went through the plant's leaves. It felt like a nice photo opportunity. I could have just taken the photo at that moment from my standing point of view (and I actually did, to help me illustrate the point of this post), but that particular point of view did not offer anything of value as a photograph.

Normal POV
With that in mind, I started thinking about what can be done so the photograph tells the story better. I wanted to focus the viewer on the semi-transparency of the leaves and the beautiful greens so a change of background was definitely required. I decided to simply change the point of view and bring the camera to the same level as the leaves. The result is the image below.
Leveled POV
This photograph is much different and it reveals well what I tried to accomplish. While it's not a winner, it's way better than the photo above. These photos are not processed in any way and this one could use a better crop and a bit of dodging.

Every photographer will tell you that it's not just the subject that matters in a photo; the subject can tell all sorts of different stories depending on the point of view. When taking photos, try to explore the subjects as much as you can - sometimes you can yield many excellent photos from a single subject. Not only it's a great learning expirience, it's also a good exercise, especially if you're shooting with a prime (single focal length) lens.

Go out, take some photos and share your expirience.

Tuesday, March 2, 2010

Simple URL shortener in less than 30 lines of python code

I needed an URL shortener for a project that I'm working on that keeps URLs in their short form for a limited time. No need to go into the details about the project as this URL shortener is a helper hack so we don't need to do last-minute rewrite of the app itself.

As an exercise, I decided to write a fully functional RESTful (*buzz*, *buzz*) app with a persistent store for the URLs. I chose Beaker cache for the storage and bobo as the boilerplate base for the app. Thanks to those two components, the actual script is less than 30 lines of python code.

To save the URL and get it's short ID, you POST the URL to the app. The script is caching the URL for an hour, but it's using persistent storage in case the app crashes (it restores the cache contents). I used my short_id() method I wrote about a while ago to generate the ID for the stored URL. If you supply the ID to the app it will redirect you to the stored URL.

You can check the app the git repo here. Feel free to comment and feel free to use it, of course!

To run the script, use: bobo -f shorty.py (bobo is the command to run an embedded bobo web server).
To save an URL, simply POST to it:
$ curl -d "url=http://www.a13x.info/" http://localhost:8080/
(you'll get something like "ax7dc" returned)
To fetch the URL do: http://localhost:8080/ax7dc. The app will redirect you to the saved URL or throw a 404 if it expired (or it didn't exist).

Simple!

Tuesday, January 12, 2010

Install CouchDB with Homebrew with existing Erlang

If you're using excellent Homebrew to install fantastic unix CLI utilities on your OS X, then you might find this handy. I wanted to install CouchDB using Homebrew, but I quickly realized it depends on Erlang being built with Homebrew as well.. As I have built my own Erlang (and don't need another one) for my machine, I decided to look into the formula for CouchDB to see if I can tweak it to use Erlang that's already on my machine.

It turned out that the fix is very easy to apply. Only thing you need to do is to open the couchdb.rb file (in /usr/local/Library/Formula) and do the following:
  • remove the depends_on 'erlang' line

  • edit the call to the configure script so the line --with-erlang points to your erlang installation (mine is in /usr/local/lib/erlang).

Here's the patch:

10d9
< depends_on 'erlang'
16c15
< "--with-erlang=#{HOMEBREW_PREFIX}/lib/erlang/usr/include"
---
> "--with-erlang=/usr/local/lib/erlang/usr/include/"


Now do brew install couchdb and make something wonderful. Don't forget to let me know about it!