teleren/devto huggingface dataset:
The Epic Apple Tax
Published: 2020-11-10 15:10:05

Earlier this year something outrageous happened. Epic Games, the creators of the immensely popular game Fortnite, sued Apple. What led to this?  Why sue the company that controls the platform that so much of your userbase is derived from?  Money of course!

Before the lawsuit began, Epic Games had stepped around one of Apple's rules regarding in-app payments by encouraging users to buy in game currency and items directly from Epic rather than in app. They did this by offering a discount to users who directly purchased from them but notified iOS and Android users they would not receive the same discount since Apple and Google both took percentages from the top. Apple stands firm that all payments in apps must go through their own payment service.  This ensures safety of information, adds security to the apple ecosystem, and grants peace of mind to iOS users. Or so Apple claims.  In reality, payments can be processed just as safely using outside sources.  The problem with that is, Apple wants their cut of the revenue from the app. What's their cut?  A cool 30% of all revenue. For any app developer, losing a third of your potential revenue right from the get-go can be a tough pill to swallow, and if you are relying on this potential income, you have to settle for a lot less than you should be receiving.  Furthermore, if you want to offer an application to users on iOS, the only way to do so is to pay the annual developer fee, own a Mac to be able to develop for the platform, and then list it on the official App store. There are no real alternatives to this process. With Apple having complete control over their app store, with no other stores available for iOS,  they have created a monopoly of their ecosystem and this is at the heart of Epic Game's lawsuit against Apple. Don't think that Epic Games is pursuing this lawsuit for selfless reasons either, though it may have great effects for smaller developers.  Remember, thirty percent of a billion dollar franchise like Fortnite equates to hundreds of millions of dollars.  In response to the lawsuit, Apple has pulled Fortnite from the App store.  It seems until this suit is settled Fortnite will not be available to iOS users. 

Epic Games CEO Tim Sweeney largely claims "Apple has locked down and crippled the ecosystem by inventing an absolute monopoly on the distribution of software, on the monetization of software."  This is further evidenced by Apple's refusal to allow Microsoft's own game streaming application on the App store.  At least Android users can experience the application from the Play store. 

This lawsuit is unlikely to be settled anytime soon as it seems Epic Games is in it for the long haul.  Hopefully in the future, however, developing an application for iOS wont be so tricky.  The next court hearings are scheduled to begin in May 2021. According to statscounter.com iOS currently has just over 60% of the cell phone market share in America.
Software Development 101: Source Control
Tags: codenewbie, beginners
Published: 2020-12-06 17:28:30

[Note: This post does not include any affiliates link, just a free course link at the bottom]

As a software developer, one of the things that you need to deal with on a daily basis is Source Control. Source Control is the tool that if you are not using you are wasting your time and not deliver high-quality products.

##What Is Source Control?
In short words: A tool that you use to keep track of your code versions. Your code will always change and grow, and it will never be the same as you start. To maintain your code and even to share your code with others you use Source Control.

Source Control is a powerful tool that will help you get ahead. You will be able to manage the program and the code features via it. Also, for example, if you are in a large team and you want to share your code with others they will be able to see your code and use it and even modify it. The best thing, you will be able to go back to older versions of your code. So if by accident remove something you can retrieve it from Source Control.

##How Important is Source Control?
Very Very important, if you are not using it you are reinviting the wheel like a lot. Also, it is for free and would not cost you or your team anything. 

