teleren/devto huggingface dataset:
Alex Buaiscia - From Humanistic Studies, Journalism, and Desktop Support to a Fullstack Developer
Tags: podcast, developerstories
Published: 2023-04-05 18:34:00

---
title: Alex Buaiscia - From Humanistic Studies, Journalism, and Desktop Support to a Fullstack Developer
published: true
description: In this episode of the Mycelium Network podcast, Schalk Neethling interviews Alex Buaiscia, a full-stack developer at Moravio.
tags: podcast, developerstories
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6r86prrxwfqkk75iwupv.jpg
published_at: 2023-04-05 18:34 +0000
---

In this episode of the Mycelium Network podcast, Schalk Neethling interviews Alex Buaiscia, a full-stack developer at Moravio. Alex talks about his journey from humanistic studies and journalism to desktop support and becoming a full-stack developer. Alex emphasizes the importance of persistence, getting feedback after an interview, and soft skills for career growth. He also discusses his approach to writing tests using React testing library, the importance of project planning, and the significance of work-life balance and taking time to be still.

Alex also shares his experience dealing with the mental health impact of shift work and how he found opportunity through sharing his work in the open. Finally, Alex offers advice for early-stage developers and shares what he learned about meditation and dealing with challenges.

Listen using your [podcatcher of choice](https://pod.link/1639357086/episode/1f80a8a1a2a0a882233bb7b129870625).
.NET Monthly Roundup - March 2023 - .NET 8 Preview 2, EF Core goodies, and more!
Tags: dotnet, azure, efcore, blazor
Published: 2023-04-05 18:24:13

{% embed https://www.youtube.com/watch?v=JVNTxMGINsI %}

Welcome to our March .NET Monthly Roundup with Jon Galloway! In just 3 minutes, Jon breaks down the latest news from the month of March 2023 that .NET developers need to know.

### Top links
📚[All the links](http://aka.ms/dnmr-2303)

### 🔥.NET 8 Preview 2
➡️[Announcing .NET 8 Preview 2 - .NET Blog](https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-2/)
➡️[ASP.NET Core updates in .NET 8 Preview 2 - .NET Blog](https://devblogs.microsoft.com/dotnet/asp-net-core-updates-in-dotnet-8-preview-2/)
➡️[EF Core 8 Preview 2: Lite and familiar - .NET Blog](https://devblogs.microsoft.com/dotnet/announcing-ef8-preview-2/)
➡️[.NET Data Community Standup - Using hierarchical data in SQL Server and PostgreSQL with EF Core - YouTube](https://www.youtube.com/watch?v=pmnHGWYpCfg)

### 📰Other cool news
➡️[What's new for the WinForms Visual Basic Application Framework - .NET Blog](https://devblogs.microsoft.com/dotnet/update-to-winforms-vb-appframework/)
➡️[Generate images with AI using Stable Diffusion, C#, and ONNX Runtime - .NET Blog](https://devblogs.microsoft.com/dotnet/generate-ai-images-stable-diffusion-csharp-onnx-runtime/)
➡️[Introducing the Reliable Web App Pattern for .NET - .NET Blog](https://devblogs.microsoft.com/dotnet/introducing-the-reliable-web-app-pattern/)

### 📺Top videos
➡️[On .NET Live - Building a Game with .NET and Orleans - YouTube](https://www.youtube.com/watch?v=xDpQt1RNHvw)
➡️[.NET Data Community Standup - EF Core internals: IQueryable, LINQ and the EF Core query pipeline - YouTube](https://www.youtube.com/watch?v=1Ld3dtnTrMw)

### 🌐Community news
➡️[Understanding the .NET ecosystem: The evolution of .NET into .NET 7](https://andrewlock.net/understanding-the-dotnet-ecosystem-the-evolution-of-dotnet-into-dotnet-7/)
➡️[Announcing: Azure Developers - .NET Day - .NET Blog](https://devblogs.microsoft.com/dotnet/announcing-azure-developers-dotnet-day/)

### What did you think?

With so much new information coming at you each month, we're looking at ways to bring you the highlights. Let us know if this helps, and how we can do it better next month!

Jon
Quick Interview Crack (Unordered Set)
Published: 2023-04-05 18:03:49

Unordered set is a Data Structure in C++ which can contain different data in unordered manner. Now, why unordered set is in this interview section and why do we need an unordered set.

Let us look into a quick introduction of unordered set. It is basically implemented as hash table. So, every element in an unordered set is unique. As it is implemented as hash table, most operations takes time complexity O(1) except some rare cases it takes up to O(N) time. When we insert an element into an unordered set, it passes through a hash function and set the value into a hash table. As a result, the inserted element stored in unordered manner. That is why it is called unordered set.

Searching an element or comparing elements or finding duplicates are common code problem given in job Interviews. Unordered set is a good use of these kinds of problem which helps reduce time complexity of many operations. Instead of thinking about brute force, we can always check weather we can use a data structure to reduce time complexity of our problem. 

Some of the commonly used methods of unordered set with time complexity of O(1) are insert(), find(), empty(), begin(), end(), size(), erase(), clear() etc.
Bit Constant Macros in C
Tags: c, cpp
Published: 2023-04-05 17:38:53

---
title: Bit Constant Macros in C
published: true
description: Macros for specifying bit constants in C.
tags: #c #cpp
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-24 15:28 +0000
---

## Introduction

In addition to my [bit testing functions in C](https://dev.to/pauljlucas/bit-testing-functions-in-c-5bfi), here are some bit constant macros in C.  (These are used as [part](https://github.com/paul-j-lucas/cdecl/blob/master/src/util.h) of [**cdecl**](https://github.com/paul-j-lucas/cdecl/).)

## The Macros

The first macro, given an integer having _exactly one_ bit set, returns a value where all bits less than that are set, e.g., given `0b00010000`, returns `0b00001111`:

```c
#define BITS_LT(N)  ((N) - 1u)
```

Given that definition, a macro that returns a value where all bits that are less than _or equal to_ the one set bit is:

```c
#define BITS_LE(N)  (BITS_LT(N) | (N))
```

Finally, the greater-than counterparts are trivially:

```c
#define BITS_GT(N)  (~BITS_LE(N))
#define BITS_GE(N)  (~BITS_LT(N))
```
Which is better? Axios or Fetch?
Tags: javascript, requestforpost, get
Published: 2023-04-05 17:36:36

Personally, I like the simplicity of both, but I use more Axios, I would like to know your opinions about it.
I attach an example of the basic use of Axios:

```
const fetchData = async() => {
   try{
     const get_data = await axios.get("URL");
   }
   catch(error){
     console.log(error);
   }
 }

 // call the function
 fetchData();
```
This has really helped me a lot and I have no complaints, but when talking about performance and being an external library, this question arises.

thanks for reading :D
Optimizing Zustand: How to Prevent Unnecessary Re-renders in Your React App
Tags: typescript, zustand, react
Published: 2023-04-05 17:22:50

The problem: When you create a store in Zustand and use it across components, any change in the store's state will cause the component to rerender, even if the component is not related to that particular state. For example, if you have a store like the one below and call useBearStore in your component, whenever the cats state is updated, your bear component will also rerender.

```typescript
import create, { SetState } from "zustand";

interface BearStore {
  bears: number;
  cats: number;
  incrementCats: () => void;
  increase: (by: number) => void;
  increment: () => void;
}

export const bearStore = (set: SetState<BearStore>) => ({
  bears: 0,
  cats: 0,
  increase: (by: number) => {
    set((state) => ({ bears: state.bears + by }));
  },
  increment: () => {
    set((state) => ({ bears: state.bears += 1 }));
  },
  incrementCats: () => {
    set((state) => ({ cats: state.cats += 1 }));
  }
});

export const useBearStore = create<BearStore>(bearStore);
```
For example if you have a store like this and call `useBearStore` in your component whenever cats state updated your bear component will rerender also.

The Solution: To prevent this issue, we can create a simple utility function using shallow in Zustand.

```typescript
import { StoreApi, UseBoundStore } from "zustand";
import shallow from "zustand/shallow";

type GenericState = Record<string, any>;

export const createStoreWithSelectors = <T extends GenericState>(
  store: UseBoundStore<StoreApi<T>>,
): (<K extends keyof T>(keys: K[]) => Pick<T, K>) => {
  const useStore: <K extends keyof T>(keys: K[]) => Pick<T, K> = <K extends keyof T>(keys: K[]) => {
    
    return store((state) => {
      const x = keys.reduce((acc, cur) => {
        acc[cur] = state[cur];
        return acc;
      }, {} as T);

      return x as Pick<T, K>;
    }, shallow);
  };

  return useStore;
};
```

Then we can update our initial store to use this utility function:

```typescript
const bearStore = create<BearStore>(bearStore);

export const useBearStore= createStoreWithSelectors(bearStore);
```

Now we can use it in components like this:

```typescript
const { bears, increment } = useBearStore(["bears", "increment"]);

```

With this change, the component won't rerender even if the cats state is updated.
What is Web Penetration Testing? And why do we need Web Penetration Testing?
Tags: penetration, testing, website, webapplicaion
Published: 2023-04-05 17:10:46

Web Penetration Testing is the process of testing a website or web application for vulnerabilities and security weaknesses that can be exploited by malicious hackers. This is done by simulating real-world attacks on the website or application, with the aim of identifying weaknesses that could be exploited by an attacker.
The primary goal of web penetration testing is to identify security vulnerabilities before attackers can exploit them. By identifying these vulnerabilities, organizations can take steps to mitigate them, which helps to prevent attacks and protect sensitive data.


There are several reasons why web penetration testing is necessary:

To identify vulnerabilities: A web penetration test helps to identify vulnerabilities in the web application, which can be exploited by attackers to gain unauthorized access or steal sensitive information.

To ensure compliance: Many organizations are required to comply with regulatory requirements such as the Payment Card Industry Data Security Standard (PCI DSS), which mandates regular web application security testing.

To reduce risk: Web penetration testing helps organizations to reduce their overall risk exposure by identifying and addressing vulnerabilities before they can be exploited by attackers.

To increase confidence: Regular web penetration testing can help to increase confidence in the security of a web application, which can be important for customers, partners, and other stakeholders.

Overall, web penetration testing is an essential component of any comprehensive web application security program, helping organizations to identify and mitigate security vulnerabilities and reduce the risk of cyberattacks.

**Do you have concerns about the security of your web application? As a professional Web Application Penetration Tester, I have experience identifying and mitigating security risks in web applications. I will conduct a thorough penetration testing of your web application to identify any vulnerabilities or weaknesses that could be exploited by attackers. I will use a combination of manual and automated testing techniques to ensure comprehensive coverage, and deliver a detailed report that outlines the vulnerabilities and provides recommendations for remediation. I will also provide a retest service to ensure that the identified vulnerabilities have been successfully addressed.**

My email : md.mafizulk2@gmail.com
My Fiverr Gig :https://www.fiverr.com/share/7k1jRk
Choosing the Right Big Data Engine: A Comparison of ApacheAGE, Apache Spark, and Apache Flink
Tags: apacheage, postgres, database
Published: 2023-04-05 16:57:02

Big data processing is an essential part of modern data-driven businesses. With the increasing amount of data being generated every day, companies need efficient tools to store, process, and analyze data. ApacheAGE, Apache Spark, and Apache Flink are three popular big data engines that provide robust solutions for processing large-scale data.

In this blog post, we will compare these three big data engines and help you choose the right one for your business needs.

**Apache AGE** is an extension for PostgreSQL that enables users to leverage a graph database on top of existing relational databases. The basic principle of the project is to create a single storage that handles both the relational and graph data model so that the users can use the standard ANSI SQL along with openCypher, one of the most popular graph query languages today. Inspired by Bitnine's AgensGraph, a multi-model database fork of PostgreSQL, AGE aims to provide an efficient and flexible platform for storing and querying graph data.

**Apache Spark**
Apache Spark is an open-source distributed computing system that is designed to process large-scale data. Spark provides a powerful processing engine that supports in-memory processing, which allows it to handle massive datasets with ease.

Spark provides a unified API for batch processing, real-time processing, machine learning, and graph processing. This makes it a versatile tool that can be used for a variety of big data processing tasks.

One of the key features of Spark is its ability to perform iterative algorithms, which are essential for machine learning and graph processing tasks. Spark also provides fault-tolerance and recovery mechanisms that ensure that data processing is not interrupted even in the event of a node failure.

**Apache Flink**
Apache Flink is an open-source distributed stream processing framework that is designed to process real-time data streams. Flink provides a powerful processing engine that supports batch processing, stream processing, and graph processing.

Flink provides a streaming-first architecture, which means that it is optimized for processing continuous data streams. This makes it a great tool for applications that require real-time data processing and analysis.

One of the key features of Flink is its ability to handle out-of-order data, which is common in real-time data streams. Flink also provides fault-tolerance and recovery mechanisms that ensure that data processing is not interrupted even in the event of a node failure.

Ultimately, the choice between ApacheAGE, Apache Spark, and Apache Flink will depend on your specific needs and requirements. All three engines are powerful and efficient, and they can handle a wide range of big data processing tasks. By taking the time to evaluate each engine and consider your own needs, you can choose the one that’s right for you and your organization
DevOps & SRE Roadmap explained by AI - part 2
Tags: kubernetes, k8, ai
Published: 2023-04-05 16:33:28


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tztg0hlese4f8uyustgo.jpg)
This part is for what you need to know about **Operating Systems**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/os14fz8v8itq13h0wrce.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbmksmsr90zrn7nr5g09.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r1honmn44lh8q9geiayt.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bed5jehys8f6vfet8ozt.jpg)

You will need to understand some **OS fundamentals** . And if you're in a very rare case of a company that is Windows exclusive you will only need to live in a Linux terminal 99% of your time. So learn only Linux and learn it well.

**Linux** is a powerful open-source operating system that’s essential for DevOps and SRE roles 🐧🔧 It provides a stable, secure, and customizable platform for software development, deployment, and maintenance 💻 Linux is highly scalable and can be used across a wide range of systems 🚀

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tq5zhwjob5s1omzgfo32.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ncw7vm1t1g4mc71dv81.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ky35xj9gqa3wiqlkssr.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4llloolrcmnb87qtkngs.jpg)

**Linux commands** are essential for DevOps and SRE roles 🔧💻 They allow you to manage hardware and software resources, automate tasks, and deploy software with confidence 🚀 Linux commands are highly customizable and can be used across a wide range of systems 🌎

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrz46g2clalrnrq1twyv.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kexel5vx4zn51trfo1j8.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vx20t3elafjike2ays0.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wfqzoxf6jtkjhpsqr908.jpg)

**Bash scripting** is essential for DevOps and SRE roles 📜💻 It allows you to automate tasks, manage systems, and deploy software with ease 🚀 Bash scripts are highly customizable and can be used across a wide range of systems 🌎 
(lol AI really likes to write _can be used across a wide range of systems 🌎_)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/od0gt97gti6wafhhy9l1.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3kiq5am1r7h79895zl4.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ondwqrhlbkeh1rce13za.jpg)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4by9hlq1r8cx0hfqfpm.jpg)

Essentially you need to know Linux very well!

This is all for Operating Systems.
Next part is the biggest one - Cloud Native.
Newbie here
Published: 2023-04-05 16:25:58

I'm beginning a coding bootcamp next week and I'm really excited to finally jump into something that I was interested in when I was younger.

I had always thought developing would be a rewarding experience, but I didn't take the opportunity to do so earlier in my life.  However, I've learned that I'm not too old to learn new things and I look forward to this journey and the potential paths that could open up.
hie
Published: 2023-04-05 16:14:59

```
import React,{forwardRef, useRef,useState} from 'react'
import ForwardRef from './ForwardRef';

const Ref = () => {


    let inputRef = useRef();



    let divRef = useRef();
    let preRef = useRef();
    let childRef = useRef();


    let[input,setInput] = useState("");
    

    function Handler(){
        inputRef.current.focus();
        
    }

    function inputHandler(e){
        preRef.current= input;
        setInput(e.target.value)
    }
    // IT WILL HOLD THE VALUE OF INPUT EVEN IF THE COMPONENT RERENDERS
    console.log(preRef.current)

    
  return (
    <div className='bg-red-500 text-center p-4'>

        <button  onClick={Handler}>
            Click me to focus input
        </button>

            <h1 className='text-4xl'> Explanation of Ref</h1>
        <div className='bg-cyan-500 p-4'>

            <input ref={inputRef} value={input} onChange={(e)=>{inputHandler(e)}}/>
            
            
            <div ref={divRef}>
                hey there  my height will be calculated using ref it is {divRef.current.offsetHeight} px
            </div>
            <span>i am holding the value of previous entered input {preRef.current}</span>
        </div>
        
       
        <ForwardRef ref={childRef}/>
        <div>
            Height of child component calculated uing forward ref is {childRef.current.offsetHeight}
        </div>
        
    </div>
  )
}

export default Ref
```
Github Actions for Laravel
Tags: php, laravel, github, ci
Published: 2023-04-05 16:13:26

The publish github actions works properly for default Laravel apps, just choose what makes sense for your own project.

This action files require a `.env.ci` that is just a copy from `.env.example`, feel free to adjust this file for your project requirements.

### Just run PHPUnit test:

```yml
name: CI
on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main

jobs:
  tests:
    runs-on: ubuntu-latest
 
    services:
      mysql:
        image: mysql:8.0
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: yes
          MYSQL_DATABASE: test
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
 
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 1
        
    - name: Cache composer dependencies
      uses: actions/cache@v2
      with:
        path: vendor
        key: composer-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          composer-
          
    - name: Install PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: 8.1
 
    - name: Install composer dependencies
      run: |
        composer install --no-scripts
 
    - name: Prepare Laravel Application
      run: |
        cp .env.ci .env
        php artisan key:generate
 
    - name: Run Test suite
      run: php artisan test
```


### Github Action to run PHPUnit tests & NPM workflow


```yml
name: CI
on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main

jobs:
  tests:
    runs-on: ubuntu-latest
 
    services:
      mysql:
        image: mysql:8.0
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: yes
          MYSQL_DATABASE: test
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
 
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 1
        
    - name: Cache composer dependencies
      uses: actions/cache@v2
      with:
        path: vendor
        key: composer-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          composer-
          
    - name: Install PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: 8.1
 
    - name: Install composer dependencies
      run: |
        composer install --no-scripts
 
    - name: Prepare Laravel Application
      run: |
        cp .env.ci .env
        php artisan key:generate
 
    - name: Run Test suite
      run: php artisan test

    - name: Install NPM dependencies
      run: npm install
      
    - name: Compile assets
      run: npm run build
```