teleren/devto huggingface dataset:
Ace the "Tell me about a time you made a mistake" question in your next interview.
Tags: career, careerdevelopment, interview
Published: 2023-06-15 21:00:00

Hey there, job seekers! Today, we're diving into one of those dreaded interview questions that can make your heart skip a beat: "Tell me about a time you made a mistake?" We've all been there, right? Making mistakes is a part of being human, and it's how we grow and learn. So, let's tackle this question head-on and learn how to turn that mishap into a story of triumph.

Picture this: You're sitting in the hot seat, and the interviewer throws the question your way. Take a deep breath and remember that this question isn't about exposing your flaws; it's an opportunity to demonstrate your self-awareness, adaptability, and resilience.

First and foremost, set the stage by painting a vivid picture of the situation. Take the interviewer on a journey to that moment when the mistake happened. Was it a challenging project with tight deadlines? A team collaboration gone awry? Whatever it was, make sure to set the scene and provide some context.

Now comes the crucial part – embracing accountability. Here's your chance to shine. Own up to your mistake with confidence. Remember, no one expects you to be perfect, but they do want to see how you handle setbacks. Show that you're willing to admit your error and accept the consequences.

Once you've taken responsibility, it's time to share the valuable lessons you learned. Dive into the aftermath of the mistake. Did you take a step back and analyze what went wrong? Did you seek feedback from your colleagues or supervisor? Explain your steps to understand the root cause and how you used that knowledge to grow and improve.

But don't stop there! Highlight your personal growth as a result of this experience. Show the interviewer that you're not one to dwell on past mistakes. Share how the experience shaped you as a professional. Did it enhance your problem-solving skills? Did it teach you the importance of attention to detail? You demonstrate your ability to turn adversity into opportunity by highlighting your personal growth.

Lastly, express your commitment to excellence. Wrap up your answer by emphasizing your dedication to continuous improvement. Talk about the steps you take to prevent similar mistakes in the future. Do you actively seek feedback? Do you engage in ongoing learning and professional development? Let them know that you're committed to becoming the best version of yourself.

So there you have it – a roadmap to ace the "Tell me about a time you made a mistake?" question. Remember, everyone makes mistakes, but how you handle them counts. Show the interviewer your resilience, adaptability, and eagerness to learn and grow. Own that mistake and turn it into a story of triumph that leaves a lasting impression.

Now go out there and rock that interview! You've got this!
Starting Web Development is Scary
Tags: webdev, beginners
Published: 2023-06-15 20:20:00

My name is Josh.  I am currently enrolled in a Full Stack Bootcamp with the University of Utah, that will officially start on August 14, 2023, and I am terrified.

Currently, I am working at a tech "startup" in Support.  Throughout my time there, I have begun to develop an interest in coding and web development.  In the past, I have always thought that it was too late for me to start coding, and besides, I wasn't all that interested in it anyways. However, as I've come to learn more about what web development is, I have been filled with a sense of wonder as I imagine the possibilities of things I could create and improve if I only had the knowledge and skills that learning to code can provide.

Why then, am I terrified? Well, it goes back to my initial hesitations with learning to code. There are a lot of really smart people who know how to code and who are currently learning.  How can I measure up to them? What if the initial thrill of learning something new quickly turns to frustration and I get burned out only a few weeks into the Bootcamp?  What if I do make it through the Bootcamp, only to find myself unemployed, with no one willing to take a chance on me because I am not a college graduate?  These questions and doubts can make it seem like I am crazy to leave my stable job to pursue a completely new field with no guarantees that I will succeed in it.  However, I can also use these questions as fuel to motivate myself to succeed.

I am ready to bet on myself.  I am ready to put in the time and effort to ensure my success in this new adventure that I am embarking on.  No turning back.
Define Integrity in the context of Network Security
Tags: network, interview, tutorial, chatgpt
Published: 2023-06-15 20:01:39

In the context of network security, integrity refers to the assurance that data remains unchanged and uncorrupted during transit or storage. It ensures that the information sent or received has not been tampered with, altered, or modified in any unauthorized manner.