##Git
One of the most popular and well-known Source Control out there. And I use it for each project I create. You can [Download](https://git-scm.com/downloads) the client from here. The client will help you setup a local repository and use it. But, a better option is to check out online sites such as [GitHub](https://github.com/), [BitBucket](https://bitbucket.org/) and [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/)

##TFS
It is a well known Source Control and is used mostly with .NET applications and also you can use it with other languages. It has most of what Git offers but it has tighter control over files.

##Git Demo
It is very easy to create a repository that contains your code in Git and put it online either as a public or private repo to share an open-source project or to collaborate with others. We will use [VS Code](https://code.visualstudio.com/). Make sure Git is installed on your machine.

Open VS Code and open the command palette. Select 'Git: Initialize Repository' command and select a folder that you want to use as the repo folder.

After that, add any file to the workspace. Notice that the file is colored in Green to show you that it has been add/changed.

After that, go to the Source Extension and click on the Tik sign above to commit your changes. You will need to input a message just as a description of your work. After that, you will be able to add and edit the file while having different versions from it.

We hope you enjoyed this post, please Heart it and follow us.

If you a new software developer, join our free course to help you get started
https://landing.advancedsoftware.io/software-developer-guide
DAY 6 - Advent of Code 2020 w/ GoLang
Tags: go, adventofcode
Published: 2020-12-06 17:19:56

---
title: DAY 6 - Advent of Code 2020 w/ GoLang
published: true
description: AoC 2020 Day6 solutions in GoLang
tags: golang, discuss, AdventOfCode
series: Advent of Code 2020
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gb6jnhz1didpnth3pbsw.jpeg
---

**DAY6:**
Ooooohh the loops. So, I'm not sure if there are built-in functions or packages in Go that would've been helpful with some of this set-evaluation. If there is, let me know! But, I don't believe there is since I also had to write my own `slice.contains()` method since that doesn't seem to be a built-in.

I found it helpful to make a `rune:int` map per group in part 2 for tracking the answers.

```golang
package days

import (
	"fmt"
	"strings"

	inputs "../inputs"
)

// Six : advent of code, day six part1 and 2
func Six() {
	input := inputs.Day6

	groups := strings.Split(input, "\n\n")

	totalUniqueYesP1 := 0
	totalUniqueYesP2 := 0

	for group := range groups {
		people := strings.Split(groups[group], "\n")

		uniqueYesInGroup := []rune{}

		groupAlphaMap := map[rune]int{
			'a': 0,
			'b': 0,
			'c': 0,
			'd': 0,
			'e': 0,
			'f': 0,
			'g': 0,
			'h': 0,
			'i': 0,
			'j': 0,
			'k': 0,
			'l': 0,
			'm': 0,
			'n': 0,
			'o': 0,
			'p': 0,
			'q': 0,
			'r': 0,
			's': 0,
			't': 0,
			'u': 0,
			'v': 0,
			'w': 0,
			'x': 0,
			'y': 0,
			'z': 0,
		}

		for person := range people {
			personToRune := []rune(people[person])

			for answer := range personToRune {
				groupAlphaMap[personToRune[answer]]++

				if !runeSliceContains(uniqueYesInGroup, personToRune[answer]) {
					uniqueYesInGroup = append(uniqueYesInGroup, personToRune[answer])
				}
			}
		}

		allSaidYes := 0

		for k := range groupAlphaMap {
			if groupAlphaMap[k] == len(people) {
				allSaidYes++
			}
		}

		totalUniqueYesP1 = totalUniqueYesP1 + len(uniqueYesInGroup)
		totalUniqueYesP2 = totalUniqueYesP2 + allSaidYes
	}

	fmt.Println("(Part1) Sum of unique answers from each group: ")
	fmt.Println(totalUniqueYesP1)
	fmt.Println("")
	fmt.Println("(Part2) Sum of unique answers each person in group answered YES: ")
	fmt.Println(totalUniqueYesP2)
}

func runeSliceContains(s []rune, r rune) bool {
	for _, a := range s {
		if a == r {
			return true
		}
	}
	return false
}
```

[Link to Github source file](https://github.com/dizveloper/AdventOfCode/blob/main/2020/days/day06.go)
Release 0.4 Part 2: Small progress is better than nothing
Tags: opensource
Published: 2020-12-06 16:43:04

At least I'm getting something done right? 

So this will be a smaller blog post than most of my larger posts I've written up until this point. It's mainly just a status update on what I've done until this point.

Last time, I mentioned I was going to attempt to port 3 components from gatsby to next, something that I think will be good practice for myself. The components themselves were what I found hard working with, however. It was figuring out how I was going to test them out and make sure they worked. I knew if I made a PR with what I had right now, that it would fail automations, including the new ones setup for next. So I was hesitant on continuing on. 

Another issue I had was that my components also relied on other components existing in order to work. A good example is the Banner component, which pulls the telescope url from a graphql query. I could just paste the url and grab the data I needed and that would be fine, but I didn't want to break any design choice in the code, especially since what I made would be shown on the official next frontend when the port was complete. I asked the slack what I should do about this and I got a response that made me feel much better about this problem:

![Response to question](https://dev-to-uploads.s3.amazonaws.com/i/984ifkpxc1uk6fiiub67.png)

Thanks to Tony for clearing that up btw. So what I'll probably end up doing is making sure that the styles are being used properly, then test them on the next index.ts page before finally making a commit and PR. Bugs will inevitably occur, after all, this is a transition from a code base that was made last year into a new code base with a different frontend engine and language. Hopefully, this poses no problems. 

I should have my PR up by the end of this upcoming week, no promises though with this week being final exam week too. I know it won't be perfect, I have limited experience with Typescript, so I'll have to make some changes even after my PR is made. The way I see it, it's a marathon rather than a rush. 

Next time, the final blog of DPS909. What a semester it's been. Both ups and down were recorded here. Soon, we'll know whether my work was worth it or not! Until next time, stay tuned!
Managing freelance project as solo developer.
Tags: management, productivity, codenewbie, cowboy
Published: 2020-12-06 16:33:09

So, you convinced a client and bagged a project. You're really excited about this project and ready to dive into code.
But wait, Hold your horses. Diving directly into code is not a good idea especially when you are new. 

### Here are some tips to start your project:

#### 1. **Write a Project Proposal**: 
A project proposal is very important before beginning the coding. 
**Why?** Because it documents the deliverables, basic functionalities, estimated time, estimated cost and a description of the project. 
**Any Problem here?** Yes, before specifying the deliverables, you must make sure you have the skills and tools to deliver those. We all learn continuously, but you should not promise something which you have never done before. Basic functionalities are tricky, some functionalities require much more effort than others. Try to keep them as level as you can. The most tricky part is estimation of cost and time. For this part, you need prior experience of something similar. Only then you could predict closely.

#### 2. Prepare a basic structure of the project:
You have to divide the project in multiple parts, where each part is independent as much as possible. Do this recursively to each part until you get file level granularity. 
**Why?** Because without such vision, your project would most likely fail to finish on time. 
**Any Problems Here?** Yes, You would surely miss something (probably many things). Still, some vision is better than no vision. With such vision, future increments will be easier.

#### 3. Always use source control:
Whether you like GitHub, GitLab, Azure DevOps or some other service, but you should use source control. Always maintain a main/master branch where your code is properly tested and working. Do all other enhancement in another branch and merge on successful testing. 
**Why?** If your code breaks on some change and you forgot the change, you will have something to fallback and start again. 
**Any Problem Here?** Most of new developers find it to be unnecessary overhead. But if you really do it, it will help you out.

#### 4. Use a Project Management Tool:
Adding issues, assigning yourselves, working on them and closing them. This would look like waste of time at first. But this helps in the development a lot. 
**How?** By tracking issues and continuously adding them, you can estimate the time and effort required in the project. Your knowledge about the timeline grows and you will be better equipped when the next project comes. 
**Any Problems Here?** Keep the issues as unit as possible. Big features should be milestones and issues are the stepping stones to reach there.

Solo development is difficult, you will loose the motivation sometimes, especially when you see no sign of progress. Hence, follow these tips to see the progress and the vision as well.
lstree: list directory in structured format
Tags: bash, beginners
Published: 2020-12-06 16:20:22

Snippet called `lstree`

```
function lstree(){
    ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/';
}
```

Put this in your `.bashrc` or `.bash_profile` and this will give you a directory breakdown that looks like this:

/my/folder> lstree

   |-data
   |---nginx
   |-----cache
   |-etc
   |---default
   |---nginx
   |-----conf.d
   |-----sites-enabled
   |-----sites-templates
   |---ssl
   |-----certs
   |---varnish
   |-----html
   |-----lua
   |-provision
   |---mysql
   |-----init
   |-usr
   |---local
   |-----etc
   |-------docker-original
   |---------php-fpm.d
   |-------php
   |-------php-fpm.d
   |-var
   |---lib
   |-----mysql
   |-------mysql
   |-------performance_schema
   |-------sys

Remember to re-source your bash file after adding it:

```
source ~/.bashrc
```
Now What Do I Do?
Tags: programming, dotnet, codenewbie, discuss
Published: 2020-12-06 16:16:55

Earlier this year, when the pandemic started, our county was put on lockdown for a good while.  As I worked in a hospital, I worked every day, but we couldn't do anything else.  So, I started earnest work on one of my goals to get my programming skills in order and learn a few new things.

I've spent most of this year sharpening my C/C++ skills (C mostly.  C++ not so much), and learning C# with .NET Core. Recently, I've also added in learning some GTK#, GTK+, and OpenGL.  I've also spent the year learning how to work with Raspberry Pi computers.

 I am now at that point that I can comfortably sit down and write a good part of what I want without going to Stackoverflow every five minutes.  I consider that a decent accomplishment.  I've also worked on some projects of my own.

But, I've discovered a problem.  While I may know what to code, I don't know what I SHOULD code.  Even in the projects I've undertaken, once I get the basic function down, I get bored.  I know where the end game is in my head and can't seem to get enough 'umph' to trudge through and finish it out.

I don't want to develop just another web app, web site, or application.  Just about all of that I can find within easy reach of the Internet or Linux's repositories.

I'm not a professional programmer, so I'm not pushed to find a job.  I have one of those and it's decent.  I would like to develop things that aid my job, but bosses in my profession don't like to have someone create something that everyone else can't work on.  I'm the only one at my job that can code and there aren't any coming behind me.

So, in this thing I'm doing for myself, I've got to figure out where to next.  Nothing new.  That seems a part of life. 

So, what do I do now?
Kaffy - Admin Interface for Phoenix Applications
Tags: elixir
Published: 2020-12-06 16:16:40

If you are using elixir right now, chances are that this isn't your first programming language that you have used to build your apps. Probably you are coming from other programming languages such as Python, Java, C#, Golang, etc. Speaking of this, anyone coming from Python or at least has used Python as their main programming language to build your apps? I am one of these people.

As most people already know, the most used web framework in Python is Django. One of the Django's feature that I love the most or I think is unique is the Django admin interface. It provides you with a web interface where you could perform CRUD operations over you applications data out of the box. This is really useful especially if you or someone are trying to test your application and need to have a way of preparing a mock or test data quickly.

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

Unfortunately there isn't a similar feature in Phoenix nor a third party module that allows you to have this kind of admin interface, at least when I first use elixir. However, there is one now and I feel there are still not many people know about this tool in the elixir community. I thought this tool deserve more recognition so I decided to let people know about it through this post.

# Kaffy

Kaffy is a tool that is inspired by Django admin that allows you to have a simple, flexible, and customizable admin interface in Phoenix application. With some minimal configurations, it ables to understand your application schemas and then make a CRUD page out of it.

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

I won't deep dive to much into how to use or set it up since it's pretty much documented in its [GitHub repo](https://github.com/aesmail/kaffy) but in summary not only it makes a CRUD page for your schema but it also enables you to:
* Create a custom dashboard page with widgets.
* Create a custom static page.
* Register your own scheduled tasks.
* And more.

Not only that it provides a similar functionality just like Django admin, but I personally think that the admin design looks much more pleasant in Kaffy :D.

# Original Creator

First of all I didn't create this tool. I am just a guy who thought that this tool has a potential to be used by a lot of people in the future so I decided to share it. I originally found this tool around August 2020 from the following [post in elixirforum](https://elixirforum.com/t/kaffy-a-quick-and-flexible-admin-interface-for-phoenix-applications/31355). In that post you could find who is the original creator and some points that encouraged the creation of Kaffy in the first place. I encourage you to check it out since it contains a lot of information about the tool it self. Last but not least, Kaffy is pretty much new and it is still actively developed by people. If you are interested, maybe you could contribute to its [GitHub repo](https://github.com/aesmail/kaffy) and help make it a better tool for the elixir community to use :). Cheers ~
Make a JavaScript password strength checker
Tags: html, css, javascript, cwb
Published: 2020-12-06 16:10:26

Password strength checker is made with HTML, CSS and JS. They are usually used to check the strength of a password. It is very useful and Important as it can check the password strength for You, you can also use it by copy-pasting the code from my site.
<a href="https://codewithbishal.com/example/password-strength-meter-using-html-css-javascript">View it on our website</a>
View More :
<ul>
<li><a rel="nofollow" href="https://codewithbishal.com/example/create-a-sortable-list-with-draggable-items-using-javascript">How to Create Draggable Lists with JavaScript</a></li>
<li><a rel="nofollow" href="https://codewithbishal.com/example/validate-email-address-using-javascript">Email validation using JavaScript and Bootstrap</a></li>
</ul>
At first, on our webpage, there is the overview of our blog then there is the example of our count-down timer. There is a button to copy the codes (HTML, CSS, and JS).

You can view and copy the source code files through the link given below. <a rel="nofollow" href="https://codewithbishal.com/example/password-strength-meter-using-html-css-javascript">View and Copy Source Code</a>
Creating Headings in Google docs
Published: 2020-12-06 16:09:45

Let’s assume you are writing a book. And you need to divide your content in chapters. You will need multiple size headings.
Let’s see how we can create different size headings in google docs
Steps
**1. Open Google drive(drive.google.com)**
**2. Open the doc in which you want to edit**
**3. Select the text**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rdz48gpgbfc9naprdr47.jpg)

**4. In the style menu, it says Normal Text. We will change it to heading(Heading 1, Heading 2..)**

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


**5.You have done everything correctly. Now this Normal Text will be converted to a heading.**

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

If you want, you can the font size, text color, background color of this heading now.
Don’t forget to leave a heart for the post.
S3E7 Learn JMeter Series - If Controller
Tags: performance, testing, tutorial, webperf
Published: 2020-12-06 15:56:23

Welcome to Learn JMeter Series!

In this Season 3, Episode 7, you will learn following:

🔹 If Controller

{% youtube K-P72wPUc_0 %}

☑ Buy me a tea 🍵 : https://www.buymeacoffee.com/qainsights
☑ [My Blog](https://qainsights.com)
☑ [My Udemy Course](https://www.udemy.com/course/performance-testing-using-truweb)

{% github QAInsights/Learn-JMeter-Series%}
Approaching 100% code coverage in a healthy way
Tags: testing, tdd
Published: 2020-12-06 15:52:24

One question the always comes to my mind in the discussion about code coverage is: What does the percentage refer to, anyway? This is probably a stupid question. It seems to be common sense that it is the whole codebase. But does it really have to be?

What is the value of code coverage, again? I like how Martin Fowler puts it in [his article on this topic](https://martinfowler.com/bliki/TestCoverage.html):

> Well it helps you find which bits of your code aren't being tested.

Finding these bits is easier when there are only few of them. And with that I mean: few in the coverage report. Your codebase may have a lot of untested bits and that's okay. There are things you shouldn't test, anyway[^1]. To get rid of the noise, you just have to follow a simple process:

**For every untested bit, you have to decide: Is this testworthy? If it is, write tests (or at least acknowlege that you *should* write tests for it). If not, exclude it from the coverage analysis.**

For some people this is cheating, but I'd rather call it focusing. I don't need to be reminded of code that I'll never write tests for. Working this way allows you to reach 100% without writing tests that provide no real value. But even if you don't, it leaves you with a better picture since you actively decided on whether something should be tested or not.

[^1]: Personally, I do not see much value in testing stuff like getters/setters, generated code or simple data mapping. You, your project and/or team may have other standards and that's fine.