Frans Ekman's blog


View Frans Ekman's profile on LinkedIn

The 3 Same Demons that Startup Founders and Stock Traders Face

You would think that startup founders and stock traders have nothing in common, but when it comes to characteristics needed for success, it turns out that they have to overcome many of the same psychological difficulties. I was reading the book Trading for a Living, partly because I am involved in a software project related to it and partly because I have been doing some trading as a hobby myself. A major part of the book is about trader psychology, like how to defeat your inner demons to succeed. I noticed that this stuff really applies to startups as well.

1. Dishonesty and Postponing Losses

Honesty to oneself is important in any field. The book advocates keeping records of all trades and planning ahead. Before doing a trade, one should have a plan when to exit the trade and always put a stop-loss to limit the amount of money that can be lost on the trade. Amateur traders sometimes neglect this and get stuck with their shares when prices decline. Their hope of some magical event turning the price trend around keeps them from selling. For them it is always possible to find some indicator giving false hope. It is human nature to postpone losses.

The record keeping and planning in the startup world is covered by basic customer development, where you write down your business hypotheses and your plan to test them. This includes what the result must be in order for the hypothesis to be valid. Steve Blank, the inventor of the customer development model, also speaks for the importance of writing down the exit criteria (pass/fail) of a test before executing it in his Startup Manual. It is too easy to find some other metric showing positive signs. Founders need to be honest with themselves, otherwise they will hurt themselves just the way traders do when they hang on to their shares to the bitter end.

It is very easy to fall into this trap. For example a simple MVP (Minimum Viable Product) with a landing page may be used to test general interest in a new product. One might set a specific requirement for the signup ratio of new visitors coming to the page. If there are too few signups but instead some social shares with discussions and long visits to the page, the founder can easily find a way how to interpret this as a success even though it is not.

The new observations about how users shared and discussed the page is still valuable insight. It should be used to plan new tests. However, it cannot be used to pass the current test, that had a different requirement. It is as easy for a founder as it is for a trader to find false proof justifying the current strategy. In practice, both are just postponing the losses.

I fell into this trap in my own startup. We did not plan our tests well enough with clear exit criteria and we were not fully honest to ourselves either. We ended up hanging to the same idea too long, hoping for some miracle to happen while implementing more features to better support the wrong idea. The pain we went through is actually quite similar to what a trader feels like when his stock is going down and he keeps buying more in hope of a change to the trend to get even.

2. Repeating Mistakes

Traders should try to look for repetitive success and failure patterns in their trading records. They should write down why they thought the trade was good, what they where feeling, etc. A startup that has been running for a longer time and tried out several different things can probably find similar patterns in all experiments they conducted. Even though all ideas would have failed, it still would be possible to find common mistakes that were repeated or common reasons why stupid things were done.

A startup should be able learn which types of experiments were unnecessarily expensive and could have been tested in a more efficient and cheaper way. I bet many failed startups wasted most of their time on a few very bad ideas/features, just like failed traders usually destroy their accounts with a few really bad trades. If traders can find out what the common denominator is, why couldn’t startups?

3. Irrational Goals

Another very interesting point in the book is that many traders are consciously or unconsciously trying to satisfy irrational goals when they trade. The one and only rational goal a trader should have is to make money. Typical irrational goals a trader has are getting some excitement into their otherwise boring lives or honor from a big win. These irrational goals hurt traders. I think the problem of having irrational goals is even worse for startup founders, who can have quite many of them.

When I think back of the times I had my own startup, I remember how good it felt when Mashable, TheNextWeb and lots of other tech blogs wrote about our first product. In terms of product-market fit, we were not ready for a full launch at all. By doing a big press release, we satisfied an irrational goal of getting acknowledgement for all our hard work. Doing a big launch before product-market fit is often considered bad, because potential pivots and other corrections to positioning, etc. are going to be very expensive. Unfortunately it is very hard to keep oneself from pulling the trigger too early.

Additionally, I remember many times thinking what completely irrelevant people (to the business) are going to think about our product or some feature. What if we spent too long time iterating and experimenting? What would people think of us after 6 months if we only had built something small? To look good in front of other people is an irrational goal. Adding more features is an easy way to satisfy that irrational goal. Allowing this kind of thoughts in your brain is dangerous and may take you one step closer to featurism.

Irrational goals must be satisfied elsewhere. Maybe it should be some hobby or something less important. Actually, to be really honest, I use this blog to satisfy some of my irrational goals.

_Photo edited from original creation by L. Whittaker _

Can anyone learn programming?

There has been a lot of discussion about whether kids should be taught programming in school, even as early as in preschool. Like always, there are different opinions on the subject. Many based on the question whether everyone can learn programming or not. Some say it is only for certain kind of people. Usually at basic programming classes in universities, it seems as if some people just “gets it” and others don’t. What could be the reason? I have my own theory.

