teleren/devto huggingface dataset:
Challenges faced while installing Ubuntu
Published: 2022-11-15 17:04:25

Having no prior experience installing Ubuntu or any other distro of Linux, I watched YouTube videos to learn how to install Ubuntu. After watching many videos, I decided to dual boot with Windows 10. At the beginning, I tried installing using a 4GB pen drive, but once I made it bootable, I realized that wasn't going to work. This time I tried it from a 64 GB pen drive and it worked. Watching the same video, I repeated the process, but again, the BIOS settings got messed up. After watching several videos, I finally got the BIOS settings fixed. For some hours, I operated it in trial mode and decided to install it. My Windows got corrupted after I installed Ubuntu because it was a pirated version, which was a real tragedy because some important data was permanently deleted from my C drive. In addition, I had not given Ubuntu enough storage, so I uninstalled it and reinstalled it. It took me two days to complete this whole process, and it was a roller coaster ride. Although it was tough, I enjoyed it very much.

Things I would suggest while installing Ubuntu.

1. Make sure you're using at least 16 GB Pen drive

2. Provide enough storage depending upon your need while doing disk partition

3. Ensure that all your important data is moved off the drive where you're installing Ubuntu

4. When you get stuck, Google immediately rather than waiting for someone to help you

5. It is normal to encounter something you haven't seen before in certain situations, so don't panic. Take a few minutes off and try again.
Add Kodi on OpenATV
Tags: kodi, openatv
Published: 2022-12-04 19:51:29

Procedure tested on OpenATV 7.1, it should also work for versions 6.x and 7.0.
Connect with telnet to your OpenATV device from your PC using `root` as login:

`$ telnet <openatv_device_ip_address>`
`# opkg update`
`# opkg install kodi enigma2-plugin-extensions-kodi`
`# reboot`

After the reboot the Kodi launcher entry should be present in the Plugin list section and it can be launched from there.
For all the Designers out there
Tags: webdev, design, tutorial
Published: 2022-12-04 19:46:11

## This is the best design library:
Today while I was navigating through the beautiful web I found this book library for design books, and it's amazing. 
> Reading Design is an online archive of critical writing about design. The idea is to embrace the whole of design, from architecture and urbanism to product, fashion, graphics and beyond. The texts featured here date from the nineteenth century right up to the present moment but each one contains something which remains relevant, surprising or interesting to us today.

### Follow me for more 

