teleren/devto huggingface dataset:
How to use GitHub wiki to speed up code reviews
Tags: productivity, tips, webdev, discuss
Published: 2019-09-12 07:49:51

---
title: How to use GitHub wiki to speed up code reviews
published: true
description: How to use GitHub wiki to speed up code reviews
tags: productivity, tips, webdev, discuss
---

When doing code reviews, you might find yourself having to point out inconsistencies in your team's coding style that a linter can't catch. Things like naming variables, file structure, etc. And sometimes having to do this and having to explain why a coding style is preferred over another can affect the time a PR gets merged.

One of the ways you can address is to create a GitHub wiki. If you have a standard for naming arrays as `nameList` instead of `names`, document it there. If your team prefers to import lodash functions like `import _get from 'lodash/get;'` instead of `import get from 'lodash/get';`, add it there. But make sure that you have discussed the pros and cons with your team before you put it there.

The result is a faster code review process because of two reasons. First, you can use that wiki as a guide when doing code reviews. Second, when a new developer comes in and a coding style was not followed, you can just refer to the wiki without having to explain why a coding style is preferred over the other.
State and Variable in React Hooks
Tags: reacthooks, question, javascript, react
Published: 2019-09-12 07:48:01

I am pretty new to react-hooks and I have yet to discover its real super powers. I want to ask if I am breaking anything if I do the sample code below.

```javascript

let somevariable= [];

const SomeComponent = () => {
  const [state, setState] = useState({});
  
  useEffect(()=>{
   fetch('http://insert-api/state')
      .then(response => response.json())
      .then(data => setState({ data }));
  },[])


  useEffect(()=>{
   //update `somevariable` whenever the state changes
   somevariable = state.something
  },[state])


 const clickMe = () => {
   console.log(somevariable)
   //do something to somevariable
 }

  return (
    <button onClick={clickMe}>Click Me </button>
  )
}
```
Instead of putting `somevariable`in the state I put it outside to make it kind of global. I did this because when I put `somevariable` in its own state and set its value in the useEffect it results to endless loop but this one does not, so this is like my workaround. A lot of my functions rely on `somevariable` that's why it's important for me to know if this approach is alright or not. 

PS. I don't know if it's alright to ask this here so please tell me if it's not and I will take it down. Thanks.
How MSG91 helped our startup to become favorite of our users?
Tags: msg, sms, message
Published: 2019-09-12 07:20:34

SMS, though simple as it sounds, but undoubtedly the most important aspect in any eCommerce product life-cycle. Messaging is everywhere, right from customer signup, order notifications to marketing campaigns, advertising and what not. Remember those early days how startups struggled to integrate with network providers, investing their productive time, efforts and money. Network delays, hefty charges, no service guarantee and various other issues kept startups on their toes.


When I started to drive my startup (https://doctorsvivah.com), my aim was to give the consumer (which mainly targets B2C) update through SMS, but with very less money on pocket and being on the experiment ride I want a reliable messaging partner which can help me out in this troublesome situation and help to ship my business. At this point MSG91 solved my problem and gave me bulk of 25000 free messages and help me to turn out my fortune. Being on the first phase and giving that bulk of free messages has proved a boon and I know it will go a long way in my business.

Things that I like the most about MSG91 are:

 1) MSG91 provides restful endpoints and it hardly took us an hour to integrate and test each of their services. 

2) It offered best rates in the market. Moreover it offered free credits to selected companies which is a great value addition for early stage startups. 

3) Fast and reliable delivery network ensures that the messages are always delivered. They work with some of the leading network providers and have appropriate backup and retry mechanisms in place.

 4) Support is top class. I requested for one of the feature additions required for my product, and to my surprise the feature was made available within few weeks.

...Just to name a few.

 I deeply thank MSG91 team in helping us out when you need a lot of support and I wish them best of luck that they grow multiple folds and win lots of hearts .
Best Mobile App Development Frameworks
Tags: ios, android
Published: 2019-09-12 07:09:03

Numerous frameworks have thronged the mobile applications industry alongside a plethora of development strategies.

**Ionic**

Iconic is a robust framework that most mobile app developers have used from time to time. The fact that it comes for free is an added advantage.

