Author Archives: Aleksandar Janković

About Aleksandar Janković

Direct, smart and brutally honest, Alek is a natural problem solver. His analytical skills will make you addicted to his advice and he can find solution to your problem faster than you can say Ćevapčići. So, if you lose your car keys don't hesitate to contact Alek. He can both design and implement a software solution for finding your keys. And if you ask him politely, he may even turn it into a highly scalable web service.

Ecomapi: Finding all of the use cases

This is the third post in creating an open source project series.

In order to better understand the system and organize the project in optimal way it is always a good idea to include Use Cases in project analyses. In simple terms, use case represents a system functionality initiated from the user of the system in order to achieve a certain goal. Prerequisite for finding all of the use cases is understanding who are the users of the system. Let’s follow the standards and call them Actors. This is because they act on the system, but they actually represent a role that the concrete user can have.

Like on any other journey it is always easier when someone else walked the same path before you. In this case there are plenty of eCommerce offerings on the market currently. They were very useful in helping me recognize an already established and proven list of actors and use cases for the problem at hand.

In my analysis I found three actors and around fifty use cases (google docs spreadsheet). That is a lot of work for me to do in this short span of time. So I am going to organize the list a bit and reduce it to necessary use cases only.

More on this in the next post.

Open Source Project Definition

My yesterday announcement didn’t gain much traction or feedback. I guess that is what you get when you neglect your blog for almost a year. It would be much better to do this with a push from the broader audience, but I guess I have to prove myself worthy of the attention. Let’s begin by defining the problem.

Problem definition

To be honest I am an entrepreneur in my hart. During my work for clients many startup ideas develop in my mind. Since I am working with eCommerce all of those ideas at their core include basic eCommerce setup: products organized in catalogs, customers can order products, payment processing, shipping processing, etc. It would be nice to focus on the parts that will differentiate those ideas from competition and leave the eCommerce part to some stable library.

Sometimes client came with request to transform their current site into an eCommerce system. Until now clients were using some well known or custom built CMS platform and they want to continue to use it. They want to keep their existing data and reduce transitional costs as much as possible. It would be a nice thing to just plug in some stable library that will hook into the existing data.

Emerging pattern in both of these cases is a need for a generic, well executed, and tested library that would encapsulate eCommerce business logic.

Project name

I thought about project name for a while and decided it will be called ecomapi. It’s nice, simple and it’s descriptive enough (ecommerce api). I registered the domain and will soon point it to my Linode instance (referal link) where all of the documentation will be hosted.

Project description

ecomapi is an open source library that encapsulates eCommerce business logic. If you look at it from the MVC pattern point of view it will represent the Model. It is designed to be embeddable into any existing system or a framework but can also be used as a basis for developing new projects. By using it in your project you can completely remove e-commerce business logic from your planing, development and maintenance phase to gain on time and resources.

Library is designed using OOP methodology and practices and consists of set of classes that allow these features:

  • Product management
  • Product types
  • Product categorization
  • Product relations
  • Catalog searching and filtering
  • Customer management
  • Order management
  • Shipping processing
  • Payment processing
  • Tax calculation
  • Defining custom business rules for order processing
  • Reports generation

Project guidelines

Development of the library needs to be guided by these statements:

  1. Fully documented
  2. Embeddable into en existing systems
  3. Flexible enough to allow usage in non-standard use cases
  4. Properly tested to assure reliability
  5. Fast (inducing as little overhead as possible)

Project goals

There are only few for now:

  1. Develop a working prototype until January 23rd, 2012.
  2. Continue with iterations until stable version 1.0 is reached.

Programming language

This was a tough decision to make and I decided to go with PHP. I really love Python and I think it’s one of the best designed platforms for development. But PHP’s much bigger audience prevailed in this case. If you consider all those WordPress, Drupal, Zend, CodeIgniter, Cake, etc. powered websites out-there that could use this kind of library, Python would not be an optimum choice. Huge barring on this decision have the fact that PHP is my primary tool at the current position.

I would also like to mention that I considered making this library language agnostic. This could be done by making the communication with the library going through some protocol (HTTP, SOAP, Custom, etc.). Reasons I rejected this idea:

  • Library is a more general case. User can add which ever protocol they want on top of the library if the need comes for something like that.
  • It will turn project into a specialized server. Users will have to deal with setting up the server instead of embedding the library into their project and knowing it will work.
  • It will add another layer that will increase possibility for errors and bugs, it also needs additional testing.
  • There are speed considerations. Library calls will always outperform service calls.
  • Last but not least target audience for this project doesn’t have a need for something like that.


On this page I set some of the crucial elements of the ecomapi project. Without farther delay I will start with concrete organization and implementation process to validate my assumptions about this project.

In the next post I will explain the work flow of the project.

I have 10 days to bring an open source project to life

