teleren/devto huggingface dataset:
MySQL Performance Tuning as a Service
Tags: webdev, devops, performance, mysql
Published: 2021-03-13 09:47:56

The performance of web applications that rely on MySQL, largely depends on the database response speed.

It annoys me that only experienced engineers can tune MySQL configuration to improve the performance, and even they spend a lot of time on this task.

I  spent hundreds of hours tuning MYSQL configuration to improve performance of different web apps...

The MySQL configuration tuning process is clear. It includes the following steps:
  1. Read the docs.
  2. Learn the best practices.
  3. Analyze the monitoring data.
  4. Analyze the MySQL status.
  5. Use the scripts to get recommendations.
  6. Determine which settings would yield the best     performance.
  7. Create the MySQL configuration file.
  8. Apply the configuration file.

I’ve gone far and wide in search of applications that could tune MySQL for best performance, preferably in the fully automatic mode. My search did not return a solution that could be called good, let alone perfect.

So I decided to develop one myself…

I teamed up with my friends, experienced software engineers, and we built [Releem](https://releem.com/?utm_source=devto&utm_medium=webdev&utm_campaign=signup).

It’s kind of like a virtual assistant for software engineers.

Here is what it does:
* Collects MySQL status metrics, system information from the server, and transfers them to Releem platform.
* Analyzes the collected metrics and detects performance issues, fully automatic.
* Alerts of the MySQL performance issues found.
* Automatically generates a conf file tailored to your server, with the parameters to boost MySQL performance.

We’ve been testing it for 9 months with one thousand servers, and I am now excited to report that the tool does save time and resources by improving MySQL configuration and significantly boosting its performance in most cases.

Using this tool developers can focus on improving their products without worrying about gaining a depth knowledge of the MySQL database backend domain.

I published the screencast to explain how it works.
{% youtube 7gixIYTpuPU %}

What do you think of this approach to MySQL performance tuning?
Get the instant solution from the cash app number 
Published: 2021-03-13 09:45:14


Sometimes cash app users want instant solutions to cash app-related issues then get in touch with us. We are the best cash app customer service providers and offers the genuine answer of cash app-related issues and problems. Just take your mobile and dial our official number to connect with our experienced executives. https://www.contactsupport-number.net/cash-app-customer-service-number/
Whenever we see (d) => setData(d), what can we think about?
Tags: javascript, react, webdev
Published: 2021-03-13 09:41:10

Sometimes we have some code:

```js
fetch(" ... ")
  .then(res => res.json())
  .then(d => setData(d))
  .catch(err => console.error(err));
```

Whenever we see the form

```js
(value) => doSomething(value)
```

that is, get `X`, and do something with `X`, then we actually can change it to

```js
doSomething
```
So the original code above, can be

```js
fetch(" ... ")
  .then(res => res.json())
  .then(setData)
  .catch(console.error);
```
and internally, we can convert `.then(setData)` to `.then(v => setData(v))`

The exception is when `doSomething` can take in more than one argument, but `x => doSomething(x)` will be sure to only get the first argument.

This pattern works if it is the `.then(setData)` case, where it takes a function that accepts one argument only.

Now, note that for the case of `.then(console.log)`, it works, because `log` as a function doesn't need to have the `this` bound to `console`.  This is very subtle.  When we provide `console.log` to `.then()`, we have the "lost binding" in JavaScript.  So when `.then()` invokes this function, the passed in function `log` (or `console.log`) does not have `this` bound to `console`.  Note that if we invoke `console.log(something)`, then when `log` is running, the `this` is bound to `console`.  In the case of `console.log`, this is not important.

Note that we do `.then(console.log)`, it is not any different from

```js
const g = console.log;

fetch( ... )
  .then(res => res.json())
  .then(g)
```

It is easier to see the `g` has the lost binding problem.

As a result, we need to be careful about

```js
.then(a.b.c.fn)
```

because `fn` has lost the binding to `c`.  To make the binding stay we have to use

```js
.then(a.b.c.fn.bind(a.b.c))
```
And this brings another lesson in JavaScript: whenever we see something like `foo.bar.fn` or `foo.fn`, we need to be careful about the possibility of lost binding. And if we are debugging, being able to recognize this `a.b.fn` pattern would help you identify the possible bug due to the famous JavaScript lost binding problem.
If Cash App Freeze My Account How Can I Unfreeze My Cash App Account
Published: 2021-03-13 09:35:31


The Cash app keeps a close eye on accounts that make irregular payments. If you have recently made such a payment, then the cash application has the authority to block your account. If you want to know how to unfreeze my cash app account, In addition, if you try to sign in to a cash application account with the wrong password multiple times, then the cash application will temporarily freeze your account. Also, make sure you only pay for known customers. You can contact us on our website for more help. https://www.emailsupport-contact.com/blog/how-to-unlock-cash-app-account/
FEC Day 11-13
Published: 2021-03-13 09:24:59

I haven't in a while but let me try to remember based on my notes and memory. During this time I completed getting my modal to post data to the API. This proved very challenging because the database required large amounts of different info. It seemed a little daunting because my modal would require a bunch of controlled components. However after grabbing all the data I needed from the state and adjusting my sent data constantly, I was finally able to make a successful post! I remember feeling deeply satisfied as this was a major feature of my section. I also solved an issue with resetting my state whenever the product changed in the parent. I had to choose between moving my state and methods up to the parent or an alternative. The alternative I found was to set the key of my main component to equal the product's ID. So whenever the product changed, so did the key of my component. This would force the component to unmount and remount with a fresh state, which is exactly what I needed!
Python Environment Setup for Machine Learning
Tags: python, datascience, machinelearning, tutorial
Published: 2021-03-13 09:17:09

{% youtube 8o3jvkK2GGU %}

An often overlooked part of machine learning is the fundamental setup of a functional, clean environment.

I’ve seen the question asked time and time again and was recently asked myself — how do we set up all of these things, from start to finish?

So this video will cover exactly that. We will go from installing Python through to setting up Pandas, TensorFlow, PyTorch, and more — and even adding a separate Machine Learning environment in Jupyter Lab (above).

* Installing Python

* Creating a New Environment

* Adding the Environment to Jupyter
Task force week two
Tags: taskforce, awesomitylab, codeofafrica, educational
Published: 2021-03-13 08:55:21

Greetings,

It’s been two weeks at task force. I finally started coding a todo app api at Awesomity Lab, well it’s not my first time with a todo app api but the language, the technology and framework they are all new, at first it’s been too challenging because I used to code in JavaScript with it’s framework called express, right now I switched to nestjs and I am using typescript, the secure language I am enjoying right now I am proud I am growing both technically and professionally.

Speaking of professionalism, I really enjoyed the sessions I had with Anja teaching us about intercultural(business) and non verbal communication, the good thing I really appreciate with Anja is that she let us make our research, personally this helps me because the things I researched on my own it’s really hard to forget them. You may be here reading this but you are questioning yourself but James what did you really learn? Well I now know that before you meet someone it’s advisable that you make a deep research about their culture, knowing more about his or her culture will improve the level of empathy while trying to communicate with them. I don’t think you want to attack someone at his or her first sight. 

I didn’t know how powerful non verbal communication was, I did not know that the body language can mean something way different to what you are talking and that may influence the personnel you are communicating with, the takeaway from this is that I have to pay attention when I am using gestures because they may attack him or her which may result to the personnel thinking I am apathetic with them.

The second week was educational, challenging and productive. Task force has everything I have been searching to boost my career. Looking forward to the coming weeks.
CodePen - Generative macOS Big Sur Waves 🌊 [SVG]
Tags: codepen, javascript, webdev, css
Published: 2021-03-13 08:34:01

This is a generative program that creates macOS Big Sur style wave backgrounds. Each image is random within constraints 🎲

The waves generated here may not always look perfect, but they are unique! If you find an output you like, you can copy the SVG to your clipboard using the download button 🚀

Interested in a tutorial on how I made this? Let me know! 

{% codepen https://codepen.io/georgedoescode/pen/bGBzGKZ %}
Laravel error failed to open stream (solution) after cloning from git(Solution)
Tags: laravel, laravelerror
Published: 2021-03-13 08:11:48

Recently I was working on a Laravel project in my case I was got an error so I was trying to solve this error and it was a multifile procedure I was applied. I forgot what is the previous actual condition.
This time I was too much worried I was thinking about what I should do for going back to my project. Then I realize I have uploaded it on my GitHub
So, I was very happy and clone this repo and run this project again.
But it shows me an error like below:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4bffym00sur69yr8yyz.PNG)
In that case, I think this error generates basically composer installation purpose. So, I go to my project directory and run the composer install command on my terminal.
After that, I was happy and run that project again. But it shows me another Runtime Exception error and the error looks like below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsnky5qpl9tjnllaycud.PNG)
Then I think why this is happening I go to my project folder and looking for the .env file I see there was no env file. I copied a fresh .env file from the internet and I know this error for missing APP_KEY on the .env file. For that case, I go to my project directory and run PHP artisan key: generate after few seconds my terminal shows me key generation successful message.
Now I was trying again to run my project.
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer💻
What is "Good" Code
Tags: code, engineering, solution
Published: 2021-03-13 08:02:07

