teleren/devto huggingface dataset:
Pillars for defining an efficient learning technique
Tags: productivity, learning, career, beginners
Published: 2021-06-28 15:39:39

Below are a few pillars upon which you can base your learning journey. Not just applicable for students. Parents and teachers can use them to create a learning mindset in children.

## The Pillars

1. **Everything is a game**
    - growth mindset - intelligence and capabilities can grow
    - locus of control - internal (you are in control of your life's outcomes) vs external (your life's outcomes depend on external factors like fate)
    - if you believe you are in control of your life, you believe that you can improve your skills rather than blaming external factors
    - you are a player in a game who gains XP with each challenge
    - and the player makes multiple efforts to grow to the next level
2. **Feynman Technique**
    - To understand something well, you need to be able to teach it.
    - good way to learn and test your knowledge
    - be able to answer questions about it
    - do not hide behind jargons - use simple terms to explain concepts
    - take notes in a way that is shareable to others (or create a blog like me)
3. **Trunk based knowledge**
    - start from the root - fundamentals
    - build a knowledge tree where the root is ever-relevant and even if the leaves become irrelevant in short-term, it is easier to learn something new because of your strong root knowledge
    - makes it easier to adapt to the future
4. **Efficiency trumps grit**
    - improve work efficiency and avoid working too hard
    - being busy all the time indicates bad time management skills and does not necessarily indicate that you are good at something

