teleren/devto huggingface dataset:
My top 7 reasons to be a software engineer in 2021 and onwards
Tags: softwareengineer, se, javascript, frontend
Published: 2021-01-17 03:09:27

---
title: My top 7 reasons to be a software engineer in 2021 and onwards
published: true
description: There are many reasons why one would want to be a software engineer. What is your top reason to be one?
tags: softwareengineer, se, javascript, frontend
cover_image: https://rezwanlink.files.wordpress.com/2016/08/untitled-1.jpg
---

### My top 7 reasons to be a software engineer
Everyone has their own personal reason to be a software engineer. I enjoy creating something that will be seen and used by thousands of people while doing it in any part of the world.

My top 7 reasons I specified in the video below.
1. Money and Benefits
2. Work from home/flexibility
3. Culture
4. Impact (engineers can turn nothing into something special)
5. Fun and rewarding
6. Forgiving
7. Get Rich

What is your main reason to be a software engineer?

{% youtube 4f9lJI3bzs0 %}
Hover over text and see a difference
Published: 2021-01-17 02:37:11

Sometimes you want your button or element or div to change after someone hovers over it with a mouse or anything else. Here is one example of the right of the syntax you can wright in css

By adding the :hover on CSS id, class, or any other identity after the person hovers on it would change based on the new standards given to it. 
.id_1:hover {
background-color: blue;
}
Make Tab Switcher faster on KDE Plasma
Tags: linux, tutorial
Published: 2021-01-17 02:33:46

## Summary

- I noticed KDE Plasma does not show the tab switcher when I quickly want to switch the active window with `Alt + Tab`.

- Since KDE Plasma seems to have a bug(?) with Tab Switcher (It randomly does not activate the last window somehow), I got to want to amend the situation so that my KDE Plasma does not switch the active window properly but let me see which window is going to be activated when releasing `Alt` at least.

## Steps

Amend the value of `DelayTime` to `0` in the file `~/.config/kwinrc`:

```
~/.config/kwinrc
==========
[TabBox]
DelayTime=0
```

Reload KWin:

```
qdbus org.kde.KWin /KWin reconfigure
```

## References

