teleren/devto huggingface dataset:
The Easiest Way to Dockerize PHP Applications
Tags: docker, php, webdev, devops
Published: 2021-11-29 21:06:29

What is the easiest way to dockerize PHP applications? Let's find out with the GitHub repository example.

## Architecture

In order to create scalable architecture, we will dockerize two apps that will use the same reverse proxy. 

![Network](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4574gyems9fhri1b7d96.png)

Services can only communicate with other services on networks they share, so we will have three networks:

1) Proxy Network which contains Reverse Proxy (Nginx), Best App (Apache/PHP), and Awesome App (Apache/PHP);
2) Best Network which contains Best App and Best DB (MySQL);
3) Awesome Network which contains only Awesome App.

## Requirements

Requirements for our architecture are:

1. There are no permission issues;
2. Xdebug works out-of-the-box;
3. Every application has a unique domain;
4. We use HTTPS;
5. Setup supports multiple applications.

## Permission Issues and Xdebug

To prevent permission issues and have package availability out-of-the-box, we will use [thecodingmachine/php](https://github.com/thecodingmachine) for PHP applications, a general-purpose PHP image for Docker. 

We will use its [fat image](https://github.com/thecodingmachine/docker-images-php#fat-image), as it comes with [Apache](https://httpd.apache.org/), [Superconic](https://github.com/aptible/supercronic/), and [Composer](https://getcomposer.org/) and it already has common PHP extensions enabled.

## Unique Domains, HTTPS and Multiple Applications

In order to have unique domains, HTTPS and multiple applications support out-of-the-box, we will use [nginx-proxy](https://github.com/nginx-proxy/nginx-proxy), as it supports everything mentioned above.

## GitHub Repository

As we have defined the architecture and tools we will use, this is the part where you should visit [https://github.com/v-m-i/simple-php-app-dockerization](https://github.com/v-m-i/simple-php-app-dockerization) and see how to configure and run everything mentioned so far.

## Outro

This post could have been a lot longer, but I've kept it as short as possible because everything should be explained in the example repository.

### Is the Easiest Way the Best Way?

It depends on what our goal is. If our goal is to create an optimized, clean and precise docker environment, then it's not the best way, as it's a fat setup. But if we want to dockerize our app for our local development in the fastest and hassle-free way, then it might be the best way to do it.
KISS - Mantenha a simplicidade. Estupido!
Tags: programming, devops, software, ux
Published: 2021-11-29 20:58:21

## O que é o KISS?

Como no próprio título retrata, **KISS** significa "Keep It Simple Stupid", ele é um dos princípios mais importantes de desenvolvimento de software. Este princípio descreve que para uma criar um software, UX, etc. Ele não tende a ser algo complicado/complexo, e sim, tornar algo simples, funcional e econômico.

Devem estar se perguntando como sei se meu software, meu UX, entre outros, são simples, funcional e econômico correto? 

Vejamos, qualquer desenvolvimento independente das camadas de processamento que eles tem, você percebe que ele concorda com o princípio **KISS(Keep It Simple, Stupid)**, quando você consegue explicar o que aquilo faz até para uma pessoa que não seja da área, ela conseguirá entender, pois, você fez algo tão simples que é funcional, não tendo problemas com níveis de senioridade, um estagiário entenderia, um pleno e assim adiante. Logo você só tende a ganhar, você consegue resolver problemas rápidos, consegue explicar para diferentes níveis, tendo uma economia gradativa no seu desenvolvimento, com isso será fácil de manter o mesmo.

![KISS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjljwktjxmr917pt1fav.jpg)

## Como o KISS influenciou na minha vida?

Já teve algumas vezes que implementei, que um amigo chegava para mim, e dizia, "XD, tem que ser simples, faça algo simples e coloque para funcionar", no entanto, não sabia que isso era um princípio e que muito menos se chamava **KISS**, acabei sabendo através dele @figur8. Agora compreendo melhor sobre e pretendo aplicar, mas daqui para frente este principio, enfim, este principio influenciou muito na minha forma de pensar e projetar algum desenvolvimento.

Este foi o <b>diário de bordo #10</b>. Não tivemos um artigo semana passada, pois estava sem ideia sobre o que escrever quando meu amigo @figur8 me apresentou 3 novos princípios o **YAGNI**, **KISS** e **DRY**, hoje eu escolhi falar sobre o KISS nas próximas semanas irei trazer sobre os outros dois galera, vlw. Vamos nos despedindo por aqui. Voltaremos com mais um diário de bordo.

<p align="center">
  <a href="#">
    <img src="https://cdn.dribbble.com/users/1889486/screenshots/5081642/thankyou_.gif" width="500">
  </a>
</p>

<b>Este artigo foi útil para você?</b> 
<b>Deixe um comentário abaixo.</b>

## Referências 

* [KISS - Keep It Simple, Stupid](https://dev.to/figur8/kiss-keep-it-simple-stupid-56ef)

* [YAGNI, KISS E DRY](https://www.linkapi.solutions/blog/yagni-kiss-e-dry)
WebXR at Global XR Conference
Tags: webxr
Published: 2021-11-29 20:50:56

I posted this to the WebXR discord (https://discord.gg/Jt5tfaM), but I thought it might be helpful to anyone interested outside of the Discord as well (but you should join 😉).

---

This week is the [Global XR Conference](https://globalxrconference.com/) (Dec 1 - 3) and there are a couple of WebXR related talks and workshops. 

But I thought I'd make a list of all sessions and workshops that have the tag WebXR... Turned out be more than I thought 🙂 , but here they are:

### December 1
- 2pm UTC - XR On The Web Is Just a Fad - Jonathan Hale - https://youtu.be/VCXe0Dm1tJs
- 2:30pm UTC - (Workshop) Building a VR Space Shooter - Timmy Kokke - https://youtu.be/zMI9-FpL4NI
- 4pm UTC - WebAR is Re-Inventing QR Codes - Frans Tihveräinen - https://youtu.be/jMFi-6qFg4I
- 8pm UTC - The Journey to Augmenting Your World - Ven Natarajan & Supun Bhagya - https://youtu.be/wa-nbNCwyc8

### December 2
- 1pm UTC - (Workshop) Build a Multi-User Cross-XR App - Jonathan Hale - https://youtu.be/Ca1IvVk6OQo
- 1pm UTC - Exploring the Universe Using WebXR - Karan Balkar - https://youtu.be/4hUPVNGHhkA
- 2pm UTC - How to Build a High Scalable Microfrontend TWA Webxr App as a Single Native App - R Surahutomo Aziz Pradana - https://youtu.be/bDfS2IwJo-g
- 3pm UTC - (Community) Extended Reality in Africa: Present & Future Prospects - Arome Ibrahim - https://youtu.be/Yz3z7_2y-Ck
- 7:30pm UTC - (Workshop) Mastering the Immersion Platform - Ven Natarajan & Supun Bhagya - https://youtu.be/rELlPnFHkHw
- 9pm UTC - Meta Media Futures - Evo Heyning - https://youtu.be/4n-foFTqzcw

### December 3
- 1pm UTC - The Rise of Virtual Worlds - Sonya Seddarasan & Jal Shah - https://youtu.be/JF4GZ0-8ZQk
- 4pm UTC - XR in Marketing and Advertisement - Diana Olynick - https://youtu.be/wBcDwolHT2c
- 7pm UTC - My Experience Adapting a Digital Twin WebGL Project for HoloLens 2 - Bruno Capuano - https://youtu.be/c3hxE1uvLvA

They have a [discord](https://discord.gg/F3RSqfJbTC) as well if you like to reach out to one of the speakers ().


![Global XR Conference Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvtuy31kvhv93jc8bjje.png)
Developers in the SaaS ecosystem
Tags: devrel, saas
Published: 2021-11-29 19:58:13

The developers that work on any platform come from different levels of experience, in addition to that, they also come from varied backgrounds in a SaaS ecosystem, which are 

**Independent Software Vendors or ISVs**

ISVs are usually a company or product 'A' that wants to create integration with Company or Product 'B,' 

The ISVs usually create an integration with Company B to tap into their customer base. For example, a telephony company will create an integration with a CRM company, hoping that the customers of the CRM company will try out company A's telephony services when they need one, and the chances are higher if the telephony service is already integrated with the CRM. 

The developers that build the integrations for an ISV are usually engineers from either of the companies.

**System Integrators or SIs**

SIs are software contractors that build apps and integrations for custom and niche use cases, for example, 

A car dealership buys a CRM. Unfortunately, no software is perfect, and the CRM doesn't fulfill all the dealership's requirements. Still, thanks to the public APIs of the CRM system, they can bridge the gap in requirements and integrate their in-house customer data to the CRM by building a custom integration or an App, businesses like car dealerships might not have their own developer team, so they hire a system integrator experienced in building apps for the CRM system to help them. 

System integrators usually work with many companies simultaneously. They usually build apps for more than one SaaS product, and they will have developers that are experts in different platforms. At times the developers will also learn completely new technology just for the project.

**Independent developers**

Independent developers are someone like you and me who identify a gap in the product and build a solution to bridge that gap. The developer will then list the app in the marketplace either for free or for a price, usually based on installs. 

Now that we have an understanding of the backgrounds of the types of developers that work on a SaaS integration let's see the challenges in serving all these developers at once 

The primary aim of every developer relations team should be to enable the developers, as the quote says,

> **Give a man a fish, and you feed him for a day; teach a man to fish, and you feed him for a lifetime.**
> 

or

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d00en4zmw02s71egjnne.jpg)


Either way, there is also a selfish reason behind it. attending to individual developers through a support channel is not a scalable solution in the longer run, so creating resources like documentation, tutorials, sample apps, and videos is always recommended.

It's only wishful thinking that the developers utilize all the resources and enable themselves whenever possible, but does it happen? not always! 

Well, let us talk about the challenges, pros, and cons of catering to a diverse developer audience in the upcoming parts of the series.
Introduction to Version Control?
Tags: beginners, versioncontrolsystem
Published: 2021-11-29 20:40:07

Version control systems tools help software teams manage changes to source code over time. This therefore helps software teams work faster and smarter. Look at what working on content google online docs? Yep, if you have done this then your familiar the framework of what entails Version Control.

As a Software developer you are continuously writing new source code and changing existing source code. You would find that for most cases any code for a project, is organized in a folder structure. What I continue to see eg while working with Git is the fact that a developer on my team may be working on a new feature while another developer fixes a bug by changing code, each developer may make their changes in several parts of the file tree. 
While it may be possible to develop software without using any version control, but I think that by doing so exposes the project to a huge risk. So the question is not whether to use version control but which version control system to use. Sample is GIT,  which translates that a user can have several versions of their project where they can modify changes made overtime. The vantage of this is the fact that user can backtrack changes should the need arise. It is generally used for source code management in software development.

In conclusion version control is essential, you want to trace up the code and not loose up on changes then you need to explore this aspect when developing
Javascript é o futuro?
Published: 2021-11-29 20:14:54

Primeiramente, para descobrir se o Javascript é o futuro, precisamos descobrir o que realmente é o Javascript!

JavaScript é uma linguagem de script ou programação que permite a execução de elementos complexos em páginas da web. Ele é usado para atualizar material dinamicamente, lidar com multimídia, animar gráficos e praticamente qualquer outra coisa. É a terceira camada em um bolo de três camadas de tecnologias da web padrão, as outras duas sendo HTML e CSS.

**HTML:** HTML significa Hypertext Markup Language. É uma forma de apresentar o conteúdo de forma lógica. Em termos simples, é a estrutura da página da web.

**CSS:** CSS representa folhas de estilo. É uma forma de controlar a apresentação do HTML. A aparência da sua página da web, as cores ou, em termos simples, o estilo que é perceptível em uma página da web é CSS.

Quando se trata de tecnologia, as linguagens de programação tornaram-se cada vez mais importantes no século XXI.

Temos uma grande variedade de linguagens de programação capazes de realizar uma ampla gama de tarefas. JavaScript é uma das linguagens de programação mais populares. Na realidade, é conhecida como a linguagem de programação da Web. JS é uma entre o número cada vez maior de linguagens de programação disponíveis, muitas das quais são baseadas nele.

JavaScript é a principal força a ser considerada por trás do rápido avanço da Internet. É o presente e será o que está por vir. O rápido desenvolvimento da linguagem de programação de alto nível atesta o fato de que o JavaScript é o futuro.

E aqui estão algumas razões para isso: 

- **Permite mais de 95% da Web** - a partir de hoje, 95,1% da Internet é alimentada por JavaScript. E com o passar do tempo, esse número aumentará e o javaScript aumentará.

- **Escolha brilhante de frameworks** - AngularJS, Ember.js, Meteor.js, ReactJS, VueJS, nodeJS são algumas da ampla variedade de estruturas acessíveis para JavaScript.

- **Superfast** - o JavaScript costumava ser lento, mas com o avanço das tecnologias e o lançamento do V8, a velocidade não é mais uma questão. JavaScript tem um ótimo desempenho.

- **Linguagem em rápida evolução** - JavaScript acompanha muitos dos destaques atuais em 1995, quando foi entregue pela primeira vez. E está em constante evolução!

Da mesma forma com alguns outros mercados, o mercado para desenvolvedores JS é sério. Web designers estão procurando engenheiros que possam compor códigos extraordinários! À medida que o JavaScript continua se desenvolvendo, as organizações procuram engenheiros JS profundamente talentosos para continuar impulsionando seus projetos.

Então, com isso, podemos concluir que JavaScript é o destino do amanhã e existem diferentes benefícios que ele nos fornece.

Feshow!
Datacamp: A Datascience Portal
Published: 2021-11-29 20:11:11

[#DataCamp -- Black Friday Sale is here!](datacamp.pxf.io/e4RNmj)



Save 75% on an annual Premium plan! & Get your first month at just $1.

Are you ready to future-proof your career with data skills—from non-coding essentials to advanced data science.

DataCamp offers unlimited access to the entire catalog, including 360+ courses, 60+ tracks, and 90+ projects. Also, get certified and access career services.

DataCamp has interactive content especially designed by experts, and you can apply your new data skills in the workspace to analyze real datasets, share your insights, and build your data science portfolio.

You can either opt for individual courses or track courses with a set of methods inside them. I prefer track courses because they have all the relevant systems inside them. So I insist the readers go ahead and check them out.

Also, if you are short of Project ideas to develop and apply your skills, DataCamp has impressive Projects. I love doing these, and they are my favorite.
HTML,CSS Beginner Guide
Tags: html, webdev, beginners, css
Published: 2021-11-29 20:09:03

**Beginning on your journey to web development?**
<u>Here's what to know:</u>

First, for the magic to happen, you will need to work with an editor. Editors that are an IDE include and are not limited to; Atom, VSCode, Sublime Text, Vim etc .While writing out yourcode, you will need to save it with a HTML file extension for the code in HTML while CSS requires that you save it as ## .css file extension.

So, what is HTML?
Hyper Text Mark up Language commonly referred to as HTML, is a Markup means to structure it in a specific format. language used to build websites. Hypertext means machine readable text. 
But, HTML files are just simple text files. You need nothing more 
than a place to type your text, in short, a text editor.

The basic structure of an HTML document includes tags, which surround content and apply meaning to it. Tags are contain angle brackets and the command element an example is the ``<body> tag. Most tags must have two parts, an opening and closing part. 
For example: ``<html> is the opening tag and ``</html> is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash (/) character. 

**Anatomy of a HTML element:**
1. Start with the open tag
2. Each open tag element must have a closing tag
3. The content is simply text, image, etc. 
4. The element is the set of tags and the content

Sample Code of HTML tags:
`<html>
   <head>
   </head>
 <body>
 </body>
</html>`
    
CSS in full means Cascading Style Sheet is a programming language that works with HTML to make the content of the web page look pretty. CSS helps you better organize information on your web page so it's more aesthetically pleasing to viewers.

**Structure of CSS**
1. Selectors are the CSS version of HTML tags.
2. Properties define the characteristics within the selectors 
in order to specify the design of the content which is identified in the curly brackets {}.
3. Values are the stylistic choice to edit the web page content which are identified with colons : and must end with semicolons ;.

Sample CSS code: 
p { ----Selector
color: **orange;** ----Value
**font-size:** 16px; ---Property
}

I hope this, provides you with a basic to kick start your coding journey
What Does Developer Relations Do?
Tags: devrel, saas
Published: 2021-11-29 19:57:38

Developer relations is a very broad term. Companies name the roles differently. By developer relations, I mean anyone that works directly with the developers and acts as a bridge between the platform and the developers, that includes developer evangelists, developer advocates, SDK engineers, tech writers, community managers, and developer marketers.

As mentioned before, developer relations bridge the gap between the platform and the developer that uses the platform by any means necessary. A typical developer relations team will ideally. 

1. Enable developers through self-serve materials like documentation, tutorials, videos and sample code snippets, and sample apps, A.K.A **Developer Enablement**.
2. Engage developers through events, meetups, webinars, and the developer community, anything to keep the developer engaged with the platform. make them feel that they made the right choice by building a solution with you, A.K.A **Developer Engagement**
3. Support developers through traditional support channels like support tickets, troubleshooting calls, and other forms of assistance specific to those customers/developers. (it's ideal for keeping the support part very minimal as a Devrel for a reason discussed later in the series) A.K.A **Developer Support**. 
4. Build tools apart from sample apps to make it easy for developers to use the platform features, such as client SDKs and CLIs. A.K.A **Developer Tooling**
5. Advocate for the developers, be a voice for the developers within the platform/company, interact with developers frequently, collect feedback, pass the feedback to the engineering team to improve the product/platform A.K.A **Developer Advocacy**
6. Evangelize products/features, drive adoption for existing product/feature, bring a new product to the wider developer audience by running Early Access Programs or closed beta programs. A.K.A **Developer/Product Evangelism**

I'll also try to explain each of the above items to the best of my knowledge in individual parts of their own later in the series.

Now that we have some idea of what Devrels do let's talk about the types of developers we cater to as Devrels in a B2B SaaS ecosystem in the next part.
Introduction 
Tags: devrel, saas
Published: 2021-11-29 19:57:18

Hello, dev.to community.🙂

My name is Vel. I am a developer relations engineer (Devrel) from a beautiful coastal city named Chennai from the southern part of India.

Before changing my career path from a software engineer to a Devrel, close to 3 years ago, my perception about being a Devrel was something similar to what developer advocates at the big techs like amazon and google do, the traveling to conferences, working on open-source projects and the whole nine yards, but the whole perspective, changed over time, I realized there are a lot moving parts to developer relations, and especially in a B2B ecosystem where there are a lot of stakeholders involved.

There are some great articles about developer relations in [dev.to](http://dev.to) and medium. I thought I'd also share my journey over the course of the past 3 years, hopefully in a different perspective. also, if you read something in this series that you feel you might have read somewhere else, then probably you did. This series is just a compilation of things I learned, mostly from my awesome colleagues at Freshworks inc, the internet, and some from my personal experience.

Developer relations is one of the most important aspects of any company with developer-facing products like a public API or a developer platform. the goal of every developer relations team is to give the best possible developer experience. This series will cover all the quirks and differences in handling developer experience in a B2B ecosystem.
TypeScript: Creating a Dynamic Interface
Tags: typescript, javascript, development, frontend
Published: 2021-11-29 19:53:02

---
title: TypeScript: Creating a Dynamic Interface
published: true
description: During my time as a developer I've created a lot of "typed" code. One particular issue has come up repeatedly and I finally had a moment of clarity.
tags: TypeScript, JavaScript, Development, Frontend
series: TypeScript
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ov4gn235gi2ftjo6djm9.png
---

During my time as a developer I've created a lot of "typed" code. One particular issue has come up repeatedly and I finally had a moment of clarity.

## The Problem

Whenever I write something like this ...

```typescript
export interface ConfigType {
  type: string;
}

export interface DataModel {
  config: ConfigType; // ERROR HERE
  [key: string]: string;
}
```

... I get the following error on the commented line above.

> Property 'config' of type 'ConfigType' is not assignable to 'string' index type 'string'.

The issue is that the `[key: string]: string;` line gets enforced on all key/value pairs on the interface.

I've seen something like the following ...

```typescript
export interface Person {
  id: number;
  firstname: string;
  lastname: string;
  [key: string]: string | number;
}
```

... and this code does not present an error. This is because the` [key: string]: string;` line gets enforced on all key/value pairs on the interface and they are `string` or `number`.

I came up with two approaches to solving the issue listed below. I think the first is the better approach, but I will list both for consistency.

## The Type Approach

This approach seems much cleaner, creating a new data type that has the fixed and dynamic portions ANDed together.

```typescript
export interface ConfigType {
  type: string;
}

export type DataModel = {
  config: ConfigType;
} & {
  [key: string]: string;
};
```

## The Union Approach

The following code is another resolution.

```typescript
export interface ConfigType {
  type: string;
}

export interface DataModel {
  config: ConfigType;
  [key: string]: string | ConfigType;
}
```

This approach has the "issue" that a new "key" could be used with another `ConfigType`.

## Conclusion

As I said, I think the first approach (the Type Approach) is the better of the two.

If anyone has another or better pattern, please let me know.