teleren/devto huggingface dataset:
Top Featured CodeNewbie Posts (8/4/23)
Tags: codenewbie, beginners
Published: 2023-08-04 20:56:29

---
title: Top Featured CodeNewbie Posts (8/4/23)
published: true
description: A round up of the most-read and most-loved contributions from the CodeNewbie community this past week
series: TopCN
tags: codenewbie, beginners,
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzyga2chi0ucp09mzj9j.jpg
---
_Each week, we'll round up the CodeNewbie tag's top posts based on traffic, engagement, and a hint of editorial curation. Hope you enjoy!_ 

### Is Learning Web Development Directly with Frameworks a Mistake?

Picture a developer that can make sites using the latest frameworks, but can't put together some basic CSS to save their life. Is something wrong here? Let's explore the topic with @darkterminal. 

{% embed https://dev.to/character-driven-code/is-learning-web-development-directly-with-frameworks-a-mistake-a3f %}
 

### A Guide to Googling: Getting What You Need, Faster

Googling (and web searching in general) is an invaluable skill that always comes in handy regardless of your place in life. Pick up some new techniques here with @allenthomas.

{% embed https://dev.to/allenthomas/a-guide-to-googling-getting-what-you-need-faster-4i9a %}


### Networking 101 : From Novice to Knowledgeable

Computer networking, not to be confused with professional networking, is all about connecting devices, like computers, phones, and tablets, so they can share data, files, and even printers. Learn more about it with @ainasanghi!

{% embed https://dev.to/ainasanghi/networking-101-from-novice-to-knowledgeable-1h16 %}


### Mastering the Art of Delegation

As we grow and advance in our careers we usually find ourselves spending less time writing code and more time orchestrating the work of others. @inovak will help you with the transition with these delegation tips!

{% embed https://dev.to/inovak/mastering-the-art-of-delegation-l22 %}


### Fly.io: Just 2 commands and the app is live.

@w3ndo shares a glowing endorsement of Fly.io, so try this option if you're looking to boot up your Rails app quick!

{% embed https://dev.to/w3ndo/just-2-commands-and-the-app-is-live-flyio-is-amazing-1cae %}

_That's it for our top CodeNewbie posts for this week! Follow the [CodeNewbie Team on DEV](https://dev.to/codenewbieteam) for more content and discussions... and be sure to keep an eye on this series in the future - you just might be in it!_
Sinatra: Rock, Paper, Scissors
Published: 2023-08-04 20:54:23

I made a dynamic website that allows the user to play Rock, Paper, Scissors. 

The most satisfying part of this project was having a single `we_play.erb` that handles the html for Rock, Paper, or Scissors using the DRY principle (don't repeat yourself). 

Use on every project:

`sinatra-contrib gem` automatically reloading code changes without having to restart the web server

`better_errors gem` more friendly error pages
Create a /views folder to store our ERB templates

`/views/layout.erb` file with standard HTML boilerplate 


Configuration for this project:

`bin/` folder scripts:
`bin/dev` starts up our web server
`bin/setup` will bundle install and perform other initial setup work

`spec/` folder includes automated tests
`rake grade` command is included to run the automated tests
Hi 👋My name is Marat
Published: 2023-08-04 20:31:16

I am Fullstack developer.

🖥️ See my portfolio at Portfolio
🧠 Currently learning JavaScript, React.js, Node.js
🤝 I'm open to collaborating on interesting projects as a developer ☛ voredev
✉️ You can contact me at voredev@gmail.com


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu660beiydxt0c7aakwv.png)
Editing a message of a pushed commit
Tags: git, github, beginners
Published: 2023-08-04 20:27:33

This is a quick post for those situations where you just pushed a commit to your branch and then realized the commit message is not clear, or there's some misspelling. Whatever is the reason you want to edit it, here are two quick steps.

Make sure you're in the intended branch and first run:

`git commit --amend -m "Your new commit message"`

Then run:

`git push --force`

**Done.**

If you run `git log` you'll be able to check your updated commit message.

> **Don’t amend public commits**
"Amended commits are actually entirely new commits and the previous commit will no longer be on your current branch. This has the same consequences as resetting a public snapshot. Avoid amending a commit that **other developers** have based their work on. This is a confusing situation for developers to be in and it’s complicated to recover from."
(_Atlassian's tutorial_)

## See more

Read the [GitHub docs](https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message) for more information or [this tutorial from Atlassian](https://www.atlassian.com/git/tutorials/rewriting-history).
The Power of Linux
Tags: beginners, aws, github, linux
Published: 2023-08-04 20:22:00

Introduction:
In a digital age where operating systems dominate the technology landscape, Linux stands out as a powerful and versatile choice. Offering an open-source approach, Linux has gained a massive following among developers, businesses, and tech enthusiasts. This article will delve into the world of Linux, highlighting its features, benefits, and the reasons why it has become a go-to platform for a wide range of users.

1. An Open-Source Powerhouse:
Linux is an open-source operating system, which means it is built collaboratively by developers worldwide. This unique approach fosters innovation and allows for customization, making Linux extremely flexible. The open-source nature of Linux encourages contributions from a diverse community, resulting in robust updates, bug fixes, and security enhancements.

2. Vast Variety of Distributions:
Linux comes in various distributions or "distros," each with its own unique flavors and functionalities. Popular distros include Ubuntu, Fedora, Debian, and CentOS, among others. These distributions cater to different needs, whether it be desktop usage, server management, data analysis, or multimedia production. Linux empowers users to choose the distro that aligns with their requirements, unlocking a world of possibilities.

3 Command-Line Superiority:
Linux's command-line interface (CLI) is renowned for its power and flexibility. While graphical user interfaces (GUIs) offer convenience, the CLI provides advanced users with a direct and efficient approach to system management and troubleshooting. With a wealth of command-line tools and shortcuts, Linux empowers users to unleash their creativity, automate tasks, and streamline productivity.

4. Cost-Effective Solution:
One of the most compelling aspects of Linux is its cost-effectiveness. Being open-source, Linux is free to use, allowing businesses, educational institutions, and individuals to save on licensing fees. Furthermore, Linux's compatibility with older hardware helps extend the lifespan of aging systems, reducing the need for costly upgrades. These factors make Linux an attractive option for organizations looking to maximize their budget without compromising on performance.

Conclusion:
Linux has grown from a niche operating system to a powerful global platform, conquering a significant portion of the technology landscape. With its open-source nature, stability, security, vast variety of distributions, command-line superiority, developer-friendly environment, and cost-effectiveness, Linux offers a compelling alternative to commercial operating systems. As technology continues to evolve rapidly, embracing Linux can unlock unparalleled possibilities and empower individuals and organizations to reach new heights in innovation and productivity. Whether you are a developer, a business owner, or an enthusiast.
Fix menu.toolbox.mod button in mcpe texture pack
Tags: minecraft, mcpe, bedrock
Published: 2023-08-04 20:04:14

I was creating a pack and then this happened...
![;-;](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7s97eepyaly4m9agxvoq.png)
This doesnt do anything when clicked, only the pop sound.
Im new to minecraft pack making and im desesperate to find how to fix it, or at least change the text. Thank you.
My Problem with Tech Twitter and the Rise of NPC Tweets (A Thread 🧵)
Tags: webdev, javascript, programming, beginners
Published: 2023-08-04 19:44:21

If you've been following tech twitter over the years you would be already familiar with tweets like this (A thread 🧵):



![A twitter thread](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szk6ymy8njb5109xpw4o.png)
![A twitter thread](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2a6chw6hfukxka5r2rg2.png)
![A twitter thread](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/krokpzebo342lx7abve3.png)
![A twitter thread](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yn7a4jup7z5z677lc7rj.png)
![A twitter thread](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/294p0jw1b31when6zwpq.png)

We can see a pattern here and a long time ago, I used to do the same thing on twitter for the same exact reason they do(for engagement purposes).

These resources are not something you cannot find on the internet, Anyone who knows how to google can find the same exact resources if they want to learn some new programming language or a framework. If you've been in this field for some time, you might be tired of hearing these same resources again and again.

The reason I hate these tweets is because it gives beginners the false idea that programming is something you can learn by digesting some resources you found online. And Trust me, these content creator themselves haven't tried half of the resources they have mentioned. They give such a false idea of all the tech you need to know and be on top of, they are constantly jumping to the latest thing talking about how it would change everything. Makes you feels so behind when you work a regular job with the same old out of date code. They live in fantasy projects not real world projects. No matter how much I block these "engagement bait tweets", the twitter algorithm pushes these into my feed again 😪.


The Truth is **Programming is hard and it will take time** and it's ok. I am not here to discourage you in any way. If you want to learn to code, the best thing you can do is, get off twitter and write some code. Don't let anyone else tell you otherwise.

## How to be a twitter NPC? (A Thread 🧵)

There is a pretty simple formula to grow your tech twitter account:

1 - Tweet at least 20 times a day (at least 10 of them should be threads 🧵🧵🧵🧵)
2 - Respond to other people's threads 🧵 with positivity and encouragement like this:

![thanking Bob for resources he found on Internet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vx9zob4gl0c6cgixyyp8.png)
3 - Most importantly, don't forget to create lists with resources for developers

So, in conclusion, this is what your feed should look like:


<a href="https://imgflip.com/i/7uxl0t"><img src="https://i.imgflip.com/7uxl0t.jpg" title="An average feed of a twittet NPC"/></a>

### If you've enjoyed this post, I got a thread for you in the comments!
Satınal.shop - Online Alışverişin Yeni Adresi
Tags: satinal, shop
Published: 2023-08-04 19:03:28

[Satın al](https://www.satinal.shop/) shop'ta Neler Var?

[Satınal.shop](https://www.satinal.shop/)'ta, elektronikten giyime, ev tekstilinden kozmetike kadar her türlü ürünü bulabilirsiniz. İşte Satınal.shop'ta bulabileceğiniz bazı ürünler:

Elektronik: Bilgisayar, laptop, tablet, akıllı telefon, televizyon, beyaz eşya, klima, elektrikli ev aletleri
Giyim: Kadın giyim, erkek giyim, çocuk giyim, ayakkabı, aksesuar
Ev tekstili: Yatak odası tekstili, banyo tekstili, mutfak tekstili, salon tekstili
Kozmetik: Makyaj, cilt bakım ürünleri, saç bakım ürünleri, parfüm
[Satın al](https://www.satinal.shop/) shop'ta Alışveriş Yapmak Nasıl?

Satınal.shop'ta alışveriş yapmak çok kolaydır. Siteye üye olduktan sonra, aradığınız ürünü arama kutusuna yazarak kolayca bulabilirsiniz. Ürün sayfasında, ürünün fiyatını, özelliklerini ve yorumlarını görebilirsiniz. Ürünü beğendiyseniz, sepete ekleyebilir ve ödeme yapabilirsiniz. Satınal.shop, kredi kartı, banka havalesi ve kapıda ödeme gibi farklı ödeme seçenekleri sunuyor.

Satınal.shop'ta Kargo Ücreti Ne Kadar?

Satınal.shop, Türkiye'nin her yerine ücretsiz kargo imkanı sunuyor. Siparişiniz, siparişinizi verdikten sonra en geç 2 iş günü içinde adresinize teslim edilir.

Satınal.shop Güvenilir Mi?

Satınal.shop, Türkiye'nin en güvenilir online alışveriş sitelerinden biridir. Site, SSL sertifikası ile korunmaktadır ve tüm ödemeler 3D Secure ile yapılmaktadır. Satınal.shop, müşteri memnuniyeti odaklı bir anlayışla hizmet vermektedir ve tüm müşterilerine 14 gün iade garantisi sunmaktadır.

Satınal.shop'ta Alışveriş Yapmak İçin Hemen Ziyaret Edin!
🤖🧠 Unraveling the Intricacies of Sarcasm in AI: A Thought-provoking Reflection 🧠🤖
Tags: ai, competition, writing
Published: 2023-08-04 19:00:04

Thrilled to share an insightful article penned by Manish Sharma for Gadfly.AI's "Future of AI" writing contest! 🚀📝

In a world buzzing with AI marvels, Manish delves into a fascinating yet puzzling aspect of artificial intelligence - its ability (or lack thereof) to comprehend human emotions, particularly the enigmatic realm of sarcasm. 🤯

The article paints a vivid picture of a futuristic scenario where an advanced AI, dubbed iMom, unwittingly transforms a sarcastic remark into a perilous instruction. This tale underscores the complexity of human interactions and emotions that machines grapple to fathom. Sarcasm, a uniquely human form of expression, intricately woven with tone, body language, and facial cues, poses a daunting challenge for AI's current capabilities.

While strides have been made in identifying text-based sarcasm, thanks to visionaries like Ivan Garibay and Ramya Akula and their DARPA-funded program, the broader context of sarcasm remains elusive. Even the Sentiment Analysis tool, endorsed by none other than Will Smith, falls short in recognizing sarcasm as an emotion, shedding light on the intricacies of human expression that AI strives to capture.

Manish astutely reminds us that emotions, including sarcasm, are an intricate language that resonates with the beating heart of humanity. As AI evolves, we must tread carefully, acknowledging its strengths while embracing the undeniable truth that true understanding of human emotions transcends algorithms. 💬❤️

Kudos to Manish Sharma for this thought-provoking piece that navigates the uncharted waters of AI and emotions! 🌟 Let's continue to explore the uncharted territories of AI's potential and limitations. 🚀

#AI #FutureOfAI #Emotions #Sarcasm #HumanInteraction #GadflyAI #ContestEntry

[Article](https://hackernoon.com/ai-vs-sarcasm-will-it-ever-understand) 
[Gadfly.AI's "Future of AI" Contest](https://hackernoon.com/the-future-of-ai-writing-contest-by-gadfly-ai)
Best VS Code extensions to use in 2023
Published: 2023-08-04 18:43:40

Prettier
The Prettier extension is a formatter that helps to keep code style consistent. You can configure your settings however you need and save with shortcuts. Prettier is one of the most popular code formatters out there, with over 38.5k stars on GitHub.

Prettier will automatically fix formatting issues in your code, like fixing the mix of single and double-quotes or an irregular use of semicolons.

Live Server

This is the favorite VSCode extension of many software developers. Live Server launches a local development server with a live reload feature both for static and dynamic pages.

Every time you save your code, you'll instantly see the changes reflected in the browser. You'll be much faster at spotting errors and it's much easier to do some quick experiments with your code.

GitLens

GitLens supercharges the Git capabilities of Visual Studio Code. This is a powerful extension that allows you to see who, why, and how lines of code have changed over time (among lots of other features).

GitLens is a highly customizable extension. If you don’t like a particular setting, you can easily turn it off in settings.
how to fix cryptographed ubuntu gdm3
Tags: ubuntu, bash, fix, luks
Published: 2023-08-04 18:39:40

```
# tentou montar normalmente e não conseguiu por que era crytografado
     sudo mount /dev/sda1 sda1 -o uid=1000,gid=1000
     sudo umount sda1

# instalou o cryptsetup
   1  sudo apt-get install cryptsetup 
   
# encontrar sua partição crytografada
   2  blkid | grep "crypto_LUKS"

# abrir partição cryptografada, vai pedir senha
   3  sudo cryptsetup luksOpen /dev/nvme0n1p3 mypartition


# descobrir o nome da partição vg
   4  sudo vgscan 
   5  sudo lvdisplay 

# montar partição vg
   6  sudo mount /dev/vgubuntu/root sda1


# processo de chroot
   7  sudo mount --bind /proc/ /mnt/sda1/proc/
   8  sudo mount --bind /dev/ /mnt/sda1/dev/
   9  sudo mount --bind /sys/ /mnt/sda1/sys/
  10  sudo mount --bind /dev/pts/ /mnt/sda1/dev/pts
  11  sudo cp -L /etc/resolv.conf /mnt/sda1/etc/resolv.conf 
  12  sudo chroot /mnt/sda1 /bin/bash

# agora dentro da máquina, reinstalar o gdm
  13  sudo apt-get reinstall gdm3

# volte pra a máquina do pendrive
  14  exit

# desfaça as montagens e feche o hd novamente com a crpytografia
  15  sudo umount /mnt/sda1/proc 
  16  sudo umount /mnt/sda1/sys
  18  sudo umount /mnt/sda1/dev/pts 
  19  sudo umount /mnt/sda1/dev

# listar as partições vg
  20  sudo dmsetup info -C

# mudar para a vgroot do pendrive
  21  sudo vgchange -a n vgubuntu

# fechar partição novamente
  22  sudo cryptsetup close mypartition

# reiniciar e ser feliz
```
How do I encode and decode a string with base64 in Angular using typescript?
Tags: angular, typescript
Published: 2023-08-30 18:52:40

---
title: How do I encode and decode a string with base64 in Angular using typescript?
published: true
date: 2023-08-04 18:30:00 UTC
tags: Angular,Typescript
canonical_url: http://www.codetolive.in//angular/typescript/How-to-encode-and-decode-base64-in-angular-and-typescript/
---

You can encode the string to ASCII and decode it back to the string in Angular using Typescript. Let’s find out how to perform the encoding and decoding of the base64 string.

**_What is btoa? And stand for?_**

btoa() method: Binary to ASCII

This method creates a base64 encoded ASCII string from a binary string.

**_What is atob? And stand for?_**

atob() method: ASCII to Binary

This mehod decodes a string encoded using base64.

**_How to use btoa and atob in Angular using Typescript?_**

**_Example:_**

```
1. Use the btoa() method to encode the string where you want the encoding.
    var encodedString = btoa("Hello")
    It returns the encoded data and stores it in the encodedString variable.

2. Use the atob() method to decode the encoded string. 
    var decodedString = btoa(encodedString)
    It decodes the base64 encoded string and stores in the decodedString variable.

```
Firebase in vue
Published: 2023-08-04 18:25:54

src/firebase/init.js

```
import { initializeApp } from 'firebase/app';
import { getFirestore, collection } from 'firebase/firestore'
import { getAuth } from 'firebase/auth'


// Your web app's Firebase configuration
const firebaseConfig = {
  apiKey:
  authDomain: 
  databaseURL: 
  projectId:
  storageBucket: 
  messagingSenderId:
  appId: 
  measurementId: 
};



const firebase = initializeApp(firebaseConfig);


//const db = getFirestore()
//export default db
export const db = getFirestore()

// generate & export auth object
export const auth = getAuth()




```


And now you can use it in components:

App.vue

```
	import { auth, db } from './firebase/init.js'



```
Unleashing the Power of Data Science on Android: No Laptop Needed!
Tags: datascience, dataanalysis, android, techrevolution
Published: 2023-08-04 17:51:38

🌟 **No laptop? No problem!** 🚫💻

Get ready for an exciting journey into the world of data science and data analysis with just your Android device. Whether you're a beginner or an experienced pro, my upcoming posts will introduce you to incredible Android apps that empower you in Python coding, visualization, analysis, SQL databases, and Excel.

Unlock the potential of data analysis right at your fingertips! As an aspiring data analyst, I've used these tools to uncover valuable insights, and now I'm thrilled to share my knowledge with you.

Stay tuned! My blog posts will drop on Wednesdays and Sundays at 12 pm. Follow me on LinkedIn, Medium, and Dev.to so you don't miss any updates. Let's embark on this data revolution together!
Mastering TypeScript: Using the Pick Utility Type
Tags: typescript, javascript, coding, programming
Published: 2023-08-04 17:42:44

---

title: "Mastering TypeScript: Using the Pick Utility Type"
published: true
description: "Learn how to leverage TypeScript's Pick utility type to selectively use properties from an object."
tags: TypeScript, JavaScript, Coding, Programming

---



## Table of Contents
1. [Introduction](#introduction)
2. [Understanding the Problem](#problem)
3. [Solution: The Pick Utility](#solution)
4. [How to Use the Pick Utility](#usage)
5. [Conclusion](#conclusion)

<a id="introduction"></a>
## Introduction

TypeScript is a superset of JavaScript, adding static typing and class-based object orientation. This enhances safety and productivity, especially for large-scale development projects. In this article, we will be exploring the `Pick` utility type, a powerful part of TypeScript's robust type system.

<a id="problem"></a>
## Understanding the Problem

When working with objects in TypeScript, there might be cases where you only want to use specific properties that an object holds. For instance, consider the following type:

```typescript
export type SomeType = {
    propA: string;
    propB: number;
    propC: () => void;
};
```

If we want to use just the `propC` property in a function, how do we go about it?

<a id="solution"></a>
## Solution: The Pick Utility

TypeScript provides a utility type known as `Pick`. This utility is used to extract certain properties from an existing type. Let's see how to use it.

<a id="usage"></a>
## How to Use the Pick Utility

First, we import `SomeType`.

```typescript
import { SomeType } from "./path_to_file";
```
This statement imports `SomeType` into our current script. Replace `"./path_to_file"` with the path where `SomeType` is defined.

Next, we use `Pick` to use `propC` as part of `SomeType`.

```typescript
function usePropC(props: Pick<SomeType, 'propC'>) {
  // Now we can use 'propC'.
  // For instance:
  props.propC();
}
```
Here, we're using the `Pick` utility type to selectively extract specific properties from an existing type. In this case, we're extracting the `propC` property from `SomeType`.

<a id="conclusion"></a>
## Conclusion

As demonstrated, the `Pick` utility in TypeScript is extremely useful when you need to selectively use properties from an existing type. It allows you to maintain type safety while using just the parts you need.

TypeScript, with its powerful and flexible type system, is capable of maintaining high productivity and safety even in large-scale projects. The `Pick` utility is just one example. Make sure to make the most out of it!