teleren/devto huggingface dataset:
Day 312 : Supposed To Be
Tags: hiphop, code, coding, lifelongdev
Published: 2021-02-18 23:28:30

_liner notes_:
- Professional : Got up early to make sure my set up was good for my presentation. Had our greater team meeting. Good to see everyone. Then it was time to do my talk. Surprisingly, everything worked out well. The Web Component we created worked! I was so relieved. haha My slides transitioned properly and the speech to text worked pretty well. I recorded the audio into my Pixel 4a and the transcription is pretty good. Going to see if I can use that instead. After that, I took the audio recording, uploaded and linked to it in my application and got it working so that while the audio plays, the speech to text shows up and the slides change when they are supposed to be. Pretty good day. 

- Personal : Last night, I went through a bunch of tracks for the radio show and did some last minute prep for my talk. I think I may have also did some research into the database for my side project. Don't really remember, I was pretty tired. haha.

![An image of space](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cfzmu2tvca9gygbsterj.jpg)

After work, I watched the Mars rover land on the planet's surface. It was launched in like June 2020. Kind of amazing! They even got pictures back from the surface. Going to work on my side project and go through some tracks for the radio show. Still tired from the presentation. haha My brain is fried.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube UviEgdNu3ZM %}
GDPR 2021
Tags: news, discuss, productivity, devops
Published: 2021-02-18 23:20:36


A few fun facts:

The UK left the EU on January 1, 2021.

We have a new UK-GDPR, the amended Data Protection Act 2018

**GDPR UK update 2021**
Since the UK has left the EU, the question of personal data transfers is top of the list for many websites, companies and privacy organizations.

In the agreement signed by the UK and EU in end of December 2020, a provision allows for the continued, unrestricted flow of data between the two blocs for an interim period of six months (until June 2021).

The UK already has in place a new domestic data privacy law called **UK-GDPR** that is *exactly the same* as the EU version and is supported by the older Data Protection Act of 2018.

Compliance with the UK-GDPR and EU’s GDPR remains an obligation for any website, company or organization who process personal data form either inside the UK or EU: the explicit consent of users must be obtained before any processing or transfer is allowed to take place.
How to write the best  code
Tags: programming, beginners, career
Published: 2021-02-18 23:15:13

You have a dream. Or a task. Or something epic you want to create. You devote time to it. You have a vision. You get started. But progress is slow and it never moves much.

In the software world working with new engineers here is what I have noticed:

* A desire to be perfect immediately
* Too much focus on speed of completing their work
* Everything works the first time

The core problem is no one makes something that is perfect the first time. Even the experts dislike their first version. It's a loop of creating, testing, destroying, and making things better.

When we work together I help them break down their problem into chunks. After identifying a chunk, I  ask them to write the worst version they can that works. I don't care about style, performance, and all the things that will come. I want the most basic thing that shows progress and is working.

My motto is:
`It is easier to destroy than create.`

If I write something awful in code most people can 'see' the problems. Yet, if we are staring at a blank screen and trying to imagine the 'ideal' way to write something it is an uphill battle with resistance and over-thinking.

So make fucking awful art. Code horribly something that works. Forget about all the beauty and style to come.  Leave all your hopes and dreams of perfectionism at the door. Embrace imperfection and create garbage. From there, revise, iterate, test it out. Find what you can and make that next version. Eventually, this process will lead to something great.
International Women's Day Events
Tags: womenintech, community, wecoded, eventsinyourcity
Published: 2021-02-18 23:08:47

Hi DEV community!

I've been getting involved in a lot of diversity, equity, & inclusion activities lately both in and outside of work, and I wanted to let everyone know about these two virtual events coming up on **International Women's Day** on **Monday March 8th, 2021**!