Maintaining data integrity is crucial in network security to ensure the accuracy, reliability, and trustworthiness of information. Data integrity protects against various threats, such as unauthorized modifications, data corruption, or malicious alterations that could lead to data loss, unauthorized access, or false information.

To ensure data integrity, cryptographic techniques are commonly employed. These techniques involve the use of algorithms and mechanisms that generate digital signatures or message digests, which are unique representations of the data. By comparing the generated signatures or digests at the receiving end with the original ones, one can verify the integrity of the data.

Some commonly used methods to ensure data integrity include:

Hash Functions: Hash functions generate a fixed-size unique hash value (digest) based on the input data. Even a small change in the input data will produce a different hash value. By comparing the hash values of the transmitted data and the original data, integrity can be verified.

Message Authentication Codes (MAC): MACs use symmetric cryptographic algorithms to generate a unique tag or code that verifies the integrity and authenticity of the data. This tag is generated using a shared secret key that is known only to the sender and receiver.

Digital Signatures: Digital signatures use asymmetric cryptographic algorithms to provide integrity and authenticity. The sender uses their private key to sign the data, and the receiver can use the sender's public key to verify the signature. If the signature is valid, it ensures the integrity and authenticity of the data.

By implementing these integrity mechanisms, network security can be strengthened, ensuring that data remains intact, trustworthy, and unaltered throughout its transmission and storage.
Understanding Graph Database and Cypher
Tags: apacheage, agcloud, graphdatabase, cypher
Published: 2023-06-15 19:56:19

## Introduction
### What is graph
A graph is a collection of nodes and relationships (edges) between them. Sometimes nodes are called vertices and relationships are called edges.

### Representation

![Image showing a graph](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umepmsmwop0dwj1gyzon.png)

A circle typically represents a Node, while an arrowed line indicates an Edge connecting one Node to another.

The Nodes colored in red are labeled as "Females," while the blue Nodes are labeled as "Males."
The connection between them is labeled as "Follows" and is directed from one Node to another.
By assigning labels, the graph becomes easier to handle, allowing for the display, coloring, or manipulation of Nodes or relationships with specific labels.

## Properties and Paths

We have the freedom to assign as much information as we desire to each node and relationship in the graph. This data is stored as properties.

To illustrate, let's consider the node named "Adam" which possesses the following properties:

{Name: Adam, Age: 25}

The property list functions similar to a key-value store, where the property name acts as the key, and the corresponding value can be a number (INT or FLOAT), a string, a list, or a BOOLEAN. Some graphs even contain nodes with several megabytes of information per node or edge.

In our graph visualization, we have chosen to display Adam's Name property on the node. However, we have the flexibility to showcase any property of the node based on our preference.

Furthermore, just like nodes, edges can also have unique properties. For example, we can store information such as the duration of Fia's following of Dee within the edge that connects them in the graph.

### Paths

A Path is a sequence of alternating nodes and edges.

Nodes can exist with any number of outgoing or incoming edges. If we want to make the relationship bi-directional we must have two edges.

## Representing Nodes, Edges, Labels, Properties and Paths.

OpenCypher makes clever use ASCII Art to make using the language easy to use. 

- Nodes are always represented as `( )`, brackets - to look like circles.
- Properties of nodes (or edges) are inside `{ }` curly brackets separated by commas.
- The property name and value are separated by : colon as in { Age: 30, Eyes: 'Brown' }
- Edges are represented by `[ ]` square brackets and their direction is shown with a `>`
- Labels are preceded by `:` colon as in **:**Female or **:**Follows

Here are progressively more detailed Pattern examples

**() - [ ] -> ()  **                                       
- this is the base notation of a path and matches every pair of connected nodes and their connecting edge