I remember reading from Malcolm Gladwell’s book, Outliers, that there had been a study showing that the success of a math student is directly proportional to how much time the student is willing to spend on a problem before giving up. I think the same applies to programming as well. Even though most programming tasks do not require any knowledge in math at all, programming and math have one thing in common; they both require the same kind of logical thinking.

A lot of people try to learn math in school by trying a little bit on one problem and then giving up and moving to the next one. Almost as if they would be practicing throwing darts. You throw a dart, you miss the target, you throw another one, you might get closer, a third one… and so it goes on. They think that they should know how to solve a problem immediately. If they fail by not seeing the solution immediately, they move to the next problem. They will go through all problems but fail on each one.

During my studies, I remember seeing people desperately trying to learn programming exactly this same way. They got a problem and thought that they should be able to just write the code immediately. Sometimes they were able to write something but realized that it did not compile or it did not work for some other reason. They almost immediately gave up and thought that they failed, after which they moved on to the next problem and did the same all over again. One completed task is better than having tried on 10.

I believe anyone can learn programming, if they just accept the fact that it is something that requires time. That first exercise takes as long as it takes, but once it is done you have learned a lot. Having this right attitude will make sure you will later master any more difficult language construct, library or anything else. Even though it is always frustrating at first, once you understand how something works, a lot of things start to make sense. You will see that there are patterns. Bigger pieces of information will start coming easily. In the end you may not need to spend that much time after all. You just need to accept that the initial effort required is huge and you need to be prepared to sacrifice as much time as is needed.

Now if they plan to teach programming in school, how are they going to get people to do this in the right way. I think they have failed to do that in math. There is a huge risk that this wonderful subject is going to be taught the wrong way. Imagine that there is a 2 hour class and the teacher will naturally want to stuff in lots of exercises. Students who get 10 exercises for 2 hours will not feel good about spending 3 hours on the first one. They will ask for help immediately or copy-paste from examples. That is the only way to get something done so it looks like you tried, while a few students are going to spend 20 hours during the weekend to get the initial boost and will therefore easily fly through the rest of the course.

I am going to teach my kids programming and I hope I will do it the right way!

Photo by Paul L Dineen

High Performance or High Scalability Website?

Scalable vs performing website

Do you know the difference between scalability and performance? Which one do you need? Whether you are building, buying or selling web-based software, this post will teach you what you need to know in order to make the right choice.

I touched the surface of this topic in one of my previous posts, Scalable, Flexible and Cheap, Pick 2 you can’t have All 3, when discussing how to understand customer requirements regarding scalability. I learned that when a customer orders a software project from you and says “It must scale”, it can basically mean anything.

A few questions should help understand whether the customer means scalability from a technical- or business point of view. Business scalability means whether the business model can be scaled for a bigger audience. This is a bigger concept, covering market, process, localization and various other properties, including the technical scalability. Engineers often forget that scalability is not always only technical. However, in this post I will only discuss the technical one.

Having narrowed down to technical scalability, there is still room for misunderstanding. The customer may actually mean performance. If you are the subcontractor, you need to ask the right questions to figure this out. If you happen to be sitting on the other side of the table and you are outsourcing the software development to some other company, it is very good to know the difference too. There are plenty of subcontractors out there who just implement whatever was originally requested.

In various discussions, I hear all the time people say “this does not scale” when something is not as fast as expected or “Wow, this is really scalable” when something is fast. This is another reason for writing this post. Scalability and performance are not synonyms.

A high performance website is what one could call a “fast” website. Sometimes this is all you need. You might know in advance how many users are going to use it but require that the page responds quickly. This is usually achieved by code optimizations, bundling/packing/minifying resources and doing various other configurations.

A high scalability website is a website, which performance-level can be maintained by adding more capacity when the load increases. Some websites need to scale for growing traffic, others for growing amount of data. Many need to scale for both. A website can be slow and perform badly even if it scales well.

Regarding scalability, there are two types of scalability: vertical and horizontal. Vertical scalability means that capacity is increased by upgrading the server(s) to more powerful ones. Horizontal scalability means that capacity is increased by adding more servers of the same kind to the system. Horizontal scalability is preferred, since costs will often grow somewhat linearly to capacity. When scaling vertically, costs will often grow exponentially to capacity, since hardware gets very expensive at the high-end.

In practice, many systems only scale horizontally to a certain point. This is usually because they consist of many components, of which some cannot be scaled horizontally. When these components become bottlenecks, they need to be scaled vertically, resulting in a non-linear cost structure.

As earlier said, a website can perform badly even if it scales well. For example a website having a response time of 2 seconds could be considered slow and performing badly. If this website can handle 1000 users with one server, 10000 with 10 servers and 100000 with 100 servers, still maintaining its performance level (2s response time), it would be considered a highly scalable website.

Scalability and performance can have dependencies, both with positive and negative impact on each other. Consider a website, which architecture is changed into a more scalable Service Oriented Architecture (SOA), resulting in many more layers and web services. Requests may have to pass several layers causing a performance drop. On the other hand, some performance optimization tricks (or hacks) may be hard to scale. However, performance optimizations will often save resources, which will let you handle much more traffic with the same servers; hence, you will not reach your bottlenecks as early.

