teleren/devto huggingface dataset:
console.fun() or how to mess up the DOM
Tags: javascript, console, fun
Published: 2019-03-13 19:15:11

---
title: console.fun() or how to mess up the DOM
published: true
description: chaos :-)
tags: javascript, console, fun
cover_image: https://image.shutterstock.com/image-photo/naughty-dog-lying-middle-mess-600w-339205646.jpg
---

I stumbled upon this little gem in the [vue-land](https://vue-land.js.org/) #random channel and it made me smile. Posted by *xan#2554*.

Thought maybe it can make you smile too and decided to share it to you. Have fun.

### Instructions

> 1. copy script
> 2. visit your most preferred website -- ..most likely [dev.to](dev.to) 😜
> 3. open console
> 4. paste script and press `enter`

```javascript
(function funnyFunction() {
  var screenwidth = window.innerWidth;
  var screenheight = window.innerHeight;
  document.querySelectorAll('body *').forEach(function(node) {
    randT = Math.floor(Math.random() * screenheight);
    randL = Math.floor(Math.random() * screenwidth);
    node.setAttribute('style', 'transition-duration:500ms; transition-property: left, top; position: fixed; top:'+randT+'px; left:'+randL+'px');
  });
  setInterval(funnyFunction, 500);
})();
```

Be honest to yourself, did you knew what will happen? 


cheers
Rails 4.2.11.1, 5.0.7.2, 5.1.6.2, 5.2.2.1, and 6.0.0.beta3 have been released with important security fixes.
Tags: rails, ruby
Published: 2019-03-13 18:25:34

---
title: Rails 4.2.11.1, 5.0.7.2, 5.1.6.2, 5.2.2.1, and 6.0.0.beta3 have been released with important security fixes.
published: true
description: Rails 4.2.11.1, 5.0.7.2, 5.1.6.2, 5.2.2.1, and 6.0.0.beta3 have been released with important security fixes.
tags: #rails #ruby #news
---

Just passing on the news here!

{% twitter 1105882173784113152 %}
WTF is Serverless?
Tags: javascript, node, tutorial, aws
Published: 2019-03-13 18:05:52

---
title: WTF is Serverless?
published: true
description: In this video we go over serverless computing and the advantages it has over traditional methods of app deployment and maintenance. 
tags: #javascript #node #tutorial #aws
---

{% youtube SV_vjX3qU3E %}
5 ways you can infuse AI into your applications today
Tags: javascript, machinelearning, webdev, fivethings
Published: 2019-03-13 17:57:26

---
title: 5 ways you can infuse AI into your applications today
published: true
description: Learn five ways that you can use artificial intelligence in your applications with Noelle LaCharite and Burke Holland
tags: javascript, machinelearning, webdev, fivethings
cover_image: https://thepracticaldev.s3.amazonaws.com/i/gegbn3y5i1pb8ro60pol.jpg
---

Leben Things! In case you don’t speak Elvish, that roughly translates to “Five Things”. Apparently "things" is an Elivsh word. Who knew?!

This week I sit down with [Noelle LaCharite](https://twitter.com/NoelleLaCharite) from the Microsoft Cognitive Services team to learn how machines can translate language (like Elvish?), perform search on unstructured data, converse like humans and more. Even better, you can use this stuff in your applications right away; no degree in multi-dimensional calculus required. This is five ways that you can infuse AI into your applications today. 

{% youtube FV0rNqzNHgU %}

Add a little Artificial Intelligence to your life with these resources: 
 
- [Build an FAQ bot with QnA Maker](https://www.qnamaker.ai/?WT.mc_id=devto-blog-buhollan)
- [Use AI to search your unstructured data](https://azure.microsoft.com/services/cognitive-services/directory/search/?WT.mc_id=devto-blog-buhollan)
- [Translate speech to text – even with a lot of background noise](https://azure.microsoft.com/services/cognitive-services/speech-to-text/?WT.mc_id=devto-blog-buhollan) 
- [Add a search engine for just your data](https://azure.microsoft.com/services/cognitive-services/bing-custom-search/?WT.mc_id=devto-blog-buhollan) 
- [Use computer vision to process images of text](https://azure.microsoft.com/services/cognitive-services/computer-vision/?WT.mc_id=devto-blog-buhollan#text)
- [Watch more episodes](https://aka.ms/FiveThingsPlaylist)
- Follow Hosts [@john_papa](https://twitter.com/John_Papa) and [@burkeholland](https://twitter.com/burkeholland) on Twitter
Logging my phone use with tasker
Published: 2019-01-28 21:13:31

---
title: Logging my phone use with tasker
published: true
tags: 
canonical_url: https://blog.rmhogervorst.nl/blog/2019/01/28/logging-my-phone-use-with-tasker/
---

In this post I’ll show you how I logged my phone use with tasker, in a followup post I’ll show you how I visualized that.

I had a great vacation last week but relaxing in Spain I thought about myuse of technology and became a bit concerned with how manytimes I actually look at my phone.

But how many times a day do I actually look at my phone?I used the android app [tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)I bought and have used the app before, but I never really bothered to figurethe app out. I did now.

Tasker can be used to automate many things in your phone, for instance turn onwifi when you’re near a certain place, dim screen when it’s late, mute the phonewhen you’re in a meeting and many more things.

But in this case I wanted a simple way to track my phone use, as a proxy forphone use I have a counter that starts every day at 0 and increments with oneeverytime the screen is on.

## How to do that:

- In Profiles, create a new profile, with state: ‘Display State On’, give it a useful name f.i.: ‘screen counter’
- Then add a task, give that a name too, f.i. : ‘update screen count’

That task has multiple actions, I set mine up to

- wait for 4 seconds (a quick on and off does not count)
- Variable add ‘%SCREEN\_COUNT’ value 1, wrap around 0
- _if you want to, you could flash a message_
- write file, give it a name, f.i. ‘screenlog.csv’ and create some text to write to that file. I used “screenlog”;“%DATE”;“%TIME”;“%SCREEN\_COUNT” and toggle append and add newline

This way the file gets appended with new screen counts everytime I open the phone,the resulting file is a ‘;’ - seperated file where tasker replaces the %DATE etc with the current valuesSo today it would write

```
"screenlog";"01-28-19";"21.27";"148"

```

For some reason the app sometimes writes in USA style date and sometimes in normalday-month-year style, so that gives me head aches, but it works reasonably well.

## How to reset the counter?

I set up a new profile for that reason.Every day in the final minutes of the day a new task is run that resets the $SCREEN\_COUNT to 0.
The beginner's guide to Spring Boot
Tags: springboot, java, beginners
Published: 2019-03-13 16:39:45

---
title: The beginner's guide to Spring Boot
published: true
description: About the misconception that Spring Boot is easy to use
tags: springboot,java,beginner
---
_Disclaimer:_ This article probably seems shorter than you have expected regarding its title. In the end you will have learned that it's not.


Spring Boot is the _one_ big player in the market of available java application frameworks. Everybody is supposed to know Spring Boot and how to write applications using it. Yet, you see so many Spring Boot applications that have gotten out of control and are a nightmare to maintain. Why is that?

In my opinion, this is because it is so easy to get started - you put an annotation here, you put an annotation there and voilà you have your REST service running. But then, it is not quite as easy to evolve and structure your application correctly if you are not aware of some key concepts and some of the stuff that is going on under the hoods. Without proper understanding, it is way too easy to screw things up. Examples?

Application context configuration seems easy at a first glance but can get rather complex while your application grows. Do I use component scan or java based configuration? Can I mix them? Where do I put those config classes? Is a single `@Configuration` class enough? What is this 'auto configuration' actually? If you can not properly answer these questions in context of your application's requirements you will end up creating an unmaintainable `ApplicationContext` hell.

There are other examples like scopes, logging configuration, property sources, AOP proxies, dependency management, bundling, profiles, web security and whatnotelse.

In short: If you thought that writing an application using Spring Boot is as easy as putting `@SpringBootApplication` on your main class, you are wrong. It is just as easy to screw everything up if you have no idea what you are actually doing.

So here is my advice if you want to get serious with writing a Spring Boot application: [RTFM](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/)

(Really, that is the single most important resource to learn how Spring Boot works)
How Does Dev.to Sanitize User Submissions?
Tags: discuss
Published: 2019-03-13 15:46:26

---
title: How Does Dev.to Sanitize User Submissions?
published: true
description: 
tags: discuss
---

I read an awesome article on Verge that detailed how Facebook moderators faced the nearly impossible task of sifting through Facebook posts in order to remove things like child porn or a brutal murder captured live from public view.This moderation problem isn't isolated to Facebook, because Twitter and Reddit are sites that cater to a wide audience as well, and therefore attract bad actors. 

The first question I want to ask so we can speculate(unless confirmed by a Dev.to employee) is, does Dev.to face similar issues?


If not, do they anticipate facing similar issues as the site grows? 


What does Dev.to currently do to sanitize user submissions?


How many moderators do they have?



Is a site that is focused on a niche like programming immune to the garbage that moderators have to collect on open forums?
Text to Speech (TTS) with Python
Tags: tts, python, programming
Published: 2019-03-13 15:42:30

---
title: Text to Speech (TTS) with Python
published: true
description: tts, python, text to speech
tags: tts, python, programming
---
Text to Speech is a technique to convert written text into speech (audio). This is done by a computer and it's a challenging problem: how to make it sound natural, understandable etc.

Watch video:
<a href="https://pythonprogramminglanguage.com/text-to-speech/"><img src="https://img.youtube.com/vi/ahZ-5aRkDgU/0.jpg"></a>

You can use speech engines in Python. Some popular ones are:

* pyttsx
* gtts
* microsoft speech engine
* ibm watson tts

read more: <a href="https://pythonprogramminglanguage.com/text-to-speech/">text to speech</a>
Creating Terraform Scripts from existing resources in Azure Government
Tags: cloud, codeproject, terraform, azuregovernment
Published: 2019-04-26 12:47:07

---
title: Creating Terraform Scripts from existing resources in Azure Government
published: true
tags: Cloud,CodeProject,Terraform,Azure Government
canonical_url: 
---

Lately I’ve been doing a lot of work with TerraForm lately, and one of the questions I’ve gotten a lot is the ability to create terraform scripts based on existing resources.

So the use case is the following: You are working on projects, or part of an organization that has a lot of resources in Azure, and you want to start using terraform for a variety of reasons:

- Being able to iterating in your infrastructure
- Consistency of environment management
- Code History of changes

The good new is there is a tool for that. The tool can be found [here](https://github.com/andyt530/az2tf) on github along with a list of pre-requisites.  I’ve used this tool in Azure Commercial and have been really happy with the results. I wanted to use this with Azure Commercial.

**_NOTE =\> The Pre-reqs are listed on the az2tf tool, but one they didn’t list I needed to install was jq, using “apt-get install jq”._**

Next we need to configure our environment for running terraform.  For me, I ran this using the environment I had configured for Terraform.  In the Git repo, there is a PC Setup document that walks you through how to configure your environment with VS code and Terraform.  I then was able to clone the git repo, and execute the az2tf tool using a Ubuntu subsystem on my Windows 10 machine. 

Now, the tool, az2f, was built to work with azure commercial, and there is one change that has to be made for it to leverage azure government 

Once you have the environment created, and the pre-requisites are all present, you can open a “Terminal” window in vscode, and connect to Azure Government. 

In the ./scripts/resources.sh and ./scripts/resources2.sh files, you will find the following on line 9:

ris=`printf “curl -s  -X GET -H \”Authorization: Bearer %s\” -H \”Content-Type: application/json\” [https://management.azure.com/subscriptions/%s/resources?api-version=2017-05-10](https://management.azure.com/subscriptions/%25s/resources?api-version=2017-05-10)” $bt $sub`

Please change this line to the following:

ris=`printf “curl -s  -X GET -H \”Authorization: Bearer %s\” -H \”Content-Type: application/json\” [https://management.usgovcloudapi.net/subscriptions/%s/resources?api-version=2017-05-10](https://management.usgovcloudapi.net/subscriptions/%25s/resources?api-version=2017-05-10)” $bt $sub`

You can then run the “az2tf” tool by running the following command in the terminal:

_./az2tf.sh -s {Subscription ID} -g {Resource Group Name}_

This will generate the script, and you will see a new folder created in the structure marked “tf.{Subscription ID}” and inside of it will be all configuration steps to setup the environment.
10 Reasons to learn C#
Tags: csharp, programming
Published: 2019-03-13 15:31:26

---
title: 10 Reasons to learn C#
published: true
description: C#, csharp, programming
tags: C#, csharp, programming
---
Why learn the C# programming language?

Some of the main reasons are:

* develop apps for the Microsoft platform
* create games using the Unity Game engine

Watch video:

<a href="https://csharp1.com/why-learn-csharp/"><img src="https://img.youtube.com/vi/nBDvkMcKM3U/0.jpg"></a>

These are additional reasons:

* C# is a modern language
* C# is an object-oriented language
* C# is highly versatile
* C# is safe
* C# is evolving
* C# supports web browser and mobile apps
* C# can be used for Machine Learning
* It's fun!

read more: <a href="https://csharp1.com/why-learn-csharp/">why learn C#</a>
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2019-03-13 15:28:48

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  I'm a day late (I usually post on Tuesday), please forgive the delay :)

You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

The huge highlight of last week within the DEV Community was the [#SheCoded](/t/shecoded) celebration.  There were a great number of positive and supportive comments across the entire spectrum of posts, and it was a real pleasure to read the stories and observe the discussions.  One "Ally" post talked about the very concept of being an ally: **[I'm Yechiel, and I'm not an ally.](https://dev.to/yechielk/im-yechiel-kalmenson-and-im-not-an-ally-3n7h)**     @lkopacz agreed with the main takeaway from the post with a comment that was boosted by many folks in the community:
{% devcomment 99ci %}

The biggest discussion post from last week was **[What’s an unpopular software opinion you have?](https://dev.to/ben/whats-an-unpopular-software-opinion-you-have-312o)**.  None were more popular (is this a contradiction?) than @sergio's comment:
{% devcomment 9a0m %}

Follow up in an article entitled **[Git hacks you should know about](https://dev.to/teamxenox/git-hacks-you-should-know-about-16pk)**, @chiangs offered another extremely helpful tip:
{% devcomment 98k8 %}

The **[Stop Doing Coding Tutorials](https://dev.to/raddevon/stop-doing-coding-tutorials-1o4l)** post is definitely worth a close read.  @daviddeejjames replies with some additional thoughts on the main argument of the post:
{% devcomment 9ab1 %}

We'll end with a fun one.  In reply to **[What's the most creative module or class name you have seen?](https://dev.to/molly_struve/whats-the-most-creative-module-or-class-name-you-have-seen-4p4e)**, @aaronpowell shares their own internal joke:
{% devcomment 98a7 %}

See you next week for more great comments ✌
Most Popular Development Posts Of The Week (13 March 2019)
Tags: go, design, javascript, webdev
Published: 2019-03-15 07:34:28

---
title: Most Popular Development Posts Of The Week (13 March 2019)
published: true
tags: golang,design,javascript,webdev
canonical_url: https://medium.com/daily-now/most-popular-development-posts-of-the-week-13-march-2019-c8253a9f8015
cover_image: https://cdn-images-1.medium.com/max/1024/1*aLPLldXO0uLMSFQgjawC4Q.jpeg
---

> Your most unhappy customers are your greatest source of learning.

- [Peacock v1 Released](https://app.dailynow.co/r/7d74cd743bcb571b48cd9056f99933b8) by [John Papa](https://medium.com/u/f11db20f3d2f)
- [Awesome Free Tools For New Developers](https://app.dailynow.co/r/0f89c0655bb50fa20788e82c754a08cf)
- [Cool CSS effect](https://app.dailynow.co/r/f3057fb97dcd2f282feef37f7206e707)
- [100 Most Popular Languages on GitHub in 2019](https://app.dailynow.co/r/ba39571eeded2d07cf4065cb9be4cc94)
- [10 Google Tools you should start using today](https://app.dailynow.co/r/48ebddbfabedac8c392f3650d95760c5) by [Slavica Grgić](https://medium.com/u/aaac37013284)
- [What’s New In DevTools (Chrome 74)](https://app.dailynow.co/r/2a6efdf393d0ab1c67622867c9c59262)
- [This Is What’s Going To Kill Medium](https://app.dailynow.co/r/8d2a175a8307143bcf44bbe25c7abdf9) by [Saar Oron⁦⁦👈](https://medium.com/u/924ed0bd70c8)
- [7 Reasons To Learn Go Language](https://app.dailynow.co/r/7a2a06fb51e1a1d3884e7826d30d0188) by [myTectra](https://medium.com/u/88ddeac489ba)
- [The Best 7 Tools for Building Websites and Pages](https://app.dailynow.co/r/4938ee0427349a7efb586f60c194a41e)
- [What I learned from 2 years with JavaScript and React](https://app.dailynow.co/r/e2763d94ff01552cc8e8f44995d71ac6)

* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

![](https://cdn-images-1.medium.com/max/1024/1*m8Uf-6F4Q5AOp_wW6tbKSQ.jpeg)
What Makes a Good Interaction Design?
Tags: ux, ui, design, interaction
Published: 2019-03-13 14:47:17

---
title: What Makes a Good Interaction Design?
published: true
description: Guidelines to make an effective interaction design, what are the sweet spots to aim when designing for interaction.
tags: #ux #ui #design #interaction 
cover_image: https://public-media.interaction-design.org/images/ux-daily/574561342c593.jpg
---

Good interaction is made of many areas which overlap because: "interactions are moments of contextual gestalt and one element has a direct impact on the others".

In the same way, to create a good interaction, a designer has to consider five dimensions: words (1D), visual representations (2D), physical objects/space (3D), time (4D), and behavior (5D).

![The five dimensions of Interaction Design](https://thepracticaldev.s3.amazonaws.com/i/chjshqbqee97xkycke8l.gif)

These five dimensions were first defined by a professor at London’s Royal College of Art, Gillian Crampton Smith, and a senior interaction designer, Kevin Silver.

The dimensions represent the features an interaction designer considers when they create interactions. Here’s a bit more information about each of them:
* **(1D) words:**
Encompasses text—such as button labels—which help convey the right amount of information to users.

* **(2D) visual representations:**
The graphical elements which aid in user interaction, such as images, typography and icons.

* **(3D) physical objects/space:**
Involves the medium through which users interact with the product or service—for instance, a laptop via a mouse, or a mobile phone via fingers.

* **(4D) time:**
This relates to media that changes with time, such as animations, videos, and sounds.

* **(5D) behavior:**
Concerned with how the previous four dimensions define the interactions a product affords—for instance, how users can perform actions on a website, or how users can operate a car. Behavior also refers to how the product reacts to the users’ inputs and provides feedback.

If you as a designer account for the five dimensions stated above, you can rest assured you'll hit all the characteristics of good interaction design.
Mozilla launches Firefox Send (free encrypted file transfer)
Tags: news, discuss, githunt
Published: 2019-03-13 14:46:21

---
title: Mozilla launches Firefox Send (free encrypted file transfer)
published: true
description: A thread to discuss Firefox Send.
tags: news, discuss, githunt
---

I'm a day late to the news, but am just learning about **[Firefox Send](https://send.firefox.com/)**, a free encrypted file transfer service launched by Mozilla.

Here is their [Press Release](https://blog.mozilla.org/blog/2019/03/12/introducing-firefox-send-providing-free-file-transfers-while-keeping-your-personal-information-private/) with some more information.  Here are the major features, as described in their release:

- Free
- End-to-End Encryption
- Security controls (download limits and expiration)
- Send files up to 2.5GB

It's [open-source on GitHub](https://github.com/mozilla/send) under the Mozilla Public License 2.0.

There's also [already a CLI tool](https://github.com/timvisee/ffsend) to allow you to upload and get a link directly from the command line.

What do people think?