teleren/devto huggingface dataset:
How to do "if a package is installed, do something" with Ansible
Tags: ansible
Published: 2020-06-14 14:45:16

When you create Playbook, sometimes you may want to do these kinds of tasks.

- if a package is installed, do something
- if a user exists, do something

To only check the existence of packages or users without actually installing them.
For this kind of task, `command` or `shell` modules works fine.

```bash
  tasks:
    - name: check if httpd is installed
      shell: rpm -qa | grep httpd
      register: httpd_installed
      ignore_errors: True
      check_mode: False
      changed_when: False

    - name: print
      debug:
        msg: "httpd is installed"
      when: httpd_installed.rc == 0
```

But this is a little bit of trouble when you use it many times.

- Extra parameters like `changed_when` or `ignore_errors` should be set 
- Warnings may be thrown at running Playbook or ansible-lint

So this article introduces some modules which can replace your command modules and make your Playbook simpler.

## Test Environment
ansible: v2.9.9  
targetOS: CentOS7.7 and Ubuntu 18.04

## stat

https://docs.ansible.com/ansible/latest/modules/stat_module.html

`stat` module gets info of files.
Not only existence, it also checks file type(file/directory/link) or owner/group etc. 


```
  tasks:
    - name: check if /etc/hosts exists
      stat:
        path: /etc/hosts
      register: etchosts

    - name: print
      debug:
        msg: "/etc/hosts exists"
      when: etchosts.stat.exists

    - name: print
      debug:
        msg: "/etc/hosts is directory"
      when: etchosts.stat.isdir # this should be False
```

## package_facts

https://docs.ansible.com/ansible/latest/modules/package_facts_module.html

`package_facts` module gets installed packages list.
The info is available with `ansible_facts.packages`

```
  tasks:
    - name: check packages
      package_facts:
        manager: auto

    - name: print
      debug:
        msg: "Version of NetworkManager is {{ ansible_facts.packages['NetworkManager'][0]['version'] }}"
      when: "'NetworkManager' in ansible_facts.packages"
```

## getent

https://docs.ansible.com/ansible/latest/modules/getent_module.html

`getent` module is a wrapper of getent command and can get info from passwd or group.
The info is available with `getent_***` (*** is the name of database)
*Available databases varies on each OS and version.

```
  tasks:
    - name: check users
      getent:
        database: passwd

    - name: print
      debug:
        msg: "app1 user exists"
      when: "'app1' in getent_passwd"
```

## service_facts

https://docs.ansible.com/ansible/latest/modules/service_facts_module.html

`service_facts` module get services list.
The info is available with `ansible_facts.services`

```
  tasks:
    - name: check services
      service_facts:

    - name: print
      debug:
        msg: "firewalld is {{ ansible_facts.services['firewalld.service']['status'] }}"
      when: "'firewalld.service' in ansible_facts.services"
```

## Conclusion

By using each module instead of command module makes your Playbooks simpler and more useful for multiple OSs.
OpenJDK 15 - Unsafe Garbage
Tags: linux, devops, java
Published: 2020-06-15 03:49:08

---
title: OpenJDK 15 - Unsafe Garbage
published: true
description: The next release of OpenJDK is number 15. I will title this release unsafe garbage as it focuses on garbage collection and removing usages of unsafe methods. We also look at string blocks and records.
tags: linux, devops, java
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/nme3khu7i39ykjkcmhdl.jpg
---

{% youtube 7duUZYvNFWw %}

The next release of OpenJDK is number 15. I will title this release unsafe garbage as it focuses on garbage collection and removing usages of unsafe methods. We also look at string blocks and records.
Creating a Personal Website/Portfolio
Tags: career, webdev, beginners, html
Published: 2020-06-15 03:02:32

# **The Beginning of My Online Brand!**

Preview of my website:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ap2glsju22cxnxwsuark.gif)

