teleren/devto huggingface dataset:
สองวิธีแก้ความขี้เกียจ
Published: 2020-07-10 14:00:18

##ความขี้เกียจคือข้ออ้างที่จะไม่ทำการงานต่าง ๆ

1. มักให้อ้างว่าหนาวนัก แล้วไม่ทำการงาน
2. มักให้อ้างว่าร้อนนัก แล้วไม่ทำการงาน
3. มักให้อ้างว่าเวลาเย็นแล้ว แล้วไม่ทำการงาน
4. มักให้อ้างว่ายังเช้าอยู่ แล้วไม่ทำการงาน
5. มักให้อ้างว่าหิวนัก แล้วไม่ทำการงาน
6. มักให้อ้างว่าระหายนัก แล้วไม่ทำการงาน

https://www.youtube.com/watch?v=6NPwQQqrpaA

##วีธีแก้คือ กำจัดข้ออ้างเหล่านี้ออกไปด้วย 2 วิธีการ

#### 1. ลงมือทำทันที ด้วยอุฏฐานสัมปทา
เหมือนตัวสำรองเวลาที่เล่นกีฬา มานั่งๆ นอนๆ อยู่ข้างสนาม. แต่เมื่อไหร่ที่มีการเปลี่ยนตัวลงไปในสนาม ตัวสำรองจะลุกขึ้นอย่างมีชีวิตชีวาทีเดียว 

#### 2. พิจารณาในจิตด้วยการเห็นเป็นทุกข์ ในสิ่งที่ไม่เที่ยง
ความขี้เกียจทำให้มีข้ออ้าง. กำจัดความขี้เกียจด้วยปัญญา โดยการเห็นความเป็นของที่ทนอยู่ได้ยาก ในสิ่งที่ไม่เที่ยง
I tried dev.to and I do understand now
Tags: beginners, codenewbie
Published: 2020-07-10 09:54:20

I have been programming professionally for more than 20 years now.

I wasn't familiar with this community. I decided to give it a go about a month ago, imported a few of my old blog posts, added some new ones, longer posts, quick ones, etc...

My posts are not popular by any means, I usually write about niche backend development stuff that's not very fashionable :-)

