Win Every Word Game

Word games always have been a big seller. They do, however, not only sell as board games or in newspapers, mobile games with words have gained great attention, at least since Zynga published Words With Friends in 2009 and created millions of addicts all over the world. Besides Words With Friends, there are lots of other word games available in the App Store and Google Play and they all have one thing in common: They are beastly hard.

Well, sure you can play Scrabble with your smartphone and create common words with common letters, but as soon as there are more characters like “X” and “Q” than “E” or “T” on your rack, you start to feel uncomfortable, right? Especially, if you’re not a native speaker of English, what should be the case with a chance of 93,3%. So, if there’s no little Brit on your shoulder telling you the fanciest word to conquer the highscore, you need a tool that does the job for you, right? Right.

The word generator at word-grabber.com

The word generator at word-grabber.com

Luckily, word-grabber.com features many specialized word generator tools to make words from letters for different word games like Scrabble, the above-mentioned Words With Friends, Word Feud and more. There is only one thing you’ve got to consider: Although the website is mobile-optimized (so that you can use the word tools, even sneaky-peaky-like under the kitchen table), there is no app, that’s helping you out.

No Word Grabber app to be exact. As a loyal reader of this blog, you definitely know, that Rinat published “What’s that Word” earlier this year, a “fast and convenient word search” for “those who can’t live without word puzzle games”. An app, that doesn’t even require an internet connection to spit out one of its 400.000 words.

So, no matter where you are and what device you prefer, you no longer have to come off second best – and you’ve now got the chance to win every word game.

Thinking of predicting Stock Market Prices? I’m here to help with my Indicators Library for Python

One of my colleagues once said, that the first thing that comes to mind for most people who realize that Artificial Neural Networks can be trained to predict some things, is “Hey! Let’s predict stock market prices and get rich!” He said this after I told him I’ve signed up for the Udacity’s Deep Learning Foundations course, and am planning to develop a model that does exactly that: tries to predict the stock prices.

I’ve spend several months developing the model, testing various network configurations, spent tons of money on AWS instances, and haven’t moved further than 60-70% accuracy on just predicting directions for the next day, let alone the actual movement value. It has been a great experience, although I realized that with the computing resources available to me this task is practically impossible to solve.

I will do a big post on this experience one day (and there are plenty of similar ones already, like this series by Alex Honchar), but today I want to share with you a by-product of this exercise: a Python library, which implements the most common stock market indicators.

In the vast majority of articles and tutorials on using Deep Learning for stock market prediction, only the OHLC values are used (which stand for Open, High, Low, Close), sometimes Volume is also taken into account. But the trading industry has quite a long history, and over this history, a wide range of derivative indicators have been developed, which are heavily used by traders and analysts.

My suggestion was that such indicators may greatly improve the accuracy of predictions by providing additional hints and patterns for the neural network. As it turned out, they actually were helpful, and in my case the accuracy increase was about 10% compared to just the OHLCV data.

I didn’t have time so far to open-source my entire project, make it human-readable and remove experimental and redundant code, but I can share the library, which implements 22 most common stock market indicators. Surprisingly, I couldn’t find anything similar at the time I was working on my project, so I had to implement them by myself.

Here’s the list of the implemented indicators:

  • Exponential moving average (EMA)
  • Moving Average Convergence/Divergence Oscillator (MACD)
  • Accumulation Distribution (A/D)
  • On Balance Volume (OBV)
  • Price-volume trend (PVT)
  • Average true range (ATR)
  • Bollinger Bands
  • Chaikin Oscillator
  • Typical Price
  • Ease of Movement
  • Mass Index
  • Average directional movement index
  • Money Flow Index (MFI)
  • Negative Volume Index (NVI)
  • Positive Volume Index (PVI)
  • Momentum
  • Relative Strenght Index (RSI)
  • Chaikin Volatility (CV)
  • William’s Accumulation/Distribution
  • William’s % R
  • TRIX
  • Ultimate Oscillator

It is small, simple to use, and relatively fast. There is some space for improvement, like you may wish to re-write the functions so that they return not the copy of the original DataFrame with a few new columns added, but only the required columns, or there may be some places where the calculations can be simplified using Pandas’ and NumPy’s tricks, but I’ll leave it up to those who will be using this library as a starting point.

The code is on GitHub, feel free to use, fork and develop it further.

Rebus inside out – my first Android game published

Rebus inside out - a new kind of word puzzle game

Rebus inside out – a new kind of word puzzle game