First of all, I would like to thank you so much for the fantastic response everyone gave in my last [post](https://dev.to/saracunn/do-i-need-a-personal-website-portfolio-jpp)! There were so many helpful comments, and I appreciated everyone taking the time to share their thoughts. 

After reading through the comments, a majority of people said why not and go for it, which is what I did. Over the weekend, I looked at various website builders to start my new website. I came across a lot of great options like WordPress, Wix, Netlify, and many others. The debate I was having with myself was if I wanted to create a simple website on a WYSIWYG (what you see is what you get) platform or to code it myself. 

My final decision was to code, but with some guidance. I could create a fundamental website by myself, but I wanted more complexity and functionality to it. I found a great tool called [HTML 5 UP](https://html5up.net/), which makes HTML sites. My choice was influenced by the fact that I want to improve my front-end web development skills. Through their HTML template, I can go through the code, pick up the language, and figure things out on the go. I also really like that they do give me a template, but I can add my features to it and customize it to anything I want. One of the things I added was the typewriter animation, which someone told me about in the last post. 

Overall, I like where my website is going, and I want to keep working on it. It's not currently up and running, but I will let you know when it is, so if you're interested, you can check it out. 

Thanks again to everyone who commented on my post — all of you inspired my website!
show http proxy used by ansible
Tags: ansible
Published: 2020-06-15 02:57:19

```
- name: show proxy env
  block:
    - name: show http_proxy
      command: echo $http_proxy

    - name: show proxy ip                                                                                                                                                                                          
      uri:                                                                                                                                                                                                         
        url: http://httpbin.org/ip                                                                                                                                                                                 
      register: content                                                                                                                                                                                            
                                                                                                                                                                                                                   
    - name: show public ip of proxy                                                                                                                                                                                
      debug:                                                                                                                                                                                                       
        var: content.json 

  tags: never
```
Just built a brain trainer app
Tags: android
Published: 2020-06-15 02:48:04

Mostly a recording for my own use while I take on https://www.udemy.com/course/the-complete-android-oreo-developer-course/learn/lecture/8339458#content

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4ixcb0gyrxrowpmgmnck.png)

# Summary of learnings:
- lombok is useful, easy to use for android
- adding dependencies to projects is done via build.gradle
- Having a different activity allow users to use the "back" button as part of interactions. 
- may start learning how to unit tests some of these things, getting a bit complex and need to catch bugs. 

# Some notes:
- Might be a good idea to get a google play account so I can send the app to other people to sue
- Could implement difficulty level + highest score

# Time taken:
- About 3 hours
- Trying to build a grid using Relative Layouts is a bit of a pain
  - Might want to use fragments or some other programmatic way to do this. Might just use GridView since it's convenient.
bye, element...
Tags: beginners, functional, python
Published: 2020-06-15 02:38:40

Remove in a randomic way any array elemet.
``` python
List=["baby","computer","mouse","car","nootebook"]
print(List.pop())
print(List)
```
and if you want... remove a specific element you can print them
Like:
```python
list=["books","store","location"]
print(list.pop(2))
```
3 maneiras de usar o comando 'cd' no terminal
Published: 2020-06-15 02:34:44

O objetivo deste post, é apresentar algumas maneiras de se usar o comando `cd` no linux. Não é nada aprofundado, mas espero que ajude algumas pessoas.

# Introdução
Este comando, para quem não está familiarizado com o terminal, serve para você transitar entre as pastas do sistema. No entanto, existem algumas maneiras interessantes que podem te economizar tempo e esforço de digitação. Vem comigo!

## 01 - Voltar uma pasta na hierarquia de pastas
Quando eu comecei eu sempre escrevia todos os caminhos que eu queria tanto ir, quanto voltar. Isso era até um fator que eu demorei para adotar o linux completamente como ferramenta de trabalho. Enfim, você não precisa fazer como eu, use:
` $ cd ..[/..]`

Com esta instrução você consegue voltar na hierarquia quantas pastas quiser. Esta instrução vai ser sua melhor amiga no dia a dia.

## 02 - Ir para a pasta do usuário
Há um tempo atrás sempre quando eu queria voltar para a pasta do meu usuário (pasta quando inicia o terminal), tinha que digitar exatamente o caminho para lá:
`$ cd /home/local/rafael.oliveira`

Uma outra opção muito adotada por mim era esta, com intermináveis "..":
`$ cd ../../../../..`

Porém, não é mais necessário fazer isso tudo. Com apenas um carácter é possível fazer esta operação. Veja:
`$ cd ~`

Este til representa o seu usuário, ou a pasta deste.

## 03 - Voltar a uma pasta visitada antes
Sempre também quando eu precisava escrevia o caminho absoluto novamente do endereço que eu já visitei, e queria voltar. Só que isso pode também te trazer uma grande perda de tempo. Para isso, pode se usar:
`$ cd -`

O hífen, ele vai para o último endereço que você visitou antes do atual. Ajuda demais no dia a dia.

# Conclusão
Este artigo é bem introdutório, mas espero estar mais por aqui. Neste, vimos como andar melhor pela hierarquia de pastas, como voltar para a pasta do usuário de uma maneira mais rápida e vimos também um "atalho" para voltarmos para um caminho que visitamos anteriormente.

Se tiver qualquer crítica ao artigo, ou quer acrescentar algo, só comentar. Abraços :)
GPG Agent as SSH Agent
Tags: ssh, gpgpgp
Published: 2023-01-06 01:17:40