## Visit Apache AGE:
- [Official Site](https://age.apache.org)
- [AGE Github](https://github.com/apache/age)
2nd Episode: Best practices.
Tags: javascript, react, testing, jest
Published: 2023-06-15 19:54:58

## Best practices
During the testing process, our focus is on verifying the desired behaviour rather than specific implementation details.

## The Arrange-Act-Assert (AAA) pattern
This widely used pattern helps to ensure that your tests are well-organized and structured correctly. It involves three essential steps: arranging the test environment and setting up any necessary variables, acting by performing the desired action, and asserting that the expected outcome has indeed taken place.
Example:

```javascript
// Counter.js
import React, { useState } from 'react';

const Counter = () => {
  const [count, setCount] = useState(0);

  const increment = () => setCount(count + 1);

  return (
    <div>
      <h1>Counter: {count}</h1>
      <button onClick={increment}>Increment</button>
    </div>
  );
}

export default Counter;
```

**Test**

```javascript
// Counter.test.jsx
import { fireEvent, render, screen } from '@testing-library/react';
import Counter from './Counter';

test('increments counter when button is clicked', () => {
  // Arrange
  render(<Counter />);
  const button = screen.getByRole('button');

  // Act
  fireEvent.click(button);

  // Assert
  const counterValue = screen.getByText(/1/i);
  expect(counterValue).toBeInTheDocument();
});

```

While it is valuable to follow industry standards, we should also use our judgment to determine when and how to apply them. It's important to aim for tests that closely resemble the behaviour of the code in a production environment.
Become a Gradle expert in 3 easy steps!
Tags: gradle, java, android, jokes
Published: 2023-06-15 19:47:18

**Step 1.** Your build fails "for no reason" and your small team has no dedicated build support. Everyone is complaining in Slack and you can't bear to look at another poor quality Geordi meme.

![A Geordi meme template. Geordi scoffs at the notion of fixing his broken builds, and prefers instead to complain about them](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sj7itp8w7we2wxqjnstz.jpg)

You copy a portion of the stacktrace and paste it into Google. Turns out jcenter is experiencing [yet](https://blog.gradle.org/jcenter-shutdown) [another](https://stackoverflow.com/a/70687500) [outage](https://www.reddit.com/r/androiddev/comments/yi23k8/jcenter_down/). You look at the suggested workarounds and do a find-and-replace: `s/jcenter/mavenCentral`. Your build works again! You don't really understand why, but you also don't care. Back to writing beautiful UI!

**Step 2.** Your build fails "for no reason" and your small team has no dedicated build support. Everyone remembers that you fixed it last time and ask you to look into it.

**Step 3.** Now you're the expert. Congrats!
React.FC is fixed?
Tags: react, typescript, reactnative, webdev
Published: 2023-06-15 19:14:18

> `React.FC` was removed from create-react-app in Jan 2020 due to two drawbacks, but with the release of TypeScript 5.1 and React 18, these issues have been resolved, allowing components to return various types without errors and improving type safety.

`React.FC` received love and hate from the React community and at some point it was criticized enough to get itself removed from create-react-app back on Jan 23, 2020. But why?

1. Cannot type components returning `undefined`, `string` or `number` although it is a perfectly valid syntax.

2. Implicitly includes children in props type

Now with the latest release of TypeScript 5.1 and React 18, it no longer displays those squiggly red lines.

### What does that mean?

Let's take an example of a functional component that returns a `string`,

```
const Greet: React.FC = () => {
  return "Hello World"
};
```
before TypeScript 5.1 and React 18, this would throw an error as
`Type '() => string' is not assignable to type 'FC<{}>'. Type 'string' is not assignable to type 'ReactElement<any, any>'.ts(2322)`
But now with a newer version, this is a perfectly valid syntax.


Another example covering the 2nd drawback of `React.FC`,
```
const Button: React.FC = () => {
  return <button>Click me</button>;
};

export const App = () => {
  <Button>Boop</Button>; // valid syntax
};
```

In the above example, the Button component does not accept children but TypeScript doesn't warn you if you try to provide children `Boop` like `<Button>Boop</Button>`

Now with the newer versions, the above code would throw an error as

`Type '{ children: string; }' has no properties in common with type 'IntrinsicAttributes'.ts(2559)`

### What changed?

Well, React fixed these typings by replacing the return type of `React.FC` from `React.ReactElemet` to `React.ReactNode`

What's the difference?

`React.ReactElement` type is defined as,
```
interface ReactElement<
  P = any,
  T extends string | JSXElementConstructor<any> =
    | string
    | JSXElementConstructor<any>
> {
  type: T;
  props: P;
  key: Key | null;
}
```
which means that it breaks when you attempt to pass in a `string`, `number`, or `undefined` as a child.

Whereas `React.ReactNode` is defined as a type that accepts all possible types that React can render.
```
type ReactNode =
  | ReactChild
  | ReactFragment
  | ReactPortal
  | boolean
  | null
  | undefined;

type ReactFragment = {} | Iterable<ReactNode>;
type ReactText = string | number;
type ReactChild = ReactElement | ReactText;
interface ReactPortal extends ReactElement {
  key: Key | null;
  children: ReactNode;
}
```
### Conclusion
In conclusion, the latest TypeScript 5.1 and React 18 updates have addressed the issues with React.FC, allowing components to return various types such as strings, numbers, and undefined without errors. This improvement enhances the developer experience and ensures better type safety when using functional components in React applications.
({react, ts, storybook}) => ❤️
Tags: 100daystooffload, react, storybook, typescript
Published: 2023-06-15 18:44:06

Had a blast yesterday in a programming session with some colleagues, triple-programming.

We were building a new react component in TypeScript with the help of Storybook. The workflow felt just like TDD but instead of tests we used the visual aid from Storybook.

This workflow and the use of language that can enable strong typing made it lovely to code and brought up many good discussions during the session. This is something I would love to do again and recommend others to try!

Also, after the session I googled __Storybook Driven Development__ and of course there are plenty information about this on the Internet :-)

[Visual TDD](https://storybook.js.org/tutorials/visual-testing-handbook/react/en/vtdd/)
Computer vision for cashierless checkout
Tags: computervision, ai, machinelearning, development
Published: 2023-06-15 18:30:25

Hey fellows! I want to hear your thoughts about the [Cashierless Checkout](https://www.abtosoftware.com/products/cashierless-checkout) we've made. This solution based on object recognition and aimed at eliminating the need for traditional manned checkout counters, allowing customers to enjoy their shopping experience.

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

For this Cashielress Checkout we utilized computer vision algorithms to accurately identify the items chosen by customers, calculate the total cost, and securely process payments. The software processes video stream in real-time, so after the product item crosses the counting line its quantity in the shopping bill is incremented. Accuracy we have reached is about 97%.

https://www.youtube.com/watch?v=lEWFmKI5RYY&t=1s – here is the example of how it works.

When working on item recognition, we took into account:

1. accommodating various product sizes, 
2. shapes, and 
3. packaging types across different retail sectors. 
4. Also, product overlapping. 

By implementing Cashierless Checkout, retailers can optimize operations, reduce staffing costs, and redirect resources to other critical areas. 

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

Your opinion needed of what else we can take into account to improve the solution. Thanks!
"Unveiling JavaScript's Puzzling Quirk: The Object Identity of Null"
Tags: webdev, javascript, programming, frontend
Published: 2023-06-15 18:26:22

In the realm of frontend interviews, the question of **typeof(Object)** has left many developers scratching their heads. We've all experienced the puzzling result: null, a value representing explicit emptiness, is strangely classified as an Object. But why does this anomaly exist? Join me on an exploration of JavaScript's early design era, where Brendan Eich created the language in record time. In this article, we'll embark on a journey through the world of 32-bit values, type tags, and binary magic. Prepare to unravel the captivating story behind why null aligns with the Object type. Let's dive into the enigma and discover the untold secrets!

To understand the quirks of JavaScript, we must travel back to its inception. Brendan Eich's journey in creating JavaScript was a race against time, driven by the need for a versatile language to power the emerging web. In the blink of an eye, JavaScript was born, setting the stage for its intriguing behavior.

Computers comprehend only zeros and ones, and JavaScript values were no exception. Visualize a time when JavaScript values were confined to 32 bits, forming the building blocks of the language we know today. These 32 bits held the key to unraveling the mysteries of type determination.


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

The final 1-3 bits of those 32 bits were allocated as type tags.These type tags were the gatekeepers to understanding the nature of a particular JavaScript value. They held the power to distinguish between primitive types and objects.

Enter null, the sentinel value representing explicit emptiness. Null, at its core, is stored as a null pointer address consisting of all zeroes. This null pointer address aligns with the type tag assigned to objects in JavaScript, leading to the unexpected result when evaluating typeof null.


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

By delving into the type tag table, we uncover the hidden connection between null and the Object type. The type tag for objects is represented by all zeroes, which perfectly matches the null pointer address. As a result, the typeof null expression yields "object," puzzling developers worldwide.

I hope This article helped you to Uncover this mystic result of the typeof(Object), consider sharing the Article to let all of your fellow Programmers know and reveal the Mystery.
10 Inspiring Development Facts
Tags: programming, tutorial, career
Published: 2023-06-15 18:26:15

## Simplicity vs Complexity

While questioning unnecessary complexity is important, it's equally important not to disregard the usefulness of tools like Docker in complex environments​​.

## Fighting Complexity
In very large companies with complicated systems, it's crucial to fight unnecessary complexity at every opportunity​​.

Development Focus
[Managers are responsible for the growth and development of their team members](https://mitrapunk.com/the-essential-transition-from-developer-to-manager/). This means identifying strengths and weaknesses, providing constructive feedback, and finding opportunities for skill development.

## Scaling Simplicity
Simple techniques can often be scaled to handle large amounts of traffic, although they might lack high availability​.

## Value of 1x Programmers
More organizations could potentially unlock more value by having a 1x programmer with well-defined objectives on staff​​.

## Simple Scales Too
Some 'simple' techniques like writing to a local disk or using a static binary can scale to handle thousands of queries per second, potentially providing enough capacity for many applications​.

## In-house Programmer Value
More organizations could potentially unlock value by having a 1x programmer with well-defined objectives on staff, rather than relying solely on SaaS solutions​.

## Programmer Manifesto
The Stupid Programmer Manifesto outlines an approach to programming that emphasizes simplicity, readability, and maintainability over adherence to the latest trends and techniques​.

## Avoiding Overengineering 
A key principle of the Stupid Programmer Manifesto is to avoid overengineering whenever possible, breaking down tasks into smaller, manageable pieces instead​​.

## Simplicity in Server Architecture
Under the hood, the architecture of the Stupid Programmer Manifesto relies on a simple, single-threaded, event-driven server with all resources embedded in a single binary, highlighting the possibility of maintaining simplicity even in server architecture​.

[Who is Force multiplier software engineer](https://mitrapunk.com/software-engineer-as-a-force-multiplier/)
pyaction 4.21.0 Released
Tags: github, docker, python, showdev
Published: 2023-06-15 18:20:31

## TL;DR

I just released [pyaction](https://github.com/cicirello/pyaction) 4.21.0, a [Docker container with Python, git, and the GitHub CLI](https://dev.to/cicirello/pyaction-a-docker-container-with-python-git-and-the-github-cli-930).


## Changelog 4.21.0 - 2023-06-15

### Changed
* Bumped git to 2.39.2.
* Bumped curl to 7.88.1.
* Bumped gpg to 2.2.40.
* Bumped Python to 3.11.4.


## Current Version List

This latest release of pyaction includes:
* Python 3.11.4
* [GitHub CLI 2.30.0](https://github.com/cli/cli/releases/tag/v2.30.0)
* git 2.39.2
* curl 7.88.1
* gpg 2.2.40



## More Information

For more information, see my earlier post about pyaction here on DEV, as well as pyaction's GitHub repository.

{% link https://dev.to/cicirello/pyaction-a-docker-container-with-python-git-and-the-github-cli-930 %}

{% github cicirello/pyaction %}



## Where You Can Find Me

Follow me [here on DEV](https://dev.to/cicirello) and on [GitHub](https://github.com/cicirello):

{% user cicirello %}

Or visit my website:

{% embed https://www.cicirello.org/ %}