---
title: What is "Good" Code
published: true
description: Understanding that the question on what good code is, is very relative and in most cases very wrong.
tags: code,engineering,solution
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--0DV2TsR3--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/5fj9ydr23xw0073c6u0m.png
---

Over the last couple of years, my answer to the question on what good code is, has constantly be changing, is this a sign of growth ? am i getting better ? or am i seeing things from a different perspective ?

If you had asked me 5 years ago, i probably would have told you that good code is code well designed following OOP principles. I would have told you to throw away your procedural code, and favour OOP principles, lay out classes with clear defined access modifiers and proper encapsulation, anything short of this would have looked like terrible code to me.

2 years ago, i would have told you, that any code that dosent follow best principles, "CLEAN" code by uncle bob, DRY principle, SOLID etc is garbage code. My mind was conditioned to think that there is a "Way" to always build solutions.

1 year ago, and even until now, i would tell you, that the best code is code that is simple to navigate through and efficient in execution, thanks to my obsession with performance. 

Thinking through on how my definition on "Good Code" has changed over time, i see that it has always been relative to the situation i have been in, there are many lenses to view what good code is.

The problem is, as long as experiences differ, judging what code is good and what code is not good would always differ. Every now and then, people who are introduced to existing projects, always come sitting on their high horses, with a lot of ideas on why the code is not good and garbage.