So, back to the question, which one do you need?

If you expect traffic or amount of data to grow, you need an architecture that can be scaled to meet the future needs by investing in proportion to the need. Hence, you need a horizontally scalable website.

If you know the traffic and amount of data is going to be within some reasonable known boundaries, but expect the website to be fast, you need a high performance website, designed for the specified amount of load.

Whichever you go for, remember that premature optimization is the root of all evil.

10 Reasons Why Features Can Poison a Software Startup

Swiss army knife with a lot of features

This post is about one common mistake startups often do. We did it when we built the PiX’n’PaLs photosharing website and later kind of repeated it in our e-commerce solution (read the story here). The mistake I am talking about is implementing more features without fully understanding what all the implications are. There are always a lot of great ideas popping up, but you can probably only pursue 1% of them. Trying to do to much is a common cause of failure; thus, the saying “Startups don’t starve, they drown“ has become so popular. In order to help others avoid drowning, I decided to list 10 things for startups to think about before implementing another feature. These are based on my own experiences, others’ stories I have heard or read about and a lot of common sense.

Experienced product managers use the word NO often. When I was younger I didn’t get them. Now, having been an entrepreneur myself, I understand them perfectly. I have really started to like Steve Job’s famous quote “Innovation is saying no to 1000 things”. Focus is essential and when you have one good idea you always find thousands of other ideas that would be cool. It is so easy to fall into the trap of implementing ideas here and there.

It is vital to understand that there are huge hidden costs in implementing a new feature. A feature may be really cool and seem to take only a few days to implement. An inexperienced product manager may happily keep pushing this kind of features into production even before product-market fit is found. The feeling is good when progress is being made and there is a lot of positive feedback from others. If the product gets poisoned with various different features that don’t fit well together before product-market fit is found, the company will be in a “feature hell”. At this stage it will be hard to find product-market fit, since all changes are slow and require a lot of work.

Let’s look a the different reasons why features can be poison:

1. Every new feature implemented requires more effort (the obvious one)

Every new feature obviously needs implementation effort. Additionally, a lot of documentation, manuals, FAQs, legal documents, etc. need to be updated. Some of these documents can be seen as features as well. Do you really need an FAQ or a manual? Will they become liabilities and slow you down? Furthermore, startups often put a lot of effort into analytics, which is used to learn about customers. This means that usage of the new feature need to be tracked. Finally, there may be a need to monitor the health of the feature in some cases, which will also result in more implementation work. What the developers initially thought would be a one day task suddenly became a huge operation that requires several people to get involved.

2. Every new feature may need maintenance and support

Having a new feature requires more maintenance work; someone needs to analyze all measurements collected, monitor the health of the system, etc. The new feature may also require more sales- and customer support.

3. Every new feature uses resources

New features may use more memory, hard disk or some other resources. All these have a cost.

4. Every new feature increases complexity

New features will increase the complexity of the system. This is dangerous for a startup still in search for product-market fit. Very often the complexity grows exponentially, because features have dependencies. This means that when you specify (or implement) feature X, you need to take into account that features A, B, C, etc. may or may not be used together with feature X. Sometimes it is possible to design everything in such a way that they are independent. But often when we solve real world problems that real customers have, we may not have that luxury. A well thought through spec and good software design will help deal with the complexity, but only to some degree.

5. Every new feature will cause some loss of flexibility

When there are more features and more complexity (indirectly), it will obviously be harder to do changes. Both technical- and business/logical complexity will require that a lot of time is spent on analyzing the impact of a change or new feature. All combinations must be thought through. This is very bad for a startup that has not yet found product-market fit and may still have to pivot.

6. Every new feature increases risk of bugs

Complexity will make it harder for developers to understand what the impact of a change is going to be. Also, high logical complexity will often also result in underspecification of new features and everybody will not share the same understanding of how the new feature should work together with everything old. Misunderstandings will lead to bugs.

7. Every new feature may introduce security holes

As complexity can lead to bugs and low quality of code, these can in their turn lead to security holes. Like with bugs, if the complexity is high and it is unclear how something is supposed to work, you will easily end up with some security holes in both code and application logic.

8. Every new feature must scale

The more features you have, the more potential bottlenecks you have. Complexity and dependencies between features are going to make it even harder to scale. Consider a consumer web application, which hits product/market fit and starts to grow rapidly. You have to cache content shown to end users. You have a requirement that the data must be fresh (changes visible immediately). The more different features there are that can indirectly have an impact on the data that is going to be shown to end users, the harder it is going to be.

9. Every new feature results in a longer learning curve

The more features and complexity there are, the longer it will take for new team members to be able to work independently and become productive. This applies to both developers and other employees.

10. Every new feature which is not used by the user will decrease usability and value

