teleren/devto huggingface dataset:
Blending Humanity with Technology
Tags: discuss, productivity, ai, webdev
Published: 2023-02-24 18:45:29

I know what you are probably thinking...


ChatGPT and I'm going to talk about AI and it's going to either save us or enslave us all.

Actually I think we have a bigger problem/opportunity that's in front of us already and I literally never hear anyone talk about this, because we are all focused on being destroyed by the Terminator or being unemployed and homeless.

You see, ever since the beginning of the "Information Revolution", there has been a strong focus on developing technology just for the sake of developing technology.  While many things of course would benefit humans, it wasn't necessarily important that it would actually do so.  If it was shiny enough and new enough and dazzled enough people, then that alone would be enough for that technology to gain acceptance and be pushed out to many people.

I believe we have a tremendous opportunity in front of us though.  There is a whole category of science that is focused on what it means to be human.  Many times this science gets downgraded in society because it's only "soft science".  Many times psychology, sociology, politics or anthropology get discounted because there is a lot of question about how do these disciplines actually move us forward.  Many times it's hard to measure progress with these sciences because there isn't hard numbers that we can look at and see concrete progress.  However, these fields should not be ignored because they directly affect the human condition.

Imagine the things that we could accomplish if we were able to integrate technology more with psychology.  We could help improve people's psychological condition, whether they start from a good point or not, in a very noninvasive way.  Many times we hear about how maybe technology is affecting people's psychology in a negative way, through too much screen time or social networking's impact on the brain.  Instead, maybe we can use technology to help people to examine the things that bother them, make them worry, scare them, or cause problems in their relationships.  We can do this in a way that is engaging and not intimidating.

We also have access to big data.  What if we were to start to analyze the types of videos that get posted online, try to map those to certain locations on a map and then try to ask some questions about those relationships?  What could we learn from the world around us if we did those things and then had a discussion about these questions?

The thought here is not to make people feel like they are only being examined or psychoanalyzed, but actually looking to see if we can solve some of the bigger issues in our world.  While it's always nice to have a nice shiny new gadget, imagine if that gadget could help us with the real problems in our lives.
Variables and Data Type in Python
Tags: variables, datatype, python, beginners
Published: 2023-02-24 18:44:30

A variable in Python is a name that refers to a value. It gives you the ability to store and manipulate data in your program. To make a variable, simply give it a name and assign it a value with the assignment operator (=). Here's an illustration:

```python
x = 5
```

In this example, we'll make a variable called x and assign it the value 5. Now, whenever we refer to x in our program, Python will replace it with the value 5.

**Variable naming rules:**

* Variable names must start with a letter or underscore (\_), followed by any combination of letters, underscores, and digits.
    
* Variable names are case sensitive, so `x` and `X` are two different variables.
    
* There are some reserved keywords in Python that you can't use as variable names, such as `if`, `else`, `while`, and `def`.
    

Python has several data types, each of which represents a different type of value. Here are some of the most common Python data types:

* **Integers**: Integers (or `int` for short) represent whole numbers. For example:
    
    ```python
    x = 5
    y = -10
    ```
    
* **Floating-point numbers**: Floating-point numbers (or `float`) represent numbers with decimal places. For example:
    
    ```python
    x = 3.14
    y = -0.5
    ```
    
* **Strings**: Strings (or `str`) represent text. They're created by enclosing a sequence of characters in single or double quotes. For example:
    
    ```python
    x = 'Hello, world!'
    y = "Python is awesome"
    ```
    
* **Booleans**: Booleans (or `bool`) represent True or False values. For example:
    
    ```python
    x = True
    y = False
    ```
    

There are more complex data types in Python, such as lists, tuples, and dictionaries, but these are the most common ones.

The `type()` function can be used to determine the data type of a variable. As an example:

```python
x = 5
print(type(x))  # Output: <class 'int'>

y = 'Hello, world!'
print(type(y))  # Output: <class 'str'>
```

**Type conversion:**

Python has built-in functions for converting between different data types. For example, you can use the `int()` function to convert a string to an integer, or the `str()` function to convert a float to a string. Here are a couple of examples:

```python
x = '5'
y = int(x)  # Convert string to integer
print(y)  # Output: 5

x = 3.14
y = str(x)  # Convert float to string
print(y)  # Output: '3.14'
```

**None type:**

Python has a special data type called `None`. It is similar to `null` in other programming languages in that it represents the absence of a value. `None` can be used as a default value for a variable that hasn't yet been assigned a value, or as a placeholder for a value that hasn't yet been computed. Here's an illustration:

```python
x = None
if x is None:
    print("x has no value yet")
else:
    print("x has a value of", x)
```
Running IrfanView on Ubuntu 22.10 using Wine
Tags: ubuntu, wine, irfanview, snap
Published: 2023-02-24 18:41:00