One other important factor people fail to realise, is that engineering solutions is always relative to the constraints and conditions in which the solution was built. For example, in many early startups, there is a constraint on resources, business requirements might not have been also well defined, so expecting to see code bases as structured as say Google or Amazon is far fetched. There are also constraints on the tech available as at the time when solutions were built. Prior to when Garbage Collection assisted languages were invented, building secure, memory efficient applications were very difficult, so judging what is good code and what is not is very difficult.

In summary, i think the answer to what is good code, and what is not is very difficult. Engineers should just be in tuned to the fact that, it is very ok for codebases to evolve with time, the more you learn, the more you can evolve your code to better handle the business requirements you have. So any code that dosent handle the business requirements as defined as of now, is probably useless.
How to use the useEffect React hook 🎈

Tags: react, hook, useeffect
Published: 2021-03-13 07:39:20

>Find out what the useEffect React hook is useful for, and how to work with it!

One React hook I sometimes use is useEffect.

````javascript
import React, { useEffect } from 'react'
```
One very important feature of Hooks is allowing function components to have access to the lifecycle hooks.

Using class components you can register a function on the `componentDidMount`, `componentWillUnmoun`t and `componentDidUpdate` events, and those will serve many use cases, from variables initialization to API calls to cleanup.

Hooks provide the useEffect() API. The call accepts a function as argument.

The function runs when the component is first rendered, and on every subsequent re-render/update. React first updates the DOM, then calls any function passed to `useEffect()`. All without blocking the UI rendering even on blocking code, unlike the old `componentDidMoun`t and `componentDidUpdate`, which makes our apps feel faster.

Example:
````javascript
const { useEffect, useState } = React

const CounterWithNameAndSideEffect = () => {
  const [value, setValue] = useState(0)

  useEffect(() => {
    document.title= `New messages(${value})`;
  })

  return (
        <>
          <h1>{value}</h1>
          <button className="btn"
                  onClick={() =>setValue (value+1)}>Inclease
          </button>
        </>
  )
}

ReactDOM.render(
  <CounterWithNameAndSideEffect />,
  document.getElementById('app')
)
```


