teleren/devto huggingface dataset:
A Little Peppermint
Tags: productdesign, ux, learninpublic
Published: 2020-03-03 01:53:49

Beauty products make all kinds of promises to their consumers, but how are they supposed to know if it's "working?"

When the consumer starts applying that facial scrub, they know it's working when they start to feel the tingle. That tingle is a little bit of peppermint that the makers put in these products. The peppermint itself is not an active ingredient. It won't clear out your pores, rejuvenate, or hydrate -- it's just there to make the active ingredients more impressive.

The same concept is applied to a variety of software products. Everyone loves a snappy experience when shopping, but if you are trying to find the best price on a flight or a clothing stylist that is just right for you, wouldn't you feel better if it took the machine a few seconds to really crunch the numbers before finding a match? Even if your highly-optimized system could have a result rendered to the browser in 100ms, it might be more enticing to the end user if it takes a couple seconds.

Consider the airline example. You could add an animated [split-flap display](https://en.wikipedia.org/wiki/Split-flap_display), for [a little whimsy](https://www.youtube.com/watch?v=-XU75AEBykk), that lets the user know that you are hard at working finding the best flight for them. You might have a result sooner, but this bit of flare reasserts your value proposition and subtly tells the user that your secret sauce is hard at work for them.

To be sure, there is a bit of deception behind this technique. You should use it sparingly. With a little peppermint added in the right way, you'll help your users know that it's working.

---

I've only heard anecdotally of this technique being used. I'd love to find some documented examples of it. [Reach out](https://twitter.com/jbrancha) or leave a comment if you know of anything.

Examples:

<blockquote class="twitter-tweet" data-conversation="none"><p lang="en" dir="ltr">I&#39;ve implemented it! In Rally&#39;s (now defunct) Choice benefits management platform, we had an data-import upload that only took .5 seconds to process, but we implemented a processing bar that took 3+ seconds - because users expected it to take time.</p>&mdash; Nicholas Bailey (@nbdbailey) <a href="https://twitter.com/nbdbailey/status/1234907544843362304?ref_src=twsrc%5Etfw">March 3, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
How to perform Local Push Notifications on React Native without remote providers like Firebase or OneSignal
Tags: reactnative, react, beginners, tutorial
Published: 2020-03-03 01:41:32

React Native Push Notifications often require third-party services like Firebase or OneSignal to operate. However, you can also install get them up and running without any external systems by having them set up locally.

![local-push-notifications-react-native](https://adriantwarog.com/wp-content/uploads/2020/03/local-push-notifications-react-native.gif)

Using [react-native-push-notifications](https://github.com/zo0r/react-native-push-notification) library we can create local push notifications and scheduled ones too. This would be similar to having set an event in the app or even a timer to trigger a notification while running the app, or even after it has been closed.
{% youtube z6DEJXYQpP4%}
**Included in this video:**
* Installing react-native-push-notifications
* Ensuring all dependencies are setup for iOS and Android
* Creating a local push notification
* Scheduling a push notification in the future

## Follow and support me: 
Special thanks if you subscribe to my channel :)
* [Youtube](https://www.youtube.com/channel/UCvM5YYWwfLwpcQgbRr68JLQ?sub_confirmation=1)
* [Patreon](https://www.patreon.com/adriantwarog)
* [Twitter](https://twitter.com/twarogadrian)
* [Discord](https://discord.gg/nGdThpE)

## Want to see more:
I will try to post new great content every day. Here are the latest items:
* [Adobe XD to Fully Responsive WordPress Site](https://dev.to/adriantwarog/adobe-xd-to-fully-responsive-wordpress-site-16e0)
* [Adobe XD to HTML Full Process](https://dev.to/adriantwarog/adobe-xd-to-html-full-process-ao6)
* [Full Tutorial on how to use SASS to improve your CSS](https://dev.to/adriantwarog/full-tutorial-on-how-to-use-sass-to-improve-your-css-57on)
* [Creating a Mobile Design and Developing it](https://dev.to/adriantwarog/creating-a-mobile-design-and-developing-it-5c4o)
Manipulando Datas no Postgres
Tags: sql, postgres, database
Published: 2020-03-03 01:31:56

Fala devs, tudo bem? espero que sim. O ano de 2020 começou daquele jeito, mil projetos, prazos ridiculamente curtos, último ano da Faculdade S2, TCC e por ai vai. Porém desde ano passado venho cultivando a vontade de participar mais, criar conteúdo e fortalecer a comunidade. 
Para dar inicio a  esse novo desafio (Sim para mim é um grande desafio, estar aqui escrevendo um artigo) andei pensando durante muitos dias sobre um tema. Pois não é que o tema acabou caindo no meu colo na forma de uma baita dor de cabeça? 
Todos sabemos que migração de Banco de dados sempre gera um stress e muita dor de cabeça. No meu caso além da migração do banco de Firebird para Postgres, a aplicação sofreria uma atualização para trabalhar com Postgres. 
Que dor de cabeça heim? Pois descobrimos que uma das atualizações era a mudança de datastyle de European (DD/MM/AAA) para o padrão ISO (AAAA/MM/DD). 

A primeira ideia que surgiu na minha cabeça foi a de mudar o datastyle, porém o  mesmo não seria possível :( 

A solução era manter o padrão ISO e se utilizar de artimanhas (gambiarra?) para contornar nosso problema. 

No Postgres, poderíamos fazer uma inserção semelhante a essa:

insert into test(data) values ('32-01-2020'); --até agora tudo certo, padrão (DD/MM/AAA)

Até ai tudo bem, contudo ao recuperar esse valor do banco teríamos algo assim: 

select * from test;

Resultaria em 2020-01-30 convertido para ISO automaticamente. 

E para recuperar no formato que (DD/MM/AAAA) poderíamos utilizar a seguinte função nativa do Postgres.

select to_char(data, 'DD/MM/YYYY') from test; 

Agora retornando para o formato desejado. 

Se esse texto lhe ajudou, se encontrou algum erro ou tem alguma sugestão, gostaria muito de ouvir o que você tem a dizer.

Por hoje é só, até breve.
Drivine - database client for TypeScript/Node.js
Tags: node, typescript
Published: 2020-03-03 01:29:34

Hey Folks!

We recently published version 1.0 and followed with 1.x of Drivine. Drivine is a database library for Node.js and TypeScript, with first-class support for graph-databases like Neo4j.

My favorite feature in this release is distributed transactions - even across databases of different types. We use this facility on a business process management product, a multi-tenanted application where transactions must span a master database and a separate customer database.

Details are available on the website: https://drivine.org
Fixed:  Android license status unknown (flutter)
Tags: flutter, android, license, androidstudio
Published: 2020-03-03 02:47:57

---
title: Fixed:  Android license status unknown (flutter)
published: true
date: 2020-03-03 01:27:00 UTC
tags: Flutter,Android,License,Android Studio
canonical_url: https://robbinespu.gitlab.io/blog/2020/03/03/flutter-issue-fixed-android-license-status-unknown-on-windows/
---

Based on previous [post](https://robbinespu.gitlab.io/blog/2020/03/02/flutter-issue-android-license-status-unknown-on-windows/), I have problem with flutter installation. Seems `flutter -doctor` keep saying android license status unknown and no `sdk tool` directory create when installing Android Studio 3.6.1 :question:

So here the solution, open your SDK manager then uncheck `Hide Obsolete Packages`

![IMG](https://images2.imgbox.com/fe/6b/edY02t88_o.png#center)

Now you’ll see `Android SDK Tools (Obsolete) 26.1.1` appears. Tick that package and hit `apply button`

![IMG](https://images2.imgbox.com/3b/11/x0aqnVzi_o.png#center)

Nice, now if you run `flutter doctor`, you should get positive result as below

```
PS D:\Workplace\flutter_projects> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.657], locale en-MY)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.42.1)
[√] Connected device (1 available)

• No issues found!

PS D:\Workplace\flutter_projects> flutter doctor --android-licenses -v
All SDK package licenses accepted.======] 100% Computing updates...

```

if needed we can download package manually here [https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip](https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip) (for Windows user). Hope this tutorial help people who looking for solution :innocent:
Kotlin: First Impressions
Tags: kotlin, java, firstimpressions, learning
Published: 2023-01-24 16:09:31

---
title: Kotlin: First Impressions
published: true
date: 2020-03-03 00:00:00 UTC
tags: kotlin, java, firstimpressions, learning
canonical_url: https://www.rocky.dev/kotlin-first-impressions
---

I played around with Kotlin recently and was pretty impressed. It seems like they took the best parts of C#, Scala, and Go. Here's a quick rundown of some features.

- Expression bodied functions

  ```kotlin
  fun sum(a: Int, b: Int) = a + b
  ```

- Immutable variables with type inference

  ```kotlin
  val b = 2
  ```

- String templates

  ```kotlin
  val s2 = "${s1.replace("is", "was")}, but now is $a"
  ```

- Type checks and automatic casts

  ```kotlin
  if (obj is String && obj.length > 0) // obj casted to a string
  ```

- Pattern matching,

  ```kotlin
  when (obj) {
    1          -> "One"
    "Hello"    -> "Greeting"
    is Long    -> "Long"
    !is String -> "Not a string"
    else       -> "Unknown"
  }
  ```

- Ranges

  ```kotlin
  for (x in 1..5) ...
  ```

- Immutable collections with lambdas

  ```kotlin
  val fruits = listOf("banana", "avocado", "apple", "kiwifruit")
  fruits
    .filter { it.startsWith("a") }
    .sortedBy { it }
    .map { it.toUpperCase() }
    .forEach { println(it) }
  ```

- DTOs with equals, copy, toString; can be created without new

  ```kotlin
  data class Customer(val name: String, val email: String)
  ```

- Default parameter values

  ```kotlin
  fun foo(a: Int = 0, b: String = "")
  ```

- Extension functions

  ```kotlin
  fun String.spaceToCamelCase() { ... }
  "Convert this to camelCase".spaceToCamelCase()
  Singletons,
  object Resource {
    val name = "Name"
  }
  ```

- Elvis operator aka "if not null" shorthand

  ```kotlin
  println(files?.size)
  ```

- "If not null and else" shorthand

  ```kotlin
  println(files?.size ?: "empty")
  ```

- Get item of possibly empty list

  ```kotlin
  emails.firstOrNull() ?: ""
  ```

- `if` expressions

  ```kotlin
  val result = if (param == 1) "one" else "other"
  ```

- Nullables without the `.Get` and `.HasValue` in C#

  ```kotlin
  val b: Boolean? = ...
  if (b == true) { ... } else { /* b is false or null */ }
  ```

- The main Go influence seems to be coroutines (lightweight threads) for async code. They also reminded me of C#'s `async`/`await`, [here's a good explanation](https://kotlinlang.org/docs/coroutines-basics.html).
How to build large and complex apps?
Tags: javascript, react, tutorial, codenewbie
Published: 2020-03-03 00:27:31

## Right technologies

Choose the technologies you are most comfortable with.
For front-end, back-end, hosting, and CI-CD.

Reduce as much friction as possible. 
Have an end to end workflow in place.

## Buddy-up

Partner with a buddy if necessary.
Delegate and distribute tasks based on expertise.

## Multiple platforms

Target multiple platforms at once.
That's what Flutter, Ionic, and React Native is for.

And build mobile-first app. Majority of your users are going to use your app on their mobile

## Build MVP

Code fast. Don't over-engineer your app.
Keep it lean. Ship small and get early feedback.

Aim for absolute MVP.

## Validate Your Idea

Don't make it look pretty. Don't bloat it with non-validated features.
Ask for feedback and implement them.

Have beta testers in place.
Ask in online forums, FB groups, Reddit, Twitter.

## Repeat

Always build scalable apps!

Repeat the process - build MVP, validate your ideas, add those validated features to your MVP.


--- 

I love jotting down my thoughts on my blog [Ninja Academy](http://ngninja.com/). 

And, if you are looking to level up your Web Development chops, do check out my [Ultimate Web Development Bootcamp](https://cutt.ly/web-development-bootcamp).
Beginner: navigation on a dynamic website.
Tags: ruby, rails, activerecord, dynamic
Published: 2020-03-03 00:23:32


It's been a while since I first make my "Hello World" appear successfully on a website. Now, it's time to make more complicated stuff appear successfully as well.

Here are a few repeating steps that will ensure the first dynamic website (localhost) works:

1. Generating models.
2. Establish relationships between models.
3. Setting up associations.
4. Write the seed file.
5. Create migration.
6. Establishing routes.
7. Run migration.
8. Run seed file.
9. Drafting methods under the model controller.
10. Make view templates.
11. Running the website on your server and start debugging!

Step 1: Generating models.
It is recommended to use rails terminal command line whenever you want to generate a new model. Commands such as "rails g resource ..." would make everything set up a lot faster than if you manually do it by using the graphic interface.

Step 2: Establish relationships between models.
This is the most important step. Make sure to understand the relationships between models and to get everything correctly. ActiveRecord is an amazing tool if you get all your relationships right. I draw all your models out into a paper so that I can visually imagine how my models will be related to each other. And I tend to look at them very often to see where things are going, like opening a map to make sure that "I'm not lost."

Step 3: Setting up associations.
After I've drawn all relationships into a paper, setting up associations should be easy. Most likely I'll have one-to-many, or many-to-many-through relationships. Has_many and belongs_to, make sure your pluralize and singular terms are corrected.

Step 4: Write the seed file.
Optional. Either write your own seed file or having the user to be able to create it themselves work!

Step 5: Create migration.
Migration... don't forget to migrate.

Step 6: Establishing routes.
If you're not too worried about Google eliminating your websites for having too many unused routes, using "resources" is fine. But as a good programmer you are, make sure to specify which route you're using so you don't have any unused routes.

Step 7: Run migration.
Run migrate...

Step 8: Run seed file.
Make sure your fake database is there.

Step 9: Drafting methods under the model controller.
Write your dynamic things here!

Step 11: Make view templates.
All pages that need a view should have a view. Using "_form.html.erb" would be so helpful! You might want to know a little more about html, since erb is the file with a combination of both ruby and HTML (and CSS as well).

Step 12: Running the website on your server and start debugging!
Learn more about debugging tools early on will help a lot!
Fighting my procrastination: Part 1
Published: 2020-03-03 07:35:26

---
title: Fighting my procrastination: Part 1
published: true
date: 2020-03-03 00:00:00 UTC
tags: 
canonical_url: 
---

Hi, this post is going to be part of a series about productivity, procrastination and how to form better habits around open-source work.

I can be a terrible procrastinator. Sometimes it’s productive procrastination, other times it’s just browsing Reddit or watching YouTube videos. With these posts I want to share some of my approaches to keep my procrastination at a non-destructive level.

In retrospect, one key part of this battle has been to move my procrastination away from the computer and internet and to only use my computer for non-procrastination things. This post describes the key parts that are working for me right now.

## Firefox Extensions

I’m using two Firefox extensions to limit some of my procrastination:

- 

**[Youtube Unhooked](https://addons.mozilla.org/en-US/firefox/addon/youtube-unhooked/)** is a small extension that will block the more useless partsof youtube, such as recommendations, related videos and of course, thecomments. I found this useful mostly for hiding the related videos section.

- 

**[Facebook News Feed Eradicator](https://addons.mozilla.org/en-US/firefox/addon/news-feed-eradicator/)** is another very focused extension that will hide the Facebook news feed. This is useful because I pretty much only use Facebook for the events part.

You have probably already heard of **[LeechBlock](https://addons.mozilla.org/en-US/firefox/addon/leechblock-ng/)**. It worked for me for a few weeks but I got into the habit of just going to `about::addons` and disabling it… Which brings me to my current solution for blocking websites.

## `/etc/hosts` blocklist with cronjob

As a replacement for LeechBlock, I’ve been utilizing my `/etc/hosts` file for some time now. Editing it requires me to enter my sudo password which makes it a bit more difficult to unblock blocked sites. However, it was not difficult enough. I ended up removing sites from the file and never got around to add them again.

To solve that problem, I now have an [Ansible playbook](https://github.com/phansch/dotfiles/blob/35486702f404d6ba4ed514e612a4d20a93e6a41a/ansible/playbooks/procrastination.yml#L11) that creates a cronjob which runs every 2 minutes. The cronjob resets the `/etc/hosts` file to the contents of a `/etc/hosts_base` file where all of my go-to procrastination sites are blocked.

I have found this to work _surprisingly_ well.

Of course, this has potential to fall apart if I start editing `/etc/hosts_base` But so far that hasn’t been the case.

## An ongoing fight

I don’t claim to have found a perfect solution here. It’s more the case that I think that fighting procrastination is a never ending battle. I will always find some way to procrastinate. However, by at least limiting some of the bad habits on my computer, I think that I’m more likely to produce something of value when I’m using it without distractions.
Spectral intro, Solid state cards | Module Monday 75
Tags: showdev, githunt, webdev, javascript
Published: 2020-03-03 00:00:39

---
title: Spectral intro, Solid state cards | Module Monday 75
published: true
description: Module Monday 75
tags: showdev, githunt, webdev, javascript
cover_image: https://res.cloudinary.com/component/image/upload/b_rgb:ffffff,c_lpad,h_350,w_800/v1583113349/intro_nsqvmd.gif
canonical_url: https://guide.anymod.com/module-monday/75.html
---

## Open source modules

Mods can be used on any website, web app, or anywhere else. There are hundreds more like these built & shared on [AnyMod](https://anymod.com).

Click a mod to see it along with its source code.

## Spectral intro
Animated parallax intro section based on the Spectral theme.
<a class="btn btn-sm" href="https://anymod.com/mod/spectral-hero-intro-llorbo?preview=true">View mod</a>
<a href="https://anymod.com/mod/spectral-hero-intro-llorbo?preview=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1583113349/intro_nsqvmd.gif"/>
</a>

## Solid state cards
Dark card section with calls to action and responsiveness built in.
<a class="btn btn-sm" href="https://anymod.com/mod/card-section-mlrnmo?preview=true">View mod</a>
<a href="https://anymod.com/mod/card-section-mlrnmo?preview=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1583113341/cards_wvq5h0.png"/>
</a>

## Image underlay text
Add a bold headline with any image underneath it.
<a class="btn btn-sm" href="https://anymod.com/mod/image-letter-text-mllrlr">View mod</a>
<a href="https://anymod.com/mod/image-letter-text-mllrlr">
  <img src="https://res.cloudinary.com/component/image/upload/v1583113341/underlay_ww27wx.png"/>
</a>

## Map with marker
Put your location on the map anywhere on your site in under 5 minutes.
<a class="btn btn-sm" href="https://anymod.com/mod/google-map-with-marker-moamb?preview=true">View mod</a>
<a href="https://anymod.com/mod/google-map-with-marker-moamb?preview=true">
  <img src="https://res.cloudinary.com/component/image/upload/v1583113349/map_zanszk.gif"/>
</a>

## Prism form
Work automatically with no backend required, and displays your other contact into too.
<a class="btn btn-sm" href="https://anymod.com/mod/elegant-contact-form-with-contact-details-llknoo">View mod</a>
<a href="https://anymod.com/mod/elegant-contact-form-with-contact-details-llknoo">
  <img src="https://res.cloudinary.com/component/image/upload/v1583113341/form_r8be82.png"/>
</a>

<hr>

I post new mods from the community [here](https://dev.to/tyrw) every (Module) Monday -- I hope you find them useful!

Happy coding ✌️
How to Exit Vim
Tags: vim
Published: 2020-06-11 14:19:15

---
title: How to Exit Vim
published: true
date: 2020-03-03 00:00:00 UTC
tags: vim
canonical_url: https://tech.serhatteker.com/post/2020-03/how-to-exit-vim/
---

Yes, we all have been there: You are stuck and cannot escape __Vim__. It says:

```vim
"type :quit<Enter> to quit VIM"
```

Here is the solution to escape from this dead-end hell:

1. Press `Esc` key.
2. Hit `:`
3. Press `wq` (`q` short for quit, `w` for write/save)
4. Hit `Enter`

If you dont want to save the changes you made in the file use `q!` instead of `wq`.

### For more

#### 'quit' Alternatives

* `:x` to write and quit (similar to `:wq`, but only write if there are changes)
* `:exit` to write and exit (same as `:x`)
* `:qa` to quit all (short for `:quitall`)
* `:1,5wq` will save only lines 1 to 5 and quit

#### Shortcut Alternatives

After pressing `Esc`:
* `ZZ` will save and quit
* `ZQ` will just quit