The one article that gave me the opportunity to approach dev.to was [Five tips to be more effective on the command line](https://dev.to/cosimo/five-tips-to-be-a-more-effective-command-line-user-44e2), which I **published here for the first time**. It probably got picked up in some feed and a user posted it on reddit a few days later.

**That made me understand the whole point of this community** and why people like it. The same exact post got thousands of views on reddit and mostly positive reactions but also **a few scolding and rude comments** from people that have not even read the whole article, since they were complaining about stuff I did explain.

Here on dev.to, I got barely a few hundred views, but polite and relevant comments from people that had clearly appreciated and read through all, suggesting alternatives or simply their own view on the approaches expressed in the post.

**I like how welcoming and polite this community feels like.**
Does your laptop touch-pad becomes unresponsive or gets stuck in Ubuntu or Ubuntu based systems?
Tags: ubuntu, debian, popos, touchpad
Published: 2020-07-10 13:58:42

Some devices running **Ubuntu 18.04 LTS, 20.04 LTS** and also **Ubuntu based** systems have touchpad issues when the system is put into Lock/ Hibernation mode. The mouse pointer becomes unusable. 

This problem persists despite running on Kernel 5.4.

A quick, yet temporary fix is to reinstall the mouse drivers.

Now, since your mouse is stuck you can use your keyboard to launch the gnome-terminal using shortcut `Ctrl + t` and fire up the commands :

```shell
sudo modprobe -r psmouse
sudo modprobe psmouse
```

Ta-da! Now your touchpad is back in action.

_This also applies to systems running **Debian** OS too._
Typical salary question when applying a job offer
Tags: help, career, discuss
Published: 2020-07-10 13:58:41

Hi, everyone! I already finished my programming vocational education and I'm looking for my first job. At the same time, I'm taking courses and reading books to increase my knowledge. But, when applying to an offer they always ask you which are your salary expectations, and I have no idea what to say to make a good impression. What type of answer do you use? A range of numbers or something like "depending on my contribution"? In addition, if it's my first job I don't know what should I expect... Hope someone can share some wisdom, thaks a lot! 
PD. : i'm native spanish speaker, in case you see something weird
Starting a new journey - blogging 💻
Tags: webdev, beginners, career, javascript
Published: 2020-07-10 13:44:15

👋 Hi! This is Sunil!

I'm from India and I work as a Senior Software Developer at a startup. This article is more of an announcement about starting my journey into the world of blogging.

It's been 6 years since I completed my engineering and been working as a developer since then. But I have always been a consumer on the internet. Consumer of news on social media, consumer of content on dev.to, consumer of discussions on Hacker News etc. I have always been a consumer.

Recently I promised myself to create more content than I consume and to share it with all the people on the internet to help those who are getting started now with programming, SaaS, Bootstrapping etc. Since then I've been very active on [twitter](https://twitter.com/sunilc_) and sharing my knowledge regularly on topics like SaaS, programming, bootstrapping, JavaScript, HTML/CSS and life in general.

I feel I need to start my blogging journey at this point to make more impact and share more knowledge. I love reading articles on dev.to. So starting my journey here is the obvious choice. Connect with me [here](https://dev.to/sunilc_) and on [twitter](https://twitter.com/sunilc_) to be part of this journey. You'll not be disappointed.

Feel free to ask any questions you have. I would be happy to answer them 😃

Cheers! 🍻
How to stop chatbots from killing your page speed
Tags: pagespeed, chatbots, wordpress, javascript
Published: 2020-07-10 13:43:27

---
title: How to stop chatbots from killing your page speed
published: true
description: Eliminate the negative impact chatbots have on your website’s page speed.
tags: pagespeed, chatbots, wordpress, javascript
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/rox83k7nu379dsh7bnzh.png---

When we’re considering JS dependent functionality, we need to weight its benefits against its costs. Chat bots are powerful support and lead gen tools, but like any JavaScript resource it adds weight to your web page, slows TTI, and delays other resources from loading.

And another thing to consider is that fact that folks don't need a chatbot the second they hit your webpage. They need a second or two to take it all in and figure out what they are going to read or click on next. So why are we forcing folks to download chatbots in a way that's not performant and doesn't serve their needs?

That's why I both wrote a [tutorial on how to optimize chatbot's for page speed](https://joeyfarruggio.com/javascript/drift-chatbot-page-speed/) via JavaScript and built a WordPress plugin called [Chatbot Lazy Loader](https://chatbotspeed.com) to do that work for you.

{% twitter 1281360928437673984 %}

What's happening in the JavaScript is delightfully simple. Our JavaScript is delaying the download of the chatbot's JavaScript. And there's more than one way we can implement this.

1. We could set a timer and make the chatbot JavaScript wait 5 seconds.
2. We could create an event listener to detect when the user begins to scroll.
3. We could also prevent the chatbot's JavaScript from loading entirely and wait for the visitor to hover or click on a "Chat with us" button.

The end result is the same though. You get to protect your page speed score and improve your visitor's experience.

Cheers!
3 Things Sword Movies have shown wrong about the swords.

Tags: atlanteansword, katanasword, swordsfighting
Published: 2020-07-10 13:38:14

In Science fiction, action, fantasy, and comic novels, the audience likes to see weapons, fight scenes, magic, supernatural activities, but in reality, we did not have any concern about how they were produced. We want to see our hero or heroine with their weapon while fighting with their enemies, but we certainly do not need to know the whole technique of editing and photomontage. On the other hand, swords have a unique and holy place in our hearts. The first reason would be, who used the sword and for what purpose, and the second is when and where they were manufactured. The one changeless truth about any sword is that they are extremely vulnerable if sharpened and built with a purpose. In the movies and television, they are usually artificial or at least less sharp to prevent any damage being done to the casting team. In real life, a sword is not a toy to play around with.


 <b>Atlantean sword forge with Molten Metal</b>

The Atlantean sword is used in Conan the Barbarian that belongs to an early king, hidden in the small vault. Canon found the vault while following the pack of wolves, and then he saw the Atlantean sword. In the Bronze age, the manufacturing of the sword was pointless. The steel of the blade melts to form the design of the sword. The manufacturing scene of the sword in Conan the Barbarian is imaginary. Steel sword forms are not cast, which is a Bronze Age method using copper metals, not steel. Nobody manufactures on an anvil with a combustible liquid on it.

<b>Katana Sword Are the Greatest Sword Ever Invented</b>

Katana Sword is the traditional sword of the Japanese that was inherited from the samurai sword. This sword is a very sharp sword cut cleanly through the metal, wood, bone, metal, or maybe even Sun, only if someone gets closer to it. The reason is it has some magical powers and also has the folded blade. But in reality, Japanese sword makers used the metal tamahagane, which is also known as pig iron by the westerners. Now if we wrap a piece of paper and do it a few times, then some wrinkles appear on it. Likewise, the Japanese sword maker folds the blade around eight times and in the result, all the carbon sucks out from the steel leaving you with a soft katana that would be better for toasting or on the braid rather than encounter on the Warfield.

<b>Swords fighting in movies and television are not the norm</b>

In actual life, this fight would have been over much sooner and with terrible results for one man. Sword fighting in real life is much more agile and does not lead to support the opponent that has a robust code of attention. It is nothing to laugh at this, and code was often a detriment in a fight to the death. Honour is all well and good, but in a battle with such high stakes, it is best to be practical.

Swords Kingdom UK is the best store for shopping <a href="https://swordskingdom.co.uk/">Replica Swords </a> and Collectibles items in the UK. We offer the most exceptional designs at competitive prices. get to know us better.
Recap / Summary of the week #28
Tags: devjournal, azure, opensource, showdev
Published: 2020-07-13 00:11:34

---
title: Recap / Summary of the week #28
published: true
date: 2020-07-10 13:34:00 UTC
tags: devjournal,azure,opensource,showdev
canonical_url: http://www.frankysnotes.com/2020/07/recap-summary-of-week-28.html
---

Every Friday, starting now, I will share a recap of the week and at the same time a summary of my streams. Those videos are at least two hour longs, so I thought a short summary to know if topic interest you could be useful.

{% youtube KszCPCaT1j0 %}

#### Useful Links:

- Learning how to use a Blazor WebAssembly with Azure AD Token [c5m.ca/stream-ep109](https://c5m.ca/stream-ep109)
- Learning JavaScript Building Twitch chatbot [c5m.ca/stream-ep110](https://c5m.ca/stream-ep1110)
- Demystifying ARM Templates: Parameters [c5m.ca/learn-arm-ep3](https://c5m.ca/learn-arm-ep3)
- MicrosoftDeveloper Twitch channel [twitch.tv/microsoftdeveloper](https://www.twitch.tv/microsoftdeveloper)

  

~☁️
Laravel Homestead Vs Valet
Tags: laravel, php
Published: 2020-07-10 13:30:55

##Intro
When I first started programming I started with Laravel Homestead and thought it was amazing, and it was. But I eventually switched to Laravel Valet and it was a game-changer. Using Homestead simplified running my Laravel environment on my local machine, but Valet took it a few steps further which is why I switched.

##What is Laravel Homestead?
Here it is straight out of the Laravel Documentation.
>Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine. No more worrying about messing up your operating system! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in minutes!

```
<?php

/**
 * Pros and cons of using Laravel Homestead
 */

$pros = [
    'Comes with PHP & a web server.',
    'It runs on a virtual machine, which can be destroyed if something goes wrong.',
    'It runs on Windows, Mac, or Linux'
];

$cons = [
    'You have to boot up a virtual machine each time you need to run the development site.',
    'You have to manage the configuration through a YAML file',
    'Anytime you start a new project you have to add the config details'
];
```

##What is Laravel Valet?
Here it is straight from the Laravel Documentation.
>Valet is a Laravel development environment for Mac minimalists. No Vagrant, no /etc/hosts file. You can even share your sites publicly using local tunnels. Yeah, we like it too.

>Laravel Valet configures your Mac to always run Nginx in the background when your machine starts. Then, using DnsMasq, Valet proxies all requests on the *.test domain to point to sites installed on your local machine.

```
<?php
/**
 * Pros and cons of using Laravel Homestead
 */

$pros = [
    'No configuration after initial setup.',
    'Can run localhost on https.',
    'Can use ngrok to share development site publicly.'
];

$cons = [
    'It runs on your machine',
    'Only supports mac.',
    'You have to manually install the database and PHP.'
];
```

##Why I chose Laravel Valet over Homestead.
I don't like being stagnant when it comes to technology, meaning I like constantly trying new things. That's why I gave Laravel Valet a try. Setup for both takes about the same amount of time but once you setup Valet there is no more configuration, unlike with Homestead.

For example, with Valet when you add a new project to your directory it's automatically configured to work. Meaning, if I add my-project to my www folder I can go to my browser and enter my-project.test and it works. With Homestead, you have to go into your YAML configuration and configure your new project to work before you can pull it up in your browser.

##Conclusion
You can't go wrong using either Homestead or Valet, it comes down to preference. For me, Valet helps speed up my workflow allowing me to focus more on what matters which is programming, not setup.
Angular 10 Upgrade Report
Tags: angular, typescript
Published: 2020-07-10 13:24:41

Angular 10 upgrades appear to work quickly with little problems..
The Angular support folks read all issues and will respond quickly.


**The Long Version**

I became highly frustrated with an Angular 8 refactor project recently, I had seen everyone of these errors below. You know it's true because, nobody could just make up these awful messages?

[ERROR in No NgModule metadata found for 'AppModule'](https://www.google.com/search?q=ERROR+in+No+NgModule+metadata+found+for+%27AppModule%27)

[Cannot read property id of undefined](https://dev.to/jwp/uncaught-typeerror-cannot-read-property-id-of-undefined-5104)

[Cannot read property map of undefined](https://www.google.com/search?q=angular+cannot+read+property+map+of+undefined)

[Accessor cannot be declared in an ambient context](https://www.google.com/search?q=An+accessor+cannot+be+declared+in+an+ambient+context)

[Angular has no exported member](https://www.google.com/search?q=angular+has+no+exported+member)

[InjectionToken Function Calls are not supported ](https://www.google.com/search?q=%2527InjectionToken%2527%252C%2Bfunction%2Bcalls%2Bare%2Bnot%2Bsupported)

[ERROR: Dependency @angular/animations must be explicitly whitelisted](https://www.google.com/search?q=%40angular%2Fanimations+must+be+explicitly+whitelisted) 

[An unhandled exception occurred: Configuration 'production' is not set in the workspace](https://www.google.com/search?q=Configuration+%27production%27+is+not+set+in+the+workspace)

[Error: self signed certificate in certificate chain - without reporting where or what to look for](https://www.google.com/search?q=self+signed+certificate+in+certificate+chain+angular+cli)

[Cannot find a differ supporting object..](https://www.google.com/search?q=Cannot+find+a+differ+supporting+object)

The effort to resolve them was two weeks! Having even tried a migration to 9.LTS; it made things worse. I almost made it but the Angular folks [kept asking me if I updated to 10.0](https://github.com/angular/angular/issues/37859) because many of these were fixed.  I'm sure many of the issues were somehow my fault, but I wasn't making much progress.

I gave it a shot, and the good news is that the Angular 10 upgrade experience was good.  I did see peer dependency issues due to their calling out pre Angular 10 dependencies (was forced to ignore them). Two projects, one a library and the other an enterprise application were done in 2 hours!



The best part was after two weeks I was where I started, refactoring existing code. 


JWP 2020
Is Windows Good for Developers Again? - A Review by a Senior Software Engineer
Tags: programming, windows, wsl, winget
Published: 2020-07-10 13:18:44

Hello chaps, I am the QuanticDev, a senior software engineer with a decade of experience. I have started my development career with Windows back in middle school. I mostly did PHP back then, along with some basic C/C++ using Borland C++ Builder 6, and it worked out great! However, since then, Windows became the underdog of software development. With the power of free and open-source software, Linux has taken over the server world. The easiest way to write server-side apps that target Linux is to use a Unix based system like macOS or Linux, and not Windows! In addition, Windows never had a great package manager. There were attempts like Chocolatey or Scoop, but they are no match to Homebrew on macOS or 10 different package managers found on Linux systems. Now that we have the second version of Windows Subsystem for Linux, as well as the shiny new Windows Package Manager called “winget”, did the tables turn? Let’s find out.

Video: https://www.youtube.com/watch?v=QnHGGmLMKO0
Article: https://quanticdev.com/articles/is-windows-good-for-developers

Outline of this video/article:
* Overview
* Windows Package Manager (winget)
* Windows Subsystem for Linux 2 (WSL 2)
* Downsides of WSL and winglet
* Is Window with WSL 2 and winget a Worthy Developer OS?
Writing 'Testable' Code Feels Wrong
Tags: discuss, testing, complexity, abstraction
Published: 2020-07-10 13:18:10

---
title: Writing 'Testable' Code Feels Wrong
published: true
description: Invitation to discuss the practice of writing 'testable' code
tags: discuss,testing,complexity,abstraction
//cover_image: https://direct_url_to_image.jpg
---

So, as weird as this may seem, I'm currently in the process of adding tests to a project I'm building at work. Why weird? Because I've never done this before in 25 years as a professional developer.

Some of the code was pretty straightforward to write tests for, but as I progressed it became obvious that refactoring would be needed in order to be able to write tests in some areas. Before this refactoring, the code was succinct, easy to read and had (to my mind) just the right amount of abstraction. The changes necessary to make it 'testable' however, seem to make it overly complex and less efficient just for this 'benefit' of having tests. It just feels... wrong.

Surely the primary function of the code should be that it does the job it's designed to do - ideally as efficiently and (from the developer's point of view) understandably as possible. Going through the contortions and extra layers of abstraction necessary to make it testable seems to fly in the face of these goals.

Does anyone else feel this way? Is this an issue with all languages? Is there a better way of doing things?




Discuss.
Creating interactive sticker "Hello, my name is..."
Tags: javascript, sticker, scss, codepen
Published: 2020-07-10 13:17:35

Using only the basic tools (HTML, CSS & Pure JavaScript) I created this simple tool for updating your text and other properties related to it.

I've decided I don't want to use jQuery in this projects, as it's starting to feel a bit outdated. Pure JavaScript is now the way to go.

I've tried to simplify/minify the code as much as possible. Here you can check the final result and if you want to request any update for this project, let me know below.

Full version, with graffiti fonts: https://mpittas.github.io/hellomynameis/

Codepen: 
https://codepen.io/mariospittas/pen/wvMXzJW

You can check my personal website here: https://mariospittas.com/

Thanks for reading!
GSoC with CHAOSS - Weeks three and four
Published: 2020-07-10 13:16:38

Hello reader!

This is my second bi-weekly report about my GSoC work with CHAOSS. These last two weeks included writing a new helper bot for CHAOSS Badging. This report will be a new format than the previous ones, not divided chronologically but rather a combination of the work I did during this time.

So without further delay...

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

Let's get started!

**Templates, checklists and reframing**
These last two weeks were about finalizing templates that the applicants would interact with, and the checklists the reviewers would interact with.
With [Event Criteria](https://github.com/badging/event-diversity-and-inclusion/) came the new question about badge levels, since all Events are not created equal in terms of metric criteria they would fulfill. For now, we are considering only two Badge levels for Events, pending and passing

**Enter the bot**
Automation is going to be something that I'll be primarily focusing on in the month of July. For now, to help out with the process (reducing manual work of copying and pasting the Markdown lists from one place to another), I wrote out this small bot called `list-bot-test`, which does the following things:
- When a PR is opened, it greets the applicant using content from `.github/applicant-welcome.md` of the repository the bot is installed on.
- Admins / Owners of the repository (as of now) manually assign reviewers.
- A checklist is generated for the assignee (tagging them by username), who has been beforehand given `write` level or collaborator access to the repository.

Link to the source code - https://github.com/bistaastha/list-bot-test

**Coming up next...**
- Bots which do certain things on being called by a slash commands
- Pilot testing for the CHAOSS Badging program.