teleren/devto huggingface dataset:
Building My Own Blog
Published: 2021-07-22 04:01:48

I've enjoyed dev.to as a blogging platform. But I don't feel tied to it.

What I do feel tied to is my growth path as an engineer and that includes building projects for personal and other interests.

So I've started to think about creating a blogging platform.

###MERN vs Django
I have a strong desire to use Django as my project's framework. I've worked with Django far longer than the six weeks that I've been a student at Hack Reactor, and so I know it way better. I also like it way better (although I'm not discounting the role of time/exposure plays in affinity/preference).

But HR is a JS program (well, really it's an engineering program) and I'm nowhere near where I want and need to be with the tools we've been learning.

##Here's what I don't know / haven't done:

- I don't know how to write methods on classes and instances in Mongo (I barely know how to CRUD in Mongo --  even 'barely' is overstating it).
- I don't know how to set-up more than the most basic post and get request in Express.
- I haven't set-up Webpack.
- React is still opaque to me. I haven't applied CSS to React components nor used state-related libraries like Redux or Context.

I mean it's a painfully long list.

So this project is a great opportunity to get more reps in with those libraries and softwares.

##What I've accomplished so far

Not much. I've got some wireframes and a study plan. They're both sparse. But they're a start.

My computer has been spazzing for the past few days so I can't upload many of the other wireframes at the mo, but down below can give you a sense of some of the elements that I'm considering incorporating. As for the study list, it's:

- Learn Mongo. [Here's a nice tutorial](https://www.freecodecamp.org/news/introduction-to-mongoose-for-mongodb-d2a7aa593c57/) I've found and plan to start with.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8qs8aegudufx4g7ghw8.png)
How to HIGHLIGHT text with Cypress
Tags: testing, cypress, automation, e2e
Published: 2021-07-22 03:42:39

I recently wrote automated UI tests for a text editor application. One of the most important functions was to format text in different ways (e.g. text styles or text alignments). My biggest issue was to figure out how to highlight🖍️ text with Cypress in order to change the formatting of that text.

This feature is an [open Github issue](https://github.com/cypress-io/cypress/issues/2839) in the [Cypress repository](https://github.com/cypress-io/cypress). I tried out several of their solutions and this is the one which worked best for me:

 ```JavaScript
// Highlight text in the sectionArea
cy.get(sectionArea).realPress(["Shift","ArrowLeft","ArrowLeft"]);
```

I used the command `realPress()` from [Cypress real events](https://github.com/dmtrKovalenko/cypress-real-events#cyrealpress) to simulate the highlighting of text via the keyboard⌨️. This was the easiest solution as I have already used other commands from Cypress real events to solve other issues.
test
Published: 2021-07-22 03:24:07

# Header

<script async src="//jsrun.net/axYKp/embed/all/light"></script>


{% post https://dev.to/kazz/boost-your-productivity-using-markdown-1be %}

<iframe width="100%" height="300" src="//jsrun.net/axYKp/embedded/all/light" allowfullscreen="allowfullscreen" frameborder="0"></iframe>
As a developer, do you even bother with containerisation?
Tags: docker, kubernetes
Published: 2021-07-22 02:40:48

Hello there, trying to understand a bit better on how developers are actually using containers and solely for the purpose of developing.

Deploying containers to production is another concern and whether it concerns you or not is another discussion :-)

I know that docker-compose is a pretty common tool for creating a local development stack but are you using any other tools to use containers locally or do you actually don't bother with containers because what you want is just write code?

Happy to discuss!
I need someone to coach me 
Published: 2021-07-22 02:33:25

Hi everyone. I am 31 years old and I live in San Francisco. I studied electrical and computer engineering nearly 10 years ago. I have some coding skillS that you can see in my Github. I am wondering If someone can help me get into the teach jobs. I am highly trainable and can learn easy. The only things is I like to earn while I learn.
React, Redux and Ruby on Rails Final Project
Tags: react, redux, rails
Published: 2021-07-22 02:24:08

For my final Flatiron school project, I decided to build an app related to my favorite sport, soccer. My wife and I enjoy watching soccer and before any big game, we bet among ourselves which team will be the winner. I thought that it would be a good idea to create a soccer betting app. I built the app using React, React-router, Redux and Ruby on Rails.

##Features

* Users have the ability to login, logout and sign-up for the app. 

* Users can see upcoming soccer matches without login in. They can filter matches by competition such as Premier League, La Liga or Champions League.

* Users can see teams that participate in a competition without login in.

* When a user signs up for the app, they get a $1000 credit to bet on games.

* If a user is logged in, they can bet on upcoming matches. 

* Users can like upcoming matches and see a count of how many people also liked it.

##What I learned

While I was building this app, I learned the most about Redux. I learned to use connected components, how to connect React with Redux and most important how everything works together. I created multiple reducers and then used combineReducers to bring them all together. I also used Thunk Middleware to dispatch async calls.

##Conclusion

After a year of hard work, I'm ready to graduate from Flatiron school. After I pass my final project, I will add features that I didn't have time to include such as giving the users the ability to comment on upcoming games. I also want to learn more about authentication and security. In the future, I want to concentrate my learning on database and authentication.
What is artificial intelligence
Published: 2021-07-21 22:44:52

In short, artificial intelligence (AI) is a system or machine that is capable of imitating human behavior to perform specific tasks and can gradually learn using the information received. AI has many incarnations. For example:

chatbots use AI to quickly analyze customer requests and provide appropriate responses;
Smart assistants use AI to extract freeform information from large datasets and optimize planning;
The recommendation engines automatically select similar TV programs for users based on previously viewed ones.

AI is not a format or a function, it is a process and the ability to think and analyze data. While many people think of intelligent humanoid robots taking over the world at the mention of "artificial intelligence", in reality, AI is not intended to replace humans. Its goal is to expand the boundaries of human abilities and capabilities. Therefore, this technology is a valuable business resource.


Learn more about AI solutions https://data-science-ua.com/

Benefits of AI for Companies
AI makes it possible to reproduce and improve the way a person perceives and reacts to the world around him. What makes AI a powerful cornerstone in the foundation of innovation theory. By leveraging various forms of machine learning that recognize patterns in data to allow predictive value, AI can add value to your business by:

helps to use the full potential of data;
makes reliable forecasts and automates complex tasks.
How To Add _blank Or Open New Tab For Link In Markdown
Tags: markdown, javascript
Published: 2021-07-22 02:01:25

There are some limitations when we’re working with markdown, one of them is adding property to our HTML tags. In this case I want to add _blank property on my  tag to open a link in a new tab


Hack it in javascript

We don’t have control (mostly) with how our markdown will be rendered, but we can hack around it in javascript.


Let’s say you have an article with id “article” and want to get all the links inside it, here is how

```
  const _article = document.getElementById('article') 
  const _links = _article.getElementsByTagName('a')
  for (var i = 0; i<_links.length; i++) {
    _links[i].setAttribute('target', '_blank')
  }
```
Crop Management System - #100DaysOfCode - Day 19,20,21
Tags: 100daysofcode, flutter, dart, firebase
Published: 2021-07-22 01:58:14

## Introduction

This post is part of my 100DaysOfCode series. In this series, I write about what I am learning on this challenge. For this challenge, I will be learning flutter and firebase by building an Agriculture Management Information System.

## Recap

On Day 18 we discussed how to reuse form widgets to handle create and update scenarios.

## Overview

In this post, we'll discuss the current progress of the application.

### Testing

On days 19 and 20 I spent the day learning about testing in a flutter. Most of the examples I found online are introductory level tests. While they helped in understanding unit tests, widget tests and integration tests, they did not help me understand how to test a production complexity app.

Unfortunately, I was unsuccessful at implementing the test I wanted. For example, In the signup screen, I wanted to test that the email variable was assigned the email address from the email text form field. After two days of trying I still don't know how to access the widget variables.

I've decided to pause testing and continue working on the app. I will resume testing at a later time. I will be able to successfully test in the future as my programming capacity in flutter and dart increases.

### Updating the Signup and Signin functionality

After failing at testing my widgets, I decided to manual inspect the app for bugs that I might have missed. I found a few bugs in the sign in and signup screen. Minor adjustments were made to the text form fields like capitalization and indicating which fields are optional or required fields in keeping with [material text fields recommendations](https://material.io/components/text-fields#anatomy)


## Wrap Up

In this post, we discussed testing and updates made to the signin and signup screen of the app.

## Connect with me

Thank you for reading my post. Feel free to subscribe below to join me on the #100DaysOfCodeChallenge or connect with me on [LinkedIn](https://www.linkedin.com/in/curtlycritchlow/) and [Twitter](https://twitter.com/CritchlowCurtly). You can also [buy me a book](https://www.buymeacoffee.com/curtlycritchlow) to show your support.
Revert Git Full Git commit
Tags: github, codenewbie, beginners, webdev
Published: 2021-07-22 01:26:03

### Revert the full commit
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

    git revert {commit_id}'

### About History Rewriting

#### Delete the last commit
Deleting the last commit is the easiest case. Let's say we have a remote _origin_ with branch _master_ that currently points to commit _dd61ab32_. We want to remove the top commit. Translated to git terminology, we want to force the _master_ branch of the _origin_ remote repository to the parent of _dd61ab32_:

    git push origin +dd61ab32^:master

Where git interprets `x^` as the parent of `x` and `+` as a forced non-fastforward push. If you have the master branch checked out locally, you can also do it in two simpler steps: First reset the branch to the parent of the current commit, then force-push it to the remote.

    git reset HEAD^ --hard

    git push origin -f

---

This document is inspired by https://christoph.ruegg.name/blog/git-howto-revert-a-commit-already-pushed-to-a-remote-reposit.html - Thank you.
Codewars Mr. Freeze JavaScript
Tags: javascript, webdev, beginners, tutorial
Published: 2021-07-22 01:25:24

This article explains how to solve the kata [Mr. Freeze](https://www.codewars.com/kata/514a3996d22ce03198000003/train/javascript) from Codewars in JavaScript
## Instructions
>There is an object/class already created called MrFreeze. Mark this object as frozen so that no other changes can be made to it.
### Provided Code
```javascript
// mark the MrFreeze object instance as frozen
```
## Discussion
This kata is testing our knowledge about objects and how to freeze them.

First things first: what is an object?

An object is basically a collection of key-value pairs. Objects can have **properties** and **methods**.

Properties store data. Methods are functions that can be performed as actions on an object.

Let's see what an object looks like before we talk more about them:
```javascript
const person = {
    firstName: "Michael",
    lastName: "Smith",
    createFullName() {
    	console.log(firstName + ' ' + lastName)
    }
};
```
The `person` object above has two properties, `firstName` and `lastName`. It has one method `createFullName`.

You can access the value of `firstName` through dot notation like this:
```javascript
console.log(person.firstName);
// Michael
```
You can call methods from an object in the same way:
```javascript
person.createFullName();
// Michael Smith
```
One cool sidenote is that you can add properties to an object easily using dot notation, too. Just make a new property name and assign it a value:
```javascript
person.hairColor = "brown";
```
Now our `person` object has *three* properties:
```javascript
const person = {
    firstName: "Michael",
    lastName: "Smith",
    hairColor: "brown",
    createFullName() {
    	console.log(this.firstName + ' ' + this.lastName)
    }
};
```
Whew! That was quite a setup. Now let's get back to the original point of the kata: freezing an object.

When you [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) an object, you prevent the object from being changed. That means you can't add new properties or change existing properties. If you try to change the object a `TypeError` will be thrown:
```javascript
Object.freeze(person);

person.eyeColor = "blue"; // this line throws a TypeError
```
## Solution 1
```javascript
Object.freeze(MrFreeze);
```
---
Hope you enjoyed this article! You can follow me on [LinkedIn](https://www.linkedin.com/in/dylanattal/) and [GitHub](https://github.com/DylanAttal)!
Colocation
Tags: webdev, programming, frontend
Published: 2021-07-22 01:02:55

A great blog written by Kent
[Colocation](https://kentcdodds.com/blog/colocation?ck_subscriber_id=1240852553&utm_source=pocket_mylist)

## Principles

- "Place code as close to where it's relevant as possible"
- "Things that change together should be located as close as reasonable."


### Comments

- No one puts their comment in a separate file or directory, but have their comments co-located with the code they're explaining

### HTML/View

- Modern frameworks puts your view logic and your view templates in the exact same file, for example React or Vue

### CSS

- CSS-in-JS([A Unified Styling Language. In the past few years we’ve seen the… | by Mark Dalgleish | SEEK blog | Medium](https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660))

### Tests

- co-locate our tests files with the file or group of files they are testing
⇒ we can see immediately that the module is tested

### State

- Localize your state
    - Maintainability
    - Performant ⇒ e-render a lot fewer components

### "Reusable" utility files

- "Huh... I'll bet a lot of people could use this." ⇒ the component uses that util function is deleted, but the utility you wrote is out of sight, out of mind and it remains

## My Thoughts

- I will try to practice "Place code as close to where it's relevant as possible"
- I often have the situation where separating a function to utilities. I will think carefully from next time
setting up browser notification
Tags: css, html, javascript, react
Published: 2021-07-21 23:39:01

     Setting up browser notifications are in every way crucial in web application development....
   most times we do need to pass valuable informations to application users in order to decide our next step.

   The process of implementing web notifications is made so easy with the browser notification api...

<script>

//first of all we check if the browser supports notification

if(!window.Notification){
   //you could update the user interface if you like to inform the user that their browser does not support notifications

console.log("browser notification not supported")
}


// now we try to display a notification


const showNotification = () =>{

    const title =" hey there man, how's it going ";
    const options = {
        body:" would you like to recieve weekly updates from us",
        icon:"./assets/logo.png"
    }
    const notify = new Notification(title,options)

    //optionally you could decide to clear the notification dialog after some time

   setTimeout(()=>{
       notify.close(); 
    },10 * 1000)
}

//now we check the permission status

 if (Notification.permission === "granted")
{
   showNotification();
}


//this basically runs if the user neither accepted nor denied the request

else if (Notification.permission !== "denied"){
   Notification.requestPermision().then(access => {
  if(access === "granted"){
     showNotification() 
  } 
else{
   // you could inform the user that accepting the notification request is neccessary for whatsoever reason

console.log('permission denied');
}
})
}
<script>



and thats all you need to start implementing browser notifications in your web application...

note: web notifications only works on a secure https, something of this sort "file:///C:/Users/HILLARY/Notify.html" would not work
How to resolve the Resilio Sync service "Error 1069: The service did not start due to a logon failure." on Windows
Tags: resiliosync, resilio, windows, services
Published: 2021-07-22 01:01:48

So you restarted your PC and Resilio Sync isn't running. When you try to manually start the service, you get the `Could not start the Resilio Sync Service service on Local Computer. Error 1069: The service did not start due to a logon failure.` message.

Here's how to fix it:

1. In `Services.msc` (which I assume you're already in to have seen the error message), right click `Resilio Sync Service` -> `Properties` -> `Log On`
2. (You *may* be able to skip Steps 2) to 6). I'm just regurgitating what worked for me) Enable the `Local System account` radio button 
3. Click `Apply`
4. Click `OK`
5. Click `Start the service`
6. After the service has started, click `Stop the service`
7. Repeat Step 1)
8. Click `This account:`
9. Click `Browse...`
10. In the `Select User` windows, click `Object Types...`
11. Uncheck `Built-in security principals`
12. Click `OK`
13. Enter your username in the `Enter the object name to select (examples)` field
14. Click `Check Names`
15. Select your username
16. Click `OK`
17. Enter your user password in the `Password:` and `Confirm password:` fields
18. Click `Apply`
19. Click `OK`
20. Repeat Step 5)

Resilio Sync should now start normally.
How to apply a CSS style to more than 1 HTML element tag?
Tags: css
Published: 2021-07-22 00:00:00

---
  title: How to apply a CSS style to more than 1 HTML element tag?
  published: true
  tags: CSS
  date: Thu Jul 22 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/apply-styles-to-more-than-one-html-element-tags-css
  cover_image: https://melvingeorge.me/_next/static/images/main-33960e1d4ec676faa1f9f98b0a9d65c2.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/apply-styles-to-more-than-one-html-element-tags-css)
  
To apply the same CSS styles to more than 1 HTML elements tags, you can separate various HTML element tags selectors by using the `,` (comma character) in CSS.

For example, let's consider 2 `p` (paragraph) HTML element tags with one having `class` selector and the other having an `id` selector like this,

```html
<!-- Paragraph tags -->
<p class="myParagrapgh">Hello World!</p>
<p id="myCoolPragraph">Hello Devs!</p>
```

Now to apply a text color of `red` to both the paragraph tags with different selectors, we can write those selectors separated by the `,` (comma) character inside the CSS stylesheet like this,

```css
/* 
Apply text color of red to both paragraphs 
having different selectors.
The selectors are separated by comma characters.
*/
.myParagrapgh,
#myCoolPragraph {
  color: red;
}
```

This will set the text color of both paragraphs to `red`. Like this, you can apply one style to many HTML element tag selectors separated by the comma character.

### These are called the grouping selectors.

See the above code live in [JSBin](https://jsbin.com/zawelonayu/2/edit?html,css,output).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
What is your inverse bus factor?
Tags: team, busfactor, personality, environment
Published: 2021-07-24 09:42:24

---
title: What is your inverse bus factor?
published: true
date: 2021-07-22 00:00:00 UTC
tags: team,busfactor,personality,environment
canonical_url: https://jhall.io/archive/2021/07/22/what-is-your-inverse-bus-factor/
---

Yesterday I talked about the [bus factor](https://jhall.io/archive/2021/07/21/what-is-your-bus-factor/). The lesser known inverse bus factor is often just as important:

> How many team members need to be hit by a bus\* before your project can become productive?

_\*or otherwise disappear from the team._

The inverse bus factor points to the problem of team members who provide negative business value.

Of course, most of us provide negative business value during onboarding, so we aren’t concerned with that.

In my experience, the inverse bus factor raises above zero in one of two scenarios:

1. A particularly toxic personality, (who could be an [expert beginner](https://jhall.io/archive/2021/07/13/avoiding-the-trap-of-expert-beginnerism/)), who either destroys team morale, or requires so much micromanagement as to be a net drain (often both).

Ironically, this person is also often the [rock star](https://jhall.io/archive/2021/07/04/dont-be-a-rock-star/), and seen as indispensible. This may make them both the one person the team cannot afford to lose, and simultaneously the one person the team most needs to lose.

2. A team that’s simply too large. There may not be any individual who “needs to go”, but the team is too large to be effective. I’ve seen this especially in [startups](https://jhall.io/archive/2021/06/24/the-hidden-costs-of-hiring-too-fast/) which are actively hiring as quickly as possible, without regard for productivity.

Is your team too large to be productive? I’d love to hear about it. Hit REPLY and let me know.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._