[Reading Design website](https://www.readingdesign.org/)
Error types and error reporting in PHP
Tags: php, laravel, webdev, backend
Published: 2022-12-04 19:41:36

It is important to know about error types in PHP. By this knowledge it would be easier to find and solve errors. Basically we have 4 types of error in PHP and I will show you them with an example.

## 1. Notice
PHP is not sure about whether is it an error or not!

## 2. Warning
An error that is important and should be fixed but does not stop code execution.

```
include("external_file.php");

Warning: include(external_file.php): Failed to open stream: No such file or directory in /Users/hamid/Codes/error.php on line 4
```

## 3. Parse error
When the compiler is unable to parse your code correctly. For example when a `;` is missing.

```
if ($a == 1) {
    echo "something!"
}

Parse error: syntax error, unexpected token "}", expecting "," or ";" in /Users/hamid/Codes/error.php on line 12
```

## 4. Fatal error
When you have a critical error. **Your code execution will be halted**.

```
$c = 1 / 0;

Fatal error: Uncaught DivisionByZeroError: Division by zero in /Users/hamid/Codes/error.php:7
Stack trace:
#0 {main}
  thrown in /Users/hamid/Codes/error.php on line 7
```

## Error reporting in PHP
You can ask PHP to show specific types of errors like these:
```
// Turn off all error reporting
error_reporting(0);

// Report simple running errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);

// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings ...)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

// Report all PHP errors (see changelog)
error_reporting(E_ALL);

// Report all PHP errors
error_reporting(-1);

// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
```

Thank you for reading...
Progression: Enhancing a Slack Bot to Announce Sign-Ups
Tags: opensource, beginners, javascript, programming
Published: 2022-12-04 19:23:19


It's time to let readers know about my progress so far with my implementation to make the Telescope Slack Bot announce when a new user registers. 

I was in contact with [Josue](https://github.com/manekenpix) via Slack for guidance. 

## The Progress

### Sending Initial Test Message
After getting collaborator access to the Telescope bot, to make sure that the bot works, I sent a test message to the #telecope-bot channel using the Postman client. 

The result:
![test message 1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1wkmce4r1bvcg6qqw6h.png)

At this point, I was sure I could move on to the next step and try sending a message to my account from the Telescope front end.

### Sending Test Messages to my Account (front-end)

The initial Javascript function `publishSignupMessage` I wrote gets invoked each time a user successfully goes through the sign-up process in the development environment. 

The result:


![test message 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hl1bs38kdixledf43hlk.png)

### Sending Test Messages to my Account (back-end)
I revised my code to use [Slack Bolt](https://slack.dev/bolt-js/tutorial/getting-started) client, which I added to the  `sso` service directory structure. Also, `publishSignupMessage` is invoked from one of the `middleware` functions. Now, I can receive sign-up notifications whenever I create a test account.

## The Problem
I am having a problem where even though I have all the environment variables in the right `env` files, and I still get the following error:

```node
throw new Error(`Missing SLACK_BOT_TOKEN env variable`);
          ^
Error: Missing SLACK_BOT_TOKEN env variable
    at createSlackApp (/app/src/slack-bolt-client.js:9:11)
    at publishSignUpMessage (/app/src/slack-bolt-client.js:61:15)
    at /app/src/middleware.js:154:11
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
```

I wonder if it has something to do with Docker since the project runs on it. If so, I need to research it as I have no prior experience with Docker.
How to Boost Your Productivity as a Developer
Tags: productivity
Published: 2022-12-04 19:20:44

---
title: How to Boost Your Productivity as a Developer
published: true
description: In this article, I'll share some simple tips and tricks to help you boost your productivity and get more done in less time
tags: productivity
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

Are you struggling to stay focused and productive as a developer? You're not alone. In today's fast-paced world, it can be difficult to stay on top of your work and achieve your goals. But fear not! In this article, I'll share some simple tips and tricks to help you boost your productivity and get more done in less time.

1. Create a to-do list. It sounds simple, but having a clear and concise to-do list can make a big difference in your productivity. Start each day by writing down the tasks you need to complete, and prioritize them based on importance and deadline. This will help you stay focused and avoid getting overwhelmed by a long list of tasks.

2. Set aside dedicated time for focused work. It's easy to get distracted by emails, social media, or other interruptions when you're working. To avoid these distractions, set aside dedicated time for focused work. This could be in the form of a daily time block, where you turn off all distractions and focus on your most important tasks.

3. Take regular breaks. It may seem counterintuitive, but taking regular breaks can actually help boost your productivity. When you work for long periods of time without a break, your brain becomes fatigued and you lose focus. By taking regular breaks, you give your brain a chance to recharge and come back to your work with renewed energy and focus.

4. Use productivity tools and apps. There are many productivity tools and apps available that can help you stay organized and on track. Some popular tools include Trello for project management, Evernote for note-taking, and Todoist for task management. Experiment with different tools to find the ones that work best for you.

5. Surround yourself with a supportive community. As a developer, it can be easy to feel isolated and alone. But having a supportive community of like-minded individuals can make a big difference in your productivity. Consider joining a local developer meetup group, or participating in online forums and communities where you can share ideas and learn from others.

By following these tips, you can boost your productivity as a developer and achieve your goals more efficiently. Give them a try and see how they can help you stay focused and productive in your work.

What are your favorite productivity tips for developers?
Getting into Digital Humanities II
Tags: digitalhumanities, a11y, datascience, python
Published: 2022-12-04 19:07:13

This article will focus solely on my **Eye Tracking** course I mentioned in the previous articles.

## Eye Tracking
As announced I wanted to research participants looking at a variety of websites to **watch them carefully for accessibility**.

### Working with the stationary eye tracker
The participant sits down on a chair in front of a screen where the stationary eye tracker is installed. The camera in front of the participant scans both eyes. The eyes have to follow a black dot on a white screen in order to adjust the eye tracker. 

When everything was set up, 10 different websites were randomized shown in the experiment, the display duration was limited to 20 seconds, which means about 60-80 fixations in total.

### Questionnaire
Afterwards there was a questionnaire to answer. That means the
websites were all printed out in A4 and numbered in a separate room, so that after the test the participants could look over them again and answer a few questions.

First came general questions, like if the participant knows **what web accessibility is**, how they would describe web accessibility with keywords, followed by specific questions about each site as well as that they should rank the sites, after the 3 most accessible websites.

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

The image shows the **eye tracker**, as well as the **data software** on the screen. A website is currently under evaluation, showing a heat map.

A **heat map** means that it shows where participants were looking at the website within the 20 seconds. Green areas are areas where participants did not look that long, yellow areas show a more longer fixation and red ones were the ones, participants were looking the longest.

At the moment I am in the **evaluation phase**, I will create a graph with Python (still have to decide which framework to use for this) to display the results in a nice clear and well structured way.

I am very excited about the final result, which I have to present to the group in the last lesson.
Camp Cleanup
Tags: adventofcode, algorithms, javascript, programming
Published: 2022-12-04 18:42:28

## [Advent of Code 2022 Day 4](https://adventofcode.com/2022/day/4)

## Part 1
1. Extracting the numbers with `regex`
2. Comparing A to B and B to A
3. My algorithm in JavaScript

### Extracting the numbers with `regex`
From this string:
```
2-4,6-8
```

...I want the numbers.

Thankfully, that's a simple regular expression:
```
/\d+/g
```

That will match each contiguous set of digits.

### Comparing A to B and B to A
Sticking with the first example:
```
2-4,6-8
```

I want to check both of these:
```
Is 6-8 fully contained in 2-4?
Or
Is 2-4 fully contained in 6-8?
```

As long as one is true, I found a valid pair!

Replacing digits with locations:
```
a b c d
```

I want to check both of these:
```
Is a <= c and b >= d?
Or
Is c <= a and d >= b?
```

Again, as long as one is true, I found a valid pair!

### My algorithm in JavaScript
```js
return input
  .split('\n')
  .reduce((valids, pair) => {
    let [a,b,c,d] = [...pair.matchAll(/\d+/g)]
                       .map(el => +el[0])
    let flag = (a <= c && b >= d) || (c <= a && d >= b)
    return valids += flag ? 1 : 0
  }, 0)
```

## Part 2
1. Twist: Venn diagram
2. Using `Set`s instead of messy conditions

### Twist: Venn diagram
Instead of a fully-enclosed pair, I now need to identify any pair that share at least one digit among their ranges.

### Using `Set`s instead of messy conditions
For this example pair and diagram:
```
.2345678.  2-8
..34567..  3-7
```

I could use this logic:
```js
let pair1 = [2,3,4,5,6,7,8]
pair1.length // 7

let pair2 = [3,4,5,6,7]
pair2.length // 5

let mergedUniques = [2,3,4,5,6,7,8]
mergedUniques.size = // 7

if (mergedUniques.size < pair1.length + pair2.length) {
  // Valid pair!
} else {
  // No overlap!
}
```

### My algorithm in JavaScript
```js
return input
  .split('\n')
  .reduce((valids, pair) => {
    let [a,b,c,d] = [...pair.matchAll(/\d+/g)]
                       .map(el => +el[0])
    let pair1 = new Array(b - a + 1)
      .fill(null)
      .map((_,i) => i + a)
    let pair2 = new Array(d - c + 1)
      .fill(null)
      .map((_,i) => i + c)
    let merged = new Set(pair1.concat(pair2))
    let flag = merged.size < pair1.length + pair2.length
    return valids += flag ? 1 : 0
  }, 0)
```

## I did it!!
- I solved both parts!
- I used conditions, `Set`s, `regex` and `reduce()`!
- I reused my algorithm for generating an array of numbers from a min and max!

For a Sunday puzzle, this one felt relatively easy.

I anticipate one of a variety of puzzle themes coming up, like: changing grid, shortest path, circular games?

Just. Please. No. Assembly. Code.
Progress on contribution
Tags: opensource, webdev, design, beginners
Published: 2022-12-04 18:42:14

Hi,

### Progress on logo

This week I've made some progress regarding the tasks, that I've been assigned to.

First of all, I created a logo for the new project, it looks like that:

![logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nuqtorg4srzjagkwlat2.png)

I created it with the help of Adobe photoshop. Here I needed to come up with the main colors for the logo. I went for blue color, which is usually represents calmness and trust.

### Psychology of colors

Choosing the right color, and learning how to combine it correctly with another, is a hurdle that many designers struggle with, especially when starting out.

#### Why is that so?

**As every color has a meaning**. Colors help us to feel our emotions, they enable us to make quick associations, they dictate our reaction to things. Knowing how this works is a
powerful tool to have in your toolkit when taking on the world of branding and design.

**My favourite quote about colors:**

> Colors are power and designers are the artists that blend them to perfection. They create a story without words and build a connection in one glance.


### Waiting for approval

After creating a logo, I'm waiting for approval from project maintainers. Once they approve I will go and create different sizes of the logo.

### Improving UI

For [another project](https://thenovel.netlify.app/), I have been enhancing the UI and made minor accessibility modifications.

### Remove useless action

For the following project, if user wants to create a post but he is not logged in, he will see an alert saying "You need to log in to create a post". 

I think this is not necessary, as most of the applications just redirect you to log in page without alert. Though, UX could be improved by saying you need to log in first in the sign in form.

### Improve UI with CSS

Also, I have [improved the UI](https://github.com/thevahidal/novel/pull/38) by including CSS animations, hover effects, and overall content readability.

For example:

![Buttons](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cy3zef9bfy8idqeepqr9.png)

Putting sign in form in the center is a great approach, I think:

![Log in form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a1c7v2uvgvsbtilkiznx.png)

There are so many things that could be improved on the website in terms of design. I would work on it next week.

Have a wonderful and productive week !
Tech Career Path Choices
Tags: career, beginners, tutorial, growth
Published: 2022-12-04 18:41:55

If you are considering a career in the field of information technology (IT), you have a wide range of options available to you. From developing software and hardware to managing networks and databases, IT professionals are in high demand in virtually every industry.

## Software Developer
One popular career path in the IT field is software development. This involves designing, coding, and testing software programs that can be used in a variety of settings, including business, healthcare, and entertainment. To become a software developer, you will need to have a strong understanding of computer programming languages, as well as an ability to solve complex problems.

## Network Admin
Another common career path in IT is network administration. This involves managing and maintaining the networks that connect computers and other devices within an organization. Network administrators are responsible for ensuring that systems are secure, reliable, and efficient. To become a network administrator, you will need to have a deep understanding of networking technologies and protocols, as well as the ability to troubleshoot problems and make recommendations for improvements.

## Database Admin
Another option in the IT field is database administration. This involves managing and maintaining the databases that store and organize the vast amounts of data that organizations rely on. Database administrators are responsible for ensuring that data is accurately entered, stored, and accessed in a timely manner. To become a database administrator, you will need to have a strong understanding of database management systems, as well as the ability to analyze and manipulate data.

## IT Manager
In addition to these more specialized IT careers, there are also many opportunities for IT professionals to work in management and leadership roles. IT managers are responsible for overseeing the technology systems and teams within an organization, and they must have a strong understanding of both business and technology. IT leaders, on the other hand, are responsible for setting the strategic direction for an organization's technology efforts, and they must have a deep understanding of the industry and the latest technologies.

Regardless of the specific career path you choose in the field of IT, you will need to have strong analytical and problem-solving skills, as well as a passion for technology. With the right training and experience, you can build a successful and rewarding career in this exciting and dynamic field.

https://www.linkedin.com/in/trinmar/
Important Git Commands which every developer needs in his day to day life
Tags: webdev, git, devops, javascript
Published: 2022-12-04 18:40:28


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

Hi everyone this are the git commands which I use frequently as a developer in my day to day life.so I thought to share this with all of you.please do comment your frequently use git commands in comment section 

## stash

The git stash command is a utility that allows a developer to temporarily save modified files. However, it is a utility that should only be used occasionally because it only involves local repository history. Code stored in a local stash is not visible to other developers, nor is it replicated to other git repositories like GitHub or GitLab when a push occurs.

```bash
git stash push
```

- 
Creates a new stash and rolls back the state of all modified files

```bash
git stash apply
```

- Takes the files in a stash and places them back into the development workspace, but does not delete the stash from history

```bash
git stash pop
```

- Takes the files in a stash, places them back into the development workspace and deletes the stash from history

## Creating a new branch from existing branch
```bash
git checkout -b new-branch-name
```

## Renaming a branch

1.For renaming a branch you have to checkout to that branch you have to rename

```bash
git branch -m new-branch-name
```
2.Delete the old `branch name` by running 

```bash
git push origin --delete old-branch-name
```
3.Reset the upstream branch to the name of your new local branch by running
 
```bash
git push origin -u new-branch-name.
```
## Deleting a branch
For deleting a branch you have to checkout to another branch because git will not let you delete the branch you are currently working on

- deleting branch **locally**

```bash
git branch -d <branch-name>
```

- deleting a branch **Remotely**

```bash
git push origin --delete <branch-name>
```

## Undo Local Staged Changes in Git

```bash
git restore --staged filename
```

## Removing the Last Commit

To remove the last commit from git, you can simply run

```bash
 git reset --hard HEAD^ 
```

If you are removing multiple commits from the top, you can run 

```bash
git reset --hard HEAD~2
```
to remove the last two commits. You can increase the number to remove even more commits.

## Removing a specific commit

To undo that specific commit, you have to use the commit hash of that specific commit

```bash
git revert cc3bbf7 --no-edit
```

The command above will undo the changes by creating a new commit and reverting that file to its previous state, as if it never changed.

Lastly, use git push to push the change to the remote branch.

## Renaming a commit

To change the message of the most recent commit that has not been pushed to the remote repository, commit it again using the --amend flag.

```bash
git commit --amend -m"new commit messsage"
```
Thank you for reading this article