teleren/devto huggingface dataset:
Exercise Javascript Control Flow
Published: 2019-10-15 23:06:14

function exampleExercise(value){
  // !!! This is an example exercise, we will show you how to complete the following exercises here. 
  // !!! There is NO need to write any code for this exercise. 
  // !!! This exercise ia ALREADY complete, Use this as reference to complete the others.
  
  let value2 = 'Dan';
  // In this exercise, you will be given a variable, it will be called: value
  // On the next line create a variable called 'notEqualTo'
  // Using the not operator assign it to a boolean represent value not equal to value2
  let notEqualTo = value2 !== value;
  
  // Please write your answer in the line above.
  return notEqualTo;
}

// ------- Please begin your work below this line: -------
function exerciseOne(value){
  let value2 = true;
  // In this exercise, you will be given a variable, it will be called: value
  // On line 22 create a variable called 'andOperator'
  // Using the logical operators assign it to whether BOTH value AND value2 are true;
  let andOperator = value || value2 || value && value2;
  
  // Please write your answer in the line above.
  return andOperator;
}

function exerciseTwo(value){
  let value2 = false;
  // In this exercise, you will be given a variable, it will be called: value
  // On line 33 create a variable called 'orOperator'
  // Using the logical operators assign it to whether EITHER value OR value2 are true;
  let orOperator = value || value2 == true;
  
  // Please write your answer in the line above.
  return orOperator;
}

function exerciseThree(typeOfPizza){
  let lovesPizza;
  // In this exercise, you will be given a variable, it will be called: typeOfPizza
  // You are also given another variable called: lovesPizza;
  // Using an if/else statement assign lovesPizza to true if typeOfPizza is 'pepperoni', assign it to false if it is 'olives'
  if (typeOfPizza === "pepperoni"){
    lovesPizza = true
  }
  else if(typeOfPizza === "olives"){
    lovesPizza = false
  }
    
  
  
  // Please write your answer in the line above.
  return lovesPizza;
}

function exerciseFour(age){
  let typeOfLicense;
  // In this exercise, you will be given a variable, it will be called: age
  // You are also given another variable called: typeOfLicense;
  // Using an if/else if/else statement assign typeOfLicense to:
    // 'Full License' if age is greater than or equal to 16,
    // 'Permit' if age is equal to 15,
    // 'None' if age is less than 15
  
  if(age  > 16 || age == 16){
    typeOfLicense == "Full License";
  }
  elseIf(age === 15){
    typeOfLicense == "Permit";
  }
  elseIf(age < 15){
    typeOfLicense == "None";
  }
  // Please write your answer in the line above.
  return typeOfLicense;
}
Day 12 : Here I Am
Tags: hiphop, code, coding, lifelongdev
Published: 2019-10-15 23:04:28

_liner notes_:
- Professional : Wasn't really as productive as I wanted to be at work. Spent most of the day researching some problems with my code I was running into, reading through Use Case examples and outlining for my own Use Case write up. Although, I did get some features that I've been trying to implement working in the project.

- Personal : There was a Vue meetup scheduled for today. I headed downtown a little early so I could get some work in before the event. Like I said before, got some features worked out. I went to check out to double check the location for the event and saw that the event was cancelled around the same time I left my house. So here I am, in the library with no meetup to go to. haha At least I got some work done while I was here. Now I'm going to head back home. Just waiting for the traffic to die down.

![Photograph of Two Jack Lake, AB, Canada](https://thepracticaldev.s3.amazonaws.com/i/6z80nlobi6nf1w2fp7ux.jpg)

Going to make the trip home, get something to eat on the way and probably catch up on some anime and get to bed early. I want to get up early and get some work done.

Till tomorrow, have a great day!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube caQc5IL0HNk %}
Python for Beginners - Part 3 - Number, Date and Error Handling
Tags: python
Published: 2019-10-15 22:43:19