I am on a vacation until January, 23rd. Vuhu!

And you know what that means. Gym workouts every morning to make the spine muscles strong again. Relaxing afternoons on the good old couch. A quick walk in the park. And at last, a time to work on something that doesn’t have $$$‘s written on it. It’s been all capitalism for me in the past few years and a hippie college days were long gone. I want to do something for the open source community for a change.

Contributing to the open source has always been my desire. But times were tough and I only recently gained financial independence to stand on my own two feet. In the mean time I’ve been using open source software and made my living out of it. Even this post is written in a Firefox running on a Ubuntu installation. But enough about me let’s talk about the project.

Every day for the next ten days I will work on a open source project. I will use this blog to document as much as I can of my decision making process. This includes strategic decisions, requirements gathering, diagrams, architectural decisions, code samples, guides and anything else that I think will be interesting for a community to know and get a feedback on. I will try to put my knowledge, experience, and creativity to good use and you will be given an opportunity to witness the birth of an open source project.

I will try to make continuous stream of posts everyday:

  • For every open source project good documentation is crucial, and this is a step in a right direction
  • You will be given opportunity too give feedback and influence project future
  • We can collectively learn by discussing project development and learning from each other
  • Future users will know why is something implemented in a certain way
  • And interest from the community(if any) will give me a will to continue with my undertaking

And now on to the crucial thing that I need your feedback on. What project idea should I undertake? What software does the community need that I can fulfill with my field of expertise? Do you remember any library that you wanted to have and thought: “Oh, it would be cool if there was an open source project that implemented this for me”? I have an idea set on my mind and I will go on with it if there are no other options. But I would like to hear other opinions about this.

Also I am aware that 10 days isn’t much, but in my opinion it will be enough to get the basic stuff done and get to the version 0.1. Later on I will continue to maintain the project and hopefully get it to the version 1.0.

Like any other attention seeking blogger I will submit this post to Hacker News and Reddit because those two communities are the ones I respect the most and would like to hear their opinion so you can discuss this post over there.

If you are interested to be involved in the project then you should contact me on twitter and subscribe to keep yourself updated.

Does being vindictive pays off?

Yesterday redditors brought Remember to always pay your developer up to the front page. In case you missed it here is the screanshoot of the now famous webpage. In a nutshell, some developer haven’t been payed for his work and he thought this is the right way to remind his customer of that.

I’ve been in these situations before and I know how it feels not to be payed for your work. But I wonder, is this the real way to deal with these kind of customers? Beside legal implications, one more thing to think about here is reputation. If it comes to notion that you are a person who do these type of things to your customers, you are in trouble.

Let’s give it a thought. What are the reasons for a customer to avoid paying you? First and obvious reason is, customer doesn’t have any money. In that case you can only wait for him to get some money so he can pay you for your work. Of-course denial of service is no option here. You should let him run his site so he can earn some money. In my opinion this type of misunderstanding should be solved at the beginning of cooperation by evaluating customer’s ability to pay you.

But what are the reasons if customer has the money? I think there are two options:

  1. Customer doesn’t value your work so he thinks you don’t deserve to be payed.
  2. Customer planned from the beginning not pay you and deceived you intentionally to work for free.

In my opinion every other case is just a variation of these two. Let’s see the first option. If customer believes your work is of no value you need a way to prove him otherwise. Maybe this developer is doing just that. He brought the website down and allowed the customer to recognize the value of developer’s work by measuring his losses.

The second option is the worse one of all three mentioned. Because customer never had any intention to pay you. His only intention was to use you. You can’t change his opinion in any way. These kind of people only submit to the hand of law. Only contract can save you here because they never going to sign one. If customer doesn’t want to sign a contract then there is something fishy going on.

For the end only advice I can give is that whatever your preference might be in dealing with nonpaying customers you should always try to put feelings to the side and think of the outcome you are trying to get. 

Chrasks – Chrome plugin

During New Year holidays I wanted to learn more about creating Google Chrome plugins and using localStorage. Logical decision was to unite these two into one idea and create something useful.

Result is Chrasks Chrome plugin. A simple task managing application.

You can download packed version here. Nothing fancy, just enter a task in textbox, press “Create task” button and your task is hopefully saved. Local storage is used as persistence mechanism. You can checkout main javascript file here.

I also have to give credit to for lovely icons.

Twitter accounts feed application

This post is a continuation of my previous post. I will explain how to implement a job interview application I was given last year. Let’s call it Twitter accounts feed. In case you missed it here are our tasks:

  • Build PHP script that will pull Twitter feeds for each selected account, merge them and sort by time of post and return as JSON.
  • Create JavaScript code that will send request to the above PHP script and print response as HTML.
  • Implement sliding functionality for switching the panels on page (existing panel moves to the left, new one arrives from the right side replacing existing one).

