teleren/devto huggingface dataset:
what is an example of too much test cases?
Tags: testing, tdd, ruby, rails
Published: 2020-02-05 16:28:50

Sometimes I wonder that I am writing too many test cases which test the exact same thing. Assuming there is a class 

```ruby
class KlassA
  def do_something
    b = KlassB.new
    b.do_something_more
  end
  
  def do_something_else
    c = KlassC.new
    c.do_some_other_thing
  end
end
```

Now, if I have written test cases for `KlassB, do_something_more` and `KlassC, do_some_other_thing`. Should I write test cases for `KlassA, do_something` and `KlassA, do_something_else` ? Should I even write test for `KlassA` at all.

Why or Why not ?
Two Minutes to a Push...
Tags: devjournal, devdev
Published: 2020-02-05 16:27:51

---
title: Two Minutes to a Push...
published: true
description: An improvement on the Pomodoro Technique and the 5 minute time blocking
tags: journal, #devdev
---

While the lightning is still to be caught in the bottle I have played around with time blocking my coding once I start.  I time my code commencement (which is harder than for you I guess) with around 9-10 minutes to get the code flowing. 

I used to use the Pomodoro technique to code for around 25 minutes at a stretch and then pause, maybe exercise a bit around every full hour.

Now I feel I have completely bought into the 2 minutes and push method.

I can even play with five 2 minute sessions as standing in for the starter block of 10 minutes that gets me into flow most of the time. Now it has a more defined feature set.

I can then aim for around 10 to a dozen commits and pushes.

Then short breaks where I diffuse my mental landscape or absorb other ideas from another field...

I could (probably) write a haiku or a verse of poetry in 5 minutes so I could start experimenting with that.

Then every hour I could pull a 15 kg sandbag 40 times OR stay in plank position to exhaustion. I am not so good at it yet since I have just started, to need more than a couple of minutes and a few minutes to return to normal pulse.

Always Be Closing - put the code in a state where it could be released every two minutes.
Beginners Guide to Live Streaming Code on Twitch in 2020
Tags: livestreaming, tutorial, twitch
Published: 2020-02-05 16:21:53

---
title: Beginners Guide to Live Streaming Code on Twitch in 2020
published: true
date: 2020-02-05 16:19:42 UTC
tags: live-streaming,tutorial,twitch
canonical_url: https://medium.com/@sitapati/beginners-guide-to-live-streaming-code-on-twitch-in-2020-87c8e52c2f52
---

