teleren/devto huggingface dataset:
Why Software Engineering?
Tags: beginners, programming
Published: 2022-12-13 03:02:39

Software Engineering is a very rich field that satisfies a wide spectrum of skills. It can look different from one industry to another and even within the same field. This variety offers endless opportunities to learn and grow progressively. There are many reasons that make this career choice attractive other than the typical financial stability that makes this field stands out and attract fresh graduates as well as career switchers. Here are just a few reasons why:

**The continuous learning aspect**

Software engineers are in a constant learning mode because this field is in constant renovation. This condition may not suit everyone but if you don't thrive in routine and dead-end jobs, programming is the way to go. Continuous learning makes the day interesting and exciting, especially with the little achievements that make you thirsty for more. 

**Problem-solving skills**

Software developers must think logically and solve problems ranging from quick fixes to more complex tasks. Additionally, finding optimum solutions via task analysis and making decisions about each step of the way.

**Team collaboration**

It is not uncommon to assume that programmers work alone but being a team player is a crucial skill to collaborate with other developers. Everyone learns at different paces; therefore, every developer brings value to the team.

**Access to learning resources**

There are many educational pathways to pursue a career in software development ranging from a traditional Computer Science Degree to online programs(free and paid). Technology is changing and there will be always new resources available.

**Flexibility** 

Another advantage of being a software engineer is that you can work remotely depending on the job requirements. Some positions even require traveling for conferences and networking.

The software development field is definitely an exciting field of study that is worth exploring.
Don't forget django application deployment best practice
Tags: django, devops, deployment
Published: 2022-12-13 03:02:37

Deploying a Python Django application can be a daunting task for even the most experienced developers. With so many potential pitfalls and best practices to consider, it's important to approach the process with a clear understanding of what needs to be done.

One of the most crucial steps in deploying a Django app is setting up a staging server. This is a testing environment that closely resembles the production server, allowing developers to run tests and identify any potential issues before pushing the app live. This is an essential step, as it can help prevent costly mistakes and downtime on the production server.

Once the app has been thoroughly tested on the staging server, it's time to deploy it to production. This involves setting up a secure connection with HTTPS, as well as choosing a suitable web server to serve the app. Popular options include Gunicorn and uWSGI, both of which offer excellent performance and reliability.

It's also crucial to regularly update the app's dependencies and libraries during deployment. This helps to ensure that the app is running the latest and most secure versions, which can help prevent security vulnerabilities.

Additionally, having a robust backup and recovery plan in place is essential. This can help protect against data loss or corruption in the event of any unforeseen issues during the deployment process.

Overall, deploying a Python Django app requires careful planning and attention to detail. By following best practices and testing thoroughly, developers can ensure a smooth and successful deployment process.

