teleren/devto huggingface dataset:
S20:E3 — How to think like a CTO 🎙
Tags: discuss, podcast, career
Published: 2022-05-23 18:38:10

---
title: S20:E3 — How to think like a CTO 🎙
published: true
description: Listen to S20E3 of the CodeNewbie Podcast!
tags: discuss, podcast , career
series: CodeNewbie Podcast Season 20
cover_image: https://community.codenewbie.org/remoteimages/uploads/articles/xo14cqorfx5h2u8lcm5h.png
---

The latest CodeNewbie Podcast episode is live! **And it is a great one if want to expand the way you fundamentally think about software development.**

_Seriously_. 😅

The episode features [Joel Beasley](https://twitter.com/moderncto_io), author of [Modern CTO](https://moderncto.io/book/).

### Listen on Apple Podcasts:

{% embed https://podcasts.apple.com/us/podcast/s20-e3-how-to-think-like-a-cto-joel-beasley/id919219256?i=1000563256918 %}

### Listen on Spotify:

{% embed https://open.spotify.com/episode/0Zpb6CqQexGEV19KJ5JYM4?si=7jyeEAxcSHKAsD5cOMpRlQ %}

### [Or listen right here on DEV](https://dev.to/codenewbie/s20e3-how-to-think-like-a-cto-joel-beasley)

***

Make sure to subscribe to the CodeNewbie podcast if you have not yet!

**Happy coding!**
What I Learned This Week. Week 13.
Tags: datascience, sql, python, weeklyretro
Published: 2022-05-23 14:28:56

### Wednesday
Today was good. I know, we are starting at Wednesday again. I fell behind at the end of last week and I spent Monday and Tuesday catching up. And Instead of going ahead and blogging about Monday and Tuesday today, I decided to give myself a bit of a break. I have been very busy, I had an interview yesterday. Which after putting hours of research into the company, I had the door slammed in my face because I didn't quite have enough college credits to qualify. Which is understandable, but I would have preferred to know that I can't be considered before the interview process. I mean most companies would just auto-deny. I also have been going through Twitches pre training program, which has been frustrating at times (probability can be a pain without practice), but is still enjoyable. I am mostly excited to be able to take the assessment. I believe I will blow it out of the water and all I have to do is write a compelling 500 word essay on why I should have the opportunity. 

### Thursday
Today went wonderfully. I spent most of my time going through Twitches pre training program. I skimmed through the machine learning portion, as that is what I have been working on for a year and a half. I took some time going through the SQL portion, making sure that I understood every concept by skipping through to the quizzes. I didn't get all the way through it but plan on continuing my work tomorrow. I am hoping to get it done and be able to take the assessment tomorrow. I had a meeting with my career coach again as per usual on Thursday. She is very optimistic about my current opportunities which helps me and boosts my ego. I also have a meeting with my friend from Harvard tonight, and last time it ended up going over an hour past what was expected, so I know it will be another great conversation tonight. 

### Friday
Today went pretty good. The conversation with my friend went wonderfully last night. We ended up talking for 3 hours about so many things. From which machine learning model to use to the sustainability of Tokyo. I again spent most of my time going through the training program. I ended up spending a lot of time with the rest of the SQL portion because there were new concepts and I wanted to make sure I understood everything. As I said yesterday I was hoping to take the assessment today, but after spending so long learning new concepts my brain was a little fried. I decided to put off the assessment for tomorrow to be at my best. 

This week went well, but was very busy. I had continued to keep up with my weekly tasks and threw my assessments on top of it. But I got it all done, I finished up on Saturday and handed in the assessment with plenty of time to spare. Now is the waiting game, I know to stay consistent and continue to learn every day. As always I hope you enjoyed following along with my week. Although it was a bit shorter, I feel as if I was more honest with myself through it.
8 Fun APIs For Your Next Project [ PART-II ]
Tags: javascript, webdev, productivity
Published: 2022-05-23 18:17:02

## Introduction

Hello Developers👋
I'm back with another article and also by the way this is the second article in this " APIs" Series so don't forget to check out the first one as well.In this article I'm about to present to you 8 Fun APIs. Without any further ado let's begin with it :) 
___
###1)[Fun Translations](https://funtranslations.com/api/)
Translate English into languages such as Minion, Yoda and many more! 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qighsazpzyn3d0zy0r1x.jpeg)
###2)[Poke API](https://pokeapi.co/)
Are you a fan of Pokemon? Well then this API would help you to get info on your favorite pokemons. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z52vfcbkcz54ckp7mtv3.jpeg)
###3)[MARVEL Comics API](https://developer.marvel.com/)
Get access to data of 1000s of Marvel comics'. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7jfzb7sab5w88ml0i6bd.jpeg)
###4)[BoredAPI](https://www.boredapi.com/)
Are you bored? No need to be. Just send an API call and it would give you a random task to do :D

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oa7h7c1ctblt6d7pc5w1.jpeg)
###5)Agify
Just make an API call with a name as parameter and it would guess your age, just for fun. 
Use this link with your name to get the response
https://api.agify.io/?name=YOUR_NAME
###6)[Geeky Jokes](https://github.com/sameerkumar18/geek-joke-api)
This API lets you fetch a random geeky/programming jokes. 
###7)[YouTube API](https://developers.google.com/youtube/v3)
This API allows you to do various things with YT videos such as embed them and get their details etc. 

