teleren/devto huggingface dataset:
How To Avoid Filename Case Errors in Production
Published: 2020-11-11 20:02:56

---
title: How To Avoid Filename Case Errors in Production
published: true
description: Some bugs may only show up in production/server environments due to having case sensitive file systems. This covers some ways to avoid those surprises. 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

If you are working on Mac (or, I imagine, Windows), you will most likely be working on a case insensitive file system. This is great for a lot of reasons, but not great for one, namely if your production system is using case sensitive file system, which is very likely.

More than once at different companies in my career, I have had this issue bite me/my team. I will acknowledge up front that one way (probably even the best way) to solve this is to have a CI build that runs tests on an environment that more closely matches production. I mean, ideally we should do that anyway for a number of reasons, but still, 1) you may want to know you broke something before committing and 2) you may want not have that set up even if it is ideal.

So here is a relatively painless way to solve that. 

First, *close any apps that may be referencing your code*. Then: 
1. Create a new Volume in Disk Utility, choose APFS (Case-sensitive, Encrypted) as the format. You do not have to encrypt, but why not, this is your IP after all. Let's call the volume `Dev` and give it enough space for all your code and then some. 

2. Let's say your code folder is named `Repos`. So in iTerm2 (you are using iTerm2, right??), go to where that folder is and type: `mv Repos /Volumes/Dev/` to move the folder to your new volume.  Now go make some coffee, watch a movie, etc. Mine took about 7-8 min for around 14GB. 

3. In the same folder (where your actual `Repos` folder used to be), type `ln -s /Volumes/Dev/Repos Repos`. I assume you know what this does, but just in case you do not, it will make a symbolic link to where you just moved all those files. This means (in theory at least) you should not have to change anything else.

Now you can open your coding apps and continue. I cannot guarantee there will not be side effects from this, but I can say that it will help you to avoid casing issues going forward. If you have tests, run them and see. Of course, this only solves for each dev individually on a team, so the better solution will continue to be a CI and/or test or even staging environment to be sure, but I think it can still be helpful. YMMV!
VS Code Quick Tip: JavaScript Import Autocomplete
Tags: vscode, javascript, tutorial, beginners
Published: 2020-11-11 20:26:03

