Archive for the ‘blurps’ Category

The end and a new start

Wednesday, December 31st, 2008

It’s the end of a year, a year of change for me.

I managed to finish my thesis so I’m finally and officially Bsc of economics/business. My thesis talks about motivation of IT developers, an interesting subject for me and I learned a lot in the process of writing it. I hope to work more on this topic in the following years, especially with companies which have problems motivating people or just want to know how to motivate their employees better. We’ll see how it goes…

The other big change this year is that I switched jobs. After 8 years of working at a digital agency called Parsek I moved to a start-up called Zemanta. The responsibilities are quite different as at Parsek we worked for clients who sometimes made us do things that are not the best for end users (I know they meant good though). At Zemanta the team is smaller but the client base is much bigger as we have to cater directly to end users.

I’ve also won the Slovenian Young Interactive Entrepreneur award so I was a finalist for the International award and went on a tour of England’s digital industry in November. I didn’t win the award but it was a great tour with great contestants that I intend to keep in touch with.

A new start

In the new year I have a lot to do. A lot of the projects I was working on in 2008 are still running in 2009, I also hope to launch a new project this year. This means no rest for me – the first weeks of the new year are going to be hard work full time.

As posting in the previous months was quite slow I already have a set of things I want to write about in the new year so you can prepare for more reading in the near future.

I don’t want to go into details of my plans for the new year as it’s time to go celebrate – I’ll think and plan tomorrow.

Search photos by colour

Friday, October 24th, 2008
A screenshot of hot tags on Flickr.

Image via Wikipedia

I find this so utterly amazing even though people here tell me it’s not that hard to do. You can now search CCed Flickr photos by colour – this might probably be the easiest way to get to photos to use on mock-ups, much better than search where you have to rely on people tagging photos correctly. The urls are even bookmarkable, which means you I can give you a link to the colours used on this blog: About, Blog, Projects. You can even specify more colours (via had@koornk).

Reblog this post [with Zemanta]

How jQuery.windowName.plugin works

Saturday, October 11th, 2008

I wanted to share a bit on how the window.name transport plugin for jQuery works, so developers in the crowd can find their way around the code and that you can understand what is going on and where can it break.

How it works

The plugin hijacks the $.ajax function and will do its magic when you’re POSTing to a foreign (domain not same as domain of document) domain or you specify settings.windowname to force it. If these conditions are not met it will use the default ajax function to create the request.

The script first creates an iframe that will be the target of its request. If the request is of type GET it will open the location with the specified data as querystring in the iframe, if it’s a POST request it will first create a form with hidden fields that represent all data being sent. To allow sending of method, target, action and submit some magic is done (those override some important form object stuff) after which the form is posted to the iframe. This is readyState 2.

After the posted file is loaded (meaning it should have now set the window.name) an onload event is fired that loads an empty local file into the iframe. The empty local (same domain as the page) file can be set in the settings (settings.localfile) – if it isn’t the script will first try loading /robots.txt and /crossdomain.xml (two files commonly found in the root that are small) and if both fail it will load the page it’s on. All this is done only on IE where 404 doesn’t count as local. This is readyState 3.

When the local file is loaded and it is surely local we can read the text from the window.name. If it’s a string and it isn’t our default we set status to 200 and set the string as responseText, otherwise we set a 502 status. We can now cleanup which means removing the form, the iframe and all references we created in the global space.

The whole thing is written in such a manner that it will return a fully qualified XMLHttpRequest object with all methods and properties. You can abort the request and it will cancel loading and clean up, you can access readyState, responseText and everything else you’d do to an XHR object. It does however not implement features that cannot be used due to the fact that it’s an ordinary form submit – setting headers and such.

Interesting use

I’ve found that window.name transport is ideal for saving files – you can force the window.name transport to a url that will return a file with an Content-disposition: attachment; header. When the file loads you’ll get a popup to save it and the frame will disappear automatically. It’s even more convenient if you’re creating the file with a POST request.

Download

You can download the plugin here or you can go to the jQuery plugins page to get it

Reblog this post [with Zemanta]

Levels of government

Tuesday, September 9th, 2008
Overview of Piran, Slovenia
Image via Wikipedia

Just now the chief of Slovenian Police (about 10.000 employees according to their website) said that he cannot be held responsible for a thing that a guy 20 levels below him did wrong while talking about Slovenian Interpol not responding to an Austrian Interpol request within a year.

Funny – while working at Parsek I worked on the Cisco Systems Slovenia website. If I recollect correctly our contact at Cisco Slovenia was only about 7 or 8 steps from the CEO of the company which has about 66.000 employees (according to Wikipedia).

Reblog this post [with Zemanta]

Dear Opera guys…

Tuesday, September 2nd, 2008
Large bookcase #1, 3rd shelfImage by vjl via Flickr

Can you please tell me how to add external stylesheets with JavaScript? I’m trying to add them by creating a link element with a rel=”stylesheet”, type=”text/css” and a valid href and then appending this to the head element but it doesn’t seem to work. I’m quite sure my css files are good since when stripped down they only contain body {background-color:#ff0000;}.

It’d be great if you could post a solution because I really don’t want to spend another hour thinking about this – I already spent four and I got nowhere.

Reblog this post [with Zemanta]

Reading JavaScript

Thursday, August 28th, 2008

Douglas CrockfordImage by Edd Dumbill via Flickr I’ve just received two books about JavaScript that will keep me entertained over the weekend. The first one is from the father of JSON, JSLint and JSmin Douglas Crockford, whose series of lectures on JavaScript is really a great video introduction from beginner to intermediate and sometimes even pro level and is called Javascript: The Good Parts. I haven’t even tried to look at it because I’m scared I’ll start reading it and won’t get any sleep.

The other one is from the new kid on the block, the jQuery author and JavaScripter extraordinaire John Resig, called Pro Javascript Techniques. Reading the jQuery code is always one of the most fascinating parts of work, so I just had to order it.

I’ll try to post a review of both of them as soon as possible, but it might be later than I hope since I have a lot to do in these coming weeks.

Reblog this post [with Zemanta]