teleren/devto huggingface dataset:
8 underrated git commands every programmer should know (not the usual pull, push, add, commit)
Tags: git, tips, webdev
Published: 2021-05-19 18:56:52

---
title: 8 underrated git commands every programmer should know (not the usual pull, push, add, commit)
published: true
description: Some of the most useful git commands that I use day to day as a web developer
tags: git, tips, webdevelopment
canonical_url: https://milindsoorya.com/blog/8-underrated-git-commands-every-programmer-should-know-not-the-usual-pull-push-add-commit
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ap7cg9y2h5r1rdm9yq1c.png
---

> I will be adding more useful git tips, if you find this helpful I suggest bookmarking this page. 🔖

## 1. Rename a local branch
useful when you mess up the branch name with some typos.
```
// Note: no need to include < >, separate words with -
git branch -m <new_name>
eg:- git branch -m new-new-branch
``` 

## 2. Change the upstream branch
use this to push the local branch to a new remote branch.
```
git push origin -u <new_name>
``` 

## 3. Makes local branch same as remote
At times we may make many changes to our local branch and end up with something that is worse than what we started with, don't worry everyone has been there 😅. This command will be helpful in those scenarios.
```
// replace staging with the branch you want to reset to
git reset --hard origin/staging
```

## 4. Delete the most recent commit, keeping the work you've done
I am amazed that not too many people know of this command, this will help to recover from those stupid typos that creep into our commits.
```
git reset --soft HEAD~1
```

## 5. Delete the most recent commit, destroying the work you've done
Use this command when you know you really messed up. don't fret it's part of the journey.🎯
```
git reset --hard HEAD~1
```

## 6. Stash your work
Stash command is used to temporarily work on another branch without committing our current work.
```
git stash
```

## 7. Recover stash by going into that branch and
```
git stash apply
```
please note that `git stash apply` won't delete the stashed item from the stash list. If you want to recover stash and drop it from the stash list use `git stash pop`.

## 8. Go back to a previous commit, undo a rebase
It is quite natural to mess up a rebase, these commands will hopefully save you. use reflog command to find the head number of the required commit you want to reset to.
```
// Find the head at that point
git reflog 

// Replace 5 with the head number, please be extra careful not to 
// give wrong wrong head number
git reset --hard "HEAD@{5}"
```
---

