teleren/devto huggingface dataset:
I finally released the app I was working on for over a month! It's called Twester.
Tags: javascript, react, webdev, opensource
Published: 2021-09-22 17:34:40

TLDR - Twester is a free and open source desktop app built with React, Electron and Node.js that will watch [Twitch](https://www.twitch.tv/) livestreams for the list of streamers you provide and harvest channel points.

Download for Windows, Linux or macOS from [twester.co](https://twester.co/).

[GitHub Repository](https://github.com/twesterapp/twester), a star 🌟 is really appreciated 😀

{% github twesterapp/twester%}

## Motivation

1. You do some prediction in chat and go all in with your channel points and lose all of them. Now you have to start from 0 and earn channel points from watching the streamer.

2. The streamers you watch are from different time zones and it's really hard to catch them online. So you can barely earn channel points.

## Features

-   **Minimal and Intuitive UI**. Start and pause Twester will a click of a button.
-   Add **unlimited streamers** to streamer's list and Twester will watch them\* and harvest channel points for you.
-   **Streamers tab** to manage streamer's list and check their stats (time watched, points harvested, is online/offline, twester watching).
-   **Event logs** about all the things you need to know. Example, when a streamer goes offline or online, when channel points are earned, when Twester starts or stops watching a livestream and more.

> \* Twitch allows max 2 livestreams to be watched at a time. Twester will pick the highest priority streamers to be watched.

## Features to come in future

-   **Predictions** - Twester will make predictions based on your preferences.
-   **Analytics** - Visual representation of channel points earned for a streamer.

## How does it look?

> **Home tab** - Twester is _watching_

![Twester home tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lalp0o2qqe49bn62r2z4.png)

> **Streamers tab** - Twester is _watching_ **xQcOW** and **jamiepinelive**

![Twester streamers tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/owwx7b7w4q3wxw8n5qih.png)

## How it works?

-   Twitch rewards channel points for a lot of [reasons](https://help.twitch.tv/s/article/channel-points-guide?language=en_US#viewers). Twester earns channel points by mainly “watching” a streamer.
-   Twester earns channel points for the following
    -   Watching
    -   Active watching (bonus redeemed by click)
    -   Watch streaks
    -   Participating in a Raid
-   Twitch allows users to watch and get channel points for maximum of 2 streamers at a time. That’s why Twester asks you to keep the streamers on Streamers tab sorted(top to bottom) based on priority. Twester picks the 2 streamers from the list with highest priority that are online and “watches” their livestream.
-   To “watch” a livestream, Twester sends a “minute watched event” request to Twitch’s API for that livestream. Twitch uses that request to know which user has watched a livestream for a minute. After several of these requests, Twitch rewards the user with channel points.

Thank you for reading ♥
Usar ç no Pop!_OS em teclados US international 😸
Tags: linux, português
Published: 2021-09-22 17:33:45

Na data desse post passei a usar o Pop!_OS para testar se conseguiria me acostumar melhor com o ambiente linux, entretanto encontrei muita dificuldade para configurar o sistema operacional conhecido por ser o melhor para customização, irônico não? 😹

Entretanto encontrei uma solução simples para nós 🇧🇷

https://github.com/marcopaganini/gnome-cedilla-fix 

Simples de resolver tudo isso apenas rodando em `sudo` no terminal o seguinte comando:
```
wget -q https://raw.githubusercontent.com/marcopaganini/gnome-cedilla-fix/master/fix-cedilla -O fix-cedilla
chmod 755 fix-cedilla
./fix-cedilla
```
E agora tudo resolvido 😸
Emojis in commit messages: ✅ or ❌?
Tags: watercooler, discuss
Published: 2021-09-22 17:27:04

---
title: Emojis in commit messages: ✅ or ❌?
published: true
description: Let's debate putting emojis in commit messages!
tags: watercooler,discuss
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47zao9t2njjtlosrz6xg.jpg
---

Some people use [emojis in commit messages](https://dev.to/rmarting/why-i-use-emojis-in-my-git-commits-4c10).

Are you for ✅ or against ❌ this practice?

Why?

###### _Header image by [Domingo Alvarez E](https://unsplash.com/@domingoalvarze?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/emojis?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_
IST 402: Introduction
Published: 2021-09-22 17:08:32

#Introduction#

Hello, my name is Joseph Tumwebaze. I am a senior studying Information Science and Technology: Integration and Application option. Outside of class, I am involved in WIREDIN an IST club for diversity in tech. I also play piano for a student campus organization called Chi Alpha. 
I love people, technology, music, and good food. 
Fun fact about me is that I am lefthanded. 

#Why web development?#

Web development is one of those skills that will easily become the new form of literacy in the future. With exponential technical advancement, I think knowledge of web development in the future would be as essential as it is to know how to write today. I chose to take this web development class to compliment my Product Manager skills and career interests. I thought it was a good technical skill to have. I am excited about the projects that we are going to do in this class, and I look forward to learning a lot.
LaTeX and Maths: Mistakes and Errors
Tags: latex, codenewbie
Published: 2021-09-22 16:00:35

Hello, how are you? :) 

In this post I talk about common mistakes while using maths in LaTeX and how to solve them. 
There are lots of mistakes and errors and I will be focused just in the most important or common ones. If the error is not here, you should search that in other place, but I think I will cover most of them here. Let's start!!!

## Mistakes

- Forget the `$ $` or `\[ \]` to put the equation 
- Forget a `}` to close the instruction that you are using 
    - If you are using an *autocomplete* environment you do not need to worry about this, but sometimes happens 
- Put an environment which does not need a math environment, like `align`, inside a math environment 
- Mis-spell the name of a reference or a tag while calling it 
- Left a blank space in an environment which does not allow this 
- Mis-spell the name of a command 

Sometimes we mix the environments, for example, formulas in tables, or formulas in lists, well [here](https://dev.to/latexteada/latex-errors-list-environment-p9a) and [here](https://dev.to/latexteada/latex-errors-tables-and-figures-1h4b) you can check other kinds of errors in tables and lists.

This is all for today, tanks :) 

Do not forget to follow me on Twitter `@latexteada`

Greetings
String in Rust
Tags: rust, string
Published: 2021-09-22 16:46:35

之前看到一個有趣的圖，在 c 中 string 其實就是 char*，而在 rust 中 string 卻有很多種型別，對寫 Golang 的我來說光是為何要 to_string() 才能 append string 就滿頭問號。

## slice, array, vector
講 string 前可以先理解 rust 中 slice, array, vector 的定義
array 為固定長度的序列
[T; N] T 是類型 N 是 長度
```rust
let s = [1; 5];
println!("{:?}", s);
// [1, 1, 1, 1, 1]
```

vector 是可以動態增長的序列
```rust
let mut s = vec![1];
s.push(2);
assert_eq!(s, &[1, 2]);
assert_eq!(s.len(), 2);
assert_ne!(s.capacity(), 2);
```

slice 則是對連續空間的 reference，可以是 vector / array 的一部分參考，可以不需要經過複製就可以對 slice 參照的 vector / array 進行操作

## 常見的 &str 和 String 的差別

### &str
```
let s = "abc";
```
在編譯時因為 "abc" 長度是固定的所以被認為是靜態的放 stack 上，所以引用時去參照這段位置，所以 s 為 str 這個類別的 reference &str，而 &str 其實是一個 slice 參照 u8 的 array，

### String
```rust
let s = "abc".to_string();
```
s 是 String 其實是一個 u8 的 vector，因為是可以動態增長，compiler 不會知道 s 會長多大，所以必須放在 heap 上，可以做下面的操作來改變 String 本身

```rust
let mut s = "abc".to_string();
s.push_str("def");
```

那為何 rust 不把我定義的 "abc" 值當作 [u8] 就好了呢？ 因為 rust 還同時要確保 &str 中的 [u8] 是合法的 UTF-8 字元，就像大部份語言 char 與 string 的區別，這種 pointer 包含了 type 還有其他規則的 pointer 常被稱為 fat pointer。

可以看出來其實 &str 與 String 類型的差別跟 compiler 將 data 放在 heap 還是 stack 有很大的關係，當你對 &str 使用 to_string 就產生的 memory allocation，所以不需要就不要使用 to_string 增加開銷。

## 其他意外發現的坑
### 計算字數
```rust
let s = "🗻∈🌏";
let byte = s.as_bytes();

assert_eq!(s.len(), 11);
assert_eq!(s.chars().count(), 3);
assert_eq!(byte.len(), 11);
```

s.len() 竟然是 11 讓我有點傻眼XD...  

### Precomposed Characters
除此之外，如果是 precomposed characters 會有很神奇的現象 [1]
```rust
println!("{}", "é".chars().count()); // 2
println!("{}", "é".chars().count()); // 1
```

何會得到不一樣的結果？因為實際上這兩個是不一樣的字 [程式碼](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021)
```rust
fn main() {
    assert_eq!("é","é")
} thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"e\u{301}"`,
 right: `"é"`', src/main.rs:2:5
"""
```

這讓我理解到數字其實背後也有很多學問，chars count 是數 Unicode Scalar Value，而 "é" 是 e 還有 \u301 這個 Unicode 組成 ，所以直接算就會是兩個字，那解法就是用 graphemes 這個 method 對應 composited char 的問題

```rust
use unicode_segmentation::UnicodeSegmentation; // 1.6.0
fn main() {
    let s = "é";
    println!("{}", s.chars().count()); // 2
    println!("{}", "é".graphemes(true).count()); // 1
}
```
---
註 [1]: 感謝 Rust-TW Telegram 上 Lo Weihang 勘誤 
Updated at 2021/11/28
Beginner's Front-End Development.
Tags: html, css, javascript, bootstrap
Published: 2021-09-22 15:51:45

Hey there! I'm Wasim and i'm actually here to learn more about front-end and get even better at it.
Need some help for what i should learn next.
I have already completed html, css and for now i'm learning css preprocessor 'sass'.
But still haven't started Javascript.
Confused for what i should learn next and about bootstrap it's going on.
Java Quickie. Stack
Tags: java, tristan
Published: 2021-09-22 15:13:29

#Introduction
- This series is going to be dedicated to the basic understanding of Java. When ever I find myself asking, "How does this work ?". I will create a blog post and put it here. This series will not be in order so feel free to read what ever post you find most relevant.

###What is a Stack?
- In computer science, a stack is a data type that serves as a collection of elements, with two main operations:

**1) push:** adds a element to the collection.

**1) pop:** removes the most recently added element.


- Another defining trait of a Stack is that it operates on the LIFO(last in, first out) principle. Which means the last element added to the stack is the first element to be removed. A good mental model to have when thinking about Stacks is a stack of books. The only way to get to the book on the bottom is to remove all of the books above it.

###Stack in Java
- I first want to point out that there is nothing really too different when it comes to Stacks in Java. The underlying idea is the same, a Stack operates on the LIFO principle and has the `push` and `pop` operations. The implementation just becomes less abstract.

- In Java a Stack is implemented as the `call stack`. Which is a temporary piece of memory that stores local variables, arguments passed into the method, information about the caller's stack frame(explained later) and the return address(where the program should return to). Each thread in Java has its own call stack and the call stack gets created the same time as the thread. The call stack actually stores `frames` and a frame is what stores all the extra information. A new frame is created each time a method is invoked and the frame is destroyed when the method invocation completes. Only one frame, the frame of the executing method is active at any given time.

- So basically, when a method is called, a frame is created with all the necessary information and gets `pushed` to the top of the call stack. Once the method invocation is finished, the frame is then automatically `popped` from the stack and destroyed.   

#Conclusion
- Thank you for taking the time out of your day to read this blog post of mine. If you have any questions or concerns please comment below or reach out to me on [Twitter](https://twitter.com/TristAndroidDev).
Beginning Project Ideas for New Programmers
Tags: programming, python
Published: 2021-09-22 14:56:59

Currently, Python is one of the most popular and lovingly programming languages. And this trend is about to continue in 2021 and coming years. So, if you are a Python beginner, the best thing you can do to upgrade your programming skill is to work on some **real-time python projects**.

I personally believe in a practical approach as theoretical knowledge alone won't be much helpful in real-time work environment. In this article, I will be exploring some cool and interesting Python Project ideas for beginners to test their Python knowledge. In this article, you will find 17 python project ideas to get hands-on experience in Python.

The first question that comes in mind is **why to build python projects?**

When it comes to careers in software development, it is a must for aspiring developers to work on their own projects. Developing real-world projects is the best way to hone your skills and materialize your theoretical knowledge into practical experience.

**Working on real-time project can help:**
* **To boosts confidence -** Confidence is one of the key qualities that help students to land in their dream jobs. Acquiring a practical skillset beforehand will instill a lot of confidence among the students and will certainly make them stand out from the crowd.
* **Students gets proper training -** Only proficient in theoretical knowledge, students lack the practical skills necessary for any profession. Live projects train them even before the start of their professional career which increases their expertise. Apart from that, it also enhances their knowledge which makes them more preferable in the eyes of recruiters.
* **To master programming concepts -** One of the biggest advantages of building real-world projects is that with continuous practice, you will master the concepts and patterns of programming in different languages.

Here are some **Python Projects for Beginners**:

**Python Project Ideas: Beginners Level**
1. Number Guessing
2. Dice Rolling
3. Desktop Notifier App
4. Python Story Generator
5. YouTube Video Downloader
6. Rock, Paper, Scissors

**Python Project Ideas: Intermediate Level**
7. Calculator
8. Random Password Generator
9. Countdown Timer
10. Alarm Clock
11. Currency Converter
12. Tic-Tac-Toe

**Python Project Ideas: Advanced Level**
13. Python File Explorer
14. Plagiarism Checker
15. Music Player
16. Instagram Photo Downloader
17. Quiz Application
Listen to S6E7 of DevDiscuss: "Looking at Software Mistakes and Tradeoffs" with Tomasz Lelek
Tags: discuss, podcast
Published: 2021-09-22 14:43:43

---
title: Listen to S6E7 of DevDiscuss: "Looking at Software Mistakes and Tradeoffs" with Tomasz Lelek
published: true
description: Listen to S6E7 of DevDiscuss!
tags: discuss, podcast 
series: DevDiscuss Season 6
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gesj2pi0pmtelwk3h2x4.png
---

## Listen to DevDiscuss S6E7 right here on on DEV:

{% podcast https://dev.to/devdiscuss/s6-e7-looking-at-software-mistakes-and-tradeoffs %}

_DevDiscuss is the first original podcast from DEV all about the burning topics that impact all our lives as developers._

**This week, we talk about software mistakes and tradeoffs and reflecting on your systems to make intuitive and better design decisions.** 

### Host:
- @ben — Creator of DEV & Co-Founder of Forem
  
### Guest: 
- [Tomasz Lelek](http://twitter.com/@tomekl007), Senior Software Engineer at DataStax and co-author of the book, "Software Mistakes and Tradeoffs: Making good programming decisions." After listening if you want to get a copy of the book, go [here](https://www.manning.com/books/software-mistakes-and-tradeoffs) and use offer code devdsrf-38BF for a 35% discount.




Enjoy this week's episode of DevDiscuss! Let us know your thoughts in the comments below — or on Twitter ([@thepracticaldev](https://twitter.com/thepracticaldev) ).

![Loud Speakers](https://media.giphy.com/media/efUcLJePY6RkA/giphy.gif?cid=ecf05e474wb5hoxc04in2l955wut2oz0fkmxfnnafyj64de0&rid=giphy.gif&ct=g)

---

_You can [follow DevDiscuss](dev.to/devdiscuss) to get episode notifications and listen right in your feed_ — or subscribe on your platform of choice! Plus, if you leave us a review, we'll send you a free pack of thank-you stickers. Details [here](https://airtable.com/shr8oKAIMZgdYnBxx). 

## Quick Listening Links
- [Apple Podcasts](https://podcasts.apple.com/us/podcast/s6-e7-looking-at-software-mistakes-and-tradeoffs/id1513053883?i=1000536252285)
- [Spotify](https://open.spotify.com/episode/2934rlyA7xr2BkZJb4kLdn)
- [Google](https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5kZXZwb2RzLmRldi9kZXZkaXNjdXNzX3BvZGNhc3QueG1s/episode/aHR0cHM6Ly9kZXZwb2RzLmRldi9wb2RjYXN0cy9kZXZkaXNjdXNzLzQ4?sa=X&ved=0CAQQkfYCahcKEwjgwvm95pLzAhUAAAAAHQAAAAAQCg)
- [Listen Notes](https://www.listennotes.com/podcasts/devdiscuss-dev-xtQvoDylAUg/)
- [TuneIn](https://tunein.com/podcasts/Technology-Podcasts/DevDiscuss-p1324596/?topicId=165975619)
- [RSS Feed](http://feeds.codenewbie.org/devnews_podcast.xml)
- [DEV Pods Site](http://devpods.herokuapp.com/podcasts/devdiscuss/episodes/224)

---
_Acknowledgements_ 
- _@levisharpe for producing & mixing the show_
- _Our season six sponsors: [CockroachDB](cockroachlabs.com/devdiscuss) & [Scout APM](https://www.scoutapm.com/devdiscuss)!_
Welcome Thread - v143
Tags: welcome
Published: 2021-09-22 14:31:20

---
title: Welcome Thread - v143
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![German Shepherd saying "sup"](https://media.giphy.com/media/Y42OeCcJI4ufXDQ3oA/giphy.gif?cid=ecf05e472cpvb6p2uwvi00v304tthoshtya7l8kxrve2hete&rid=giphy.gif&ct=g)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
The pragmatic programmer book tips (Part 1)
Tags: beginners, advanced, programming
Published: 2021-09-22 14:30:22

---
title: The pragmatic programmer book tips (Part 1)
published: true
description: Be a better programmer, all of the tips on the pragmatic programmer book.
tags: beginners,advanced,programming
cover_image: https://miro.medium.com/max/900/0*fl0DD6QamwjiyEvm.jpg
---

3 weeks ago I bought The pragmatic programmer book, I saw it on a blog and the writer really recommended it, so I said why not.

the book is full of great tips, actually each section the book talks about, ends with a tip its like a summary of the section.

the book has about 70 tip, this is part 1. I will list them and explain some of the ones that are not clear, *the explanation is from the book itself.*

### #1 - Care About Your Craft
*There is no point in developing software unless you care about doing it well.*
&nbsp;
### #2 - Think! About Your Work
*think about what you're doing while you're doing it. Never run on auto-pilot. Constantly be thinking, critiquing your work in real time.*
&nbsp;
### #3 - Provide Options, Don't Make Lame Excuses
*don't have a backup, it's your fault. Telling your boss "the cat ate my source code" just won't cut it.*
&nbsp;
### #4 - Don't Live with Broken Windows
*Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix  each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead.*
&nbsp;
### #5 - Be a Catalyst for Change
*You may be in a situation where you know exactly what needs doing and how to do it. The entire system just appears before your eyes you know it's right. But ask permission to tackle the whole thing and you'll be met with delays and blank stares. People find it easier to join an ongoing success. Show them a glimpse of the future and you'll get them to rally around.*
*"It's easier to ask forgiveness than it is to get permission."*
&nbsp;
### #6 - Remember the Big Picture
*Keep an eye on the big picture. Constantly review what's happening around you, not just what you personally are doing.*
&nbsp;
### #7 - Make Quality a Requirements Issue
&nbsp;

### #8 - Invest Regularly in Your Knowledge Portfolio
*Learn at least one new language every year. Read a technical book each quarter. Read nontechnical books, too. Look for interesting courses. Participate in local user groups, Isolation can be deadly to your career. Experiment with different environments. Stay current. Surf the Web for papers, commercial sites, and any other sources of information you can find.*

***It's important to continue investing. Once you feel comfortable with some new language or bit of technology, move on. Learn another one***
&nbsp;

### #9 - Critically Analyze What You Read and Hear
*Just because a bookstore features a book prominently doesn't mean it's a good book, or even popular; they may have been paid to place it there*
&nbsp;
&nbsp;
&nbsp;

**Part 2 will be ready soon**
RomanStaticSG
Tags: devops, programming, opensource
Published: 2021-09-17 21:33:50

RomanStaticSG is a static site generator. It is simple to use, yet very effective.

## About RomanStaticSG  
RomanStaticSG is made in python. It is a simple static site generator. It accepts an input file, or input folder. The program will then take the accepted files and create basic html webpages, as well as an index.html file. The script also allows you to input a custom output directory, so that the files could be saved in a custom location.  
***Currently only .txt files work***
## What is a Static Site Generator (SSG)  
A static site generator is a tool that generates full blown static HTML websites from raw data and some templates. The point of a static site generator is to quickly convert a document file or a text file into a working webpage, that is filled with content.  

## How to Use RomanStaticSG
***Python 3.9+ Required***  
To use RomanStaticSG simply type
    
    python romanssg.py --help

## Some Commands in RomanStaticSG
### Help Screen 
    python romanssg.py --help  |  python romanssg.py -h  
### Version Check
    python romanssg.py --version  |   python romanssg.py -v
### Input Command
To run the input command specify the file name **without** the extension  

    python romanssg.py --input=example    |   python romanssg.py -i=example   

When running the input command and not specifying the output command, a local folder named "dist" will be created in the directory of the existing file.
### Output Command
To run the output command specify the custom directory location  
  
**For Unix/Linux**

    python romanssg.py --output=./someFolder   |   python romanssg.py -o=./someFolder
    
**For Windows**

    python romanssg.py --output="C:\Users\Roman Rezinkin\Desktop"    |   python romanssg.py -o="C:\Users\Roman Rezinkin\Desktop"  

## Conclusion
Although the task seemed taunting at first, I was able to quickly understand what I had to do. As a relatively new developer with Python, I had to make some academic searches for syntax and general knowledge on Python. This challenge only made the development of this tool that more entertaining.  
Github Repository: https://github.com/roman-rezinkin/RomanStaticSG
Sample Output Website: https://roman-rezinkin.github.io/RomanStaticSG/demo/
Component will unmount for functional components
Published: 2021-09-22 14:24:14

I just learnt that if we have unmount functions being returned from useEffect like below, both the methods will be called on unmount. Not sure though if it's correct behavior or it's a bug in React. What could be the possible reason for keeping such behavior?
useEffect(() => {
        return () => {
            console.log('Unmount From DidMount');
        };
    }, []);

useEffect(() => {
      return () => {
            console.log('Unmount From will update');
      };
}, [props.xyz]);