`useEffect()` can be called multiple times, which is nice to separate unrelated logic (something that plagues the class component lifecycle events).

Since the `useEffect()` functions are run on every subsequent re-render/update, we can tell React to skip a run, for performance purposes, by adding a second parameter which is an array that contains a list of state variables to watch for. React will only re-run the side effect if one of the items in this array changes.

````javascript
useEffect(() =>{
       document.title= `New messages(${value})`;
}, [value]);
```
Similarly you can tell React to only execute the side effect once (at mount time), by passing an empty array:

````javascript
useEffect(() =>{
       document.title= `New messages(${value})`;
}, []);
```
`useEffect()` is great for adding logs, accessing 3rd party APIs and much more.
How to use the useState React hook 🎉
Tags: react, hooks, usestate
Published: 2021-03-13 07:27:57

One React hook I most often use is useState.

```javascript
import React, { useState } from 'react'
```

Using the `useState()` API, you can create a new state variable, and have a way to alter it. `useState()` accepts the initial value of the state item and returns an array containing the state variable, and the function you call to alter the state. Since it returns an array we use array destructuring to access each individual item, like this: `const [count, setCount] = useState(0)`

Here’s a practical example:

````javascript
import { useState } from 'react'

const Counter = () => {
  const [count, setCount] = useState(0)

  return (
    <div>
      <p>You clicked {count} times</p>
      <button onClick={() => setCount(count + 1)}>Click me</button>
    </div>
  )
}