---
title: GPG Agent as SSH Agent
published: true
date: 2020-06-15 02:33:01 UTC
tags: SSH,GPGPGP
canonical_url: https://brandonrozek.com/blog/gpgagentasssh/
---

GPG Agent has the ability to act as a SSH Agent. This allows the use of Authentication keys on Smartcards to be used with SSH as well.

First we need to enable SSH support in GPG Agent,

```
echo "enable-ssh-support" >> ~/.gnupg/gpg-agent.conf

```

Then we need to specify an environmental variable for the SSH Daemon to use GPG Agent

```
echo "export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)" >> ~/.bashrc

```

If you want it to be active immediately, then source the bashrc,

```
source ~/.bashrc

```

If you have a smartcard plugged in, then you should be able to see it via the GPG agent

```
ssh-add -l

```
Extract All the Things
Tags: linux
Published: 2023-01-06 01:17:52

---
title: Extract All the Things
published: true
date: 2020-06-15 02:23:37 UTC
tags: Linux
canonical_url: https://brandonrozek.com/blog/extract/
---

[Sandra Henry-Stocker](https://www.networkworld.com/author/Sandra-Henry_Stocker/) from Network World wrote a [great post](https://www.networkworld.com/article/3244007/extracting-from-compressed-files-on-linux.html) on how to standardize extracting files on Linux. It’s a shell script that works so well, that I placed it in my [`~/.local/bin` directory](https://brandonrozek.com/blog/customexec/) in order to call upon it at any time. Here’s part of it, check out the post for more.

```
#!/bin/bash
if [-f $1] ; then
  case $1 in
    *.tar.bz2) tar xjf $1 ;;
    *.tar.gz) tar xzf $1 ;;
    *.tar.xz) tar zxvf $1 ;;
    *.bz2) bunzip2 $1 ;;
    *.rar) rar x $1 ;;
    *.gz) gunzip $1 ;;
    *.tar) tar xf $1 ;;
    *.tbz2) tar xjf $1 ;;
    *.tgz) tar xzf $1 ;;
    *.xz) xz -d $1 ;;
    *.zip) unzip $1 ;;
    *.Z) uncompress $1;;
    *) echo "contents of '$1' cannot be extracted" ;;
  esac
else
  echo "'$1' is not recognized as a compressed file"
fi

```
Quick Python: Export Decorator
Tags: python
Published: 2023-01-06 01:18:09

---
title: Quick Python: Export Decorator
published: true
date: 2020-06-15 02:15:38 UTC
tags: Python
canonical_url: https://brandonrozek.com/blog/exportpydecorator/
---

A great [StackOverflow post](https://stackoverflow.com/a/35710527) by [Aaron Hall](https://stackoverflow.com/users/541136/aaron-hall) that shows how you can create an `export` decorator in order to not have to specify all the names you want to expose via [` __all__ `](/blog/pythonall/).

The Decorator:

```
import sys

def export(fn):
    mod = sys.modules[fn. __module__]
    if hasattr(mod, ' __all__'):
        mod. __all__.append(fn. __name__ )
    else:
        mod. __all__ = [fn. __name__]
    return fn

```

Usage:

```
__all__ = []

@export # otherwise __all__ = ['test']
def test():
    print("test")

```
Use isset() Instead of strlen()
Tags: php, tips, todayilearned
Published: 2020-06-15 01:55:31

``isset()`` is faster than using ``strlen()`` because calling a function is more expensive than using a language construct. 
The ``isset()`` method is consistently about 6 times faster.

Test to show the speed http://codepad.org/ztYF0bE3

```
strlen() over 1000000 iterations 7.5193998813629
isset() over 1000000 iterations 0.29940009117126
```

### Refs:
- https://www.phpreferencebook.com/tips/use-isset-instead-of-strlen/
Opinions on SuperHi courses?
Tags: codenewbie, html, javascript, css
Published: 2020-06-15 01:51:39

Hey everyone! 

I am debating on whether or not I should take a course on SuperHi. Has anyone taken any of their course? Are they worth it? 

I know many tell me I can find resources for free (of course). But for my learning style, I prefer a class & group learning setting.
OK '구글 TV 켜'를 하기까지
Tags: googleassistant, homeassistant, iot
Published: 2020-06-15 01:46:07

Google home mini 를 저렴하게 구입하고, 집에서 사용하는 iot 기기를 연결하다보니 호환 불가능한 기기가 몇 가지 있었다.

1. LG TV (75sj8570)
2. 샤오미 선풍기 (2018 무선)

필요한 기능은 TV 켜기, 끄기 선풍기 켜기, 끄기

다행히 사용하는 NAS 가 docker 지원 모델이라 [home-assistant](https://hub.docker.com/r/homeassistant/home-assistant/) 를 설치하니 home assistant 앱이나 api 를 통해서 제어가 가능했다. (샤오미 선풍기는 기본 지원 component 가 아니라서 [여기](https://github.com/syssi/xiaomi_fan) 에 만들어진 component 를 이용했다.)

home assistant 와 google assistant 를 연결하는 방법은 두가지인데,
home assistant cloud (5$/month) 혹은 직접 google actions 를 이용하는 방법이 있다.

한달에 5$를 낼 생각은 처음부터 없었으므로, google actions 를 이용하려고 했는데 어째서인지 oauth 연결 부분에서 계속 에러가 발생하고, 에러 로그도 확인하기가 어려웠다. 분명히 Let's encrypt 로 https 접속이 가능하고 oauth 구성도 제대로 했는데도!?

이 시점에 IFTTT 를 이용하면 google assistant 음성을 trigger 로 webhook 을 동작시킬 수 있다는 것을 알게 되었다.

즉, 음성 명령 -> google assistant -> IFTTT -> webhook -> home assistant api -> iot 기기 제어가 가능하다.

다만, IFTTT는 한국어를 지원하지 않기 때문에 이 부분은 google assistant routine을 사용하기로!

---

설정은 다음과 같이

IFTTT 에서 Applet 을 생성하고 google assistant, Say a simple phrase 선택

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3xv36z56kfhny1qvpqby.png)



Webhook 을 선택해서 이제 api 를 부르면 되겠지! 하는데

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

---
**헤더에 인증 정보가 들어가는데 헤더를 보낼 수가 없다**

하지만 body는 가능하니까, body 를 적당히 예쁘게 꾸며서 보내면 대상 url 로 api 를 보낼 수 있도록 하는 중계 서버가 있으면 된다.

중계 서버는 대충대충 아래와 같이 body 를 보내면 url, header, body 를 채우는 형태로 [구성](https://hub.docker.com/r/jungwook/vhook)했다. 인증서 및 외부 접근이 가능해야 하는건 덤! 대신 이 중계 서버를 거치면 같은 NAS에 home assistant 와 중계 서버를 띄웠기 때문에, home assistant 서버는 굳이 외부 접근이 필요하지 않다. (하지만 home assistant를 외부에서 접근하려면 필요)

```json
{
	"url": "target url",
	"headers": {
		"key": "value"
	},
	"body": {
		"key": "value"
	}
}

```

흐름은 다음과 같아진다

음성 명령 -> google assistant -> IFTTT -> webhook -> 중계 서버 -> home assistant api -> iot 기기 제어

따라서 티비 켜기 용 WOL IFTTT 설정은 아래와 같다. 중계 서버는 외부 접근 가능한 도메인이지만, 이제 home assistant 서버는 내부 도메인으로 접속하게 설정하였다.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/caolr8lte5fwoopuk2xr.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dhjpao77gmyldds03sqq.png)

payload 는 다음과 같다

```json
{
	"url": "http://<home assistant endpoint>/api/services/media_player/turn_on",
	"headers": {
		"authorization": "Bearer <auth token>"
	},
	"body": {
		"entity_id": "media_player.lg_tv"
	}
}
```

---
이렇게 설정하면 google home / assistant 에서 run my script 1 을 말하게 되면 티비가 켜진다.

하지만 run my script 1 이라고 말하지고 싶지는 않으니 아래와 같이 google home routine 에 등록한다.

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

---
google home 이 지원하지 않는 tv 도 음성으로 켜기, 끄기 선풍기도 켜기, 끄기를 할 수 있게 되었다. 꼭 home assistant 를 이용하지 않고, google home / assistant 으로 필요한 작업의 trigger 로 IFTTT 를 사용할 수 있으므로 음성 명령을 통해 서버를 동작한다거나 등등의 작업도 수행할 수 있다.

*중계 서버가 호출되지 않는다면 방화벽 미국에서의 접근이 허용되어 있는지 확인해야한다. IFTTT 서버가 내 경우는 미국에서 패킷을 보냈다.*
Removing repeated list items
Tags: beginners, python
Published: 2020-06-15 01:30:16

Set are unordened collection, partially imutable and that have can to add or remove elements.
I use the set() type to **remove repeated array** items and print them.
```python
List=["Natália","Elisa","Joana","Elisa","Barbara","John","Barbara"]
names = set(List)
print(names)
```
You still .update() and  .discard() items, like:
```python
names.add("Luna")
names.discard("Natália")
print(names)
```
Chrome - Arrange your tabs with tab groups 😍
Tags: showdev, webdev, chrome, tabgroups
Published: 2020-06-15 01:04:07

If you're one of those people with so many tabs open than you can manage, read on.

## The why

For those of you who have many tabs open all at the same time and are struggling to keep a tab on your tabs, the time has come to get a bit more organised using this new feature in Chrome called tab groups.

The whole purpose has been to help users keep their tabs organised and easier to find them in their sea of open tabs.

## How can I do it?

Simply right click your tab and select **Add tab to tab group** option. Then there will be a dot right before your tab. Click on the dot, a pop up will open in which you can select a colour for your tab group, and name your group.

If you are clicking on an existing group, you will have the following options in addition:

* Add a new tab to the group
* Ungroup tabs in a group
* Close group
* Move the group to a new window
* Send feedback if you have any

I've demonstrated this in below video:

![Adding tabs to tab groups in Chrome](https://yashints.dev/3d90142e4896a499fa70ca6655e929ff/chrome-tabs.gif)

## But I don't see the option

If you can't see the option, don't worry, just go to `chrome://flags`, then search for `tab groups` and enable the option. It's still experimental, but you can use it now.

## Summary

Hope this will help you to keep a tab on your tabs and till next time 👋🏽.
การแทนที่จำนวนเต็มติดลบ ด้วยเลขฐานสอง โดยใช้เทคนิค Two’s Complement
Tags: computerscience
Published: 2020-06-15 00:56:57

คอมพิวเตอร์เก็บข้อมูลโดยแทนข้อมูลอยู่ในรูปแบบ Binary หรือแสดงออกเป็นเลขฐานสองที่มีได้แค่ 0 และ 1 เรียงต่อกัน

แต่เลขฐานสองจะไม่มีความหมายอะไรเลย จนกว่าเราจะมานิยามให้มันว่าแต่ละชุดของตัวเลขแทนอะไรบ้าง

ดังนั้นจำนวนเต็มที่ติดลบก็เช่นกัน ถ้าเราจำกัดจำนวนบิตเอาไว้ที่ 8 บิต แสดงว่าเราจะสามารถเอาเลขฐานสอง 8 บิตนี้แทนสิ่งต่างๆได้ 256 สิ่ง (2 ยกกำลัง 8) เช่นถ้าแทนจำนวนเต็มที่ไม่ติดลบ เราแทนที่ได้คือ 0 ถึง 255

ดังนั้นถ้า 8 บิตแล้วเราอยากแทนที่ทั้งเลขบวก และ เลขลบ นั้นก็สามารถทำได้โดยการแบ่งจำนวนสัญลักษณ์ทั้ง 256 ตัวนั้นออก 128 ตัวใช้สำหรับเลขลบ อีก 128 ตัวใช้สำหรับ จำนวนที่ไม่เป็นลบ ดังนั้นเลขที่แทนที่ได้ก็จะเปลี่ยนเป็นช่วง -128 ถึง 127

ปัญหาต่อมาแล้วเราจะเอาเลขฐานสองแบบไหนล่ะที่แทนที่เลขลบทั้ง 128 ตัวนั้น

สิ่งที่ระบบคอมพิวเตอร์ส่วนใหญ่ที่เราใช้อยู่ปัจจุบันใช้เทคนิคที่เรียกว่า two's complement นั่นคือในเมื่อเราแบ่งเลขเป็นช่วง -128 จนถึง 127 แล้วนั้นก็ทำให้เลขบวกตั้งแต่ 128 ถึง 255 นั้นหายไป ดังนั้นเราจะเอาฐานสองที่เคยใช้แทน 128 จนถึง 255 นั่นละมาใช้แทนเลข -128 จนถึง -1

ถ้าเรียงเปรียบเทียบกันระหว่างระบบที่เราแทนที่แค่จำนวนเต็มกับจำนวนติดลบแบบ two's complement จะเป็นแบบนี้

```
0 1 2 3 ... 127  128  129  130 ...  255
0 1 2 3 ... 127 -128 -127 -126 ... -1
```

อาจจะดูแปลกๆ แต่ถ้าสังเกตดีๆจะพบว่ามันทำให้เลขขยับไปในทิศทางบวก 1 เหมือนเดิมจาก 128 จนถึง 255 และ -128 จนถึง -1

ประโยชน์ของ two's complement อีกอันนั้นคือถ้าเรามีฐานสองของเลขบวก เราสามารถคำนวณเลขฐานสองของจำนวนลบของสิ่งนั้นได้เช่น เรามีฐานสองของ 127 แบบนี้

```
127 

ฐานสองคือ 

01111111
```

วิธีหา -127 คือกลับบิตของ 127 จาก 0 เป็น 1 และ 1 เป็น 0 แล้วเอามาบวกด้วย 1 นั่นเอง

```
01111111

กลับบิต

10000000

แล้วบวก 1

10000001 
```

`10000001` ก็คือเลข 129 ในระบบที่ไม่มีเลขลบ แต่ก็เทียบได้เป็น -127 ในระบบที่มีจำนวนติดลบได้นั่นเอง

ส่วนถ้าเรามี -127 เราทำวิธีเดียวกันก็จะได้ฐานสองของ 127 กลับมาเช่นกัน

ประโยชน์อีกเรื่องสำหรับ two's complement นั่นคือ ทำให้เราสามารถลบเลขฐานสองได้โดยใช้แค่การบวกเลขฐานสองนั่นเอง เช่นเราต้องการลบ 100 - 50

เราสามารถเขียนได้เป็น 100 + (-50) นั่นคือให้เราหาเลขฐานสองของ -50 ก่อนแล้วค่อยเอาไปบวกกับ 100 นั่นเอง

```
100 ฐานสองคือ                     01100100
50 ฐานสองคือ                      00110010
ดังนั้น -50 ฐานสองคือ 11001101 + 1 = 11001110

100 + (-50) คือ

 01100100 +
 11001110 ได้
100110010

แต่ว่าระบบเราตอนนี้ใช้แค่ 8 บิตเราสามารถตัดบิตที่เกินไปได้เลยก็จะได้คำตอบเป็น 00110010 ซึ่งก็คือ 50 นั่นเองเป็นคำตอบของ 100 - 50
```



<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>
#100DaysOfCode: Week 0
Tags: python, 100daysofcode
Published: 2020-06-15 00:26:08

This is the first post in a series, documenting my journey through #100DaysOfCode.

**Why #100DaysOfCode?**
I wanted to do the #100DayOfCode challenge because I have started this journey before, but have not yet followed it to completion. That will change this time around! In my previous attempts at the challenge, I had always tried to learn coding by watching videos and doing tutorials. While this can be an essential part of the journey, it cannot be the entire journey. After taking to heart the idea of learning by doing I decided to recommit to learning to code by focusing on actually building projects. 

**Goals**
The main focus of this attempt at #100DaysOfCode will be learning Python. From what I understand, Python has a wide range of use cases. Two main interests will be game development and data analysis/visualization. By the end of the 100 days, I hope to have at least 3-5 finished projects to show my work, and potentially 1 or 2 works in progress of a larger scope than the finished projects.

**Plans**
My plan to achieve these goals is to wake up 30-60 minutes earlier than usual and work on projects in the mornings. I have always been a bit of an early bird, so I plan to take advantage of time when no one else in the house is awake yet. Project wise, I will start out with a few projects that just use the command line with increasing complexity as I learn more about Python. I'm hoping one of the works in progress will be a game utilizing some type of GUI so that I can do other things besides just command line programs.

**Why I'm Blogging**
I want to document this journey so that I can look back on where I started. I also believe writing about my #100DaysOfCode journey will help solidify the concepts I am working on when coding. I will be tweeting daily about my progress through the challenge, as well as posting on this site weekly as more of a recap.

Thank you for reading my first post!