Here are a few blogs to help you explore further:
[Trunk based knowledge](https://medium.com/accelerated-intelligence/be-prepared-to-lose-your-job-in-the-future-if-you-dont-learn-this-one-skill-now-8a87ade2a268)
[Feynman technique](https://fs.blog/2021/02/feynman-learning-technique/)
[First principles](https://fs.blog/2018/04/first-principles/)
[Mindset](https://fs.blog/2015/03/carol-dweck-mindset/)

---

Happy Learning!!
![Learning](https://media.tenor.com/images/0bc4c56fa94d28aa800c759afe86bf66/tenor.gif)

You can connect with me at &nbsp;
[LinkedIn](https://www.linkedin.com/in/abh1navv)
[Twitter/@abh1navv]
(https://www.twitter.com/abh1navv)
LinkedList Questions: [Two Pass] Delete nth node from end
Tags: algorithms, programming, codenewbie, linkedlist
Published: 2021-06-28 15:37:37

In this series of posts, I will discuss coding questions on the `LinkedList` Data structure.
The posts in this series will be organized in the following way,

1. Question Link ❓
2. Possible Explanation 📝
3. Documented C++ Code 🧹
4. Time and Space Complexity Analysis ⌛🌌

## The Question

Given the `head` of a linked list, remove the `nth` node from the end of the list and return its head.

**Constraints:**

- The number of nodes in the list is `sz`.
- `1 <= sz <= 30`
- `0 <= Node.val <= 100`
- `1 <= n <= sz`

[https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/](https://leetcode.com/problems/remove-nth-node-from-end-of-list/description/)

> 💡 Give yourself atleast 15-20 mins to figure out the solution :)

There are two approaches possible, in this post we will see the first one.
## Approach 1: Two Pass

If you think a bit, `nth` node from *end* is `list_len - n + 1` th node from *beginning*.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pyrq2jhwa4c545r2hsyq.png)
 

So our algorithm is:

1. Find the length of LinkedList → L
2. Delete the (L - n + 1)th node from beginning.

## C++ Code

### Definition of LinkedList

```cpp
//Definition for singly-linked list.
struct ListNode
{
    int val;
    ListNode *next;
    ListNode() : val(0), next(nullptr) {}
    ListNode(int x) : val(x), next(nullptr) {}
    ListNode(int x, ListNode *next) : val(x), next(next) {}
};

```

### Solution

```cpp
ListNode *removeNthFromEnd(ListNode *head, int n)
    {
        //- if LL is empty
        if (!head)
            return head;

        //note: first pass : O(n)
        //- getting length of LL 
        int cnt = 0;
        ListNode *temp = head;
        while (temp)
        {
            cnt++;
            temp = temp->next;
        }

        //* Standard Procedure to delete (k+1)th node from beginning
        
        //note: Required Node: (cnt - n +1)th node
        //note: we have to go "cnt-n" times deep to stand at required node
        int k = cnt - n;
        ListNode *cur = head;
        ListNode *prev = nullptr; //it will point one node preceding to cur

        //note: second pass :O(n)
        while (k > 0)
        {
            prev = cur;
            cur = cur->next;
            k--;
        }

        //- first node of the LL is to be deleted
        if (!prev)
        {
            temp = cur;
            cur = cur->next;
            delete temp;
            head = cur; //! cur is the new head
        }
        else
        {
            prev->next = cur->next;
            delete cur;
        }
        return head;
    }
```

## Complexity Analysis

N is the length of LinkedList.
K is the postion of node from end.

### Time Complexity: O(N)

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rndiajcx446q7jtxm79q.png)
 

### Space Complexity: O(1)

We didn't use any extra space.

> 💡 It turns out there's a better method to solve this question in _single_ pass, we shall see that method in next post :)
tsParticles 1.30.0 is here! Confetti rework (all particles shapes supported, emojis too, with sample inside)
Tags: news, javascript, webdev, showdev
Published: 2021-06-28 15:35:00

# tsParticles 1.30.0

## New Features

- Added wobble effect to particles, configurable in options
- Added tilt effect to particles, configurable in options
- Added roll options to particles, configurable in options
- Added all new sections to editor

## Bug Fixes

- Fixed old TypeScript definitions generation, fixes #1683 
- Simplified confetti preset, if the first parameter is not specified, a random id will be used
- tsParticles will create an element if the id used is not valid

## Breaking Changes

- Confetti animations are now split in three generic particles sections (`roll`, `tilt`, `wobble`)
- Removed confetti shape, it's no longer needed
- The library has changed the output folders, the `dist/` folder has been removed.

### A note about the `dist/` folder

#### Imports (`import`)

In most cases this change will affect only who are using internal imports.

__This `tsparticles/dist` can be safely replaced to `tsparticles`__.

#### CDN or Vanilla

This will affect also everyone using tsParticles with CDNs since the `dist` folder is no longer part of the path, but if it's copied from the CDN website it's fine.

### A note about `wobble`, `tilt` and `roll`

These three new particles options sections will create a wonderful and realistic confetti effect to all particles. You can use any `shape` with these effects, even external ones, self-created or not. The only one not compatible is `confetti` because it's been replaced by these properties.

What do they means?

#### Roll

Roll makes particles roll on their `y` axis. They look like they're falling rolling on themself. In these options you can set a back color (that will be visible when the particle has flipped).

The color is optional and a `darken` or a `enlighten` section can be alternatively configured.

The reading values order is:

- Back Color
- Darken
- Enlighten

So if `enlighten` and `darken` are both specified, only `darken` will be read.

`darken` and `enlighten` have a `value` and `enable`, the first will subtract the luminosity of the color for that value, the second will add it, only if the `enable` value is true.

#### Tilt

Tilt is responsible for particles deformation, the particles will be tilted following the specified parameters. This is not animated by default, the options are similar to `rotate`, they don't have `path` since is not valid here.

If a value is set all particles will be tilted for that angle (both horizontally and vertically using `cos` and `sin` functions), when animated the angle will be increased or decreased, depending on set direction.

#### Wobble

Wobble is the horizontal movement that simulates the air resistance. The particles will bounce from left to right with a configurable `speed` and `distance`.

---

{% github matteobruni/tsparticles %}

---

Let's see the new confetti options in action

{% codepen https://codepen.io/matteobruni/pen/KKmKaVb %}

Yes, you saw right. Confetti can be emojis too! 😎
Important lesson I’ve learnt after switching to software development
Tags: career, codenewbie
Published: 2021-06-28 15:32:58

‪I studied automotive engineering, ‬took a business diploma, ‬graduated with a psychology degree ‬and yet I’m now a cyber security software engineer for 3 years and it has been the best thing that had ever to happen to me! ‬

It’s definitely not easy learning new things all the time. But having all these unrelated formal educations had taught me one important aspect, be persistence. 

I am not the brightest person around, that might explain why I have been all over the places in my education background. But I am persistent enough to get to where I am now. 

On many occasion during my current role which I have so much joy with, I had wondered, what if I started my career as a software engineer after finishing my computer science degree. If with the pace that I am going at now, if I was younger I might have progress far far more at this current stage. I might be in a management position, I might even be a tech business founder. Or will I be still a wonderer, thinking of what should I be doing next? 

We will never know (Unless we figured out how to turn back time)! But my diverse education background had definitely helped contributing much of the choices I have made so far. From my business education and sales experience, I understand the motivation of my company to move forward. With my psychology studies, I have learnt the capability of our brain and mind, and how to absorb new knowledge faster and reliably. And with my years of experience talking to others and working in organisations, I know the importance of communication. 

It’s sad to hear that for many people that I have spoke they never got a chance to reshape their career. All with very valid reasons on why that is so. And for them I would say..

If you think you are going no where in your current career, find something else that will interest you. Explore a little and plan your next move hard and wise. But if it did not work out so well for the first time, try it again for second time or even third! I have the impulse to say don’t stop until you are happy at what you are, but it’s unfortunate that we have a time limit to our life. So I hope you will one day find a thing you are happy to do till the end of your life. 

As many business owners would have agree, failures are just lessons to success. Not everyone is lucky enough to strike gold on your first pick. 

So if you really want something in your life, set your goal and move towards it, no matter how tough it can be! And if it did not turn out well, replan and set your course again.
Making a game: Avoiding burnout
Tags: gamedev, burnout, productivity, mentalhealth
Published: 2021-06-28 15:11:16

[Making a game: Avoiding burnout](https://www.saluki.tech/2021/06/20/making-a-game-avoiding-burnout/) by Seth

One of the most common reasons that a game will not get finished is burnout. It’s probably the number 1 project killer out there in fact, and it doesn’t just stop projects from getting finished, it also discourages people from making games. This is why it is very important to acknowledge that burnout is a thing, and for you to be proactive in preventing it from shutting down your game (or any other long-term project for that matter).

If you can avoid burnout, you can keep working. And if you can keep working, you can finish your game.


The post [Making a game: Avoiding burnout](https://www.saluki.tech/2021/06/20/making-a-game-avoiding-burnout/) is available in full on [Saluki Tech](https://www.saluki.tech).
Ubuntu 20.04 on Dell XPS 15" 9500
Tags: ubuntu, dellxps, drivers, intelrts
Published: 2021-06-28 15:08:24

Consider the steps below as my personal notes if I ever need to factory reset my laptop. There are some gotchas and little quirks and mistakes in the documentation online. Articles will mention "if Intel RTS is activated and ..." but what I'll describe here is what worked for me. If you get the same laptop as me, these steps should get you up and running without any fuss. Good luck!

### 3-step guide to installing Ubuntu 20.04 side-by-side with Windows on a new Dell XPS laptop.

1. Disable Windows disk encryption
2. Disable Intel RTS
3. Install wifi drivers

### 1. Disable Windows disk encryption

You can follow the instructions on Ubuntu's help forum here:
[https://discourse.ubuntu.com/t/ubuntu-installation-on-computers-running-windows-and-bitlocker-turned-on/15338](https://discourse.ubuntu.com/t/ubuntu-installation-on-computers-running-windows-and-bitlocker-turned-on/15338). Pretty straight forward. In a nutshell, go to Windows settings > Encryption, disable encryption, restart computer. Done. Next.

### 2. Disable Intel RTS

Follow most of the instructions here [https://help.ubuntu.com/rst/](https://help.ubuntu.com/rst/).

Start by changing registry values for `iaStorV` & `storahci` as documented.

Next, skip the rest of the instructions and follow `nitram-mural`'s advice here: [https://discourse.ubuntu.com/t/ubuntu-installation-on-computers-with-intel-r-rst-enabled/15347/90](https://discourse.ubuntu.com/t/ubuntu-installation-on-computers-with-intel-r-rst-enabled/15347/90):

> The solution was to set the safe mode (safeboot) manually. Right after the regedit changes:

> - With a cmd with admin rights (windows search: cmd, then right click, run as admin):
> - `bcdedit /set {current} safeboot minimal`
> - Reboot to BIOS.
> - Change from RAID (RST) to ACHI in the BIOS.
> - Reboot.
> - Windows enters safe mode correctly and setups the “new” hardware using the temporarily enabled drivers. New hardware connected sounds and all.
> - Then before restarting, revert the safeboot mode:
`bcdedit /deletevalue {current} safeboot`
> - To go back to normal boot.

## 3. Install wifi drivers

When you'll first boot on Ubuntu you won't have any default drivers for the wifi card. To get the below packages you can tether from your phone using bluetooth.

```
sudo apt update -y
sudo apt install linux-oem-20.04
```

I had first install `build-essential` but it shouldn't be necessary.

---

Alright folks. Hope it helps!
Three.js Help
Tags: javascript, webdev, 3d, threejs
Published: 2021-06-28 15:07:37

#Overview
I am currently looking at building on my current web development skills and doing the #100daysofcode challenge, focusing primarily on building a site using three.js or any other solutions that will help me achieve my end goal. 

A couple of examples for reference:
https://experiments.p5aholic.me/
https://kentatoshikura.com/
https://fanstudy.byspotify.com/

Basically, I want to get the ball rolling by looking into any three.js courses available that focus around creative websites. 

If you have any examples of courses, documentation or youtube series to follow that would be great! 

Thanks :)
NPM commands
Tags: node, npm
Published: 2021-06-28 15:04:31

Just some NPM commands I had to look up.

## What NPM packages are installed?

* List your global npm packages: `npm list -g`
  * dropping the `-g` flag will list packages in the current directory

## Removing NPM packages

* Remove a package: `npm r <name>`
  * aliases for r: remove, rm, un, unlink, uninstall ([see npm uninstall docs](https://docs.npmjs.com/cli/v7/commands/npm-uninstall))

* Remove extraneous packages and packages that are not listed on the parent package's dependencies list: `npm prune <name>` ([see npm prune docs](https://docs.npmjs.com/cli/prune))

* Uninstall all npm packages [(stack overflow)](https://stackoverflow.com/a/39920025/1769594): `rm -rf node_modules && npm cache clean && npm install`
Dll Repair
Published: 2021-06-28 14:56:43

<a href="https://dll.repair">Dll Repair</a> helps to promote the reuse of code, reduction of disk space, usage of dynamic memory, and modularization of code. A DLL represents a library which has a system and data to use by many programs simultaneously. Many companies offer services for different professional <a href="https://dll.repair">Dll Repair tool</a> to fix errors of DLL. The essential features of <a href="https://dll.repair">Dll Repair kit</a> are as follows.
Android Fast Networking with Kotlin Coroutines
Published: 2021-09-07 05:29:11

---
title: Android Fast Networking with Kotlin Coroutines
published: true
date: 2021-06-28 14:47:38 UTC
tags: 
canonical_url: 
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rptqa0b2h99fg6sp11lf.jpg)
Android Fast Networking is a great library for networking I am using since 2016, It has many features that are not available in similar networking libraries.

AFN provides direct support for RxJava but not for Coroutines, so we create by ourself

Adding AFN and Kotlin Coroutines to the project

```groovy
// GSON
implementation 'com.google.code.gson:gson:2.8.6'

// Android Fast Networking
implementation 'com.amitshekhar.android:android-networking:1.0.2'

// Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'

```

In this project, we are using the State Management approach class Resource

The resource is a wrapper class that contains status (Loading, Success, Error), message, Data

{% gist https://gist.github.com/yogeshpaliyal/1c44e55d3852cecdce0a1caf68eb77ce %}

Creating a BaseCaller, every API call will be going through this class, this is the class where the magic happens.

{% gist https://gist.github.com/yogeshpaliyal/9dd0839cb00349be1e1c88dee2a951cc %}

BaseApiModel is an API structure that is used for all APIs like, change as per requirements

```kotlin
{
  "status" : 200,
  "message" : "Api hit success",
  "data" : {
      "name" : "Yogesh Paliyal"
  }
}

```
Productivity with styled-components
Tags: css, javascript, react, beginners
Published: 2021-06-28 14:32:29

*two best practices to improve your project with this phenomenal library*

The **styled-components** is a library for styling your application through JavaScript and is mainly used in the styling of React and React Native projects.

When we think about styling something, we should also be thinking about how to organize these styles, and for those just starting out in the frontend development world, these two practices are fundamental to writing and maintaining good code:

### Create isolated styles

> Whenever possible, create isolated styles.

Through this practice we have access to your component styles faster and this generates more productivity and makes maintaining your styles much easier.

A widely used practice in the market is to create the styles file together with the main file (`index.js`) of your component / page.

Naming your file `styles.js` or `styled.js` is also good practice. These two names are used a lot.

As an example, this is the structure of the style files I used in a template for React, on my GitHub:

![files structure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4lt44meb4ywjrbpi6zd.png)

### Create semantic styles

Although styled-components is well known and adopted, it is common to see many grouping components that should have semantic scope being created as a simple `div`. It is extremely important that we do not forget to use tags correctly and consciously.

This is an example of how we create and export a styled component with styled-components:

```jsx
export const ExampleComponentContainer = styled.div``;
```

We can access all other tags as styled properties, like: `styled.header`, `styled.nav`, `styled.section`, `styled.article`, `styled.aside`, `styled.footer`,
among others.

---

You can access the template mentioned above by clicking here:

{% github diegosilvatech/boilerplate-cra-typescript no-readme %}

---

Comment there what you think of this file structure :)
Improving your resume title
Tags: resume, career, linkedin, beginners
Published: 2021-06-28 14:20:54

*which is correct? Front End, Front End or Frontend?*

Every time I need to fill out my position on any form, I am in doubt between Front End, Front-End or Frontend.

I've seen it all, including different approaches within the same ~~LinkedIn profile~~ resume.

But if there are several different ways of writing, what's the difference between them?

From this point on, I realize that there are two different answers: the one dealing with the etymology of these words and the one dealing with differences in practice, that is, the one that will help you the most to get a job.

And it's about the second option I want to deal with here.

As you may have already noticed, I chose to use the term `Front End` and it was for a very simple reason: it is the term searched on Google among the three options, in most countries, including **Brazil**.

![google trends results for frontend word](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysv2id2phum5b1rgpfdq.png)

I believe that using the correct most searched term is more likely to be found by a recruiter, as search engines rank the most searched terms better compared to the least searched terms.

If your goal is to be found by recruiters outside Brazil, it's worth checking [Google Trends](https://trends.google.com.br/trends/explore?geo=BR&q=front%20end,front-end,frontend) for the most searched term there.

---

And you, do you have any justification for not using it that way?

Comment there :)
Alterar o Método de Autenticação do Repositório Git Local
Tags: git, github, auth, ssh
Published: 2021-06-28 14:08:05

Depois de ter configurado sua conta no Github para utilizar autenticação via SSH, você agora quer alterar algum repositório já existente para esse método? 

Acesse a página do repositório que deseja fazer isso e clique em 'Code -> Clone' e selecione 'SSH':
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5pt6annntpfkq774egvn.png)

Agora copia esse endereço e troque no arquivo '.git/config', a url da propriedade 'remote "origin"', ou via comando:
```$ git remote set-url origin git@github.com:user/repo.git```

Agora basta executar um push para testar.