teleren/devto huggingface dataset:
Using teaching techniques to create a better workshop
Tags: testing, teaching, learning, software
Published: 2018-11-29 17:09:14

---
title: Using teaching techniques to create a better workshop
published: true
description: Using teaching techniques to make a better workshop
tags: testing, teaching, learning, software, learning
---

![](https://s3.amazonaws.com/www.alanmbarr.com/blog/images/teachingtolearningstyles.png)

Part of working with software development teams is teaching others about the risks inherent in software development. What I have found successful in teaching is to give learners activities to learn the material and apply it. 

Part of the testing role is sharing what it is to different parts of the business. As well as for teams that do not have a tester sharing the techniques to open up a testing mindset.

This technique is called the [Gradual Release of Responsibility](https://en.wikipedia.org/wiki/Gradual_release_of_responsibility) or [Explicit Instruction](http://www.evidencebasedteaching.org.au/the-i-do-we-do-you-do-model-explained/). It is composed of
- I do (Model the desired outcome)
- We do (Everyone does the activity)
- You do (Learners do the activity)

It can also be combined with [Think-Pair-Share](https://en.wikipedia.org/wiki/Think-pair-share) activities as well.

When you are teaching new material to people try to incorporate aspects of the different learning styles into your activities and lecture.

---

This led to the creation of a workshop based on the content and material that my team learned from our wonderful trainer Michael Bolton of the [Rapid Software Testing](https://rapid-software-testing.com/) content. My colleague, Joel, and I attempted to boil down the content into an hour long workshop to share with our developers lacking a tester.

The content of the mind map comes from Chapter 17 of Kam Knight's book on [Mind Mapping](https://www.amazon.com/Mind-Mapping-Concentration-Communication-Organization-ebook/dp/B0098B6V6E/)
States and Fates in JS Promises
Tags: discuss
Published: 2018-11-29 16:31:49

---
title: States and Fates in JS Promises
published: true
tags: discuss
---

[https://github.com/domenic/promises-unwrapping/blob/master/docs/states-and-fates.md](https://github.com/domenic/promises-unwrapping/blob/master/docs/states-and-fates.md)


Written by the author who I believe is an expert on the subject of JS Promises, I have no doubt this is totally correct. But, with respect to the `recursive nature of states and fates`, if you can complement the explanation with diagrams, circles, squares, arrows, etc or explain in a different way, will you do so here.
Repost: How I changed the law with a Github pull request
Published: 2018-11-29 16:30:07

---
title: Repost: How I changed the law with a Github pull request
published: true
description: Just a repost of a very interesting article about Github as a repository of law code.
tags: 
---

The discussion in this article is both intriguing and disturbing. My internal jury is still out.

https://arstechnica.com/tech-policy/2018/11/how-i-changed-the-law-with-a-github-pull-request/

![Wilson Building](https://thepracticaldev.s3.amazonaws.com/i/o2uxklvgdr2xu5lt270d.jpg)
ELI5: v8 Isolates and Contexts
Tags: v8, javascript, node, explainlikeimfive
Published: 2018-11-29 16:15:00

---
title: ELI5: v8 Isolates and Contexts
published: true
description: 
tags: v8, JavaScript, NodeJS, explainlikeimfive
---

I'm struggling to find clear information on Isolates vs Contexts vs Processes.

In the v8 JavaScript runtime, what is the role of an Isolate? What is the role of a Context?

How does an Isolate or Context compare to a Unix process?
Should you build personal website?
Tags: discuss
Published: 2018-11-29 16:09:30

---
title: Should you build personal website?
published: true
description: personal website rant
tags: discuss 
---

For last 1000 years I have been pounding over personal website thing. To develop or not develop - this is my question.

Social networks pretty much covers everyone's needs: professional, personal, image-only, sound-only. I am sure you can find any network nowadays.

Personal website demands wide range of skills to make it feel good. Design, hosting or cloud, programming,  search optimization, accessibility features, structural and linked content. More you know, more it feels as a heavy budgeted and time consuming Project. Oh, and I missed legal stuff like data collection, terms and conditions... you name it.

What exactly are you going to tell people? The most common kind of personal pages is a portfolio, maybe a blog or a funny gig. It is anyway something related to brand building. But is there anything above and beyond?

On a flip side.

Personal website is something you control. It is like having small part of the internet in your hands. Your digital territory, where no ads, no BS will ever appear by definition.

It can be a precious gem if you pull it out.

Thoughts?

Feel free to share your personal site, I would love to see it.

TL;DR
I guess it was my youngster dream, where tech wasn't that advanced. Unfortunately for me the tech overgrown my dream.

Yet again I am on the edge to stop domain renewals and let it die naturally.
Dynamic AppEngine Configurations using Gradle Part 2
Tags: appengine, googlecloud, gradle, programming
Published: 2018-11-29 15:16:18

---
title: Dynamic AppEngine Configurations using Gradle Part 2
published: true
description: Let’s take a look at how we can have multiple configuration files(cron.xml, appengine-web.xml, queue.xml) for each of those environments
tags: appengine, googlecloud, gradle, programming
cover_image: https://cdn-images-1.medium.com/max/800/1*gy6JvSGebDZtqPjss4Hi1g.jpeg
---


In the previous story [Dynamic AppEngine Configurations using Gradle Part 1](https://medium.com/@rameshlingappa/dynamic-appengine-configurations-using-gradle-part-1-e3959a39f31b), we discussed how we can easily deploy to various environments like (prod, stag, test) using simple gradle argument. If you haven’t read before, would recommend to read it before proceeding.

Now let’s take a look at how we can have multiple configuration files(cron.xml, appengine-web.xml, queue.xml) for each of those environments

[Read on](https://medium.com/swlh/dynamic-appengine-configurations-using-gradle-part-2-49a30eb87672)
Recommend some apps/websites that are great when launching a product 
Tags: discuss, recommend
Published: 2018-11-29 13:47:39

---
title: Recommend some apps/websites that are great when launching a product 
published: true 
description: recommend some apps or website that you use or recommend when launching your product 
tags: #discuss #recommend
---

recommend some apps or website that you use or recommend when launching your product
What we know about White Label Crypto Exchange and Open Source Crypto Exchange soft
Tags: cryptosoftware, cryptosoft, cryptoexchange
Published: 2018-11-29 13:13:51

---
title: What we know about White Label Crypto Exchange and Open Source Crypto Exchange soft
published: true
description: The comparison of white label crypto software and Open Source Crypto Exchange soft
tags: crypto-software, crypto-soft, crypto-exchange
---
White label crypto software is called a license, which is offered by the company. These systems provide the copy of database, backend and core from one customer to another.  Of course it has a list of advantages. You gain time because the user shouldn’t build anything from scratch but only deploy and install it. The configuration isn’t difficult too.  Another advantage is its reliability. The user receives stable set of features and functions. 
As for disadvantages the companies would hardly provide unique design. Companies offering label cryptocurrency platforms aren’t interested in serious technical suppot. 
Sometimes the customers are made to pay monthly or annual fee and it isn’t profitable for them.
If you want to compare White Label Crypto Exchange and Open Source Crypto Exchange follow http://merehead.com/blog/white-label-crypto-exchange-vs-open-source-crypto-exchange/. But these advantages and disadvantages of White Label Crypto Exchange platform are given shortl and in general. Every customer could specify the facilities individually with the company he is going to cooperate with.
Open source cryptocurrency exchange soft is newish. But customers could deploy and install it to check in practice how it works. One of its advantages is short time for deployment. It is free and it’s another advantage. 
As for disadvantages these platforms are created by one or several enthusiasts. They have no design. Lack of functionality and security are extra disadvantages. 
It’s only up to the customer whether to use this or that platform, but before making choice, I’d recommend to gather the info about these two platforms and analyze them deeply.
CSS variables are great!
Tags: css, cuttingedge, webdev
Published: 2018-11-29 13:04:01

---
title: CSS variables are great!
published: true
description: Getting started with CSS variables
tags: #css #cuttingedge #webdev
---

### Declaring a new variable

You can define CSS variables anywhere in your stylesheets, but you usually want to have them declared in the root element of the document. By doing so, you can access them globally.

```css

:root {
    --main-color: blue;
}

```
A new variable is declared with two dashes and can be accessed with the `var()` CSS function:

```css

.main-header {
    background-color: var(--main-color);
}

```
Yes, coming from SASS, the syntax may look quite strange to you. It will take some getting used to.


### Updating the value with JavaScript

Here lies the true strength of CSS variables: they can be changed at runtime, unlike SASS variables which are compiled down to regular CSS.

Here is how to update a CSS variable:

````js
document.documentElement.style.setProperty('--main-color', 'green')

```
Now all properties containing that variable will have their value set to 'green'.


### A real-word example

Recently I have been working on a small Nuxt.js application in which I needed to pass a value (a HEX color code) between two components on different routes. The HEX color was supposed to change the background color of the header and the footer.

Using event emitters was not possible because of the routing, and the addition of a state management library felt like an overkill.

💡 My solution
I declared a CSS variable on the root element and had the component update its value. Since the other component relied on the same variable, its value was also updated.

Link to the specific line on GitHub: https://github.com/mornir/copywork-portfolio/blob/master/pages/_slug.vue#L109

Link to the website: [copywork.surge.sh](https://copywork.surge.sh)
Image upload via buffer
Tags: help, node
Published: 2018-11-29 12:27:11

---
title: Image upload via buffer
published: true
description: 
tags: help, nodejs
---

I'm using buffer in Node.js for image upload in cloudinary but cloudinary doesn't have any option for image transformation for buffer upload.

Is there is any package which have the ability to resize image by reading buffer and return buffer back after resizing it.
Fast Knowledge: Kubernetes port forwarding
Tags: kubernetes, cloud, devops, database
Published: 2018-11-29 11:45:50

---
title: Fast Knowledge: Kubernetes port forwarding 
published: true
description: A quickread to learn how to forward ports in Kubernetes to access for example your MYSQL, MongoDB Database with a client inside of your Kubernetes Cluster
tags: kubernetes, cloud, devops, database
---

When i finally discovered the option in Kubernetes to forward a port of a pod to localhost, it changed the way i started working with my cluster.

I often have my MongoDB, MYSQL or Elasticsearch inside of a Kubernetes cluster, running on pods. Naturally it has no public access point or port forwarding to the outside of the cluster. But sometimes you want to use a Client to access your Database or you want to use your cli locally to find errors.

The solution is 

```
kubectl port-forward localport:podport
```

This allows you to easily forward your mongoDB Port to localhost for example

```
kubectl port-forward pods/mongo-0 27017:27017

or

kubectl port-forward deployment/mongo-0 27017:27017


```

Then you can use use your MongoDB Client (e.g Robo 3T) to connect to localhost:27017 and you are connected to your remote NOSQL Database.

For more information look [here](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#port-forward)
Obj initialization same key_and_value
Tags: help, es6
Published: 2018-11-29 11:01:14

---
title: Obj initialization same key_and_value
published: true
description: 
tags: help,ES6
---
 ```
var k_as_v = "k_as_v";
obj = {
  
    [k_as_v]:k_as_v,
   
}

console.log(obj);
 ```

Why cant I just keep k_as_v


```
var k_as_v ="k_as_v";

obj = {
  
   [k_as_v],
   
}

console.log(obj);

```

If cant how can i achieve this without re-declaring, any hack !
Simple Multitenancy in Rails
Tags: multitenancy, rails, ruby, designpatterns
Published: 2018-11-29 10:43:36

---
title: Simple Multitenancy in Rails
published: true
tags: multitenancy, rails, ruby, designpatterns
cover_image: https://cdn-images-1.medium.com/max/1600/1*HylY3rUw1lnwEj98uYulnQ.png
description: Rails concerns and some basic reusable multi-tenant patterns.
---

In this post, I would like to share a few snippets on how to use concerns in Rails to share some basic reusable multi-tenant patterns.

---

[Multi-tenancy](https://en.wikipedia.org/wiki/Multitenancy) is a common problem to solve in todays cloud-first world. The core part to a Multitenant Architecture is a "Tenant". A Tenant can be anything - a Store(Shopify), an Account(org using a SaaS product) or even a User - and typically, has data partitioned in associated tables or databases.
For heavy multi-tenant feature-set or functionality, there are many community driven gems available. You can find the complete list on [ruby-toolbox]( https://www.ruby-toolbox.com/categories/Multitenancy). For smaller projects or learning exercises, I would rather recommend building the system on your own. It gives you clarity and greater understanding of the framework itself.
Below, is a simple concern that can get you started on making your apps multi-tenant by design. All models that include the below concern will be multi-tenant by default.

{% gist https://gist.github.com/ritikesh/5ce55c89300c9ce0a8f310463d5ed369 %}

---

This bring me to the second pattern. One might think what could `Tenant.current` mean. In any application involving tenants or users, you are most likely to set a global context of the user who is responsible for the current execution - most likely the currently signed in user. 
Typically for rails developers, this involves setting and accessing the current_user in the Thread context like `Thread.current[current_user]`. If you were to extend this behaviour to more actors or objects like a tenant, this can be abstracted into a useful pattern and reuse the concern.

{% gist https://gist.github.com/ritikesh/1c0d1af520cb82caa93c40008f45a019 %}

Upon including the above concern in a model, you get 3 methods by default. An instance level `make_current` method to set the loaded object as current in context. Next are class level `current` and `reset_current` methods. The former returns the currently set object and the latter resets it.

---

The creator pattern which tags the current user as the creator of the object being created.

{% gist https://gist.github.com/ritikesh/fc59fe13581a32c2c4bc93f693905b00 %}

Typical use-cases of this is to map entity creation with users for auditing or logging purposes.
Testing Your Frontend with Cypress.io Framework
Tags: javascript, webdev, showdev
Published: 2018-12-10 19:07:53

---
title: Testing Your Frontend with Cypress.io Framework
published: true
tags: javascript, webdev, showdev
canonical_url: https://snipcart.com/blog/frontend-testing-cypress
---

![Testing Your Frontend with Cypress.io Framework](https://snipcart.com/media/203963/cypressio-logo-with-blue-background.png)

> Editor’s note: this is a guest post by our friend Michael Yagudaev, founder of [Nano 3 Labs](http://nano3labs.com/). He has spent the last 7 years working with tech startups, mid-size and large corporations as a software engineer, UX designer and project manager.

Modern JavaScript frameworks present an easier and more organized way to create web applications. However, [they also add complexity](https://snipcart.com/blog/learn-vanilla-javascript-before-using-js-frameworks) that sometimes breaks things in a subtle yet impactful way.

To combat this and ensure we don’t introduce more bugs than we fix, we can turn to automated frontend testing. The best form of automated tests? Running through the interface as a real user would, clicking on buttons and filling out forms.

**Today I’m going to introduce you to testing with Cypress.io—a modern, frontend-centric testing framework.** But first, a bit of history!

## The old ways

![selenium](https://snipcart.com/media/203967/selenium.png)

For years we have relied on tools like Selenium for End-to-End (E2E) tests on [Multi-page web applications](https://en.wikipedia.org/wiki/Single-page_application). They worked great, letting us write tests in any language (Ruby, Python, JavaScript, etc.) through specific language binding. They also featured a robust community for support and examples.

Then we moved to [Single-Page-Applications (SPA)](https://en.wikipedia.org/wiki/Single-page_application) with complex JavaScript code using frameworks like [React](https://snipcart.com/blog/node-js-react-strapi-tutorial), [Vue.js](https://snipcart.com/blog/vue-js-seo-prerender-example) or [Angular](https://snipcart.com/blog/headless-angular-ecommerce-app), and an API written in a server-side language like Ruby, Python, Go, Node.js, etc. Now things started to break.

→ Read the full post [here](https://snipcart.com/blog/frontend-testing-cypress)
fork a commentar/topic
Tags: devto, featurerequest, meta
Published: 2018-11-29 10:03:15

---
title: fork a commentar/topic
published: true
description: Feature Request 
tags: #devto #featurerequest #meta
---

Hey, first of all many thanks for this great community.
The question is, is it possible to create a new topic from a comment?

In my opinion, discourse often evolves in a different direction than the subject pretends.

An example:
{% link https://dev.to/likebrain/a-science-fiction-terminal-emulator--2lkl %}
The topic here is the science fiction terminal, but the discussion is more about electron security.

I understand the point and would like to discuss further but it is clearly off-topic in this article.

The possibility of forking a commentary "graph/tree" to make a new topic would be cool.

Am I the only one missing such a thing?
Build a blog application on Google App Engine (part 4)
Tags: javascript, node, googlecloud, tutorial
Published: 2018-11-29 08:56:21

---
title: Build a blog application on Google App Engine (part 4)
published: true
description: Node.js tutorial to build an app on Google App Engine
tags: javascript, node.js, google cloud, tutorial
---

![Blog application on Google App Engine](https://cdn-images-1.medium.com/max/2000/1*vqONcla9wTKtqTvI-ZhvCw.jpeg "Blog application")

Hi Devs!

The next part of my tutorial on how to **build a blog application on Google App Engine** is live!

Hope you enjoy it: https://medium.com/@sebelga/build-a-blog-application-on-google-app-engine-blogpost-module-part-4-b929e212c899

Cheers
CSS Border Length
Tags: css, discuss, webdev
Published: 2018-11-29 08:51:13

---
title: CSS Border Length
published: true
description: 
tags: css, discuss, webdev
---
![border](https://thepracticaldev.s3.amazonaws.com/i/2kcf753lf4jnjrdu8f16.jpg)

CSS is great, it's simple and it's really easy to understand it. Of course despite it's awesome, it still has some missing features like for example scope. But in this small article I would like to propose to solve a little bit smaller problem.

I think many of us have faced the case when the border had to be much shorter than it's parent element itself. And unfortunately it's impossible to solve this with border which, in my opinion, could be much easier and better. Currently the only way to solve this just by using some other help elements (hr, span, div, etc.) or pseudo elements:

```css
.title {
    font-size: 24px;
    margin: 0 0 10px;
    padding: 0 0 10px;
    position: relative;
}

.title::after {
    background-color: #efefef; 
    bottom: 0;
    content: '';
    display: block;
    height: 1px;
    left: 50%;
    position: absolute;
    transform: translate(-50%,0);
    width: 50px;
}
```
As you can see this is not the worst solution, but not the best.

I think for this case there can be a better solution - border-length.
What if it would be possible to do like so:
```css
.title {
    border-bottom-length: 50px;
    border-bottom-color: #efefef;    
    border-bottom-width: 1px;
    border-bottom-style: solid;
    font-size: 24px;
    margin: 0 0 10px;
    padding: 0 0 10px;
}
```
As for me this solution looks much more cleaner. And of course shorthands...


What do you think?
Introducing The Dev Report
Tags: software, devs, podcast
Published: 2018-11-29 08:24:27

---
title: Introducing The Dev Report
published: true
description: An introduction to a new podcast for devs.
tags: Software, Devs, Podcasts
---
I started a new podcast for Devs: The Dev Report. I want to discuss the pros, the cons, and the trash talk. I've recently started a non-dev role(which I love). However, I miss dev, and I want to talk about it. 

![Logo](https://thepracticaldev.s3.amazonaws.com/i/8i30ojitfotrjm88w6o8.jpg)

I've been wanting to do a podcast for devs for a while, and I finally pulled it all together. 

The first episode is ready for you. 
[The Dev Report](https://anchor.fm/thedevreport) 
Hope y’all like it! :)
Episode 10: Building a JSON API - Input Validation and Sanitation - Part 1
Tags: node, mongodb, javascript, docker
Published: 2018-11-29 08:21:14

---
title: Episode 10: Building a JSON API - Input Validation and Sanitation - Part 1
published: true
description: Episode 10 starts into the very deep world of input validation and sanitation. 
tags: nodejs, mongodb, javascript, docker
series: building-a-json-api-with-express
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hkcm5xf6zory7y2riqh2.png
---

Dropping user provided data directly into your database is a bad idea. In this episode, we'll look at using `validator.js` to help with that. We'll also spend a little time talking about npm packages, and trust.

{% youtube 2xnXOcK2u1A  %}

I really didn't want to do this in more than one part, but it was going to be a very, very long episode. Part 2 will be along very soon (Source code already has it). As always, drop a comment if you would like to see me cover something else, or cover something differently.

Thanks for watching! 

Source code:

{% github NathanBland/core %}