teleren/devto huggingface dataset:
JavaScript snippet for dynamically updating footer copyright year.
Tags: copyrightyear, javascript, jssnippet, beginners
Published: 2018-05-10 09:57:47

---
title: JavaScript snippet for dynamically updating footer copyright year.
published: true
description: A small JavaScript snippet for updating copyright year.
tags: copyrightYear, javascript, jsSnippet, beginners
cover_image: https://thepracticaldev.s3.amazonaws.com/i/l2iegdik5kpx3acnuxif.jpeg
---

Hi, today am going to code a js snippet for dynamically updating the footer’s copyright year.

```javascript
document.getElementById('copyrightYear').innerHTML = new Date().getFullYear();
```
Place the id (copyrightYear) in a *span* tag at the footer section after © symbol and before company name.

Place the above code in *script* tags at the bottom before closing body tag.

You will get the current year without any hassle to update it regularly every year.

If you like the post, share with your friends.

Cheers!
When is it right to change the version number of a project? 
Tags: webdev, beginners, devops
Published: 2018-05-10 08:40:39

---
title: When is it right to change the version number of a project? 
published: true
description: Maintaining projects is hard, but sometimes the technicalities are more painful than the codebase itself. When is it the right time to bump the version number of a web app?
tags: webdev, beginner, devops
---
For the sake of sanity:
```js
let versionstring = '1.2.3';
let masterversion = 'the first digit of the version string (e.g. 1)';
let version = 'the second digit of the version string (e.g. 2)';
let subversion = 'the third digit of the version string (e.g. 3)';
```

As someone who's only very recently written a codebase that's actually useful (and works!), I'm yet to understand half a million things about versioning, contributing and licenses, but the most pressing question I've had for the past week is:

* When is the right time to bump the masterversion/version/subversion of a web app?


Do you bump the subversion up when you've fixed a bug? If you've made a huge change, is it okay to bump the subversion more than one notch? When is it the right time to change the version or the masterversion?

What do you do for your projects? And how often do you change the masterversion/version/subversion? Do you put out changelogs for every version, or just major bumps?

If you put out changelogs, how do you do it if it's a private repository?
Couldn't enable facebook authentication via passport-facebook in development mode (localhost)
Tags: passport, express, node, javascript
Published: 2018-05-10 07:10:09

---
title: Couldn't enable facebook authentication via passport-facebook in development mode (localhost)
published: true
description: 
tags: passport, express, node, javascript
---

Hi all,
I am developing a web app using Facebook authentication. The technologies I used are passport-facebook and express on server side. Specifically:

route.js
```javascript
   app.get('/auth/facebook', 
      passport.authenticate('facebook', {scope: 'email'} ));

   // 
   app.get('/auth/facebook/callback',
      passport.authenticate('facebook', {
         successRedirect: '/',
         failureRedirect: '/login'
      }));
```
passport.js
```javascript
const passport = require('passport');
const FacebookStrategy = require('passport-facebook').Strategy;
const keys = require('../config/keys');

passport.use(new FacebookStrategy({
   clientID: keys.facebookClientID,
   clientSecret: keys.facebookClientSecret,
   callbackURL: '/auth/facebook/callback',
   }, (accessToken, refreshToken, profile, done) => {
      console.log(accessToken, profile);
   }
));

```
I run the app on development server localhost:3000, when go to route: localhost:3000/auth/facebook, an error message pops up: 
> "Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://"

I tried to Google and StackOverFlow this but couldn't find the answer. Would be very appreciate for your helps! 
Thanks all & have a great weekend!
Practicality Beats Purity - Microservices vs Monoliths
Tags: python, engineering, microservices, practicality
Published: 2019-07-05 03:31:49

---
title: Practicality Beats Purity - Microservices vs Monoliths
published: true
tags: python, engineering, microservices, practicality
canonical_url: https://tryexceptpass.org/article/practicality-beats-purity-3/
cover_image: https://tryexceptpass.org/images/rube-goldberg.jpg
---

In recent years there’s a growing trend to move away from large _all-in-one_ applications. These “monoliths”, developed with one codebase and delivered as one large system, are hard to maintain. In their place, the industry now favors splitting-off the component systems into individual services. As separate “microservices”, they perform the smallest functions possible grouped into logical units. They are independent deliverables, deployable, replaceable and upgradeable on their own.