![site image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/po6cgmnui0g736dw821o.jpg)
###8)[DEV API](https://developers.forem.com/api)
This is yet another extremely helpful API which you can use to embed your blogs in your website/portfolio and even publish articles. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lrajsoymgddm8vmy1yjx.jpg)
___

## Conclusion
So I've presented you a list with 8 Fun APIs that you may use in your next Project. If you found this article helpful, you can react to it and also follow me so that you get notified when I publish my next article. 
Thank you(˵ ͡° ͜ʖ ͡°˵)
Is learning font-end a prerequisite for a blockchain developer
Tags: javascript, blockchain, road, webdev
Published: 2022-05-23 18:15:14

I have a Computer engineering degree and currently studying Masters in Computer Science. I have 2 month of experience in back end web development (Laravel). I have build different projects using Java C++ Flutter, but - I now its weird - I still don't know JavaScript.
Recently, I decided to start my road as a **blockchain developer** (Ethereum) do I have to stop and learn react or vue or what ??
I built my first NPM package - it's a cache ⭐
Tags: showdev, javascript, typescript, npm
Published: 2022-05-23 18:09:53

---
title: I built my first NPM package - it's a cache ⭐
published: true
description: Zero-dependency, lightweight caching module for Node.js and the browser - built with Typescript
tags: showdev, javascript, typescript, npm
cover_image: https://i.kym-cdn.com/entries/icons/mobile/000/028/021/work.jpg
---

> Note: Please don't use this module for productive projects just yet

With that out of the way:

The idea to this module came to me when developing my solution for the AppWrite hackathon. I had to handle a lot of refresh-calls just to keep my local and remote state in sync. So I placed the question:

> Can I securely keep my local app state in sync with a remote server without executing quite a lot of GET - requests?

Which loosely translates to the project order:

> Build a cache that's able to keep several of its items in sync if necessary AND stays out the way of your HTTP client

Here it is: 