Both of these events are FREE to attend and have all-day talks, panels, workshops, networking, and more. Last year I attended **[Codeland:Distributed 2020](https://codelandconf.com)** and **[LTX Fest](https://ltxfest.com)** and was super impressed by the organization and representation of diverse groups, and I'm looking forward to attending them both again this year, in addition to these IWD events!

#[Elevate 2021](https://girlgeek.io/conferences/elevate2021/)

From their website: "Join thousands of women sharing, empowering and elevating each other – don’t miss the 4th annual Girl Geek X: Elevate virtual conference for mid-to-senior level women.

A full day of talks on leadership, resilience, inclusive research, modernizing mobile codebases, strategies for remote teams, security, AI, and more!"


#[TECH(K)NOW DAY](https://www.techknowday.com)

From their website: "The conference will showcase women in tech (cis, trans, non-binary) and their craft, through a variety of talks (example - coding, testing, web, mobile, games, enterprise systems, frontend, backend, devops, cloud, IoT, accessibility, cybersecurity, infosec, AI, machine learning, deep learning, data science, robotics, AR, VR, MR, blockchain, innovation, opensource, UX/UI/Design, product management, project management, etc) as well as career, personal development, startups, business, strategy, and inspirational talks.
 
Workshops and panel discussions will be led by women and/or allies."


*Are you planning on attending or do you know of any other events? What topics are you looking forward to? Feel free to share in the comments or message me here on DEV!*
Unable to fix Antd Modal Height
Tags: react
Published: 2021-02-18 22:36:18

I am trying to set **Antd Modal height to 1000px by default** but its **not getting applied**. Please suggest where I might be doing wrong. Below is my code for the Modal.

```
<Modal style={{ height: "1000px" }} className="pm" width={600} title="Select" visible={isModalVisible3} footer={null} onCancel={() =>setIsModalVisible3(false)}>
    <span>Sample Text</span>
</Modal>
```

I even added `.pm{height: 1000px;}` in my **base.css** file but no luck

Please suggest a workaround.
Help with includes() in js
Tags: filter, includes
Published: 2021-02-18 22:31:42


     ANY HELP WITH JAVASCRIPT includes() function
_____________________________________________________

    const formA = [
        {id:37,name:'New',another:'things'},
        {id:31,name:'Old',another:'things'},           
        {id:3,name:'Oldest',another:'things'}
     ];

     const formB = [
        {id:37,name:'New',another:'things'},
       {id:31,name:'Old',another:'things'},          
       ];

       const difference = formA.filter(x => !formB.includes(x.name))
       console.log(difference); 


 would someone kindly explain to me how includes() method works?
 i was expecting____ [{id:3,name:'Oldest',another:'things'}] as output
  _________
 but instead getting.

 //__________output
  [
    { id: 37, name: 'New', another: 'things' },
    { id: 31, name: 'Old', another: 'things' },
    { id: 3, name: 'Oldest', another: 'things' }
  ]
Git Good starting With Github
Tags: github, tutorial
Published: 2021-02-18 22:04:08

Don't underestimate the power of version control. Long past us are the days of sending code over email. What are we, cavemen?

We have Github for that now. If you haven't created a Github account you are missing out on greatness. Kind of.
Github is an amazing tool, personal profile, workflow assistant, and damage control platform for teams to use. Using dynamic repositories and branching of repositories you can do amazing things to contribute to the work of code projects.

First and foremost is setting up a repository. Once that's done, you want to establish your team hierarchy, permissions, and such.

Using the power of cloning, branching, commits, pushes and pulls, you can separate a small isolation chamber where you can edit, change, and view your version of the application that you and your team is working on. This is what's known as branching. Once you've finished your changes on your branch you can commit to your branch. Push your changes and request your changes to be pulled / merged into the main branch.

That's your baby. Don't let anybody hurt your main branch. This is done using controls, discussion, and a request/confirm system that is native to Github.

There's a lot more to Github than just what I've talked about here but if you want to hear some more of my thoughts on that you can check out the video that I put out on it.

Video:https://youtu.be/CI6yyNpOncw
Channel:https://www.youtube.com/channel/UCDRkz-mU0NWAZTgN9kVc0Ag
How do you wrap your head around observability?
Tags: discuss, observability, devops, sre
Published: 2021-02-18 22:01:31

We a current contest going with New Relic centered largely around observability, and it got me wanting to discuss observability in general.

{% link https://dev.to/devteam/announcing-the-new-relic-hack-the-planet-contest-on-dev-5d %}

How do you develop a mental model around observability in software development? How do you teach new folks about observability?
Guest Speaker for short lecture on React Native workflow?
Tags: reactnative
Published: 2021-02-18 22:00:09

I'm teaching the senior capstone class at the University of Utah.  Multiple teams have expressed a desire to build their mobile apps using react native, but none of them have any experience with the framework (our mobile dev class at UoU uses the native mobile APIs).  Would anyone heavily involved with react native at their company be willing to give a short lecture (~30m) on a good react native workflow for small teams?  If you're interested, shoot me an email at cscott.brown@utah.edu.

Cheers,
-Scott
Switching from HttpClientHandler to SocketsHttpHandler
Tags: csharp, socketshttphandler, xunit, dotnetcore
Published: 2021-02-18 21:51:16

While going through a recent code review for my Rest API test automation it was suggested that I switch from using *System.Net.HttpClientHandler* to *System.Net.Http.SocketsHttpHandler*. 

According to [this MS article](https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?view=netframework-4.8#httpclient-and-net-core) the advantages include:

1) A significant performance improvement when compared with the previous implementation.
2) The elimination of platform dependencies, which simplifies deployment and servicing.
3) Consistent behavior across all .NET platforms.