Every feature that is not used by the user, will distract the user from achieving his/her goal. Many studies show that a lot of options may result in the customer not choosing any because making the decision becomes so hard.

Additionally, when new features are added that do not perfectly fit into the software or are not fully thought through, the overall experienced completeness of the product will decrease. This happened to us in PiX’n’PaLs. If you thought our first version felt 50% complete, after we had added some more features that were not really core, you probably felt it was 40% complete.

At the time we realized that we should have been spending 80% of our time fixing old and 20% developing new, we had already implemented so many features that raising the degree of completeness required a lot more effort.

What happened in PiX’n’PaLs was actually that new features introduced new requirements. First our puzzle was missing a few pieces. Instead of looking for these pieces, we started building new puzzles next to the core puzzle, so the result was that we were missing even more pieces to the puzzle than when we started.

A startup should build a Minimum Viable Product (MVP). The product is either viable (can be used to validate a hypothesis) or it is not viable. The product cannot become any more viable by adding more features.

What to do then?

A startup needs to try out things and they may be complex, since customers need real world problems to be solved and the real world is complex.

Here’s some advice:

  • Seriously try to keep things simple before product-market fit is found. Look for different trade-offs to reduce dependencies between features if possible.
  • Narrow down the target customer segment.
  • Focus on only one revenue stream, one Growth Engine, one X, one Y, etc. at a time. And do it well. Fail fast and move to next one.
  • Avoid automating everything. Experiment by doing manual work.
  • Really force yourself to think 80/20.
  • Remove features and old stuff that do not add enough value.
  • Focus on the goal and how to get there. Is this new feature really the way to get to the goal? There is most likely one biggest problem at the moment that you must solve in order to succeed. That problem is so hard and frustrating that it feels good to concentrate on some other tasks instead, like implementing some other new cool features. Don’t fall into this trap!
  • If possible, keep things modular and reduce dependencies between features
  • If you can identify key components that are unlikely to change during pivots, go for a Service Oriented Architecture (SOA). This is easier said than done ;)
  • If you find yourself in the “Feature Hell”, try a Zoom in pivot, which means detecting one feature that is used, and making that the product and hiding everything else. If that is too hard to do, due to complexity, take the knife, be really aggressive and cut off all dead meat (features) from the product. This is what I would do if I would continue PiX’n’PaLs or any of my other old projects.

Picture Source: Jesse Sneed / Flickr (Creative Commons)

Should startups do TDD?

All over the web you find debates whether early stage startups should do Test-Driven Development (TDD). TDD is a development process where developers first write a test before writing any code. When the test is there, they first run the test to prove that it fails when the functionality is not there yet. After that they start implementing the functionality and continue until the test passes. TDD should result in higher quality and more maintainable code. TDD takes more time in the beginning, compared to just writing code directly. But when the complexity increases and there are no tests, things start to break and the velocity of the team will drop. However, with TDD the team will keep going with a somewhat more constant velocity for a much longer time. This is illustrated in the figure below with the green and orange curves.

There are plenty of people who feel that a startup should not do TDD, because it slows down the development in the beginning. The only goal of a startup is to find product-market fit as quickly as possible. Probably 90% of the code is anyway going to trash in the beginning. Progress is measured by validated hypotheses and not features, lines of code or anything else. The usual argument is that things change too quickly and the built MVP is anyway so simple that the benefit from TDD will not show off, since the code will be in trash before the velocity starts to drop. The blue curve in the diagram below shows theoretically the progress made when all code is thrown away after each experiment. One will have the opportunity to start fresh each time with no technical debt, so the average velocity will be quite high. This can probably only be done for the first experiments, after which there will be a better understanding of the users/customers and code reuse will start to pay off.

The diagram illustrates the idea that TDD saves time in the long run when the codebase grows, except when almost all code is thrown away many times during development

Some TDD fanatics argue that TDD actually speeds up development no matter what. The developers just have to learn to do it efficiently. Additionally, maintainability of the code is considered important in a chaotic environment where things change quickly. A final argument is that once product-market fit is found, it will be hard to take things forward and scale up when there is an enormous technical debt. This holds true for most software. The only exception would be apps, where the market risk is so high that one needs to start validating hypotheses with some really simple tests that go to trash immediately like illustrated with the blue curve in the diagram above. Completely new concepts for new markets meet these criteria.

Another common argument is that the software can be a bit buggy as long as it is good for validating a hypothesis. I read an interesting comment in Hacker News from a user called DanielBMarkham, that “technical debt can never exceed the economic value of your code, which in a startup is extremely likely to be zero”. I think this should be understood so that the cost of a rewrite is very low in a startup. This should not be be mixed with quality. Low quality with bugs will be a lot more costly than what was invested in writing the software. Even if the software is just a simple test of a business hypothesis, a bug may result in wrong measurements, which will eventually result in wrong business decisions.