Going further into the [Practicality Beats Purity](https://tryexceptpass.org/article/practicality-beats-purity-1) series, this article will cover the implications of transitioning to a **microservices** architecture.

[Read on ...](https://tryexceptpass.org/article/practicality-beats-purity-3/)
Portfolio suggestion/feedback. 
Tags: portfolio, webdev, discuss
Published: 2018-05-09 20:52:59

---
title: Portfolio suggestion/feedback. 
published: true 
description: 
tags: portfolio, webdev, discuss 
---

Hello guys, I'm fresher. I'm trying to get the right job for me. I have developed my online portfolio. It would be great if you could give me feedback or suggestions for my portfolio. Here is the link : 
<a href="http://tejozarkar.com">tejozarkar.com </a>


Thanks in advance .
What Makes an Environment Inclusive?
Tags: discuss
Published: 2018-05-09 19:48:10

---
title: What Makes an Environment Inclusive?
published: true
description: What makes a work environment inclusive to you? What does it take?
tags: discuss
---

Yup, I'm opening that can of worms. I don't care what your gender, race, orientation, etc, etc is. **I want to know what an 'inclusive environment' means to you.**

For me:
I like to see women in leadership roles. I like to see that everyone's opinion is valued and that everyone feels welcome to speak up. Even the quiet people. :) 

Secondly: **What would you do to create a more inclusive environment to your standards?**

I'd make sure existing ladies are being promoted as much as their male colleagues. If someone is dictating the conversation during team events or meetings, I'd find a way to get a balance in the room, even if it resorts to something like a speaking stick.
Ask Dev, what books do you all recommend? 📖
Tags: computerscience, theory, discuss
Published: 2018-05-09 19:03:17

---
title: Ask Dev, what books do you all recommend? 📖
description: 
published: true
tags: computer science, theory, discuss
---

I finished reading Skiena's Algorithm Design Manual and I am currently looking for more good computer science theory books to read to get a stronger theoretical understanding. Anyone have any good recommendations? Also suggestions more intermediate books on front-end development would be handy as well.
I'm Junade Ali, author of multiple software books and working on a PhD in theoretical computer science. Ask me anything! 
Tags: ama
Published: 2018-05-09 17:36:50

---
title: I'm Junade Ali, author of multiple software books and working on a PhD in theoretical computer science. Ask me anything! 
published: true
description: Junade is a specialist in computer security and has written best-selling software books.
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ehtg8aw3sgow27d8ah5z.jpg
tags: ama
---

Hello! I'm Junade; by day I work at Cloudflare, focussing on running the Support Operations engineering group. By night, I work on a PhD in theoretical computer science. 

I started my developer career at 16, initially working as a web dev for a mental health charity before entering the Digital Agency world; eventually working my way up to being the Lead Developer of the largest digital agency in the UK (by headcount). After leaving the agency world, I worked on mission critical road safety software for traffic sensors and signals - with code that touches hundreds of millions of road movements every day.

Despite leaving school with no qualifications (let alone a Bachelors degree), I was accepted onto a part-time Masters course at the age of 17; during the course of my studies I worked on an Operational Research project for a large security/defence company. This work led to my first academic publication and I later won the "Best Overall Masters" award, in part due to my thesis. I have accidentally found myself writing 3 books; two on software engineering and one which was co-authored on British constitutional law.

Most recently; you may have recently heard of some of my widely-reported work on creating [the k-Anonymity model](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/) used on Troy Hunt's Pwned Passwords database, which allows you to quickly check if your password is exposed against more than half-a-billion leaked passwords, whilst limiting the information you share with any third-party.

You can find me on Twitter [@IcyApril](https://twitter.com/IcyApril), check out what I work on at my [Cloudflare Blog profile](https://blog.cloudflare.com/author/junade-ali/) and my [personal blog](https://icyapril.com/about.html).
The Boy Scout Rule is Now the Scout Rule
Tags: culture, namingthings
Published: 2018-05-09 17:18:18

---
title: The Boy Scout Rule is Now the Scout Rule
published: true
description: 
tags: culture, namingthings
cover_image: https://thepracticaldev.s3.amazonaws.com/i/u9plskdbrvh12u9146pd.png
---

Our field is built on metaphors and naming conventions.

One great metaphor is the "Boy Scout Rule". It basically means "leave the code cleaner than how you found it, akin to a campground".

{% link https://dev.to/_arunsasi/the-boy-scout-rule %}

{% link https://dev.to/gonedark/are-you-a-boy-scout-b9 %}

I love the concept, and I think it's one of the better software generalizations. It is a great way to take on a healthy refactoring mindset as we build resilient software systems. However, the name was unfortunately gendered—at least I thought so. But I wasn't sure if it was worth making a fuss about. It's complicated.

Anyway, I recently learned that the real-life Boy Scouts will be [re-branding as "Scouts BSA"](https://www.npr.org/sections/thetwo-way/2018/05/02/607678097/boy-scouts-changing-name-to-scouts-bsa-as-girls-welcomed-into-program) and will be allowing girls into the program. I imagine they'll eventually drop the BSA part and just be "The Scouts".

So as far as I'm concerned, the "Boy Scout Rule" in software development is now the **"Scout Rule"**.

Happy coding.
Google I/O 2018 Summary - Day 1
Tags: webdev, google, io2018
Published: 2018-05-09 17:10:23

---
title: Google I/O 2018 Summary - Day 1
published: true
description: Check out a summary of the Google I/O Conference 2018, Day 1.
tags: #webdev #google #io2018
canonical_url: https://auth0.com/blog/googleio-summary-day-one/
---

Over 5,000 developers, designers, and managers gathered for Google's biggest event of the year! The first day consisted of a general opening keynote by Google CEO, Sundar Pichai, a developer keynote led by Jason Titus, VP, Developer Product Group, Google, the web state of the union talk, and several others.

[Read on 🎡](https://auth0.com/blog/googleio-summary-day-one/?utm_source=dev&utm_medium=sc&utm_campaign=googleio_summary)

![Google I/O 2018 Summary - Day 1](https://thepracticaldev.s3.amazonaws.com/i/on8yx6c757ui9vpo0efy.png)
Intro to the Vuejs🐎🐎🐎
Tags: vue, javascript, beginners, webdev
Published: 2018-05-09 14:19:51

---
title: Intro to the Vuejs🐎🐎🐎
published: true
description: vue js explaination
tags: vue,javascript,beginners,webdev
cover_image: https://cdn.pixabay.com/photo/2017/08/30/12/45/girl-2696947_960_720.jpg
---

## Have you used Vuejs or you still confused?

Today I'm here to explain about Vuejs in a simple way and its uses.
Let's start learning by writing code instead of reading long paragraphs.

For these, I'm using the codepen. 
first, I started with writing div tag with id app.

```
<div id="app"></div>
```

Now let's write some Vuejs code  
Vue offers us new Vue instance it takes an object as an argument.

```javascript
let app = new Vue({
  el:'#app'
})

```
What above code does is if we write any code inside the div element it is controlled by vue.

the first property is el it means which element in our HTML code Vue needs to target.

**Data Property**: it manages the state inside the Vue.

**Methods property**: it is a place where we can define functions.

Now let's write data property and methods

```javascript
var app = new Vue({
  el:'#app',
  data:{
    name:'Welcome to Vuejs',
    show:true,
    persons:['Gowtham','Aaron','Tonny']
  },
  methods:{
     changeme(){
       this.show = !this.show
    }
  }
})
```

the data and methods property are objects.

In data property, I have defined some static data and in methods property, I declared **changeme** function.


Now let's use these properties inside the div element. 

```javascript
<div id="app">
  <h1 v-if="show">{{name}}</h1>

  <ul v-for="person in persons" v-if="show">
    <li>{{person}}</li>
  </ul>
  <button @click="changeme">
    {{show ? 'Hide' : 'Show'}}
  </button>
</div>

```

I defined an h1 element with  **v-if** directive have you seen one thing I have used show property which is we already defined inside the data property in our Vue instance.

#### What v-if does is it only shows in the dom when the given condition is true.


The second thing I have used an unordered list with the v-for directive

v-for helps to loop through the array for that I have used **persons** array which is we already defined inside the data property in our Vue instance.

I have used double curly braces because of Vue uses the template like syntax for data-binding.

last thing which is button element I have registered a click handler
for  that I have used @click directive which is a shorthand of v-on:click 
you can use any of them.


The final output is 

{% codepen https://codepen.io/saigowthamr/pen/qYxjYN %}




You can use Vue in small apps or big apps or you can make a complete Single page app with Vue.


Hope you guys love these To know more about Vuejs You can check out Docs


**Resources**
[Vue Docs](https://vuejs.org/v2/guide/)
[Vue Directives](https://vuejs.org/v2/guide/syntax.html#Directives)
[Event Handiling in vuejs](https://vuejs.org/v2/guide/events.html)
What's the best way to manage migrations in a microservice architechure?
Tags: question, microservices, discuss
Published: 2018-05-09 13:58:31

---
title: What's the best way to manage migrations in a microservice architechure?
published: true
description: 
tags: question, microservice, discuss
---

I'm thinking of creating a repository that will handle database migrations across the services. Is this efficient?
RSS 
Tags: school, management, software
Published: 2018-05-09 13:42:43

---
title: RSS 
published: true
description: Reliable School Software ( RSS ) is elegant in its operational concept of a Service Oriented Approach'.The distributed and synchronized data provides the source of information needed for student, parent, staff and management at a much higher speed. It is designed to speed up various tasks across the institution system and offers modules that benefit educators, students, and staff. An ERP solution that can be accessed anytime, anywhere.
tags: school, management, software
---
Natural Language Processing Using Python NLTK
Tags: python, tutorial, beginners
Published: 2018-05-09 10:45:11

---
title: Natural Language Processing Using Python NLTK
published: true
description: 
tags: #python #tutorial #beginners
---

1 What is NLP?
2 Benefits of NLP
3 NLP Implementations
4 NLP Libraries
5 Install NLTK
6 Tokenize Text Using Pure Python
7 Count Word Frequency
8 Remove Stop Words Using NLTK
9 Tokenize Text Using NLTK
10 Tokenize non-English Languages Text
11 Get Synonyms from WordNet
12 Get Antonyms from WordNet
13 NLTK Word Stemming
14 Stemming non-English Words
15 Lemmatizing Words Using WordNet
16 Stemming and Lemmatization Difference

https://likegeeks.com/nlp-tutorial-using-python-nltk/

Hope you like it.
Thanks!
Android app to write code in 23+ programming languages
Tags: beginners, productivity, android, codingapp
Published: 2018-05-09 06:35:53

---
title: Android app to write code in 23+ programming languages
published: true
description: Online Compiler is a free Android app to write and compile code in more than 23+ programming languages including C#, PHP, Swift, etc. 
tags: beginners, productivity, android, coding app
---

Online Compiler is an Android app which allows you to
execute code in more than 23+ programming languages, including C#, C++, Python,
Java, Swift, etc. So if you are looking for an app to code on the go then you
should definitely check out this app.
 

Just like most other coding apps out there, it is not
perfect to develop real-world projects, but quite useful if you want to test
some code snippets. The app is more than recommended for anyone who has just
stepped into the coding world. Use it as your daily driver to solve programming
puzzles and improve your coding skills.

[Read the complete review here to know all features](https://www.codeitbro.com/online-compiler-android-app/).


Enjoy coding on the go :)
How I started with React
Tags: react, javascript, webdev, beginners
Published: 2018-05-09 03:16:18

---
title: How I started with React
published: true
description: Me Sharing one of my first React Codes. 
tags: react, javascript, webdev, beginner
---
Well Hello, this is my first post here and I want to share how I started to learn react.
At the beginning I was overwhelmed with so many tools I needed to do a hello world, In react, the create-react-app, and other NPM packages, that I needed, and I didn't quite understood why I needed to have this "complicated" workspace to do just a simple Hello World...

While I was in the developer console, watching the source code of many sites, and the source code of my create-react-app example, I've notice that Adding just just the "react.development.js" and "/react-dom.development.js", I could invoke components directly to with inline JS and adding "babel.min.js" I could do that with in-line JSX or well not JSX, Babel, and this seemed pretty cool for me at that moment. 

Just with `<script src='URL'>` and following url's, and to insert the in-line `<script type="text/babel>***code***</script>` and you are ready to Go!!!
https://unpkg.com/react@16/umd/react.development.js
https://unpkg.com/react-dom@16/umd/react-dom.development.js
https://unpkg.com/babel-standalone@6/babel.min.js


Now the bad part here is that It's HORRIBLE with performance, the first version of [GitHub Page](https://ekiim.github.io/) has this kind of React, and well, as simple as it is, I have to wait for it to render, but to start working your way in to react. 

It's a great way, because the community will talk about all this tools, that you don't really get to understand because you don't yet see the need for them, and this way you'll bump in to the problems or improvements that this tools offer. 


Adding a little bit of the W3.CSS and Font Awesome styles to the components, I managed to pull together something like this (actually this is a part of my first react page). Feel free to explore, and use this source, and well, I'm working (at least on my local computer, use the W3.CSS with React and recreate the W3.CSS templates so I can use them in a much cleaner way I'll upload something about this on github soon.
{% gist https://gist.github.com/ekiim/5aa1b17d7c4e7da14eb08201bf241bd2 %}
Shopoji - Initial Front End with working effects!
Tags: pushercontest, inprogress
Published: 2018-05-09 02:09:12

---
title: Shopoji - Initial Front End with working effects!
published: true
description: A person joining the market actually does something!
tags: pushercontest, inprogress
---

# What's New

![Initial screen when you join Shopoji](https://thepracticaldev.s3.amazonaws.com/i/d51eyo130nhi2a8yxxn3.png)
_Can you tell I'm not in UX?_

Nothing special at the moment, but the front end isn't just a white page with some console logs.

But! When a new player joins the market, this happens:

![A new shop has entered the market notification](https://thepracticaldev.s3.amazonaws.com/i/qjfmpqk5j76b830zc6ot.png)

There is a little banner saying a new shop has entered the market, and subtely 10 new 🍏 have entered the market. If another shop joins, 10 more 🍏 are added, and so on and so on.

# What's Done

* I'm not touching AWS anymore (because it's done for what I need)
* I have a grip on how Pusher works. It's pretty straight forward. Fire off event to channel. People in channel get event's stuff. Boom, done.
* Started the idea of there being a master table for the current state of the market (pretend you read about it in the Emoji Economy section of the newspaper each morning)
* I have an idea for where I want to go with this "MVP"
* I also know where I want to expand on this later. Presence channels would make this pretty cool with where I'm going with it, but I don't think a *minimum* viable demo needs that right now. And I like the idea of it being a truly free market, rather than locked behind an auth page 😛

# What's Next

1. Make the messages area a bit more useful, so that more events can be added later
2. Add the concept of selling 🍏s, to remove them from the market
3. Have things not sell if price is too high or low (the apples must be rotten if you're undercutting the market that much!)

# What's Left

* Flesh out the Global Market section to have more emojis, more types of emojis, not look like junk, etc
* Add selling emojis to customers (NPCs) and setting prices for your emojis
* Time permitting, add preferences for selling things. A knight might pay more for a 🗡️ but won't be apt to pay all that much extra for a 🎈

***

Also, there's a pretty massive oversight with how this is architectured right now. I'm totally going to make it a "feature" not a bug 🐛 Following along with the "What's New" section might help show it 😇
Keyboard shortcut to get out of node_modules folder in Visual Studio Code
Tags: javascript, vscode, nodemodules, npm
Published: 2018-05-09 00:26:00

---
title: Keyboard shortcut to get out of node_modules folder in Visual Studio Code
published: true
tags: javascript, vscode, node_modules, npm
canonical_url: https://www.slightedgecoder.com/2018/05/08/node_modules-folder-hell/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/y2c5e18dmvpjszpvv052.jpg
---

### 🌧️ Introduction

[Visual Studio Code](https://code.visualstudio.com/) has been de facto choice of front-end development.
What do you usually use for front-end development? NPM packages.

### 🤔 Problem

As you are navigating JavaScript code, you are bound to stumble upon a code in `node_modules` folder.  
And It’s a pain 😠 to scroll all the way up and close it.

So how do you quickly close `node_modules` folder?

### 📜 TL;DR 

> Press and hold down the ⬅️ left arrow key.

Yeah, seriously **that’s it**.
It works in Windows Explorer and Atom, as well.

Here is the live action.
{% youtube 0YGH1fKIaNY %}

This will save you at most 5~10 seconds but it will add up.
I've been stuck in `node_modules` folder hell so many times and decided to share this tip.

_The post [Keyboard shortcut to get out of node\_modules folder in Visual Studio Code](https://www.slightedgecoder.com/2018/05/08/node_modules-folder-hell/) appeared first on [Slight Edge Coder](https://www.slightedgecoder.com)._