teleren/devto huggingface dataset:
Don't overdo Code Katas
Tags: programming, motivation, codequality
Published: 2021-01-26 14:18:31

This post is a sequel to “[The Polyglot Developer](https://dev.to/glnds/the-polyglot-developer-2440)“, another blog post I recently wrote. If you haven’t read it yet, I can recommend reading it first. It will give you a better insight in my way of thinking.

## First of all, I like code katas
It’s not that I don’t like code katas. On the contrary, there are two scenarios for which I really like to use code katas:
- When learning a new language
- To take my language skills to a higher level, most of the time, in a very particular area.

But that doesn’t mean code katas are a panacea.

## Don't put all your eggs in one basket
What bothers me about code katas is that I’ve seen people spending all their extra energy on them. Don’t get me wrong; it’s good to have in-depth language skills. But what if you have spent days on optimising the code of a backend method to get latency down by eight milliseconds? What is the value of that achievement? Especially, if you could have achieved a tenfold of that number with less effort by just putting a CDN in front of your application!? The solution is not always in code, sometimes it's more about architecture or maybe tweaking the write concern of a database...

**Instead of taking a deep dive, it could be better to gain broader knowledge first.**

### Idiot Savant VS homo universalis

If all you know is a single language and a single architecture, then I would advise against sorting out every nitty-gritty detail of that langue. At that point, I think there’s more value in gathering information about other architectures, get familial wit Microservices,(Immutable) infrastructure, Chaos engineering, .... or just another language :smile:. 

The danger of knowing a single thing is tunnel vision or making yourself guilty to over-usage. Or Like Abraham Maslow said: "[I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail](https://en.wikipedia.org/wiki/Law_of_the_instrument)”.

It’s not a bad thing to use code katas to become a specialist but don’t forget to broaden your horizon in the meantime.

Enjoy and until next time!
Day 33 Of 100DayOfCode: Python Code Using Sqlite Operator
Tags: 100daysofcode, codenewbie, beginners, python
Published: 2021-01-26 14:18:00

This is my 33 day of #100DaysOfcode and #Python. Today I Revised python data structure from coursera. Completed some assignment. Tried to write some code regarding to that topic. Also continue to learned more about database using python. Create some table using SELECT, UPDATE, JOIN operator.

Below is the code where joined operator is used to join the row of the different table.

# Python Code Using Join operator.
 In this code at first we importing sqlite3 library. We used the table teacher. We choose the row from Teacher table similarly. We used Department table and choose the row from Department table. And we apply JOIN operator To join the row of Department table and row of teacher table. 
```python
import sqlite3

conn = sqlite3.connect('school.sqlite')
cur = conn.cursor()

cur.execute('SELECT * FROM Teacher')
count = 0
print('Teacher:')
for row in cur:
    if count < 5: print(row)
    count = count + 1
print(count, 'rows.')

cur.execute('SELECT * FROM Department')
count = 0
print('Department:')
for row in cur:
    if count < 5: print(row)
    count = count + 1
print(count, 'rows.')

cur.execute('''SELECT * FROM Department JOIN Teacher
            ON Department.code = Teacher.id
            WHERE Teacher.id = 3''')

count = 0
print('Connections for id = 3:')
for row in cur:
    if count < 5: print(row)
    count = count + 1
print(count, 'rows.')

cur.close()

```
When this code is run I got following output
```python
Teacher:
(1, 'Tulsi prased Nepal', 2024, 'Male', 'Mathematics')
(2, 'Viper Kaka', 2055, 'Male', 'It')
(3, 'Naran Gautum', 2044, 'Male', 'Physics')
(4, 'Bishnu Gyawali', 2045, 'Male', 'Statictits')
(5, 'Sarmila Pandey', 2053, 'Female', 'Chemistry')
11 rows.
Department:
('001', 'Mathematics')
('002', 'Physics')
('003', 'Chemistry')
('004', 'Biology')
('005', 'Zoology')
10 rows.
Connections for id = 3:
('003', 'Chemistry', 3, 'Naran Gautum', 2044, 'Male', 'Physics')
1 rows.
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 33 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>* More About Database Using Python . <br>* Code Using Join Operator.<a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> ,<a href="https://twitter.com/hashtag/CodeNewbies?src=hash&amp;ref_src=twsrc%5Etfw">#CodeNewbies</a> ,<a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <a href="https://t.co/DkoK3N8O8G">pic.twitter.com/DkoK3N8O8G</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1354066846413168641?ref_src=twsrc%5Etfw">January 26, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
บันทึกการ setup Python ให้มันเขียนได้ใน VSCODE
Tags: python, vscode
Published: 2021-01-26 13:59:50

![Screenshot_1](https://dev-to-uploads.s3.amazonaws.com/i/9eecqt2fc8m1r01ko9b4.jpg)

บทความนี้เขียนเพื่อบันทึกการ setup Python ของผมเองถ้าใครมีวิธีดีกว่านี้ก็ช่วยบอกหน่อยเถอะ

ลง extension นี้ใน vscode
![Screenshot_17](https://dev-to-uploads.s3.amazonaws.com/i/snbujrc0ldcmt8ecv3qz.png)


ctrl+ship+p 
เลือก Select Linter

![Screenshot_18](https://dev-to-uploads.s3.amazonaws.com/i/zcpftoifkgp5nvwkr7gu.png)
 
เลือก pylint (มีมาตรฐานอื่นๆด้วย)

ตรงนี้สั้นๆ 

Pylint เป็นเครื่องมือหนึ่งใน Python ใช้สำหรับตรวจสอบคุณภาพและประสิทธิภาพของโค้ด Python ที่เขียน ว่ามีคุณภาพอยู่ในระดับใด โดยอ้างอิงตามหลัก **PEP 8** ของ Python 

จริงก็มีเครื่องมืออื่นๆแหละแต่ไม่ได้ลองใช้ที


อ่านต่อที่บทความนี้ได้
https://kuma-cheatsheet.github.io/python/PyLint/

ลง PEP 8
```
pip install --upgrade autopep8
```

 python มันใช้ interpreter แล้วถ้าเราจัด indent ไม่ดีมันก็ไม่ให้เราผ่าน
เวลา copy paste ก็เสียเวลาจัด ผมเลยใช้เจ้านี้แก้ปัญหา

![Screenshot_19](https://dev-to-uploads.s3.amazonaws.com/i/16562x7ql1c6kq064t4c.png)
 

บวกกับอยากรัน code เร็วๆ ใช้เจ้านี้ช่วย![Screenshot_20](https://dev-to-uploads.s3.amazonaws.com/i/ay47o66tjn4x41bs27pi.png)


อย่าลืมที่จะตั้ง key ลัดหล่ะ

![Screenshot_9](https://dev-to-uploads.s3.amazonaws.com/i/b0byqblkpabrxyin2tbt.png)
The Little Prince - Computational Thinking 101 | Beginner
Tags: beginners, algorithms, javascript, programming
Published: 2021-01-26 13:52:43

### Solution [HERE](https://dev.to/wahidd/the-little-prince-solution-javascript-computational-thinking-101-beginner-148j)

Continuing `Computational Thinking 101` for beginners, next up is a problem which involves `loops` and a small touch of `math`.

---

### The Little Prince
The Little Prince, who lives on asteroid B-664, loves Rose. One day, the little prince, learning that Rose was in danger, began a long journey through the Milky Way to save Rose. However, the little prince's spaceship is not that good, so Little Price has to avoid planetary systems (gravitational fields) as much as possible on his way. The picture below is a part of the Milky Way map traveled by the little prince.

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

The **red solid line** is the path that minimizes the number of *entry/exit* into ***planetary systems*** required for the little prince to travel from starting point to the end point. The circles represent the boundary of the planetary system. There are multiple path to go from start to end points, but  at least 3 *entry/exit* of the planetary system is required.

Given the milky way map with coordinates of planetary systems, **starting & destination points** of Little Prince, let's write a program that finds the path with minimum **enter/exit**s into planetary systems. 
> Assume that the boundary of planetary systems do not intersect with each other. In addition, assume that **starting & destination points** are not on the boundary of planetary systems.

---

### Inputs
- First line, number of test cases `M`.
- From the next line, for each test case:
    - In the first line, a starting point (`x1 , y1`) and a destination point (`x2 , y2`) are given.
   - In the second line, `N` is the number of planetary systems
   - From the third line, there are `N` lines with (`cx, cy, r`), **center** point and **radius** for each planet. The input *constraints* are as follows. (`-1000 ≤ x1, y1 ,x2 ,y2 , cx, cy ≤ 1000, 1 ≤ r ≤ 1000, 1 ≤ N ≤ 50`)

> All inputs are `integers`.

For each test case, print the minimum number of times the little prince must **enter/exit** the planetary system.

| INPUT      | OUTPUT |
| ----------- | ----------- |
| `2` <br /> `-5 1 12 1` <br/> `7` <br /> `1 1 8` `-3 -1 1` <br/> `2 2 2` <br/> `5 5 1` <br/> `-4 5 1` <br/> `12 1 1` <br/> `12 1 2` <br/> `-5 1 5 1` <br/> `1` <br/> `0 0 2`      | `3` <br/> `0`<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/> |

---

### Solution is coming in couple of hours !
Just wanna let some people try out first ^^
I am on Twitch - Come work on Selenium with me!
Tags: selenium, twitch
Published: 2021-01-26 08:36:34

At the end of 2020, I wanted to try something new, well new for the Selenium community. I created a new [Twitch channel](https://twitch.tv/automatedtester).

## Why?

The main reason is that I wanted to show people that working on Selenium is not scary. You don't need to be a "rockstar" engineer. Actually, Rockstars are actively discouraged since they normally just trash hotel rooms.

## What have I done so far?

I have shown people around the codebase. With Selenium being a [monorepo](https://trunkbaseddevelopment.com/monorepos/) which we do [Trunk Based Development](https://trunkbaseddevelopment.com/). This can seem scary to some people seeing the code for the first time. I showed that it's not scary!

I also showed people how they can contribute to the [Selenium Documentation](https://github.com/seleniumhq/seleniumhq.github.io). Documentation is how a number of Selenium Core contributors got into the project as it is a definite pay it forward system, making sure that future Selenium users
have correct working examples.

And last week was about starting to remove all the python 2 specific code from the python part of the tree. This is not complete and, this week, I hope to work on it a bit more. I will be leaving the code base littered with TODO if anyone wanted to contribute.

## When

At the moment there is a session every Thursday at 2 PM GMT. Hopefully, as the UK comes out of lockdown, I will be able to add a few more sessions during a week. If you [subscribe to the channel](https://www.twitch.tv/automatedtester/) you will be updated as sessions change and be notified when a session has started. So please do subscribe! If you miss a session they are stored on Twitch for a couple weeks so you can always catch up later.

## Future Sessions

As we go through the year if you have ideas of things you want to see in a session, please let me know. My DMs on [Twitter](https://twitter.com/automatedtester) are open or feel free to add something to a session chat.

Originally posted on [my blog](https://www.theautomatedtester.co.uk/blog/2021/i-am-on-twitch/)
Bash sin sorpresas
Tags: tip, bash
Published: 2021-01-26 13:34:21

---
title: "Bash sin sorpresas"
published: true
tags: ["tip", "bash"]
canonical_url: https://marceloandrader.github.io/blog/2021/01/26/bash-sin-sorpresas/
---

Existe una línea de código que agrego siempre a los script bash
que me ayuda mucho a evitar errores comunes cuando se escribe
un script.

```
#!/bin/bash

set -euxo pipefail
```

La tercera línea en este ejemplo sirve para indicar al interprete
lo siguiente:

*set -e* Le dice a bash que termine inmediatamente si algun comando falla

*set -o pipefail* Bash normalmente revisa el último código de salida cuando se ejecuta en pipes. Con este cambio el comportamiento hace que si un comando falla en un pipeline todo el pipeline falle.

*set -u* Esta opción hace que el interprete emita un error y salga si una variable no esta definida.

*set -x* Esta es mi favorita porque permite imprimir en la consola cada comando antes de ejecutar. Los argumentos son expandidos.

Si desean ver ejemplos de cómo funciona por favor revisar:

[Safer bash scripts with set -euxo pipefail](https://coderwall.com/p/fkfaqq/safer-bash-scripts-with-set-euxo-pipefail)
My Common Lisp config in January 2021
Tags: commonlisp, environment, config
Published: 2021-01-26 13:19:02

---
title: My Common Lisp config in January 2021
published: true
description: 
tags: commonlisp, environment, config
//cover_image: https://direct_url_to_image.jpg
---

I specified the source path in $HOME/.config/common-lisp/source-registry.conf.


source-registry.conf:

```Lisp
(:source-registry
  (:tree (:home "Develop/t/mt2021"))
  (:tree (:home "Develop/free"))
  :inherit-configuration)
```

Common Lisp packages can be put in $HOME/Develop/t/mt2021 or Develop/free.

Now I create a new project using Quickproject. 

In SBCL, I ran this:
```
* (ql:quickload 'quickproject)
* (quickproject:make-project #p"~/Develop/free/amphi" :depends-on '(arrow-macros cl-ppcre jonathan))
```

I just realized yesterday that I don't have to use 

```Lisp
(asdf:load-system :amphi)
```
. 

I can use 

```Lisp
(ql:quickload :amphi)
```

to load my  local projects. The upside of ql:quickload is that it also install all dependencies specified in .asd.

Now the process is easy and started to make sense. 😅
GraphQL Beginners Meetup
Tags: graphql, techtalks, meetup
Published: 2021-01-26 13:14:58


🎤 On the 3rd of February, at 6 PM CET, we're hosting an edition of GraphQL Berlin Meetup dedicated to the new adepts of GraphQL art. 

We have two amazing speakers scheduled for this event:

◭ [Vignesh T.V.](https://twitter.com/techahoy): **"GraphQL - From A to Z"**
◭ [Stephan Schneider](https://github.com/zcei): **"Ramp up your GraphQL learning experience with data you already have"**

During this meetup we'll host a quiz with prizes to be won!

You can watch this meetup on YouTube and add a reminder here: https://www.youtube.com/watch?v=pQPgQ3oOoJo

More details here: https://www.meetup.com/graphql-berlin/events/275884588/

Hoping to see you there. 🤗

![GraphQL Berlin](https://dev-to-uploads.s3.amazonaws.com/i/0lx97o1fdc9eiua6pv7v.png)
How To Become a Software Engineer Without Going To College
Tags: career, codenewbie, productivity, beginners
Published: 2021-01-26 13:07:25

**1. Be very specific about your end goal:**
Were you ever asked to draw anything on the paper but you didn't know what because there was no topic? Well, this is no different, and here is why. You will hear a lot of opinions on what language you should learn and after spending 2 to 3 months learning it, you find out that what you want to build cannot be accomplished because you didn't learn the right language. So by identifying from the very beginning what you want to build in the future (let's say you want to build web applications), will help you to filter out what tools and languages you should not waste your time on. #savetime

**2. Choose appropriate language and tools:**
After figuring out what you are planning to build, you still need to identify what languages or frameworks you should focus on the most. Because when you will look for a job, you want to be relevant to the positing and match the languages/frameworks that they are using it. I would recommend to take a look at a few jobs and see what they have in common. Once you figured that out, you are one step closer to the goal.

**3. Create small projects:**
When you are learning something new, try to use it in a small simple project. It doesn't have to be complex, but it needs to have a problem that you are trying to solve. Software development is all about solving problems so if you can get better at it, you will start creating bigger showcase projects that you could show to people.

**4. Networking:**
As you are starting out to learn to program, you should probably spend a bit of time getting to know people who are already in the industry. You could get a lot more information on what they are looking for, you could also tell them what you are doing and maybe once you are ready, you could apply to work at that company. 

These are my top 4 tips on what you need to do in order to succeed without going to college. If you think it's getting difficult, try to find a community that is focused on learning the same things as you.

Subscribe to my youtube channel DevPool as my goal is to help beginners and juniors to succeed in the tech industry.

[YouTube - DevPool](youtube.com/channel/UC03vw5F2isFkbJhyEZU5bvg?sub_confirmation=1 "DevPool")
New Doc Section "What's Here" for Ruby class String
Tags: ruby, documentation, string
Published: 2021-01-26 13:02:23

---
title: New Doc Section "What's Here" for Ruby class String
published: true
description: 
tags: ruby, documentation, string
---

I've finished the What's Here section for the documentation for class String. It's merged but not yet released. You can view it here: https://docs.ruby-lang.org/en/master/String.html#class-String-label-What-27s+Here.
Daily Developer Jokes - Tuesday, Jan 26, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-01-26 13:00:12

---
title: "Daily Developer Jokes - Tuesday, Jan 26, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Tuesday%2C%20Jan%2026%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259620ca4d.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Where does the pirate stash all of their digital treasures?

___A:___ RAR
 -->
Learn complex programming topics as simple ideations
Tags: showdev, programming, beginners
Published: 2021-01-26 12:48:23

Learning complex topics like algorithm complexity etc requires quite some time to understand. You can start putting a base on them by understanding them as ideations. 

Microideation app was created as a lockdown project and now has content on various topics explained as ideations ( An ideation is a concrete explanation of a topic within 500 characters created by subject-matter-experts on the field using rich formatting and images). You can use this as a casual method of learning or refreshing of your memory on the topics that you already work on. 

{% youtube svBiJRg0S8k %}

You can navigate the ideations using simple swipe gestures and each swipe brings up a new unseen content based on preferences. Freeze and follow a subject ( like complexity ) and see the entire content. There are also links to other ideations that you can refer to.

Download the app ( no registration and it's free ) 
https://play.google.com/store/apps/details?id=com.microideation.app

Visit the portal and contribute your content 
https://www.microideation.com
Course review: Master Laravel with Vue.Js
Tags: vue, laravel, webdev, codenewbie
Published: 2021-01-26 12:24:30

Hello Community,

Recently I bought a course from Udemy which teaches Laravel with Vue.js and here is my review of the course.

1.*Instructor: Piotr Jura*
2.*Available on [Udemy](https://www.udemy.com/course/master-laravel-6-with-vuejs-fullstack-development/)*
3.*Rating on Udemy: 4.5/5 (693)*

#Incomplete... 

I felt the course is incomplete because it said to be a masterclass of Vue+laravel so I was expecting a few sections on the basics of Laravel and Vue, I already know Laravel but a complete novice when it comes to Vue so I expected a basic intro to Vue but instead the instructor just showed what we needed to start and then just started to make the project, the main project that he builds throughout the course is called LaravelBnb which is a stripped-down version of Airbnb. He doesn't even teach image uploading and how to show it in a Vue frontend, but as I said the course feels like it's in the beta phase. 

There is a section of Vue named Diving into Vue.js but it's not much to it he explains V-bind and V-for in a super-complicated way, I just felt like the instructor complicates simple things that may also be done more simply.

#Final Verdict:

I think Piotr Jura's Master Laravel with Vue.js Fullstack Development course on Udemy is not suitable for beginners or people new to Laravel and Vue. Because he is over-complicating things and does not clearly teach many concepts just tries to complete his project.

> This is just my opinion and if you buy a course from Udemy they also offer a money-back guarantee for 30-days after your purchase
so this is completely up to you if you want to buy it or not.

Peace.
Bookmark to show your typed password
Tags: javascript, productivity
Published: 2021-01-26 12:14:33

You know when you typed your password but the page doesn't have the option to show the typed password?

You can right click on password field and change the input type to text:
![Inspecting password field and changing it](https://dev-to-uploads.s3.amazonaws.com/i/sxullpoardwgcqg6vkcg.png)

#### Extra tip, you can run a code to do it on your bookmark.
On the bookmark you can put some javascript instead of a link and it will run the javascript as if you had access to the page. Basically, you inject javascript in the current page.

##### Step 1 - Show bookmark bar
##### Step 2 - Duplicate any bookmark
##### Step 3 - Right click on bookmark and click Edit
##### Step 4 - Change the name accordingly
##### Step 5 - Add the following script on URL
```
javascript: (function() {
  document.querySelectorAll("input[type='password']").forEach((i) => (i.type = "text"));
})()
```
![Editing bookmark with Javascript code](https://dev-to-uploads.s3.amazonaws.com/i/lninwl5z6w0p5w9z9ns4.png)

##### Step 6 - On the pages with password, you just click on the bookmark and the typed password will be shown.