teleren/devto huggingface dataset:
Make a simple client-side search engine in Vue.js with Lunr.js
Tags: vue, lunr, search, engine
Published: 2019-01-29 15:25:36

---
title: Make a simple client-side search engine in Vue.js with Lunr.js
published: true
description: 
cover_image: https://fabiofranchino.com/blog/assets/posts/how-to-make-a-client-side-search-engine-with-vue-and-lunr/cover2.png
tags: vue, lunr, search, engine
---

Hi there, I wrote [a little tutorial](https://fabiofranchino.com/blog/how-to-make-a-client-side-search-engine-with-vue-and-lunr/) about the topic the title suggests.

I'm still wondering if a specific part can be improved to avoid possible performance bottleneck on Vue.js.

I'm referring to the last snippet, the implementation related to the integration between the Lunr results and the array needed by Vue.js for list display.
If any Vue.js internal experts out there, maybe might shed some lights.

Thanks
Configurando teclado do notebook Thinkpad com Linux
Tags: linux, thinkpad
Published: 2019-01-29 14:41:52

---
title: Configurando teclado do notebook Thinkpad com Linux
published: true
description: 
tags: linux, Thinkpad 
---

Logo depois da instalação de algumas distribuições Linux, a tecla "/?" (do teclado padrão brasileiro) pode não funcionar, ficando difícil digitar qualquer diretório, ou escrever qualquer pergunta...

Usar `AltGr+Q` para escrever `/` e `AltGr+W` para `?` 

Para resolver o problema definitivamente, rodar o comando abaixo e escolher o seu modelo de ThinkPad:
```
sudo dpkg-reconfigure keyboard-configuration
```
Executables in Subversion
Tags: svn, subversion
Published: 2019-01-29 14:36:31

---
title: Executables in Subversion
published: true
description: 
tags: svn, subversion
---

To add the "executable bit":

```
svn propset svn:executable on <list of files>
```

To remove the "executable bit":

```
svn propdel svn:executable <list of files>
```

After that, remember to commit the directory.
FaceTime Vulnerability Allows Unauthorized Access to iPhone Mic
Tags: news, discuss, security, ios
Published: 2019-01-29 13:49:38

---
title: FaceTime Vulnerability Allows Unauthorized Access to iPhone Mic
published: true
description: 
tags: news, discuss, security, ios 
---

This is a wild bug.

## [Full story](https://www.businessinsider.com/apple-facetime-privacy-vulnerability-lets-another-user-listen-in-2019-1)

> The bug in FaceTime allows users to dial one of their contacts and listen in to the recipient's microphone before the person actually answers the call. This can be accomplished by using the "add a person" feature after dialing the contact and then adding your own number as the other person.

Not even difficult to pull off.
Open-source graveyard 💀
Tags: discuss, opensource
Published: 2019-01-29 08:53:06

Ever since I've learned to code and I've got to know GitHub as an amazing platform for developers around the world to share their work and effort freely with others, I had one dream. To finally make something that will be useful to others and will gain that sweet, sweet 1000 stars. That's my goal for some time now.

With that being said I've already done 2 open source projects, or rather just one. With the first being a total disaster and having completely wrong direction. And second being a bit better with around 250 stars on GitHub, but [having some problems](https://areknawo.com/coding-controversy). So, the first one definitely ended up in my open-source graveyard and second being in a controversial position, it's time for me to make this 3rd and maybe successful attempt.

But, I would love to hear your experiences! Has your project ever reached 1000 stars? How many of these you have? And... what's in your open-source graveyard... if it even exists? 😁
Is 20-20-20 👁️ or Pomodoro 🍅 not working for you? Try this.
Tags: devtips, health, pomodoro
Published: 2019-01-29 12:56:12

---
title: Is 20-20-20 👁️ or Pomodoro 🍅 not working for you? Try this.
published: true
description: If you are failing with 20-20-20 method or pomodoro method of having breaks periodically you should give this a try.
tags: devtips, health, pomodoro
---

Not sure why but both the techniques didn't work for me and I was in need of something that can force me to take a break.

So I invented 😉 the following technique that works for me. It might sound funny but it's effective.

1. Drink 2-3* glasses of water 🥛🥛🥛 (or as many as possible)
2. Start coding 💻
3. You will need to pee in about 20-25* min, go and attend to it 🚽
4. Repeat...



Benefits:
- More water is healthier 
- You will need to take a break
- You will need to leave your seat and walk 
- Once done, you will feel relaxed and your mind will be at peace. It will help you with a fresh perspective on your work.

*[EDIT] NOTE: By researching on* @simoroshka *'s comment below, it is found that to urinate up to 10 times a day is okay, not more than that. More information is curated in the comment itself, I highly recommend you also check the same.*

Give it a try! 

And yeah, any idea about what should I name this technique? 😂🤔

Stay Productive, Stay Healthy!

Proof read by [Ronak Baldha](https://twitter.com/ron4ex)
Rails Routes, HTTP Methods and SQL Queries
Tags: rails, webdev, learning
Published: 2019-01-29 12:52:42

---
title: Rails Routes, HTTP Methods and SQL Queries
published: true
description: Learning how the rails routes are generated and how they map to HTTP methods and SQL queries is a foundational piece of knowledge that is missed by many developers when starting out. In this post we will explore some of the basics that will help fill in the gap so that students can understand Rails routes in the least amount of time.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/kc8n1psuvbu27wc824wy.png
tags: 
  - rubyonrails
  - webdevelopment
  - learning
---

Learning how the rails routes are generated and how they map to HTTP methods and SQL queries is a foundational piece of knowledge that is missed by many developers when starting out. In this post we will explore some of the basics that will help fill in the gap so that students can understand Rails routes in the least amount of time.

Rails convention depict that a controller should only have 7 actions most of the time. Generally speaking if you are creating a controller or defining routes and you feel like you need something other than the 7 standard action you should consider creating a new controller.

[In the rest of this post](https://blog.codemy.net/rails-routes-http-methods-and-sql-queries/) we uncover how Rails Routes map to HTTP Methods and SQL Queries
Why "copy, paste, fixed" needs to change to "copy, paste, why"
Tags: learning, career, productivity, discuss
Published: 2019-01-29 10:45:22

---
title: Why "copy, paste, fixed" needs to change to "copy, paste, why"
published: true
description: 
tags: #learning #career #productivity #discuss
---

By "copy, paste, fixed" I mean copying a few lines you don't understand into your code that fixes an issue. I am going to present an argument why we need to change our approach to "copy, paste, why".

When we are young we learn by copying actions, my daughter will say:

_"My baby needs to go to sleep Daddy!"_

She has no idea why the baby needs to go to sleep (at 7 or 8 in the morning) but she is learning by copying our actions and talk by saying that our baby (her) needs to go to sleep.

When we are adults, we have more insight into learning, we can look at something and try to ascertain why something occurs. We know that we only really "need" to go to bed when we are tired, or when it's late and you know you have to wake up early, or it's good for us to have regular and undisturbed nights sleep.

Basically when we are young we learn by "copy, paste, fixed".

But when you are an adult you can "copy, paste, fixed" but sometimes this will lead us down the wrong path (Like putting the baby to bed at 8 in the morning)

Take for instance a common gotcha in Python 2.

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)

You do a search as this is confusing and hit upon someone suggesting:

    string.encode('utf-8')

You go whoo, problem fixed move on.

WAIT, WAIT, WAIT, WAIT

Try "copy, paste, why",:

We apply the fix and it works, now we ask why ?

5 minutes later:

"Oh all strings in python 2.7 are assumed by default to be ASCII, oh I was so naïve."

10 minutes later:

"Oh between Python 3 and Python 2 string are handled differently as this was causing confusion generally"

15 minutes later:

"Ok I didn't even know about the unicode type in python 2"


Obviously there are times when you don't have 15-20 minutes to spare for every possible issue, but get into the habit of asking why will make you a better developer.

Let me know if you try this approach rather than "copy paste fixed" and how you get on.
Showing Your Code in an Interview: Advice?
Tags: help, interview, career
Published: 2019-01-29 09:27:02

---
title: Showing Your Code in an Interview: Advice?
published: true
description: 
tags: help, interview, career
---

In a week time, I am going to have a technical interview and I was asked to bring an example of my own work to discuss. I am going to show the project I've been working on for the last 1+ years in my spare time. I know it inside out but I am still worried. 

Would you have any advice on how can I prepare myself? I am revising and cleaning my code a little bit, what should I pay the most attention to?
What is the best working Heroku App with the free tier?
Tags: help, webdev, beginners
Published: 2019-01-29 08:24:55

---
title: What is the best working Heroku App with the free tier?
published: true
description: 
tags: help, webdev, beginners
---

The title says it almost all, but let me give you some context. While I had no experience in web programming, I had a web app idea which I wanted to realize in the course of [my language-teaching project](https://kokimame.github.io/joytan/). And I just deployed my first Django project on Heroku with a free account. So far, it works well. Although it sometimes takes a few seconds to reach the website, this doesn't matter much for my grab-and-go website. Above all, I'm totally amazed by how easy it is to update the web app and to deploy to all the platforms compared to the desktop app development I've worked on.

The problem is I don't fully understand many aspects of the Heroku platform, e.g., I'm still letting `DEBUG = True` while tutorials say I shouldn't. Also, I want to see how good web application can be made with the limitation of the free tier. So, let me know if there're some interesting websites working on the free Heroku cloud which hopefully are hosted on GitHub.

My website is [here](https://jkanji.herokuapp.com/). (If you're learning Japanese, this might help!)
A TypeScript + React Native Starter Kit with React Native Navigation + Redux + Eslint
Tags: reactnative, redux, typescript, rnn2
Published: 2019-01-29 07:35:57

---
title: A TypeScript + React Native Starter Kit with React Native Navigation + Redux + Eslint
published: true
description: The project has been setup based off RN Getting Started and instructions from Microsoft's Github TypeScript React Native Starter repo.
tags: react-native, redux, typescript, rnn2
---

Looking for projects on the we to get started with RN + TypeScript, surprisingly didn't show up much results. So, thought of writing one of my [own](https://github.com/AmitM30/react-native-typescript-boilerplate).

## This is an opinionated [React Native](https://facebook.github.io/react-native/docs/getting-started) Starter Kit with [React Native Navigation](https://github.com/wix/react-native-navigation) + [Redux](https://github.com/reactjs/redux) + [Eslint](https://github.com/airbnb/javascript) to build iOS / Android apps using [TypeScript](https://github.com/Microsoft/TypeScript-React-Native-Starter)

The project has been setup based off [RN Getting Started](https://facebook.github.io/react-native/docs/getting-started) and instructions from [Microsoft's Github TypeScript React Native Starter](https://github.com/Microsoft/TypeScript-React-Native-Starter) repo.

This repo supports the latest version of React Native (v0.57.8+) supported by RNN (at the time of writing).

## Who is this for?

Someone looking to jumpstart building apps using RN and loves TS. The base setup has been taken care of, just `npm install` and get going.

*Disclaimer*: This is an **opinionated** approach to building apps with RN. The project structure is inspired by multiple production apps built by the contributors.

The project uses and encourages to use industry best practices / tools / libraries like RNN, redux, eslint, separation of concern and structure to build a maintainable app.
Why Restaurant Owners Must Have Food Ordering App?
Tags: android, restaurant, ios, application
Published: 2019-01-29 07:14:40

---
title: "Why Restaurant Owners Must Have Food Ordering App?"
published: "true"
description: "Here are listed down some reasons that show why restaurant owners must have food ordering and delivery app, "
tags: #android #restaurant #iOS #application 
---


<img class="alignnone size-full wp-image-44" src="https://images.pexels.com/photos/1418355/pexels-photo-1418355.jpeg" alt="taxi app development" width="640" height="426" />

It is the era of on-demand mobile apps. For people who are always on the go, the on-demand food delivery app is a boon. It not only saves time but also money. The food is delivered right at the doorstep as per their convenience.

If you, as an entrepreneur, are interested in creating an on-demand food delivery app, then you need to hire the best in business. Select a good on-demand food delivery development company that has already developed food delivery apps. 

The ultimate success is when you create a perfect on-demand food ordering mobile app that follows a different approach with the induction of latest methodologies. An efficient on-demand food delivery app must manage the three activities of platform, preparation, and delivery.  

This article outlines the reason why there is a good requirement for on-demand food delivery apps. Read on to know the enormous benefits that the app has for the customers and the important considerations that are to be taken when developing a good on-demand food delivery app. <a href="https://www.peppyocean.com/on-demand-food-delivery-app-the-must-have-mobile-app-for-restaurant-owners/">Click to continue reading...</a>
Why I Create Atomic Commits In Git
Tags: technical, terminal, git, cli
Published: 2019-01-29 06:36:54

---
title: Why I Create Atomic Commits In Git
published: true
description: I want to share what I understand about atomic and monolithic commits and why I create atomic commits in Git.
tags: technical, terminal, git, cli
---

I [wrote](https://curiousprogrammer.io/blog/how-to-craft-your-changes-into-small-atomic-commits-using-git) about how to craft changes into small atomic commits using Git. It looked like there was some confusion so I [elaborated](https://curiousprogrammer.io/blog/why-i-create-atomic-commits-in-git) with my post on why I create atomic commits in Git.

I don't know what the official definition is but to me an atomic commit is a commit that is focused on one context and one context only. By context I mean a single topic: a feature, bug fix, refactor, upgrade, task...

In a monolithic commit everything is committed in one go. A tightly coupled, tangled, or a spaghetti commit. The larger the commit, the more brittle and error prone it becomes because it becomes harder to understand, read, review and revert.

## Why atomic?

They are easier to:

* **track** - I know where they are in the history. `git log --oneline` shows me all commits. `git log --grep <pattern>` lets me find a commit based on a partial message. `git log <commit>` will jump to that commit and show previous commits.

* **understand** - I document each change with a commit message and elaborate with an explanation if I need to.

* **read** - it's a change focused on a single context which makes it smaller, simpler and easier to read the patch `git show <commit>` or `git log <commit> -p`

* **review** - as it is a small, focused, documented change, a reviewer should easily be able to follow the code changes and keep their sanity.

* **revert** - reverting `git revert <commit>` an atomic commit will not revert unrelated changes like a monolithic commit would.

## What do I do?

* Work on one thing
* Keep my changes as small as possible
* Commit often
* Be vigilant that tests pass
* Use an interactive rebase `rebase -i` or interactive mode `git add -i` when I mess up the order of my commits or litter my working directory with different features

## What about the real world?

I don't always get it right, sometimes things get messy and I end up with more than I can chew because I didn't follow my guidelines. I aim to stick to them as best as I possibly can.

## What is my end goal?

I want to pragmatically craft relevant changes for a better history, cognitive load and an easier means to rollback changes.
The Tao of Programming Tranlations
Tags: help
Published: 2019-01-29 05:50:40

---
title: The Tao of Programming Tranlations
published: true
description: asking for help to have more translations of content.
tags: help
---

Here I added English and Turkish versions in this [Github Repository](https://github.com/kiliczsh/the-tao-of-programming). I wonder is there anyone else know some other languages and can help with translation or find and edit some translations.
What do you do when you get nervous? I dance to music
Tags: discuss, career, motivation, speaking
Published: 2019-01-29 05:46:15

---
title: What do you do when you get nervous? I dance to music
published: true
description: When I get nervous about speaking in public I dance to music that excites me
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1oz85zuplz25nf5bglnm.jpg
tags: discuss,career,motivation,speaking
---

>Photo by [Frederik Trovatten.com](https://unsplash.com/photos/vk7p_G3ustg?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/)


Have you recently had to speak in front of a group of people? Have you had a job interview or done something else you were really nervous for? How did you handle it?
In the past when I would get nervous about something I would try to pump myself up and tell myself how awesome I am and how amazing I am going to be at the thing I was about to do. Taking drama class all four years of high school I did this a lot as I got nervous each time we performed in front of a big group. It got easier over time, but I still got nervous and used this method. It reminds me of [Jack's speech ](https://www.youtube.com/watch?time_continue=1&v=6fOSgzpEEQU)to pump himself up for all of the 30 Rock fans out there.
Speaking in front of people about technical topics is something I am challenging myself to do more this year. It is really fun, but it is also really easy to spiral down the rabbit hole of imposter syndrome and worry about how I don't know what I'm talking about and everyone will see that and laugh at me.
To combat this now instead of building my confidence up with compliments I just dance to music that's exciting and fun. I take the moment to just be care free and have fun for a few minutes to forget what I am nervous about. It is a nice mental reset and has worked much better for me. My go to song for this is "I Wanna Dance with Somebody" by Whitney Houston.
Maybe this could work for you? At the very least, it is a very good song.
What are things that work for you to help with being nervous?
{% youtube eH3giaIzONA %}
Introduction To Realm Mobile Database In React Native
Tags: react, reactnative, es6, javascript
Published: 2019-01-29 05:28:01

---
title: Introduction To Realm Mobile Database In React Native
published: true
description: Introduction To Realm Mobile Database In React Native
tags: #react #reactnative #es6 #javascript
---

----
Source : <a href="https://www.skptricks.com/2019/01/introduction-to-realm-mobile-database-in-react-native.html" > Introduction To Realm Mobile Database In React Native</a>
----


Nowadays we have a lot of options when deciding to choose a database solution. We have different attractive options each of which has it's strengths and weaknesses. One I have found to be outstanding is Realm database. Realm database can be used by Android, IOS, React and even Xamarin developers.

When Realm was launched in 2014, the goal was to help mobile developers build better apps faster by giving them a robust alternative to SQLite and Core Data. The Realm Mobile Database is a cross-platform database solution that can be used as an alternative to SQLite and Core Data. Compared to these two options, Realm is easier to set up and use. To perform the same operation in Realm, you usually end up writing fewer lines of code than you would with SQLite or Core Data. On performance, Realm is said to be faster and it also offers other modern features such as encryption, JSON support and data change notifications.

<a href="https://www.skptricks.com/2019/01/introduction-to-realm-mobile-database-in-react-native.html" > Introduction To Realm Mobile Database In React Native</>
<img src="https://3.bp.blogspot.com/-23rc2IT6t48/XE7_ED141cI/AAAAAAAACXQ/gyIy21ppm9EY2LlNc3fBY0i3l5LGFYn1gCLcBGAs/s640/realm.png" />
Spy PHP process with gdb + php5-dbg
Tags: php, gdb, php5dbg
Published: 2019-01-29 04:15:54

---
title: Spy PHP process with gdb + php5-dbg
published: true
description: Spy PHP process with gdb and php5-dbg
tags: php, gdb, php5-dbg
---

In my previous [post](https://dev.to/shaikhul/how-to-spy-a-process--3p2n) I briefly mentioned debugging a php process with gdb. In this post I am going to describe the steps and required tools to successfully get insights/stacktrace from a running PHP process.

First thing first, make sure you have install [php5-dbg](https://packages.debian.org/sid/php5-dbg) package. In this example I am using an Ubuntu box.

```
$ dpkg-query -l | grep php5-dbg
```

If not found install it first

```
$ sudo apt-get install php5-dbg
```

We also need a `.gdbinit` file. Get it from [here](https://github.com/php/php-src/blob/PHP-5.3/.gdbinit) according to php version.
 
Now it's time to start gdb with the php process.

```
$ sudo gdb -p PID
```

At the point gdb will pause the program, you need to type `continue` inside the gdb shell.

```
> cont
```

Wait for a while and then press Ctrl+C to get back to gdb shell.

Now source the `.gdbinit`, I put it into my home directory.

```
> source ~/.gdbinit
```

Type `zbacktrace` to see actual backtrace from the underlying php program.

```
> zbacktrace
```

After getting the stacktrace detach the program from gdb and then quit, if you dont detach the program, gdb will kill it when you quit gdb.

```
> detach
> q
```

You can check other commands available in the `.gdbinit` file. 

This helped me today to get actual stacktrace of the php program instead of php interpreter calls that I got with `bt` command.

`gdb` is really an awesome sauce!