teleren/devto huggingface dataset:
App promotion on Google Play (effective)
Published: 2019-02-01 11:48:27

---
title: App promotion on Google Play (effective)
published: true
description: 
tags: 
---

**Keywords** are very important on Google Play. The higher your app is in ranks for popular keywords the more users will be able to find your app and download it.
 
**This is how you can promote your app in keyword ranks:**

you can increase your positions with keyword installs. It's when people go to GP, find your app in a search for a certain keyword and install it. The more such 'keyword' installs you have, the higher you go up in the rank. Users get paid for each install. 
Plus, if people install your apps while searching with some words, your app will start ranking for more keywords therefore it becomes more visible on the market.
Check out [this case study] (https://keyapp.top/blog/2018/11/case-study-%E2%84%9621-33-positions-in-rank/) ! 

Such promotion is really effective but sure you should do a good ASO first
 : )
 

tags: #android #cpi #app #promotion
Ruby kernel in Google Colaboratory.
Tags: ruby, jupyter, colaboratory, sciruby
Published: 2019-02-01 07:30:42

---
title: Ruby kernel in Google Colaboratory.
published: true
description: Ruby kernel in Google Colaboratory.
tags: Ruby, Jupyter, Colaboratory, SciRuby
---

Hello. I am a Ruby fan. 
I tried running Ruby in [Google Colaboratory](https://colab.research.google.com/).

![image](https://thepracticaldev.s3.amazonaws.com/i/2g21nsval74ip86a6bqb.png)

Open [Google Colaboratory](https://colab.research.google.com/).
Run the following commands.


```jupyter
!apt-get install ruby-dev
!sudo apt install libtool libffi-dev ruby ruby-dev make
!sudo apt install libzmq3-dev libczmq-dev
!gem install ffi-rzmq rake
!gem install specific_install
!gem specific_install https://github.com/SciRuby/iruby
!iruby register
```

Install your favoirite gems for data science(Optional). 
```jupyter
!gem install awesome_print
!gem specific_install https://github.com/SciRuby/daru
!gem specific_install https://github.com/SciRuby/daru-view
!gem install numo-narray
!gem install rumale
```

Then, Upload a Ruby ipynb into Colab using `File -> Upload Notebook`. 

```json
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "ruby.ipynb",
      "version": "0.3.2",
      "provenance": [],
      "collapsed_sections": []
    },
    "kernelspec": {
      "name": "ruby",
      "display_name": "ruby 2.5.1"
    }
  },
  "cells": [
    {
      "metadata": {
        "id": "BpxZ_k6Qv84W",
        "colab_type": "code",
        "colab": {}
      },
      "cell_type": "code",
      "source": [
        "puts \"hello world\""
      ],
      "execution_count": 0,
      "outputs": []
    }
  ]
}
```

Now you can run your ruby scripts! 

![image](https://thepracticaldev.s3.amazonaws.com/i/ylg4atkmhucvjiu9s8co.png)

have a fun day!

Check if the ruby kernel is registered in jupyter (Python notebook)
```jupyter
jupyter kernelspec list
```

![](https://thepracticaldev.s3.amazonaws.com/i/fbbp4d74h167blnf8snd.png)
An in-depth tutorial on deploying a Django application into AWS
Tags: django, aws, gunicorn, supervisord
Published: 2019-02-01 11:24:42

---
title: An in-depth tutorial on deploying a Django application into AWS
published: true
description: Django is the most popular Python-based web framework for a while now. Django is powerful, robust, full of capabilities and surrounded by a supportive community.  In this video, we are going to take a look into deploying a simple Django application to an AWS ubuntu instance, with Nginx, Gunicorn & Supervisor configuration.
tags: Django, aws, gunicorn, supervisord
cover_image: https://thepracticaldev.s3.amazonaws.com/i/zen29khx5rkw30cqrl8m.png
---

Django is the most popular Python-based web framework for a while now. Django is 
powerful, robust, full of capabilities and surrounded by a supportive community. 

In this video, we are going to take a look into deploying a simple Django application to an AWS ubuntu instance, with Nginx, Gunicorn & Supervisor configuration.

In this video, I have tried to explain every single step & each line of code I have written. Hopefully, this video will help you out.

Let me know the suggestions, thoughts & the doubts in the comments. Subscribe to the channel & Share this with your friends & colleagues

**Shameless plug:** I am building a tool to automate server provisioning and deployments for django and other python apps. The free early access is availble at [pyployer.com](https://pyployer.com?ref=dev.to)

Link to sample application repo: https://github.com/ShobiExplains/AwsDemo

{% youtube u0oEIqQV_-E %}
The Minimalists Learning Resources
Tags: resources, learntocode
Published: 2019-02-01 11:22:17

---
title: The Minimalists Learning Resources
published: true
description: Get up to speed with learning new technologies
tags: resources, learntocode, 
---

Hello world, I know there’s a lot of articles citing extensive free learning resources and I was definitely feeling exhausted just by looking at it. 

I just wanted to share the *essential resources* that have been helping me to pick up various development technologies so far. 

A bit of background before I move on, I actually have programming experience in Java and C++, which is why some resources that cater to beginner doesn’t work for me.

Before you jump right into those resources, you might want to take a look at [Kamran Ahmed’s Developer Road Map](https://github.com/kamranahmedse/developer-roadmap) for front-end web , back-end web and DevOps  , I find this very useful in terms of planning what to learn (and realising there are so many things to master!)

**Interactive Learning**:
[Free Code Camp](https://www.freecodecamp.org)
[CryptoZombies](https://cryptozombies.io)

**Read**:
[Learn Ruby by the Hard Way](https://learnrubythehardway.org/book/)
Flavio Copes’s articles on: [JavaScript](https://medium.freecodecamp.org/the-complete-javascript-handbook-f26b2c71719c), [Vue.js](https://medium.freecodecamp.org/the-vue-handbook-a-thorough-introduction-to-vue-js-1e86835d8446), [Node.js](https://medium.freecodecamp.org/the-definitive-node-js-handbook-6912378afc6e), [Express.js](https://hackernoon.com/the-definitive-guide-to-express-the-node-js-web-application-framework-649352e2ae87), [React](https://medium.freecodecamp.org/the-react-handbook-b71c27b0a795)

**Power boost language tour**: 
[Learn X in Y Minutes](https://learnxinyminutes.com/)

**Bonus** (and exhaustive free resources):
[Ebook Foundation’s Free programming books](https://github.com/EbookFoundation/free-programming-books)

I will keep updating this list as I pick up and explore other technologies. Please do share in the comment on what resources that personally worked for you!
Running Heroku CLI commands in an Heroku application
Tags: ruby, heroku, cron, backup
Published: 2019-02-01 11:16:09

---
title: Running Heroku CLI commands in an Heroku application
published: true
description: 
tags: ruby,heroku,cron,backup
---

# TL;DR

With the [Heroku CLI buildpack](https://github.com/heroku/heroku-buildpack-cli) you can execute CLI commands against an Heroku application.

# Setting it up

Add the build-pack and redeploy code.

There are some security credential things you have to do, but they're documented [here](https://devcenter.heroku.com/articles/authentication).

Don't forget that you can connect to your app using `heroku run bash -app my-application` to run the credentials commands to get an API key to store as the `HEROKU_API_KEY` environment variable, and to do testing.

# What you can do with it

You can run command lines from your Heroku application to do whatever can normally be done from the Heroku command line.

You can run these commands from within your application itself, or by using the Heroku Scheduler add-on, and you with the appropriate credentials you can do this from a different application.

For example:
* Run a manual backup of your PostgreSQL database.
* Rescale your dynos without using an add-on.
* Restart your dynos at a particular time every day, before the working day begins.
* Run rake tasks from within your system using a one-off run dyno of an arbitrary size.

We are currently using this to scale down one system overnight and scale it back up again before the working day starts, and for restarting another system's dynos at 5am local time.

We do this through a separate application, issuing the commands through the Heroku Scheduler add-on.

# Running rake tasks from within your application

I'm very interested in experimenting with this idea.

We have a particular type of batch job that can vary hugely in workload:
* So small that it can be executed synchronously by the application in a couple of seconds.
* Too big to be synchronous, but fine for a Standard-2X worker dyno to handle in the background.
* Too big for a Standard-2X, and too time-consuming to allow a worker to be tied up. Maybe a one hour job on a Performance-M dyno.

I can see us adopting logic that allows us to judge which of these approaches is required, and executing the appropriate logic.

# Summary

That's it.
With Love to Productivity and Great Discounts!
Tags: software, sqlserver, mysql, oracle
Published: 2019-02-01 11:12:10

---
title: With Love to Productivity and Great Discounts!
published: true
description: 
tags: Software, SQL Server, MySQL, Oracle
---

This is February! The last winter month, when love for hard work and code creation can warm you up and make spring come faster! St. Valentine’s Day is coming soon, so we have prepared a whole range of beneficial offers that will be surely warming you during the last winter month!

From Feb 1 to Feb 28, everyone will have the opportunity to purchase the following Devart products with attractive discounts:

- Code Compare Bundle – 30%
- Code Compare – 20%
- Review Assistant – 20%
- SQL Complete – 10%
- Studio for SQL Server – 10%
- Studio for MySQL – 10%
- Studio for Oracle – 10%
- Studio for PostgreSQL – 10%

Sounds interesting? Learn more about the Devart February Discounts at https://www.devart.com/with-love-to-productivity/

Be more effective & productive with Devart!
broot, a new way to browse directories
Tags: githunt, rust, cli, linux
Published: 2019-02-01 11:05:05

---
cover_image: https://github.com/Canop/broot/raw/master/img/20190128-cd.png
title: broot, a new way to browse directories
published: true
description: 
tags: #githunt #rust #cli #linux
---

I always loved the overview you can get from a tree like view. But `tree` is almost never usable, because it usually generates pages (or hundreds of pages) of output.

`tree` is also not interactively searchable and of course doesn't act as a launcher. 

`tree` was one of the starting point in the reflection. `fzf` was another one, I can't live without fuzzy search anymore.

And thus I made [broot](https://github.com/Canop/broot) which I use all the time, which lets me go to any directory or file with a few keystrokes and faster than any other one.

![shortcut](https://thepracticaldev.s3.amazonaws.com/i/nkbjz085ov9drby0pic5.png)


It's ready for general consumption, now, but I'm still thirsty for feedback.

**broot** can be launched with commands, which allows for example non interactive shortcuts like this one:

![dcd rulset](https://thepracticaldev.s3.amazonaws.com/i/4p9g423vr5q5012ag6dl.png)

If any rust expert is around, I'd love to discuss the code, especially any ideas of micro-optimizations (the development of such a program is all about speed).

{% github Canop/broot %}
Tableau Date Filtering Using LOOKUP Shows No Data
Tags: tableau, lod
Published: 2019-02-01 08:13:51

---
title: Tableau Date Filtering Using LOOKUP Shows No Data
published: true
description: 
tags: #tableau #LOD 
---

Date Filters, is that spread on your sandwich. You've gotta have it. Occassionally, you dont!

If you happen to use LOOKUP() in your report along with a date filter, you are going to observe that the data goes _null_ when you select Dates other than _ALL_ . The solution for this by Tableau is available at this [_link_] (https://kb.tableau.com/articles/howto/date-filtering-using-lookup-shows-no-data).

However, I'd like to elaborate with an example.

Let's take YoY %Diff of Sales v/s MMM/YYYY. Pretty straight forward with tableau giving you a one click option. (Right click Sales > Quick Table Calculations > YoY Growth). The layout would look like below , along with the year filter (with _All_ selected)
![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/n5xxzg4ln7nvplrdbx8k.jpg)


Now, try selecting one of the years, and the layout just vanishes. See below:

![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/wlbv6f6mlofqlgr0f3su.png)

So, why does this happen you ask ? Table calculations - in our case : LOOKUP() ,needs to have all of the data in the view to work because it is referencing that data in other cells to make its calculation. But, when you apply the date filter the reference isn't available anymore.

The Workaround : _**Dynamic Hiding**_
Create a table calculation to replicate the data and then filter on this new Table Calculation.
_Formula_ : LOOKUP(YEAR(MIN([Order Date])),0)
Turn this to discrete and create your filter. Remove the thousandths place by changing number format.To remove the 2010, add filter Sales<>Null in the filter shelf. 

The Final layout is as below:

![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/fgopzrjimrd2qdjuzp66.png)



Reference : Brandon Shonk
T-shirt from Hacktoberfest is here
Tags: hacktoberfest, opensource, github
Published: 2019-02-01 07:04:32

---
title: T-shirt from Hacktoberfest is here
published: true
description: Finnaly I've got one!
tags: Hacktoberfest, open source, github
cover_image: https://im0-tub-ru.yandex.net/i?id=b759887be7419cda4b37fa52e8362607-l&n=13
---

Hey everyone! I Finnaly got my t-shirt and stickers for participating in [Hacktoberfest](https://hacktoberfest.digitalocean.com/). It took so long, and there it is.![T-SHIRT](https://thepracticaldev.s3.amazonaws.com/i/y3eqwz5d23pg2dhctdtl.jpg) I'm here to thank guys from [digitalocean](https://digitalocean.com) and all of the sponsors for such event, where you can learn how to take place in open source projects. It's really helpful for begginers in such things. Try it out!
Friday Blast #59
Tags: fridayblast, links, post
Published: 2019-02-03 10:52:36

---
title: Friday Blast #59
published: true
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-59.html
series: "Friday Blast"
---

[Azure Cosmos DB (2018)](http://muratbuffalo.blogspot.com/2018/08/azure-cosmos-db.html) - Murat was a CS professor who’s blog I was following for some time. Recently he’s made the jump to industry, at least for a Sabbatical, working on Microsoft’s Cosmos DB. I had some vague knowledge of it, as this sort of Spanner / Cloud Data Store type thing. But it seems it’s _so much more_ than that. Or at least it attempts to. It’s wants to basically be a all-in-one database, with OLAP and OLTP support, distributed by default, planet scale geo-distribution by default and with all sorts of APIs for accessing it: SQL, Mongo etc. Probably fun to build against, but not so fun to _depend on it_, cause it’s unlikely anybody will be able to match it soon. Still, interesting read and the first of many detailing his work on the system.

[The joys of circuit breaking (2018)](https://medium.com/zendesk-engineering/the-joys-of-circuit-breaking-ee6584acd687) - circuit breakers are a fundamental pattern when building distributed systems (at least the RPC based variety). They’re simple enough - if a service is consistent in failure, mark it as such as a caller and fail fast later. However, when combined with retries and rate-limiting the interactions are subtle and open up the avenue for interesting and catastrophic failures. Like the team at ZenDesk found out.

[The many faces of consistency (2018)](http://muratbuffalo.blogspot.com/2018/08/the-many-faces-of-consistency.html) - a review of [this](https://pdfs.semanticscholar.org/8d67/a8f90586e3c074a60a871a210785ee61c43e.pdf) paper. Both easy reads. The case is that consistency is kind of an overloaded term in the _systems_ community. And the authors attempt to break it down into _operational_ and _state_ consistency, while giving examples of how the traditional notions (sequential consistency, linearizability etc) map to them. Good read. This is a field which is constantly evolving, so the terms are still fuzzy.

[E-commerce at scale: inside Shopify’s tech stack (2018)](https://engineering.shopify.com/blogs/engineering/e-commerce-at-scale-inside-shopifys-tech-stack) - interesting read about Shopify’s architecture. The most interesting thing is their approach to sharding. Basically the whole setup is sharded - not just DBs or webservers, but caches, Redises etc. There’s a whole bunch of identical systems running inside Shopify, all of them handling various shops independently. This is quite interesting and a mix between the traditional “one-setup-per-client” some shops use, and “everyting-together” other SaaS companies use. Curious how they deal with centralised services for logging, monitoring etc. The biggest downside I can see is a more complex release process. You have to do N database migrations instead of one big one.
Function.bind.bind does not work in JavaScript
Tags: javascript, discuss, showdev
Published: 2019-02-01 06:36:27

---
title: Function.bind.bind does not work in JavaScript
published: true
description: Once bound, function cannot be bound again in JavaScript
tags: #javascript #discuss #showdev
---

To my surprise, I wrote the code,

```javascript
function printThis() {
   console.log(this);
}

const f = printThis.bind(5).bind(7);
f(); // prints 5 instead of 7

f.call(9); // still prints 5

```

This creates a problem when a function is already bound in event handlers and can cause nightmares if some function did this and broke the library. Ideally it should either thrown an error or there should be a way to detect if function is already bound.

So how will I know if function is already bound?

Though this is a good interview question, a part of JS I didn't know.
Some useful Pacman commands
Tags: linux, archlinux, pacman
Published: 2019-02-01 06:17:38

---
title: Some useful Pacman commands
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/u6gv1m5fnkqhrkiytson.png
tags: linux, archlinux, pacman
---

*[originally posted on my blog](https://siatwe.github.io/blog/index.html)*

Here are some Pacman commands that I find quite useful and that may not be known by everyone:

- This command shows all packages you have installed yourself, except "base" and "base-devel" packages which were installed during the installation of Arch:

```bash
pacman -Qei | awk '/^Name/ { name=$3 } /^Groups/ { if ( $3 != "base" && $3 != "base-devel" ) { print name } }'
```

Shows all installed packages and their individual memory sizes starting with the smallest:

```bash
pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
```

- Uninstall all unneeded packages and their unused dependencies. Quite useful to clean up here and there occasionally:

```bash
sudo pacman -Rsn $(pacman -Qdtq)
```

- With this command you can display all packages you have received via the AUR. (Lists all foreign packages, which, for most users, means AUR):
```bash
pacman -Qqm
```

Pacman stores fetched packages and does not automatically delete old or uninstalled packages. Of course, this has a few advantages:

- So you can easily downgrade packages.
- Packages that have been uninstalled and need to be reinstalled can be installed directly from the cache folder (of course only if there is no newer version in the repos).

However you should clean up this cache here and there so that it does not become infinitely large.
For this there is a script called paccache. It uninstalls all stored package data of the installed and uninstalled packages except the last three. And that should normally be enough:

```bash
sudo paccache -r
```

- It is also possible to automate paccache. With the following command paccache deletes the cache weekly:

```bash
sudo systemctl enable paccache.timer --now
```
做 IT = 做狗 [Coding like a dog in Hong Kong]
Tags: itdog, hongkong, hk, hongkongnoit
Published: 2019-02-01 06:10:07

---
title: 做 IT = 做狗 [Coding like a dog in Hong Kong]
published: true
description: 喺香港，做 IT = 做狗 [Coding makes you worse than a dog in Hong Kong China]
tags: itdog, hongkong, hk, HongKongNoIT
---
喺香港，做 IT = 做狗 [Coding makes you worse than a dog in Hong Kong, China]

![](https://static.appledaily.hk/images/e-paper/20171211/large/1512981932_0852.jpg)

```js
assertTrue(code.in(HK) === 'dog')
```
Displaying a css spinner on ajax calls with fetch api
Tags: javascript, css, webdev, beginners
Published: 2019-02-01 05:32:50

I always have to search for how to do this or refer back to my previous code whenever I work with `fetch`. For a while, I've used the solution to [this](https://stackoverflow.com/questions/43792026/display-spinner-during-ajax-call-when-using-fetch-api) SO question. It's a correct solution and it works great but to be honest, I couldn't really explain _very well_ what was going on if someone asked me to explain that piece of my code. So I thought of a simple way to do it. It's very simple really, I think I was just overthinking it. Here's how:

## Setting up the HTML

```html
<!-- this will show our spinner -->
<div id="spinner"></div> 

<!-- And this will fetch our data -->
<button onclick="fetchData()">Load data</button>
```

## Creating the CSS spinner

```css
#spinner{
  visibility: hidden;
  width: 80px;
  height: 80px;
    
  border: 2px solid #f3f3f3;
  border-top:3px solid #f25a41;
  border-radius: 100%;
    
  position: absolute;
  top:0;
  bottom:0;
  left:0;
  right: 0;
  margin: auto;
    
  animation: spin 1s infinite linear;
}

@keyframes spin {
  from {
      transform: rotate(0deg);
  } to {
      transform: rotate(360deg);
  }
}

#spinner.show {
  visibility: visible;
}
```

The spinner visibility is hidden by default. This is the element we'll manipulate in order to show and hide it as desired.

## Getting things working with Javascript

I'll use the [random user generator api](https://randomuser.me/).

```javascript
const spinner = document.getElementById("spinner");

function showSpinner() {
  spinner.className = "show";
  setTimeout(() => {
    spinner.className = spinner.className.replace("show", "");
  }, 5000);
}

// function hideSpinner() {
//   spinner.className = spinner.className.replace("show", "");
// }

function loadData() {
  showSpinner()
  fetch('https://randomuser.me/api/')
  .then(response => response.json())
    .then(data => {
    // hideSpinner()
    console.log(data)
  });
}
```

When `showSpinner()` is called, it adds a `show` class to the `spinner` element, which turns the `visibility: visible` as we specified in the css. To hide the spinner, the `show` class is removed which turns the `visibility: hidden`.

For demonstration purposes, I've used a timeout function and set it to 5 seconds so the spinner can load since fetching the data takes like 1 second. But ideally, you'd want to have a `hideSpinner()` function and call that after the data has been returned. Then, the timeout time should be increased to maybe 15 seconds since you don't want it to load forever, after which you'd show an error.

Here's the [pen](https://codepen.io/wang0nya/pen/bzwQPr)
GraphQL - postponed technical debt or silver bullet?
Tags: question, graphql, technicaldebt
Published: 2019-02-01 05:09:34

---
title: GraphQL - postponed technical debt or silver bullet?
published: true
description: GraphQL speeds up developing on the first stages. Does it take much more time later?
tags: question, graphql, technicaldebt
---

I've never worked with GraphQL long enough, but I get kind of feeling, it gives advantages on the first year of developing, but it takes much more than custom RESTful API later.

Curios, if somebody has statistic or observation on projects aged 3-5 years. 
Are there any problems with refactoring? 
Does code become too complex and takes much time to implement new features?