The switch seemed pretty easy until I tried to leave certs invalidated for debugging (breakpoints anyone?). It used to easy peasy with *HttpClientHandler* just being a property of the object:

```
public static HttpClient CreateHttpClient()
{
    var handler = new HttpClientHandler()
    {
       ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
    };
    return new HttpClient(handler);
}
```

The *SocketsHttpHandler* library doesn't have this class object property :(, instead you have create a *SslClientAuthenticationOptions* object for the *SocketsHttpHandler* class like so:

```
public static HttpClient CreateHttpClient()
{
   var sslOptions = new SslClientAuthenticationOptions
   {
      // Leave certs unvalidated for debugging
      RemoteCertificateValidationCallback = delegate { return true; },
   };

   var handler = new SocketsHttpHandler()
   {
      SslOptions = sslOptions,
   };

    return new HttpClient(handler);
}
```

It was very hard to find this example anywhere so I hope you can use it when you have to!
Company ask me recommendation for Vue 3
Tags: vue, javascript, webdev, devjournal
Published: 2021-02-18 21:48:07

While finished 2 courses from [Zero To Mastery Academy](https://zerotomastery.io/), [Js Advanced Concept](https://academy.zerotomastery.io/p/advanced-javascript-concepts), [Junior To Senior Web Developer](https://academy.zerotomastery.io/p/the-complete-junior-to-senior-web-developer-roadmap) and currently learning [Data Structures and Algorithm](https://academy.zerotomastery.io/p/master-the-coding-interview-data-structures-algorithms) plus [Vue 2 - 3](https://www.vuemastery.com/).

I'm looking for jobs on Upwork and suddenly a job post ask me couple questions, that i find out relevant to share.


**If you started a brand new project tomorrow, would you personally use Vue 2 or 3, and why?
Vue 3.**

There are certainly benefits of using it and just to mention a couple ones:
- Lightweight
- V-model redesign mechanism (which makes more easy to handle and maintain code), make it simpler to handle multiple models with simple payload.
- Reactivity now use Proxy Object instead of Object.defineProperty which benefits from a native object in JavaScript, ergo improve performance.
- Composition API, that makes the code much more modular an easy to debug.
- Typescript support, which makes the code scalable.

**What is your preference, to use Bootstrap as mostly the skeleton and write more custom CSS? Or, to try and do as much as possible with native bootstrap styles and minimal custom CSS?**

It's gonna depends on the budget and the client requirements.
If client prioritizes design over boilerplate, use Bootstrap or Vuetify will be a way to go candidate.

**What is your process for selecting an npm package for a given problem? Lets say I want to find a package for phone number inputs and many meet your requirements, how would you evaluate which repo is best?**

The more packages a project has, the more problems we'll have to handle. Stick to native as much as possible, while keep complexity very low. 
Repeated code in some circumstances, may benefit more in term of cost/time rather than a package. ( There is a heated debate over this )

Even so, if I need to choose a package this will roughly be the criteria.

- Vue recommendations
- Adoption by the community
- Open source
- Maintainers activity

If you wanna complete my answer, please, feel free to do it.
How to make multi-theme support using CSS variables
Tags: javascript, tutorial, html, css
Published: 2021-02-18 21:09:24

Supporting multiple themes for your website is a difficult problem to solve. If you did it even a couple of years ago, you would agree with that. Quite often solution was to have wholly duplicated stylesheets. But that is messy. Maintaining an enormous stylesheet for each theme is not good. What if you have more than two. It is easy to miss some change and not notice it. It is also a performance issue. Unnecessary data to load. Thankfully, with CSS variables, this feature became much more comfortable to implement. And here is how.
 
## Step 1: Setup
For this to work, you do need to spend some time organizing your CSS code. And that is to define your styling using CSS variables. You can read how to do this in my other [article](https://kristijan-pajtasev.hashnode.dev/white-labeling-react-application-with-sass-and-css-variables).

## Step 2: Exclude CSS variables
You can define CSS variables in the same file where you are using them. But the better option is to exclude them as a separate file. Let’s call it variables.css. This way, replacing variables file changes the whole theme. Just remember to load them before you load the rest of the CSS.

```html
<link  rel="stylesheet" href="/theme.css">
<link  rel="stylesheet" href="/variables.css">
```

## Step 3: Create other theme files
When your styling and variables are separated, you can create another file with values for a new theme. The problem, you can use only one variables file at a time. The last one defines the look. 
```html
<link  rel="stylesheet" href="/theme.css">
<link  rel="stylesheet" href="/variables.css">
<link  rel="stylesheet" href="/other-theme-variables.css">
```

## Step 4: Toggle active variable file
For toggling, first, you need to add an ID to the link element. Then you can use JavaScript to toggle the href attribute value. In this way, you only replace the used variables file without fully reloading the page. And your theme values get applied.

```javascript
document.getElementById("themesID").href = "/other-theme.css"
```

***

For more, you can follow me on [Twitter](https://twitter.com/hi_iam_chris_), [LinkedIn](https://www.linkedin.com/in/kpajtasev/), [GitHub](https://github.com/kristijan-pajtasev/), or [Instagram](https://www.instagram.com/hi_iam_chris_/).
Minimal dev.to post publish tool
Tags: tooling, node, writing
Published: 2021-02-18 20:48:03

Just wrote a small NodeJS application to publish markdown content into dev.to:

[dev_to_blog](https://github.com/lwz7512/dev_to_blog)

For those devs who love to use VSCode to write blog articles, have a try this minimal dev.to blog publisher.

Any feedbacks are welcome!

I'm currently looking for a new job, if you like my open source [projects](https://github.com/lwz7512), and my [experience](https://wenzhi.netlify.app/) match your needs, feel free to contact me.

Thank you!
Convert Rows to Columns with Ruby's Transpose Method
Tags: ruby, quicktip
Published: 2021-02-18 20:43:51

The first time I used the `transpose` method, I was solving a particular problem. I was creating a tic-tac-toe game during my software apprenticeship. I had split up the game into a few classes. I had a class called `Board` that represented the tic-tac-toe board and was responsible for holding the board's state after each move. The `Board` class was initialized with an array called `spaces` to represent the board's spaces; the default was an array with nine spaces `[0, 1, 2, 3, 4, 5, 6, 7, 8]`. I had a method that would return the rows named `rows.`

```ruby
def rows
  [@spaces[0..2],
   @spaces[3..5],
   @spaces[6..8]]
end
```

I also needed a method to give me the columns. I could have written something like this.

```ruby
def columns
  [@spaces[0], @spaces[3], @spaces[6],
   @spaces[1], @spaces[4], @spaces[7],
   @spaces[2], @spaces[5], @spaces[8]]
end
```

But instead, my method took advantage of Ruby's `transpose` method.

```ruby
def columns
  rows.transpose
end
```

Transpose turned my rows into columns, and this was a fair use case for this because I was able to create a method that held all the possible winning solutions for a game. You win by getting your marker in 3 consecutive spaces in tic-tac-toe, either across a row, a column or diagonally.

```ruby
def winning_solutions
  winning_solutions = []
  rows.map { |row| winning_solutions << row }
  columns.map { |col| winning_solutions << col }
  winning_solutions << diagonal_ltr
  winning_solutions << diagonal_rtl
end

def diagonal_ltr
  [@spaces[0], @spaces[4], @spaces[8]]
end

def diagonal_rtl
  [@spaces[2], @spaces[4], @spaces[6]]
end
```

_(Disclaimer for the above code: I wrote this code only months into my software journey, I would do things differently now.)_

Transposing is perfect when you have a grid and want to transform the rows into columns for easy access.
AzureFunBytes Episode 31 - Agile Development with @AbelSquidHead
Published: 2021-02-18 20:20:38

[Is DevOps Agile? Is Agile DevOps?](https://azure.microsoft.com/overview/devops-vs-agile/?WT.mc_id=devops-15964-jagord) Wait a sec... what is Agile? That's the question we'll answer this week on AzureFunBytes. Every week we try to tackle a subject that covers the foundations of using Azure. This week we'll look into Agile Development with none other than the rock god and [Principal Cloud Advocate, Abel Wang.](https://twitter.com/AbelSquidHead) 

Software development has come a long way, with new languages, new tools, and tons of processes for us to follow to deliver value to our customers. Agile development focuses on the delivery of features to our users by focusing on smaller, collaborative efforts. Unlike methods such as waterfall, we're not just delivering everything in one day. We can ship almost every day, several times a day, rather than that one giant release every quarter. 

{% youtube kx6S4ipmTmU %}

Abel will take us through some of the basics and explain who, what, when, where, and why of Agile Development! 

Learn about Azure fundamentals with me! Watch live on Microsoft LearnTV every week and take part in the live Q&A and polls right from the browser! Live stream is available on Twitch at 2 pm EST Thursdays. You can also find the recordings here as well: 

https://twitch.tv/azurefunbytes 
https://twitter.com/azurefunbytes 
https://aka.ms/jaygordononyoutube

[Microsoft Learn: Azure Fundamentals](https://cda.ms/1XN) 
[Microsoft Azure: $200 Free Credit]( https://cda.ms/1XP)
[Azure DevOps](https://cda.ms/1XQ)
[Agile Culture](https://cda.ms/1XS) 
[Welcome to Agile](https://cda.ms/1XR)
[What is Agile?](https://cda.ms/1XZ) 
[What is Agile Development?](https://cda.ms/1XT) 
[Choose an Agile approach to software development](https://cda.ms/1Y6) 
[About Boards and Kanban](https://cda.ms/1Y5) 
[Agile Glossary](https://cda.ms/1Y4) 
[Choose a process](https://cda.ms/1Y3) 
[What is Scrum?](https://cda.ms/1XW) 
[Agile Manifesto](https://agilemanifesto.org/)
Using proxy with GraphQL.Client in C#
Tags: graphql, csharp
Published: 2021-02-18 20:17:52

---
title: Using proxy with GraphQL.Client in C#
published: true
description: Here is a short snippet how to set up proxy with [GraphQL.Client](https://github.com/graphql-dotnet/graphql-client) in C#.
tags: GraphQL, csharp
//cover_image: https://direct_url_to_image.jpg
---

Here is a short snippet how to set up proxy with [GraphQL.Client](https://github.com/graphql-dotnet/graphql-client) in C#. In this example I use a local proxy for debugging.

```C#
var proxy = new WebProxy
{
    Address = new Uri($"http://127.0.0.1:8888"),
};

var httpClientHandler = new HttpClientHandler
{
    Proxy = proxy,
};

var options = new GraphQLHttpClientOptions
{
    EndPoint = new Uri("https://test.com/graphql"),
    HttpMessageHandler = httpClientHandler
};

var graphQLClient = new GraphQLHttpClient(
    options,
    new NewtonsoftJsonSerializer()
);
```