---
title: Running IrfanView on Ubuntu 22.10 using Wine
published: true
description: IrfanView is a popular image viewer that can run on Linux using Wine. Here is how it works
tags: ubuntu, wine, irfanview, snap 
cover_image: https://res.cloudinary.com/canonical/image/fetch/f_auto,q_auto,fl_sanitize,w_1638,h_1226/https://dashboard.snapcraft.io/site_media/appmedia/2019/02/screenshot.png
# Use a ratio of 100:42 for best results.
published_at: 2023-02-24 18:41 +0000
---

I switched to Linux (Ubuntu 22.10) recently after using Windows for literally decades. While there are pros (like performance) and cons (like system stability) for this choice, I want to quickly describe one specific problem I faced, and how I solved it. Maybe this helps someone 😉

## What is IrfanView?

IrfanView [irfanview.com](https://www.irfanview.com/) is one of the most popular image viewers there is. It is very quick and lightweight, but also has some pretty neat features to edit images quickly. While there is no native Linux support, it is possible to run IrfanView using Wine.

## Problem: Scaling issues with IranView using Snap and Ubuntu 22.10

As it turned out, simply installing IrfanView using the [Snap entry ](https://snapcraft.io/install/irfanview/ubuntu) didn't work. 

The main problem was that the **scaling of the system menu** on my 4K monitor didn't work, it was super tiny. Wine has an option to set a custom dpi value (via `winecfg` under `Graphics`), but this didn't affect IrfanView 😥

## Solution: Use Wine without Snap

After a lot back and forth, I removed the snap version of IrfanView and tried Wine (stable) directly. This is as simply as downloading IrfanView's ZIP file and then running `i_view32.exe` with the `Wine Windows Program Loader` (via `Open With`) or `wine i_view32.exe` in the terminal.

And to me amazement, this worked immediately. No more unreadable system menu bars 🎉

There was only one more thing I wanted: It should be possible to **open images directly with IrfanView** (e.g. via `Open With` in the file browser).  

To make a long story short, you need to do the following:

### 1. Create a `.desktop` file

Create a file `IrfanView.desktop` in your `home` folder. Don't forget to add the correct path instead of the two `TODO`s!

```
[Desktop Entry]
Name=IrfanView
Comment=Open Images with Irfanvieww
Keywords=image;
Exec=/usr/bin/env sh -c "winepath -w -0 %F | WINEPREFIX='/home/TODO: your user/.wine' xargs -0 wine /home/<TODO: YOUR PATH HERE>/irfanview/i_view32.exe"
Terminal=false
Type=Application
StartupNotify=true
MimeType=image/jpeg;image/png;
```

The `Exec` section passes the target file to wine (and irfanview), but also uses `winepath` to transform the file path to a "Windows path" so that IrfanVIew understands it.

### 2. Register your application wrapper

In your `home` directory, run `sudo desktop-file-install IrfanView.desktop`

This validates the file you created, and adds it to the "Open With" applications.

Cheers!
DevOps in early stage Startups
Tags: agile, devops
Published: 2023-02-24 18:30:07

---
title: DevOps in early stage Startups
published: true
description: It's all about feedback loops
tags: agile, devops
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-24 18:29 +0000
---

> Originally posted on [my Substack](https://nicoswip.substack.com/p/devops-in-early-stage-startups)

A startup is always constrained by time. Specifically, their runway ($ in the bank until next capital raise). It's key to iterate and validate ideas as quick as possible. It all comes down to feedback loops. Here is where DevOps can help.

From developers writing code and quickly finding out if it's breaking anything (test automation, continuous integration). To developers interacting with Designers and PMs to verify features are working as expected (continuous deployment, ephemeral environments), and finally getting feedback from users and customers as early as possible (feature flags). DevOps underpins it all.

Many engineers focus on the tooling aspect of DevOps. But without Dev there is no Ops. This means creating and maintaining automated test. Architecting applications to be continuously delivered (avoiding dependency hell).

Who does DevOps work? everyone. But, as you grow and can afford more specialised roles, you can invest more into Ops. The goal of these roles is to enable and empower Engineers, not to do the work for them. Creating tooling and managing infrastructure. So teams can effortlessly operate the software they build. But then again, Engineers need to keep evolving how they architect their software to enable higher levels of automation and operation.
A Software Developer's (guide) gossips :)
Published: 2023-02-24 15:23:36

As a software developer, staying up to date with the latest trends and technologies is critical to keeping your skills relevant and ensuring that you're always at the top of your game. 😎💻

I've launched a newsletter specifically designed for software developers. Every two weeks (or something like that 😜), I'll be sharing a curated list of curious and useful resources that can help you stay informed, learn new skills, and grow as a developer. Something serious but never boring. 📰💡

Here are some of the types of resources you can expect to find in my newsletter:

📖 Articles and blog posts on the latest software development trends and techniques.
👨‍🏫 Tutorials and video courses that can help you learn new programming languages and frameworks.
📚 Books and podcasts that provide in-depth coverage of software development topics.
🛠️ Tools and utilities that can streamline your workflow and increase your productivity.

Whether you're a seasoned developer or just starting out, my newsletter is designed to provide you with the information you need to succeed in your career. And because I'm personally using (or reading) every resource I include, you can be sure that you're getting the best. 😃👍

Subscribe to my newsletter here: https://developergossip.substack.com 📩👀

Cheers! 🥂
Criando seu próprio Hook customizado no React
Tags: react, beginners, programming
Published: 2023-02-24 18:17:41

Os Hooks nos permitem usar os recursos do React, como gerenciar o estado de um componente e/ou executar um efeito seguinte a certas alterações ocorrem no(s) estado(s) sem escrever uma classe. As possibilidades existentes no React incluem o `useState`, `useEffect`, `useContext`, `useMemo`, `useCallback`, entre outros. No entanto, também é possível criar Hooks personalizados para adicionar recursos específicos ao seu aplicativo.

Neste artigo, veremos como criar Hooks personalizados no React e como eles podem ser úteis para simplificar o código. Apenas alertar que existe um artigo explicando e falando sobre Hooks e como funcionam: https://dev.to/altencirsilvajr/o-conceito-de-hooks-e-como-o-utilizar-3fi7 . 


**Criando seu próprio Hook**

Para criar seu próprio Hook(algum de seus mais diversos exemplos citados acima) basta o importar e utilizar dentro de uma função e retornar os valores desejados. Vale destacar que é possível usar mais de um Hook.

Vejamos um exemplo Hook de formulário de cadastro para usuário que contém um input de nome e um input de email. Você pode usar o Hook `useInput` para controlar ambos os inputs da seguinte forma:

```
import { useInput } from './useInput';

function CadastroUsuario() {
  const [nome, handleNomeChange] = useInput('');
  const [email, handleEmailChange] = useInput('');

  function handleSubmit(sub) {
    sub.preventDefault();
    console.log(`Nome: ${nome}, Email: ${email}`);
  }

  return (
    <form onSubmit={handleSubmit}>
      <label>
        Nome:
        <input type="text" value={nome} onChange={handleNomeChange} />
      </label>
      <label>
        Email:
        <input type="email" value={email} onChange={handleEmailChange} />
      </label>
      <button type="submit">Cadastrar</button>
    </form>
  );
}
```
No exemplo acima, o componente `CadastroUsuario` utiliza o Hook `useInput` para controlar o estado dos inputs de nome e email. O valor atual de cada input é armazenado nas variáveis nome e email, enquanto as funções `handleNomeChange` e `handleEmailChange` são usadas para atualizar os valores quando o usuário digita algo.


Com isso, vimos a utilidade de Hooks na criação do nosso código e até como criar um. A facilidade para reutilizar a lógica em vários componentes diferentes e após isso o renderizar, simplifica o código e o mantém mais limpo de ler e entender, além da possibilidade e execução de tarefas que variam desde a criação de uma área de cadastro até a criação de envio de nomes para um aplicativo.
Running effective daily stand-ups
Tags: agile, leadership
Published: 2023-02-24 18:17:02

---
title: Running effective daily stand-ups
published: true
description: tl;dr: don't make it a status update meeting
tags: agile, leadership
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-24 18:13 +0000
---

> Originally posted on [my Substack](https://nicoswip.substack.com/p/running-effective-daily-stand-ups)

Long are the days when the three questions made any sense. Similarly, going around the room asking for updates on individual task can be dull and yield little value. You can do all those things by email or on your chosen team chat product. Status updates can be async and no one would miss anything of value.

We need to make good use of our sync time. After all, “too many meetings” is the main feedback that we hear from team members. So we focus instead on making sure that we are tracking on the right direction. Looking for opportunities to help each other, and learn from each other.

Here are the key things I focus my teams on during daily stand-ups:

- Review the Iteration Goal

  - Kanban teams: review any short-terms goals

- **Walk the board from right to left** – discussing the work items closest to Done

  - This keeps the focus on the work and what we can do as a Team to complete something.

  - Encourage pairing and swarming by asking questions such as:

      - “Who can help on this item and get it to Done?” – this includes helping review and test the work done.

      - “Does this work item present a learning opportunity for someone else?”

- Ensure all impediments have agreed-upon action items with names assigned

- Finish with questions such as:

  - “Is anyone working on items not shown on our board?”

  - “Do we feel like we have a good plan of attack for today for achieving the Iteration Goal?”

  - “Do we feel synchronized as a team?”
Simplicity over Flexibility
Tags: architecture, development, leadership
Published: 2023-02-24 18:13:01

---
title: Simplicity over Flexibility
published: true
description: Aim for simplicity, and flexibility will come from it. If you aim for flexibility, you will get complexity instead.
tags: architecture, development, leadership
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-24 18:09 +0000
---

> Originally posted on [my Substack](https://nicoswip.substack.com/p/simplicity-over-flexibility)

Looking back in my work experience I can see how often this principle holds true.

Simplicity and flexibility are often in tension with each other. When you focus on simplicity in the design of a system, it becomes easier to change and adapt to new situations. If you focus on flexibility, you may end up with a system that is harder to understand, use, and maintain.

By focusing on simplicity, we strip away unnecessary logic, dependencies, and complexity. This is because we don't try to optimise, or cater, for potential future scenarios. As a result, we create a streamlined system that is easy to understand and change. We reduce the cognitive load of working with the system. This allows more flexibility because there are fewer constraints and dependencies to consider. Making it easier to change and adapt to meet new requirements.

By focusing on flexibility, we may end up with a system that is harder to understand and maintain. This is because flexibility often requires more options, configurations, and dependencies. All which increase the cognitive load to operate and maintain the system.

In summary, simplicity often leads to greater flexibility in the long run. And we do that by avoiding unnecessary complexity.
Qt 6 - The Ultimate UX Development Platform
Tags: pytho, productivity, programming, api
Published: 2023-02-24 17:48:20

Two years ago, I have started exploring PyQt5 at that time the framework was Qt5 with PySide2 module; I have also created a tutorial on my channel on ow to create a Loan Calculator with PyQt5. 
Now in 2023, we have Qt 6.4 with PySide6 module to be used for various range of applications, 
{% youtube p2o_9lr8kfg %}

and as the title says " The Ultimate UX development platform", and to convince you more of how Qt6 is amazing, here are some reasons why you may consider choosing Qt for your app production:
1- Design and develop great user experiences: With Qt, you can create awesome user experiences that in turn creates dedicated customers and elevates your company into a cult-like brand.
2- Qt saves you money: With Qt, one code stack and one development team can support all your target platforms at the same time. You might not just take our word for it, but surely you can trust Forrester's total economic impact report.
3- Get your products to market faster: Qt streamlines your workflows at every step of your project. With Qt, designers and developers are able to collaborate seamlessly and utilize Qt’s ready-made libraries to deliver products ahead of the competition.
4- Performance, delivered: Performance is a feature. With Qt, you can deliver it. More responsive human-to-machine interactions, faster startup times, smoother animations, and better performance makes your UX your differentiator.

This is a simple introduction about Qt6 and how you can create a simple GUI app in Python using PySide6 module.

{% youtube qGPzmvleo88 %}
How to fix git clone error
Tags: git, github
Published: 2023-02-24 17:33:36

Hi, I have a serious trouble.
Who can help me?
I tried the following:

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

...

After a 20 minute delay at 94%, the result is:

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

How can I fix it?
Please help me.
week 1- Challenges facing during AWS Cloud Project Bootcamp by Andrew Brown
Tags: bootcamp, docker, ec2
Published: 2023-02-24 17:28:01

After going thru all the study material and home work assignments for week_1, I am getting stuck with only 1 problem, i.e. to install the Docker Desktop on my laptop and get the same containers (front and back end) running outside of Gitpod / Codespaces. These containers were built for this **week_1 exercise** to gain hands-on experience in working with docker.

- I followed [Adrian Cantrill's short but excellent course on Docker Fundamentals](https://learn.cantrill.io/courses/docker-fundamentals/lectures/44149360)

- Followed instructions from [Download the Docker Desktop for Windows](https://www.docker.com/)

- Proof that I [downloaded them](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uxfkzgsnkvq9hqrmb3fi.png)

- I followed [Adrian Cantrill's short but excellent course on Docker Fundamentals](https://learn.cantrill.io/courses/docker-fundamentals/lectures/44149360)

- Followed [instructions from my fellow bootcampers](https://learn.microsoft.com/en-gb/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package) to download the WSL2 Linux kernel update package

- [Installed WSL2 Linux kernel Update Package](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi)

- Rebooted the machine to apply the changes made

- Confirmed my DockerHub account

- Checked from the Services that Docker Desktop Service is running

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

- Went thru [this article for solving these errors](https://linuxhint.com/resolve-docker-daemon-not-running/#:~:text=The%20Docker%20daemon%20is%20a,the%20Docker%20service%20not%20running) 

- But still, [Docker Daemon is not running](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/og9j2638mzrh9rouuze3.png) 

- and [Docker is not starting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/im7s9b4padb5m44qf4gz.png)


**So, I am going to use the same CDE as before i.e GitPod**