teleren/devto huggingface dataset:
Dilemma over safety and privacy
Published: 2020-09-14 03:58:08

Recently, TechCrunch released an article detailing the usage of a mandatory, location-tracking application for students of Albion College in Michigan. Aura is an app developed with the aim to automatically alert school officials when a student was resulted in positive for COVID-19 and alerts other students if they had come into close contact with said individual. However, for this functionality to work, it tracks student's locations around the clock.

This, in itself, would cause concern unfortunately. Furthermore, there were also at least 2 security risks within the app. As a result, some students on campus felt reluctant to return, as this privacy-invading application was mandatory for all students. In fact, when Korea’s way of counteracting against the pandemic via GPS tracking was known to the world, majority of the countries showed concerns about the very problem: privacy invasion.

However in time of crisis like now, people need to let down something for the sake of humanity and thus I’d be compliant to this. For one, thanks to the tracking system and the citizens cooperation with KDCP(Korea Disease Control and Prevention), Korea managed to mitigate the pandemic and keep the country under control. 

## Privacy Concern
While I do say that, I do understand the risks of using Aura. For one, the app is intrusive, ... only intrusive. Full time GPS tracking in the past was only required for house arrest. I'm sure there is someone around us who would be absolutely intolerant about this. 
Frankly, this wouldn't be too much of a serious problem if the programming of the app is flexible and manageable. However, the real issue that I see from reading the article is that the management of Aura aren't as responsive as others would desire. 