- [How to remove the delay of task switcher (alt-tab)?](https://www.reddit.com/r/kde/comments/fm8exz/how_to_remove_the_delay_of_task_switcher_alttab/)

- [KDE Plasma5 Fixes](https://zren.github.io/kde/#show-alt-tab-popup-as-fast-as-possible)

  + This website is useful to amend other situations for your KDE Plasma.

- [kwin/kwin.kcfg](https://github.com/KDE/kwin/blob/master/kwin.kcfg#L262)
git-hook.d
Tags: git
Published: 2021-01-17 02:15:04

This is my git-hook.d script. I will explain how to use it and run through what it does line by line.

``` bash
#!/usr/bin/env bash

# Runs all executable hookname-* hooks and exits after,
# if any of them was not successful.
#
# Based on
# http://osdir.com/ml/git/2009-01/msg00308.html

pids=()
hookname=$(basename $0)

if [ $DEBUG ]; then printf "$hookname\n"; fi

# Run each hook, passing through STDIN.
# We don't want to bail at the first failure, as the user might
# then bypass the hooks without knowing about additional issues.

for hook in $PWD/.git/hooks/$hookname.d/*; do
  if [ $DEBUG ]; then printf "$hook\n"; fi
  test -x "$hook" || continue
  echo $hook
  $hook "$@" &
  pids+=($!)
done

for pid in "${pids[@]}"; do
  wait $pid || exit $?
done

wait
```
### Installation:

- copy the above, paste it in a file somewhere, make the file executable.
- run: `file_path=/PATH/TO/FILE`
- run: `pushd .git/hooks; for f in *.sample; do ruby -e "base='$f'.sub('.sample', ''); puts %(mkdir #{base}.d && ln -s $file_path #{base})"; done | bash; popd`

Now you can create hooks in individual files in any language. NOTE, this runs things in parallel. You may not want to use this with hooks for generating things, like prepare-commit-msg.

### Explaination

- `pids=()` create an empty array of pids to keep track of subprocesses.
- `hookname=$(basename $0)` set the name of the hook to the name of the file. In the installation I symlink the original executable, but $0 will be the path of the symlink so that is how we can differentiate between commit-msg.d and update.d.
- `for hook in $PWD/.git/hooks/$hookname.d/*; do` Loop through every file under the appropriate hook directory.
- `test -x "$hook" || continue` ignore files that aren't executable.
- `$hook "$@" &` run the executable and forward the arguments passed to this handler. NOTE: hooks are run in parallel.
- `pids+=($!)` add the pid to the list of pids.
- `for pid in "${pids[@]}"; do wait $pid || exit $?` Wait for each subprocess to finish and bubble up any bad exit codes to git.
- `wait` be extra sure that there are no hanging subprocesses.
Day 23 of 100DaysOfCode: Simple Code On Python Generator
Tags: 100daysofcode, codenewbie, beginners, python
Published: 2021-01-16 13:20:19

Today is my 23 day of #100DaysOfCode and #python. Like yesterday today I also revised python for everybody from coursera and learned more about basic of python.

I had tried to write some code in mathematical problem regarding to python. Today I have start to learn about python generator. Try to write some simple code on python generator. I found python generator are similar to python function but there are some dissimilarity of them.

# Simple Code On Python Generator
 Simply speaking a generator is a function that return an object(iterator) which we can iterate over one value at a time. It is fairly simple to create a generator in python .It is as easy as defining a normal functions, but with a yield statement instead of return statement .
```python
def my_gen():
    n = 1
    print('This is printed first')
    yield n
   
    
    n += 1
    print('This is printed second')
    yield n

    n += 1
    print('This is printed at last')
    yield n
    
for item in my_gen():
    print(item)
```

If a function contains at least one yield statement (it may contain other yield or return statements) it become a generator function. Both yield and return will return some value from a function. 

The difference is that while a return statement terminates a function entirely, yield statement pauses the function saving all its states and later continues from there on successive call.

```python
def rev_str(my_str):
    length = len(my_str)
    for i in range(length - 1, -1, -1):
        yield my_str[i]
for char in rev_str("hello"):
    print(char)
```
Once the function yields, the function is paused and the control is transferred to the caller. Local variable and their states are remembered between successive calls. Finally , when the function terminates, stopIteration is raised automatically on further calls.

```python
a = my_gen()
next(a) ,next(a), next(a)
```
When this code is run it gives following output.

```python
This is printed second
This is printed at last
---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
<ipython-input-57-b3ab980ac96b> in <module>
----> 1 next(a) ,next(a), next(a)

StopIteration: 
```

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 23 of <a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> and <a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <br>* Revised Python Basic<br>* Did some code in mathematical problem regarding to python<br>* Learned about python Generator<br>* Some simple code in python Generator <a href="https://t.co/1UsiOFdsWG">pic.twitter.com/1UsiOFdsWG</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1350426828066832386?ref_src=twsrc%5Etfw">January 16, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
How to merge PDF files using the PyPDF2 module in python
Tags: python, beginners
Published: 2021-01-17 01:07:56

Have you ever had multiple PDF files that you need to merge into one single document? It is easier than you might think to merge or combine two or more PDF's into one single file in python using the PyPDF2 module.

PyPDF2 is a python library used to work with PDF files. You can use it to extract document information, split document page by page, merge multiple pages, encrypt and decrypt, etc. In this tutorial, you will learn how to merge multiple files using this module.  

## A program to merge multiple PDF files

**You first need to install the package using pip**:
`pip install PyPDF2` 

Open any editor of your choice and create a new file "pdfMerger.py". Make sure the PDF files to be appended are in the same directory as the python file.

The following block of code allows you to merge two or more PDF files:

```
import PyPDF2 

mergeFile = PyPDF2.PdfFileMerger()

mergeFile.append(PyPDF2.PdfFileReader('file1.pdf', 'rb'))

mergeFile.append(PyPDF2.PdfFileReader('file2.pdf', 'rb'))

mergeFile.write("NewMergedFile.pdf")

```

Line 1: Import the PdfFileReader class and PdfFileWriter class from the PyPDF2 module. 

Line 2: Created an object of the *PdfFileMerger* class and assign it to *mergeFile*

Line 3 and 4: Used the append method to concatenate all pages onto the end of the file

Line 5: Writes all data that has been merged to *NewMergedFile*

The code block above looks very simple but what if you would like to merge more than two files? You would have to repeat line 3 for each file you want to add and this will make your program very long. You can use a for loop in this situation. 
The following block of code is another way to merge mutliple PDF files
```
import PyPDF2 

def merge_pdfs(_pdfs):

    mergeFile = PyPDF2.PdfFileMerger()

    for _pdf in _pdfs:

        mergeFile.append(PyPDF2.PdfFileReader(_pdf, 'rb'))

    mergeFile.write("New_Merged_File.pdf")

if __name__ == '__main__':

    _pdfs = ['file1.pdf', 'file2.pdf', 'file3.pdf']
    
    merge_pdfs(_pdfs)

```
Line 2: Define a function *merge_pdfs* which takes a list *_pdfs* as a parameter. 

Line 4: A for loop to loop through the list *_pdfs* and concatenate the pages.

Line 7: Check if the python file is the main module or it's been imported.

Line 8: Specify the list of files

Line 9: Call the function


I hope you enjoyed this short and simple tutorial! 😎
Options ของโปรแกรม ag ที่น่าสนใจ
Tags: programming, ag
Published: 2021-01-17 00:47:42

ag เป็นโปรแกรมค้นหาแบบเดียวกันกับ grep ซึ่งเคลมว่าเร็วกว่า grep แต่ตอนนี้ก็มีโปรแกรมแนวนี้ออกมาบอกว่าเร็วกว่า ag หมายตัวเหมือนกัน อย่างไรก็ตามผมติดใช้งาน ag ไปแล้ว และความเร็วก็ไม่ได้ต่างกันมากเท่าไหร่ เลยใช้งาน ag เป็นหลัก เพราะมันใช้ง่ายดี คือมันทำ recursive ลงในแต่ละ directory ย่อยๆให้เอง

วันนี้จะมาสรุป options ที่ใช้บ่อยๆของ ag เอาไว้หน่อย

## กำหนดว่าจะค้นแบบ case sensitive หรือ insensitive
`-s` ถ้าต้องการ case sensitive
`-i` ถ้าต้องการ case insensitive รู้สึกว่าถ้าไม่ใส่ option อะไร จะได้ตัวนี้เป็น default

## invert match ค้นหาบรรทัดที่ไม่มี pattern ที่ระบุแทน
ปกติเราใส่ pattern ก็เพื่อค้นหาสิ่งที่ match ตามที่ระบุ แต่ถ้าต้องการค้นบรรทัดที่ไม่ match ให้เราใช้ option `-v`

## ดู state ของการค้นหา
`-stats` จะบอกให้ ag พิมพ์ข้อมูลสรุปการค้นหาให้ด้วย ส่วน `-stats-only` คือให้แสดงแค่ stat บรรทัดที่ค้นเจอไม่ต้องแสดง ส่วนหน้าตา stat เป็นแบบนี้

```
6075 matches
927 files contained matches
6072 files searched
65739518 bytes searched
0.076201 seconds
```

## ให้แสดงผล บรรทัดรอบๆของบรรทัดที่ค้นเจอ
บางทีเราก็อยากให้ว่าบรรทัดก่อนหน้าและหลัง ของบรรทัดที่ค้นเจอนั้นมันเป็นยังไงบ้าง เราสามารถใช้ 3 options นี้ช่วยได้

- `-A [LINES]` บอกให้แสดงผลบรรทัดหลังบรรทัดที่เจอ ใส่จำนวนบรรทัดที่ต้องการหลัง -A ได้เลย ถ้าไม่ใส่ default คือ 2
- `-B [LINES]` บอกให้แสดงผลบรรทัดก่อนหน้าบรรทัดที่เจอ ใส่จำนวนบรรทัดที่ต้องการหลัง -B ได้เลย ถ้าไม่ใส่ default คือ 2
- `-C [LINES]` บอกให้แสดงผลทั้งบรรทัดก่อนหน้าและหลังบรรทัดที่เจอ  ใส่จำนวนบรรทัดที่ต้องการหลัง -C ได้เลย ถ้าไม่ใส่ default คือ 2

## ระบุ pattern ของไฟล์ที่ต้องการค้นด้วย
ปกติ ag มันก็จะค้นทุกไฟล์ แต่ถ้าเราอยากให้ค้นเฉพาะไฟล์ที่ต้องการ ก็ให้ใส่ option `-G PATTERN` เพื่อใส่ pattern ของไฟล์ที่ต้องการให้มันค้นได้ ถ้าชื่อไฟล์ไม่ตรงตามนี้ก็ข้ามไป

ส่วน option อื่นๆที่ไม่ค่อยได้ใช้บ่อยๆ แต่อยากรู้ว่ามีอะไรบ้างให้สั่ง `man ag` เพื่อดูคู่มือเต็มๆได้เลย


<a href="https://www.buymeacoffee.com/weerasak" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Year of the Linux Desktop 2021
Tags: linux
Published: 2021-01-17 00:37:24

This year is the year of the Linux desktop... again.

Linux is not a complete operating system like Windows, Mac or BSD Unix. They take the different free software packages and put them together with the Linux kernel, this is called a Linux distribution.

Picking a [Linux distribution](https://en.wikipedia.org/wiki/List_of_Linux_distributions) is hard. Besides many choices, you have to pick the right one for your needs. Do you need high performance or security? 

There are so many different Linux distributions.

![mind blown](https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmemegenerator.net%2Fimg%2Finstances%2F62821409%2Fmind-blown.jpg&f=1&nofb=1)

For getting work done, people usual use Ubuntu, OpenSuse or Fedora. Their packages are quite up to date and they are stable. But that doesn't mean they're [secure](https://bsdnerds.org/zero-days-hitting-fedora-and-ubuntu/) by default. 

Ubuntu uses snap and apt packages at the same time, I don't like that. OpenSuse doesn't use the deb package management system but zypper and rpm. So you would go

```bash
sudo zypper install package
```

Instead of the Debian way

```bash
sudo apt install package
```

I don't trust Fedora, because Red Hat pulled the plug out of CentOS. Who's to say they don't do the same with Fedora?

## Distros and forks

There are only a handful core distributions. Most Linux distributions are fork of distributions. There are [many](https://futurist.se/gldt/wp-content/uploads/12.02/gldt1202.png) of them.

As the Debian folks would call it *a frankenlinux*. Some of them are gone overnight or don't have long term support. That's why it wise to pick one that has long support.

Debian, Slackware and RedHat have been around since 1993. RedHat is orientated to servers.

![linux distros](https://dev-to-uploads.s3.amazonaws.com/i/525kmgm94svxroqkofkp.jpeg)

## Personal use

Switching operating systems. I like to use [Debian](https://www.debian.org/) based systems, because it has a really large user base. So if you run into a problem, you can quickly find a solution.

I don't have time for Gentoo, Arch etc.. work to do. It should just work. One issue I have with Debian is that the packages are outdated, but I found you can install [Kali Linux](https://www.kali.org/) on the desktop (Debian + rolling release + some security tools). Perfect for my use case.

## Development on Linux

You can do most of your programming on Linux, depends on what field you are working on. You can use C, C++, Python, Go all the web dev stuff like [vue](http://vuejsexamples.net/) and a lot more.

In fact most of the times it's one single command to install it, while on Windows or Mac you have to struggle a bit. Something like Go is a one line [install](https://golangr.com/install/). Linux really is the programmers OS. 

As IDE you can use any of the JetBrains stuff, Sublime (if you must), Visual Studio Code or vim (perfection).

![vim](https://dev-to-uploads.s3.amazonaws.com/i/537axwjuxk76n9aq5h1m.jpeg)
Reusable Components: Overriding Styles!
Published: 2021-01-17 00:22:56

When we create reusable components they often have a default layout. The layout can use custom element names, classes or other types of specificity. Lets assume a class rule is used.

```css
.gap{
  display: grid;
  grid-template-columns: 
   repeat(
    auto-fit, 
    minmax(11em, 1fr));
}
```
The problem is that when we reuse this custom control in a different container, e.g. an Expander panel, we find the '.gap' class doesn't work well. 

The good news is that we can inject the 'class' to use like this.

```html
<CustomComponent 
  className='ovr' 
  width='10vw'>
</CustomComponent>
```
We enabled this by creating an @Input property.

```typescript
 @Input('className') 
   className = "gap";
```
Notice the default value is the class we want to use by default 'gap'. 

However, as shown in our custom component above, we are overriding the default value to this...  

```css
.ovr {
  display: grid;
  grid-template-columns: 
    repeat(auto-fit, 
      minmax(20em, 1fr));
}
```
Here's the markup in the custom control html to accept a 'className' to inject at run time.

```html
<div [class]='className'>
```
We are binding the class attribute saying, use the value of the variable 'className'. 

The native view of the custom control looks like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mw8fl95qsaqxpjra0n6p.jpg)

The reused view inside some other 'less wide' container looks like this. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jpf460lpp6gh89wzcgxb.jpg)

Notice the small difference in gaps.

JWP2021 Styling Reusable Components
All about Crio Winter of Doing Stage 1
Tags: crio, cwod, learnbydoing, externship
Published: 2021-01-16 05:26:48

---
title:All about Crio Winter of Doing Stage 1
published: true
description: Experience and Learning
tags: Crio, CWoD,LearnbyDoing,Externship
//cover_image: https://direct_url_to_image.jpg
---
Are you stuck in tutorial hell? or Want to learn new skills as a software developer but with hands-on experience?
No worries...Just type in https://www.crio.do/ in your browser and you will open a door of opportunity where you can transform yourself into a skilled and industry-ready software developer.
Crio Winter of Doing is a one-of-a-kind program focussed on bringing together budding engineering talent to work on challenging projects for the most exciting startups in the country. It is India's largest tech externship program. Tech externships are experiential learning opportunities, similar to internships, but shorter and part-time, provided in partnership with tech companies.
The program is divided into 3 stages. Stage 1 helps us to understand topics like HTTP, REST API, GIT, LINUX, and CLOUD but not in a way you were doing before. Each topic is named as a byte where we first have a live class taken by industry experts. Then we move to our Crio dashboards where we first get to see the overview of what we would be doing throughout the tasks. There is a section of the taskboard that comprises various milestones. These are the part of the program which gives us tasks some. Some of these are posting to LinkedIn from the terminal using cURL, data analysis using Linux skills, deploying an app in AWS server. It also includes curious cat questions, interview questions, MCQ's, short questions, and a pool of resources provided which helps get sufficient knowledge about the topic.
The workspace is also provided with an online IDE. That means we don't need to do any installation on our local PCs.
We also had fireside chats with the brightest name in the industry which gave insights into the industry. They also shed light on how to steer ourselves towards a successful tech career. Moreover, we also learn from their rich experience.
At last we also get a flavour of Full stack development Crio Micro experience in which we build our personal portfolio websites.
Crio is the need of the hour. When only a few out of lakhs graduating every year are suitable for new-age jobs, it becomes important that we more focus on project-based learning, build real-world tech projects and become the engineer we were meant to be.
Azure Functions University - Table Lesson (.NET Core)
Tags: azure, serverless, programming, dotnet
Published: 2022-03-16 20:05:07

---
title: Azure Functions University - Table Lesson (.NET Core)
published: true
date: 2021-01-17 00:00:00 UTC
tags: azure, serverless, programming, dotnet
canonical_url: https://blog.marcduiker.nl/2021/01/17/azfuncuni-table-lesson-dotnet.html
series: Azure Functions University
---

![Table Lesson .NET Core](https://blog.marcduiker.nl/assets/2021/01/17/AzureFunctionsUniversity_Table_Lesson_dotnetcore.png)

Hi serverless friends, we have a new Azure Functions University lesson for you! In this lesson we will learn how to use the Table bindings in Azure Functions written in .NET Core 3.1.

<!--more-->
## Lesson

You can find the lesson on GitHub: [Table Bindings (.NET Core)](https://github.com/marcduiker/azure-functions-university/blob/main/lessons/dotnetcore31/table/README.md).

And you can watch the video on YouTube:
{% youtube xiNkCsupUTs %}

The lesson consists of the following exercises:

| Nr | Exercise |
| --- | --- |
| 0 | Prerequisites |
| 1 | Using the Microsoft Azure Storage Explorer for Tables |
| 2 | Using `TableEntity` output bindings |
| 3 | Using `IAsyncCollector<T>` Table output bindings |
| 4 | Using `TableEntity` input bindings |
| 5 | Using `CloudTable` input bindings |
| 6 | Homework |
Creating Subscription in Azure CI Pipeline
Tags: devops, azure, beginners, tutorial
Published: 2021-01-17 00:00:00

---
layout: post
title: Creating Subscription in Azure CI Pipeline
date: '2021-01-17 00:00 +0000'
subtitle: Learn how to subscribe to your azure ci pipeline notification
description: Learn how to subscribe to your azure ci pipeline notification
cover-img: 'https://i.imgur.com/NRaQUA5.png'
cover_image: 'https://i.imgur.com/6SEjbG6.png'
thumbnail-img: 'https://i.imgur.com/CbQcFLl.png'
share-img: 'https://i.imgur.com/CbQcFLl.png'
tags: 'devops,azure,beginners,tutorial'
last_modified_at: null
published: true
sitemap: true
comments: true
social-share: true
excerpt_separator: <!--more-->
id: 590185
---
<br/>

> Subscribe to email alerts to get notified for your build CI/CD in azure pipeline. It is good idea to setup subscription to get email to a group email id. 

## Creating Subscription in Azure CI Pipeline

![](https://i.imgur.com/lXk3vyq.png)
1. Go to your project and select Project settings > Notifications to view your notification settings.
2. Choose New subscription to subscribe to additional notifications.
3. ![](https://i.imgur.com/Kyaxp7C.png)

## Editing Subscription in Azure CI Pipeline

To edit a notification, select ... for the notification and choose View to edit the subscription.
![](https://i.imgur.com/rwrsyrX.png)


## Reference 

https://docs.microsoft.com/en-us/azure/devops/repos/git/pull-requests?view=azure-devops#complete-the-pull-request

## Become full stack developer 💻

If you want to become full stack developer and grow your carrier as new software developer or Lead Developer/Architect. Consider subscribing to our full stack development training programs. We have All-Access Monthly membership plans and you will get unlimited access to all of our video courses, slides, source code & Monthly video calls.

- Please subscribe to [All-Access Membership PRO plan](https://www.fullstackmaster.net/pro) to access current and future angular, node.js and related courses.
- Please subscribe to [All-Access Membership ELITE plan](https://www.fullstackmaster.net/elite) to get everything from PRO plan. Additionally, you will get access to monthly live Q&A video call with Rupesh and you can ask doubts/questions and get more help, tips and tricks.

> You bright future is waiting for you so visit today [FullstackMaster](www.fullstackmaster.net) and allow me to help you to board on your dream software company as a Developer,Architect or Lead Engineer role.

<br/>

### 💖 Say 👋 to me! 

<div> 
Rupesh Tiwari </div><div>
<a href="https://www.rupeshtiwari.com"> www.rupeshtiwari.com</a> </div><div>
✉️ <a href="mailto:fullstackmaster1@gmail.com?subject=Hi"> Email Rupesh</a> </div><div>
Founder of <a href="https://www.fullstackmaster.net"> Fullstack Master</a></div><div>
</div>