teleren/devto huggingface dataset:
The Overuse of Arrow Functions: A Cautionary Tale
Tags: javascript, typescript, webdev, frontend
Published: 2023-10-06 12:10:49

In the world of modern JavaScript, there's a trendy tool that many developers have latched onto like a lifebuoy in a stormy sea - the arrow function. While arrow functions do have their place, it seems like everyone's using them for everything these days. And honestly, it's starting to get a bit annoying.

Arrow functions are touted for their concise syntax and implicit return, which can make simple functions look cleaner. But here's the thing: not everything in coding is simple, and not every function benefits from this conciseness. Let's talk about why the overuse of arrow functions can actually make your code less readable and more awkward.

## Short and Simple Is Good, but Not Always
Sure, arrow functions are great for short, one-liner functions. They save you from typing out the word "function" and the curly braces. But what about those functions that do more than one thing? Arrow functions force you to use parentheses and braces, making your code look cramped and less intuitive.

```javascript
// Arrow function for a simple one-liner
const add = (a, b) => a + b

// Arrow function for a more complex function
const multiply = (a, b) => {
  const result = a * b
  console.log(result)
  return result
}

// Write it as a proper function instead!
function multiply(a, b) {
  const result = a * b
  console.log(result)
  return result
}
```

## Readability Matters
Coding is not just about getting the job done; it's about making your code readable and maintainable. Overusing arrow functions can make your code look like a jumble of parentheses and arrows, making it harder for your teammates (and even your future self) to understand what's going on. Look at the example above, the regular function takes less space than the arrow function!


## The Mysterious this Keyword
Arrow functions are notorious for their lexical this binding. It sounds fancy, but it can be confusing. Regular functions have dynamic this, which makes it easier to understand where this is coming from. Arrow functions might surprise you when you expect this to refer to the object you're working with.

```javascript
const person = {
  name: "John",
  sayHi: () => {
    console.log(`Hello, I'm ${this.name}`) // Oops, this is not what we expected!
  },
};

```

## Where arrow functions shine!

When writing simple maps and filters, in other hand, arrow functions might be excellent, and make your code much more readable than the wordy function-function:

```javascript
const angrySheeps = sheeps.filter((sheep) => sheep.isAngry);
```


# Conclusion
So, let's be clear: arrow functions are not the enemy. They're a powerful tool, but they should be used sparingly. Don't be in such a rush to shave off a few characters from your code that you sacrifice readability and maintainability.


I used ChatGPT to help me formulate parts of this post. All opinions are sincerely mine, and based on my experience as a professional software developer.
Mac 40th Anniversary art: First Draft
Tags: macintosh, mac, anniversary, watercooler
Published: 2023-10-06 12:07:34

In January of 2024, the Mac (which I code on :D) is turning 40! Now, I code on a MacBook, which was introduced in 2006, so it is only 18 years old (not mine, mine is from ‘23 :P). So, I am going to be designing a 40th anniversary logo. It’s only a first draft, a combo of their 40th and 30th anniversary logos for the company and the mac, respectively. There is a huge redesign on the way tho.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2fu6tfy2ycmn0qgdma34.jpg)
wsl2 の設定備忘録
Tags: wsl
Published: 2023-10-06 12:06:49

個人用備忘録。OS は Ubuntu 前提です

---

<!-- omit in toc -->
## 目次

- [root 以外のユーザをデフォルト起動ユーザにしたい](#root-以外のユーザをデフォルト起動ユーザにしたい)
  - [基本設定](#基本設定)
  - [Windows Terminal での設定](#windows-terminal-での設定)
- [GUI の有効化](#gui-の有効化)
  - [Chromiumのインストール](#chromiumのインストール)
- [sshの鍵設定](#sshの鍵設定)

---

## root 以外のユーザをデフォルト起動ユーザにしたい

### 基本設定

VSCode とかで wsl に接続した際にデフォルト起動ユーザを変更する方法。
[公式の方法](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#user-settings)

Ubuntu にログインして conf の設定を変更するだけ
※hoge の部分はユーザ名

```
$ sudo vi /etc/wsl.conf
[user]
default=hoge
```

---

### Windows Terminal での設定

[設定] → [Ubuntu] → [コマンドライン]
を開いて起動コマンドを変更する。
※hoge の部分はユーザ名

```
# デフォルト
C:\WINDOWS\system32\wsl.exe -d Ubuntu

