teleren/devto huggingface dataset:
The one valid use for a code coverage percentage
Tags: testing
Published: 2021-03-10 09:35:46

---
title: The one valid use for a code coverage percentage
published: true
date: 2021-02-26 00:00:00 UTC
tags: testing
canonical_url: https://jhall.io/archive/2021/02/26/the-one-valid-use-for-a-code-coverage-percentage/
---

After reeling against using a test code coverage percentage to measure the value of your tests, let me offer one small exception.

There is one way in which I find test coverage to be useful: comparing the delta of test coverage against expectations.

Strictly speaking, this doesn’t need to be a measure of coverage percentage. It can be a report of raw lines (or branches, or statements) covered.

The idea is: I don’t generally expect this number to go drastically down (or for that matter, up). If I see a large change in this number, it’s probably an indication that I’ve made a mistake, such as not committing some tests I’ve written, or accidentally disabling tests.

![Sample Codecov report](https://jhall.io/archive/images/coverage.png)

In this example (generated by [codecov.io](https://about.codecov.io/)), I see that I’ve added 6 lines of code, and that I’ve added 6 lines of test coverage. No surprises here. Assuming I wrote the new tests meaningfully, we’re golden!

The risk with adding a tool like this to your test pipeline, is that there then becomes a temptation to use these test coverage percentages the wrong way, and start aiming for an arbitrary percentage again, instead of focusing on meaningful, complete test coverage. For this reason, I only introduce these sorts of tools to teams well _after_ they have learned to stop talking about code coverage percentages.
Repository Automation with GitHub Actions
Tags: github, githubactions, devops
Published: 2021-02-25 23:59:52

My favorite thing to do with GitHub Actions by far is automating tedious tasks using webhooks. GitHub Actions is built on a few developer primitives for users to quickly ship integrations for their repos. Two of those primitives include their API and webhooks. 

## Automating PR reviews.

In a previous post, I shared how you can use the [actions/github-script](https://github.com/actions) to automate events directly in your workflow YAML.

{% link https://dev.to/github/automate-your-pr-reviews-with-github-action-scripting-in-javascript-3en2 %}

## Automating the creation of issues
My team is made of many folks from around the world. To manage our team's weekly stand-ups, we use GitHub Actions to automate our issue's creation. 

```yml
on:
  schedule:
  - cron: 01 13 * * 0
name: Top 5
jobs:
  createAnIssue:
    name: Create an issue
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Create an issue
      uses: bdougie/create-an-issue@e43b083ea71e22e77a81ffb4a55dacb2addb71ed
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        args: .github/ISSUE_TEMPLATE/TOP5.md
```
Using this workflow makes our team syncs more impactful, with the same agenda being automated the generated issues. I encourage you to give it a try while your team is working remotely. 

{% github no-readme https://github.com/JasonEtco/create-an-issue %}

In addition to the above workflow, I have an action that [closes the issue](https://github.com/bdougie/close-issues-based-on-label) on a Friday, and another that [pins the issue](https://github.com/bdougie/issue-pin-by-label) to the repo. There are countless ways to improve your developer workflow through actions. Let me know if you have examples in the comments. Always happy to learn.

_This is part of my 28 days of Actions series. To get notified of more GitHub Action tips, follow the GitHub organization right here on Dev. Learn how to build action with Node.js_

{% link https://dev.to/github/caching-dependencies-to-speed-up-workflows-in-github-actions-3efl %}
My favorite fonts for developing websites
Tags: design, webdev, discuss
Published: 2021-02-25 23:43:31

<span>Photo by <a href="https://unsplash.com/@alex_andrews?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alexander Andrews</a> on <a href="https://unsplash.com/s/photos/font?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>

Here are my favorite fonts to use in web projects:

## Ubuntu Font
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7akhvnj2cqsat3hk9ymd.png)
As the name implies, the Ubuntu font is part of the Ubuntu operating system. I really like this font because of the uniqueness and smoothness. I always download the font and use it as my system font because it's so awesome. It's also free and you can download it from the [Ubuntu page](https://design.ubuntu.com/font/).

## Comfortaa
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/415svgdprbwy3yqc98tf.png)
This is also one of my favorites because of the simplicity of the font. You have to use it wisely as it spaces is not the most accessible of a font.

## Least Favorite Font
Times New Roman is easily my least favorite font. Who thought it would be a good idea to make the most exclusive proprietor font standard in writing papers?

tip: you can find fonts at [fonts.google.com](https://fonts.google.com)

## What are your favorite fonts?
Kali Linux 2021.1 Review and What's New?
Tags: linux, os, beginners, kali
Published: 2021-02-25 23:43:01

---
title: Kali Linux 2021.1 Review and What's New?
published: true
description: Kali Linux 2021.1 Review and What's New?
tags: linux,os,beginner,kali
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/esyvkacno4wjgk2m35hm.png
---

Hello everyone, 

[Kali Linux](https://kali.org) is geared for users who aim to meet the requirements of professional penetration testing and security auditing. It is completely free and has many amazing new features. Today, Kali Linux 2021.1 was released. You can upgrade an existing install or start a new install. 

Several notable new items that I wanted to call out in this release are: 

* Terminals - mate-terminal, terminator and tilix all had various work carried out on them
* Command Not Found - A helping hand to say if a program needs to be installed
* New tools & updates - Multiple new tools have been added to Kali and are ready for you
* Kali ARM - Preliminary support for Parallels on Apple Silicon (Apple M1) & Raspberry Pi 400 
* New Kali website - You may have noticed a few things looking different

I have created a video to show you all of this awesome stuff together! 

Video (14 mins)

{% youtube rfIvTYKn1Bg %}

Conclusion

Stay tuned for [future Twitch streams](https://twitch.tv/mbcrump) as we learn about security and app development or you can watch the condensed version by subscribing to my [YouTube](https://youtube.com/mbcrump). 

Stay connected with me on social platforms for daily software development news.

-[Twitter](https://twitter.com/intent/follow?screen_name=mbcrump) | [Twitch](https://twitch.tv/mbcrump) | [Instagram](https://instagram.com/mbcrump) | [YouTube](https://youtube.com/mbcrump) | [GitHub](https://github.com/mbcrump) | [Website](https://www.michaelcrump.net)
I need people of like mind to work with
Tags: html, css3, bootstrap, python
Published: 2021-02-25 23:33:32

How can I put all over learned into used?

Over the years I've learned a whole lot of things from html to css but I haven't build any project like a website. Please someone should connect me with newbies like me so we can carried out a task a finish it. I want to be more serious about coding now. Inbox me let's begin.
I created a universal theme switcher widget compatible with my SASS framework
Tags: showdev, webdev, design
Published: 2021-02-25 23:26:57

~~~html
<script src="path/to/themewidget.js" charset="utf-8"></script>
~~~

That's all the code it now takes for me to add a theme switcher widget on any of my projects using my [custom SASS Theme Frameworks](https://jadenconcord.github.io/theme-generator).

You can demo it on my [personal page](https://jadenconcord.github.io/) which is a work in progress. The widget is on the bottom-right edge of the page.

It supports a couple of different theme options which I will later add more of. It also has 4 different theme varients to choose from which effect the dark or light theme type.

It works by fetching SCSS resources and SCSS.js to compile to a CSS file. It is far from optimized but it works with only a couple of seconds of delay to update the theme. It also uses the local storage API to store the theme and update it on page load. I eventually want to store the theme across every domain using the widget so it will be like a universal theme.
Natural Flea Remedies For Dogs
Tags: remedies, naturalflea, homeremedy, soapmixture
Published: 2021-02-25 18:49:58

If you are a dog owner, the thought of your beloved pet catching fleas is a persistent strain on your mind. Fleas are small parasites that feed off the blood of animals. They can become a problem in your home, hurting both you and your friend.

Fortunately, there are some <a href="https://home-remedies.com/">natural flea remedies for dogs</a> you can try to help get rid of fleas.

<h2>Dish soap</h2>
This home remedy involves making a flea trap using some water and dish soap. All you have to do is;

• Fill a bowl or plate with a mixture of dish soap and warm water.

• Place it in the areas of your house which host the most flea activity.

The dish soap and water solution acts as glue due to the high viscosity - trapping the fleas and other insects. You should add fresh water and dish soap mixture to the container every day.

This flea home remedy works effectively at night time - because fleas are nocturnal creatures.

<h2>Baking soda</h2>
The use of baking soda in the vacuuming process is known to help get rid of fleas. Baking soda increases the effectiveness of vacuuming and helps to remove fleas from the fibers of your furniture and carpets.

For this home remedy to work,

• Lay down a thin layer of baking soda along with your furniture and carpets

• Take a brush and rub it into the fabric.

• Now, vacuum your home thoroughly, emptying the contents in an outside trash can.

<h2>Salt</h2>
When accompanied by vacuuming, table salt is one of the best natural flea remedies for dogs. It acts as a dehydrating agent and causes the death of adult fleas.

• Take some finely grind table salt and sprinkle it all over your carpets and furniture in each room.

• Leave it to rest for 12-24 hours.

• Vacuum your home throughout and empty the vacuum cleaner into a bag and throw it in an outside trash can.

<h2>Lemon spray</h2>
Lemon is being used in a lot of ways around the house for centuries. Besides an excellent way to treat wasp stings, it’s also known as a great natural home remedy for fleas.

Treatment using the citrus fruit to get rid of fleas consists of making a lemon spray to use on infected carpets and furniture. To make this flea spray;

• Slice two lemons and add to a pint of boiling water.

• Let the solution sit overnight.

• Make sure to filter the lemon seeds and pour the solution into a spray bottle.

Take the citrus solution and spray it on the infested sofas, chairs, and pet bedding. Do not soak, only dampen.

<h2>Neem oil</h2>
Neem oil is an all-natural insect repellent. Being native to South Asia, it is often used to repel biting insects such as mosquitoes and fleas in India, Sri Lanka, and Burma. To use this home remedy;

• Add a few drops of natural neem oil to pet shampoo for <a href="http://bizeebuzz.com/lifestyle/beauty-fitness/hair-care-tips-at-home/">hair care</a>.

• Dilute the solution with dishwashing liquid and make a do-it-yourself flea spray.

• Now, apply this oil solution directly to your dog’s coat.

You can easily find this virgin oil at online stores like <a href="https://www.amazon.com/">Amazon</a>.
Day 317 : It's so hard
Tags: hiphop, code, coding, lifelongdev
Published: 2021-02-25 23:16:39

_liner notes_:
- Professional : Wow, today went by in a blur. Started out answering a question on our community Slack. They said it worked and I was feeling pretty good. Decided to tackle another one. Whoops. haha So I spent pretty much all day going back and forth. Kept narrowing down causes of the issue and it all lead back to one possible cause, but the the person wouldn't give us the info that we needed to figure out if that was causing the problem. They would just keep copying a pasting what they said was going to the call instead of showing us the code that created it. With just that info, it's so hard to try and help. Only thing I could think of was to create a working example of a similarly functioning application to theirs to show that it was not anything on our end and that a likely cause is the thing they don't want to tell us. No clue where to go from there. Also got a chance to sit in on some meetups and talks during the day. All in all, not bad.

- Personal : Last night, I pretty much just went through tracks for the radio show and watched an episode of "Attack on Titans". Time flew by!

![A green field with a hill that has a single tree in Munnar, India](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3z4vstt9p64zfh9rawcd.jpg)

My brain is fried. haha Used way too much brain power to come up with solutions just to get shot down. haha I'll eat dinner and go through some tracks for the radio show and if I feel up to it, do some coding. Tonight may be a chill night.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube eMIzWh1yhCA %}
Problem in vscode while mixing php and html
Tags: php
Published: 2021-02-25 23:12:06

I am using vsccode long ago, but for now, i am getting this issue, this was the issue there when i started the code, but i found this awesome community to ask questions.

whenever i write php, html autocompletes are appeared, and if i code in html, php autocompletes are appearing. I mean php and html autocompletes are intermixing, what should i do to seperate this. I mean all the php autocompletes should work in between <?php ?> and html autocompletes in html area_____ 😊😊

and i asked the same question everywhere, like discord, facebook, stackoverflow, and youtube video comments too, but no solution found
GITty UP!!!
Published: 2021-02-25 22:58:31

What the Git is going on?

So what's a Git? 

If you would've asked me that a couple weeks ago, then I most likely would've looked at you funny. But to answer the question, a Git is a version control system that lets you manage and keep track of your source code history.

Git is installed and maintained on your local system (rather than in the cloud) and gives you a self-contained record of your ongoing programming versions. 

What about GitHub?

GitHub is a cloud-based hosting service that lets you manage Git repositories. If you have open-source projects that use Git, then GitHub is designed to help you better manage them. 

It’s an online database that allows you to keep track of and share your Git version control projects outside of your local computer/server. Unlike Git, GitHub is exclusively cloud-based.

OK next question, what is a Commit? Am I committing to a college or what?

Well, the type of commit we are talking about isn't the commit you might be thinking. 

A commit, or "revision", is an individual change to a file (or set of files). It's like when you save a file, except with Git, every time you save it creates a unique ID that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made.

Youtube Video:
https://youtu.be/BNzeWa7ELCw
Putting Security in DevOps
Tags: podcast, cybersecurity, devops, security
Published: 2021-02-25 22:56:49

Development Operations, also known as **DevOps**, combines practices in software development and IT operations. The goal of DevOps is to make the system development lifecycle more efficient, enabling companies to release faster and more reliably. 

However, one important component that tends to be left out of the DevOps equation is *security*. This is where Development Security Operations, also known as **DevSecOps**, comes in. DevSecOps is the marriage between security and DevOps. Security is made a priority in DevSecOps by being included in the development pipeline and consistently being tested throughout multiple stages in the development lifecycle. 

In our podcast TechNSavvy, my co-host (Emily) and I (April), interview Abdel Sy Fane, a security expert with over 10 years in the field. We discuss the importance of DevSecOps, personal Cybersecurity tips, his Cybersecurity nonprofit CSNP, career advice, and more!

Listen on Spotify, Apple Podcasts, Google Podcasts, and all your other favorite podcast players!
{% spotify spotify:episode:73bvBwAja7Lt3GNBDqJ4Fc %}
The preview…
Tags: php, showdev, wayfinder
Published: 2021-02-25 22:47:56

[Wayfinder](https://www.usewayfinder.com) is something I’ve had in mind for years. This past week I finally bit the bullet and got to work building it.

Simply put, it’s a routing framework for PHP. It takes the URL and routes it to your code. I rarely need anything other than routing, so that’s Wayfinder’s primary purpose. It will grow a little more than that, but not too much.

The documentation is a work in progress, but it’s also an example of how it works. There’s still lots to do but I’m really pleased with these first steps on the Wayfinder journey.
First 10 days 
Tags: beginners, html, css, newb
Published: 2021-02-25 22:42:22

I am 21 years old and up until about 3 months ago I hated computers. I was doing a lot of manual work and now I'm tired of it. Was actually in school to get an HVAC associates. Yes I know, you don't need a degree to start working in the trades, but I have a weird affinity with school as a institution. On twitter and Tik-Tok I've been seeing more people get into coding and web development. The obvious, easiest, and most popular decision to make would be to become a front end dev. That makes sense to me because before all the manual labor jobs I spent most of my time as visual artist. So there's a connection to painting canvases and creating visually astonishing webpages.  

On February, 15th I bought a Macbook pro and setup VScode on my computer. (No you don't need a new computer but the laptop I had was used by my cousins girlfriend when she was in college and she graduated in 2013) I made the usual static webpage using HTML only and even added a few colors with tags and attributes I picked up off the many youtube crash courses I've watched. I'm learning new things like how to add forms, links, buttons, images and fonts. All the beginner stuff, but I'm starting to struggle with how to remember it all. I find myself going to other projects I've completed and copying and pasting what I need into the new project. 

I bought a HTML/CSS book to follow along with, and it gives you the information to complete 4 projects. A personal page, landing page, photo gallery and portfolio page.

There are obviously challenges that I'm going to face on my journey, and I'm ready to fight through them.
Check out this awesome documentation generator I made
Published: 2021-02-25 22:19:03

A few days ago, I was so tired of browsing the internet for documentation platforms! (Hey, everyone gets bored after spending 3 hours on google trying to look for *something*)
I am aware of readthedocs and gitbook.

So, I decided to make my *own* documentation generator in pure JS (no dependencies). 
It's a single page app, and I wanted a few users to try it out (so I could, you know, get feedback :wink: ) 

Check it out here: https://manuthecoder.github.io/docjs/
GitHub: https://github.com/manuthecoder/docjs
Sapper, Discord OAuth, Supabase and TailwindCSS starter template
Tags: sapper, discord, supabase, tailwindcss
Published: 2021-02-25 21:59:01

Hello 👋

I've just released a quickstart template including Sapper, Discord OAuth, Supabase and TailwindCSS for your next Discord web app.

You can find it here:
https://github.com/msyyn/sapper-discord-supabase-tailwind
Create Event Form Won't Save & Route (Angular 2)
Published: 2021-02-25 21:18:02

I have been following the Pluralsight course now for the past 3weeks but just recently I got stuck at the create event topic, my form won't save to the save and route to the event list page.


I have watched the course over again from the beginning up to the form validation topic, but I'm still stuck with saving the event and routing to the event list.

Pls, help me what can I do?
To Curly Brace is to Block
Tags: blockscope, javascript, beginners, globalscope
Published: 2021-02-25 21:08:02

{% spotify spotify:track:2q5vF4iyk4JtNa4T3aZfNk %}

I've wrestled with making this blog post(let alone my first one!).

__I'll be briefly discussing global and block scopes__, with more an emphasis on the block scope. Why did I wrestle(a match I clearly lost) with this? To me, seemingly to others but not myself, block scoping was a very basic component of JavaScript.

Look, I've visited global and block scopes before, in fact in a boot camp I left I was taught it. Do not ask me why but I did not understand it when it was taught. It may be I'm not good at soaking in ideas as I listen to them but rather need to be able to implement them at my speed. To that end, Codecademy has been a huge boost.

{% jsitor https://jsitor.com/embed/KGdK0m9D_ %} 

Here's a bit of code, the **global scope** is everything **outside** curly braces. Literally everything **in** the curly brackets is block scope. 

Think of it this way, "_const twitter = '@mynameissalah'_" is an h1 tag & everything in curly brackets is the css for the h1. That is to say, the curly brackets much like the css both respectively add a functionality to the parent they are assigned to.

I hope this helps at least one person! I feel like I was the outlier who didn't understand this easily while others seemed to—until it clicked & it was wildly simple. I don't learn as easily as most people & if that's you as well, hi! Wishing you the best in your learning, be easy on yourself. :]


#####*if I've made any mistakes or made things potentially confusing PLEASE contact me to correct me. I am by no means a teacher, I'm still learning so please let me know!
Data Loading Animation with HTML & SCSS
Tags: scss, html, keyframes, loading
Published: 2021-02-25 20:46:11

Hi all,

I want to share with you a Loading Animation I did for a Data Loading use-case, in the company that I work for.

I did this animation roughly 3 years ago, and the reason I want to share is my approach of using SCSS and configurable variables to adjust the speed, colors, and other components.

I tried to write self-explanatory code, so it would be easy to extend or have further manipulations there.

Feel free to play with it.
Any feedback would be appreciated.

P.S. The HTML is a bit messy due to SVG's inside. With a bit more effort. All the components would be achievable through CSS.

{% codepen https://codepen.io/ArdianPerlaska/pen/QMggYy %}