{% embed https://github.com/tq-bit/qache %}

To elaborate a bit further:

- You create an in-memory cache for each API / DB resource
- If there are related entries (= Array items) in the cache, Qache will try and update them by an identifier property

As a small extra, Qache comes with a built-in validator + type checking: 

- You can enable `validation` for a cache instance and pass a Typescript generic to the class constructor
- Each cache is assigned a `schema` the first time an entry is added OR when the instance is created
- When a new entry is added to the cache, it's validated against this schema
- If validation fails, the entry will not be added

The validation approach is not very sophisticated (yet). In the coming weeks, I'll spend some time to research and implement a more efficient algorithm.

Surely, it's not a module that world's been waiting for, but I've learned quite a lot along the way: 

- You can increment your project's version with `npm version patch|minor|major`
- Configuring linting and testing in the beginning of a module project goes a long way
- Implementing caching isn't as hard as it seemed at first (or I did something terribly wrong here)

I'd be happy if the one or another person found this module useful. I also appreciate suggestions, feedback and ideas on how I can make Qache better :-) Check out the repos or give the module a shot. I'll add further descriptions in the upcoming days.
Access your localhost dev server from Internet
Tags: webdev, frontend, react, angular
Published: 2022-05-23 18:08:27

---
title: Access your localhost dev server from Internet
published: true
description:  How to access your localhost from the Internet
tags: webdev , frontend, react, angular 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2cfkhg0jm614l4ty96s.png
---

While working at home on your development machine, you've put in many hours developing the new web application. Your implementation should be tested on a variety of mobile and tablet devices to make sure it's working as it should. You don't have the time to host everything on a public server just so your client may have a look at least until you are ready for production.

Most web developers are likely to have encountered this scenario at some point. This is an all-too-common occurrence and you undoubtedly hoped there was a simpler and faster method to move stuff to a public-facing server during those occasions when you had to stay up all night hosting your still in-development web app.
 
Rejoice, you weary web devs! There's a new and better way to do things! You may access your localhost from the Internet using a wide variety of apps and services, making this procedure a lot less cumbersome. The following are the ones I'll be discussing in this short article:

- Ngrok
- Localtunnel
- Telbit
- Localhost.run
- Cloudflare tunnel

These services are called **tunnels** which come in handy to establish a secure but temporary connection between your localhost and the Internet. 

There are also a number of paid options, like pagekite, Forward and Burrow.io.

For detailed instructions, you can read [Expose localhost dev server to the Internet](https://www.techiediaries.com/public-localhost/)
React Hooks - useState()
Published: 2022-05-23 18:01:25


`const [state, setState] = useState(initialState);`

Devuelve un valor con estado y una función para actualizarlo.

Durante la representación inicial, el estado devuelto (state) es el mismo que el valor pasado como primer argumento (initialState).

La función setState se utiliza para actualizar el estado. Acepta un nuevo valor de estado y pone en cola una nueva representación del componente.

`setState(newState);`
What is DAST, and Why Should Developers Use It?
Tags: security, programming, opensource, api
Published: 2022-05-23 17:57:12

DAST stands for Dynamic Application Security Testing. DAST is the process of testing web, mobile, and API applications to find vulnerabilities/security bugs through simulated attacks.

DAST is the process of live testing an application either using an automated scanner or manual penetration testing practices.

Most developers haven't heard about DAST scanners because they are primarily used by appsec and penetration testers.

What kind of vulnerabilities does DAST find?
Most automated scanners would find critical vulnerabilities like SQL Injections, NoSQL Injections, XSS, etc. 
The hard-to-find vulnerabilities like logic bugs, authentication, and authorization flaws are usually done by ethical hackers, penetration testers, and AppSec engineers. The preferred approach is to write automated test cases that can be executed as part of CI/CD.

Should developers care about DAST? 
Yes, they should, since having any of the above critical vulnerabilities can lead to data breaches and punitive damages. Additionally, most DAST scanners can now be easily integrated into CI/CD pipelines, fully automated. 

Pros of DAST
Tech Stack Independent: Independent of the application stack. It tests the application as a whole. All your source code and libraries at runtime are tested for vulnerabilities.
It does not require access to the source code.
Low false positives: According to OWASP's benchmark project, DAST solutions produce fewer false positives than other testing approaches.
Identifies configuration issues: DAST excels at finding security vulnerabilities that occur only when the application is operational. In addition, DAST attacks an application from the outside in, placing it in the perfect position to find configuration mistakes missed by other AST tools.
Logic vulnerabilities: These flaws are hard to detect early in development. These issues are caused by security configurations, data, and other things, making them hard to detect in non-production environments. Most bug bounty programs pay for these kinds of flaws instead for traditional and low-hanging issues. Detecting these flaws requires you to write test cases and execute them continuously in dev/production.

Cons of DAST
Does not find the exact location of a vulnerability in the code
Tests can be time-consuming.


Here are a few free DAST solutions you can run safely against your live applications:

EthicalCheck:
Free & Automated DAST for APIs.
https://apisec-inc.github.io/pentest/

Burp Suite
Write your tests
https://portswigger.net/burp/communitydownload
React Hooks
Published: 2022-05-23 17:48:22

Los Hooks son una nueva incorporación desde React 16.8. permiten usar el estado y otras características de React sin escribir una clase.

**Hooks Basicos**

- useState
- useEffect
- useContext

**Additional Hooks**

- useReducer
- useCallback
- useMemo
- useRef
- useImperativeHandle
- useLayoutEffect
- useDebugValue
- useDeferredValue
- useTransition
- useId

**Ganchos de biblioteca**

- useSyncExternalStore
- useInsertionEffect
React Componentes
Published: 2022-05-23 17:45:08

En **React **un componente es un elemento que acepta parámetros llamados propiedades (props) y retorna una jerarquía de vistas que describen lo que debería aparecer en la pantalla.

Utilizamos dichos componentes para indicarle a React que es lo que deseamos ver en pantalla y que si nuestros datos cambian solo actualice el componente correspondiente.

**Tipos de Componentes**:

-**Funcionales **: Son algunos de los componentes más comunes que aparecerán al trabajar con React son simplemente funciones de JavaScript:

-**De Clase**: React utiliza esta sintaxis para crear un componente con estado y ciclo de vida. El estado se usa comúnmente para cambiar el comportamiento de nuestro componente o sus hijos.


**Diferencias:**

Los dos aceptan props como argumentos y hacen return de un componente. Sin embargo el código del componente de clase es más extenso.

Al utilizar componentes funcionales el codigo sera mas legible y mas mantenible.
Tech Talk: 'Unit Test the Docs: Why You Should Test Your Code Examples' (Write the Docs 2022)
Tags: writing
Published: 2022-05-23 17:41:32

✨ **What is this post about**: As a part of my professional growth, I make time to watch conference talks on Ruby, Rails, JS, React, tech writing, and tech trivia. Previously, I'd just watch them but now I will take and publish notes for future reference.

✨ **Talk:** 'Unit Test the Docs: Why You Should Test Your Code Examples' by [Ben Perlmutter](https://twitter.com/ben_perlmutter) 

✨ **One-paragraph summary**: What’s the fastest way to make developers complain about your docs? Give them code examples that don’t work. As technical writers, we face the constant challenge of keeping code examples accurate and up-to-date. Just as software developers write unit tests to validate that their code remains functional, technical writers can create code examples within unit tests to validate that their documentation is correct.

✨ **Impression**: I never thought about writing unit tests for my code examples or including the unit testing into CI/CD pipeline. By the way, StackBlitz has a wonderful [SDK for hosting our code examples on GitHub](developer.stackblitz.com/docs/guide/open-from-github/), which helps with keeping examples up-to-date.

---

## Notes

- **Unit tests**
  - bits of code that run other code to validate that your code is working as expected
  - any non-trivial software project would have unit tests
  - they are repeatable
- **Code Examples**
  - bits of code that live in the docs
  - they are often copy-pastable from the docs to code so they have to be clear and reliable
  - often stylized with syntax highlighting so they can stand out and resemble how they'd look in the dev's environment
- When documenting code examples it's difficult to keep the code in sync with the source code
- **Why unit tests in code examples**
  - code is actually used by a dev
  - validates that it works so devs can work with the examples
  - can be a part of the CI/CD pipeline
  - validates that code example works
  - ensures that the code is understood by the documentarian
- **When to test code examples**
  - SDKs, middleware
  - tutorials
  - 3rd party services integrations (ensuring that nothing changed and your code still works)
  - complex examples
- **Why not manually**
  - time consuming
  - difficult to maintain single source of truth if the same code is used in a few places
  - formatic gets weird
  - no programmatic modifications
- **Possible tool**
  - BLuehawk - CLI-based tool to extract code examples from source files
- **Transclusion**
  - including contents of one doc inside of another
  - like imports or partials
- **Workflow with Bluehawk**
  - write code example in unit test and make test pass
  - annotate + extract the code with Bluehawk
  - transclude the code example in the docs
  - pros/cons:
    - pro: unit tested code
    - pro: better record of where code examples are
    - pro: single source of truth
    - pro: more repeatable
    - con: could be more automated
    - con: rerunning the CLI operations (tiresome)
    - con: working with version control
Create greetings after the launch Linux Terminal
Tags: bash, linux, beginners
Published: 2022-05-23 17:40:09

Hey! Today I will tell you how to create greetings after the launch Linux Terminal.

------

First, create **folder**

```bash
mkdir welcome-script
cd welcome-script/
```

After this, you need to create **.sh** file

```bash
touch welcome.sh
```
------
You need to open welcome.sh file via Vim

```bash
sudo vim ./welcome.sh
```
------
## Basic commands

**echo** - command that output text, etc.

**Variable (programming)** - named

**Commands in a variable** - output anything, function

**sleep** - time to finish something after the time

**u** - variable for Linux function(like Username, OS version, etc)

**$** - for output Linux command. Example: os=$(whoami) (variable=function for command(command)

------

Code

```bash
#!/bin/bash

name="Name"

u="$USER"

echo " "
echo " "
echo "░█░█░█░█▀▀▀░█░░░░█▀▀▀░█▀▀█░█▀█▀█░█▀▀▀░"
echo "░█░█░█░█▀▀▀░█░░░░█░░░░█░░█░█░█░█░█▀▀▀░"
echo "░▀▀▀▀▀░▀▀▀▀░▀▀▀▀░▀▀▀▀░▀▀▀▀░▀░▀░▀░▀▀▀▀░"
sleep 1

echo " "
now=$(date)
echo "Current time: $now"

echo " "
echo "Hello $USER!"
sleep 1

echo " "
os=$(uname -r)
echo "Your OS is $os"
echo " "
sleep 1

setup=$(neofetch)
echo "Your PC stats: $setup"
echo " "
sleep 1
```

------

# Edit **.bashrc**

Open your **file manager** and paste this command

![BashRC](https://i.imgur.com/Cs5G2C8.png)

```bash
/home/YOURUSER/.bashrc/
```

And now you need to paste command to **.bashrc**

![Paste](https://i.imgur.com/Ezpm1gC.png)

```bash
source /home/YOURUSER/welcome-script/welcome.sh
```

------

# Source code

You can easily download this script from my GitHub repository.

[Source code](https://github.com/naddurkostia/welcome-shell)
Linear, Random or Binary Search
Tags: python, programming, beginners, discuss
Published: 2022-05-23 17:32:15

For school, we had an assignment in Python where we had to use Linear, Random or Binary Search with a number game.

---
## Linear Search
Linear search is when each item in the list is examined one at a time from the beginning.
An example of linear search code is below:
```py
number = random.randint(1,100)
count = 0
for i in range(1,100):
  count = count + 1
  if i == number:
    print("The number was " + str(number))
    print("You got it in " + str(count) + " guesses!")
    break
```

---
## Random Search
Random search is where each item in the list is selected randomly and checked until the correct item is found.
An example of random search code is below:
```py
number = random.randint(1,100)
allnum = []
for i in range(1,100):
  allnum.append(i)
guess = random.choice(allnum)
allnum.remove(guess)
count = 1
while guess != number:
  count = count + 1
  guess = random.choice(allnum)
  allnum.remove(guess)
print("The number was " + str(number))
print("You got it in " + str(count) + " guesses!")
```

---
## Binary Search
Binary search is when you cut through the list by halving each time, until you find the number you are looking for.
```py
number = random.randint(1,100)
lowestnumber = 1
highestnumber = 100
guess = round((highestnumber + lowestnumber) / 2)
count = 1
while guess != number:
  if guess > number:
    if highestnumber > guess:
      highestnumber = guess
    print("The number is smaller than " + str(guess))
  if guess < number:
    if guess > lowestnumber:
      lowestnumber = guess
    print("The number is bigger than " + str(guess))
  guess = guess = round((highestnumber + lowestnumber) / 2)
  count = count + 1
print("The number was " + str(number))
print("You got it in " + str(count) + " guesses!")
```

---

Which searching do you think is the most efficient?
¿ Que es React ?
Published: 2022-05-23 17:30:59

React es una librería de JavaScript utilizada para crear interfaces de usuario. Es mantenida por Facebook y una comunidad de desarrolladores individuales, React se puede utilizar como base en el desarrollo de aplicaciones móviles o las famosas "single page applications (SPA)"

Principales atractivos de React:

-Es una librería rápida de implementar.

-Su arquitectura esta basada en componentes, lo cual permite reutilizar codigo.

-Su escalabilidad, desde una landing page a una aplicación robusta puede generarse con React.