How high quality do you need in your MVP? Let’s first look at what quality means. Colin Kloes wrote a good blog post about the importance of a team’s shared understanding of quality. He said “Software quality is characterised by how well the software has solved the user’s problem.”. Now think about Steve Blank’s definition of a startup: “A startup is a temporary organization designed to search for a repeatable and scalable business model”. The only purpose of the software is to help the founders find a repeatable and scalable business model. The software itself is the test; testing the business model that the founders have come up with. This means that quality is defined by how well the software is able to help the founders test their business model hypotheses.

In order to be able to test hypotheses, it is vital that all analytics are correct. A bug in the tracking of some important event that we are testing will result in wrong measurements, which may result in the wrong decisions taken by the founders. Also if there is a bug making the software unusable, the founders will never know if users were not using it because of a bug or because they were not interested. By putting it this way, quality is suddenly more important than ever.

Usually MVPs do not have much complex code, mostly just getters and setters. On the web they may sometimes be mostly html/css with some data retrieved from the database. In these cases there will not be a need for many unit tests. However, it is still a very good idea to have the TDD attitude from start. You do not know in which direction the MVP is going to evolve. You might want to have a couple of automated acceptance tests around the most important features to be sure they work as supposed to, ensuring your experiments are conducted correctly. Also, by doing this you will have the necessary infrastructure already in place to scale up operations when product-market fit is found.

In many cases the first MVP can be just an almost static HTML-page as an experiment to see how many users would sign up for a new concept. Some concepts can also be tested with something built on a CMS or even just static HTML-pages updated manually by a user. In these cases it would not make any sense to do TDD. However, I think these are special cases and at some point the founders are going to need own code to validate hypotheses further.

The software a startup is building, no matter whether it is an MVP or not, will have a purpose. If the software fails to deliver what it is meant to do, it is useless. Thus, bad quality is not acceptable. My conclusion is that the software is an important tool for the founders to validate their hypotheses. If the tool breaks or the technical debt becomes so high that it is no longer possible to use it for validating hypotheses with quick experiments, the founders will not be able to do their job of finding a repeatable and scalable business model.

Scalable, Flexible and Cheap, Pick 2 you can't have All 3!

Do you want to build a web app? You probably want it to scale, since it will become the next facebook and needs to be able to handle millions of simultaneous users. But you need flexibility in the architecture, since you may want to do bigger changes or pivot easily when needed. Naturally, you have a very low budget and the software needs to be built quickly. Sounds familiar, doesn’t it? These 3 things are important; however, you cannot get them all at once. The real question to ask yourself is which ones do you need at the moment?

All too often non-technical people put too much weight on scalability at a too early stage. When working as a consultant I discussed many projects with different startups wanting to outsource the development of their software. Many of them asked me for an offer of a web based app containing lots of different features. Sometimes there was a requirement that the app must scale to millions of simultaneous users or something similar to that. Everything was planned with a “Build it and they will come” mentality, which is very rare to work on the web. The problem was that most of these startups did not fully understand what scalability meant. People think of scalability in 3 different ways:

  1. That the software is built in such a way that costs grow linearly when traffic grows or amount of data grows; meaning that scaling up happens by just adding more servers. This is referred to as horizontal scalability.
  2. That the website can handle heavy traffic without any actions. This means that option 1) is done and there are lots of servers in place already.
  3. The website is fast and responds quickly. I like to call this a high performance website, which I see as a different thing than a high scalability website.
    Unfortunately most people want type 2 scalability. Usually after learning about server costs and what needs to be done in practice, they want type 1 instead. But depending on the complexity of the app, type 1 may also require a significant amount of work in order to scale horizontally above a certain threshold.

A common misconception is that scalability is always good to have in place. The truth is that premature optimization in terms of scalability is very bad. Scalability often results in loss of flexibility. I define flexibility as the possibility to easily make modifications to the software or pivot quickly. This is a very important tradeoff that one needs to understand; therefore, I am going to explain what needs to be done from an implementation point of view to achieve these properties in web software. Jump directly to “What should you focus on”-subsection if you feel it gets too technical.

Flexibility

To have a fully flexible system, you may want to go with a relational database and a fully normalized schema. This makes sure there are no inconsistencies in the data whatever you do; Thus, it should be quite easy to implement any new functionality with various ad hoc queries to the database. You probably want to let the database take care of as much as possible. Preferably you want to run everything on one server, but having a separate database server and a few identical web servers behind a load balancer should not harm the flexibility.

Scalability

Depending on your application, your first step to a more scalable architecture may be caching. You want to minimize the load of the database, so you cache data that is used often. If you need to show fresh data to your users, you need to delete the affected cache entries when data changes. As you see, developers need to take this into account and they can no longer just do ad hoc queries to the database.

Additionally, you may need to take in new technologies, like a search engine. Whenever data changes in your database, you need to update the data in the search index and other potential storages to avoid inconsistencies. New features may also require schema changes, which may need to be taken into account in all different systems. You have lost a lot of flexibility.