## Diagrams
We have updated COVID Risk diagrams! We even have a physical diagram now. 
# Conceptual
![COVID19 Con](https://dev-to-uploads.s3.amazonaws.com/i/4n4r5nuxhe3mnwl7k06w.jpg) 

# Physical
![COVID19 Data](https://dev-to-uploads.s3.amazonaws.com/i/us6gzf9kwtjo6xmhxkdz.png)

{% youtube 3EnPlQWk7Y8%}
A Privacy Invasion and Physical ER
Published: 2020-09-14 03:54:10


## COVID-19 VIOLATIONS!!
With the current COVID-19 pandemic, ideas for how to prevent the spread and limit exposure are being issued left and right. With schools opening back up again, many wondered how safe it would be for students to return to live on college campuses. There are right ways to handle the situation and wrong ways. A small private college in Michigan, Albion College, may have crossed a line. Their response to the pandemic was to make students download a contract tracing app known as Aura. This app was required to be downloaded by all students who attended the college and refusing would result in a suspension from the college. While contact tracing apps can be helpful, this one in particular tracked students' locations in real-time. The controversy comes from those who feel that collecting and storing students location was an invasion of privacy. The app would even inform the college if you left campus and would proceed to lock your access to the campus facilities.

## My Thoughts...
Being a student at Penn State myself I too consider this app to be way too intrusive. I understand that the college had good intentions in using this app, but I would not be comfortable with my college knowing where I am at all times. If Penn State were to implement a protocol similar to this, I for sure would not accept that. I would sooner take the semester off, than sign away my privacy to the university like that. While I understand the tremendous threat of COVID-19, tracking students at all times is not the answer. I'm all for being safe and cautious in regards to the virus, but I would consider this invasion of privacy a greater threat than the virus. If colleges felt that the threat was so high that they'd require an app like this, then I believe it would make more sense for colleges to remain closed.
I think that for any students that are living on campus, a more ethical approach would be weekly testing of ALL students and staff. If one tests positive, then move them to a designated place for them to be treated and quarantined. If you were to feel that something like this tracking app would be beneficial to the safety of everyone, then maybe you'd be better off just staying home for the semester. Sanitation and safety are crucial at the moment, a line needs to be drawn. And having real-time access to every students location is not the answer.

##### --Enough with that story, now here are my ER diagrams--

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

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


## My Video
https://www.youtube.com/watch?v=e9ipStaUnOY&feature=youtu.be
Connection speed test using command line
Tags: speedtest, cli, ubuntu, mac
Published: 2020-09-14 03:53:10

Internet connection speed tests are abundant online, sure you can open a new browser tab and run a speed test but what if in the middle of working in your command line you can quickly check your connection speed and see if you have connectivity issues.

It is cool, efficient and of course possible, there are a lot of utilities on the web but I will be sharing the one from [speedtest.net](https://www.speedtest.net/apps/cli) because it supports the following systems:

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

Let's try setting it up on a macOs terminal, you can view other installation options for other systems [here](https://www.speedtest.net/apps/cli):

```
$ brew tap teamookla/speedtest
$ brew update
$ brew install speedtest --force
```

Once the scripts above are finished running. You can run the test with the following command:
```
$ speedtest
```

It will render the server it connected to, your ISP, latency, download and upload speeds, packet loss and the result URL if you wanted to save, share or view in on the web.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8t793ss8ydfmzkkzh9s8.png)
ReactGA Custom Hook
Tags: react, javascript, analytics, reactga
Published: 2020-09-14 03:48:56

---
title: ReactGA Custom Hook
published: true
description: Create a custom hook to simplify ReactGA integration
tags: React, javascript, analytics, reactga
---
###First install ReactGA
`npm install react-ga --save`

After install, add `react-ga` in your project, you can do the configuration whatever you want, here is just an example in `index.js`.
```js
import React from 'react';
import ReactDOM from 'react-dom';
import ReactGA from 'react-ga';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactGA.initialize('UA-#########-#');

ReactDOM.render(<App />, document.getElementById('root'));
```

###The hook code
The hook code folder/file example `utils/googleAnalytics.js`.

```js
import { useEffect } from 'react';
import ReactGA from 'react-ga';

export const makePageView = (pageName) => 
 ReactGA.pageview(pageName);

export const useAnalytics = pageName =>
  useEffect(() => {
    makePageView(pageName);
  }, [pageName]);
```

###Using in some component

```js
import React from 'react';
import { useAnalytics } from 'utils/googleAnalytics';

const SomePageComponent = () => {
 useAnalytics('some-page');
 return(...)
}
```

###Tests
To make sure that your tests don't break, add this `clearAnalytics` function.

```js
export const clearAnalytics = () => {
  ReactGA.initialize('dummy', { testMode: true });
  ReactGA.testModeAPI.resetCalls();
};

describe('SomePageComponent test', () => {
  beforeEach(() => {
    clearAnalytics();
    ...
  });
```

###Why do it that way?
Doing it this way can be a bit more work, but we can have more control and add specific behaviors for the component, for example I would like to make a metric of how long the user stayed on the page, we could put this treatment in the unmount of our hook who will know when the component is unmounted.

```js
export const useAnalytics = pageName =>
  useEffect(() => {
    makePageView(pageName);
    return () => getPageTime(pageName);
  }, [pageName]);
```
###Conclusion
The possibilities of increasing this hook are almost endless, I demonstrated it this way because I found it simpler, I hope I helped in something.
How to Get mp3 file's Durations with Python
Tags: python
Published: 2020-09-14 03:48:23

---
title: How to Get mp3 file's Durations with Python
tags: python
published: true
---

How to get durations of mp3 files are two ways.
One of them is using mutagen, the other is using pysox.
Each method has its own advantages and disadvantages.

The way using mutagen is lightweight, and faster than the way using pysox.

That's why mutagen just checks ID3 tag of mp3 files. The other hand, pysox seems to check binaries of mp3 files through Sox CLI.

The pysox method allows us to determine the duration without using ID3 information, i.e. to recognize files with invalid ID3 information or files without ID3 information. Using pysox, you can find out the duration of a file without using ID3 information, i.e. you can detect the duration of a file with invalid or no ID3 information.

## The mutagen way example

```python
from mutagen.mp3 import MP3

def mutagen_length(path):
    try:
        audio = MP3(path)
        length = audio.info.length
        return length
    except:
        return None

length = mutagen_length(wav_path)
print("duration sec: " + str(length))
print("duration min: " + str(int(length/60)) + ':' + str(int(length%60)))
```

## The pysox way example


note: pysox needs SOX cli.

```python
import sox

def sox_length(path):
    try:
        length = sox.file_info.duration(path)
        return length
    except:
        return None

length = sox_length(mp3_path)

print("duration sec: " + str(length))
print("duration min: " + str(int(length/60)) + ':' + str(int(length%60)))
```



{% stackoverflow 62547975 %}
Michigan College is Tracking its Students With a Flawed App -- Is This an Intrusion of Privacy? -- COVID RISK DATA MODELS
Tags: privacy, tracking, app
Published: 2020-09-14 03:48:16

[Here](https://techcrunch.com/2020/08/19/coronavirus-albion-security-flaws-app/) is the article!

#**Is this Intrusive or Necessary?**
In my opinion, a version of this could be used successfully with not as much intrusion as the current app has. So at its current state, I do believe this is too intrusive. I don't think it is right that the college can know exactly where you are at any point, though I do understand why they are doing it like this, I would not want to be tracked in this way myself.

#**Would I Accept this at my College? (Penn State)**
This question is interesting because I am bound to say yes I would accept it at my college. I feel like it doesn't concern me too much to the point where I would end up leaving Penn State in rebellion to the tracking of data. So yes, I would accept this, would I agree with it completely? No, not at all...

#**Is Privacy of data more Valuable than Safety?**
In a sense, the privacy of data is safety. So yes I do think that the privacy of data is more important than a possible outbreak of COVID19, especially when the people being affected would mostly be college students. If there was a data breach and all of this private data got out people could be hurt a lot worse than any other form of harm.

#**Envision more ethical ways of solving this issue with tech?**
A more ethical way for this would be to have a couple of different forms of the app. Don't make it mandatory for everyone to use it, you could make it available for people who deem it necessary and have a less intrusive form of testing and tracking for those who feel violated by the original app. 

This "new" app could be just a form of a dashboard, kind of like PSU has. It has all the cases and case numbers for tests distributed but doesn't actually intrude on personal information and privacy.

###**Extra pictures/videos:**
Below you will find updated COVID tuples and ER Diagrams from my last week's post.

###COVID Tuples:
![Covid Tuples](https://dev-to-uploads.s3.amazonaws.com/i/j5t6ouv2uql6zkcqq9om.png)
###Conceptual Risk Factors:
![Conceptual Risk Factors](https://dev-to-uploads.s3.amazonaws.com/i/jo7h0s0ndxujdu6zo0j0.png)
###Physical Risk Factors:
![Physical Risk Factors](https://dev-to-uploads.s3.amazonaws.com/i/1kwwbkc7xvg56h8a6q0f.png)

###Supporting Youtube Video:
{% youtube 1EXp13cyNho %}
How to do logging in  java using log4j api, best practices and tips
Tags: java
Published: 2020-09-14 03:44:50

---
title: How to do logging in  java using log4j api, best practices and tips
published: true
description: We talk about logging in general and the different levels used in java and then we talk about the log4j logging API and how to set it up for writing files, logging to console, or doing a custom setup. We also talk about different frameworks and best practices.
tags: java
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/yd0wot7b39zccbsm8sb9.jpg
---

{% youtube uco-a7c6U8w %}

We talk about logging in general and the different levels used in java and then we talk about the log4j logging API and how to set it up for writing files, logging to console, or doing a custom setup. We also talk about different frameworks and best practices.
The Line Between Privacy and Safety
Published: 2020-09-14 03:40:38

Hi all, and welcome to my third blog post! In this post I'll be talking about my thoughts on *"Fearing coronavirus, a Michigan college is tracking its students with a flawed app"*, an article published on TechCrunch. Following that will be this week's video, which is a deeper dive on my ER Diagram I shared last week.

##TechCrunch Article

While I understand the university's concern with where the students are and what they're up to, I definitely think this is too extreme. I think they can regulate student's actions in different ways besides directly tracking students real-time location, especially using a service that doesn't seem to have the security it needs.

I would not accept this here. I already decided to take my classes remotely this semester, and if this were happening at Penn State it would've only made my decision easier. 

I think safety is very valuable, but only up until a certain point. The fact that multiple security vulnerabilities had already been found before students even returned to campus is a big red flag to me. I wouldn't be willing to sacrifice my privacy for safety that could be obtained from other means.

One way of solving this issue with tech is using bluetooth. Using bluetooth, you could tell when students have been in contact with each other without tracking their specific location. Another way to solve this issue is to have students remote learn before starting class in person. One university I know of had students quarantine while taking remote classes on campus for two weeks.
How to write the original IP in the Apache log even via Cloudflare and Google Cloud Load Balancing (GCP LB)
Tags: cloudflare, gcp, apache
Published: 2020-09-14 03:07:28


Follow the Cloudflare Document below.

Restoring original visitor IPs: Logging visitor IP addresses with mod_cloudflare
https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs-Logging-visitor-IP-addresses-with-mod-cloudflare-


And then, Add `35.191.0.0/16` and `130.211.0.0/22` for CloudFlareRemoteIPTrustedProxy.

```Apache
<IfModule cloudflare_module>
    CloudFlareRemoteIPHeader X-Forwarded-For
    CloudFlareRemoteIPTrustedProxy 35.191.0.0/16
    CloudFlareRemoteIPTrustedProxy 130.211.0.0/22
    CloudFlareRemoteIPTrustedProxy [your load balancer’s IP]
</IfModule>
```

After restart httpd, You will see the original visitor IPs on your apache access logs.


FYI: GCP Document of External HTTP(S) Load Balancing Source IP addresses
https://cloud.google.com/load-balancing/docs/https#source_ip_addresses
Covid 19 College Tracking App
Published: 2020-09-14 03:04:15

A college in Michigan, names Albion College required students upon two weeks of arrival to download an app made to help tackle and track corona outbreaks on campus. The app lets the college know when a student tests positive along with a feature that gives students access to scheduling tests. However the backlash of the app came with the catch that the app tracks students locations at all time and students are required to have it on their phone. 

I think parts of this app are intrusive while other parts are necessary. The feature that allows Albion to keep track of how many cases that are on campus is important. It is good to keep track of how cases are fluctuating throughout the year to base their response off of. The easy access to scheduling testing is also a very good feature. That allows more students to have an easier and quicker opportunity to see if they have covid. The intrusive feature on the app is the location. College kids are adults, there is no reason their college shouldn't trust them to follow social distancing rules and watch their every move. I took off the feature for my own parents to track my location, I would feel very violated if my college forced me to share my location. It's not like I'm doing anything bad, but why would Penn State need to know where I am on a Tuesday night, that's very weird. 

I wouldn't accept that here because that's a violation of my own privacy. I think there is a thin line between privacy of data and people's safety however the other features on the app can take care of the students safety, the location is an invasion of privacy. 

A more ethical way of solving this issue with tech is to ask for more reasonable requests for information that students can share without watching everything they do. For example students can submit contract tracing information to help with who may or may not have the virus. 

##Update on Covid Risk Diagram##
My last post discussed an ER diagram that explained the relationships and attributes of one's risk of Covid. 
Here is an updated diagram and video that splits the diagram into a physical diagram to be used for SQL database implementation and conceptual version of my diagram that makes it easier to read and convey the main points. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oyw0njweo7yq8ekxs38h.jpg)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e4fj0vkpeyer42pfn6uy.jpg)
https://drive.google.com/file/d/1MOQTBW1-4pXRADuZJfP9mo2GrZOVwTUr/view
WebXR Device API が有効になっている Chrome 85 で Oculus 系の HMD が認識されない件とその解決方法が無い件について
Tags: webxr, webxrdeviceapi, chrome
Published: 2020-09-14 03:03:36

---
title: WebXR Device API が有効になっている Chrome 85 で Oculus 系の HMD が認識されない件とその解決方法が無い件について
published: true
description: 
tags: WebXR, WebXRDeviceAPI, Chrome 
//cover_image: https://direct_url_to_image.jpg
---

```
I'm sorry, this article is in Japanese only.
```

## はじめに

* 本記事は『[WebXR Device API が有効になっている Chrome 84 で Oculus 系の HMD が認識されない件とその解決方法について](https://dev.to/ikkou/webxr-device-api-chrome-84-oculus-hmd-1g33)』の続編です。
* Windows 版 Chrome を対象としています。
  * Mac 版 Chrome も WebXR Device API をサポートしていますが、Oculus 系の HMD は Mac をサポートしていません。

## TL;DR

* Chrome 84 で使えた起動オプション `--disable-features=XRSandbox --enable-features=oculus --force-webxr-runtime=oculus` は Chrome 85 以降では使えない
* Chrome 85 と Oculus 系 HMD の組み合わせで動作させる方法はない
* Chrome ベータ版 v86.0.4240.22 と Chrome Canary 87.0.4257.0 は共にフラグの変更や起動オプションなしで正常に動作する

Ref. https://twitter.com/ikkou/status/1303199925702807552
Ref. https://twitter.com/ikkou/status/1303205860873703425
Ref. https://twitter.com/ikkou/status/1303206354383822848

## Chrome 85 では Oculus 系 HMD が使えない

Chrome 84 は起動オプションで、Chrome ベータ版と Chrome Canary の挙動から推測するに Chrome 86 以降は起動オプション無しで、それぞれ動作しますが、その間にある Chrome 85 で Oculus 系 HMD で WebXR Device API を使ったコンテンツを楽しむ方法は無いようです。

ちなみに、Chrome 84 時点で起動オプションが示されていた『[Chrome Hardware Support](https://immersiveweb.dev/chrome-support.html)』から起動オプションの記述は既に消えています。

順当に行けば次の Chrome 86 で Chrome ベータ版と同じ、起動オプション無しで動作するようになると思われるので、Chrome 86 を待ちましょう。

また、Oculus 系 HMD の内、__Oculus Quest ユーザーは、Oculus Link にこだわりがなければ WebXR Device API に対応している標準ブラウザアプリの Oculus Browser を使えば万事解決します:)__
most popular programming languages 2020
Tags: programminglanguage
Published: 2020-09-14 02:42:30

Hello guys,this is Satyam and in today's blog we are going to discuss about the most popular programming languages in 2020.So let's start.

#1.Python
No doubt that python is the most popular programming language in 2020,I think most of you were already knowing that Python will the most popular programming language in 2020. So let's discuss why Python is so popular.

Python was developed by a Dutch Computer Scientist Guido Van Roussum.When Guido van Rossum developed Python in the 1990s as his side project, nobody has thought it would be the most popular programming language one day. Considering all well-recognized rankings and industry trends, I put Python as the number one programming language overall.
The major reason for this kind of popularity of python is due to it's easy syntax that allows newbies to learn it very easily and also Python is the easiest 5th generation programming language i.e. it can be used in all modern applications such as AI or Application Development.

#Job Market:
According to Indeed, Python is the most demanding programming language in the USA job market with the highest 74 K job posting in January 2020. Also, Python ranked third with a $120 K yearly salary.
Also, StackOverflow developer survey has shown that Python developers earn a high salary with relatively low experience compared to other mainstream programming languages:



#Main Use Cases:
Data Science
Data Analytics
Artificial Intelligence, Deep Learning
Enterprise Application
Web Development

#2.JavaScript

JavaScript is the second most popular programming language in the world.Now why JavaScript is so popular programming language,to understand this,we need to discuss about the history of JavaScript.Before JavaScript we didn't have any special programming language for web and at that time we were using Java as a programming language for web and the web pages build using Java were known as 
Applets.Now there was a Internet company called Landscape,the developers of landscape thought that there must be a programming language for web.So this lead to the formation of JavaScript program language.Now in the intial days it was not so popular but after the Development of NodeJS which is a JavaScript runtime,many JavaScript Frameworks we're developed such as Angular,React due to which the popularity of JavaScript increased time to time.



#Job Market:
In the USA Job market, Indeed has ranked JavaScript as the third most demanding programming language with 57 K Job posting in January 2020. With $114 K average yearly salary, JavaScript ranks 4th in terms of salary.
Also, StackOverflow developer survey has shown that JavaScript developers can earn a modest salary with relatively low experience.

My Blogs:https://DevTipsNTricks.com

My Tutorial:https://BestPythonTutorials.com


#Thanks for Reading