teleren/devto huggingface dataset:
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2020-11-12 20:35:41

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

Thanks for the perspective on [time estimation](https://dev.to/carmenhchung/how-to-nail-time-estimations-gio) as a developer, @jonrandy!
{% devcomment 17kjg %}

I wouldn't even qualify this as a wrong answer to "[What is software development? Wrong answers only](https://dev.to/ben/what-is-software-wrong-answers-only-4lak)" @panditapan! 
{% devcomment 17mmj %}

Thank you for your meaningful contributions to DEV, @emma! 
{% devcomment 17jne %}

Great tips on making Chrome work for you (not the other way around) — extensions or no extensions, @ludamillion!   
{% devcomment 17k6p %}

I can't say this isn't my brain's first instinct any time I read the term ["children"](https://dev.to/aspittel/using-children-in-react-1nkm) here on DEV, @codemouse92 😅 
{% devcomment 17ne9 %}

See you next week for more great comments ✌
what is Agile? Wrong answers only
Tags: discuss, watercooler, agile
Published: 2020-11-12 20:31:35

---
title: what is Agile? Wrong answers only
published: true
description: Tell me the worst ways you've seen agile defined.
tags: discuss, watercooler, agile
//cover_image: https://direct_url_to_image.jpg
---

Agile is a product you buy in a cardboard box on the checkout line at Fry's Electronics.

Agile takes at least four years to show real results.

Agile is having 30 developers do stand-up one at a time.

Tell me your worst definitions of Agile in the comments.
Simple Raycast Engine
Tags: codepen
Published: 2020-11-12 20:21:39

<p>A simple raycast engine (ala Wolfenstein 3D) inspired by <a href="https://github.com/hunterloftis/playfuljs/blob/master/content/demos/raycaster.html" target="_blank">https://github.com/hunterloftis/playfuljs/blob/master/content/demos/raycaster.html</a>.</p>

{% codepen https://codepen.io/xgundam05/pen/vcBbL %}
Resuelve la excepción "ReflectionException: Class env does not exist"
Tags: laravel, telescope, devscamp
Published: 2020-11-12 20:20:08

---
title: Resuelve la excepción "ReflectionException: Class env does not exist"
published: true
description: Como resolver el error: "Class env does not exists" en Laravel.
tags: Laravel, Telescope, devscamp
//cover_image: https://direct_url_to_image.jpg
---

* [English version of this post](https://dev.to/arielmejiadev/reflectionexception-class-env-does-not-exist-efe)

## El problema:

Aunque corras tus tests:

- de la forma antigua:

```php
vendor/bin/phpunit
```

- de la forma moderna (Laravel 7, 8):

```php
php artisan test
```

- O usando el UI PHPStorm.

En la consola te muestra el siguiente error:

```bash
ReflectionException: Class env does not exist
```

Mas abajo menciona un error en el ambiente de "test" relacionado al paquete Telescope, pero nosotros no realizamos ni debemos realizar ningun cambio en el codigo de telescope, tambien cuando se da este error normalmente, no se ha cambiado el codigo de tus tests, este es un error relacionado si a telescope pero tambien al cache.

## Solución

- Paso 1

Inhabilita telescope para el ambiente de tests en tu archivo 
PHPUnit.xml agrega:

```XML
<env name="TELESCOPE_ENABLED" value="false"/>
```

- Paso 2

Ve a la terminal y ejecuta las siguientes lineas de comando:

```php
php artisan clear
php artisan config:clear
```

## Nota

Encontré la solución en dos sitios:

- En este [github issue] (https://github.com/laravel/telescope/issues/347)

- y en el [Blog de David Carr](https://dcblog.dev/laravel-telescope-error-when-running-tests-reflectionexception-class-env-does-not-exist)

Yo solo facilito la información en esta plataforma ya que es mas fácil buscarla por el titulo del error y en esta plataforma muchos mas developers se pueden beneficiar de la solución en un futuro.


Gracias por leer el post!
Easy way to debug a webview in a VS Code extension
Tags: vscode, extension, debug
Published: 2020-11-12 20:19:35

VS Code’s [Extension API](https://code.visualstudio.com/api) lets you build all sorts of interesting extensions. One example is an extension that uses the [Webview API](https://code.visualstudio.com/api/extension-guides/webview) to display a custom webpage built with HTML, CSS and JavaScript right into the editor.

I’ve used this API for building [my own extensions](https://marketplace.visualstudio.com/publishers/dzhavat) and it’s a lot of fun. But sometimes things can get annoying when trying to debug a webview. 

One approach I’ve used in the past was to run the extension in debug mode, open the webview to see how it looks, then go back to the code and make small adjustments in the HTML/CSS/JavaScript if something looks wrong. Then repeat the steps. This certainly works but the whole process is tedious and takes a lot of trial and error to get the right results.

Fortunately, there’s an easier way!

VS Code is build with Electron which comes with a Chrome browser built-in. Not only that but Chrome’s DevTools follow along as well! This allows you to debug both VS Code itself and webviews. Here’s how:

1. Run your extension in debug mode
2. Open the webview you’d like to debug
3. Press `Ctrl + Shift + P` (Win/Linux), `Cmd + Shift + P` (Mac) to open the command panel
4. Search for the `Open Webview Developer Tools` command

That’s all! Once you do that, you’ll get an instance of DevTools in a separate window. You can use it to select HTML elements, tweak CSS styles or put breakpoints in JavaScript, much like the way you are used to debug a normal webpage.

That’s all! Happy debugging. Oh, and if you prefer video, I’ve made a short clip of the steps above.

{% youtube YSxSzRp6s4o %}
C# 9.0 - Optional "Main"
Tags: csharp9, net5, programming
Published: 2020-11-12 20:06:59

To run a C# code now we don't need namespace, main etc. Just run it

```csharp
using System;

Console.WriteLine("Hello one line C# 9.0");

//namespace CSharp9
//{
//    class Program
//    {
//        static void Main(string[] args)
//        {
//            Console.WriteLine("Hello one line C# 9.0"); 
//        }
//    }
//}
```
Even this works
```csharp
using System;

Console.WriteLine("Hello one line C# 9.0");
Console.WriteLine("Hello one line C# 9.0");
if (1 == 1)
{
    Console.WriteLine("if con");
}

```
Unruly Tower
Tags: codepen
Published: 2020-11-12 20:03:25

<p>LEFT and RIGHT arrow keys to run, SPACEBAR to jump. Inspired by a bunch of SNES/Mega Drive/Genesis games. Levels similar to this was pretty common in platformers from that era to mix up the gameplay from the usual horizontal scrolling. Good luck! :)</p>

{% codepen https://codepen.io/johan-tirholm/pen/jZorRd %}
#hactoberfest @Digitalocean
Tags: hacktoberfest
Published: 2020-11-12 20:02:34

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->


### [Intro Heading]
<!-- If you are new to the DEV community, introduce yourself and share a bit about why you joined DEV and decided to participate in Hacktoberfest this year.  --> 
### Background

<!-- Are you brand new to open source? What about coding in general? Tell us about how you got here →

### Progress

<!-- Share a bit about where you’re at in your Hacktoberfest journey. What stage are you at? How has the process been?  -->

### Contributions

<!-- This is where you can list the contributions you made and explain why you chose the projects you did. Don’t forget to add links!  -->


### Reflections
<!-- Overall, how has your Hacktoberfest 2020 experience been? If you’re a first-timer, will you participate again? What have you learned? Have you made any interesting connections? What is your next step in open source?  -->
Play Pong!
Tags: codepen
Published: 2020-11-12 19:59:31

<p>Repository: <a href="https://github.com/dudeOMG/pong" target="_blank">https://github.com/dudeOMG/pong</a></p>

<p>Tutorial: <a href="http://www.simonewebdesign.it/making-a-game-from-scratch-in-html5/" target="_blank">http://www.simonewebdesign.it/making-a-game-from-scratch-in-html5/</a></p>

{% codepen https://codepen.io/simone/pen/GgqdLv %}
Setting up React Native on Linux Manjaro
Tags: reactnative, linux, setup, guide
Published: 2020-11-12 19:57:22

###React Native on Manjaro is really hard to setup. 
And not because it is actually hard, but the information is scattered all over the web, in little and semi-outdated places. so as as a #semiLinuxNoob I've decide to write this guide for future me and others who would like to try using Linux and particularly an Arch based distribution on their main dev machine for React native. I'm on the xfce Version.

##**Step 01** Node & npm
You either add them on Pamac from the AUR or on terminal with the command `pacman -S nodejs npm `
 and see their version ` node -v` and `npm -v`

##**Step 02** OpenJDK 8
Install Java
```
sudo pacman -S jre8-openjdk-headless jre8-openjdk jdk8-openjdk openjdk8-doc openjdk8-src
```
##**Step 03** Android Studio
Install it in Pamac from the AUR, and then open Android Studio, click on "Configure" button and select "SDK Manager".

Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the Android 10 (Q) entry, then make sure the following items are checked:

- Android SDK Platform 29
- Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image.

Finally, click "Apply" to download and install the Android SDK and related build tools.

Next, Add the following lines to your $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file:
```
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
```
##**Step 03** Watchman
Here, you can either go for the AUR or if you like you can install [Hombrew](https://brew.sh/) and get it with `brew install watchman`

##**Step 04** Celebrate, We made it!
![guy dancing](https://media.giphy.com/media/l3q2Z6S6n38zjPswo/giphy.gif)


##**Step 05** VM Acceleration (optional)
This will improve system performance while you're using the Emulator rather than a Actual Device. Since it's not a short affair, I'll just link to the [Original article on FOSSlinux](https://www.fosslinux.com/2484/how-to-install-virtual-machine-manager-kvm-in-manjaro-and-arch-linux.htm)

###**Conclusion**
Hope this was helpful for you, and be sure to share this with a friend who develops on Windows or Ubuntu, and save them!
Tetris
Tags: codepen
Published: 2020-11-12 19:46:12

<p>Tetris is one of the best games from the most popular console of the 1990s. Do you feel tired of with complicated and difficult games? Did you miss the favorite classic games? Let's play this game to feel nostalgic!
How to play: Move and rotate the falling blocks. Lines are cleared when they are filled with blocks and have no empty spaces</p>

{% codepen https://codepen.io/kudchikarsk/pen/GYKmdd %}
What is Laravel Breeze and how to get started?

Published: 2020-11-12 19:31:19

Check out this post on the [devdojo.com](https://devdojo.com/)  website!

It is a post on  [What is Laravel Breeze and how to get started?](https://devdojo.com/bobbyiliev/what-is-laravel-breeze-and-how-to-get-started)  🔥!

To make things even better you can use this referral link to get a free $100 credit that you could use to deploy your virtual machines and test the guide yourself on a few DigitalOcean servers:

 [Digital Ocean $100 Free Credit](https://m.do.co/c/2a9bba940f39) 

Link to the post:

 [https://devdojo.com/bobbyiliev/what-is-laravel-breeze-and-how-to-get-started](https://devdojo.com/bobbyiliev/what-is-laravel-breeze-and-how-to-get-started) 

I strongly encourage everyone to go ahead and check out the [devdojo.com](https://devdojo.com/) website, there's a lot of valuable content there.
My First Serious Hacktoberfest
Tags: hacktoberfest, hacktoberfest2020, opensource
Published: 2020-11-12 19:26:21

Hello! 👋

This is my first post in **dev.to**. It is about my contributions to **Hacktoberfest 2020**.

### Introduction

My name is Kotchakorn Wongwisutigul. You can call me by the alias name **"Icegotcha"** or shortly, **"Ice"**. I'm a backend developer from Thailand. Mostly, I develop REST APIs and services with Node.js and Spring, but sometimes I develop frontend applications too, with React. 

I love to learn new things every day. I read articles from many websites until 2019. I found **dev.to** has a lot of interesting articles enough to read every day. I decided to join this community since then.

Reading articles is not enough to learn new things. I often find a chance to write code and work on projects. Contribution in Hacktoberfest is one of the activities that I'll do to improve my programming skills. ✨

### Background

I have been working as a developer for 2 years, but I'm new to the open-source world because of mostly working on private projects. Actually, I attended Hacktoberfest the last year, but I made only 1 PR due to many inconveniences. This year I want to try making new own projects and **"open-source"** is the knowledge I need to have. I think I can't miss an opportunity to attend Hacktoberfest again. 🔥

### Contributions

I sent the first 2 PRs to a project named [eo-locale](https://github.com/ibitcy/eo-locale) by [ibitcy](https://github.com/ibitcy), a Javascript lightweight i18n library.

{% github https://github.com/ibitcy/eo-locale/pull/34 %}

{% github https://github.com/ibitcy/eo-locale/pull/39 %}

Next, I used knowledge about React and React Hook to make and send a PR to [Reddit image viewer](https://github.com/gregrickaby/reddit-image-viewer) by [Greg Rickaby](https://github.com/gregrickaby).

{% github https://github.com/gregrickaby/reddit-image-viewer/pull/75 %}

Then In the middle of the month, I sent the last PR to [javascript-mini-projects](https://github.com/thinkswell/javascript-mini-projects) by [Thinkswell](https://github.com/thinkswell). I made a simple application as below:

{% github https://github.com/thinkswell/javascript-mini-projects/pull/60 %}

After I finished doing a lot of works. I fixed an issue that I said I would do in the Reddit image viewer.

{% github https://github.com/gregrickaby/reddit-image-viewer/pull/84 %}

In conclusion, I sent 4 PRs and 1 extra PR.

... and I'll get a beautiful T-shirt! 😇

![My Hacktoberfest screen](https://dev-to-uploads.s3.amazonaws.com/i/ea7grfs2z49rx78b3lsh.PNG)

### Reflections

I'm very glad to be one of the contributors to the open-source world. I'll try to contribute projects again in and out of the event "Hacktoberfest". 💖
Pure CSS Tic-tac-toe
Tags: codepen
Published: 2020-11-12 19:17:33

<p>I have seen demos of pure CSS Tic-tac-toe games, but I was unable to find a version that truly works. If I have missed it, please send me link, so I can see how another dev has created it.</p>

{% codepen https://codepen.io/ziga-miklic/pen/Fagmh %}
How to detect the trend using only 3 lines
Published: 2020-11-12 19:05:41

How to draw 3 lines in a chart using Pine language from tradingview:

```javascript
//@version=4
study("Line", overlay=true)
L = line.new(bar_index, high, bar_index[10], low[10], width = 2)
line.delete(L[1])
M = line.new(bar_index, high, bar_index[30], low[30], width = 2)
line.delete(M[1])
N = line.new(bar_index, high, bar_index[60], low[60], width = 2)
line.delete(N[1])
line.set_color(L,color=color.green)  // la linea mas corta
line.set_color(M,color=color.red)   // la mediana
line.set_color(N,color=color.blue)  // la linea mas larga


```

The result is like in the next graph:
![Graficando tres lineas de las ultimas pendientes en trading view](https://dev-to-uploads.s3.amazonaws.com/i/w0j3m4casuhe33lto9pp.png)

Explanation:

The shortest line is green  (10 candles)
The medium line is red (30 candles)
The largest line is blue(60 candles)


How to Use ?

You need to identify the slope of every line and the respective moment or the value of the trend in a forex instrument graph.
And using the slope you can program more complex algorithms, to make decisions about buy or sell.

Use this code in your programs and let us to know.

Thanks for read
Introducing the Cloud Native Development Landscape
Tags: cloudnative, serverless, opensource, kubernetes
Published: 2020-11-12 19:03:13

Hello community.  

I'm a managing director with Dell Tech Capital, and we've been working on defining a developer landscape along with a cloud native development landscape. 

This matters to developers as cloud native development is on the rise. According to Gartner, IDC, and Goldman Sachs, containers are shaping into a $7 billion opportunity by 2021. 75% will be for deploying new applications enabled by containers, especially cloud native apps.

Bringing awareness to the (many) approaches for building cloud native applications and the products which are shaping this future helps us all get to that future a little quicker.

This landscape covers:
🌟 200 companies
🌟 $2.85B in venture capital raised
🌟 $27B in annualized revenues
🌟 $100B in market capitalization
👉🏼Part of the Developer-Led Landscape
👉🏼Why Building Cloud Native Apps is Hard (it's about the state!)
👉🏼Cloud Native Development is on the Rise
👉🏼Approach 1: Reactive Architecture for Stateful Microservices and Stateful Serverless
👉🏼Approach 2: Event-Driven Architecture and Event Streaming for Loosely-Coupled State Processing
👉🏼Approach 3: Stateless Middleware Running on Stateful Orchestration (Horizontally Scalable Storage + Planet-Scale Database)
👉🏼Approach 4: Jamstack, Reactive GUIs, and Headless CMS for Decoupling State, Model, and Representation to Scale Stateful Front Ends
👉🏼Vendor Fragmentation, Standards, and a Need for Leadership

[Read the landscape:](https://tylerjewell.substack.com/p/developer-led-landscape-cloud-native)
Thoughts on Google Photos discontinuing free unlimited storage
Tags: googlecloud
Published: 2020-11-12 18:59:52

If you have missed the [news](https://twitter.com/dflieb/status/1326586058289471491), here's a quick overview

* Currently, Google Photos allows storage of unlimited high-quality photos and videos on your cloud. 
* Only original quality media counts toward the 15GB free storage.
* Beginning June 2021, high-quality photos and videos too will start counting towards your storage quota.
* Media uploaded till June 2021 will remain available for free.
* Pixel users will not be affected by this.


We knew this was coming, primarily because of the volume of photos and videos that get uploaded daily. As Google claims, 28 billion photos and videos are uploaded every week. Google had to decide on this, the question was just when.

####Google Photos wasn't a charity, it had its purpose

IMO, the purpose of google photos in being free was to train its AI and computer vision based on the real-world photos and videos and Google Photos is their most dependable source for these datasets. If you have keenly observed, Google Photos as a product has had significant improvements over the years. It's been 5 years, even if the models aren't perfect yet, they already have ample data to train them better.

This reminds me of a famous quote,
```
If you're not paying for it, you're the product
```

Now that we aren't the product anymore, the focus shifts to the actual product *Google one*

####Promoting Google One

[Google one](https://one.google.com/about) - the subscription service was waiting for this move. Over these years, a substantial number of people would have been so used to the ecosystem that they would rather subscribe for the service instead of finding an alternative and migrate everything. This is a potential business model. Providing 100GB for less than 2$ is a pretty neat deal too especially with google's family sharing features. Most of the users would not even have a second thought over subscribing it right away.

####Yet another typical product
In hindsight, Google could have easily done this years ago but as usual, it went with that typical product philosophy, "First, get the user to the ecosystem, iterate and provide quality service, keep them happy, make it difficult for the user to leave the ecosystem, now charge for the service". I feel Google Photos has passed the test with flying colours. Now is the time for Google Photos to reap the rewards for all the hard work.

Btw, ICYMI Amazon Photos provides unlimited storage for its prime users. Heard that somewhere before?😉 

I'd be expecting your views on this too.
Tips I've learned over 10 years for maintainability of my code
Tags: hire, senior, go, developers
Published: 2020-11-12 18:52:41



<div>I've been writing code for over 10 years now, and although I've been doing more management lately, at my peak I was able to write 500+ lines of well-performing code a day. Here are the principles that helped me with this:</div>

<ol><li><b>Don't over-generalize</b></li><li><b>Don't optimize your code in advance</b></li><li><b>Name and group everything that happens correctly</b></li><li><b>Don't mix algorithms and other technologically complex pieces of code with business logic</b><li><b>Don't use any advanced features of any language</b></li><li><b>It is worth throwing all OOP out of your head</b></li><li><b>Use as many asserts, logs and other methods to catch unplanned system state as early as possible</b></li><li><b>Every extra line of code is evil</b></li></ol>

<div>Every extra line of code is evil:) Wherever possible, you should not use someone else's code that you have not read and understood</div><br><br>

Here I placed just names of my mistakes, but if you are interested here the <a href="https://exceed-team.com/tech/how-to-write-maintainable-code">full version with each point explanations</a>
Supress powershell output
Tags: powershell, cli
Published: 2020-11-12 18:51:14

Today i wrestled with a jenkins pipeline file. The jenkinsfile is basicly a groovy script from where you are able executed various other shell scripts and external programs. But if these do output some info onto the shell, you could be running into problems with jenkins. 

So i was looking for a way to supress the output from the command line and found [out-null](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/out-null?view=powershell-5.1).

Piping into out-null supresses the ouput of a command. Example: 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z47halchoai9wciisdva.PNG)
Is Open Source Contribution Necessary
Tags: hacktoberfest, thedevpractice
Published: 2020-11-12 18:31:17

It is a amazing Experience to be a part of Open Source Contribution. Open Source Means You should learn how to work in industry with remote work. You should have to learn any specific domain knowledge, Git and any Platform like Github/gitlab etc.. So don't Wait for any Oppertunity. Just learning Github and continue your Open source Journey. Many Companies are also asking for Open source Experience. So, I Will Thanks Digital Ocean For the Wonderful platform called Hacktoberfest. Being a part of Hacktoberfest 2020 contributer, I wish you Happy Coding.
How to fix Visual Studio Code Proxy Issue.
Tags: vscode, proxy, zscalar
Published: 2020-11-12 18:26:44

Company policies will not allow to install Visual Studio Code Extension or not allow you to update the Visual Studio Code.

After a big struggle, identified the below steps to fix the issue (Windows 10).

1) Go to proxy settings page and copy the entire text from Script address and make sure "Automatic detect settings" is turned off.

2) Go to settings page in Visual Studio Code 
   (File > Preferences > Settings) and search for Proxy. 
    Paste the proxy script which we copied in Step 1.
    Uncheck the "Http Proxy Strict SSL"
 ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3d7wuv9a4k10o6qi7mh7.png)

3) Restart Visual Studio Code.
 
All the best! Thanks.