teleren/devto huggingface dataset:
Remote working protects your programming career against Coronavirus Pandemic
Tags: remoteworking, covid19, remote, job
Published: 2020-03-31 20:29:20

Nothing can stop a programmer! You can always stay productive, even on Coronavirus quarantine. It is, indeed, a perfect opportunity to work remotely. If you like it, keep doing it ;)

It's so easy to start! You only need to follow a personal discipline to be welcomed to the world of remote working. Remote working is not the same as working from home on the couch while eating your breakfast. Of course, you can work at any time that you like. Just watch out for your time, though your schedule is flexible. You don't need to be an early bird, nor to work all day long. Just be wise about your timing to prevent getting behind. Create a pleasant quiet workspace. Use your ergonomic chair, stable internet connection, and second monitor, as you do in an office. 

Also, you are not supposed to be available for your family all day long. You should make it clear for them that you need to maintain your focus at your home office and keep your constant communication with your coworkers if you work as a team member.

It’s that simple to start. The next step is to boost your productivity; touch the link below to make your remote working at COVID-19 quarantine a unique experience.

http://pezeshkzade.com/blog/remote-working-protects-your-programming-career-against-covid-19/
How to you get in touch with other developers or developer communities?
Tags: community, help
Published: 2020-03-31 20:23:08

Simple question: How do you get in touch with other software developers. I mean beside work and stuff. Sure i know going to conferences could be some possible way. I try to figure out how to find some coding friends for some weekend projects or just someone i can ask (I know DEV.to is a great place to do so :D) whenever i'm stuck or vice versa.
Any suggestions?
How not to file your returns
Tags: rabbithole
Published: 2020-03-31 20:20:11

Think tonight I ran into one of those cases when being a developer worked against me. Long story short, I took about 3hrs before giving up on filing my tax returns. Reason? Macros on the `.ods` version of the returns worksheet were failing. Bigger reason? `LibreOffice` opened the debugger when those macros failed.

I mean, a debugger! Couldn't help but `step into` it. Leave alone the fact that I have never written a single line of `LibreOffice BASIC`. The language looked weird, with `Dim`, `REM` and `'`. Yes, that's a single quote. That's how you comment out stuff.

I did finally get the macro to run by commenting out a few lines. Happily zipped my generated file and uploaded it to be greeted by `ERROR!`. Total waste of my time. Tomorrow, I'll be a normal person, look for an excel installation(do they still have those?) and hopefully finish filing my returns.

P.S. it was totally worth it
Celebrating the small wins
Tags: productivity, webdev, career, html
Published: 2020-03-31 18:57:39

Over the last couple of days, I have been practicing on my front end stack. Being primarily backend developer,to become a better front end dev. I managed to build 2 sites, so far, with just plain HTML(bootstrap), CSS and very minimal js. check them out on 
netlify [here](https://determined-lovelace-2a7006.netlify.com/) and [here](kemsa.netlify.com) or on my GitHub [here](https://github.com/tngeene/marketing-template). It's fun realizing that you can achieve so much if you truly put your mind to it. The process is also helping to remove the bias I had towards front end development. Hopefully, I will become a full-stack dev.
AWS Amplify API: GraphQL subscription
Tags: awsamplify, appsync, graphql
Published: 2020-03-31 18:55:39

# Usage in React

In order for the display to be updated immediately after a gameday or game has been created, a GraphQL subscription must be set up.

For this we need an import.

```javascript

import { onCreateGameday, onCreateGame } from "./../../graphql/subscriptions";
```

The subscription will be registerd with the start of the webapp.

```javascript
  useEffect(() => {
    onPageRendered();
  }, []);

  const onPageRendered = async () => {
    readGameDays();
    subscribeGameDay();
    readPlayers();
    subscribeGame();
  };
