teleren/devto huggingface dataset:
What is TWA?
Tags: mlh, majorleaguehacking, localhackday, pwa
Published: 2021-01-14 17:09:13

##Info

**TWA** is generally known as Trusted Web Activities. TWA is related to the PWA which is Progressive Web App an web app which works offline on different screens & OS using service workers. Which is essentially required a browser to use a PWA. 

## Bit more info
So what is TWA? Well TWA is all about trust which is related to the security. Like is your web app secured even if it's running offline somewhere on a computer? Well, that's all about for TWA starters :P.

## Requirements
So what are the requirements to run a TWA? It requires any Browser. Due to security & etc For android, it runs on only Kitkat + Upper android versions with a browser(recommended Chrome).

## Customization
Well, guess what wanna make you TWA look like your branding? It can be done in Chrome, Firefox (Not sure about other Browser's). You can customize your TWA to look completely different from other tabs.

## Downside
A Downside of the TWA is that on running offline the TWA won't show Web pushed Notifications & background Syncs.

## About Google Play
And if you are creating TWA so you can publish your Brand web app to people well it has to adhere to the google play store policy. For e.g, fast loading, security & etc. You can check your web app performance using Lighthouse(It's an open-source testing tool for performance, SEO, etc.).

Well, that's all Thank you for reading till the end,
**Sunil Chaudhary**
Important Career Advice
Tags: beginners, discuss, career
Published: 2021-01-14 17:08:51

---
title: Important Career Advice
published: True
description: 
tags: #beginners, #discuss, #career
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/015mhvnbd5setu6o0pq6.png
---

Sometimes, you may hear about a tech guru telling how good he's using a specific technology or language and will try to force everybody to use it. This is a clear warning for me. 

The reality, in Computer Science and Software Engineering, the more you know about something less is the understanding feeling. This is a process I describe using this simple chart.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/015mhvnbd5setu6o0pq6.png) 

You start getting more knowledge, you'll become more confident, but at some point, you have enough knowledge that you may realize that same as Jon Snow, you know nothing :).

Isn't bad to tell about how good u are, but forcing other people to use your methods or using your knowledge to undermine others' opinions in a bad way is just very bad. This is very common when you have a guru-tech-boss and he doesn't allow anyone to question him or think differently. 

Don't be that guru-tech-boss, don't stay close to those people. If you find one, probably he isn't an expert as he tells. 

Just keep learning. 

When someone asks what tech should be used, a real senior answer is __depends__

[Twitter](https://twitter.com/levisvm)
[Portal](https://levipy.com)
[Dev Profile](https://dev.to/levivm)
Canvas Javascript: Scrivere del testo
Tags: javascript, canvas, testo
Published: 2021-01-14 16:59:33

---
title: Canvas Javascript: Scrivere del testo
published: true
description: Come scrivere sul canvas di javascript
tags: javascript, canvas, testo
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/1p4b6oydndt4734gang7.jpg
---

Per scrivere del testo su canvas ci sono due funzioni che possiamo usare dopo aver inizializzato l'elemento canvas e dopo aver richiamato il context, e sono:

* fillText(testo, x, y) 

* strokeText(testo, x, y)

Gli **argomenti** di queste due funzioni **sono identici** e sono: **la stringa di testo** da visualizzare e la **pozione x, y** di partenza. La differenza tra le due è che **_strokeText_ traccia il contorno delle lettere**, mentre **_fillText_ le scrive 'piene'**.

### STILI

Un metodo molto famigliare per chi usa il css e il **metodo _font_ che è uguale** al suo corrispettivo **per css**.
Come nel css questo metodo può cambiare la dimensione, il tipo di font e lo spessore (esempio 'bold'), **l'unica differenza è che tutti valori bisogna passarli come stringa**.

* `ctx.font = 'valore';`

Questo e gli altri metodi vanno messi prima delle funzioni che scrivono a video (_fillText_ e _strokeText_)

``` javascript 
ctx.font = 'bold 42px sans-serif';
ctx.fillText('Questo testo sarà grande 42px e in grassetto', 50, 30)
```

Un'altra altra **formattazione del testo** comune è **l'allineamento**, che può essere a destra, sinistra o al centro.

* `ctx.textAlign = "left" || "right" || "center" || "start" || "end";`

Come si vede, ci sono altre due opzione utilizzabili oltre a quelle classiche: **_start_** che è l'opzione di default e **allinea il testo all'inizio della linea**, mentre **_end_ con la fine della linea**;

``` javascript 
ctx.font = '18px ';
ctx.textAlign = 'left';
ctx.strokeText('Text left', 150, 100);
ctx.textAlign = 'center';
ctx.strokeText('Text center stroke', 150, 200);
ctx.textAlign = 'end';
ctx.fillText('text start to end', 150, 300);
``` 
Per colorare il testo ci sono due funzioni _colorfill_ e _colorStoke_ il primo colora il volume della scritta e si usa prima di _fillText_, mentre il secondo colora il bordo e si usa prima di _strokeText_.
Queste funzioni sono quelle usate per colore anche le linee e le forme geometrico, quindi se volete approfondire vi rimando all'articolo [Canvas Javascript: Come aggiungere lo stile alle figure geometriche](https://dev.to/camizzilla/canvas-javascript-come-aggiungere-lo-stile-alle-figure-geometriche-304m), dove ho dedicato un paragrafo ai colori.

{% codepen https://codepen.io/camizzilla/pen/bGwjWOm %}

## CONCLUSIONE

In questo articolo abbiamo imparato a rederizzare le scritte sul canvas.

Se avete dei consigli, suggerimenti o critiche costruttive lasciatemi un commento qui sotto oppure contattatemi trammite i miei social.
Understanding MLH and what Local Hack Day: Build is about
Tags: mlh, majorleaguehacking, localhackday
Published: 2021-01-14 16:56:36

_Please Note: This is my first ever blog post and I got to know about the existence of MLH in less than a week ago. Construction criticism is most welcome_

## What is MLH?

MLH stands for Major League Hacking. It is a company that operates a league for student hackathons. This company has an amazing community that makes learning and building fun and really cool!

They have hackathons every week and they also hold some special events like Local Hack Day (there are more events, I just don't know them yet).


### What are Guilds? 

This community is so huge that it has thousands of people from all over the world! Therefore, they have the concept of guilds. Each guild has a purpose/goal in mind and co-members of the guilds help each other in the challenges. It's an awesome way to deal with such a huge number of people. It's a community inside a community and the members are super-supportive!


## What is Local Hack Day?

Local Hack is an event that has 3 formats:
1. Learn
2. Build 
3. Share
 <br>

* Since I am new to this community, I missed out on the Learn Event, which's the reason I don't know what it is exactly!

* Build is a place to build as many projects as possible. In the year 2021 (that is now)

### 2021 Edition
 
Due to the COVID19 scenario, this event is being held virtually. That means anyone from anywhere in the world can participate! (I live in India so that I benefit from this situation) <br>

During this week, participants get to attend workshops (on many topics: coding in Python, blockchain, AWS and so many more!), daily challenges (where we get new challenges every day and the deadline to solve them is that day!), week-long challenges (the goal is to complete them in the week). <br>

These challenges range from building technical projects to designing logos/outfits. The difficulty level of the technical projects is entirely up to us. We are given a guideline and we are supposed to build on that. We could build something from scratch, watch/read a tutorial or build upon a starter project. 

### My experience and thoughts

1. What I really like about this event is the enthusiasm with which the organizers conduct the workshops and fun-events. This event is about learning **with** enjoying
2. There was a lot of learning on the go
3. Since all of us are struggling with similar problems, it's you don't feel demotivated. Stuck somewhere? Ask on the guild. Chances are someone has already figured the problem out and is more than willing to help. 

* Share - Really excited to participate in this in March and know more about it 

## Conclusion
All in all, I am really excited to participate in this ongoing event (it is Day 4 of 7) and learning/enjoying as much as I can!
How to hire Angular developers (10 key questions for a job interview)
Tags: staffaugmentation, softwaredevelopers, angulardeveloper
Published: 2021-01-14 16:56:34

When you are going to [hire Angular developers] (https://www.sundevs.com/staff-augmentation) you should filter the candidates that know the Angular’s core concepts, in a beginning stage, and afterwards filter them through a technical exam, for instance, a project that helps us prove the candidate’s knowledge. Let’s see some fundamental interview questions for an [Angular developer] (https://www.sundevs.com/blog/how-to-hire-angular-developers-10-key-questions-job-interview): 

1. What is a dependencies injection in Angular?

2. What isAngular Ivy?

3. What is service-side rendering? How is it possible to implement it in Angular? 

4. What are the lifecycle hooks and which are available?

5. What are the types of directives in Angular?

6. What are the observables and what can we do with them?

7. What is defer change?

8. What is a class decorator?

9. What is binding?

10. What is the purpose of @NgModule?
How to hire ReactJs developers (10 key questions for a job interview)
Tags: staffaugmentation, softwaredevelopers, reactdeveloper
Published: 2021-01-14 16:53:48

When [hiring React developers] (https://www.sundevs.com/blog/how-to-hire-reactjs-developers-10-key-questions-job-interview) it's important to know the project’s requisites that the person is going to work on. You can use methods like live coding or assigning a project with very specific characteristics so the candidate resolves them. This is a way to get to know if the programmer implements good habits or not. Let’s take a look at some questions you can ask a candidate:

1. What is State?

2. What are the differences between state and props?

3. How doesVirtualDOM work and what are the differences with Real DOM?

4. What is the render() method used for in React?

5. What are the lifecycle’s methods in React?

6. What is the difference between Stateful Components and Stateless Components?

7. What are HOC (High Order Components)?

8. What is Redux and which are its components?

9. Explain Redux’s components

10. What are hooks? Mention how do useState and useEffect work

This is a process that will help the developers to know if they can have a good fulfillment in the project.
Trusted HTTPS/SSL for localhost/127.0.0.1 
Published: 2021-01-14 16:45:55

**mkcert**(https://github.com/FiloSottile/mkcert) is a simple tool for making locally-trusted development certificates for localhost or 127.0.0.1. It requires no configuration.

## Installation 

```
yum instal go
git clone https://github.com/FiloSottile/mkcert && cd mkcert
go build -ldflags "-X main.Version=$(git describe --tags)"
```

## Generate 

```
./mkcert -install 

./mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1

ls
```

You should see certificates in current folder 

## Nginx configuration 

```
server {
    listen 80 default_server;
    server_name _;
    return 301 https://$host$request_uri;
}

server {
  #listen 80;
  listen 443 ssl;
  server_name 127.0.0.1;

  ssl_certificate /root/mkcert/127.0.0.1.pem;
  ssl_certificate_key /root/mkcert/127.0.0.1-key.pem;
  
 ## replace  /root/mkcert/ to your path 
  
  ##ADDITIONAL_CONFIG
  
}
```
How to accomplish a team's objectives with augmented staff?
Tags: staffaugmentation, teamobjectives, augmentedstaff
Published: 2021-01-14 16:40:15

[Augmenting temporary staff] (https://www.sundevs.com/staff-augmentation) offers companies an outer perspective to help products or service’s development. Because of this, some team parts have never worked together before, they are worried that the goals of the team will be impacted. So, it's very important to plan the objectives in an efficacious way. What can you do?

####**Separate objectives and tactics:**
These concepts don't mean the same. Objectives refer to the aims that are to be reached with the project, while tactics are the procedures that help us complete those objectives. Both need to be established in the projects and all the team must comprehend and apply them. 

####**Execute a DevOps culture:**
DevOps culture refers to a set of practices that mix software development and IT operations, its goal is to shorten the life cycle of the systems development and achieve a continuous shipment with a high software quality. With this method teams will be more aligned, less stalled and will take part in more phases of the product’s life cycle. Creating a DevOps culture increases productivity. 

####**Define communication ways:**
Each team member comprehends their roles and goals, several communication ways need to be set and everybody has to know them. Using tools like Slack or Skype and choosing a software for project management, like Jira Software Cloud will help with team's communication. Team leaders need to guarantee that both the internal and augmented staff use the instruments to have constant communication.

#####Finally

The team’s objectives in IT Staff Augmentation projects can seem hard to reach, nevertheless, following these steps will make it simpler to achieve the objectives of the project.
Amazing Currency Converter
Tags: javascript, css, html
Published: 2021-01-14 16:39:08

So I decided to complete Weekly Scrimba Challenge, if you want to try it yourself **[Click Here](https://scrimba.com/scrim/co5524583a09d72ad1a9c8c9b)** 

It's just simple app inspired by google converter, it has 4 currencies right now. Sadly I don't know how to use API's yet so converting probably won't be accurate after a minute. 
Design was inspired by [XE Currency Converter](https://www.xe.com/currencyconverter/)

As always feel free to give some suggestions, you could even give me a link to some easy API tutorial.
How to hire NodeJs developers (10 key questions for a job interview)
Tags: nodedevelopers, staffaugmentation, softwaredeveloper
Published: 2021-01-14 16:32:59

[Hiring Node.js developers] (https://www.sundevs.com/staff-augmentation) can be a hard task because there are a lot of solutions and frameworks in the market that allow us to write code in the back-end such as Sails, NestJS, Feather or Express. Save some time by asking the developer questions about all those frameworks’ base, like the next 10 key questions for a position as a [Node.js developer] (https://www.sundevs.com/blog/how-to-hire-nodejs-developers-10-key-questions-job-interview):

1. What is the event loop in Node.js?

2. What are Streams?

3. What is the purpose of “module.exports”?

4. How can you configure properties for different environments (production, development, etc.)?

5. How do you obtain the variables and property values passed through URL (GET method)?

6. What is a middleware?

7. What is an EventEmitter?

8. What is package.json and what is it used for?

9. When should we not use Node.js?

10. What is the difference between blocking and nonblocking code?
When to choose IT Staff Augmentation over Project Outsourcing?
Tags: staffaugmentation, outsourcing
Published: 2021-01-14 16:24:22

In the IT industry there’s a continuing tendency of trying to reduce costs and enhance the operative efficiency of projects; that is why staff augmentation and project outsourcing are a great solution for companies that try to resolve their technological requirements.

The main difference between [IT staff augmentation] (https://www.sundevs.com/staff-augmentation) and project outsourcing is that in this last, the supplier has the project’s control and the responsibility of the management of the project and presents the final product. On the other side, with staff augmentation you will have in-house software developers, who will work beside your company’s team to get results.

###**Considerations for choosing IT Outsourcing**

1. If you don't count with an engineering team and with experience to develop the software with the features you require.

2. If the worth you need of a product is essential for the business and the in-house engineering squad can’t provide it.

###**Considerations  for choosing IT Staff Augmentation**

1. For projects that needs specific skills that you don't have in your team.

2. When you want to growth your response time.

3. If you don’t need long term agreement with software engineers.

###**Hybrid approach**

With a hybrid approach can divide engineering teams according to the needs and responsibilities, since it can handle a project through outsourcing and develop another part of the project in-house. This approach requires a remote team adjustment.
HireTester.Software testing and QA service provide
Published: 2021-01-14 16:22:26

We have great news to share. Meet #HireTester as the Best Software Testing and Quality Assurance Service Provider by Corporate Vision Magazine.
Our team is proud to be nominated and recognized as one of the winners of Small Business Awards.
Thanks for the opportunity to participate and thanks to our partners for trust and support.
https://hire-tester.com/
#cvmagazine #corporatevision #smallbussinessawards #qa #softwaretesting
How to choose the correct IT Staff Augmentation partner?
Tags: staffaugmentation, partners
Published: 2021-01-14 16:17:11

A way to reduce operating and management costs it's through projects’ subcontracting. Sometimes, when the companies’ internal teams can’t achieve the assignments, or content the market needs, these businesses spend a lot of time, money and effort. [IT staff augmentation] (https://www.sundevs.com/staff-augmentation) is an alternative to add expertise with less costs.

##**How to know if Staff Augmentation is the right model?**

- If developing a website or a mobile app to cover a business demand is sought and it is a short term developed project.
- If you are working in a project that needs particular knowledge.
- If there are skill gaps in a company and they are identified.

###**What do you need to select it?**

You need to evaluate the recruitment processes, evaluate the staffing needs, checking the expertise, the knowledge and technical skills. Research which are the communication methods. Also, identify cultural differences and language and finally, know how they monitor quality and deliveries. Now you can recognize what to evaluate in your next partner.
aws serverless services 
Tags: aws, serverless, beginners, cloud
Published: 2021-01-14 16:09:41

<li> <b> AWS Lambda </b> automatically runs your code on
highly available, fault-tolerant infrastructure spread across multiple Availability Zones in a single region
without requiring you to provision or manage servers

<li><b>AWS Fargate </b> — a serverless compute engine for containers
<li> <b>Amazon DynamoDB </b> — a fast and flexible NoSQL database
<li> <b>Amazon Aurora Serverless  </b>— a MySQL compatible relational database
<li> <b>Amazon API Gateway </b>— a service to create, publish, monitor and secure APIs
<li> <b>Amazon S3 </b>— a secure, durable and highly scalable object storage
<li> <b>Amazon Elastic File System </b>— a simple, scalable, elastic file storage
<li> <b>Amazon SNS </b>— a fully managed pub/sub messaging service
<li> <b>Amazon SQS </b>— a fully managed message queuing service
</li>
OpenShift 4 Troubleshooting: Your Cluster is Broken, What's Next?
Tags: kubernetes, openshift, fedora, crio
Published: 2021-01-14 16:06:01

---
title: OpenShift 4 Troubleshooting: Your Cluster is Broken, What's Next?
published: true
description: Production OpenShift Cluster in 35 Minutes, Part IV
tags: kubernetes, openshift, fedora, crio
cover_image: https://assets.mkdev.me/posts/covers/000/000/012/original/mkdev_article.png
---
Any Kubernetes / OpenShift cluster might break and you need to know how to fix it. OpenShift and OKD 4 are a bit special, so troubleshooting them is also a bit special. In this video, Kirill Shirinkin shares some tips on how you could troubleshoot your cluster issues:

{% youtube NdpAli78o0A %}

***

Production OpenShift Cluster in 35 Minutes:

* Part I, [First look at OKD 4](https://dev.to/mkdev/first-look-at-okd-4-and-the-new-openshift-installer-2if5)
* Part II, [3 Core Features of OpenShift 4 Cluster Management](https://dev.to/mkdev/3-core-features-of-openshift-4-cluster-management-fedora-coreos-cri-o-and-machineset-api-3i1o)
* Part III, [How to Configure OpenShift 4 Cluster Nodes](https://dev.to/mkdev/how-to-configure-openshift-4-cluster-nodes-machineconfig-operator-and-coreos-4g9b)
* Part IV, [OpenShift 4 Troubleshooting](https://dev.to/mkdev/openshift-4-troubleshooting-your-cluster-is-broken-what-s-next-2lg7)

*You can always hire [our mentors](https://mkdev.me/en/specializations) and learn directly from them!*
Fatorial em Java
Tags: beginners, braziliandevs, java, tutorial
Published: 2021-01-14 16:01:05

Olá pessoal, irei mostrar algumas formas de realizar o fatorial em Java.

## Fatorial interativo

Vamos calcular o fatorial do número 5 de forma interativa:

```java
public int fatorialInterativo(int numero){
  //variável para armazenar o valor a ser calculado
  int fatorial = 1;
  //laço de repetição
  for (int i = 1; i <= numero; i++) {
    fatorial = fatorial * i;
  }
  return fatorial;
}
```

## Fatorial recursivo

Queremos saber o fatorial do número 5 de forma recursiva:

```java
public int fatorialRecursivo(int fatRec){
  //condição de parada
  if(fatRec <= 1){
    return 1 ;
  }
  //5!
  //5 * 4! = 120
  //4 * 3! = 24
  //3 * 2! = 6
  //2 * 1! = 2
  // 1! = 1
  // se o valor for igual a um, para a recursão e retorna calculando os valores
  return (fatRec \ fatorialRecursivo(fatRec - 1));
}
```

Para realizar o fatorial de forma recursiva teremos que criar um método para retornar o valor calculado.
Então criaremos um método que retorne um inteiro e receba como parâmetro um valor para ser calculado, lembrando que qualquer método que não seja **void** retorna algum valor ou objeto, no método especificamos a condição de parada, ou seja, quando esta condição for verdadeira a recursão para, se a condição de parada for falsa retorna o mesmo método com outro parâmetro até encontrar a condição verdadeira, deve-se tomar cuidado para esta condição não se tornar uma recursão infinita, se a condição nunca for verdadeira o método irá consumir muita memória da máquina e ocorrerá um erro conhecido por **StackOverflowError**.

Código fonte no Github:

{% github franciscojsc/fatorial-em-java %}