teleren/devto huggingface dataset:
Web Designing in Chennai
Tags: webdesign, webdesigncompany
Published: 2018-12-20 09:04:06

---
title: Web Designing in Chennai
published: true
description: 
tags: web design, web design company
---


Until a couple of years ago, businesses in Company didn’t have many options in their city when it came to choosing a web design company. There were a few agencies but they were mediocre agencies who couldn’t meet the rising demand for unique and custom web solutions. 
So businesses had to depend on agencies in other cities like Bangalore. However, lots of new web design companies have started operation in Chennai recently. There is a good demand for web design services and the competition is very tight. So, the agencies hired the best professionals to provide the best solutions for their clients. 
If you are a business owner in Chennai looking for a web design company, you should never choose a company because of their prices. Remember, you get what you pay for. 
A not well-built website won’t give any good to your business. It can’t improve the branding or bring new customers. So, you should choose the [best web design company in Chennai](https://spidergems.com) for your requirement. 
A good website can help your business to get more visibility in the internet compared to your competitors. It helps you to get the attention of potential customers who are searching for businesses on online.
How do I convince people about the importance of Privacy? 
Tags: discuss, privacy
Published: 2018-12-20 08:17:48

---
title: How do I convince people about the importance of Privacy? 
published: true
description: 
tags: discuss, privacy
---

With all these controversies around Facebook reading people messages and Google with all the tracking they do, how can I convince people that their privacy matters? My friends think that it's okay for these companies to use people data because we use their services. 

I deleted Facebook, I don't use Instagram often, I delete myactivity from google but I end up looking like a weirdo. Why do people value privacy so low?
Advent of code Day 1 - Javascript while loop abuse
Tags: adventofcode, spoiler, javascript
Published: 2018-12-20 08:15:26

Yesterday I found a little time, to start the annual AOC. 

Yes, I know, I am late to the party. But hey: Better late than never. 

So, the first part was an easy warm up, just `sum` an array. Part 2 was a bit trickier. I came up with this - admittedly - somewhat "not clean" solution.

OTOH, I find it nonetheless _readable_ in one way or the other.  

```javascript
const findDoubleFrequency = array => {
  const doubles = new Set();
  doubles.add(0);
  let acc = 0;
  while (
    !array.find(x => {
      acc += x;
      if (doubles.has(acc)) {
        return true;
      }
      doubles.add(acc);
      return false;
    })
  ) {}
  return acc;
};
```
Firefox Add-on to Turn On Dev.to's Night Mode 🔥🔥
Tags: firefox, meta, opensource, showdev
Published: 2018-12-20 07:59:01

---
title: Firefox Add-on to Turn On Dev.to's Night Mode 🔥🔥 
published: true
description: Firefox Addon to Turn On Dev.to's Night Mode 🔥🔥 
tags: firefox, meta, opensource, showdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/mjfb6bm93l4czpv5db7k.png
---

Today, I was tinkering with Element Inspector on Dev.to, On the top, I found some Style element.

```html
<style>
      body.night-theme #top-bar,body.night-theme #page-content,body.night-theme
      footer{background-color:#ececcc !important}
      ...
      border-radius:3px;border:0px;padding:8px;font-size:0.9em; 
      background:#e8e7e7;-webkit-appearance:none}
</style>
```
Then I also recalled about an article on Dev.to , 
{%link https://dev.to/somedood/previewing-devtos-upcoming-night-mode-44j %}

**I decided, It's Time, to build an add-on for Firefox.** , because for quite some time I wanted to build an add-on for Firefox but couldn't find any good idea for it!

Surprisingly it wasn't that difficult! Just need to code only a few lines, within minutes the add-on was up and running. 

I logged in to **Firefox's Add-on Developer Hub** , Uploaded the zipped add-on files, within minutes after uploading, my add-on was approved and visible to the public! ❤️

It was my **first** Firefox addon and quite fun experience! 😀

Have Fun! Feel Free to Try **DEVNight** : <https://addons.mozilla.org/en-US/firefox/addon/devnight>

Source Code is also available at GitHub : [bauripalash/devnight](https://github.com/bauripalash/devnight)

---
If You Like My Work (My Articles, Stories, Softwares, Researches and many more) Consider [Buying Me A Coffee ☕](https://www.buymeacoffee.com/palash) 🤗
Move a Flag When You Receive a Comment on Twitter!
Tags: iot
Published: 2018-12-20 07:18:16


---
title: Move a Flag When You Receive a Comment on Twitter!
published: true
description: 
tags: iot
---

![](https://storage.obniz.io/images/c1acdd9dbd8596861526174882816)

## How it works
It shake a flag when someone tweet with hashtag “#obniz”.

## Materials
- obniz – 1
- servomotor – 1
- flag – 1
- battery or usb adaptor & cable – 1


## Program

https://obniz.io/explore/1
Lavatory Signal
Tags: iot
Published: 2018-12-20 06:58:37

---
title: Lavatory Signal
published: true
description: 
tags: IoT
---

![](https://storage.obniz.io/images/f50e76389877bfc01526175584554)

## How it works
Sometime It is very convinience that one toilet is occupied or not.
There is a human detect sensor like EKMC1601111.
We create html that showing lavatory signal (like in airplane ) by collaborating with this sensor.

## Materials
- obniz – 1
- EKMC1601111 – 1
- battery or usb adaptor & cable – 1
- Step 1
- connect EKMC1601111 to an obniz.

## Now we connect like
io0: GND,
io1: Signal,
io2: VDD

![](https://storage.obniz.io/images/9b86ea23036127391526175597061)

## Step 2
put this on toilet.

![](https://storage.obniz.io/images/afa1590a78b94c341526175609644)

https://youtu.be/W78GLS1e1Rs

## Program

https://obniz.io/explore/3
Self Driving Robot
Tags: iotrobot
Published: 2018-12-20 06:54:15

---
title: Self Driving Robot
published: true
description: 
tags: iot robot
---

# Self Driving Robot

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/0rPX6Ha2Ukk/0.jpg)](https://youtu.be/0rPX6Ha2Ukk)

## Material
- obniz and Battery
- Radio control car ( around 5v )


## How to make
Connect rear and front motors to an obniz.
And put it on the car with a battery.

![](https://storage.obniz.io/images/ee647bca0b9af6381535164003215)

## Program
It process image taken by smartphone's cam.
The program is using OpenCV.js

##Program

https://obniz.io/explore/43
Human detect and time record lamp
Tags: iot
Published: 2018-12-20 06:45:28

---
title: Human detect and time record lamp
published: true
description: Home IoT Kit Example



tags: iot
---

![](https://thepracticaldev.s3.amazonaws.com/i/f78alokugfu299wyuc5m.gif)

# Human detect and time record lamp
## What's this
Home IoT Kit Example

This makes your room lamp smarter.
It turn on automatically when it detect human. And It also record the time at a file on Dropbox.

# Materials
- obniz
- Power supply for obniz
- PIR sensor (of IoT Home Kit)
- Servo Motor (of IoT Home Kit)
- Steps
- First, Attach a servo motor to a switch on the wall.


![](https://storage.obniz.io/images/9b41b763fcf4d4af1530785186303)

The way you attach depends on your switch.

And connect a PIR sensor and a servo motor to an obniz. Then connect to a power.


![](https://storage.obniz.io/images/3dbcef89c385b1ad1530785176591)


Write and Run a program.
This example program has a manual method.
Turn a switch to the left, Your servo will move.
Tune the value on the example program to work correctly.

And Please specify dropbox API key. You can see how to on Lessons.

Let's test.

Your servo will move when you close to a sensor.
And you will see a file which contain the time on your dropbox.


![](https://storage.obniz.io/images/2c0128888e59baeb1530785914792)


This time I use HTML But nodejs will work more sufficiently. It works persistently.

Also you might want to turn off automatically or record more information to a file. It seems fun

## Program

https://obniz.io/explore/33
New redux-lightweight library to help reduce redux boilerplate 
Tags: react, redux, actions, reducer
Published: 2018-12-20 06:13:11

---
title: New redux-lightweight library to help reduce redux boilerplate 
published: true
description: Work with redux easily
tags: react, redux, actions, reducer
---

It is always our job to write actions, action types and reducers to work with redux. However they serve for one thing and they should not be spread. redux-lightweight library allows you to write your reducers, actions and action types in one class.

```js
class Counter {
    state = {
        number: 0;
    }
    increment(amount) {
        return this.state.number + amount;
    }
}

```
As you see all redux stuff is inside one class.

Hope, it will help you with working redux easier.

 {% github doniyor2109/redux-lightweight %}
Workspaces and Rollup
Tags: node, programming, yarn, monorepo
Published: 2018-12-20 05:33:19

---
title: Workspaces and Rollup
published: true
description: how to resolve modules in workspaces
tags: node, programming, yarn, monorepo
---
How to resolve modules located in workspaces by rollup.

situation is:
`workspace-a` and `workspace-b` that contain modules are set in `"workspaces"`.
```js
// package.json
"private": true,
"workspaces": [
  "workspace-a/*", // workspace-a/[module]/package.json
  "workspace-b/*"
],
```
To resolve the modules, pass the directories to `rollup-plugin-node-resolve` via `customResolveOptions.moduleDirectory`.
```js
// rollup.config.js
import Resolve from 'rollup-plugin-node-resolve'

const resolve = Resolve({
  customResolveOptions: {
    moduleDirectory: [ // as array
      'workspace-a',
      'workspace-b',
    ]
  }
})
```
And it is necessary that [module]'s dirname equals to its `"name"` in package.json.

***
There may be the way more smart, this is just a solution.😗

- [rollup](https://rollupjs.org/guide/en)
- [rollup-plugin-node-resolve](https://github.com/rollup/rollup-plugin-node-resolve)
- [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/)
Asking a Friend to Do Their Technical Test
Tags: discuss
Published: 2018-12-20 05:30:59


---
title: Asking a Friend to Do Their Technical Test
published: true
description: 
tags: Discuss
cover_image: https://thepracticaldev.s3.amazonaws.com/i/4n288ltuupkzptsqys8p.jpg
---

What are you guys thinking about that? I've been asked quite a lot by my friend to do his technical test. On the first time, I feel nothing cause I though that I only trying to help him. But this lately, it make me feel sick like sometimes he will text me "Hey, can you do the questions number 2, 4, 5, 6, 7-9". 

I don't know how to approach this situation
AoC Day 20: A Regular Map
Tags: adventofcode, discuss
Published: 2018-12-20 05:23:09

---
title: "AoC Day 20: A Regular Map"
published: true
description: "Day 20: We're enumerating the possibilities of regular expressions to build maps of rooms."
cover_image: https://thepracticaldev.s3.amazonaws.com/i/196q5rrvf4zt1xp83qo8.png
tags: adventofcode, discuss
series: Advent of Code 
---

[Day 20!](https://adventofcode.com/2018/day/20)  Only 5 more days after this one!  At this point, I've fallen severely behind, but I haven't given up yet.  I'm determined to finish by Christmas.

In this challenge, we are enumerating the possible directions we could take while exploring the North Pole, as laid out by a Regular Expression.  And this is only the first part!  Once we finally have our map built, we have to find the very furthest room from us in the facility.

Hopefully, after completing this challenge, *your* expression will be one of Christmas joy!
List of best third party services? (stripe, stream.io, chargebee, etc)
Tags: discuss
Published: 2018-12-20 04:29:33

---
title: List of best third party services? (stripe, stream.io, chargebee, etc)
published: true
description: 
tags: discuss
---
I've been looking for a bit now for a list of the best services out there. I'm not talking about the best tools for dev management or best tools like IDEs, plugins, etc.

I'm looking for a list of the most awesome services one might need while building an app such as:

- chargebee
- auth0
- stripe/ braintree
- cloudinary

And so on. Does anyone know a great resource for this?
My old git processes
Tags: git
Published: 2018-12-20 03:29:44

---
title: My old git processes
published: true
description: How to rebase like a champ. 
tags: git
---

I've transitioned to using rebase interactive but I think what I use to do may help others become more comfortable with moving changes around. The goal of these are to organize commits because they are on a branch with other changes or I want to combine commits. 

First off, I make sure I have gitk open. This tool is nice because using F5 to refresh maintains the previous known tree state.

Create a new branch at the commit you want to place your commits. Now cherry pick (right click the commit in gitk) the desired change. 

If you want to combine commit with the last one then use

    git reset --soft HEAD~2
    git commit -m...

I am able to cherry pick my commits in any order and I can make the commit history smaller by combining related commits. 

Now that you have gone through this, read through git rebase interactive.

{% link https://dev.to/koffeinfrei/the-git-fixup-workflow-386d?utm_source=additional_box&utm_medium=internal&utm_campaign=regular&booster_org= %}
What note taking app (for code notes) are you using?
Tags: discuss, productivity, help, career
Published: 2018-12-20 02:55:34

---
title: What note taking app (for code notes) are you using?
published: true
description: 
tags: #discuss, #productivity, #help, #career
---

I have been using OneNote for a few years now and I am over the clunkiness. What is everyone using these days? <br>Having access via browser and OS X app is what I am looking for
How Array.map works in JavaScript with and example in React
Published: 2018-12-20 02:49:04

---
title: How Array.map works in JavaScript with and example in React
published: true
description: An intoduction to me and a link to an explanation of Array.map
tags: 
---

I'm new to Dev.to but I wanted to get something up here.  I'm currently a stay-at-home-dad but I am wokring on making a return to tech full-time.  A sizeable gap in my employment in the tech industry has made it difficult to show relevant work experience, so I decided to start my blog to share what I'm re-learning.  I'm still a bit hit or miss on whether or not I really keep it updated but I do have a few recent videos I've put on youtube.  I recently made a video explaining how Array.map works so I thought I would share it here. 

[How Array.map works in JavaScript](http://alexnielsen.com/uncategorized/array-map-how-the-map-method-works-in-javascript/)
I made a mistake implementing a React Hook and got a denial of service from my backend
Tags: javascript, firebase, react
Published: 2018-12-20 01:53:55

---
title: I made a mistake implementing a React Hook and got a denial of service from my backend
published: true
description: 
tags: javascript, firebase, react
cover_image: https://thepracticaldev.s3.amazonaws.com/i/uumegqncmr1hlvlbr26m.jpeg
---

This seemingly simple usage of React's useEffect hook on a Firebase endpoint accidentally ran through my 50k reads/day quota in minutes.

```jsx
function Page() {
  const [meetings, setMeetings] = useState([]);
  useEffect(() => {
    return firebase.firestore().collection('/meetings').onSnapshot(query => {
      setMeeting( query.docs.map(m => m.data()) );
    });
  });

  return (
    <ul>
      {meetings.map(m => <li>{m.title}</li>}
    </ul>
  )
}
```

The effect isn't dependent on any state changing so I omitted the second parameter. What I failed to realize was that everytime `setMeeting` was called the body of the function would be executed again, causing a loop in the data fetching.

So yeah. Firebase's free tier offers a 50k reads/day quota that I exceeded in a few minutes of development work. It was a pain to trace down too. Once I realized that the Net tab in Chrome devtools was pounding out requests to firebase I had to hurry over to the perf tab and move into "offline mode". Then I had the time to take a look at the payload of one of the requests and figure out what data was being requested.

The fix is simply to add an empty square brace to indicate that this should only be run once, kind of like only componentDidMount and componentWillUnmount (the return from the firebase call is a listener we want to unmount).
```jsx
useEffect(() => {
  // return firebase...
}, []) // this guy
```

After I fixed it though I paused and thought about the underlying problems.

1. It is really easy to overlook the second parameter in an effect hook.

2. There is no server side rate-limiting implementation for firebase / firestore. So any malicious user, or a bug in the code, can take down a free tier or charge a ton of money to a paying user. There wasn't even a great way to visualize what endpoint was being hammered, or when, by the quota management tool in Google's console.

3. When your usage quota is exceeded in Firebase you can't even access your admin panel.

4. Error handling doesn't catch this kind of thing.

Happy Hacking,

---
References
- Photo by Andrew Gaines on Unsplash
- Firebase is a Backend as a Service providing a generous free-tier for a realtime data storage solution
Are you left with any proprietary advantage when building a Javascript app?
Tags: discuss, firebase
Published: 2018-12-20 00:00:02

---
title: Are you left with any proprietary advantage when building a Javascript app?
published: true
tags: discuss, javascript, firebase
---

I'm using firebase to build a client side app that I intended to monetize. It occurred to me though that if source maps are accessible then I'm essentially publishing the entire source minus config, build, db rules, and a handful of cloud functions. 


Has anyone thought much about this?
Adding a way for your users to pay you is a really great way to stay motivated!
Tags: showdev, discuss, webdev, productivity
Published: 2018-12-19 22:15:31

---
title: Adding a way for your users to pay you is a really great way to stay motivated! 
published: true
description: what I learned from adding a "donate" page to my side project. 
tags: showdev, discuss, webdev, productivity
cover_image: https://thepracticaldev.s3.amazonaws.com/i/j3weym5wo66db3yx0utx.jpeg---


One of my side projects [(mydevportfol.io)](https://mydevportfol.io?ref=devto) is a web app that lets users developers/programmers build a portfolio based off of their github profile. 

From the outset this is something that I wanted to see if I could make some money off, but I wasn't sure if it could even get to that stage. 

After playing around with some different pricing models, I eventually decided to just let people pay what they want. This was part of a decision to "sunset" the app so I could focus on other projects. 

A few weeks later, I was shocked to see that someone had donated €49 for a portfolio. 

I was genuinely stunned. 

It was a massive boost and snapped me back to development, fixing bugs and usability issues and planning more features. 

In the past few weeks I've had a few donations (see screenshot), nothing spectacular but it's such a huge boost to check out the stripe dashboard in the mornings and see that (sometimes) my morning coffee is paid for! 

I'd encourage anyone to add a donation button or some other method for accepting money. If you've built something that even a few people in the world really like, they WANT to give you money. They appreciate the effort that you went to. 

And of course, you can always pay that forward in future when you find something that someone has built and you get the satisfaction of making a dev smile cos you bought them a coffee. 

Ps: that large donation was from someone on my email list. If you aren't collecting emails, you should start. I don't spam my list, I just give them relevant updates to the products they told me they're interested in. 

:)
Welcome to Wellness Wednesday!
Tags: wellnesswednesday, career
Published: 2018-12-19 22:14:06

---
title: Welcome to Wellness Wednesday!
published: true
description: Take care of yourself this holiday!
tags: wellnesswednesday, career
cover_image: https://thepracticaldev.s3.amazonaws.com/i/77i0su08ph8ls41ubs9z.jpg
---

# Wellness Wednesday
Hey friends! We all spend long hours working at the computer and thinking hard and it can be hard to remember to take care of yourself when there is so much to be done and so little time to do it. With that in mind, I wanted to share a #wellnesswednesday message here once a week!

## Save your eyes with the 20/20/20 rule!
This is a common tip, but one that can be easy to forget! I know I often stare at the screen for way too long! Here's the gist: *Every 20 minutes look at something 20ft away for 20 seconds.* If you're like me and often get too focused to remember when 20 minutes has gone by, here are some tips:
- Set a timer on your computer, watch, or phone to remind you to look away.
- Find something to look at - a plant, something out the window, or someone in the office (okay, that one might be a bit creepy).
- Get a buddy! If you find yourself not following through or dismissing the notifications for _just one more minute_, then consider syncing up with someone at the office. Find someone a bit away, set a notification, and smile/wave/do a little dance, when you both lock eyes.

## I'll be home for Christmas (or some other reason)
No matter what your holiday plans, make a commitment to _be_ there for it.
- If things get stressful, as they often do around this time, take 5 minutes a few times a day to just "be". Just exist for a few minutes - think about how you are feeling, pay attention to your breathing, and take stock of your surroundings.
- Pay attention to what you are eating. Often times around the holidays we eat just because it's what you do. Instead, pay attention to each bite - be thankful for the food, enjoy it, and actually sit down to eat.
- Engage in gratitude. Take some time to be thankful for what you have. Appreciate where you are, how you got there and the people that helped along the way.
- Remember to [Leave Loudly!](https://dev.to/wuz/leave-loudly-this-holiday--33l7)

> *Bonus:* Spend some time doing some good. I'll be delivering toys and food to families around my hometown. It is the most rewarding and fulfilling experience during my holidays. I'd highly recommend finding some way to give back to your community this holiday!

## Weekly Gif

We could all use some new gifs! Here is mine favorite for this week:

![pizza tree cat](https://thepracticaldev.s3.amazonaws.com/i/zt6duln2599vksbxzu2i.gif)

## Have a great week!

Hopefully even if you don't have holiday plans or aren't celebrating anything these tips will still be helpful! We can all use a bit more mindfulness now and then!

Thanks for reading! What holiday survival tips do you have? What is your favorite new gif discovery?
How do you name your git branches?
Tags: git, help, discuss, development
Published: 2018-12-19 21:42:20

I'm currently evaluating an alternative to Jira for managing our software development projects at work. One of the things that I'm having a hard time moving away from is Jira's ability to have keys and auto incrementing ID for each task/issue.

So let's say I've got a DEV.to project setup, I could set a key as DEV and each issue I create will have a prefix of `DEV-`. Currently we will use this key and ID combination to also name our git branches in source. So if the issue is 23, then our branch would be cut as `DEV-23` and then it's easy for us to track from [VCS](https://www.spellitout.xyz/vcs-version-control-system/) to Jira to PRs on BitBucket.

But as I'm evaluating alternatives, I'm realizing this key/id might be unique to Jira or software development management tools.

So my question is, if there is no key or ID and you're working across multiple projects, what sort of naming scheme do you use for your git branches?