Furthermore, to be able to scale for really big datasets, you cannot just do complex database queries. You need the data to already be in the format you are going to use it. This requires denormalization, which means that you have a lot of redundant data. An example of denormalization could be a photosharing website keeping a separate count for the number of comments an image has, in order to be able to easily sort images by number of comments. Without this number, the database would have to count the comments each time. The more the database is denormalized, the harder it is to do quick changes. You may also want to switch to a NoSQL database if you plan to denormalize a lot.

Finally, scalable apps usually use plenty of application specific tricks. These tricks may not work if there are bigger changes to the application logic. This means that when functionality changes, the developer needs to come up with a new way to scale; thereby spending a lot more time implementing the change.

Flexibility and scalability together

Sometimes you need both flexibility and scalability. In this case you have to define within what scope you need to be flexible. Full flexibility is not going to be possible. However, by planning how to migrate data, re-calculate redundant data and using several other tricks, it should be possible to be flexible within the scope.

You may be able go into a Service Oriented Architecture (SOA) and build web services for retrieving any kind of data needed for features within the predefined scope. This way the scalability can be implemented in the web services (application servers) and developers can have quite good flexibility when developing on the web servers. The broader the scope is, the more expensive it is going to be.

What should you focus on?

Now we know that scalability will require certain design decisions that will make it harder to do changes in the future. If there is a need to be both scalable and flexible, you need to have a good understanding within what scope to be flexible. The cost wll be higher since the implementation is a lot harder. I think the best way to illustrate this equation of flexibility, scalability and cost is by using a ternary plot. Cost would refer to both time and money:

Ternary diagram illustrating the relationship between scalability, flexibility and development cost for web based software. The model is highly theoretical so it won't really apply near the edges of the triangle.

Now that you know the basics, the question is where do you want to be on the triangle? The wrong decision can be fatal for a startup, so understanding the pros and cons is important. I think it all comes down to what kind of a startup you are and at what stage you are.

Most new web apps built by various startups have enormous market risk, especially the ones trying out completely new concepts in new markets. Every startup has a runway of a certain length, during which it needs to find a profitable and scalable business model and fly or run out of cash and die. It needs to test and validate hypotheses as quickly as possible. This needs to be supported technically, therefore it is extremely important to be as flexible as possible in the beginning.

When product-market fit is reached, usage starts to grow rapidly. Now scalability becomes more and more important. It may be tempting to still keep things flexible and go for various other great ideas that come up here and there; however, this increases the cost and can be very dangerous for a startup which does not yet have all its processes in place. Therefore, the best approach is probably to productize what works and just scale up loosing as much flexibility as necessary. The fewer features got implemented during the flexibility stage, the easier it will be to scale. Due to this, it makes sense to keep the feature set as small as possible during the flexibility stage by removing unused or otherwise not working features.

There may of course come a day when there is a need for flexibility again, for example when the product is going to enter the mainstream market. The mainstream market usually requires a whole product, which naturally is going to require a lot of effort to build. But then again at this stage, the company has probably generated some revenue and raised more capital and the processes and technical competence are at a much higher level.

A startup should keep everything as flexible as possible until it has reached product-market fit (1). After that it should scale. There may be a need for flexibility later, for example when entering the mainstream market (2).

The point I am trying to make is that it is extremely important that everyone making product decisions understand what the cost of scalability is. It is so easy to fool yourself that whatever you are building is going to hit the jackpot and build too much scalability into the system. When you learn that it didn’t work, you are going to need to pivot. Either you pivot keeping the scalability but with high cost or you drop the scalability. Jumping back and forth in the triangle is going to be costly and is probably going to result in a lot of technical debt.

I would be very glad to hear what different successful and/or unsuccessful startups have done regarding flexibility and scalability at the early stages of a company. Any experiences?

Top 3 Startup Books that Opened my Eyes

I have read a lot of startup books and books about software business in general. Most of them describe different activities, that software companies should be doing with the help of various tools, frameworks and processes. As a reader I used to feel overwhelmed with all the information, especially when every idea was presented as something important that cannot be neglected by any company under any circumstances. I lacked perspective of which activities should be prioritized and which should be completely skipped at a certain stage of a company.

Most of the books presenting great frameworks for analyzing different things, will not tell you how to obtain the input needed for these frameworks. Bad input leads automatically to bad output, which means that these frameworks are completely useless unless you have all the data. Bigger companies may already have a lot of market data and can somewhat easily get more, since they probably already have a good understanding of the market. Startups don’t have. Many books let you believe that you either need to know all this in advance or if you are lucky they present a way to do market research in some classical way that only a big company can afford to do well.

I came across 3 books that managed to put everything in its right place for me. These books helped me to understand what is really needed in a startup and when to focus on it.

1. The Four Steps to the Epiphany: Successful Strategies for Products that Win, by Steve Blank