```

In the function for the subscription it is the API call and the update of the state

```javascript
  const subscribeGameDay = async () => {
    await API.graphql(graphqlOperation(onCreateGameday)).subscribe({
      next: subonCreateGameday => {
        const variant = "success";
        enqueueSnackbar(
          "Gamday created: " + subonCreateGameday.value.data.onCreateGameday.id,
          { variant }
        );

        setGameDayItems(gameDayItems => [
          ...gameDayItems,
          [
            subonCreateGameday.value.data.onCreateGameday.id,
            subonCreateGameday.value.data.onCreateGameday.date
          ]
        ]);
      }
    });
  };
```

This will look like this.

![gameday creation](https://dev-to-uploads.s3.amazonaws.com/i/efwqf0b49wqifwlc9mro.gif)

(recorded with https://www.cockos.com/licecap/)


The same with the games.

```javascript
const subscribeGame = async () => {
    await API.graphql(graphqlOperation(onCreateGame)).subscribe({
      next: subonCreateGame => {
        const variant = "success";
        enqueueSnackbar(
          "Game created: " + subonCreateGame.value.data.onCreateGame.id,
          { variant }
        );

        setGameItems(gameItems => [
          ...gameItems,
          [
            subonCreateGame.value.data.onCreateGame.id,
            subonCreateGame.value.data.onCreateGame.player1.name,
            subonCreateGame.value.data.onCreateGame.player2.name,
            subonCreateGame.value.data.onCreateGame.resultPlayer1.toString(),
            subonCreateGame.value.data.onCreateGame.resultPlayer2.toString()
          ]
        ]);
      }
    });
  };
```

That's all :tada:
DatePicker Antd 
Tags: datepickerantd
Published: 2020-03-31 18:31:07

Hola amigos. Me gustaria saber si me pueden ayudar a saber como hago para obtener el valor del componente DatePicker , que no sea obteniendolo en la funcion Onchange ??? porque si el usuario decide trabajar con la fecha por defecto NO me sirve porque no entra en el Onchange.
CSS: How to apply media print styles in the browser?
Tags: css, html, frontend, ui
Published: 2020-03-31 18:17:50

In this article, we are going to witness applying media print styles in the browser.

#### Small Introduction about media print
Usually, we have different types of media queries
- all
- print
- screen
- speech

*All* is used for all media type devices
*Print* is used for print devices
*Screen* is used for Computer Screens, Tablets, Smart Phones etc
*Speech* is used for screenreaders

Styles written in @media print will apply only to printers. 
We can't see it in browsers. But using developer tools we can render media print styles in the browser.

#### Here is the solution

Open Chrome Dev Tools -> Click on options (before 'X' icon, top right) 
-> More Tools -> Rendering -> Emulate CSS Media Type -> Change Dropdown from 'No emulation' to 'print'


{% jsfiddle https://jsfiddle.net/dLms5a9r/ %}

We can also Emulate CSS media feature prefers-color-scheme and prefers-reduced-motion by using the same tool.
Easy Steps to Getting started with Materialize CSS
Tags: materializecss, responsive, ui
Published: 2020-03-31 18:01:00


[MaterializeCSS](https://materializecss.com/) is a modern responsive UI focused framework based on Material Design that is easy to work with and speeds up development process. Designed by [Google](www.google.com). If you are coming from other UI frameworks or library like [Bootstrap](https://getbootstrap.com/),  working with `materializeCSS` will be pretty seamless.

**USAGE**

working with `materializeCSS` is pretty straightforward,  all you need do is to either download the file into your local development environment or access it via a [content delivery network](https://cdnjs.com/libraries/materialize) (CDN),  there is also an option for [npm](https://www.npmjs.com/) & [bower](https://bower.io/) installation.  All this procedure,  can found in their get started [page](https://materializecss.com/getting-started.html).


After downloading,You'll notice that there are two sets of the files. The `min` means that the file is "compressed" to reduce load times. These minified files are usually used in production while it is better to use the unminified files during development.
| --css
|     |-- materialize.css 
|     |--materialize.min.css
| --js
|     |--materialize.js
|     |--materialize.min.js
| --Licence 
| --README


To start implementing it,  you need to include it in the `<head>` section of your html file as thus

```html
  <!DOCTYPE html>
  <html>
    <head>
      <!--Import Google Icon Font-->
      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
      <!--Import materialize.css-->
      <link type="text/css" rel="stylesheet" href="css/materialize.min.css"  media="screen,projection"/>

      <!--Let browser know website is optimized for mobile-->
      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    </head>

    <body>

      <!--JavaScript at end of body for optimized loading-->
      <script type="text/javascript" src="js/materialize.min.js"></script>
    </body>
  </html>
