Wednesday, April 1, 2015

Entrepreneurship

Short summary of my own time as an entrepreneur. This was a significant time for me and has changed me profoundly in multiple ways.

My company

The company I co-founded and stayed with till the end was named Level7. It was a gaming center, which had ~30 computers and a few game consoles for gamers. Also as a side-product we sold some snacks, candy and drinks to our customers.

We made a very good start with it. Basically our starting budget was supposed to be a lot higher than it was, so already at the start we encountered some problems. Those didn't really slow us down and we got it running stable financially in a few months. We got customers heavily from e-sports / hard-core gamer backgrounds at the start. We held e-sports tournaments and were generally very active in the gaming community. My roots personally were at the gaming community and that was my passion for this and the reason why I had a huge loads of motivation and vision.

During the years we made our mark to the Finnish e-sports scene. This was mostly through arranging very prestige tournaments at our premises. Some of the tournaments would not have been held at all in Finland and especially with such a well gathered prices, without us. And for that I am very proud!

In the end we parted with not-so-warm relationship with my business partner who was with me during the years we operated Level7.  Despite that, I am still grateful for having him with me operating the gaming center, because in many aspects we complimented each other. I was the technical and more visionary guy and he was the better organizer, stricter and better in relations towards external relations (like sponsors). The biggest problem between us, as it often is in business, was money. This appeared when the company was going through bad times in the end. But enough of that.

What I got from the experience

Running my own company has been the most profound experience I've had so far in my life. Well I can tell you that having a kid is really something, but even considering that the entrepreneurship was really awesome. Those are two very different experiences.

What I've learned:
  • You can achieve a lot of things, once you really decide to do them and put everything you have into it. That's what many of the successful entrepreneurs have also said and I totally agree with that.
  • When you are running your own company, the only person you can count on 100% is only you. But this comes down to people skills a lot. If you are good, you get more out of other people and you get then motivated better. But also note that never-ever get bitter about it or stop trusting other people and being cheerful and motivational. I think the worst thing you can do is do everything by yourself. This works at the beginning, but I've seen it turn upside down, when the company grows enough.
  • Also running your own company - and doing it well - will force you out of your own comfort zone a lot. If you want to do it well, you can't evade or postpone any things, just because you don't like it or you are not good at it. If there is nobody else to handle it, you have to take the responsibility and learn to do it.
  • Time management and prioritization are the most important single aspects. You should never waste your time on things that don't really make the most impact. If you waste time on doing things that will have very little effect on the operating of the company, but make you feel better, it's a bad choice. Get out of your comfort zone and do the things that need to be done, period.
  • Business world is selfish and sometimes cruel. Still, you do not have to be cruel or selfish yourself (and should not as that will cause bad relations), but you have to take into account the possibility of something bad happening when you operate the company. Despite of these warnings, my experience was surprisingly smooth. Though I had one lesson I will not forget.
  • Always write all deals you make with other parties in writing. No matter what it is. Email is also valid agreement and should work almost always.

Pros

  • You will learn a lot not just about entrepreneuring, but also about business life in general, when you deal with other companies. This will help in normal work-life too.
  • You have to push your limits and develop yourself, if you do the entrepreneurship properly. People are never ready or perfect and if everything goes ok, you will evolve as a person.
  • You will gain awesome memories and experiences. Really the likes that you will remember the rest of your life and be really proud of them!
  • You will learn to take the initiative (if you haven't yet) and do things that you don't want to.

Cons

  • Companies taking advantage of you, if you are not careful.
  • You have to do a lot of things, which you don't like, i.e. going out of your comfort zone.
  • You might not even make a normal living out of it, but rather have to make a lot of compromises financially. I know I did.
  • You will most probably work more than you earn (especially at the beginning). Most entrepreneurs are not in it for the money, but for the independence.

Microsofts autodiscover feature in linux

Just a short hint for anybody who wants to make Microsofts autodiscover-feature work in linux environment. Also this is a special case as I needed to make the autodiscover work with another domain. By this I mean if the domain in question is: mydomain.fi and you have a webhosting company: hosting.fi, then you will need to insert a DNS entry for the mydomain.fi which points to hosting.fis general autosdiscover DNS-entry. As:
mydomain.fi -> autodiscover.hosting.fi
autodiscover.mydomain.fi. IN CNAME autodiscover.hosting.fi.

This special need came when I worked at a hosting company and required just couple special alterations.

The only real script you need for that is here: http://0wned.it/wp-content/uploads/2011/09/autodiscover.php_.txt

Though the crappy part is that Microsoft wants to make everybody else's life hard, you might have to make more adjustments to the autodiscover, to make it work.

First I had htaccess redirect all the traffic to a php-file. So it doesn't matter which way the autodiscover is called it always works (e.g. some implementations call it with capitalizez (AUTODISCOVER) and some with lowercase (autodiscover).

.htaccess
RewriteEngine On
RewriteRule ^.*$ autodiscover.php [NC,L]

Then you want to redirect the http requests to SSL-site:

Top of autodiscover.php:
if (empty($_SERVER['HTTPS']) ||  $_SERVER['HTTPS'] == 'off') {
    header("Location: https://autodiscovered.company.com".$_SERVER['REDIRECT_URL']);
}

From here you might realize that you need at least 2 DNS-entries:
autodiscover.domain.fi. IN CNAME autodiscover.anotherdomain.fi.
And in the anotherdomain.fi zone:
autodiscovered.anotherdomain.fi. IN A [IP ADDRESS]

The way autodiscover works is it asks for certain file for the email address. If the email address is person@mydomain.fi, then autodiscover asks for autodiscover.mydomain.fi/autodiscover (actually I probably don't remember the correct path now, as it was some while back, but you get the idea). When it finds this it will use several methods to retrieve the data, in order. You can actually find the methods just by testing autodiscover on some domain here: https://testconnectivity.microsoft.com/ , but this method works on the HTTP redirect method.

The autodiscover.mydomain.fi should be redirected to SSL-site, otherwise autodiscover rejects the redirection.

2-way databinding in javascript

I ahve been using angularJS for a while now and I've learned NOT to like it. I liked it at the beginning, I mean who wouldn't, it's pure magic. But when you get deeper to it, you will realize some deficiencies. I will only mention the one that was the biggest for my latest project: Performance. I had an application that has excel-like table with hundreds or even thousands of cells, that could have naturally even 30 x 2-way databindings inside them.

I actually fixed this (to some extent) with making updates manually, so in the end I didn't have much use of angular, since fixing it's short comings takes a lot of time.

Later on I noticed a great article on 1-way databinding with vanilla javascript. I haven't actually tested this anywhere yet, but will definitely keep it in mind. With code-sections / libraries like these I like to work with, but working with big frameworks, always brings downsides too. At least for me almost always they bring a lot of work with fixing the issues the framework brings with it.

So I suggest to read this article about the javascript 2-way binding:
http://www.sellarafaeli.com/blog/native_javascript_data_binding?utm_source=javascriptweekly&utm_medium=email

P.S. To be honest, I'm not even excited about angular 2. Even though it breaks the compatibility with 1.3, you would assume it should be really a lot better than 1.3, but reading about it doesn't get me positive about it at all.