For the last couple of months this blog has been abandoned. This happens when someone becomes so excited about his idea, that he forgets about everything, and devotes all the spare time he has to developing this idea. Which exactly what has happened to me.

I love puzzles. This is the only type of games I play on my mobile phone. Last year I came across a very good puzzle game, which took away a couple of weeks of my life: REBUS – Absurd Logic Game. And recently I thought, what if I inverse the idea, and instead of finding out the word encoded in a picture, try encode that word using the set of given pictures.

Developing a quick prototype took about a week, and when I showed it to my wife, she found it playable. So I decided to move on and develop a complete game.

The idea

Screenshot_1508748525

There is a picture, representing some word. You have to guess this word, and then construct it, using other pictures given below. Of course, most of times you need only certain parts of these words, so you have to remove some letters from the front or the back of these words. Like this:

Removing the first two and the last one letter from the word "design", merging it with "nature", results in "signature".

Removing the first two and the last one letter from the word “design”, merging it with “nature”, results in “signature”.

For each correctly composed word you get some coins. Initially, the number of coins equals to the number of letter the target word has. Each time you remove a letter, while composing the target word, the number of coins is decreased by 1. The aim is to find out the word while removing as fewer letters as possible.

The puzzles are composed in such way that there is always one best solution (which gives you at least one coin after solving it), and there are other not-so-bad solutions (which give less or even no coins).

Coins can be used to get various types of hints, like revealing the target word, or the word options, or they can be used to unlock new puzzles. Initially, only 10 out of 250+ puzzles are available, and each time you solve one, a new one is unlocked.

The player can purchase additional coins using in-app purchases, and Google provides a very easy way of integrating such a feature into your app.

The platform

Android. Just because I’ve already had some experience developing Android apps and recently completed a few Android Development courses, I decided to make it the primary platform. The iOS version will follow, if the Android gets even slightly successful, meaning that it gets at least 1000 downloads by the end of 2017.

The puzzles

Probably, this was the most time-consuming part. Constructing puzzles manually would take weeks and would have been error-prone. So I decided to automate this task.

I downloaded a file containing 1000 most popular English nouns. This dictionary was fed into a Python script, which I developed.

On the first iteration the script creates all possible splits of each word; each split containing word parts with at least 2 letters, like this: “massage” = [[“ma”, “ss”, “age”], [“mas”, “sa”, “ge”], [“mass”, “age”], [“massa”, “ge”], [“mas”, “sage”], [“massa”, “ge”]].

One the second iteration the script looks at each word, and for each split it finds the full words, from which each word part of the given word can be obtained by removing letters either from the front or the back. For each word part there can be many full words, from which it can be obtained, so the script keeps track of how many letters have to be removed from the full word to get the required part – the cost of that word.

Then it sums up the costs for each combination of full words that construct the target word, and drops those, whose costs are equal or higher than the number of letters in the target word. The combination of words, which has the lowest cost becomes the best possible solution. Limiting the cost of the best solution to the target [word length – 1] ensures that the player receives at least one coin for successfully solving the puzzle using the best solution.

After running the script on the entire dictionary, something like 400 questions have been generated. These questions then have been manually checked. Many puzzles had similar word options, because, for example, if there are many target words containing the part “id”, and the shortest word option in your dictionary, which contains this part is “idea”, of course the script will suggest this word for almost all of such puzzles. So these had to be manually substituted to a different word options. Often, this led to increasing the cost of the best solution, but gave a greater variety of word options.

The resulting set of puzzles has been saved into an XML file, and imported into the Android project. The app would then parse this file, and use it to display the puzzles.

The graphics

Tricky part. Android runs on a vast range of devices, each with different screen size and resolution. There are literally thousands of possible combinations of these, and it is impractical to try to create images that suit the majority of them. So the solution was to use vector icons in SVG format. Android Studio can import this format, so that there is only one resource for all screen sizes and densities. Also, this greatly reduces the size of the app, because often, vector images take less space than raster ones.

I still had to create different variations of the main puzzle screen, where the lower part of the screen that contains the buttons has been rearranged for better utilization of the available space on larger screens. However, this was just one such place in the app, and all the rest of layouts are completely identical for small, medium and large screens.

Development

Surprisingly, this was the easiest part. There is a singleton, which keeps track of the score, provides the puzzle data, decides, whether the player has solved it or not, and saves the progress to a small internal database. The rest is quite straightforward, so I won’t describe it in too much details.

The result