```

After that is set up,  you can now fully utilize the functionalities of [Materialize CSS,](https://materializecss.com/getting-started.html)  all the features are at your disposal to create that stunning responsive website .
PandemicProgramming
Published: 2020-03-31 17:44:51

Software developers forced to work from home by the COVID-19 pandemic, we want to know how you’re coping and how companies can help. Please take the #PandemicProgramming survey: 

https://forms.gle/CEKjJs7HfKEVuczS8

If we get 150 responses, we'll donate $500 to an open source project chosen by participants.
Install flutter in ubuntu
Tags: flutterandroidstudioubuntuavd
Published: 2020-03-31 17:41:57

Ubuntu flutter installation

prerequisites
-Install android studio and when first open it asked to install additional components, install them.
-go to configure and open AVD manager. install android virtual device. It may ask for /dev/kvm permissions. 
Run these commands 

1. sudo apt install qemu-kvm  

for Add your user to kvm group using:

2. sudo adduser <Replace with username> kvm

If still showing permission denied:

3.sudo chown <Replace with username> /dev/kvm

above commands are temporary for the present opened terminal
use this one also

sudo setfacl -m u:UserName:rwx /dev/kvm

this command works perfectly.



-downoad flutter .tar.xz file from 
https://flutter.dev/docs/get-started/install/linux

put that file in the desired location eg, Documents/sdk/<flutter downloaded file>

goto /sdk folder in terminal and run this command 

tar xf <flutter file name>

-run this to add path

export PATH="$PATH:`pwd`/flutter/bin"

create flutter app 

flutter create <app_name>

goto flutter app folder <app_name>

run command
 
flutter run

To work flutter in android studio, install flutter and dart plugins
in android studio goto configure->plugins search for flutter, installing flutter plugin will also install dart plugin.
Examples on the violation of Liskov Substitution Principle (LSP)
Tags: firstpost, oop, architecture, csharp
Published: 2020-03-31 17:40:56

<!-- The article is a quick demonstration for some examples on Liskov Substitution Principle which is part of the SOLID design principles -->

The following are some examples I've collected that demonstrate how Liskov Substitution Principle could be violated.

_NOTE: Before continue if you need more details about the definition of Liskov Substitution Principle refer to its Wikipedia page [Liskov substitution principle](https://en.wikipedia.org/wiki/Liskov_substitution_principle)._

_NOTE: The below examples don't cover all the possibilities of violating LSP._

## Examples: ##
1. Throwing a `NotImplementedException` from a derived/implementation class is a sign that the parent-child relation is not following LSP. Here in the code snippet `IBird` class cannot represent `Duck` as it has no definition for flying.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1mlt8o58d6zx8ugw1neo.PNG)

2. Hiding a `virtual` parent method in a child class using the `new` keyword also violates LSP. In the code below when the declaration type is changed from the base class `EmployeeAnnualBonus` to the derived class `ManagerAnnualBonus` the value of the annual bonus is changed, which means that they cannot be substitutable without altering the expected result.
(Here `override` keyword should be used instead.)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fe1h9jmj66o3ov5y81a4.PNG)

3. Returning a value of a type that has restrictions that are unknown from the method's signature. Such as returning a value of type `ReadOnlyCollection` from a derived class' method while the return type in its signature is `ICollection`. The code below demonstrates how this approach is making unexpected behavior for the code consumer.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uajvq1lw8qdjphslx2v1.PNG)

4. Adding an implementation for a derived method in a way that violates the system code's policy or conventions (if there is any); like when a derived method returns a `null` value for a list when there is a convention not to return `null` for empty collections but instead to return initialized collections with zero items count.

## Conclusion: ##
It's recommended to keep code components (classes or projects) separated and to depend on abstractions instead of concrete implementations, and that makes applying Liskov Substitution principle more important. The implementation of the derived classes may not be known for the code consumer or at design time and implementing a method that returns a value or accepts parameters in a way that is unclear from its interface (or base class) will mislead who calls that code which  in turns may break the code execution or result in unexpected behaviors at run time.
A very simple dubstep visualizer
Tags: dubstep, announcement, visualizer
Published: 2020-03-23 06:12:57

---
title: A very simple dubstep visualizer
published: true
description: dubstep.ir announcement 
tags: dubstep, announcement, visualizer
---

I'm listening to dubstep sometime, it's really good genere to listen while doing some routines. about two years ago i owned [dubstep.ir](http://dubstep.ir) domain and created a fake radio to play top dubstep songs in loop.

Fake radio? i've created a simple server script that scan and schedule directory of mp3 songs. and repeats the playlist in browser forever. but player state synced with an initial timestamp. so you hear same song in same state on all devices!

Today [dubstep.ir](http://dubstep.ir) recieved an update:

- Dropped fake-radio and uses a real radio station
- Black theme
- Simple circular visualizer

![dubstep.ir March 2020 update](https://dev-to-uploads.s3.amazonaws.com/i/c7oxiax4w0gr51ga4lwq.jpg)

For next update i'm planning to turn it to a very cool audio visualizer.

Next update TODO:

- Multiple visulizers
- Full-screen mode
- Color scheme
- Visualize local audio files
- Radio station selector
- Save and share customizations
- SSL
Vim black magic
Tags: vim, jokes
Published: 2020-03-31 17:40:00

I am watching [More Instantly Better Vim](https://www.youtube.com/watch?v=aHm36-na4-4) by Damian Conway and he has a nice piece of code to put into vimrc of yours and your friends:
```vim
highlight ColorColumn ctermbg=16 ctermfg=green
exec 'set colorcolumn=' . join(range(1,80,4), ',')
```
Makes your python code look all cool like so:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/o7wryvefxxfgdfanyw5g.png)
Grab while it's hot!
Verz Design: Best Web Design and Development Service Provider in Singapore
Tags: webdev, webdesign, digitalmarketing
Published: 2020-03-31 17:36:53


Internet made our life very easy, has made us all connected than ever before. Many MNC companies taking the advantage of it, have taken their businesses online to better communicate with their target audiences.

Apart from these businesses, several visionaries have created their online empire from the ground up as they stay dedicated to increasing their online influence.

It’s not very easy as it sounds though, because you have to look after lots of things when establishing an online presence, including the number of competitors that you have to fight against for the top spot on the search results.

**Best web design and development service provider in Singapore**

Verz Design can provide you with a multitude of services that will surely benefit your business’ dive into the online world. That's the reason it is reputable and responsible web design agency in Singapore. With more than a decade of experience under our belt, we have a wide range of talented people. From graphic and web designers to web copywriters and SEO specialists, we dedicate ourselves to giving your website the push it needs to bring in all those page visits.

In addition to our work, we also ensure that we only use the best platforms for all your eCommerce web design and development needs: Magento, Shopify, WooCommerce as well as Custom eCommerce applications. With our expertise in these areas, we can assure you that we’ll get you to the top of the search engine results in no time!

We take pride in our work and ability to deliver outstanding services to any businesses, from small start-ups to international corporations. Whether you’re from the automobile, engineering, fashion, or retail industry, it doesn’t matter. We’ve got your back, and our team of masters will know just how to make your website stand out.

Presently, in digital marketing world, content is the king. We know that better than anyone. That’s why we strive to maintain excellence in all aspects of our work, excellence that we can proudly extend to you. Be one of the 3000+ active clients we’ve successfully serviced. Because no matter what your business is, we can guarantee you that we’ve got what it takes!
My game works! 
Tags: emotions, cognitivetraining, gamedev
Published: 2020-03-31 17:34:07

---
title: My game works! 
published: true
description: emotion and memory training game
tags: #emotions, #cognitivetraining, #gamedev
---

I have gotten far enough to say: good enough. I have not yet published the game online, its waiting for the push ... 
There are still a few things i like to add and then i want to add new megafeatures like emotion recognition... who knows... where this project could take me!

So, it's kinda happy time for me. I could also clean up the game much and add tests. This has not been a TDD web development.

Also! I am thinking of making it a multiplayer game for two persons. to start with using WebRCT, but I have never done anything like it.

##The game

SO HERE WE ARE on GITHUB: [emomemo][https://github.com/Lytecyde/emomemo]
it is written in js, css, html
open the index.html in /classic/html with your favourite browser 
I have tried it on linux and windows 10 chrome

it is a cognitive training game for improving thinking about positive emotions. Engaging in positive emotions makes people more creative and productive and helps solve problems. 
Men, children and people with several neurodiversity issues could potentially all benefit from improved emotional training.
The game is one attempt at creating something that could help with emotion understanding and showing positive emotions. 
Only if you play along and repeat all the emotions that show up!
Learning Python 
Tags: beginners, python
Published: 2020-03-31 17:31:09

Hey to you all.

I'm actually just taking my chances with this post. 

I recently bought a Udemy python course. Previous I had enrolled for a EdX course which only covered basics of python. Somehow though I feel stuck and can't seem to crack into a specific mindset which will help me grasp everything better. 

I have even resorted to checking out python references and methods on W3 just to try a different way to grasp all this. I don't know what to do. I have 3 weeks to try and get somewhere with this language before the world gets back to its fast paced life.

Does anyone have any suggests? 🙏
Unfolding & Sugar Coating for Kubernetes RBAC
Tags: kubernetes, security, rbac, visualization
Published: 2020-03-31 17:16:02

## Kubernetes RBAC

Role-based access control (RBAC) is a method of regulating access to computer or network resources based on the roles of individual users within your organization.
RBAC authorization uses the `rbac.authorization.k8s.io` API group to drive authorization decisions, allowing you to dynamically configure policies through the Kubernetes API.

Permissions are purely **additive** (there are **no “deny”** rules).

A Role always sets permissions within a particular namespace ; when you create a Role, you have to specify the namespace it belongs in.
ClusterRole, by contrast, is a non-namespaced resource.
ClusterRoles have several uses. You can use a ClusterRole to:

- define permissions on namespaced resources and be granted within individual namespace(s)
- define permissions on namespaced resources and be granted across all namespaces
- define permissions on cluster-scoped resources

If you want to define a role within a namespace, use a Role; if you want to define a role cluster-wide, use a ClusterRole.

# `rbac-tool viz`

A Kubernetes RBAC visualizer that generate a graph as dot file format or in HTML format.

<img src="https://raw.githubusercontent.com/alcideio/rbac-tool/master/img/rbac-viz-html-example.png" alt="rbac-tool" width="600"/>

By default 'rbac-tool viz' will connect to the local cluster (pointed by kubeconfig)
Create a RBAC graph of the actively running workload on all namespaces except kube-system

See run options on how to render specific namespaces, other clusters, etc.

Render Locally

```
rbac-tool viz --outformat dot && cat rbac.dot | dot -Tpng > rbac.png  && open rbac.png
```
Render Online

```
https://dreampuf.github.io/GraphvizOnline
```


Examples:

Scan the cluster pointed by the kubeconfig context 'myctx'
```
rbac-tool viz --cluster-context myctx
```


Scan and create a PNG image from the graph
```
rbac-tool viz --outformat dot --exclude-namespaces=soemns && cat rbac.dot | dot -Tpng > rbac.png && google-chrome rbac.png
```

Installation instructions can be found here: **[rbac-tool](https://github.com/alcideio/rbac-tool)**