Clearly this application can be done without the PHP part, but the purpose of this is to also test applicant’s PHP programing skills. As you may assume I already written this application and shared it on github. You can find source code here and demo here.

Basically it goes something like this:

You have an index.html file which is the first file that is pulled when you visit demo page. Within it’s <script> tags it tells browser to load two javascript files twitter-accounts-feed.jquery.js and sliding.panels.jquery.js. First file is the main javascript file that handles the execution of this application and the second one is jQuery plugin for adding that super cool sliding effect to the panels.

First file handles the submit event of the main form. After submitting the form it pulls feeds from fetchfeeds.php script in JSON format and renders it as HTML panels. Also after html is generated the sliding effect is applied. fechfeeds.php script is using two classes TwitterFeed which represents the feed for the account and TwitterFeedCollection for representing collection of feeds.

For now you can just look at the source code and code comments on github but eventually I will write proper tutorial on specifics of each file.

Always finish what you started

Past year was a very productive for me. I’ve been working as a web developer for a small Belgrade agency called KlanRUR. They base their business around computer games and my responsibility was everything that had to do with their websites. I was happy, worked with a bunch of really great people and the pay was acceptable. But something bothered me.

You see, I left college in order to get this job because I needed the money at the time. And whenever a thought about unfinished studies came to my mind I became depressed. That thought was something that was sitting at the back of my brain holding me back from dedicating myself completely to the job at hand. Decision to leave my employer at the time, was inevitable.

So I saved some money, set a New Year as a deadline for finishing my studies and resigned. But listen to this.

The very last day behind my desk, as I was packing my stuff and preparing to leave, my mobile phone rang. A gentle female voice on the other end of the line informed me that I was selected for a first round of interview at online startup Vast.

There were some job openings during August at Vast and I applied for a position of front end developer. And they were calling me like 2 months later. Completely forgot about them. To tell you the truth I was excited at first. My first thought was screw studies, I am only finishing them so I can work at a company like Vast.

It turns out I am not an idiot so I passed the first round. The second round was like a small test project done from home. I’ve received an assignment trough email and had 2 hours to send back a complete solution. Nothing really hard but somehow, I have managed to blew it. You see, I use a mobile internet, so I share ip address with everyone in the area who owns a mobile phone or mobile internet. Consequently the only response I was receiving from Twitter API was that I used up all of my API calls. It was very frustrating.

I managed to hack something up, and sincerely that was a complete pile of rubbish. I knew I’am not going trough this round. But that did’t kept me from fixing the project the next day. And it won’t keep me from publishing it on this blog.

In the next few days I will publish a series of posts which will hopefully explain, how you can finish this assignment yourself. Basically these posts are going to be tutorials about php, javascript, jquery and css, so stay tuned.

What is a CMS?

To most people CMS is just a buzz word. One word that sales people use when they want to sound important (or confusing). To state it simply, CMS is a short way of saying Content Management System. What these three words hide beneath this vague abstraction? Well first read my opinion on purpose of CMS:

The main purpose of Content Management System is to lower the cost of managing your content.

Real representation of cost can vary. It can be money, it can be time or anything else of value that you have to give up in order to manage your content.

Take a look at this diagram:

First of all CMS is a system. And according to Systems theory, a system is represented by input, system it self(attributes and behavior) and output.

So basically, CMS should represent a black box for you (in this case red). Theoretically all you have to do is input only necessary “stuff” into system and wait for desired output. Everything in between should not be of your concern. It should be the concern of the CMS developer. It is his response-ability to create a good system structure so that CMS can fulfill its purpose and lower your costs trough automation and efficacy.

In real life, CMS is represented by software. Usually a web software. And there is a lot of it. I mean thousands of different implementations. As if every developer on this planet tried to build one for you. Only thing that separates these software apart is their system structure. For example, they are adjusted to work with different content types (documents, slideshows, images, video). They have different behaviors, some are simple blogging platforms, some are enterprise software for holding sensible information and some are online stores.

Which one to choose? Well this is a broad topic and requires an article on it’s own. Usually it depends on what output you require and what inputs are available to you. CMS software should bridge these two together. And you should choose according to your requirements and CMS purpose, not it’s popularity.


It’s about people, people

I found link to this strip at Hacker News thread. A pure classic.

It's about people, people


In my opinion it clearly represents the buzz created about recent Google AI Challenge 2010 winner Bocsimacko. Google AI Challenge is a competition organized by the University of Waterloo Computer Science Club and sponsored by Google. Competitors try to solve given tasks by writing algorithms in computer language of their choice. Clear winner was a guy from Hungary Gábor Melis.

But the news media was more interested in it’s chosen language for the competition than his skills and mind.
Maybe Google should hire “Lisp language” instead of this talented guy…