# 変更後
C:\WINDOWS\system32\wsl.exe -d Ubuntu --user hoge
```

---

## GUI の有効化

Windows 10 から利用できるようになった Windows Subsystem for Linux GUI を利用。<br>
最新版の wsl でなければ更新。

```
# 管理者権限が必要
> wsl --update

# バージョン確認
> wsl --version
WSL バージョン: 1.2.5.0
カーネル バージョン: 5.15.90.1
WSLg バージョン: 1.0.51 # GUI機能が利用可能
MSRDC バージョン: 1.2.3770
Direct3D バージョン: 1.608.2-61064218
DXCore バージョン: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows バージョン: 10.0.22621.2428
```

X11 アプリケーションをインストールして GUI が wsl から利用できるか確認。

```
$ sudo apt update
$ sudo apt install -y x11-apps

電卓が起動すればWSLgを利用できる状態
$ xcalc
```

---

### Chromiumのインストール

```
sudo apt install -y libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb libgbm-dev fonts-ipafont
```

## sshの鍵設定

```
# keychain インストール
$ sudo apt-get install keychain

$ 起動設定
$ vi ~/.bashrc
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
source $HOME/.keychain/$HOST-sh
```
8, Thành phố Hồ Chí Minh, Việt Nam
Published: 2023-10-06 12:05:37

7clups là một nền tảng đáng tin cậy và chất lượng, mang đến một tầm nhìn tổng quan về thị trường cá cược tại Việt Nam. Chúng tôi không chỉ đơn thuần là một trang web đánh giá, mà là một cộng đồng đam mê với sứ mệnh tạo ra môi trường chơi game trực tuyến an toàn và thú vị cho người chơi.
Tại đây nhà cái 7clups sẽ cung cấp cho người chơi nhiều dịch vụ khác như các trò chơi cá cược với tỷ lệ cao, các dịch vụ và hệ thống chăm sóc khách hàng hiện đại và chu đáo,...
Chúng tôi không ngừng khám phá và đánh giá các nhà cái trực tuyến, từ những cái tên hàng đầu đến những sự lựa chọn mới nổi. Mục tiêu của chúng tôi là cung cấp cho người chơi một nguồn thông tin đáng tin cậy để họ có thể lựa chọn một cách thông minh và an toàn.
Đối với người chơi thì nhà cái 7clups sẽ luôn đặt người chơi lên hàng đầu trong đó có tính bảo mật thông tin cá nhân của người chơi, các lớp bảo mật mà nhà cái đã xây dựng nên là một hệ thống vô cùng vững chắc như hệ thống tường lửa hiện đại,chặt chẽ để đảm bảo an toàn giữ kín và không bị rò rỉ thông tin cá nhân của người chơi.
Tại nhà cái 7clups bạn có thể lựa chọn cho mình nhiều cách chơi khác nhau như chơi trực tiếp trên web, chơi trên app điện thoại, chơi trên máy tính,... Dù bạn chơi theo cách nào thì nhà cái cũng sẽ đảm bảo tốc đổ internet tốt nhất cho bạn để không xảy ra tình trạng giật lag khiến người chơi khó chịu khi tham gia trải nghiệm game của nhà cái 7clups.
Bran:7clups
Địa chỉ: 5B/42 Đường Võ Trứ, Phường 9, Quận 8, Thành phố Hồ Chí Minh, Việt Nam
Postcode: 73007
SDT:09453077484 
Email: Banvanlien94ka@gmail.com
Website: https://7clubs.space/
#7clubsspace #7clubs #7clubsdangnhap #7clubschoitrenweb #taigame7clubs #7clubschoitructuyen #7clubsgame #7clubsapk #7clubsweb #tai7clubs #7clubswin #7clubscasino #7clubsdangky #7clubspc #7clubsios #app7clubs #7clubs131k


 Social Links:

https://www.facebook.com/7clupsspace/

https://twitter.com/7clupsspace

https://www.pinterest.com/7clupsspace/

https://500px.com/p/7clupsspace?view=photos

https://www.flickr.com/people/7clupsspace/

https://www.youtube.com/@7clupsspace

https://www.reddit.com/user/7clupsspace

https://www.blogger.com/profile/16403201253016189980

https://7clupsspace.blogspot.com/

https://www.tumblr.com/settings/blog/7clupsspace

https://www.quora.com/profile/7clupsspace

https://www.producthunt.com/@7clupsspace

https://vimeo.com/7clupsspace

https://foursquare.com/7clupss6310138/list/7clupsspace

https://scholar.google.com/citations?view_op=list_works&hl=vi&user=qngTJR4AAAAJ

https://www.goodreads.com/user/show/170489804-7clups-space

https://soundcloud.com/7clupsspace

https://www.twitch.tv/7clupsspace

https://flipboard.com/@7clupsspace/

https://7clupsspace.wordpress.com/2023/10/06/7clups-7clups-space/

https://gravatar.com/banvanlien94ka

https://dribbble.com/7clupsspace/about

https://7clupsspace.tumblr.com/

https://www.behance.net/7clupsspace
Perl Weekly Challenge #237 - Carpe Diem
Tags: perl, perlweeklychallenge, datetime
Published: 2023-10-06 11:57:06

Hello everybody! Welcome back to the Weekly Challenge series, where today we're working on dates again. I like these challenges in particular, for some reason. In this case, we have a rather simple challenge except that it gives us less common date formats than usual.

The challenge gives us a year, month, week(day) of the month, and day of week. Now DateTime provides us with get operations to find WoM and DoW info, but it doesn't provide set operations. For that we need to do a little math. Here's the code below:

    #!/usr/bin/perl
    use v5.36;
    use DateTime;

    my ($year, $month, $wom, $dow) = @ARGV;
    my $obj = DateTime->new(year => $year, month => $month, day => 1);
    if($obj->dow() <= $dow) {
        $obj->add(days => (($dow - $obj->dow()) + (($wom - 1) * 7)));
    } else {
        $obj->add(days => ((7 - ($obj->dow() - $dow)) + (($wom - 1) * 7)));
    }
    say 0 and exit if $obj->month() != $month;
    say $obj->day();

We only really have to handle wrapping and assessing whether that day is possible within the month. We use DateTime because it just makes sense, and we create an object with the first day of the month that we're using. If the day is the same or earlier in the week (to save code complexity) than the day we're looking for, we shift the difference and add that to the number of weeks later that the target day is on. If the 1st of the month is later in the week than our target day, we wrap and still shift $wom-1 weeks later.

If our addition to the date means we're now in a different month from the intended one we print out 0 and exit, otherwise we say what the date is now.

It's that simple! Just 12 lines including file header and boilerplate. Hope to see you next week!
Updating Discord on Ubuntu
Tags: linux, discord
Published: 2023-10-06 11:35:06

The Discord app does not get updated automatically. Instead, a copy of .deb file is downloaded and the update needs to be installed manually. If you have come across this image 
![update alert](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhd2kh45mw3j58dmrg71.png)
Follow the below simple easy steps : 

1. Download the .deb file
2. Go to the downloads folder and open the terminal. This is to ensure that you have changed your present working directory!
3. Type the command `sudo apt install ./` make sure to include the .deb file after **./** as shown in the below image.
![command for updating discord using .deb file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prk0d7r7dgqoo2v8h4g0.png)
4. Hit Enter and it's done. You should see the below result after Hitting enter.

![Example image after sunccessful update](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hs2rh7c3qp8da3qj172p.png)
Placeholder Pledge
Tags: hacktoberfest23
Published: 2023-10-06 11:31:31

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->


### Intro
<!-- If you are new to the DEV community, introduce yourself and share a bit about why you joined DEV and your motivation to participate in Hacktoberfest this year. -->My name is Kevin and I am really excited about my Python learning journey. I am pursuing BSc in applied statistics with computing.

### Background
<!-- Are you brand new to Hacktoberfest? What about coding in general? Tell us about how you got here -->Yes I am brand new to Hacktoberfest. I have been taking classes on Python so am not badly off. I read about you on a programming boot camp.


### Pledge
<!-- Share with us a bit about your goals during your Hacktoberfest journey this month. Are you a contributor looking to hone your skills or a maintainer looking for some help on a new project? Let us know!  -->I am here to enhance my skills and learn more about how to do world problem-solving projects.
What is required for a full stack developer?
Tags: webdev, beginners, programming, discuss
Published: 2023-10-06 11:23:13

A full-stack developer is a professional who has the skills and knowledge to work on both the front-end and back-end of a web application or software project. To become a proficient full-stack developer, you should have expertise in various technologies, tools, and concepts across the entire technology stack. Here are the key requirements and skills for a full-stack developer:

- Front-End Development
- HTML/CSS
- Back-End Development
- Web Frameworks
- API Development
- DevOps and Deployment
- Web Servers and Hosting
- Programming and Problem-Solving Skills

Becoming a full-stack developer typically requires continuous learning and hands-on experience in both front-end and back-end development. Many full-stack developers specialize in certain technologies or domains over time while maintaining a broad skill set to address a wide range of development challenges. Learn more here: [Full Stack Course in Pune](https://www.sevenmentor.com/full-stack-training-institute-in-pune.php)
Should I be a Generalist or Specialist?
Tags: webdev, programming, careerdevelopment
Published: 2023-10-06 11:30:00

We were asked recently if a new developer should work on specializing in an area, or become a generalist.

https://youtu.be/kILYHCTXN5k

{% youtube https://youtu.be/kILYHCTXN5k %}
How to stay up-to-date on the latest trends and technologies in custom software development
Published: 2023-10-06 11:29:02


The custom software development industry is constantly changing, with new trends and technologies emerging all the time. It is important for custom software developers to stay up-to-date on the latest trends and technologies in order to remain competitive and deliver the best possible solutions to their clients.

Here are some tips for staying up-to-date on the latest trends and technologies in custom software development:

**Read industry publications:** There are a number of industry publications that cover the latest trends and technologies in custom software development. Some popular publications include:

- SD Times
- InfoWorld
- Computerworld
- Developer.com
- DZone

**Attend industry events:** Industry events, such as conferences and meetups, are a great way to learn about the latest trends and technologies in custom software development. You can also meet other professionals in the industry and network with potential clients and employers.

**Follow industry experts on social media** Many industry experts share their insights and knowledge on social media platforms such as Twitter and LinkedIn. Following industry experts on social media is a great way to stay up-to-date on the latest trends and technologies without having to spend hours reading industry publications or attending industry events.

**Take online courses:** There are a number of online courses that can teach you about the latest trends and technologies in custom software development. Some popular online learning platforms include:

- Coursera
- edX
- Udemy
- Skillshare

**Contribute to open source projects:** Contributing to open source projects is a great way to learn about new technologies and to network with other developers. It is also a great way to build a portfolio of your work.

In addition to the above tips, it is also important to be proactive and to seek out new information about the latest trends and technologies in custom software development. You can do this by reading blog posts, watching videos, and listening to podcasts. You can also talk to other developers and attend meetups and conferences.

By following the above tips, you can stay up-to-date on the latest trends and technologies in [custom software development](https://www.taazaa.com/custom-software-development-guide/). This will help you to remain competitive and to deliver the best possible solutions to your clients.
8Xbet - Nhà Cái 8Xbet Tặng Khủng Đến 588K
Published: 2023-10-06 11:21:51

8Xbet là trang nhà cá cá cược thể thao, bóng đá hàng đầu tại Châu Á. Và đặc biệt dành cho các game thủ Việt Nam. Nhà cái 8Xbet này đã thu hút không ít lượng khách hàng truy cập tại đây. Ngoài ra khi tham gia tại 8Xbet com người chơi có thể nhận được nhiều khuyến mãi cực khủng và siêu hấp dẫn.
Địa Chỉ: Ng. 32/65 Đỗ Đức Dục, Mễ Trì, Nam Từ Liêm, Hà Nội, Việt Nam
Email: 8xbetcr7com@gmail.com
Website: https://8xbetcr7.com/
Điện Thoại: (+84) 568 279 831
#8xbet #8xbetcom #8xbetonline #8xbetgroup

Social Links:

https://8xbetcr7.com/gioi-thieu-8xbet/
https://8xbetcr7.com/chinh-sach-bao-mat-8xbet/
https://8xbetcr7.com/dieu-khoan-su-dung-8xbet/
https://8xbetcr7.com/trach-nhiem-ca-cuoc-8xbet/
https://8xbetcr7.com/chuong-trinh-khuyen-mai-8xbet/
https://8xbetcr7.com/huong-dan-cac-buoc-dang-ky-8xbet/
https://8xbetcr7.com/huong-dan-nap-tien-8xbet/
https://8xbetcr7.com/huong-dan-rut-tien-8xbet/
https://8xbetcr7.com/huong-dan-tai-app-8xbet/
https://8xbetcr7.com/thong-tin-lien-he-8xbet/
https://8xbetcr7.blogspot.com/
https://8xbetcr7.weebly.com/
https://www.facebook.com/8xbetcr7/
https://twitter.com/8xbetcr7
https://www.youtube.com/channel/UCE6vidFVSThNYsupWsSR0tw
https://scholar.google.com/citations?user=jK_N-QIAAAAJ&hl=vi
https://www.pinterest.com/8xbetcr7/
https://500px.com/p/8xbetcr7
https://social.msdn.microsoft.com/Profile/8xbetcr7
https://social.technet.microsoft.com/Profile/8xbetcr7
https://bbs.now.qq.com/home.php?mod=space&uid=5623062
https://draft.blogger.com/profile/11019736017410826648
https://favinks.com/profile/8xbetcr7/
https://www.blogger.com/profile/11019736017410826648
https://8xbetcr7.blogspot.com/
https://www.reddit.com/user/8xbetcr7
https://vi.gravatar.com/8xbetcr7
https://medium.com/@8xbetcr7
https://www.flickr.com/people/8xbetcr7/
https://www.tumblr.com/8xbetcr7
https://8xbetcr7com.wixsite.com/8xbetcr7
https://8xbetcr7.weebly.com/
https://angel.co/u/8xbetcr7
https://www.goodreads.com/user/show/169709940-8xbetcr7
https://vimeo.com/8xbetcr7
https://www.liveinternet.ru/users/nhacai8xbetcr7/post501061042/
https://sites.google.com/view/8xbetcr7/trang-ch%E1%BB%A7
https://linktr.ee/8xbetcr7
https://www.twitch.tv/8xbetcr7/about
https://tinyurl.com/8xbetcr7
https://ok.ru/nhacai8xbetcr7/statuses/155261674610781
https://profile.hatena.ne.jp/nhacai8xbetcr7/
https://issuu.com/8xbetcr7
https://dribbble.com/8xbetcr7/about
https://www.behance.net/8xbetcr7
https://flipboard.com/@8xbetcr7
https://www.kickstarter.com/profile/8xbetcr7/about
https://leetcode.com/8xbetcr7/
https://8xbetcr7.thinkific.com/courses/your-first-course
https://about.me/nhacai8xbetcr7
https://tawk.to/8xbetcr7
https://ko-fi.com/8xbetcr7
https://www.provenexpert.com/8xbetcr7/
Web Designing
Published: 2023-10-06 11:13:45

Web Designing is the process of creating and arranging elements on a webpage to make it visually appealing, functional, and user-friendly. It involves the use of various design principles, typography, colors, graphics, and layout techniques to create an attractive and effective online presence. Web designers aim to provide a seamless and engaging user experience, ensuring that websites are accessible on different devices and browsers. Ultimately, web design plays a crucial role in conveying a brand's message and achieving specific goals, such as informing, entertaining, or driving user interactions.

 WEBSITE :(https://www.excellencetechnology.in/web-designing-training-chandigarh/)
5 personality traits that will hold you back as a developer
Tags: productivity, learning, discuss
Published: 2023-10-06 10:55:51

1. **Lack of sense of humor** - appropriate jokes make communication more pleasant and as a result more effective. No one wants to work with a robot or worse, a person got triggered by a harmless joke.
2. **Being defensive** - feedback is necessary to grow and defensiveness prevents from accepting & addressing the feedback and consequently from the growth.
3. **Vindictiveness** - sometimes people do offend you but in 99% it's unintentional. Either way, going berserk after them will prevent you from the actual work, worsen the communication and overall productivity of you, the team and everyone else involved.
4. **Absence of self-irony** - we are human and occasionally we make stupid mistakes. The presence of self-irony allows to recognize the situation, joke about it and move forward with a good mood.
5. **Lack of self-reflection** - one who wants to grow must reflect on both what he did & what feedback he got. Going back to this in a month, 3 months, 6 months gives you a different perspective and provides helpful insights. It's like a great book - to fully grasp it you read it the second & third time.

All the great engineers I worked with have excellent sense of humor & self-irony, they never defensive and they regularly reflect on their own performance & development. They appreciate the feedback & strive to address it.

Anything I missed?
Medcy IVF - Best Fertility Clinic in Visakhapatnam
Tags: medcyivf, bestfertilityclinic, bestfertilitycentre, fertilityhospital
Published: 2023-10-06 10:33:35

"[Vizag IVF Centre is Now Medcy IVF](https://www.medcyivf.com/)...! Vizag IVF Centre is one of the best IVF Centres in Gajuwaka / Visakhapatnam / Vizianagaram. Vizag IVF Centre is a state-of-art specialty infertility clinic located in Visakhapatnam and has its branches in Vizianagaram and Gajuwaka. VIZAG IVF CENTRE provides best quality, comprehensive, holistic care to Infertile couple and women at a reasonable cost. Our Treatments: IUI, IVF, ICSI, IMSI, Vitrification, Assisted Hatching, Semen Banking."