launcherThe game is now available on Google Play, and it is free. Now I’m trying to figure out how to cheaply promote it so that I get the desired 1000 downloads by the end of this year. Social media has been utilized, but this did not result in too many installs. I’ve sent review requests to a few dozens of Android gaming websites, and still waiting for responses. I even tried to run an AdWords campaign, which brought me about 50 installs for the $15 spent. Still, 1000 installs is quite far away. Probably, a larger promotion budget would have given me the required numbers, but unfortunately I don’t have a spare penny at the moment to spend it on promotion.

All in all, this was a good exercise, which gave me the opportunity to get some experience in all stages of an app development, starting from the concept, to prototype, to the complete app, and to promotion. It would be nice to do the same for the iOS version, especially, if the app also brings some money.

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!

How to promote an Android app that no one actually needs – Part 2: The results

It’s been a long time, since the last post. And there is a reason for that: I’ve been busy developing a game. My first real Android game, that is published on Google Play. In the future post I will tell you more about it, but for now, let’s evaluate the results of begging for free reviews.

The results are quite disappointing. NO ONE posted the review. And I can see two main reasons for that:

  1. The app is not that valuable for the audience of the websites that I approached;
  2. Free review option is just a marketing trick to make you pay for the review, after you realized that they won’t do the free option.

Since I started asking for reviews, up until the beginning of November, the app had only 16 installs:

wtw_stats

What’s funny here, is that I have also released the Russian version of the app under separate package, and somehow it managed to get more downloads without any promotion at all! They are completely similar: the visuals are identical, the functionality is the same, the app description is a one-to-one translation, only the underlying word dictionary differs. And yet for some reason Russian version has become more popular than the international one.

I don’t have a clue about why this is the case, the only reason could be that the competition on the international market is much more intense.

But returning to the main topic of this short series. What have I learned? If you’re creating an app just for the fun of it, or have a very specific and rare use case:

  1. Nobody will do a free review for your app;
  2. Don’t expect too many organic downloads.

So if you want to somehow monetize the app, you probably should request quality paid reviews, or buy targeted ads (which kinda worked for me with my game, but I’ll leave it for another post).

How to promote an Android app that no one actually needs – Part 1: Begging for reviews

You reached this moment when you generate a signed APK, upload it to the Play Store, fill all that description and screenshot stuff, and hit ‘Publish’. And then comes that thrilling feeling… How many people will have downloaded it?

Just to get rid of that disappointing zero in the dashboard stats you download it via the Play Store to your own Android device. The next day, there is 1.

You turn on to Twitter in the hope that someone from your tiny followers pool will find the app worth the downloading hassle, or at least do some retweets, like this:

Oh, what’s that? There’s 2 now! You and some other guy! However, now you see another disappointing number, 1/2, which means that this guy has uninstalled it right after first interaction with your app. Too bad. You wait another week or so, but nothing really happens. Your download stats look something like this:

Google Play Store stats after a week

Sad picture…

This was my situation after I uploaded my very first app to Google Play Store (here’s the link, by the way). The app was developed while going through one of the Android Development courses on Udemy, just to refresh my Android skills, and I wasn’t planning to monetize it in any way. However, just to make the numbers look better, I decided that my app needs some promotion. In a month I want to get, let’s just randomly say, 1000 active users. Is it feasible if you don’t plan to spend a penny on promotion? Let’s see!

By the way, in a few days after you submit you app to the store, you will be contacted by several companies offering you to promote your app and get some positive reviews using their services. If you have some spare money to spend on these, you may want to try them.

First thing, asking Google: “how to promote an android app for free”. Besides the ads of the services, which offer you to “reach millions of mobile users”, there will be hundreds of pages written by random people with “XX creative ways to promote your app for free”.

Despite being pessimistic about the specialized services, in terms that they will all probably ask you for money upfront, let’s test what came out on the ads first. I got five of them: Appnext, AppBrain, StartApp, AppLift and Tappx.

Note to myself: Create an app that generates names for app promotion platforms. You just take the dictionary and add ‘App’ to a randomly selected word: AppGiraffe, AppPotato, AppNostril…

So, what do we have here…

1. Appnext

Signed up, added an app. Now on to creating a campaign… and they ask me how much I’d like to spend per day. I do not want to spend anything, so skipping this option.

2. AppBrain

Singing up, then trying to add my app… Wait, what’s that? They have already listed it in their database! Cool! No need to add it manually. Now going to dashboard and creating a campaign… And again, asking me for money.

3. StartApp

Their landing page says that if I deposit $50, I will get another $50 credit. So just skipping them too.

4. Applift

Signed up… And they told me to wait until they contact me. Disappointing. (Edit: there have been 7 days since I signed up, and still nothing from them. Wonderful service!)

