Wednesday, November 28, 2018

Pricing decisions

Price per version

Price for product and all updates

Subscription with perpetual license

Subscription

Paid extensions: microtransactions, in-app purchases, DLC (Trainz!)

D1ck move, but somewhat effective: force users to buy tokens in bulk, but don't allow them to spend them all. Like force them to buy minimum of 200 tokens, but your service costs 130 tokens a month. With this pricing, they'd need 19(!) months to get all their money's worth. It's like on concerts/events/food festivals, where catering is available only using their custom currency.

Tuesday, November 20, 2018

Commercialization

Open Source (various licenses, donations)

Source Available

Free

Free for personal use

Free Demo

Free Trial

Shareware

Paid. More on that next time.

Tuesday, November 13, 2018

string.substr

For some reason I learned to use substr string method, little to know it was actually added as late as EcmaScript 3, in addition to existing similar substring and slice methods. Similar to ''each other'', that is.

Substr uses length as a second parameter, but both substring and slice use end index, so if you need length, you need to calculate it.

Now I found out it's marked as deprecated, so I need to update my code to reflect this spec. What are my options?

  • str.substring(indexStart, indexEnd)
  • str.slice(beginIndex, endIndex)

Doesn't make much of a difference, does it? The only differences between substring and slice is in handling negative arguments, which substring doesn't support and treat it as 0 (zero), and in argument order, where substring swaps them if second argument is less, than first argument, to always return a substring.

  1. "abcd".substr(1); // => "bcd"
  2. "abcd".substr(1, 2); // => "bc"
  3. "abcd".substr(-1); // => "d"
  4. "abcd".substr(1, -1); // => ""
  5. "abcd".substring(1); // => "bcd"
  6. "abcd".substring(1, 2); // => "b"
  7. "abcd".substring(-1); // => "abcd"
  8. "abcd".substring(1, -1); // => "a", it's like substring(0, 1)
  9. "abcd".slice(1); // => "bcd"
  10. "abcd".slice(1, 2); // => "b"
  11. "abcd".slice(-1); // => "d"
  12. "abcd".slice(1, -1); // => "bc"

I don't see much use for substring in my code, so I'll probably use slice much more often.

Wednesday, November 7, 2018

StackOverflow Data Model

I often look for inspiration at large open projects, like Moodle, WordPress or PrestaShop. Some of them have great ideas, some of them use proven concepts and some of them... just work, despite their design :-)

This time I looked at StackOverflow, which is visited by some 50M users each month, so their solution must be really robust.

Emphasizes Microsoft technologies, with a focus on performance, scalability, and reliability: ASP.NET Core as its web framework for the backend, Microsoft SQL Server as its primary database, Redis for caching, Elasticsearch for search, Docker for containerization, TeamCity for its continuous integration and deployment, Git for version control and hosted on Azure.