**Flutter**

Google had introduced Flutter, which is an open-source development platform for quality mobile apps. Composed in Dart Language, Flutter is another cross-platform for developing mobile apps.

**Adobe PhoneGap**

The PhoneGap enables you to view every minute change or alterations caused to your app development process.

**Xamarin**

Xamarin is a mobile app development framework that operates from San Francisco and is a Microsoft creation.

**React Native**

Facebook has come up with React Native, which is one of the most sought after cross-platform frameworks for developers.

**Corona SDK**

Many app development frameworks have flooded the market. Out of so many frameworks, Corona SDK seems to be much faster.

**Native Scripts**

Progress developed the Native Scripts framework and supported by a Bulgarian software provider called Telerik.

**Mobile Angular UI**

The Mobile Angular UI contributes primarily towards Angular and Bootstrap framework.

Source: [Mobile App Development Frameworks] (https://www.mindtechconsultancy.com/mobile-app-development-frameworks/)
HOW TO RESOLVE YAHOO MAIL ERROR 1032
Published: 2019-09-12 06:41:13

Yahoo is considered to be one of the most prominent and leading email service providers in the market, which is known for its speed and convenience. It consists of some amazing features such as vast storage space, robust security, high speed, fast synchronization, easy UI, and many more. But even after being so known and popular, it still has some technical glitches; Yahoo mail error 1032 is one of them which is often faced by users and can be very annoying at times. This error is basically caused when users are sending or receiving messages. You can get in touch with <a href ="https://www.support-forerror.com">Yahoo Mail Service Number</a> to seek assistance from the technical experts. But before that, you should go through the causes and the troubleshooting steps provided below to fix this error:
Main reasons for Yahoo mail error 1032 are: 
	The login credentials you are using to access the account might be incorrect. 
	You might be using an outdated version of Yahoo mail because of which this error occurs.
	If your internet connection is weak, this error might occur.
	An outdated operating system can also cause this error
	If your browser contains unwanted caches and cookies could lead to this error
	Your browser and the application may not be compatible. 
	Another reason could be the authentication error in your account.
Steps to fix Yahoo error code 1032 are: 
	Step 1: The first and the main steps is that if your Yahoo mail application is outdated, you will have to update it as soon as possible and then check if the error still persists. 
	Step 2: You should try to set-up your yahoo mail on your device again and see if the issue is resolved.
	Step 3: If you find that there are any authentication issues in your account, you can follow the steps given below to resolve them:
-	You will have to sign-in to your Yahoo account and then go to the ‘menu’ option
-	You need to select ‘account info’ in this step
-	You are required to provide correct login credentials
-	You will see a sign-in option; you need to click on that.
-	Now, you will have to proceed to the security section.
-	Here, you will be required to select ‘Manage apps and website connections.’
-	In this step, you need to remove the existing entries for your system among the list of devices and applications.
-	Now, you have to sign-in to your Yahoo account again. 
If you carefully follow these steps, Yahoo error code 1032 will be resolved very soon. But if you find any difficulty while following these steps, you can contact 
<a href ="https://www.support-forerror.com">Yahoo Mail Service Number</a> to get assistance from the techies who provide you with the best possible solution in no time. 
Source URL: How to resolve yahoo mail error 1032
The Job Search 
Tags: jobsearch
Published: 2019-09-11 17:40:27

As someone who is a little over a month into his job search for his first tech job - I have noticed that there are multiple moving parts, and perhaps should be treated more like guidelines, to put yourself in a good position to find a job: networking, a portfolio, and a solid online presence.  The others which are universally true are having a solid resume. All these pieces are variables to an equation that should result in getting a job, so we're told. 

 I have seen early success where I got an in-person interview but ended up not getting the job - pretty deflating.  As I am back to putting in resumes and getting no response after no response, it's hard to evaluate what's worked and what hasn't. What did that first company find attractive that other companies do not? What am I lacking (besides 10 years of experience) that I can't be getting consistent responses from entry-level roles and furthermore, why is it so hard find clear cut entry-level roles when I'm finding more senior-level positions with the exact experience I have spent three months being trained with? It's an endless recursive loop that just does not end. 

My job search:

int jobsearch(experience) {
       if(experience <= 1) 
             return (experience - 1)
}
 
I do however believe that in addition to the job search being a numbers game, the two other ideas I keep in mind are: it'll happen if I'm good enough, and if companies have an opening they are looking to fill a need. So for me, it's a matter of getting past that unwelcoming, but all too common rejection email that immediately stops any promise of getting a job. Believe me, I am writing this last paragraph with a grain of optimism. I do believe in the law of attraction, so as long as I keep putting my effort into a job search, it will happen. 

Until then it will be a cycle of rejection after rejection, trying to find a home to develop my new skills.
Do you still write console applications?
Tags: csharp, console, dotnet
Published: 2019-09-12 06:07:00


I do. 

Most of the times just as a POC (Proof Of Concept), to test an implementation of an algorithm, to automate some in-house operation. Admittedly, I don't recall the last time I've written a console application for a customer, though.

My point is, I find console applications to be a very helpful tool when you need to get something done fast.

**tl;dr;** there's a link at the bottom of the post...

However, I find the Console itself very limiting. For instance, if I want to write a line to the screen, and highlight a word or two inside, I have to write a at least 5 lines of code just for that:
```csharp
Console.Write("First part of the line ");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("Highlighted in yellow ");
Console.ResetColor();
Console.WriteLine("The rest of the line.");
```

And if the current console colors are not it's default, I'll have to add more code to store the original color, and that's just for one single highlight, with only one color! If I wanted to change the background color as well, I would have to add at least one more code line, and what if I wanted to highlight two different sections of the text? 

Wouldn't it be great if you could use a simple markup for that? 

**Well, Now you can!**

After writing too many console apps I've collected a few methods and written some new one, and came up with a GitHub project I've called Extended Console. 
It enables you to use a simple markup consisting a single tag - `c` with two optional attributes: `f` for foreground and `b` for background. The values of these attributes need to be a name of a member of the `Console.Color` enum, but that name is case insensitive (the tag and attributes are not!).
So instead of the massive code in the above examples, you can simply write this:

```csharp
var exConsole = new ExConsole();
exConsole.WriteLine("This <c f='yellow'>is yellow</c> and this <c f='cyan' b='darkred'>and this is cyan with a Dark red background.</c> more text.");
```

And this is what it looks like:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3egu7ej0gmj02guwv272.png)