5. Tappx

Easy signup and adding of the app. There is an option to promote the app for free using cross-promotion, which means that you have to display a banner promoting some other apps, and the banner of your app will be displayed in exchange. It may be the way for someone who does not object to display banners, but I do not want to do this (ok, I’m missing an opportunity here, but I personally find displaying banners in such a small app quite unfair towards my users).

Alright, specialized services are not an option for me. So moving on to the zillions of creative ways.

Basically, if you compile what these guys are telling you, it comes down to the following things:

  • Post the link to your app wherever your can: your blog, email signature, Facebook groups, Pinterest, LinkedIn, etc. Done it.
  • Polish you app and its page: make good-looking icons, screenshots, videos (if you can). I’m not even remotely a good designer, so I can’t say my app icon or screenshots look good. Taking a video of a simple app? Not worth the time spent, I think. Come one, who would want to watch a video of how I switch back and forth over my app’s two screens, telling how easy and fun it is to find pattern-matching words? One good advice here was about making a very good app description, which both attracts the user’s attention, and uses the right amount of relevant keywords, so that it is easy to find your app on the store. Did here my best effort, so hopefully, it helps.
  • Reach out to influencers: ping some well-known guys on Twitter, Facebook, whatever asking them to tell their audience about your app. I tweeted the guy, who is the author of the course, and he retweeted my message. But literally nothing happened. Nobody has downloaded it. And this was despite he has almost 15k followers. Anyone knows any other easily-reachable person with a larger audience, who would be so kind to tweet about my app?
  • Submit your app to various app review sites: surely a go-to approach for my case, as it does not require any money investment at all. Below I’ve listed the sources that I’m going to use.
  • And, weirdly, go offline and tell people about your app. Probably, very specific to a limited number of apps, and definitely not my case. I’m not going out to streets and telling random people about a newly released fantastic app for solving word puzzles.

So, to sum up, the feasible thing to do would be to submit my app to as many app review resources, as I can, and wait for the results.

I have found several lists of the websites, where you can submit your app for review. Many of them are free, some require paying for reviewing, some specialize on particular platforms, and some are just abandoned. Therefore I took a 5-day pause and manually complied a list of exactly 100 sites (out of around 300), where you can submit your app. The full list is available on this page. It’s funny that this magic number was just a coincidence, I didn’t plan to make it to look round.

From this list we are selecting only those which accept Android apps, and, because we are poor, those which offer a free review. All of them say that they do not guarantee that the app will be reviewed, because they receive millions of free review requests per day, but we’ll try.

So, we start going through the list and begging for reviews. In total, I’ve submitted the app to 25 app reviewing resources, providing them with the basic info, such as app name, the link to Play Store, app description, etc. Some may feel uncomfortable asking random people to do some unpaid job, but hey, this is what they offered to do themselves.

Note: It is convenient to prepare a spreadsheet with your app’s key details, like the name of the developer, app description, app URL, etc., so you can just copy/paste them into the submission forms. Saved a lot of time for me.

After I’ve completed this job, I found that there are other sites, where you can showcase your app, which fall into several categories:

  • Community review platforms, where you review others’ apps in exchange for your app being reviewed by others – a good option for me;
  • Startup showcasing platforms, where you submit a description of your product (could be anything, not only apps), and the community will try and rate your product – some of them may work for me;
  • Mass app submission services, where for a small fee you are able to submit your app to a number of review websites – I’m not going to do this.

So while I’m waiting for the first reviews to appear (if there will be any), I decided to spend some time submitting my app to these:

  • ProductHunt – will give you some good traction if you manage to get enough upvotes (read: if your app is actually useful and innovative); mine is not useful, nor innovative, but we’ll give it a try;
  • Preapps – a platform for posting info on upcoming apps (before they are released) and new app ideas; haven’t figured out the usefulness for the app that has already been released, but submitted it there anyway;
  • Betalist – a platform for pitching recently launched startups; not sure that I would meet their submission criteria, but in any case worth trying;
  • ReviewsMotion – another community review website with simple idea: you review someone’s app, and get reviewed in exchange; posted there;
  • Reddit – Apps for Android – a large community devoted to Android apps; posted there, and expecting fierce reaction from them for wasting their time with my useless app 🙂

In total, if I exclude the time required for finding these resources, it took me about a day to submit my app to all the websites. I guess, it’s not too much for an app, which you are not planning to monetize. In the next post, which will come in a month, we will analyze the outcome of our experiment, and see, if these efforts have brought us any significant results. Stay tuned!


If you liked this article, consider following me on Twitter

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.