![python_titulo](https://thepracticaldev.s3.amazonaws.com/i/ixe7oouxwbqfx3mob3yu.jpg)
Third part of articles about the Microsoft's [Python for Beginners](https://www.youtube.com/watch?v=jFCNu1-Xdsw&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6) series.
All the examples from the playlist are available in this GitHub repository: [Python Examples](https://github.com/lucianopereira86/Python-Examples).
### Objective
You will learn about the operations with numbers, dates and how to handle errors.
A Python file was created to demonstrate each example.

## Topics
* [number.py](#numberpy)
* [date.py](#datepy)
* [error_handling.py](#errorhandlingpy)

### number.py

Ex: Testing math operations with numbers and numeric strings.

![code07](https://thepracticaldev.s3.amazonaws.com/i/bhjelb5vfbs4ezu6zrtf.JPG)

Running the example:

```batch
python .\examples\numbers.py
```

The result:

![code08](https://thepracticaldev.s3.amazonaws.com/i/kusikhnplpozlnp3kome.JPG)

### date.py

Ex: Testing datetime functions and formats.

![code09](https://thepracticaldev.s3.amazonaws.com/i/gwq42ttw2bfyjlj0tgs8.JPG)


Running the example:

```batch
python .\examples\date.py
```

The result:

![code10](https://thepracticaldev.s3.amazonaws.com/i/opfg06x41w4cu7fweq5m.JPG)

### error_handling.py

Ex: Handling runtime errors.

![code11](https://thepracticaldev.s3.amazonaws.com/i/0srgh2b7ssob9byup0fv.JPG)



Running the example:


```batch
python .\examples\error_handling.py
```

The result:

![code12](https://thepracticaldev.s3.amazonaws.com/i/ub67um9hg3poutiyyt4h.JPG)

## Next
You will learn how to work with conditional logics, collections and loops.

### Video References
* [Programming with Python | Python for Beginners [13 of 44]](https://www.youtube.com/watch?v=5yhn0MFLcu8&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=13)
* [Programming with Python | Python for Beginners [14 of 44]](https://www.youtube.com/watch?v=T1j2tfZK7OI&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=14)
* [Programming with Python | Python for Beginners [15 of 44]](https://www.youtube.com/watch?v=o1dlxoHxdHU&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=15)
* [Programming with Python | Python for Beginners [16 of 44]](https://www.youtube.com/watch?v=Zs9u8TAv4_k&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=16)
* [Programming with Python | Python for Beginners [17 of 44]](https://www.youtube.com/watch?v=HQqqNBZosn8&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=17)
* [Programming with Python | Python for Beginners [18 of 44]](https://www.youtube.com/watch?v=LrRh-V-hYEc&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=18)
The Dev Saloon
Tags: linux, ubuntu, webdev, bash
Published: 2019-10-15 22:23:35

Hi!
Sorry for the off-topic post..

I've created a Discord server for devs, admins and others who want to discuss, contribute to and learn about programming, system administration and development.
It would be awesome if anyone would like to join and test it out with me, and I'm also looking for moderators for the long run, if anyone is interested.

Link: https://discord.gg/zfN8NTA

Thanks!
Which pages on my site are indexed by Google? 
Tags: foo, beginners
Published: 2019-10-15 22:14:46


Yesterday I launched my website www.mangerdurable.com and I wondered how to know if google has indexed my domain name. The simple solution is to use the Google Search Console, but there is an even easier way, just write in the google search bar: 


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

As a result of the search you will get all the pages of your site that are actually indexed by Google.
How to build a React App and Deploy for Production 
Tags: react, github, javascript
Published: 2019-10-15 22:05:58

Step-by-Step Procedure:

1. Create a React App using Create-React-App 
2. After working on the project, we need to make some changes for 
   package.JSON file
3. Changes to make in package.JSON file: 
   Add HomePage script, Homepage to refer to source control you will be 
   deploying your project. If you are deploying to Github then it will be 
   "https://username.github.io/repositoryname 
4. Create a GitHub Repository
5. Add the gh-pages package to your project(using cmd npm add gh-pages)
6. We also need to add predeploy and deploy scripts in pacakge.JSON file 
7. "predeploy":"npm run build" and "deploy" : "gh-pages -d build"
8. Re-intialize Git repository, Add everything for commit and push the 
   files to the master branch 
9. Please use the following cmds:
   git init
   git add .
   git commit -m "first commit"
   git remote add origin remote repository URL
   git remote -v
   git push -u origin master 
10.Create gh-pages branch other than master 
11.Now in the terminal run cmd npm run deploy, to finish the deployment
An overlooked Array.every() gotcha
Tags: javascript, webdev, todayilearned
Published: 2019-10-15 21:44:40

For those not familiar, the Array.every() method tests a condition against all items in an array:

```javascript
const fruits = ["Apple", "Banana", "Plum","Orange"]

//Is every fruit longer than 5 characters?
fruits.every(fruit => fruit.length > 5) //false

```

Items are not just limited to simple strings:

```javascript
const people= [{name:"Alex", age:24}, {name:"Bob", age:37},
{name:"Carl", age:18}, {name:"Devon", age:77}]

//Is every person at least 18 years old
people.every(person => person.age >= 18) //true

//destructured
people.every(({age}) => age >= 18) //true


```

But did you know what happens with an empty array:

```javascript
const toDoListItems = []

//Are all of my items complete
toDoListItems.every(item => item.done === true) //true

```

Well that was unexpected. Turns out that when `every` is called on an empty array, the result is always true:  [MDN - Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every)

Be careful not to use the Array.every() method when your Array may have a length of 0.
redux-form? again for new apps? redux-form is dying...
Tags: javascript, react, redux, npm
Published: 2019-10-15 21:18:14

Managing Form State in React is hard. ReduxForm brought a really easy way to manage the state of the Form inputs inside redux store. Everything was fine. And it was the most popular Form Library for React apps.

But that was not perfect. The main bottleneck was the Performance!

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/9pg58i7gbtxb1oqde23x.gif)
- As ReduxForm dispatches few actions for each keystroke, it actually takes time to execute all those.

- ReduxForm saves the Form data to redux store. And as we know, after saving the data to store, Redux dispatches new state to all ConnectedComponents(aka Containers), all the connected components re-renders them which actually makes almost all the components re-render and makes the app slower.

*** Some of you might say now, we could use Memoization to fix that problem. Yes, you are right! But let's be honest, most of us don't have the time to develop a proper Memoized data flow through all the Components.

There are a huge number of react apps in the world where redux-form is still used.
But the creator of ReduxForm, Eric is slowly killing the Library. There is not enough development(nearly none).
We can see the graph below -

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


Eric has been developing a new React form Library named <b>react-final-form</b> and they are actively developing it.

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

And even, He is proposing Migration guideline for migrating from `redux-form` to `react-final-form`

{% twitter 1146380371354947585 %}


Also, there is one :point_right: [official migration doc](https://final-form.org/docs/react-final-form/migration/redux-form)

If you have `redux-form` already in your projects, then it's probably better to use `react-final-form` as the migration is easier and both are developed by the same person(team) so they kept in mind that existing apps would migrate to the new one.

`react-final-form` is also lot smaller in size which is cool!

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

There is another awesome Library for Forms, is called [Formik](https://jaredpalmer.com/formik/). You can have a look and decide what suits better for you.

I will share the npm download trends of all 3 Libraries for you to decide.

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

I will write separate articles for `react-final-form` and `formik`.

Till then,
Cheers! :wave:

As I am trying to contribute contents on the Web, you can buy me a coffee for my hours spent on all of these ❤️😊🌸
<a href="https://www.buymeacoffee.com/destromas" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>

My Blog: https://shahjada.me
Better search for developers 
Tags: productivity, startup, news
Published: 2019-10-15 20:44:18

For years, I was doing software development. I used to work with different platforms and different languages. As a developer, I constantly open Google to search function' exact name and arguments, code examples or programming language tips. For example, "what is the better way to do foreach in c++". There are a hundred examples, why exactly I need to do the search.

Sometimes, I need to do copy & paste from VSCode and search in Google for a specific function name.

Today, I will share with you a small project I build in recent months.

It is a custom search engine build with Google, that has an index of developer websites only. It is available at https://codeseek.com/.

Some people will probably ask, why we need you if we have Google? I can answer that you will be more productive because you will not get unrelated search results for your search query.

In addition, I have build plugins for popular IDE - integrated development environments, like VSCode, Android Studio, IntelliJ, etc..

It is to save you a few seconds you waste on "copy & paste" from your IDE. Instead, with a right mouse click, you will be able to run the Codeseek search on the text selected.

All services are completely free. I removed the Google ads too, so, no ads.
I work for one of Auth0’s biggest clients, AMA about using their product at scale!
Tags: ama, webdev, javascript
Published: 2019-10-15 20:18:06

Hey!

I work on IAM for one of Auth0’s biggest clients (Over 1 million users).

I’d love to answer any questions you have about how we use Auth0, challenges we’ve faced, or our general experience using their service!

Ask away!

Photo by bruce mars from Pexels


P.S: I’m not here to bash Auth0, they have been an absolute pleasure to work with.
The Best Plugins for PyCharm
Tags: python, coding, devtips
Published: 2019-10-15 19:24:47

---
title: The Best Plugins for PyCharm
published: true
description: Check out these free plugins to turbocharge PyCharm's built-in features.
tags: python, coding, devtips
---

PyCharm is an incredibly popular IDE for Python, and its highly configurable nature means there are many plugins available for PyCharm. Whether you need a package to change the colors of your brackets or a plugin to manage your Github repository, learn in this tutorial how to install plugins for PyCharm and see some of the best PyCharm plugins in action.

{% youtube I5SroLnCVYg %}

Want to try Kite? You can download it for free [here](https://kite.com/download/?utm_medium=referral&utm_source=youtube&utm_campaign=kite&utm_content=best-plugins-for-pycharm).
CompileSwift Podcast: Should Apple Still Release Yearly?
Tags: podcast, apple
Published: 2019-10-15 19:02:08

This could be a touchy subject depending on your viewpoint. But given the unusual rollout of Apple's OS' this year, I wonder if they need to get back to releasing when it's ready, not yearly.

[Link to the episode](https://anchor.fm/compileswift/episodes/Should-Apple-Still-Release-Yearly-OS-e7kud4)
So meetup.com is going to charge attendees in future - what's next for event organizers?
Tags: discuss
Published: 2019-10-15 18:48:16

---
title: So meetup.com is going to charge attendees in future - what's next for event organizers?
published: true
description: So meetup.com is going to charge attendees in future - what's next for event organizers?
tags: discuss
---

# Context.

Meetup.com was testing a new pricing model, where the attendee pays a $2 fee. The backlash was predictable, especially those organizing free events. And they have since reverted on it and started damage control.

For the original announcement see: 
- https://www.meetup.com/lp/paymentchanges
- [internet archive, in case it gets taken down](https://web.archive.org/web/20191014205500/https://www.meetup.com/lp/paymentchanges)

# Discussion?

- Should the tech community start looking elsewhere? If so, is there really a good alternative now?
- Is dev.to considering stepping in?

Note that this has to be viewed from different angles.

For example, for a small new meetup (<10 attendees), not organizing on meetup.com could kill it.

For established ones, alternatives are viable. But limits their network effects. So it's now a pros/cons based on cost.

What are your thoughts on it?
Python for Beginners - Part 2 - Input, Error and String
Tags: python
Published: 2019-10-15 18:11:22

![python_titulo](https://thepracticaldev.s3.amazonaws.com/i/0qgrw7dvhi312q4ji13o.jpg)
Second part of articles about the Microsoft's [Python for Beginners](https://www.youtube.com/watch?v=jFCNu1-Xdsw&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6) series. 
All the examples from the playlist are available in this GitHub repository: [Python Examples](https://github.com/lucianopereira86/Python-Examples).

### Objective

You will learn about the input function, runtime error and operations with string.
A Python file was created to demonstrate each example.

## Topics
* [input.py](#inputpy)
* [error.py](#errorpy)
* [strings.py](#stringspy)

### input.py
If you want the user interaction to obtain a value, use the _input_ function.
Ex: A variable receives the result of an input and has its value printed.

![code01](https://thepracticaldev.s3.amazonaws.com/i/5lwtw307h94tmavhdi7a.JPG)

Running the example:
```batch
python .\examples\input.py
```
The result:

![code02](https://thepracticaldev.s3.amazonaws.com/i/ao98dff6ktmiwhlu9mbj.JPG)

### error.py
How a runtime error is shown.
Ex: Multiple math operations are done sequentially until an error occurs.

![code03](https://thepracticaldev.s3.amazonaws.com/i/hk4pkdj87897620j0qeg.JPG)

Running the example:
```batch
python .\examples\error.py
```
The result:

![code04](https://thepracticaldev.s3.amazonaws.com/i/dfj7o1rf06n0c7aljxd2.JPG)

An error occured at line 8 because it was not possible to divide by zero.
### strings.py
Strings have many functionalities similar to JavaScript, but with lesser code.
Ex: Using multiple string functions.

![code05](https://thepracticaldev.s3.amazonaws.com/i/hsgr23uj49lqsh8o0ts8.JPG)

Running the example:
```batch
python .\examples\strings.py
```
The result:

![code06](https://thepracticaldev.s3.amazonaws.com/i/k8g2ivjbtot632ric14u.JPG)

## Next
You will learn how to make operations with numbers, dates and how to handle errors.
### Video References
* [Programming with Python | Python for Beginners [6 of 44]](https://www.youtube.com/watch?v=wWwr0tDSqnE&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=6)
* [Programming with Python | Python for Beginners [9 of 44]](https://www.youtube.com/watch?v=tSebLz1hNpA&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=9)
* [Programming with Python | Python for Beginners [10 of 44]](https://www.youtube.com/watch?v=zv3cVJHCqXA&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=10)  
* [Programming with Python | Python for Beginners [11 of 44]](https://www.youtube.com/watch?v=bQQqxysLIGE&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=11)  
* [Programming with Python | Python for Beginners [12 of 44]](https://www.youtube.com/watch?v=E850-MF22P0&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=12)
The future of Vue js
Published: 2019-10-15 18:02:41

Compared to Angular or React, Vue js is the most simplest front-end technology to learn in 2019 and beyond. Vue js future is going to be great and it's here to stay, WHY? Vue js takes a different approach to javascript that makes it completely easier for beginners to learn. With it documentation alone you can start coding and developing complex application. Easier state management and routing. Straight forward and easy to recall Key-words. Don't hesitate to learn Vue js because you can build more real and complex application with only few lines of code.
Python for Beginners - Part 1 - Hello World
Tags: python
Published: 2019-10-15 18:02:27

![python_titulo](https://thepracticaldev.s3.amazonaws.com/i/z67ry98hq30qbm7e64uw.jpg)
Python is a high level program language used for multiple purposes like artificial intelligence and web applications. It has lots of similarities with JavaScript but is a lot easier and direct to the point.  
This guide will explain the basics about Python presented by Microsoft's amazing playlist called [Python for Beginners](https://www.youtube.com/watch?v=jFCNu1-Xdsw&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6).
### Objective
In this first part, you will learn how to install, configure and program in Python by using [Visual Studio Code](https://code.visualstudio.com/).  
The content displayed here can be found in this GitHub repository: [Python HelloWorld](https://github.com/lucianopereira86/Python-HelloWorld).
### Instructions
Acess the [Python Website](https://www.python.org/) and download the latest version.

![print01](https://thepracticaldev.s3.amazonaws.com/i/7ehquhmzy5787ucg85yo.jpg)

Follow the instalation process until the end with the default configuration.  

![print02](https://thepracticaldev.s3.amazonaws.com/i/1o1yhjcmrvat63gvnwa3.jpg)

Open Visual Studio Code and install the Python extension.  

![print03](https://thepracticaldev.s3.amazonaws.com/i/rp8jk93ty13lep5rojj5.jpg)

Create a file named "helloworld.py" containing the code:
```batch
print('Hello World')
```
Run the command below in the terminal:
```batch
python .\helloworld.py
```
The message will be printed with success.  

![print04](https://thepracticaldev.s3.amazonaws.com/i/u2n2roinsdsf4b95lf5l.jpg)

### Conclusion
It was easy to print a single line in Python. In the next chapters, you will learn about common functions, operations and sintax.
### Video References
* [Programming with Python | Python for Beginners [1 of 44]](https://www.youtube.com/watch?v=jFCNu1-Xdsw&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6)
* [Programming with Python | Python for Beginners [2 of 44]](https://www.youtube.com/watch?v=7XOhibxgBlQ&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=2)
* [Programming with Python | Python for Beginners [3 of 44]](https://www.youtube.com/watch?v=CXZYvNRIAKM&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=3)
* [Programming with Python | Python for Beginners [4 of 44]](https://www.youtube.com/watch?v=EU8eayHWoZg&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=4)
* [Programming with Python | Python for Beginners [5 of 44]](https://www.youtube.com/watch?v=FhoASwgvZHk&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=5)
* [Programming with Python | Python for Beginners [6 of 44]](https://www.youtube.com/watch?v=wWwr0tDSqnE&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6&index=6)