teleren/devto huggingface dataset:
Monitoring and Performance Wrap Up - August 2020
Tags: monitoring, performance, bestofdev, javascript
Published: 2020-08-27 08:11:47

Hi! I'm Helen, one of your friendly mods looking after the #monitoring and #performance tags. 

At the end of each month, I'll be showcasing some of the great posts, projects, and insights from the Dev community. 

-------------------------

Kicking off this month is [Gary](https://dev.to/garylchew) with their first post here on Dev. This post presents a way to unlock the potential benefits of modern JavaScript. Check out the post to find out how.

--------------------------

{% link https://dev.to/garylchew/bringing-modern-javascript-to-libraries-432c %}

---------------------------

Sticking with JavaScript, [Anders](https://dev.to/anders) presents alternatives for how we write code with a method to embrace both readability and performance. Have a read of the comments and take part in the discussion.

--------------------------

{% link https://dev.to/anders/why-do-we-write-javascript-like-this-3iob %}

---------------------------

Next, [Alba](https://dev.to/dawntraoz) shows how to configure a droplet in DigitalOcean and publish a Nuxt Full Static site with a good performance.

-------------------

{% link https://dev.to/dawntraoz/how-to-deploy-a-nuxt-full-static-site-in-digitalocean-4l73 %}

---------------------------

[Py](https://dev.to/pyricau) then presents a series of posts focussed on the stability and performance monitoring of Android apps in production. Check out the whole series for more.

-----------------------------

{% link https://dev.to/pyricau/android-vitals-when-did-my-app-start-24p4 %}

---------------------------

In the next post [Takuya](https://dev.to/craftzdog) shows how to build an Electron app using JavaScript, HTML and CSS. Have a read to see how the app's TTI (Time to Interactive) has been boosted from 4 seconds to 3 seconds. 


--------------------------


{% link https://dev.to/craftzdog/how-to-make-your-electron-app-launch-1-000ms-faster-3e0l %}

---------------------------

Our next post from [Functional JavaScript](https://dev.to/functional_js) improves JavaScript performance without losing robustness. Check out the post for more.

---------------------

{% link https://dev.to/functional_js/code-snippet-series-remove-junk-from-array-36ki %}

---------------------------

To finish off the wrap up this month [Tim](https://dev.to/timdeschryver) shows how we can convert the SQL Profiler template to an XEvent template. According to the docs, the XEvents aren't as heavy on the server so if you need to make the move have a read of the tips and tricks in this post.

--------------------------

{% link https://dev.to/timdeschryver/getting-to-know-sql-server-extended-events-13d2 %}


----------------------------



--------------------------


That's all for this month! For more, check out the #monitoring and #performance tags.
Hosting on Github
Tags: tutorial, github, webdev, beginners
Published: 2020-08-27 08:06:13

Here are the steps for creating free web hosting using github as the hosting site:

### 1. Create a new *Repo*
Create a repo by pressing the green *New* button, then name the repo according to your user account name, for example `user-name.github.io`. This is done so that the outside domain name will follow the base github hosting name.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j55p189y0ggck25a6ywg.png)


### 2. Create file
The first file name that needs to be created is index.html with dummy html fields like `<h1>Hello World</h1>` to test the page later after the Repo is set as root (See step 3). The stages of creating a file are like clicking the *Add file* button > *Create New file*.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ys7haojpsu2he0qfytd9.png)

### 3. Enable *Repo*
The step is to go to *settings* > go to *pages* > *source*, use the dropdown menu to select the *publishing source* folder (usually *default source* reads *None*), by selecting root/master. When finished click *Save*.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbhdm01kll9xb53svutg.png)

The last step you can check on the address `user-name.github.io`. The index.html page should be readable.

====
Reference: [configuring github pages site](https://docs.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)
How to get Uber clone app source code free?

Tags: cloneapp, uberclone, swiggyclone
Published: 2020-08-27 07:45:48

It’s the planet of -on the move. The world is getting mobile. Then how about a uber clone app for the fleet of solutions so you can handle them in an otherwise hassle-free manner whilst growing your organization manifold? 

Uber Clone is among the most lucrative business models of this century. It’s influenced a whole new generation of clone programs which are one-step ahead. Now attempt to offer the clients the very best Uber clone app script. 

Among the most attractive and rewarding businesses in the worldwide marketplace, Uber clone program has produced a revolution in the cab market. 

Try our Uber like program source code or Uber clone script to get cab services. It will help you to streamline your cab management solution to acquire more clients and make more profit.

Technologies especially affect eCommerce–fresh startups pop up nearly daily, new small business ideas are continuously created, and tens of thousands of e-commerce sites open monthly.

Among the most recent trends in e-commerce technologies –multi vendor marketplaces where independent vendors offer their products. And the market itself is just a stage that doesn’t own and save the merchandise and all of them are e-commerce websites. In this guide, we’d love to let you know about one of these marketplaces–taxi booking service. This one is categorized as an agency virtual mall.

Any taxi service site ought to synchronize its data using a mobile program for clients. By way of instance, Uber–just one of the greatest cab services on the planet –assembles all of the company around its mobile program for Android and iOS. Clients set up the program, enroll there, and purchase taxi right inside.
Follow our website for more blogs- https://www.svss.co.in/
What is the ideal length of a code for you?
Tags: productivity, discuss, explore
Published: 2020-08-27 07:41:04

In your work environment, does the length of code per function or per class matters? If yes, can you explain and give me some advice why does is important to follow. For example, the ideal length of the code you will create should be around 300 or 400 lines only. 

Please leave some comment. I would love to hear your inputs. Thanks!

---------
Photo by Rohit Farmer on Unsplash
The Importance of Salesforce Consulting for CRM Implementation

Tags: salesforceconsulting, crmimplementation, salesforce
Published: 2020-08-27 07:28:21

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dhtiamkvg1i64ov7q9oi.jpg)

A customer is the backbone of any [organization](https://www.cloudanalogy.com/). This requires a substantial investment for any business in order to maintain good relationships with its customers. Any small mistake in dealing with customers can put a company on the brink of closure, which is detrimental. With this in mind, it is imperative for any business to engage in viable customer relationship models that ensure that current customers stay in business and attract new customers. A company must ensure that it is customer-oriented and that the customer pillar is strong and unshakable.

Competition is vital in all industries and this keeps all companies on their toes trying to maintain their market niche. As a result of this competition, many business models have emerged to help with customer relationship management. One of these models is the customer relationship management (CRM) model. CRM is all you need if you want to be a leader in this niche. This is a model used in customer management, customer projections, and sales. Synchronize, organize and automate business processes using technology. These business processes may include sales activities, technical support, and customer marketing services.

[CRM](https://www.cloudanalogy.com/) is a practice that, when implemented successfully, reduces the overall costs of marketing operations and customer service. It is part of the commercial strategy of the company and the company must be careful in the implementation phase as it affects the entire commercial dimension. This requires consulting from Salesforce for the CRM implementation. It is imperative that the company consult with sales representatives before implementing a CRM. This consultation gives the company a high-quality procedure that will enhance CRM success. A company can outsource sales force consulting to consulting firms or the company can do it internally.

In outsourcing mode, this is where the company enlists the services of an external company to help implement CRM. The company must make sure to choose the best company because the better the company, the more successful the implementation phase will be. You must verify the effectiveness and efficiency of the available companies, the good contractual conditions and the overall success of the company in the previous commitments. Outsourcing sales force advice for CRM implementation can be less expensive than setting up an internal department to do the same.

The company can also set up an internal service to advise the sales force for the implementation of CRM. This has the advantage of allowing the company to control the entire implementation process. It also improves the flexibility of the company, since you can carry out your activities at your own pace. However, it costs the [company](https://www.cloudanalogy.com/) a lot of money as it has to create new departments and hire new employees to carry out the implementation.
What technology to learn?
Tags: discuss
Published: 2020-08-27 07:10:04

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2gm75jury5zo8wu4nddu.jpg)
If there is one technology, framework, programming language, paradigm, ... you would recommend another dev to learn right now, what would it be? 

Why do you recommend it? 

What are the benefits for somebody learning it, in contrast to other technologies?
Why should I learn JavaScript
Tags: javascript, watercooler, career
Published: 2020-08-27 07:01:19

There exists an extreme relationship between JavaScript and JavaScript developers. 

LOVE-HATE RELATIONSHIP.

Sounds like a freakin’ dramatic roller coaster.

Why are you still in this relationship? What makes you stay?

Basically, why should I learn JavaScript? 

(Wrong answers are also welcome haha)
Creating a course on DataOps / Data Engineering....
Tags: opensource, database
Published: 2020-08-27 06:40:26

Hello, I am creating a course that will launch through the Linux Foundation on *DataOps*.

DataOps is one of those new "categories" that continues to evolve.

But if you work with Kafka, Spark, Presto, or Airflow (or any of a number of different open source technologies that are similar to those), then you're in the "data ops" field.

If you are interested in learning *more about the field* (meaning, you want to work as an engineer solving problems around data, data processing, analytics, data pipelines), this course is for you, and I'd love to share a preview of the outline (with some sample content).

If you are already an experienced data engineer working in the space, then I would love some of your thoughts to help me to enable even more developers in this discipline by improving the course.

As you can imagine, there are tons of paid courses out there which are already pretty beefy.  This course is going to be made available for free and delivered through EdX.

As such, it is also likely to feel a little "light" compared to full-on courses taught at schools or even in online courses with tuition.

After all, it's just been me in my spare time writing the course.

Nevertheless, I think there's an opportunity for something solid out there that is free to provide an on-ramp.

So...I've created the document in Google Docs, and am enabling anyone on the Internet to add a comment.

[Here is the outline](https://docs.google.com/document/d/1briKNmTmZflC4Q4COXRu8E1tAf8yWqiO2Op-ALmXOio/edit?usp=sharing)

It is designed for people new to the field to understand the core concepts, provide links to key technologies and blog posts, and just be a resource to developers and, from there, learn more by interacting with the open source community.

Thanks!
jQuery Migrate brakes WordPress version 5.5
Tags: wordpress, php, news, codenewbie
Published: 2020-08-27 06:36:23

 [originally posted on blog.accolades.dev]
(https://blog.accolades.dev/2020/08/23/jquery-migrate-brakes-wordpress-version-5-5/)
A few days ago I bumped into a problem on one of my client’s WordPress website. the problem was that some function like “submit” form was not responding. 

The solution was at hand, but I found out something more serious was happening.

*Hi, I am Luc, a web developer and programmer in his early 40’s that started his journey of coding in February 2019.*

WordPress released the 5.5 version called “Eckstine” and it is outstanding regarding speed, search, and security as they state on their main website. If you’d like to read more about this update, you can do it here

###The Problem

But with this update they brought a very big issue: jQuery seized to be 100% responsive. The problem is that the JavaScript library called jQuery Migrate doesn’t install itself on the majority of the website when update causing everything that is JavaScript related to work improperly. We can think of JavaScript as small engines behind the scene that turns user’s action in reality. These little engines work behind the scenes to make forms, search bars, and drop-down menus to function.

Having an older theme installed on your website that is outdated, compatibility will show and will cause issues. 

So, the problem appears when a WordPress theme is old or a plugin is outdated. If the issue is with an older plugin, you can check the last time was updated, if it’s more than a year I recommend you to search a newer plugin with the same function, as that may cause the problem.

###The Solution
As the main WordPress website states: “With the update to WordPress 5.5, a migration tool known as jQuery-migrate will no longer be enabled by default. This may lead to unexpected behaviors in some themes or plugins who run older code” the handy solution is to install a plugin called: “Enable jQuery Migrate Helper” which you can download it from here or if you feel like this too easy, you can go deeper and downgrade from version 5.5 to version 5.4.2 as a user said: “The best solution is to downgrade to 5.4.2 Using the WP Downgrade Plugin by Version 1.2.1 | By Reisetiger.”

###Conclusion

As of all updates nowadays, this one brings solutions, speed, and reliability but as well while this happens, bugs are presents as well. The best, for now, is to use whatever you see fit, and with whatever CMS you feel comfortable.

I hope this brings a solution to your struggle and until next week I wish you a productive time ahead.

You can find me on [Twitter](https://twitter.com/accolades_dev) or [LinkedIn](https://www.linkedin.com/in/luc-constantin/)
What does your VS Code setup look like?
Tags: webdev, discuss, productivity
Published: 2020-08-27 06:33:48

---
title: What does your VS Code setup look like?
published: true
description: 
tags: webdev, discuss, productivity
cover_image: https://code.visualstudio.com/opengraphimg/opengraph-home.png
---
I'm using [One Dark Pro theme](https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme), [VS Code icons](https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons), [FiraCode font](https://github.com/tonsky/FiraCode) and [Git Bash terminal](https://git-scm.com/downloads). It's pleasing to an eye and lets me stay productive.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/u3pzwglenw686wb3nct7.png)

Could you please share your screenshots?
Excited to see your setups!
Generating a Json Web Token
Tags: 100daysofcode, javascript, mongodb
Published: 2020-08-15 20:07:51

#### What's a token?
I'd describe it as a uniquely generated code that identifies an authenticated user in a system.

#### Why do we need a token?
Imagine a scenario where a user had to constantly re-enter their credentials to perform an action on the system, It would be annoyingly tedious! A better alternative is to assign a token to a user, which gives the user the permission to perform necessary actions for as long as the token is valid.

#### How do we generate one?
We use JWT: Its a standard that provides a trusted mechanism for secure transfer of data between parties. *You can read more on this [Here] (https://jwt.io/introduction/)*
We `npm install jsonwebtoken` the include the dependency in our file (i'm working on [userController.js](https://dev.to/mtee/the-c-in-mvc-controllers-1nfd))

```javascript
const jwt = require('jsonwebtoken');
```
If the password is verified a random number will be generated using crypto. Crypto is a node module hence we need not to install. 
```javascript
 const secret = require('crypto').randomBytes(48).toString('hex');
```
Randombytes generates a set of random numbers while `.toString()` converts the numbers to a string. 

Next we'll create a token using jwt:
```javascript
const token = jwt.sign({ id: user._id }, secret, {
        expiresIn: 86400 
      });
      return res.json({token});
```
Jwt takes an user object that's a unique identifier, a secret key which is our random number, a callback function or an option such as expiresIn which sets the expiry time of the token. I'm returning the token to verify its working.

Here is the full code;
```javascript
const userLogin = (req, res) => {
  User.findOne({ email: req.body.email }, async (err, user) => {
    if (err) {
      return res.send(err);
    }
    if (await bcrypt.compare(req.body.password, user.password)) {

      const secret = require('crypto').randomBytes(48).toString('hex');

      const token = jwt.sign({ id: user._id }, secret, {
        expiresIn: 86400 
      });
      return res.json({token});
      // return res.send(`Welcome back   ${user.firstName}`)
    }
    return res.send('Wrong Password');
  })
}
```
I'll head over to postman and test my 'user/login' route. It should send back a token:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/f16fzzt9inkr4qmdh4bu.png)
Seems to be working okay. 

 _Day 30_, look who made it this far!!!🥳🥳🥳
New Frontiers
Published: 2020-08-27 06:24:02

We are excited to launch an alpha of #space related libraries that will be integrated in our #ResilientOne  engine.

We added ow.ly/Rut250BahLe to our portfolio as a clear effort to join the space community.

We hope you can enjoy it and leave comments below.

Follow us and visit
epyphite.com for more information.
Handle errors in python with decorators
Tags: python, programming, software
Published: 2020-08-27 06:21:58

I recently reviewed some code which converted [gRPC](https://grpc.io/) error codes into custom errors using a decorator and the simplicity and genius of it made me facepalm "why didn't I think of it myself?".

Really, why didn't I? When I wrote [how to handle errors with grace](https://medium.com/free-code-camp/how-to-handle-errors-with-grace-failing-silently-is-not-an-option-de6ce8f897d7?source=friends_link&sk=c46e7737436d4603578950ecfc9c11fb) I mentioned using decorators to validate input parameters and how important it was to keep error handling separate from your main code as much as possible. I just didn't think to combine the two. Oh well, better late than never.

---

Let's see how it's done:

First we'll define `my_method()`. All this method does is raise an exception, which I hope is not any real world example - but I'm doing it to make a point. For a single line of logic, I had to write 3 lines of error handling, obscuring what the method actually does.

{% gist https://gist.github.com/rinaarts/724ea6c6833b6efb6601be596720745d file=without_decorators.py %}

Usually, we'll have a few more lines of logic, but also a lot more error handling. Checking different types of exceptions, reporting exception code which is a bit more complicated etc.

Error handling fills our code with clutter, making it hard to follow what it actually does. What if you could Marie Kondo it and hide all that distracting mess in a convenient, reusable wrapper?

Does it spark joy? Yes!
Is it magic? No!
We can do it using decorators.

The simplest example is a catch all error handling decorator that simply catches all types of exceptions and prints them out.

{% gist https://gist.github.com/rinaarts/724ea6c6833b6efb6601be596720745d file=catch_all_error_handler.py %}

All the exception handling logic is hidden in the decorator and out of `my_method()`, making it much easier to see that writing a method which only raises an error makes absolutely no sense. 

But that's not all! We can add some more functionality in our decorator. In our next example we'll see how to add retry attempts using a decorator. 

{% gist https://gist.github.com/rinaarts/724ea6c6833b6efb6601be596720745d file=retry_error_handler.py %}

Instead of just catching the exception and reporting it, this decorator allows defining a number of retry attempts and it will retry the decorated function until it succeeds or the number of retries is exceeded, adding a growing `sleep` time between attempts.

There are infinite possibilities for customizing the error handling decorator:
- Add retriable/permanent exception types to decide which to retry
- Help callers of your method by wrapping exceptions with a single exception type (see why [here](https://medium.com/free-code-camp/how-to-handle-errors-with-grace-failing-silently-is-not-an-option-de6ce8f897d7#37d4))
- Add more complex logging code 
- Re-raise exceptions
- etc.

---

I hope you found this useful! 



<small><em>Header image Image by Andreas Lischka from Pixabay</em></small>