I started live streaming code on Twitch last year, and at Linux Conf AU in January I gave a talk about live streaming “How to live stream on Twitch and YouTube” that was live streamed on my [Twitch.tv](https://www.twitch.tv/thelegendaryjoshwulf) channel.

{% youtube T3gMT-rDNEE %}

In this talk, I cover a lot of the mechanics and technology of streaming: the software (OBS / Ecamm Live), streaming platforms, microphones, control surfaces, lighting, and using a green screen. I show both ends of the spectrum: the ultra-high end and the “get started now in your garage”.

Check out the archives of some of my live coding sessions in the archive in [this YouTube playlist](https://www.youtube.com/playlist?list=PLn1M3BHFMIoPgmZ4XKIJtvX3kVapI0a-p).

If you stream, let me know. I love checking out other people’s streams.[Suz Hinton](https://www.freecodecamp.org/news/lessons-from-my-first-year-of-live-coding-on-twitch-41a32e2f41c1/) (noopkat) and [MPJ](https://twitter.com/mpjme?lang=en) inspired me to start streaming, and if this helps someone else get started, then I’d consider that paying it forward.
Django News - Issue 8
Tags: python, django
Published: 2020-02-06 02:23:48

---
title: Django News - Issue 8
published: true
date: 2020-02-05 16:15:17 UTC
tags: python, django
canonical_url: https://django-news.com/issues/8
---

### News

#### [DjangoCon US 2020 Announced](https://cur.at/3910CpG?m=rss)

DjangoCon US is returning to San Diego from October 11-17th. More details to come.

----

#### [Django Day Copenhagen 2020 - Call for Proposals](https://cur.at/SXJv9DP?m=rss)

A one-day Django conference on April 17th, 2020. The call for proposals is now live. Submit before February 2nd!

----

#### [Announcing CockroachDB for Django ORM](https://cur.at/RNqXpoc?m=rss)

A Django package for using CockroachDB, an open-source distributed database.

----

### Articles

#### [Demos, Prototypes, and MVPs](https://cur.at/rtgULBM?m=rss)

Django co-creator Jacob Kaplan-Moss concisely covers the difference between three commonly misused terms: demos, prototypes, and MVPs.

----

#### [All You Need To Know About Prefetching in Django](https://cur.at/7Wdh2kf?m=rss)

How to use Prefetch to speed up queries in Django

----

#### [URLs Lead the Way](https://cur.at/GYCpEIK?m=rss)

A detailed look at how Django process URL requests internally.

----

### Podcasts

#### [Django Chat Podcast - GeoDjango with Anna Kiefer](https://cur.at/b3MlLqV?m=rss)

GeoDjango is a powerful built-in contrib module that turns Django into a world-class geographic Web framework.

----

### Projects

#### [skorokithakis/django-tokenauth: Django authentication backend that uses tokens sent over email.](https://cur.at/BBxfeDt?m=rss)

Django-tokenauth is a simple, passwordless authentication method based on a one-time token sent over email which does not require user registration.

----

#### [django-weasyprint: A Django class-based view generating PDF resposes using WeasyPrint](https://cur.at/TszQPDh?m=rss)

WeasyPrint turns HTML into beautiful PDF pages. This project creates a Django class-based view to generate PDF responses.

----

This RSS feed is published on [https://django-news.com/](https://django-news.com/). You can also subscribe [via email](https://django-news.com/#cta-newsletter).
Welcome Thread - v59
Tags: welcome
Published: 2020-02-05 16:14:09

---
title: Welcome Thread - v59
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
---

![meerkat](https://media.giphy.com/media/6pUBXVTai18Iw/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Don’t Use v-if with v-for Elements
Tags: vue, vif, vfor
Published: 2020-02-05 15:59:42

Sometimes we use v-if conditionals with v-for to filter our data. It’s super tempting to want to use v-if with v-for in order to filter elements of an array. 

https://www.codechief.org/article/dont-use-v-if-with-v-for-elements
Dialogflow
Tags: chatbots, dialogflow, bots, messengerbot
Published: 2020-02-05 15:48:36

---
title: Dialogflow
published: yes
description: Give users new ways to interact with your product by building engaging voice and text-based conversational interfaces, such as voice apps and chatbots, powered by AI. Connect with users on your website, mobile app, the Google Assistant, Amazon Alexa, Facebook Messenger, and other popular platforms and devices.
tags: chatbots, dialogflow, bots, messenger bot
---

Whatsapp, twilio, dialogflow integration with NodeJS
https://www.youtube.com/watch?v=U3ebBXfB6Go
🚀SwissDevJobs.ch - a transparent job board for Software Developers
Tags: showdev, career, interview, watercooler
Published: 2020-02-05 15:23:46

###Dear DEV's,

After over a year of development, testing in production😉 and adding over 290 transparent tech jobs, we are happy to officially announce **[SwissDev Jobs](https://swissdevjobs.ch)**.

If you now roll your eyes, thinking *'great, yet another job board'* - please hold on for a second and let us tell you the story behind it:


SwissDev Jobs started in 2018 in Switzerland ⛷️🏔️ as a side-project, because we have been frustrated with the existing job boards. 

**We built a job board that we would use ourselves as Software Developers.**

###The result?
![SwissDev Jobs main page](https://dev-to-uploads.s3.amazonaws.com/i/ksqbg1t0uj9m9uol20i8.PNG)
####Detailed view:
![SwissDev Jobs detailed page](https://dev-to-uploads.s3.amazonaws.com/i/9yculd6wf0igebwyzsuw.PNG)

###What makes it unique?
1. **Transparency**🔎 - each job posting must have salary brackets and even more important, the methodology info (do they have integration tests, are there QA people)
2. **Usability**❤️ - you should be able to filter your target jobs with just 2 clicks and can check their location on the map
3. **Information**💻 - every posting is standardized and includes the really important information about the company and the role itself.


Of course, it is your opinion that counts - head up to [SwissDevJobs.ch](https://swissdevjobs.ch), click around and tell us what you think!

We are very grateful for your feature requests and bug reports 😉


##Help us build a more transparent IT-job market!
Can you stream video / audio to a back-end API?
Tags: help, flutter
Published: 2020-02-05 15:22:27

---
title: Can you stream video / audio to a back-end API?
published: true
tags: help, flutter
---

I'm fairly new in Flutter.

My question is if it's possible to do video streaming with Flutter? Similar to YouTube Live where the video is streamed to their servers and later can be accessed on the website.

My setup would be similar to that, but instead I'd like to save the video stream data on my server using Go as the back-end API.
Understanding Continuous Integration Testing
Tags: testing, qa, ci
Published: 2020-02-05 15:09:28

Understanding Continuous Integration Testing

We:

Set up the environment that automatically integrates all project parts and runs tests per conditions that meet your requirements.

You get:

- Easy adjustment of the testing process.

- Timely bugs detection and fixing.

- Saved time and money.

Tools we use:

- Jenkins
- CircleCI
- Travis CI.

#HireTester #QA #SoftwareTesting #CI #ContinuousIntegration 

http://hire-tester.com
Quality Control (QC) vs Quality Assurance (QA): What's the Difference? 
Tags: qa, testing, qc
Published: 2020-02-05 15:06:57

Quality Control (QC) vs Quality Assurance (QA): What's the Difference? 

Quality Control (QC) is a process aimed to check the current product quality and: 
->Verify the functionality compliance with specifications. 
->Verify the documentation compliance with requirements for its creation, content, and format. 
->Review the code to verify its compliance with coding standards, architectural documentation, safety, etc.

Quality Assurance (QA) is a set of activities covering all tech stages of the SDL, production, and usage to ensure end-product quality.

Whether you're looking for quality control or quality assurance services, the HireTester team can become your reliable QA partner and cover your back in software testing.

http://hire-tester.com

#HireTester #QA #SoftwareTesting #QC
Class in Go
Tags: go, beginners
Published: 2020-02-05 15:06:32

<a href="https://golang.org">Go</a> is not a pure object oriented programming language. In truth, Go does not provide classes. Go uses <a href="https://golangr.com/struct/">structs</a> instead. 

Create a file example.go with the struct student. You can create a new person using this struct as the example shows:

```go
package main

import "fmt"

type student struct {
    FirstName       string
    LastName        string
}

func main() {
    s1 := student{ FirstName: "Nils", LastName: "Bohr" }
    fmt.Println(s1.FirstName)
}
```

This program outputs in:

```
➜  go run app.go   
Nils
```

You can create multiple students like this:

```go
s1 := student{ FirstName: "Nils", LastName: "Bohr" }
s2 := student{ FirstName: "Albert", LastName: "Einstein" }
fmt.Println(s1.FirstName)
fmt.Println(s2.FirstName)
```

## Methods

So what about methods? Methods can be "added to structs". You can create a method that takes a struct as parameter, like this:

```go
func (s student) name() {
    fmt.Printf("%s %s\n", s.FirstName, s.LastName)
}
```

Then you can call it like this:

```go
s1.name()
s2.name()
```

That makes the program:

```go
package main

import "fmt"

type student struct {
    FirstName       string
    LastName        string
}

func (s student) name() {
    fmt.Printf("%s %s\n", s.FirstName, s.LastName)
}

func main() {
    s1 := student{ FirstName: "Nils", LastName: "Bohr" }
    s2 := student{ FirstName: "Albert", LastName: "Einstein" }
    s1.name()
    s2.name()
}
```

**Related links:**
* <a href="https://golang.org">Go programming language</a>
* <a href="https://golangr.com/">Learn Go</a>
Devart ODBC Driver for QuickBooks Now Supports OAuth 2.0
Tags: odbc, quickbooks, oauth
Published: 2020-02-05 14:46:14

---
title: Devart ODBC Driver for QuickBooks Now Supports OAuth 2.0
published: true
description: Devart released a new version of ODBC Driver for QuickBooks with support for OAuth 2.0 authentication protocol.
tags: ODBC, QuickBooks, OAuth, 
---
*Devart released a new version of ODBC Driver for QuickBooks with support for OAuth 2.0 authentication protocol.*

![ODBC Driver for QuickBooks](https://blog.devart.com/wp-content/uploads/2020/02/quickbooks_odbc_connection.png)

Devart, a recognized vendor of connectivity solutions for various databases and cloud services, released a new version of [ODBC Driver for QuickBooks](https://www.devart.com/odbc/quickbooks/download.html), which now supports the OAuth 2.0 authentication protocol.

The new version of the ODBC driver only needs to know the user's company ID and refresh token to authorize. The required connection options are filled in automatically when the user logs into the QuickBooks account. See the [documentation](https://www.devart.com/odbc/quickbooks/docs/driver_configuration_and_conne.htm) for details.

**OAuth 2.0** is the industry-standard protocol for authorization. In the context of the Devart ODBC driver, it enables the driver to obtain limited access to QuickBooks data without requesting the user’s credentials. The protocol delegates user authentication to QuickBooks that hosts login credentials and authorizes the driver to access user’s data.

**Devart ODBC Driver for QuickBooks** provides a high-performance and feature-rich connectivity solution for ODBC-based applications to access QuickBooks data from Windows, both 32-bit and 64-bit. Full support for standard ODBC API functions and data types implemented in this driver makes interaction of database applications with QuickBooks fast, easy, and extremely handy.

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
#2 Live Kata Report
Tags: javascript, reduce, array, sort
Published: 2020-02-05 14:15:05


---
title: #2 Live Kata Report
published: true
description: Report of the #2 live coding session.
tags: JavaScript, Reduce, Array, Sort
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/k9m5vocak23lj0mivc2b.jpg
---
#2 Live Kata Report

With the JS Learning community I am running we use to solve "JS Katas" together during "live coding" sessions.
I'll use this blog to share the "Live Kata" reports.

We solved together a "kata" found on "CodeWars.com".

# Key takeaway points:
• Learn how String.prototype.slice() works
• Learn how Array.prototype.join() works
• Learn how Array.prototype.reduce() works
• Learn how "Destructuring assignment" works


# Docs:
• [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) 
• [String.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) 
• [Array.prototype.join()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join) 
• [Destructuring assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) 
• A [website full of katas](https://www.codewars.com/) 

The Kata is the following:

# Requirements:
Move the first letter of each word to the end of it, then add "ay" to the end of the word.

# Example
'Pig latin is cool' => igPay atinlay siay oolcay
'Hello world' => elloHay orldway

# Our solutions
## Solution 1
```js
function doKata(str) {
  const arr = str.split(' ');
  const sentence = arr.map((e) => {
    const rest = e.slice(1);
    const first = e[0]
    const suffix = 'ay';
    const word = `${rest}${first}${suffix}`;
    return word;
  }).join(' ');

  return sentence;
}
```

## Solution 2
```js
const reducer = (acc, curr) => {
  const [first, ...rest] = curr.split('');
  const resWord = [...rest,first, 'ay'].join('');
  return acc = acc ? `${acc} ${resWord}` : resWord;
}
const doKata => str => str.split(' ').reduce(reducer, '');
```

## Extra exercise
Try to solve the kata adding the following rule: "leave punctuation marks untouched".

'Pig latin is cool' => igPay atinlay siay oolcay
'Hello world' => elloHay orldway
'Hello, world? How are you, world??!' => elloHay, orldway? owHay eraay ouyay, orldway??!

You can post the solution here as a comment. :)

## About this post
I'm am running a **free** **JavaScript Learning Group** on [pixari.slack.com] and I use this blog as official blog of the community. 
I pick some of the questions from the #questions-answer channel and answer via blog post. This way my answers will stay indefinitely visible for everyone."

If you want to [**join the community** feel free to click here](https://join.slack.com/t/pixari/shared_invite/enQtOTA5MzE0NzcwNzI3LTM5OGQ5MzNkMDA3ZTNkNTNmMmI4NTM5MGRiY2RiMDEyOGE0NGM3M2M3M2Y2NTNjNzZlMTY2NTY5ZmQwM2ZhZjk) or contact me: 

 - [JavaScript Learning Group on Twitter](https://twitter.com/JSL_group)
 - [@pixari on Twitter](https://twitter.com/pixari)
 - [raffaele.pizzari@gmail.com](mailto:raffaele.pizzari@gmail.com)
Quick JavaScript tip #1: setInterval() with modifiable delay
Tags: javascript, setinterval, tip
Published: 2020-02-05 13:57:19

The JavaScript <code>setInterval</code> method repeatedly executes a function. It takes two parameters: the function to execute, and a delay in milliseconds between each execution. But how can that delay be changed during runtime? Let’s see.

You’re maybe thinking of using a variable as the second parameter of the <code>setInterval</code> method, like so:
```javascript
var delay = 1000;
setInterval(myFunction, delay);

// some logic modifying the delay
```
But that doesn’t work, because the <code>setInterval</code> method takes the value of the <code>delay</code> variable, and not an actual reference. So how can we make this work?

The easiest way is to set a timeout instead of an interval at the end of each execution, and pass a variable as the second parameter. That way, each time a new timeout is set the value of that variable is used, like so:
```javascript
var delay = 1000;

function loop() {
  // your logic here, where you can update the delay
  setTimeout(loop, delay);
}

loop();
```
Notice how we have to manually execute the <code>loop</code> function, which isn’t very optimized.
A possible optimization would be this:
```javascript
var delay = 1000;

(function loop() {
  // your logic here, where you can update the delay
  setTimeout(loop, delay);
})();
```
What I did here is to enclose the <code>loop</code> function inside parentheses, and then immediately execute it once using <code>()</code> just like a normal function. For reference, this is called an "Immediately Invoked Function Expression".
Looking for Contributors on CONNECTIVE HTML
Tags: contributorswanted, opensource, typescript, html
Published: 2020-02-05 13:50:50

[**CONNECTIVE HTML**](https://github.com/CONNECT-platform/connective-html) is a simple and thin library for creating HTML user interfaces without reliance on (and hence without overhead of) techniques such as Virtual DOM / Change Detection / etc. The idea is that with advent of reactive programming libraries such as [RxJS](https://rxjs-dev.firebaseapp.com), not only there is no longer any need these techniques, but also relying on them limits our interfaces in terms of performance and capabilities.

The main body of the work on [**CONNECTIVE HTML**](https://github.com/CONNECT-platform/connective-html) is already done and it is already usable for enthusiasts. However there still remains some work to make it widely usable and production-ready. If you are interested, checkout [the project's page](https://github.com/CONNECT-platform/connective-html) and contribute, as any help is much appreciated.
An opinionated guideline to BEM
Tags: bem, css, scss, frontend
Published: 2020-02-05 13:49:37

---
title: An opinionated guideline to BEM
published: true
description: 
tags: BEM, CSS, SCSS, frontend
---

## Why you need this?

Disclaimer here is, you may not! This guideline is based on my opinion and experience, and it has worked so well for me, it is something I propose every time I start a new project. This 'customisation' of the BEM system serves me so well and has saved me so much time in code reviews, that I don't think I'll want to give up to it any time soon. 

## BEM and modular systems

There are of course other methodologies to write efficient CSS, but my favourite has, since I came across it, BEM. It plays really well with component based systems like the one I use at work (AEM) and even with my favourite framework architecture (Angular). 

### The 'block' in Bem

You don't even need to think much what the 'block' in BEM will be. The component/module is the block. 

{% gist https://gist.github.com/anfibiacreativa/27399185b7e1cb2a90b0f1b2d05a0a68 %}

### The 'elements' in bEm

Most components have the need of an outer wrapper, an inner wrapper, a headline, a sub headline, an image, a description or text, a list and the list items, so you can create conventions on how to name those, too. That allows you to reutilise code from one component to another. 

{% gist https://gist.github.com/anfibiacreativa/86d33f255721e6c2390b1006f6a2762e %}

Basically, try to refer to those elements when you create your classname. Avoid calling a classname after what the block content is about. That renders your code non-reusable. And seriously, it never scales! You will end up in a mess.

### The 'modifier' in beM

Again, try to be as generic as possible. Try not to use the modifier to refer to the content for that element. It restricts you and it's a mess when the requirement changes, if it does. It makes you go through a lot more hassle if you want to reuse the code later.

Try to focus in naming the modifier after a cosmetic attribute. It describes a wider element, compared to a more narrow one? It maps to a color of your scheme? It implements a font definition? (bold, italic, etc)

{% gist https://gist.github.com/anfibiacreativa/7eca0a487f7c04338e0abdecc95a37f4 %}

### State

Modifiers can come in the form of states. State is something that your element 'is' or not, 'has' or has not. So use those verbs to compose the name of your state. Is it active, is it collapsed, does it have icons? 

{% gist https://gist.github.com/anfibiacreativa/82696ede708a8d33f7f86007911f5637 %}

## Syntax
Syntax is important to deliver clean and consistent codebases, that are easy to understand and maintain.

Here is a simple table you can share with your team, to have a reference and use during code reviews! I hope it's as much useful to me, as it is for me! 

![BEM syntax matrix](https://dev-to-uploads.s3.amazonaws.com/i/t32s5m6tb64gtgt1g3xs.png)

Have a great day!