The Four Steps to the EphiphanyI found Steve Blank’s blog a couple of years ago from a TechCrunch article about the long lost formula of startup success. After reading some blog posts about the Customer Development model I realized that this is exactly the missing piece to the puzzle, so I bough the book. It’s a step-by-step guide to build a software company. It tackles the core problem of how to find which customer problem to solve and how, using an iterative process called Customer Development. All the other business books that I had previously read had made me think that good entrepreneurs know from the beginning which problem to solve. Also various books about usability, focusing on finding the solution to a predefined problem by doing interviews, usability tests and various other activities with the customers had as well put me off the track. They made me blind to understand that the real point is not to directly find the solution to the customer problem but instead to find a problem that is worth to solve; a problem around which it is possible to build a profitable and scalable business.

Order you copy here!

2. Crossing the Chasm: Marketing and Selling Disruptive Products to Mainstream Customers, by Geoffrey A. Moore

Crossing The ChasmCrossing the Chasm has been said to be the bible of entrepreneurial marketing. It discusses the technology adoption life cycle and the so called chasm, which lies between early adopters of a product and the early majority. It is known to be very hard to get a technology product from visionary customers into the mainstream market. This book is most certainly a good read for anyone who is going to get their software product out in the mainstream. One way to look at it, is that Steve Blank’s book is the one helping you to get to the chasm and this book helps you cross it. But I think there is much more to it than that.

For me the book additionally helped me put all the different activities I previously had learned from other books into the right stages in the technology adoption life cycle. I had read from various other books several statements, such as “You must create a strong brand for your company”, “You need to prove that you are the market leader”, “There must be something new that gives a competitive advantage to the first customers”, etc. All these statements are true, but at different stages in the technology adoption life cycle. This book helped me understand that. Also understanding the behaviour of customers from different stages helps a startup understand which customers to focus on and which to leave for later. In my previous company, with PiX’n’PaLs StoreFront, I wasted an enormous amount of time trying to sell to late majority or laggards.

Order your copy here!

3. The Lean Startup, by Eric Ries

Lean StartupAlthough I had been reading Eric Ries blog before the book and was already quite familiar with many of the ideas in The Lean Startup book, I found it to be very useful in helping me understand how to validate business hypotheses with an agile software development process; it is actually possible to take it so far that all the “stories” that developers build are considered tests. Instead of an engineer getting a job to implement a feature, he would get a job to find out whether a feature helps the company in its goal. This goal may be to grow virally, convert users to paying customers or something else. Running a process like this will get a product built with only features that are needed and the chances of reaching product-market fit are higher. I think it contained many of the missing pieces to the puzzle regarding how to actually run the tests and what to measure and what not.

Order your copy** here!**

Nowadays, most of these theories in these three startup books may be more known in the startup community than they were when I was an entrepreneur. Still, if you have heard pieces of advice from different people here and there, you may have a poor understanding of the big picture. Thus, I recommend that anyone who intends to start a software company the first time reads these books.

It's Alive, it's Alive! Programming Magic!

I recently had a conversation with a friend, who also has a programming background but has moved more into a managerial position like me. We talked about when programming is fun and when it is not. We have both had moments when there is nothing else in the world but the one thing you are working on 24/7. You have so much adrenaline in your blood that you couldn’t sleep if you wanted to, so you just keep on hacking the whole night. These are the peaks that make software development the most interesting profession in the world. This of course requires the right circumstances.

I think it all comes down to how much “magic” there is in the stuff that you implement. It may be something really Hi-Tech to you, that you perceived as magic at some point in your life. Or it may also be something really simple but has the potential to spread virally to millions of users. However, there must be some magic in it to be able to unlock that kind of a productivity boost. My biggest moment of magic was when I built my first chess engine in 2002.

From the day I played chess against a computer the first time, long before I took up chess for real, I had been wondering how it is possible that the computer can think. When I got a little bit older I understood that it has to search through the moves tree and check what results in the best position. But still, without proper understanding of algorithms and data structures, it felt to me like some kind of magic.

Before directly going to the story, I’ll give a quick background to how I got into chess and writing a chess engine. I have always been a fan of strategy games, ever since I got my first computer and played Civilization 1, Sim City and later C&C and similar games. However, as much as I would have wanted to become very good at any of them, I knew that the knowledge would become obsolete one day when a newer game was released. That put my view of chess into a completely different perspective, since that game is going to stay unchanged forever.

My cousin had taught me to play chess since I was small, but I never really enjoyed it at that age. But when I was studying for the first year in high school, surprisingly chess became very cool. We were about 15-16 years old. People were playing during the breaks and even girls played or watched. I am not talking about nerds and geeks. This was an all-embracing phenomenon. I immediately felt that this is my game and I must be best at it. I started playing a lot. I read a few chess books, joined a local club and after a while I played in tournaments.

When I took a beginners course in Java programming at TKK in spring 2002, the course had a bigger project assignment at the end with several different topics. One topic was to build a chess game, but it was without possibility to play against the computer. I couldn’t let the opportunity pass, so I just had to choose that assignment and also go for the artificial intelligence as extra. Students were allowed to do changes to the scope if they were reasonable.