Thank you for reading my article! If you enjoyed it and would like to support my work, please consider buying me a coffee at **[Buy Me a Coffee](https://www.buymeacoffee.com/giasuddin)**. You can also learn more about me and my work by visiting my **[Giasuddin Bio ](https://bio.link/giasuddi)**and following me on LinkedIn and Twitter. Thank you for your support!
How to create a SSR Application in React
Tags: webdev, javascript, react, tutorial
Published: 2022-12-12 15:19:24

This is commonly known as server-side rendering (SSR) and can be useful for improving the performance and SEO of your React application.

To implement SSR in your React application, you will need to use a server-side framework such as Express or Koa. You can then make an API call to the server to fetch the React code, which can be injected into the HTML of your page using the renderToString method provided by the ReactDOMServer package.


Here is an example of how you might implement SSR in your React application using Express and the ReactDOMServer package:

```js
// Import the required packages
const express = require("express");
const React = require("react");
const ReactDOMServer = require("react-dom/server");

// Create an Express server
const app = express();

// Define a route for handling API requests
app.get("/api/page", (req, res) => {
  // Fetch the React code for the page
  const reactCode = ReactDOMServer.renderToString(
    <MyReactComponent />
  );

  // Return the React code as the response
  res.send({ reactCode });
});

// Start the server
app.listen(3000, () => {
  console.log("Server listening on port 3000");
});
```

You can then use the React code returned by the API call to inject it into the HTML of your page on the client side:

```js
// Make an API call to the server to fetch the React code
fetch("/api/page")
  .then(response => response.json())
  .then(data => {
    // Inject the React code into the page
    const container = document.getElementById("react-container");
    container.innerHTML = data.reactCode;
  });
```

## Concerns of SSR to be taken care

One concern is that, because the React code is being executed on the server, it may be possible for an attacker to inject malicious code into the React application. To prevent this, it is important to properly validate and sanitize any user-generated input that is used in your React code. This will help to ensure that only safe and trusted code is executed on the server.

Another concern is that SSR can potentially expose sensitive data or application logic to an attacker. This is because the server-side code, including any API keys or other sensitive information, is sent to the client as part of the response. To prevent this, you should carefully control access to your server-side code and only expose the minimum necessary information to the client.

Overall, while SSR can be a useful and effective way to improve the performance and SEO of your React application, it is important to carefully consider the potential security implications and take appropriate precautions to ensure that your application is safe and secure.
How to work remotely without overseas experience
Tags: beginners, javascript, remote, university
Published: 2022-12-13 02:48:37

Hi
I was born in Korea and lived in Korea all the time
I even graduated from a University in Korea, not a major in CS

Realistically, what choice can I make in Korea for a more paid remote job in the United States, Australia, England, etc.?

<!--As for the current situation, 
I studied at Java academy and got a job.
But now I want to switch to the front end.-->




1. After transferring CS from Korea, prepare for master's degree in the United States

2.After studying English and front-end in Korea, I continue to write a remote resume

3.In Australia, I receive a working holiday visa to study English and get a job at the front-end developer at the same time.



My purpose is higher salary and less working hours than in Korea.
Please give me some advice. 
There's no one around me who has the same goal as me.
Git commands cheatsheets
Tags: git
Published: 2023-06-14 14:26:10

---
title: Git commands cheatsheets
published: true
date: 2022-12-13 02:42:32 UTC
tags: git
canonical_url: https://thehigglers.com/blogs/git-command-cheatsheets/
---

### Git Reset

Git reset is a command used to revert or undo your commit to a specific commit specified to the command.

###### Command

```
Option 1: git reset {commit hash}

(Note: This command is defaulted to --soft)

Option 2: git reset --hard {commit hash}

Option 3: git reset --soft {commit hash}

```

### Git Revert

Git revert basically created a new commit with the changes you want to undo, this helps in maintaining the git histroy.

###### Command

```
Option 1: git revert {commit hash}

```

### Git Squash

Git Squash is a terminology and not a command, basically when we want to combined “N” number of continous commits into a single commit we can use squash commits using git rebase.

To know more on [git rebase](#git-rebase)

###### Command

```
Option 1: git revert {commit hash}

```

### Git Rebase

###### Command

```
Option 1: git rebase {commit hash}

Option 2: git rebase -i {commit hash}

```

### How to create a branch from a pull request or a merge request

#### Overview

You may have came to a situation where in you want to get the code/changes in a particular PR to local environment, but as PR or a MR is not a branch on your repository how can you pull a PR or MR, the below command can be used to pull the code from a PR and create a new branch in your local env.

#### Command

```
git fetch origin pull/$ID/head:$BRANCHNAME

For example: git fetch origin pull/2/head:MASTER

Note: Here ID is the PR number for github users and MR number for gitlab users.

git checkout $BRANCHNAME

```
Transcribing Audio in Python
Published: 2022-12-13 02:36:28

### Dependencies

 - build-essential
 - portaudio19-dev
 - pyaudio

 1. ``sudo apt-get install build-essential``
 1. ``sudo apt install portaudio19-dev``
 1. ``pip install pyaudio``

<br />

### Example

```python

import speech_recognition as sr

r = sr.Recognizer()

while True:
    # Initialize the microphone
    with sr.Microphone() as source:
        print("Speak!!: ")
        audio = r.listen(source)

    try:
        # do the transcription
        transcription = r.recognize_google(audio, language='en-US')
        print(transcription)

    except sr.UnknownValueError:
        print("Didn't understand the audio")

    except sr.RequestError:
        print("request error")

```

<br />

[![Texto alternativo da imagem](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ds4alkts3uxq0dsco0nv.png))](https://www.linkedin.com/in/israel-lopes-419a32189)
How to Dockerize Django Project in 2 minutes
Tags: django, python, docker, devops
Published: 2022-12-13 02:29:16

To run a Django project in Docker, you will need to have Docker installed on your system. You can then create a Dockerfile for your Django project that specifies the necessary dependencies and commands for running the project.

Here is an example of a **Dockerfile **for a Django project:


```
# specify the base image
FROM python:3.7

# set the working directory
WORKDIR /app

# copy the requirements file
COPY requirements.txt /app/

# install dependencies
RUN pip install -r requirements.txt

# copy the rest of the project files
COPY . /app/

# expose the port that the Django application will run on
EXPOSE 8000

# run the Django application
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]

```

Once you have created this Dockerfile, you can build your Docker image by running the following command:


```
docker build -t <image-name> .
```
This will create a Docker image with the specified name (<image-name>) using the instructions in the Dockerfile.

To run the Django project in a Docker container, you can then use the following command:

Copy code

```
docker run -p 8000:8000 <image-name>
```

This will run the Django application in a Docker container using the specified image and map the container's port 8000 to the host's port 8000, allowing you to access the application at 

```
http://localhost:8000
```

Thank you for reading my article! If you enjoyed it and would like to support my work, please consider buying me a coffee at **[Buy Me a Coffee](https://www.buymeacoffee.com/giasuddin)**. You can also learn more about me and my work by visiting my **[Giasuddin Bio ](https://bio.link/giasuddi)**and following me on LinkedIn and Twitter. Thank you for your support!
Visual Gherkin Manager - devlog#3
Tags: react, automation, qa, devlog
Published: 2022-12-13 01:54:50

In the last few weeks, I worked on the implementation of a simple test case/scenarios generation algorithm based on flow diagram containing test steps. The algorithm was integrated into the already-existent application and the result is shown below:

![Visual Gherkin Manager main delivered features](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ztd6v2n4wfvhri785i3n.png)

> **Remember how it works**: It is necessary to create a diagram with the test steps (test step is a diagram "component"), indicating the test connections (a test connection is a diagram "link") for each step. A flow/scenario/case is a sequence of test steps connected by links with the same label. Then the tool can generate Gherkin tests based on the created diagrams. **The ideia is to provide the Gherkin tests view and management in a visual approach based on diagrams**.

In the output implementation, was used the library [React Gherkin Editor](https://github.com/SmartBear/react-gherkin-editor), [as previously planned](https://dev.to/jovanibrasil/-visual-gherkin-manager-13l1). The editor was encapsulated in a React Component, to manage editor configurations and some states (editor text content, for example).

For the generation of scenarios it was necessary to think a little more, basically was implemented a recursive depth traversal algorithm that maps the possible paths in the flow and generates a set of test scenarios. It is very important to note that the paths are built according to the transitions, which are the scenario identifiers. All this logic was implemented inside of a service that is called when you click on generate tests.

![Visual Gherkin Manager with diagram paths](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vwv0osb7g1350f07ykng.png)

Today I started to work on the implementation of diagrams import, that personally I believe to be essential for the tool to be very helpful. For the next post, I will show the importing diagrams feature and present some backlog for the subsequent implementations.

---

You can visit the application [here](https://quality-flow-tool.netlify.app/) to evaluate. All feedback is welcome.
Easy user auth for Streamlit
Tags: streamlit
Published: 2022-12-12 23:05:55

Hey all 👋

We just launched a no-code tool built internally to speed up prototyping.

Our team has been using Streamlit to build MVPs for months. Before today, shipping a user-facing product like this required tons of hacks and weird misuse. It's a pain to add user auth to these products, and sometimes you really don't want to expose your MVP to the public web 👀

We built DashboardAuth so we didn't have to spend another second implementing and re-implementing user auth. DashboardAuth takes in a webapp URL (whether it's Retool or even a hosted Jupyter notebook) and provides a unique authentication link to provide to users. A few clicks and you get a user login flow, user admin dashboard, secure login URLs, and auth API endpoints for use in your app.

DashboardAuth is free and ready to be used today. Sign up at https://www.dashboardauth.com/

Hope this helps you ship faster!

Best,
Jared & Jon

(PS- I'll be using this myself to limit user usage on some GPT-3 apps I'm working on 🐾)
Why did we decided not to use a better internal search app to improve our user experience
Tags: ux
Published: 2022-12-13 00:39:46

Recently I’ve been working on an eCommerce site with lots of products. Most of the customers know what type of products we sell.

So, when we realized our inventory was around 8000 products, we decided to improve the search feature.

## **The Benefits of Internal Search for User Experience**

Usually, the criteria needed to invest in a better internal search engine is:

- Have enough sales to afford it (search is not cheap)
- Have knowledgable customers
- Have an extensive inventory


In exchange, you can expect better customer feedback and increased conversion rates.

Half of the e-commerce users immediately click the search bar, according to [Forrester.](https://www.forrester.com/report/MustHave+eCommerce+Features/-/E-RES89561). It is not hard to know why search users usually already know what they want to buy.

There are two leaders in the internal search space:

1. [Algolia](https://www.algolia.com/)
1. [Elasticsearch](https://www.elastic.co/)


We were looking at implementing the first one as it is currently the leader. I don’t know all the differences between the products, but what Algolia has that instantly caught my eye is the ability to customize search results, combining user and business goals.

It was a low-hanging way of improving the overall user experience. The user feels more confident, and user satisfaction is bound to increase.

## **The Drawbacks of Internal Search for User Experience**

I’ll be honest.

I was convinced this was the best way forward. That is until I looked at our Analytics.

We did a 14-day trial run.

Even if our inventory is quite extensive, 82% of visitors land on the same 20 products. Our store ranks those 20 products as the default search bar’s first option.

Other visitors land on our blog posts, static pages, etc.

A small percentage is looking for parts and accessories. This is the main target that would benefit from adding an internal search tool. However, looking closer at the analytics, it may not have been a good ROI.

## **Is it better to ignore UX?**

This is where the problem becomes interesting.

Algolia was a crutch. It was the solution to the problem without looking deeper.

It is important to remember that improving the user experience does not necessarily means purchasing a tool. We should not ignore UX because a tool may become unprofitable or not worth the investment.

Instead, we should be looking into other methods. Asking a few questions like:

- What do our users search for?
- How can we make those searches easier?


Search is a way to improve user experience, but it is not the only way to do it. Not only that, but in our case, it was the easy way out.

Adding a search widget allowed us to ignore our navigation and lack of signaling. Search should work with navigation, not instead of navigation.

Instead, the focus should be on improving user experience, from the website’s structure to the content, and improving signals, categorization, and design.
Webinar coming up!
Tags: webinar, productivity
Published: 2022-12-12 23:55:38

Hey devs!

I'm just passing by to invite you all to my very first webinar at [CTO.ai](https://cto.ai/), which I'll talk about **How a Composable Developer Platform Simplifies Ops for Devs**.

What's in the agenda:

✅ DevX
✅ What is a composable Developer Platform?
✅ Use cases for a Developer Control Plane
✅ Workflows and metrics for performance
✅ Infrastructure Architecture analysis
✅ Demo

It's scheduled for **next Thursday (Dec 15th) at 3 pm EST**.

Join me at this webinar! You can [subscribe here](https://cto-ai.zoom.us/webinar/register/WN_ig77SVgzT_ukiiWRi6AWIQ).

See you there! :)
How to download cpanm in the portable way that supports Perl 5.8.1
Tags: beginners, perl, cpan, cpanm
Published: 2022-12-12 23:36:00

How to download <a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a> in the portable way that supports Perl 5.8.1.

On Linux/UNIX, Mac, Windows/PowerShell

```
perl -0777 -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(  Proto => qq(tcp),  PeerAddr => qq(cpanmin.us),  PeerPort => 80,) or die $!;print $socket join qq(\r\n),  qq(GET / HTTP/1.1),  qq(Connection:close),  qq(Host:cpanmin.us),  qq(\r\n);my $res = <$socket>;$res =~ m(^HTTP/1\.1 200 OK\r\n) or die $res;$res =~ s/.*?\r\n\r\n//s;open my $out, qq(>), qq(cpanm) or die $!;print $out $res'
```

On Windows/Command Prompt:

```
perl -0777 -Mstrict -Mwarnings -MIO::Socket::INET -e "my $socket = IO::Socket::INET->new(  Proto => qq(tcp),  PeerAddr => qq(cpanmin.us),  PeerPort => 80,) or die $!;print $socket join qq(\r\n),  qq(GET / HTTP/1.1),  qq(Connection:close),  qq(Host:cpanmin.us),  qq(\r\n);my $res = <$socket>;$res =~ m(^HTTP/1\.1 200 OK\r\n) or die $res;$res =~ s/.*?\r\n\r\n//s;open my $out, qq(>), qq(cpanm) or die $!;print $out $res"
```

The answer is using <a href="https://perldoc.perl.org/IO::Socket::INET">IO::Socket::INET<a/>.

If Perl is 5.14+, Perl has a HTTP client called <a href="https://metacpan.org/pod/HTTP::Tiny">HTTP::Tiny</a>.

## Examples on Github Action

The example to donwload cpanm on Github Action.

https://github.com/yuki-kimoto/SPVM/blob/build/.github/workflows/linux-ubuntu-latest-32bit.yml

## Note for Beginners

<a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a> is a tool to download Perl modules from CPAN. CAPN have many module distributions that are uploaded by Perl users.

## Before Fixed(Old content)

On Linux/UNIX, Mac, Windows/PowerShell
```
perl -Mstrict -Mwarnings -MIO::Socket::INET -e 'my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;' | perl -p -0777 -e 'BEGIN { binmode STDOUT;binmode STDIN  } s/.*?\r\n\r\n//s' > cpanm

```

On Windows/Command Prompt:

```
perl -Mstrict -Mwarnings -MIO::Socket::INET -e "my $socket = IO::Socket::INET->new(PeerAddr => qq(cpanmin.us), PeerPort => 80, Proto=> qq(tcp));print $socket qq(GET / HTTP/1.0\r\nHost:cpanmin.us\r\n\r\n);binmode STDOUT;print <$socket>;" | perl -p -0777 -e "BEGIN { binmode STDOUT;binmode STDIN  } s/.*?\r\n\r\n//s" > cpanm

```
AZ-400: Identify work flow metrics
Published: 2022-12-12 23:26:12

[Cumulative flow, lead time, and cycle time guidance](https://learn.microsoft.com/en-us/azure/devops/report/dashboards/cumulative-flow-cycle-lead-time-guidance?view=azure-devops)

[Lead Time and Cycle Time Widgets](https://learn.microsoft.com/en-us/azure/devops/report/dashboards/cycle-time-and-lead-time?view=azure-devops)

**Cycle Times**

- Time it takes for developers to complete work items once they begin working on the items

**Time to Recovery**

- How long it takes to recover from a service interruption or failure

**Lead Time**

- For continuous flow: Time it takes from when a request is made to when it is closed
- For sprint process: Time from when work on a request begins to when it is completed (i.e. Active to Closed)

**Work in Progress**

- Amount of work or number of work items actively being worked
- There is a well-defined correlation between lead/cycle time and WIP

[**Velocity**](https://learn.microsoft.com/en-us/azure/devops/report/dashboards/velocity-guidance?view=azure-devops&tabs=in-context)
- Can indicate how much work a team can complete during a sprint
- Based on either count of work items or estimation of effort
- Is not a key performance indicator and should not be treated as one