It also contains methods for reading and parsing user input, two overloaded methods for menus, and what I think is the best part - it's super easy to extend - simply add your own extension methods.

To conclude, if like me, you still write console applications, and you want to easily add some colors, menus, or user input capabilities to them, this project is for you!

It's MIT licence so it's completely free and open source.

[Check it out on GitHub.](https://github.com/Peled-Zohar/ExtendedConsole)

[Read more about it on my blog](https://zoharpeled.wordpress.com/2019/09/07/easy-way-to-customize-your-console-apps/)

This project is available on Nuget.Org as [ExtendedConsole](https://www.nuget.org/packages/ExtendedConsole).
Fix bug ot-flatsome-vertical-menu plugin Wordpress
Published: 2019-09-12 05:19:12

Fix ot-flatsome-vertical-menu plugin for Wordpress

Fixed bug when using the Sticky Header function of the Flatsome theme.

Instructions for fixing errors:

- Copy 2 File ot-vertical-menu.js and ot-vertical-menu.min.js
- Replace 2 old files at path: plugins\ot-flatsome-vertical-menu\assets\js

{% github laptoptitan/fix-ot-flatsome-vertical-menu %}
How to create your command-line program (CLI) with NodeJS and Commander.js
Tags: javascript, node
Published: 2019-09-12 05:02:31

---
title: How to create your command-line program (CLI) with NodeJS and Commander.js
published: true
description: 
tags: javascript, nodejs
---

![image](https://cdn-images-1.medium.com/max/1600/1*iuVFluyU2hg8UQXloU6BIQ.jpeg)


This post will show you how to create a command-line npm module (CLI) using Commander.js module.

Commander.js is a very popular module that lets you create your own CLI program.

First, start your new project - let's say my project name is "json-now"

```
$ git clone https://github.com/yourname/json-now.git
$ cd json-now
```

Now, create your package.json file:

```
{
  "name": "json-now",
  "version": "0.0.1",
  "bin": {
    "json-now": "./bin/index.js"
  },
  "dependencies": {
    "commander": "^3.0.1"
  }
}
```

Then, install dependencies:

```
$ npm install
```

The "bin" section specifies your command line name. As you see, go ahead and create a "bin" directory with "index.js" file there:

```
#!/usr/bin/env node

const program = require('commander');
const ver = require('../lib/ver');
program
  .usage('[options] <file>')
  .option('-v, --version', 'show version', ver, '')
  .option('-p, --port <port>', 'use custom port')
  .option('-f, --flag', 'boolean flag', false)
  .action((file, options) => {
    console.log('file name: ', file);
    // more hanlder: require('../lib/moreHandler')(options);
  })
  .parse(process.argv);
```

Let's create the very first option called "-v" or " - version" which shows version number. Create a directory named "lib" and a new file "ver.js" there:

```
const package = require('../package.json')
module.exports = () => {
    console.log(package.version);
};
```

So far, it looks straight forward. You created a commander "program" which handles option like "-v" by running "ver.js"

Open Terminal and try it out:

```
$ node bin/index.js -v
0.0.1
$ node bin/index.js sample.json
file name: sample.json
```

Now, it's time to publish your command line for the world to use!

```
$ npm login
$ npm publish

Try out your shiny new command:
$ npm install json-now -g
$ json-now -v
```

The above code is located here for your reference:

https://github.com/ngduc/api-now
JS FizzBuzz Level Test - Resources
Tags: discuss, career, javascript
Published: 2019-09-12 04:44:26

### Hey Devs,

Tomorrow (Friday) is my **JavaScript** Programming Test (FizzBuzz level) for Junior Software Dev position (remote). They will use an online programming **tool** for the Test and I will code in realtime.

Please help me in finding some cool **JS** resources for interviews/tests.

Also, what is your experience with this type of tests?

### Let me know in comments :)

*(BTW, I have 1.5 years of hands-on experience coding websites using modern JavaScript, ReactJS and Android/iOS applications using React-Native)*
[Update] getd.io 🚀 - A free, online REST API builder
Tags: showdev, productivity, javascript, react
Published: 2019-09-12 03:52:41

*[getd.io](https://getd.io) is a free, online API builder that I created as Postman without the native apps. Give it a try and let me know what you think. You can also read more [in this post](https://dev.to/getd/getd-io-an-online-api-request-tester-builder-with-cors-support-3d3m).*

Since I launched [getd.io 🚀](https://getd.io) two weeks ago, many changes have made into this product:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/vsq8q9l23ef78jhz347d.gif)

# New Features

- Support for a mobile responsive UI. See the difference [here](https://dev.to/getd/i-added-mobile-responsiveness-to-getd-io-in-just-one-hour-here-is-how-62b).

- Support for new request body formats such as `x-www-form-urlencoded` and `form-data`. Read [my post](https://dev.to/getd/x-www-form-urlencoded-or-form-data-explained-in-2-mins-5hk6) if you are unsure what they are.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/k98khm345ezjc5lxlrpg.png)

- Support for OAuth2 Bearer token in request headers

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ryzr6taumcrru06omjeu.png)

- The request history uses fuzzy search now.

# Usability Improvements

- Both the request and response body editor will now automatically switch to the right format (e.g., JSON, raw text, HTML) by detecting the `content-type` header.

It seems many users who land on the site didn't know what to do. To improve that:
- A new landing page was added to show a quick product demo.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/bxbnb0sltmncu451zwot.png)

- A list of sample requests are shown to new users to help them get started.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5a8s805gjb94wuysez0j.png)

# What's Next

- I'm planning on open-sourcing this project. Please leave a comment on [this post](https://dev.to/getd/looking-for-best-practice-for-open-sourcing-getd-io-s-back-end-4mhc) if you'd like to see this project open sourced, or have suggestions.
- I'm building an API explorer as a playground for public APIs. E.g., you can instantly get a token to call Spotify APIs and make it play some music, while at the same time learning how the API works.
- I'm planning to build a feature to allow users to create/save workspaces.

Please feel free to leave a comment as I ❤️ feedbacks!
[PT-BR] Saindo da zona de conforto
Tags: ptbr, wordpress, react, diary
Published: 2019-09-12 00:57:44

O dia de ontem foi intenso. Entrei no meu recém-hospedado blog em Gatsby na Netlify para entender o que havia por ali. Eu sempre fiz sites em Google sites, Wordpress (.com e self-hosted) e blogger. Sei mexer também no Wix.
Mas o que eu queria era me jogar no meio das cobras, digo, sair da zona de conforto, instalei o Gatsby com medo, usando a pré-instalação presente na Netlify e fiquei confusa e nervosa com o engessamento encontrado por ali. Tá, os arquivos de tema não estão no admin do site e sim na gitHub, mas e o medo de mexer e fazer caca?
Prevejo eu reinstalando tudo do zero, sem script de pré instalação, para tentar entender alguma coisa.
Falando em sair da zona de conforto, no dia de hoje eu dei uma passeada por vários blogs e artigos para ler sobre React.js, Angular.js e acabei esbarrando no Redux. Vai ser minha diversão de hoje.
Did you have a mentor? Is a mentor important when developing software?
Tags: productivity, career
Published: 2019-09-12 00:37:12

Did you have a mentor when first starting your software career? I had a mentor, I remember almost everything he taught me. I think he played a important role in my career, gave me a great foundation that I was able to expand upon and grow. Now I am a mentor. I have taken under my wing 2 bright new developers and I have been trying to be a sturdy support beam for them. I am a little nervous as I want to be sure I am giving them the same opportunities as what was bestowed upon me. Do you think having a good mentor is important? Did your mentor have any kind of impact upon your career?
What Remote Job Boards Do You Use?
Tags: discuss, career
Published: 2019-09-12 00:10:28

# Remote Job Boards

I'm currently looking for some employment opportunities and for personal reasons need it to be a remote job. What job boards does everyone use when specifically looking for remote jobs?

I've encountered a few that I check sometimes:

* <https://justremote.co>
* <https://weworkremotely.com>
* <https://golangprojects.com> (This one isn't remote specific but there are remote postings on there)
Use the correct version of Node when starting VS Code terminal session using Fish
Tags: fish, vscode, productivity
Published: 2019-09-11 23:41:18

I like using Fish for interactivity at the terminal

https://fishshell.com

I also like using VS Code. 

There are times I am working in a project that requires a specific version of Node. The problem I was having was that each and every time I opened up a new terminal in VS Code, I would have to remember to switch to the correct node version. Sure I could have an `.nvmrc` file, but then I would have to remember to issue `nvm use`. I could have my login script automatically issue that command; however, `.nvmrc` might be located in the parent directory.

Here is what I wanted:
  - Upon login check to see if there is a `.nvmrc` in the parent directory
  - If so, load the settings there
  - If not, do nothing

I discovered most of what I was after in this post by btoueg on GitHub

https://github.com/nvm-sh/nvm/issues/110#issuecomment-442955314

From that post I derived what I was looking for. First we need a `find-up` by btoueg and another function that will issue the nvm use command per `.nvmrc` found in our path.

```bash
function find-up --description 'Find file recursively in parent directory'

    set path (pwd)

    while test "$path" != "/" ; and not test -f "$path/$argv[1]"
        set path (dirname $path)
    end

    if test -f "$path/$argv[1]"
        echo "$path/$argv[1]"
    else
        echo ""
    end

end


function nvm-use --description 'run nvm using .nvmrc in parent directory'

  set loaded_version (node --version)
  set nvmrc (find-up '.nvmrc')

  if test -f $nvmrc
    set nvmrc_version (cat $nvmrc)
    if test $loaded_version != $nvmrc_version
      nvm use --silent
    end
  end

end
```

Then simply invoke it

```bash
nvm-use
```

I have that setup in my fish config file `~/.config/fish/config.fish`. Now every time I open a new terminal in VS Code, it automatically switches to the correct version of node by looking for (and finding) `.nvmrc` in a parent directory.