[Visual Studio Code](https://code.visualstudio.com/) (VS Code) is an extremely popular code editor that is mainly used for frontend web development. One of its features is a sophisticated code completion system known as [IntelliSense](https://code.visualstudio.com/docs/editor/intellisense).

IntelliSense works well... except with JavaScript module imports:

```js
import { useState } from 'react';
```

If you start to type `import` you have to decide _what_ you are importing first, instead of _where_ you are importing from. This unfortunately causes an issue for VS Code because it has no idea what to suggest for available imports.

Let's compare this syntax to other languages such as Python:

```py
from math import pi
```

Since you start the statement with `from math`, it is easier for the editor to give you suggestions on what is available for you to import from the module.

Okay, this is great news for Python, but what about our beloved JavaScript and Node.js code? Don't worry! I came across a fantastic solution for this.

## 💡 Solution: Fake reverse the import statement

If I could go back in time and make JavaScript's import syntax work like Python's, I would. However, we can work with what we got by trying to fake reverse the import.

You do this by simply typing `import` and waiting for a menu to pop up:

![VS Code's suggestion menu after typing import](https://dev-to-uploads.s3.amazonaws.com/i/mridye82hqj0ku7au7yo.png)

Make sure to select the `import statement` option by using the arrow keys and then pressing the `Enter` key. You should then see a template for an import statement:

```js
import {} from 'module';
```

The `module` text will be highlighted and selected, so you can start typing _where_ to import from first. After that, press the `Tab` key and the cursor will move in between the curly braces. Now, you can type _what_ you want to import and VS Code will be able to offer you suggestions.

---

Did you find this tip useful? Have your own tip to share? I would love to know, so [reach out on Twitter](https://twitter.com/sunnysinghio) or leave a comment.
Channel push non blocking in GoLang
Tags: go, channel, nonblocking
Published: 2020-11-11 20:15:58

By default push operations to golang channel will block once the channel is full and wait that an other go routine will consume a message from the channel.

The following example will block after 3 messages queued in the channel, and since no other go routine is running it will crash with a dead lock error:

```go
package main

import "fmt"

func main() {
	ch := make(chan string, 3)

	for i := 0; i < 10; i++ {
		ch <- "hello"
		fmt.Println("Pushed a message to the channel")
	}
}
```

To avoid blocking the execution of your application you can handle the case of a full channel by using select:

```go
package main

import "fmt"

func main() {
	ch := make(chan string, 3)

	for i := 0; i < 10; i++ {
		select {
		case ch <- "hello":
			fmt.Println("Pushed a message to the channel")
		default:
			fmt.Println("WARN: The channel is full")
		}
	}
}

```

This way you can easily decide to ignore the message or handle this problem an other way than blocking the current go routine.
How to Make curl Request a Site from a Different IP Than in DNS
Tags: dns, curl
Published: 2020-11-11 19:58:36

One issue I've encountered over the years has been when moving a Web site between systems and the site is set up on two different servers simultaneously (this could also happen if using a CDN). Let's say `example.com` is set up on `1.1.1.1` **and** `2.2.2.2` but DNS is pointing solely to `1.1.1.1`

What do we do if we want to request `http://example.com/` but from  `2.2.2.2`?

A system wide approach would be adding an entry to the `/etc/hosts` file:

```
2.2.2.2 example.com
```

This usually works but can require you to flush your local DNS cache and/or force refresh in your browser. You have to remember to remove the line as well, it's not very configurable, and so on.

What about if we want to use `curl`? You *could* use `/etc/hosts` but for debugging purposes it'd be nice if we could override the IP address on a single request basis as part of the command. This is possible!

The way I *used* to do it was to override the `Host` HTTP header (the way a HTTP client tells a server which host it's looking for) and request from the new IP address, like so:

```
curl -H "Host: example.com" http://2.2.2.2/
```

Fine in the old days, but in the modern HTTPS world various problems are introduced. Luckily `curl` has a solution in the form of `--resolve`!

```
--resolve <host:port:address[,address]...>
       Provide a custom address for a  specific  host  and  port  pair.
       Using  this,  you  can make the curl requests(s) use a specified
       address and prevent the otherwise normally resolved  address  to
       be  used.
```

So if we want to request `example.com` from `2.2.2.2`, we could do this:

```
curl http://example.com/ --resolve example.com:80:2.2.2.2 
curl https://example.com/ --resolve example.com:443:2.2.2.2 
```

Multiple entries can be added if needed for more complex situations like chains of redirects, say.

It's also possible to use `*` as a wildcard host so that any host involved in the request goes to the address you specify (and it could also save you a bit of redundancy and typing!):

```
curl http://example.com/ --resolve *:80:2.2.2.2
```
pREST Celebrating 2,441 GitHub Stars ✨
Tags: go, opensource, showdev, webdev
Published: 2020-11-11 19:44:50

pREST just received it's [2,441th star on GitHub](https://github.com/prest/prest). We'll use this milestone to recap pREST’s growth and other important milestones since its beginning as an experimental project in 2016. We've accomplished lot of great things together.

{% github prest/prest %}

While tracking the success of an open source project is known to be a hard problem, we've a few metrics available to us. Currently 42 developers have contributed to some of the 1239 commits of the pREST repository made available in 20 releases. And this is only data from the main pREST repo.

The number of stars of a GitHub project is yet another indicator, because it means people are adding the project to their list of favorites. However, people that starred pREST are not necessarily users and many users don’t star pREST (if that applies to you, consider giving us a star!), therefore its not a precise metric. Till date pREST has 50k+ all-time users during the span of an year. Which includes ~4k+ monthly users.

Milestones like this are proud moments for the developers & community, help motivate more work & new developments. If you'd like to support pREST open source project, consider looking at the discussion page on GitHub.

![pREST GitHub Stars](https://dev-to-uploads.s3.amazonaws.com/i/9v83rlownt58v8nz6asq.png)

**This will be added to the greatest moment's timeline.**

Immense thanks to all the contributors who dedicated part of their time to contribute to the project. [Felipe Oliveira](https://github.com/felipeweb) for starting this project with me in 2016, his experience in software engineering and staying active until today.
The Flavors of Object-Oriented Programming (in JavaScript)
Tags: javascript
Published: 2020-11-11 19:42:46

---
title: The Flavors of Object-Oriented Programming (in JavaScript)
description: I wrote an article on CSS Tricks where I explained 4 different ways to write Object-Oriented Programming in JavaScript. If you're confused about OOP, this article should help sort things out for you nicely.
canonical_url: https://css-tricks.com/the-flavors-of-object-oriented-programming-in-javascript/
tags: javascript
published: true
---

I wrote an article on CSS Tricks where I explained 4 different ways to write Object-Oriented Programming in JavaScript. If you're confused about OOP, this article should help sort things out for you nicely. 

The four ways are: 

1. Constructor functions
2. Classes
3. OLOO
4. Factory functions

In this article, you'll learn : 

1. How to write Object Oriented Programming with each of the four methods. 
2. Get to know methods are the "best", and why
3. Get to know how to write event listeners with OOP (which is never taught elsewhere).  

I'm excited to share this one with you. [Click here to read the article!](https://css-tricks.com/the-flavors-of-object-oriented-programming-in-javascript/)

I hope you enjoy this. Let me know if you do! 

<hr>

Thanks for reading. Sign up for [my newsletter](https://zellwk.com) if you want more articles to help you become a better frontend developer.
3 Unique Javascript Window APIS ✨
Tags: javascript, programming, webdev
Published: 2020-11-11 19:42:36

Javascript has a powerful built-in API that makes our life easier as developers.

Today we're going to cover 3 of them.

**Note: These APIS are experimental so you need to check of the browser support them first before using it in production**



##1-navigator.Online:

Lets you check the user internet connection, return false if the connection is lost and true when it back

```javascript
if( !navigator.online ) {
console.log(" You're offline, check your connection. 🔴")
} else {
console.log(" Your connection is back 🟢")
}
```



##2-navigator.language:

Lets you get the language of the browser


```javascript

console.log(navigator.language)

 //output en-Us
```



##3-navigator.geolocation:

Lets you get the location of the device

```javascript

navigator.geolocation.getCurrentPosition(displayPosition)

function displayPosition(position){
  console.log('Latitude:' + position.coords.latitude)

  console.log('Longitude:' + position.coords.longitude)
}

 //Latitude: 40.1294478
//Longitude: 41.34804699999998
```

That's it, Have a productive day ❤️
Developed Covid 19 Dashboard  🇱🇰
Tags: android, covid19, srilanka, ux
Published: 2020-11-11 19:39:09

This is a covid-19 minimalistic dashboard based on current corona situation in srilanka statics. developed using android and data gathers from a API that provided by Health Promotion Bureau Srilanka

Downlaod link : http://tiny.cc/ff53tz
Questions equals dedication
Tags: translation, localization, ambiguity, context
Published: 2020-11-11 19:30:30

If a translator asks you many clarifying questions about your code or application, they're not being annoying – **they want to do their best job**.

Say you have a furniture store and you have built a nice inventory management application. You are getting the application localised and a translator wants to know the meaning of 'table'. Are they an idiot? Surely not. It depends on the format of the localisation file, but context is super important in translation. In worst cases, the file contents may be alphabetised and therefore they've lost all context. In other cases, the string IDs may be something generic like `label1`, `label2` or `title`.

{% collapsible How would you translate 'table' into any other language you know? Or, if you're not a polyglot, you can think of this in terms of definitions: how would you _define_ 'table'? <small>(Click the paragraph/arrow)</small> %} 

How about now?
* sofa
* table
* chair

How about now?
* pie chart
* table
* graph
{% endcollapsible %}

See? Even though the words in English are identical, they carry completely different meanings and will likely be translated using different words in another language. If this type of context information is not available through surrounding words, string IDs or comments, the translator is basically just **flipping a coin**. More often than not, a multi-sided coin (if that were a thing). Sometimes they can make an educated guess but due to the concise nature of software texts, even that can easily go wrong. You, the developer, **be unambiguous – or helpful and understanding – instead**.

By the way, if for example those above two meanings of 'table' co-exist in an application, you'll need to handle that carefully in your **translation memory**. Luckily, you can add multiple translations for one source text!

{% link minna_xd/database-full-of-source-texts-and-their-translations-that-s-a-translation-memory-lfp %}

<small>Cover photo by <a href="https://unsplash.com/@yakimadesign?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jordan Rowland</a> on <a href="https://unsplash.com/s/photos/coin-hand?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></small>
Laravel Breeze, le nouveau starter officiel d'authentification avec Blade et Tailwind CSS
Tags: laravel, php, french
Published: 2020-11-11 19:22:17

Laravel Breeze est un package composer qui facilite le démarrage de nos projets en proposant un système d'authentification minimaliste qui utilise Blade et Tailwind CSS.

C'est l’un des deux projets teasés depuis quelques temps sans trop d'informations par [Taylor Otwell](https://twitter.com/taylorotwell?lang=fr) avec Laravel Sail. À la différence de ce dernier dont on ne sait toujours rien, l'information est tombée hier, le projet est officiellement disponible sur github : [https://github.com/laravel/breeze](https://github.com/laravel/breeze) 🥳

## Présentation de Laravel Breeze

Le package fait suite aux nombreuses critiques reçues par Laravel 8 qui a été perçu comme trop compliqué à cause de [Laravel Jetstream](https://jetstream.laravel.com/1.x/introduction.html).

Laravel Breeze est un scaffold avec les routes, les controllers, les form requests, les views, le style et les tests.

La grande nouveauté est que l'intégralité du package est publié dans votre code source. Il vous est donc possible de modifier tout ce qui concerne la logique, les vues et le style!

Il utilise uniquement Blade et [Tailwind CSS](https://tailwindcss.com/) ce qui en fait un choix parfait pour les personnes qui connaissent Laravel mais pas les autres technologies des scaffolds existants. Pour rappel, il existe déjà [Laravel UI](https://github.com/laravel/ui) basé sur React ou VueJS et [Laravel Jetstream](https://jetstream.laravel.com/1.x/introduction.html) qui utilise soit Blade + [Livewire](https://laravel-livewire.com/) soit VueJS + [InertiaJS](https://inertiajs.com/).

## Très concrètement, qu’est-ce qu’il y a dans Laravel Breeze?

Pour un package minimaliste, il est plutôt bien fourni ! Il contient un système complet de gestion d'utilisateurs avec l'inscription, la connexion, la récupération de mot de passe, la vérification d’email, la confirmation de mot de passe et la déconnexion.

Il est actuellement disponible en v0.0.4. On manque encore d'une réelle timeline sur sa sortie stable en 1.0.

## Installation du projet

Dans un projet Laravel nouvellement créé, il est possible d'ajouter Breeze très simplement avec composer.

```bash
composer require laravel/breeze --dev
php artisan breeze:install
```

Quand le package sera disponible en version 1.0.0, il n'y aura plus besoin du flag --dev.
New season of DevDiscuss! S3E1, Developing in Minecraft & Roblox
Tags: discuss, podcast
Published: 2020-11-11 19:19:45

---
title: New season of DevDiscuss! S3E1, Developing in Minecraft & Roblox
published: true
description: Season 3 of DevDiscuss is finally here!
tags: discuss, podcast
series: DevDiscuss Season 3
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/mdeca7tj2rnywkd2jm7g.png
---

### **@Jess and I are back with a new season of the DevDiscuss podcast.** 

> **Check out the season three premiere right here on DEV:**

{% podcast https://dev.to/devdiscuss/s3-e1-developing-in-minecraft-and-roblox %}

> _Quick refresher: DevDiscuss is the podcast where Jess and I discuss the burning topics that affect all our lives as developers. We're lucky to be joined by special guests each week to share their perspectives and get into the fascinating weeds on the topics of the week._ 

---

S3E1 is all about coding in the popular video game platforms, **Minecraft and Roblox**. 

We were joined by **[Genevieve Johnson](https://twitter.com/Cherplunka)**, Senior Instructional Designer at Roblox and **[Gabriel Simmer](https://dev.to/gmemstr)**, Community and Partner Engineer at CircleCI (who at 16, built NodeMC — a tool that can be used to create dashboards and spin up servers in Minecraft). 


As a member of the DEV community, I think you'll like this dive into the open and extensible world of Minecraft and Roblox and their respective development platforms. ✨ 

---

_You can [follow DevDiscuss](dev.to/devdiscuss) to get episode notifications and listen right in your feed_ — or subscribe on your platform of choice! Plus, if you leave us a review, we'll send you a free pack of thank-you stickers. Details [here](https://airtable.com/shr8oKAIMZgdYnBxx). 

## Quick Listening Links
- [Apple Podcasts](https://podcasts.apple.com/podcast/id1513053883)
- [Spotify](https://open.spotify.com/episode/0u5vdcXv2eI8MbW5GZZkgh)
- [Google](https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5kZXZwb2RzLmRldi9kZXZkaXNjdXNzX3BvZGNhc3QueG1s/episode/aHR0cHM6Ly9kZXZwb2RzLmRldi9wb2RjYXN0cy9kZXZkaXNjdXNzLzE4?sa=X&ved=0CAQQkfYCahcKEwiwp4XPgvvsAhUAAAAAHQAAAAAQAw&hl=en)
- [Listen Notes](https://www.listennotes.com/podcasts/devdiscuss-dev-xtQvoDylAUg//)
- [Stitcher](https://www.stitcher.com/show/devdiscuss)
- [TuneIn](https://tunein.com/podcasts/Technology-Podcasts/DevDiscuss-p1324596/?topicId=158681407)
- [RSS Feed](http://feeds.codenewbie.org/devnews_podcast.xml)
- [Transcript](https://devpods.herokuapp.com/podcasts/devdiscuss/episodes/63)
- [Pocket Casts](https://pca.st/5mc6gw61)

---
_Acknowledgements_ 
- _@levisharpe for producing & mixing the show_
- Our season three sponsors, [Triplebyte](https://triplebyte.com/a/YU8fSn0/d) and [Rudderstack](https://rudderstack.com/)!

# 🗣️🗣️🗣️
What Is Single Sign-On (A Non-developer's Guide)
Tags: sso, singlesingon, security
Published: 2020-11-11 19:13:51

How Single Sign-on (SSO) streamlines authentication and what makes for a good SSO solution.
[Read more...](https://auth0.com/blog/what-is-single-sign-on-a-non-developer-s-guide/?utm_source=content_synd&utm_medium=sc&utm_campaign=sso)
I Need project ideas 
Tags: discuss, help
Published: 2020-11-11 19:09:02

Hello friends 👋

this is my first post here in Dev.

let me tell you a bit about me, I graduated from university a year a ago and I joined this amazing full-stack developer Bootcamp by CODDED 😍 (joincoded.com). during the bootcamp we studied Python, Django, JS, React, React Native, and many more. so now i am a full-stack developer 😎

so in the final phase of the bootcamp we are required to build a complete project from a to z.
So, my team and I (4 of us) are looking for cool project ideas to build in the next 3 weeks.

So...... 🤓 what I suggested is to ask our lovely friends at DEV.to to help us come up with a great project idea 🤓 .

would you please help us ? 🥺
How I passed the Azure DP-900, Data Fundamentals exam
Tags: azure, datascience, career
Published: 2020-11-11 19:04:58

### My Cloud Adventure

After passing 4 AWS certifications, I wanted to learn new things and start with another cloud provider: Azure, as part of the #100DaysOfCloud Challenge!


I am on this Azure adventure and already have bagged the AZ-900, Azure Fundamentals. I wanted to get some more experience and certifications for Azure.
So I decided to go with another fundamental exam, just to get comfortable with Microsoft's style of exams.

In this post, I'm going to explain the Azure Data certification as well as how to become Azure Data Fundamentals Certified.

So here it goes.

### Data Fundamentals Skill measured:

**Describe core data concepts (15-20%)**

- Describe types of core data workloads
- Describe data analytics core concepts

**Describe how to work with relational data on Azure (25-30%)**

- Describe relational data workloads
- Describe relational Azure data services
- Identify basic management tasks for relational data
- Describe query techniques for data using SQL language

**Describe how to work with non-relational data on Azure (25-30%)**

- Describe non-relational data workloads
- Describe non-relational data offerings on Azure
- Identify basic management tasks for non-relational data

**Describe an analytics workload on Azure (25-30%)**

- Describe analytics workloads
- Describe the components of a modern data warehouse
- Describe data ingestion and processing on Azure
- Describe data visualization in Microsoft Power BI


### How much does the exam cost?

I was lucky enough to participate in the Cloud Skills Challenge and get a free voucher for the exam.

{% twitter 1316823533893439490 %}

Otherwise, it costs $99 USD, and you can schedule your online exam with Pearson VUE.

### How I prepared for the exam:

I used the Microsoft Learn modules that were listed on the exam page of Data Fundamentals. I created a collection of all listed modules which can be found [here.](https://docs.microsoft.com/en-us/users/rishabkumar-6574/collections/0kzt8q76j2jxn)

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1605111781457/QW0PaoZnt.png)

I think the learn modules prep you well for the Fundamentals exam, since I took the AZ-900 too with just prepping from Microsoft Learn!

But if you are looking for a course, I will go with one from [Scott Duffy.](https://www.udemy.com/course/dp900-azure/)

{% twitter 1320050549832777728 %}

Wanna see how I am doing on this wild Cloud adventure or have any questions? Feel free to contact me on [Twitter](https://twitter.com/rishabk7) or directly on the #100DaysOfCloud Discord channel. I will try my best to answer you.