ReactDOM.render(<Counter />, document.getElementById('app'))
```

You can add as many `useState()` calls you want, to create as many state variables as you want. Just make sure you call it in the top level of a component (not in an `if` or in any other block).
How to recover our commit after a git reset --hard ?
Tags: git, tutorial, devops
Published: 2021-03-13 06:54:36

While doing a "git reset" with a "--hard" flag in any branch it will reset the index and working tree which means not only our index is discarded but also along with contents in our working file. Simply, any changes to tracked files in the working tree since <commit> are discarded.

Now, how do we get back to our last commit. A simple way is there.

>So, whenever git does something extreme like changing or rewinding branches, it records that in "reflog" a reference log. 
Now, check the output of "git reflog", it will tell you all transitions our branch ever had. 
We can then use git show <commit_id_from_reflog> to check and git checkout <commit_id> to get back.

**Flow of recovery :**

`git reflog`
```
<commit_id> (HEAD -> main, origin/main, origin/HEAD) HEAD@{0}: commit: <message>
<commit_id> HEAD@{1}: commit: <message>
<commit_id> HEAD@{2}: commit: <message>
```
`git show <commit_id>`


`git checkout <commit_id>`

Visit My Personal Blog @ [danyson.github.io](https://danyson.github.io/)

**Support Us on** [Buy Me a Coffee](https://www.buymeacoffee.com/dogealgo)
Hello World!
Published: 2021-03-13 04:46:31

So I’ve finally decided to take the plunge.

“Get it down. Take chances. It may be bad, but it’s the only way you can do anything really good.” — E.L.Doctrow

I’ve meant to write a blog since blogspot.com days but somehow never pulled the trigger. So…

Who am I?
I am Siva Sundaresan. I’m from South India, from the lovely, cultural capital Madras(yes, I prefer Madras over Chennai). I was born & raised in Madras, and I am a proud Tamilian. I moved to the USA in 2008 for my education, and after graduation, I work here now, having lived in Arizona(Go Sun Devils !!), Utah, and currently Austin, TX.

Why should you carry on reading?
Fair question. I’ve been in software development & automation for over 11 years now. I’ve worked on e-commerce, cloud computing, and I’m currently in the InfoSec industry. I am not an expert or a 10xer by any stretch of the imagination. However, I believe that I have a unique vantage point, having worked on these various niches, varied software architectures, unique testing setups, DevOps & CI/CD pipelines, developing & testing distributed systems, ethical hacking, and so on. I aim to share my experience with these posts and get better through sharing and learning.

Who‘s my target audience?
The stage is set, the lights are dimmed, and I have my mic !!
Although I’m not targeting any specific demographic, I’d be thrilled and consider it a job well done if newer folks entering the Software Automation field can pick up a thing or two from my experience/posts and can build on some of my automation methodologies, making it better.

What next?
Well, the sky is the limit. I have a lot of ideas I want to write about. A series on software automation (test automation & DevOps), a series on demystifying software concepts like BlockChain, distributed systems, NoSQL databases, time series data, a series on testing system at scale using tools such as Docker, K8s, Gatling & Locust.io.
I also invest in equities both in the US and Indian markets. I will be writing on personal finance, investing, fundamental analysis of stocks, technical analysis of stock charts, and so on.
I’m a sucker for productivity techniques, so there’ll be a good mix of posts on hyper-productivity, problem-solving, techniques on setting goals and achieving them, need for meditation, mental health, etc.

Ohh & one more thing …
If you have made it this far, thank you! I am a big football(the OG sport) junkie.
Manchester United is the greatest football team on this planet, and I am a proud RedDevil!
You’d see an odd post on MUFC, soccer tactics, team formations & a recap of important games.
Finally, I’ve recently been on a mission to start my days on a lighter note to maximize productivity. On that note, I’ve begun sharing tech-related humor with the #SivaStandupJokes hashtag. Check them out on LinkedIn & Twitter. I’d appreciate any feedback.

So brace yourself, reader, if you revisit this space in the future, you will find insightful content on the topics listed above laced with a touch of humor !!
5 Benefits of Digital Marketing for Startups Growth
Tags: startup, growth, digitalmarketing, seo
Published: 2021-03-13 06:28:34

What all startups have in common is that everyone has a website. For people who depend on the Internet to get almost all the information they get, it is important that beginners are present online to reach their audience. The path to this is possible thanks to digital advertising, along with ways to help startups grow faster and more efficiently. This is where digital advertising begins and helps it grow.

1]  Optimises local SEO Service for Startups

A recent Google study on search behavior that promotes local SEO services for beginners found that almost 50% of people looking for local businesses find their business in a day. This indicates that the person performing the internal search is searching. For an immediate solution, startups should use it. Even if your business only operates online, you can still benefit from local SEO services as long as your results are unique and personalized.

The process begins with setting up a Google Places account in Google My Business. , There must be a proper address and phone number for them to appear on your website. This is followed by adding enough visual clues, making entries in local directories that are relevant and relevant, improving the wording and basic intent, and getting good reviews and useful informative links. You can also increase brand awareness and customer interactions through social media. 

2] Helps in Lead Generation

For online businesses, success is calculated as a percentage of inbound traffic that translates into leads or sales, depending on the purpose of the website involved. Therefore, designing an effective digital advertising campaign that facilitates change is one of the top priorities for businesses. .. This includes search engine optimization (SEO), social media advertising, and email marketing.

[Read more](https://seostarclub.blogspot.com/2021/03/5-benefits-of-digital-marketing-for.html)