👉🏼 checkout my website,  [milindsoorya.com](https://milindsoorya.com/)  for more updates and getting in touch. cheers.

Thank you very much for reading, liking and commenting on my articles. If you have enjoyed my article or if it was helpful please support me by  [buying me a coffee](https://www.buymeacoffee.com/milindsoorya) ☕ 😇.
05.19.21:W - The Process
Tags: writing, productivity
Published: 2021-05-19 18:35:49

* Keep a document open all day. Take live notes for everything that happens.
* Take 10 min at the end of the day. Clean it up. Structure. Common categories: planned deliverables, unplanned support, general info.
* Copy incomplete items to the next day. This is the start for tomorrow’s live document.
* Keep a separate page for global to-do items, and pull from that as necessary to plan.
* Publish the day’s page with the complete items.
* Copy big wins (if any) to a separate page. More concise. Helpful for annual reviews, leadership meetings, raise negotiations, progress reports, whatever.
* Reread today’s page the next morning (now yesterday’s page) to help with retention across a sleep cycle.
A React code editor
Tags: react, design, showdev
Published: 2021-05-19 18:34:37

---
title: A React code editor
published: true
description: How a code editor for beginners developers focused on ReactJS might look.
tags: react, design, showdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/egtamyc1nrp9roer6k16.jpg
canonical_url: https://danilowoz.com/blog/react-code-editor
---

Have we already exhausted the possibilities of how we interact with our favorite code editor? Have we got so used to how we code to achieve a certain goal we can no longer see any way to involve it?

Since I started to work at [CodeSandbox](https://codesandbox.io/?from-app=1), I've seen myself facing those issues more often. Besides that, I began to wonder how beginners are struggling to rule the code editor and learn their favorite framework simultaneously.

Therefore, I challenged myself to come up with a code editor/IDE for beginner developers focused on ReactJS and what this concept might look like.

## The anatomy of a component

The first concept came to me some time ago, when I was teaching a friend of mine more about React and how a component works. I remember I said the component itself has a proper "anatomy". Later, I realized it makes a lot of sense because **we know where things are supposed to be in a component.**

In other words:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3q2mp49wv7k2l2gor5n.jpg)

So basically, we can predict what actions the user might take and teach them the best practices. So, this idea evolved to a new concept which are menus with context-sensitive intentions linked to those sectors.

{% vimeo 552534032 %}

The whole point of this concept is that we can understand the code to provide a way to make a new code editor with whatever framework or even language we want. I just used React to illustrate the idea.
Getting started with programming in Java
Tags: java, beginners, goal, motivation
Published: 2021-05-19 18:23:29

Well, it's **day 3** of my learning Java journey and today we will move ahead in that by learning some components and how to write and compile our first program in Java.

+ In order to run and make programs in Java on your machine you needs to have something called as **JDK** which stands for <u>*Java Development Kit*</u> and can be installed from the respective website of oracle, you can also install its open sourced counter-part OpenJDK if you want to and YouTube as well as Google are always ready to help you in doing so, but with some advanced IDE's like IntelliJ you don't need to worry for that as they do it automatically.


+ #JDK consists of :-
  + <u> JRE (Java Runtime Environment)</u>
  + <u> JVM (Java Virtual Machine)</u>
  + <u> Java Compiler(javac)</u> 
  + <u> Libraries</u>
  + <u> Development tools.</u>

+ JDK include JRE and other tool to develop and run programs.
+ JRE includes JVM and the standard libraries.
+ JVM executes the Byte-code.

+ #Compilation Process of a Java Program:-
 + this process is generally happens inside of JVM.

 >  Source Code(*.java file) ----> given to javac compiler -----> Byte Code(.class file) -----> given to JVM ------->Native Machine code(binary code) 

##Now we come to final part of the blog  that is writing and compiling our first Java program:-

```
//package information
package.codes.main;

//name of the class "Main" - executable class
public class Main{
    // name of the method "main" - executable method
    public static void main(String[] args){
        // statement to print out to console or display
        System.out.println("Hello, World!");
    }
}
```
I am assuming that with a prior knowledge of computer and IDE's everyone would be able to compile and check the output of the above program, also the line containing '//' are comments used to make it clear to a new person so as to make them understand what each line does in this program and won't be visible in the output.

Let's catch up in another post tomorrow, till then keep learning keep growing also do let me know of any suggestion and improvements in the comments below.
Trilha de um QA
Tags: testing, testdev, beginners, braziliandevs
Published: 2021-05-19 18:20:02

Olá QAs, tudo massa? Está iniciando a sua carreira profissional? Já gastou rios de dinheiro com cursos e nada de ser inserido no mercado? Corre aqui que vou te dar uma dicas. Mas shiuuuu, não espalha.

**Tema de hoje: Trilha de um QA**

Hoje não irei escrever muita coisa, pois a própria imagem falará por si, aproveite! Se mesmo assim tiver dúvidas, me procura no inbox para dúvidas ou um café.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zzv497wqq6ktppys8dvv.png)
What other libraries do you install with react?
Tags: react, javascript, watercooler, discuss
Published: 2021-05-19 18:18:32

# Introduction

React is awesome and we all know that. React become more powerful with libraries. So today, we are going to discuss, "Which other libraries do you install with React?"

![images (2)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lwumibdnajvtei5lg9it.jpg)
 

# My Dependencies

I install the following libraries to initiate a react app.

- Ant Design🐜: For UI, I recently started using ant design and I really love it. It's easy to install and set up in the project. Also, the documentation is good.

### Installation

```javascript
$ npm install antd
```

- React-Router📶: It is extremely helpful as it provides navigation in my website for different pages and components. 

### Installation

```javascript
$ npm install react-router-dom
```

- React Icon⚛️: For all the icons I needed for the website in a single library. Its extremely helpful for adding icons to components and adding social media links with icons.

```javascript
$ npm install react-icons --save
```

- Linaria🌸: Linaria is for writing CSS-in-JS. Recently I started to use the linaria library and it is great for having CSS and JS in the same file.

### Installation

```javascript
$ npm install @linaria/core @linaria/react @linaria/babel-preset @linaria/shaker
```

## Discuss

- What other libraries do you install with react?

Hope to add few other libraries to my list.
Wednesday Links - Edition 2021-05-19
Tags: scala, java, jvm, kotlin
Published: 2021-05-19 18:12:40

Scala 3 has been released (3min read) 🎉
https://www.scala-lang.org/blog/2021/05/14/scala3-is-here.html

Health report of your JVM app with JFR events (2min read) 🙈
https://github.com/flight-recorder/health-report

Comments? We don't need no stinkin' Comments! (40min read) 💩
https://www.ufried.com/blog/comments_1/

Agent for custom low level JFR events (10 min read) 🗞
https://developers.redhat.com/blog/2021/01/25/introduction-to-containerjfr-jdk-flight-recorder-for-containers

Stream#mapMulti() is the new Stram#flatMap() (2 min read) 🥴
https://4comprehension.com/java-stream-mapmulti

(re)Discover memory leak in Spring (3min read) 💣
https://krzysztofslusarski.github.io/2021/05/13/casspringjdbc.html

Dealing with Full GC on G1 (4min read) 😱
https://krzysztofslusarski.github.io/2021/05/16/fullgc.html

Kotlin Coroutines 1.5.0 is out (12min read) 🥳
https://blog.jetbrains.com/kotlin/2021/05/kotlin-coroutines-1-5-0-released/

Docker in a glance (256s listen) 📻
https://256.nurkiewicz.com/40

GraalVM with adaptive G1GC (10min read) 🧐
https://blogs.oracle.com/javamagazine/pedal-to-the-metal-high-performance-java-with-graalvm-native-image

Fetch plan in JPA (5min read) 🤯
https://vladmihalcea.com/jpa-entity-graph/
Web architecture lessons from mobile apps with Matt Biilmann
Tags: discuss, podcast, jamstack, netlify
Published: 2021-05-19 18:10:51

---
title: Web architecture lessons from mobile apps with Matt Biilmann
published: true
description: Listen to S5E2 of DevDiscuss!
tags: discuss, podcast, jamstack, netlify
series: DevDiscuss Season 5
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gtah2w82t7f69e9t6e7c.png
---

This week on DevDiscuss, we'll learn a lot about Netlify and Jamstack — and how the latter addresses a critical need in software development. That is, the need for all of us to have a "vocabulary that connects us to a broader theme of modernizing the web" as our guest put it.  

{% podcast https://dev.to/devdiscuss/s5-e2-netlify-jamstack-and-modern-web-development %}
 

The guest I'm quoting is **[Matt Biilmann](https://twitter.com/biilmann)**, CEO of Netlify. Matt co-founded Netlify in 2014 and today is one of the fastest-growing web development platforms. He has been building developer tools, content management systems, and web infrastructure for more than 30 years and is recognized for coining the term "Jamstack". 

Not a bad person to chat with about Netlify, Jamstack, and modern web development, eh?

### _P.S. Today, Netlify shared two exciting announcements: their acquisition of FeaturePeek and the debut of next generation of Deploy Previews. Read Matt's post on these two announcements [here](https://www.netlify.com/blog/2021/05/19/next-generation-deploy-previews-plus-netlify-acquires-featurepeek/)_

---

_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/us/podcast/s5-e2-netlify-jamstack-and-modern-web-development/id1513053883?i=1000522296393)
- [Spotify](https://open.spotify.com/episode/3PEAW3F70d5qWDMBWAz7Nq)
- [Google](https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5kZXZwb2RzLmRldi9kZXZkaXNjdXNzX3BvZGNhc3QueG1s/episode/aHR0cHM6Ly9kZXZwb2RzLmRldi9wb2RjYXN0cy9kZXZkaXNjdXNzLzM1?sa=X&ved=0CAQQkfYCahcKEwi4ouG6q9bwAhUAAAAAHQAAAAAQCA)
- [Listen Notes](https://www.listennotes.com/podcasts/devdiscuss/s5e2-netlify-jamstack-and-_UEo-vAyTqS/)
- [TuneIn](https://tunein.com/podcasts/Technology-Podcasts/DevDiscuss-p1324596/?topicId=163156847)
- [RSS Feed](http://feeds.codenewbie.org/devnews_podcast.xml)
- [DEV Pods Site](https://devpods.herokuapp.com/podcasts/devdiscuss/episodes/163)

---
_Acknowledgements_ 
- _@levisharpe for producing & mixing the show_
- _Our season five sponsors: [CockroachDB](cockroachlabs.com/devdiscuss), [Cloudways](https://www.cloudways.com/en/?id=893892), [Scout APM](https://www.scoutapm.com/devdiscuss) & [Rudderstack](https://rudderstack.com/?utm_source=devto&utm_medium=podcast&utm_campaign=CMPGN_3_PS&utm_content=None&utm_term={keyword}&raid=6dbc05eeb293b421f68d02ce12648240)!_

# 🗣️🗣️🗣️
Las mejores guías completas para Flexbox y CSSGrid 😎
Tags: css, html, webdev, spanish
Published: 2021-05-19 17:56:00

#**Índice**   
1. [Introducción](#id1)
2. [A Complete Guide to Flexbox](#id2)
3. [A Complete Guide to CSSGrid](#id3)
4. [Recomendaciones](#id4)

## 1. **Introducción** <a name="id1"></a>

Desde la llegada de Flexbox y CSSGrid el posicionamiento de elementos en la web se ha facilitado mucho, ya no es necesario escribir código raro usando las propiedades `position` o `float` ya que las mismas no fueron creadas para dichos propósitos.

Ahora bien, aprender Flexbox o CSSGrid tampoco es tarea del todo sencilla, hay que dedicarle tiempo para comprender tanto los conceptos teóricos de su funcionamiento como para practicarlos y usarlos en proyectos reales.

Cuando estaba en la universidad un docente que nos enseñaba JavaScript en los exámenes nos decía: "Usen todo lo que quieran en el parcial, es bobo aprenderse los métodos y propiedades de una tecnología de memoria, cuando trabajen de desarrolladores siempre podrán consultar en Google cualquier duda que tengan." Hoy, años después de oir esas palabras me doy cuenta que efectivamente tenia razón al 100%.

Sin más dilaciones les paso 2 links donde explican con "chubis" **TODAS** las propiedades que se pueden usar tanto con Flexbox como con CSSGrid. (Ambos recursos están en inglés, pero nada que un traductor no pueda solucionar)

## 2. [A Complete Guide to Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) <a name="id2"></a>

Esta guía completa explica todo sobre flexbox, centrándose en todas las diferentes propiedades posibles para el elemento principal (el contenedor flexible) y los elementos secundarios (los elementos flexibles). También incluye historial, demostraciones, patrones y una tabla de soporte del navegador.

> Autor: _Chris Coyier_ | Publicado el 08 de abril de 2013 (Actualizado: 07 de abril de 2021)

## 3. [A Complete Guide to CSSGrid](https://css-tricks.com/snippets/css/complete-guide-grid/) <a name="id3"></a>

Guía completa para la cuadrícula CSS, que se centra en todas las configuraciones tanto para el contenedor principal de la cuadrícula como para los elementos secundarios de la cuadrícula.

> Autor: _Chris House_ | Publicado el 06 de noviembre de 2016 (Actualizado: 10 de marzo de 2021)

## 4. **Recomendaciones** <a name="id4"></a>
* Usa ambas guías para comprender el uso de las tecnologías, explican muy bien y son bastante completas.
* Guarda ambos links en los marcadores de tu navegador favorito para futura consulta, cuando no recuerdes alguna propiedad tendrás a la mano la guía para poder seguir desarrollando sin perder mucho tiempo.
* Complementa ambas guías desarrollando lo que coloquialmente suelo llamar "ejemplos de juguete" desarrolla ejercicios que no tengan sentido, solo para probar y experimentar un poco, te ayudará bastante.
* Por último, desarrolla ejemplo reales, puedes seguir tutoriales en youtube donde desarrollan páginas completas desde 0, esto complementará tu aprendizaje

---

![test](https://media.giphy.com/media/G6LiXv1kWi2f6/giphy.gif)
No Need, but some use semi-colon in Python. Here's Why!
Tags: python, coding, learning
Published: 2021-05-19 17:38:26

![we dont do it here](https://en.meming.world/images/en/thumb/a/a3/We_Don%27t_Do_That_Here.jpg/300px-We_Don%27t_Do_That_Here.jpg)

Yeah, in python it's not mandatory to end a statement with semi-colon. But some people uses it because it also have a use in python.

## Use of ';' in python
In python also Semi-colon is used to end a statement but what it allows is that you can continue to write the next statement in the same line.
Means if you use a ; the you don't have to change to new line you can just start with new sentence.

### something like this
```if this_is_bad_code: rewrite_code(); make_it_more_readable();```

source: [python.org](https://python-reference.readthedocs.io/en/latest/docs/operators/semicolon.html#remarks)
Day 87
Tags: 100daysofcode, programming
Published: 2021-05-19 17:25:50

Day 87 of #100DaysOfCode 
 
- Solved three problems on Codewars.

1 -> [Last Survivor](https://www.codewars.com/kata/609eee71109f860006c377d1) (7kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/7%20kyu/LastSurvivor.js)
2 -> [The Barksdale Code](https://www.codewars.com/kata/573d498eb90ccf20a000002a) (7kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/7%20kyu/TheBarksdaleCode.js)
3 -> [validDate Regex](https://www.codewars.com/kata/548db0bd1df5bbf29b0000b7) (5kyu) || [MySolution](https://github.com/Rb-wahid/My-Coding-Experience/blob/master/src/Codewars/5%20kyu/validDateRegex.js)


[Become Code Warriors](www.codewars.com/r/YECsUA)
Things to do when creating content!
Tags: devrel, youtube, writing
Published: 2021-05-19 16:33:48

Creating content is something I have been doing for a number of years.  I did it in my spare time at the start to help improve my profile, get better known within the tech field.   And also to share knowledge, within the tech community and also as a notes repository for me so I didn't need to remember everything. 😉

Over the years it has become something that I actually do as my job and as such I've had to get a bit more structured about the whole process. 

I've tried to get a bit more organised and thoughtful about the process of creating content and trying to understand what my audience wants and likes. 

Lots of people ask me about creating content and if I have any tips to share.  Below is a video that I created talking about some of the tips I try to apply when creating content - I hope you find it helpful! 😊

{% youtube yaP5R5P9YX8 %}
Mongo DB: Update data using `.forEach()`
Tags: javascript, mongodb, webdev, beginners
Published: 2021-05-19 16:28:37

```js
db.getCollection("posts")
  .find({})
  .forEach((item) => {
    const newValues = item.resources
      ? item.resources.map((label) => ({ label }))
      : [];
    item.resources = newValues;
		
    db.posts.save(item);
  });
```

**Task**: Convert an array of string into array of object.
`.forEach()` can be used for some complex operations/migrations

---

Before: { _id: jf340f34f..., resources: [‘R1’] }  
After: { _id: jf340f34f..., resources: [{label: ‘R1’}] }
Cat Dog Race
Tags: codepen, react, javascript, showdev
Published: 2021-05-19 16:19:33

<h1>CodePen Challenge Cats and Dogs</h1>

<h2>Description</h2>

<p>This game is not based on your speed in pressing keys or button, neither tapping anywhere. This game is based on your luck. Every time you tap the screen, you and the computer moves. The computer has more step than the player if they got lucky, so good luck with that.</p>

<p>I'm studying more about creating a pixel art characters. This time, I didn't put any shading on the objects, and characters and objects.</p>

<p>This is another simple and boring game, just to practice my skills how to think of an algorithm, and specifications for a game. This practice also applies in my way of  thinking in software development.</p>

<h2>Instructions</h2>

<ol>
<li>Tap the screen to make your character move.</li>
<li>Moving your character will also  move your opponent.</li>
<li>The first character who reaches the end line will win the game.</li>
</ol>

<h2>Resources</h2>

<p>Images are created with <a href="https://www.aseprite.org">Aseprite</a>. The animation of GIF is also done there.</p>

<p>I created Javascript functionality using <a href="https://reactjs.org">ReactJS</a>.</p>

<h2>Known issues</h2>

<ol>
<li>I only tested with Safari, but a pixel of neighbor sprite is also rendered on the image.</li>
</ol>

{% codepen https://codepen.io/takaneichinose/pen/XWMNpzQ %}
"Accountable Code" 30 Day Challenge to Start My Coding Journey
Tags: beginners, challenge, webdev, 30day
Published: 2021-05-19 16:14:03

Hello World!

As time has passed and with little focus I can't say that I have been successful at coding much past that! As a newbie to this field I have come to accept that more accountability is needed for myself to remain diligently focused in progressing in learning code.

Therefore, as I begin this journey of what I'd like to call "accountable code" I plan on starting out with a 30 day challenge. The terms are simple, plan out a manageable attack strategy to start learning some web development basics and document every day for the next month of the progress that is made. 

I hope that this in term can reiterate these concepts a second time and really hold me accountable for the duration of this time. I humbly understand that you can only learn so much in a given time frame but let's see together how far 'accountable coding' can go! I would love to interact with all of you as much as possible so if you have any pro tips or just want to talk, leave me a comment! Welp I'm off to start! See you folks tomorrow!

-Nerdeye