Concept of the Week: Net salary calculator for those thinking of relocation

Last winter, after about 3 years of working for my current employer, I decided that it’s time to, as they say, “take a new challenge”. And because sometimes I’m a bit lazy, and sometimes a bit naïve, I thought that it would be nice to transfer to the Berlin office of my employer’s subsidiary, so that technically I would still work for the same company. This would be easy and fun, I thought, and applied there to a position strangely called a “Creative Technologist”. Which, as it turned out after a couple of interviews, is sort of “a web and mobile developer with some idea-generation skills”.

In order to demonstrate my (somewhat average, to be honest) skills in both web development and idea generation, I decided that it would be nice to set up a small web app and launch it live. So I did it. First of all, I thought, the app should be very simple. Two screens/pages max. Why? Because this is how much I can do with best quality within 3 days before the interview, having the current full-time job. Second, the topic of the app should be practical, but not too common.

Before applying to the Berlin office, there were many other places I was considering: UK, Canada, the Netherlands, Sweden, Italy and even New Zealand. And in order the see, how much money I will need per month for my particular situation, I was using numbeo.com. For estimating the salary I was using glassdoor.com, which, considering the vast number of employees my current employer had around the world, was quite accurate. However, when looking at these numbers, one has to keep in mind, that these are gross salaries, and you still have to deduct the personal income tax. Which, depending on the country, may vary in wide range of rates. The problem was to quickly find these rates and, using sometimes quite a complex rules, estimate the net salary.

A quick googling gave me no one-stop solution. I had to use separate, sometimes outdated services to find the right rates and rules. “Aha”, I thought, “this may be a good exercise”. I wasn’t aiming to cover lots of countries of course, because that would take weeks or event months of work. But implementing it for a few countries, which have flat or not-so-complex tax rate formulas, would be a good demo of the entire concept. So I started working on it.

Using the app is straightforward:

On the main page you pick the country you’re interested in. Let it be Canada, for example:

scr1

Select some additional details (if the rates depend on particular circumstances), like province in Canada:

scr2

Enter the gross monthly amount and get the net amount on-the fly:

scr3

There are a few notable points about this web app:

  1. The entire app is loaded once you open the website, so there are no page reloads after each click; this is an Angular app;
  2. The data for the calculator and its logic is bundled within the app; so you don’t need any APIs; once loaded, the app may work offline;
  3. The data for the app is a JSON file, so you don’t need to set up any MongoDBs or, even worse, SQL databases on the back end, and adding a new country is a matter of uploading a new JSON file;
  4. In order to make it SEO-friendly, the URL structure is designed so that it is always clear, which country you are looking at; moreover, you can always jump straight to a particular country’s page; the URL handling will be done by the Angular router;
  5. I’ve purchased a netsalary.in domain, so that the URL may look like http://netsalary.in/canada/alberta/
  6. The calculation runs as you type in the numbers;
  7. For each country there are also data files and logic for displaying flags and currencies;
  8. It uses Materialize library for Material design-like styling, and it also allows you to look nice on mobile devices by dynamically rearranging the blocks to fit small screens.

Unfortunately for me, this plan didn’t work. Most probably, because I’m not a professional developer, and apart from a few toy projects on GitHub, I’ve got nothing to demonstrate – most of my career I spent developing business and technical requirements and solution architectures. However, I find that the concept that I developed for this endeavor might be quite useful, and some of you may want to take it further and turn into a fully-featured product.

Yes, there are some competitors on the internet, but like I said earlier, some of them are outdated, some are dedicated to a particular country, and some are just not user-friendly.

You may find the demo of the app at http://netsalary-in.herokuapp.com/ and the source code on my GitHub. Feel free to fork it, and if you manage to make something good out of it, let me know.


If you liked this article, consider following me on Twitter. I’m aiming to publish new concepts every week, so stay tuned!

Concept of the Week: Let Artificial Intelligence tell you how good is your look

This is a series of articles presenting the ideas (some may be stupid) of apps and products I come up with. Sometimes I will provide the basic source code, and sometimes there will be just description and simple mockups. In any case, you are free to implement these ideas into a complete product, but don’t forget to tell me that you did :).

I am terrible at picking the right clothes. Every time I do shopping on my own, I end up buying idiotic-looking stuff and never wear them again. Or wear them only when I need to pop into the local groceries to make it look like “I just quickly took on the first thing I found in my closet”. There are of course hordes of salespeople who are trying to help me, but, as the help is rarely useful, I guess, they are just trying to sell me whatever is more expensive and less popular.

This is why I always try to have my wife to buy clothing for me. And even though we sometimes argue about whether this shirt is OK to take on when I’m going to a meeting, almost 99% of time she’s right – that patchy shirt will make me look like I’m a geeky student among the million-dollar-making Wall Street lions in gray suits and light blue shirts with shiny red ties.

Many of the people out there don’t have such a person nearby like my wife. So for such style-blind single people, here’s the idea I’m giving away. A mobile app with a neural network in the back-end, that will tell you if your new look is good or bad. There may be just 2 categories (OK / not OK), or a 5- or 10-star rating, or anything else you think the audience will accept.

The basic flow is that you:

  1. Take the picture of yourself
  2. Get the evaluation

Like this:

I don’t know, whether this girl actually looks awesome, because, as I was saying, I’m bad at this.

Probably, this is what would have happened if I were to take the picture of the kind of person like me:

scr2

This is not me, nor my wife. Just random girl from the internet.

Then goes all that usual share-on-instagram-and-get-million-likes stuff, if the user gets the 5. And, probably nothing will be shared, if she scored lower, because no one likes sharing bad pictures on Instagram.

The app itself is straightforward. The screen for signing in with your Instagram account, the camera screen and the results screen. Can be implemented on both iOS and Android in a day.

The back-end would require setting up a simple API server, which would pass the data to the ‘brain’. The ‘brain’ could be a TensorFlow Serving or whatever you are familiar with.

I do believe that something similar is already there. The idea is simple, and there is nothing in it that has not been done before.

There are a couple of obstacles, though.

One thing that might be a problem here is obtaining the training set. If you decide to implement it, you would need thousands or even tens of thousands of examples for the initial training of the neural network. The size of the training data set highly depends on the scale you would use to grade the image. If there are only good/bad categories, then you need less. If you think users would want something more granular, like 5- or 10-grades rating, then the number of training examples should be increased accordingly.

And of course there should be some sort of feedback on how well the model classified the image. One way to do it would be for the model to look after a certain time on the likes-to-users ratio for each picture taken, i.e. how many likes the shared photo got out of total followers number. For example, if the user has 100 followers, and only 1 liked the 4-starred photo, then the algorithm was wrong, and it should have been 1-starred. There are some obvious disadvantages in this approach, but it may be a good starting point.

The second problem is, to teach the neural network one would need to rate pictures yourself initially. That means this should be a developer with an exceptional taste, feeling of style and knowledge of the latest fashions. Not that I’ve ever met such a unique species of human. It would probably be right to find a designer to cooperate with. Which would still be difficult, because she or he would need to have a galactic-sized level of patience, considering the number of pictures he or she has to rate.

And there is the last problem with this app for a person like me. While shopping, whenever I’m in a difficult situation I don’t usually think, “Oh, is there an app for this?” So every time I’m in a shopping centre, I should be able to somehow be reminded that I have this app on my phone. That means I will need another app, which will do exactly that – and this may be the concept of the next week.