This was a very interesting project. I still remember well the moment when I got to try the AI functionality for the first time. I had already implemented all the functionality necessary to make a list of all the legal moves in a position and to make moves on the board. There was only textual representation of the board at this time, but that was all that was needed. I was at a computer class in TKK, where I used to work to be able to concentrate. It was 5 am already and I had fully lost my sense of time.

I used the negamax algorithm, one of the simplest forms of search. I had implemented with a very simple static position evaluation function, only counting the score of the pieces at the board. When the first bugs had been fixed so that it did not crash immediately, it actually played. It was able to search to a certain depth and suggest a move that proved that it had some kind of intelligence. It was able to think. I immediately jumped up and said to myself: “It’s alive, it’s alive!”. Too bad there was nobody else listening.

These kinds of peeks came every now and then when I was improving the AI. Adding alpha-beta search and other improvements to the algorithm allowed the engine to search deeper and do more complex tactical combinations. Improving the evaluation function to take into account positional advantages, such as positions of pieces, king safety and pawn structure made it play a lot more like humans. I still remember the Wow-feeling when I realized it was thinking strategically and it was playing quite coordinated attacks against me.

When the school project was over, I decided to continue the development as a hobby. I rewrote the engine in C, while doing several other improvements as well. I was doing this for a year or so. My engine (Hoplite) implemented the Chess Engine Communication Protocol, so it was able to play against other engines. Hoplite was playing in several tournaments around the world. It was free and open source, so tournament organizers could easily enter it into a tournament.

I had a lot of fun watching how it performed in a tournament after I had done a new release. Also during development I had set up my own tournaments, where I had several engines playing against each other. I usually had 2-3 variants of my own engine and then a couple of other engines for reference. Tournaments were automatically played with a script, so I could have it running during the night and check the results later. If a new feature showed good results, I added it to the mainline. I almost took this process so far that I would have used evolutionary algorithms to get optimal configurations. This would have been overkill, since the biggest improvements would have come from completely different optimizations.

The last time I touched Hoplite was probably in 2005. There came other more important things and at those days I had already realized that making it play really well would require rewriting some parts and a lot of time, which I unfortunately did not have. Maybe one day I’ll give it a shot again.

These are the peaks that make programming so damn interesting. You need to implement stuff that has magic in it. Every time you do that, you raise the bar and it gets harder to find any problem with magic again. During the last 10 years I have been raising my bar all the time and nowadays it is getting very hard to find something that I could implement with as much magic in it for me as the chess engine once had.

This raises an interesting question: What can a software company do to let all developers experience these kind of moments? Should a company give a lot more freedom to developers to work on things they like even though they are not 1st priority? It’s always a tradeoff and it depends on what kind of software you are building. If there is development of complex algorithms or growth hacking involved, it may make sense to let a team operate outside the usual process. Product management can define the boundaries within which the team can make decisions themselves and then give green light to do whatever they want within those boundaries.

For those interested, I created a simple page for Hoplite, from which the source code or Windows binary can be downloaded. The original Hoplite page was removed from TKKs servers when I graduated. Follow this link: Hoplite Chess Engine

Does your virality coefficient really need to be above 1?

Many web apps rely fully on viral spread. In order for this to work, a virality coefficient higher than 1 is needed; meaning one user invites more than one other user into the service. Lots of well known bloggers and authors, like Eric Ries, state that you should postpone your full launch and iterate until you have reached a virality coefficient above 1. I believed this for a long time and still think it makes perfect sense in many situations. However, I think there are exceptions.

The usual process to create a viral app used to be to start with a quiet launch to be able to optimize the viral loop and doing a full launch when reaching something above 1. I think optimizing the viral loop this way is still a must. But it is very hard to emulate real conditions. There are many variables that will have an impact. Some can be emulated, others are harder. For example, the conversion ratio of invitations to signups will most certainly be affected by how well known the brand is. If a user gets an invitation to a well known app like Angry Birds, the user will of course be more likely to sign up and try it out, than any previously unknown app.

My hypothesis is that there are many situations, where a virality coefficient of less than one during tests will be sufficient in the real world. The reason is that it may be possible to improve it with some big PR event, where you influence the masses before they get reached by the virally spreading invitations. I look at this like in war, where you first fire with the artillery (PR) and then send in the infantry (invitations). Also in many cases there may be economic externalities, and reaching a critical mass will also have an impact on the virality coefficient. Therefore, the actual post-launch viral coefficient will be above one, which is all that matters.

Even though the ecosystem of web apps is unlikely a “zero sum game”, someone’s gain in virality is often away from someone else’s. This happens when everyone is optimizing ther virality in every possible way. Apps are fighting for eyeballs everywhere in feeds, emails, etc. The more there are players using the right methods, the harder it will be to reach a coefficient above 1. Therefore, one could assume that some apps would have to do a big PR launch just to get over the edge. I would be glad to hear what others think and what the new startups that recently launched a successful viral app did.