teleren/devto huggingface dataset:
How I Started My Dev Journey
Tags: devjournal, career
Published: 2021-01-10 15:04:13


### It's Okay To Skip The "Hello World" Part

In the summer of 2019, I was a little over a year into my first job fresh out of university working late at night as an analyst for a call center. I had no idea what career to pursue or what I could accomplish when I came across a few lines of python code that my predecessor had left behind on our shared drive meant to compile some spreadsheet data. Intrigued, I opened up a notepad...

From that point on, every spare minute I had from my usual job was dedicated to re-compiling the same lines over and over, making adjustments as I went. I even remember spending my commutes googling for better code, better libraries, and most importantly better themes for my IDE. Before I knew it, a month had passed and I had turned that itty bit of terminal code into its own application (with a bit of GUI here and there!).

Having little to no knowledge of object-oriented programming, it was a painstaking start to say the least, but one of the most enjoyable work experience I've had. Ultimately that summer was not where it all began for me.

---

### Taking The Leap

By early 2020 I was still working the same job, albeit with a bit more sunlight, and my app's codebase had grown slightly fatter. I was always eager to add small additions or fix some bugs, but the satisfaction wouldn't last that long until I came across an opportunity to enroll into a coding bootcamp in web development in the summer.

I was hesitant at first, thinking that I had already missed my chance to start a career as a software developer back when my options were more open years earlier. I wondered if my short lived experience the summer before was enough to make me believe it could work out. 

It took the encouragement of good friends and my own impulse to make the decision to start learning again, but it would be one that I would not regret. I was not the only person in my corner of the world that wanted to have a major career change or learn a new set of skills. Having met the people in my bootcamp truly hardened my belief that it's never really too late to start coding. So we learned, we grew, we laughed, and we were well on our way to something new.

---

### Am I There Yet?

Fast forward 6 months later, having spent the better part of my nights studying and debugging during the pandemic, I emerged as a full-stack web developer, eager to start my first job. I now spend most of my days immersing myself with my coding projects and following blogs made by amazing devs who are still learning and growing.

I still have long road ahead of me, but I remain thankful to my instructors and friends I've met along the way for always reminding me that this journey is still far from over.

---

For my personal dev roadmap in early 2021, I plan on writing more articles on creating UI components using React! 

---
Personal Portfolio deployed to DigitalOcean
Tags: dohackathon
Published: 2021-01-10 14:49:14

## What I built
I built a personal portfolio app with static html and deployed to digital ocean.

### Category Submission: 
Personal Site/Portfolio

### App Link
https://portfolio-5vt8r.ondigitalocean.app/

### Screenshots
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2hniklaea3z4693rq4sv.PNG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/k089vyk3kjfzhaq84k5j.PNG)

### Description
This  

### Link to Source Code
https://github.com/sivanandapanda/portfolio

### Permissive License
MIT

## Background
As a backend developer for most part of my career I am trying my hands in frontend technologies to better showcase my personal projects. As a starter I built couple of simple apps with frontend integration which I have added to my portfolio as well. This portfolio is exact replica of the youtube tutorial by Dennis Ivy "https://www.youtube.com/watch?v=r_hYR53r61M". I want to thank Dennis for this amazing tutorial.

### How I built it 
(How did you utilize DigitalOcean’s App Platform? Did you learn something new along the way? Pick up a new skill?)
I found DigitalOcean's platform very easy to use with so many guides and tutorials(and free credits :)). I have learned frontend technologies as part of my portfolio app as well as I have learned container technologies where I have deployed another app as a Kubernetes Load Balancer service.


### Additional Resources/Info
Your favourite submission of dohackathon
Tags: dohackathon, discuss, challenge
Published: 2021-01-10 14:47:59

Comment below your favourite submission of dohackathon


<span>Photo by <a href="https://unsplash.com/@joszczepanska?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jo Szczepanska</a> on <a href="https://unsplash.com/s/photos/project?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
Day 17 of 100Daysofcode :Extracting Data From XML
Tags: 100daysofcode, codenewbie, beginners, python
Published: 2021-01-10 14:43:00

This is my day 17th of #100Daysofcode. Today I also continue to learned about python access on web data in [Coursera.] (https://www.coursera.org/learn/python-network-data/gradedLti/IVZEE/extracting-data-from-xml).

Did many challenge in HTML regarding to the topic Introduction to the Responsive web Design challenge in [Freecodecamp](https://www.freecodecamp.org/learn/responsive-web-design/css-flexbox)

# Extracting Data From XML
Extensible markup language is a language that define set of rule for encoding documents in a formate that is both human readable and machine .
My code start from importing from urllib `request` and importing `xml.etree.ElementTree as ET.`
```python
from urllib import request
import xml.etree.ElementTree as ET
```
The program will prompt for a URL, read the XML data from that URL using urllib and then parse and extract the comment counts from the XML data, compute the sum of the numbers in the file.

```python
url = "http://py4e-data.dr-chuck.net/comments_1113374.xml"
print ("Retrieving", url)
html = request.urlopen(url)
data = html.read()
print("Retrieved",len(data),"characters")

tree = ET.fromstring(data)
results = tree.findall('comments/comment')
icount=len(results)
isum=0

for result in results:
    isum += float(result.find('count').text)
print(icount)
print(isum)
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 17 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>* I learned about python access on web data<br>* Did some challenge on extensible markup language<br>* Extracting data from XML <a href="https://t.co/9us9a4c1zn">pic.twitter.com/9us9a4c1zn</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1348273055554945024?ref_src=twsrc%5Etfw">January 10, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Introducción a Java desde 0
Tags: tutorial, java, beginners, spanish
Published: 2021-01-10 14:42:37

Bienvenidos a "Introducción a Java desde 0", aquí tendrás una simple lista de las secciones que verás en esta serie.

Cada sección tendrá alrededor de 5 a 8 artículos y se agregarán a este artículo cada vez que se cree uno. Cada capítulo explicará lo necesario, tendrá ejercicios y teoría que tienes que tener en cuenta. Todos estos tutoriales estarán orientados a la [versión 8 de Java](https://www.oracle.com/java/technologies/javase-jre8-downloads.html).

## Sección 1: Conceptos básicos

1. [Hola Mundo](https://dev.to/classybear/java-desde-0-hola-mundo-3oa1)

2. [Números enteros](https://dev.to/classybear/java-desde-0-numeros-enteros-451)

3. [Números Decimales](https://dev.to/classybear/java-desde-0-numeros-decimales-3gkh)

4. [Boleanos](https://dev.to/classybear/java-desde-0-boleanos-1fif)

## Sección 2: Condicionales, ciclos, arreglos y funciones

## Sección 3: Objetos y OOP

## Sección 4: Excepciones

## Sección 5: Java API

## Los capítulos tendrán la siguiente dinámica:

![](https://dev-to-uploads.s3.amazonaws.com/i/c6zo51d3wd5haq49g36w.png)
  
Si ya sabes Java o lo haz usado anteriormente esto no es para ti, te recomiendo una de las siguientes series:

* Java para programadores. (En desarrollo)
* Java Avanzado. (En desarrollo)

---

Si tienes preguntas o alguna sugerencia me puedes dejar un comentario :)

Me encuentro también en [Medium](https://classy-bear.medium.com) haciendo tutoriales.

### Donaciones:
* Bitcoin — `bc1qhr9jhlj5wvrkah5v4kkdvf6ggskjpf8m82f5cj`
* BAT o Brave Rewards — `0x391b5DAe375ca6a20fACd0f7afc461fAc56d1864`
* Patreon — [classyBear](https://www.patreon.com/classyBear)

### Recursos:
<span>Photo by <a href="https://unsplash.com/@_imkiran?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sai Kiran Anagani</a> on <a href="https://unsplash.com/@_imkiran?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
A simple way to create an SSL certificate with Let's Encypt
Tags: https, ssl, web, beginners
Published: 2021-01-10 14:38:21

#What is an SSL certificate?
SSL, which stands for secure sockets layer, has two main roles. The first role is to acknowledge the validity of a web server. In other words, an SSL certificate ensures that the web server does exist. The second role is to encrypt between the web server and web clients. Without an SSL certificate, your credential information has a risk of being stolen because it is not encrypted. An SSL certificate ensures a safe communication on the Internet.

#How does SSL secure the safety?
1.A web client (browser) attempts to access a web server.

2.The server sends its SSL certificate and public key to the browser.

3.Checking the validity of the certificate, the browser creates a common key.

4.Encrypting the common key with the public key, the browser sends the common key to the server.

5.The server decrypts the encrypted common key and keeps it.

After the process above, the communication between the server and browser is always encrypted with the common key.

#How can you get an SSL certificate for your website?
`Let's Encrypt` is an easy solution to create an SSL certificate

1.Install the client software of `Let's Encrypt`, or certbot
```
 $ sudo yum install epel-release
 $ sudo yum install certbot
```

2.Create an SSL certificate
```
certbot certonly --standalone -d www.example.com
```
You can use the `--standalone` option only when your web server such as apache and nginx is off. If you want to run this command with the web server on, you have to use the `--webroot` option.
```
 $ certbot certonly --webroot -w /var/www/www.example.com -d www.example.com
```
You need to add the document root after the `-w`.
If you want to cover multiple domains, you can simply add the `-d` option as follows
```
certbot certonly --standalone -d www.example.com -d www2.example.com
```
3.Change your web server configuration

You need to add the following configuration to `/etc/nginx/conf.d/default.conf`.
 
```
server {
    listen 443 ssl;
    server_name www.example.com;
    root /var/www/www.example.com/current/web;
    ssl_certificate /etc/letsencrypt/live/www.example.com/privkey.pem;
    ssl_certificate_key /etc/letsencrypt/live/www.example.com/fullchain.pem;
}
```
4.Restart your web server
```
sudo systemctl restart nginx
```

At this point, you can access to your website with HTTPS.
ReactNative Large file upload using Amplify S3
Tags: amplify, s3, reactnative, fileupload
Published: 2021-01-10 12:30:27

Currently while using Amplify library to upload a to AWS S3 we have to read that file into memory and pass it to `Storage.put` call. If the file which we are uploading is large for example a video, it causes memory issues and the ReactNative app crashes. 
The Amplify Storage plugin supports Managed upload. It will divide the file into small chunks and upload them in batches.
But there is no support to read the file in small chunks.

The Amplify library supports custom plugins, using which we can connect with services other than AWS or add a wrapper to AWS services.

To support the uploading of large files using Amplify, I have used the same mechanism as a custom plugin.

NPM Library [amplify-s3-chunk-upload](https://www.npmjs.com/package/amplify-s3-chunk-upload)

---
## Usage
### Install
```
npm i -s amplify-s3-chunk-upload
```

### Configure Storage plugin in App.js (ReactNative)
```js
import { StorageChunkUpload } from 'amplify-s3-chunk-upload';
import { Credentials } from '@aws-amplify/core';



// put following code after Amplify.configure

// Load StorageChunkUpload Plugin
const storagePlugin = new StorageChunkUpload({}, Credentials);
Storage.addPluggable(storagePlugin);
storagePlugin.configure(config);

```

### File upload call
```js

// get File stats
const { size } = await RNFS.stat(fileURI);

// here we are simulating an array of bytes
const fileObject = {
  // set the size
  size: size,

  // here we will read file as per bodyStart & bodyEnd, this will avoid reading complete file in the memory.
  slice: (bodyStart, bodyEnd) => {
    // Here in this sample code, we are using react-native-fs to read files.
    return RNFS.read(fileURI, bodyEnd - bodyStart, bodyStart, 'base64')
      .then((data) => Buffer.from(data, 'base64'))
      .catch((error) => {
        // Log error if required.
      });
    },
  };

  // Upload call, for parameters, refer to Amplify docs.
  const result = await Storage.put(`Your-file-name.mp4`, fileObject, {
    contentType: 'video/mp4',
    level: 'protected',
    provider: 'StorageChunkUpload',
  });


```

Since we are making standard `Storage.put` call and the underlying code also uses the same Amplify Library code, you can pass all other parameters such as `progressCallback` etc.

---
We have this in action for the last couple of days.
Please feel free to share any feedback.
[NPM](https://www.npmjs.com/package/amplify-s3-chunk-upload)
[GitHub](https://github.com/walvekarnikhil/amplify-s3-chunk-upload)
Tool for recommended reviewers like mention-bot
Tags: github, git, discuss
Published: 2021-01-10 14:36:27

Please share what tools do you use for identifying recommended reviewers for Pull Requests in GitHub?

Before there was a tool like [Mention-Bot](https://github.com/facebookarchive/mention-bot), but now it is archived and not supported.

P.S. I am a creator of tool for finding recommended reviewers, and I am interested which ones are used at different projects.
Deploy Jekyll to DO App Platform
Tags: dohackathon
Published: 2021-01-10 14:29:53

## Personal blog

### Category Submission: Personal Site/Portfolio


### App Link

https://blog-vaina.ondigitalocean.app/

### Screenshots

![Blog homepage](https://dev-to-uploads.s3.amazonaws.com/i/c4iwsg7915zhzcuhh101.png)
![Blog post detail](https://dev-to-uploads.s3.amazonaws.com/i/7xofu1un9fsr8pdhe1iy.png)

### Description

I was created my personal blog using Jekyll. 

### Link to Source Code

https://github.com/erheme318/blog

### Permissive License

MIT

## Background
(What made you decide to build this particular app? What inspired you?)

In 2021, I would like to improve my writing skill. The reason was that i've read that writing can improve clear thinking skills. So, i've put it one of my resolutions of 2021. That's why, i started my personal blog.

### How I built it 
(How did you utilize DigitalOcean’s App Platform? Did you learn something new along the way? Pick up a new skill?)

I've never used Jekyll before. After comparing several blogging platforms and tools, i decided to use Jekyll because of simplicity.


### Problems & Solutions

I've encountered with the following error on my first deployment:

```
Running custom build command: bundle exec jekyll build -d ./public
blog | 00:17:09 bundler: failed to load command: jekyll (/layers/heroku_ruby/gems/vendor/bundle/ruby/2.6.0/bin/jekyll)
blog | 00:17:09 Gem::Exception: can't find executable jekyll for gem jekyll. jekyll is not currently included in the bundle, perhaps you meant to add it to your Gemfile?
```

First I installed Jekyll on my machine (dev environment), it was working. But when I deploy to DO App Platform. It failed. So, I've tried to find out the cause.
 1. I've changed `Build Command` (added `bundle install, bundle update` commands and removed ~~bundle exec~~ from `bundle exec jekyll build -d ./public`) because i thought it might be the 
ruby instance issue. But it wasn't the case
 2. I've tried DO's Jekyll sample code to deploy: [https://github.com/digitalocean/sample-jekyll](https://github.com/digitalocean/sample-jekyll). It was working. Jekyll's version was `4.0.0`, but mine was `4.2.0` (latest version)
 3. Then I've downgraded jekyll and replaced `Gemfile.lock` with DO's Jekyll sample code. It works!
 4. Finally, I've compared the code diff and I've figured out that the reason was the `platforms` configuration on `Gemfile.lock`. My `Gemfile.lock` was configured as `Platforms: x86_64-linux` but DO's Jekyll sample was configured as `Platforms: ruby`. Therefore, I added platform `ruby` using `bundle lock --add-platform ruby` in order to fix it. You can see the fix [commit here](https://github.com/erheme318/blog/commit/708baf9744ee562517649b30d827a10f117ed907)
 5. I re-deployed the blog with latest Jekyll version. It works!
Parluks - Browser for website developers
Tags: browser, developers, responsive, design
Published: 2021-01-10 14:22:55

<h4 align="center">Browser made for developers built on top of Electron JS.</h4>

<p align="center">I'm proudly presenting my latest open source project: "Parluks". Parluks is browser made for website developer teams to inspect multiple devices / resolutions at once to speed up development process, its fully free and open source, feel free to contribute and support it. I have made it on electron JS and pure JS that allowed this project to be cross platform supporting Linux, Mac and Windows. It's really cool project that i'm proud of, it's still in bata 1.0 version but it's awesome start of 2021 for me :)</p>
[Check it out here](https://github.com/arturssmirnovs/parluks)

## Key Features

* 30+ available devices with various resolutions
* Zoom out / in without losing device aspect ratio.
* Synchronised scroll across all device screens.
* Developer tools console
* Rotate devices
* Light / Dark mode
* Cross platform
  - Windows, macOS and Linux ready.

## Download

You can [download](https://github.com/arturssmirnovs/parluks/releases/tag/1.0) the latest installable version of Parluks for Windows, macOS and Linux.

## Screenshots

![Parluks browser](https://raw.githubusercontent.com/arturssmirnovs/parluks/main/assets/1.png)
![Parluks browser](https://raw.githubusercontent.com/arturssmirnovs/parluks/main/assets/4.png)
![Parluks browser](https://raw.githubusercontent.com/arturssmirnovs/parluks/main/assets/3.png)
![Parluks browser](https://raw.githubusercontent.com/arturssmirnovs/parluks/main/assets/5.png)

[Download](https://github.com/arturssmirnovs/parluks/releases/tag/1.0) or [contribute here](https://github.com/arturssmirnovs/parluks).
DO backed static random number generator
Tags: dohackathon
Published: 2021-01-10 14:18:30

---
title: DO backed static random number generator
published: true
description: My submission to the DigitalOcean App Platform Hackathon!
tags: dohackathon
---

## What I built
I built an Random Number Generator for the purpose of getting known to DO App Platform.

### Category Submission: 
Random Roulette

### App Link
https://dt-do-app-platform-hackathon-evut5.ondigitalocean.app/

### Screenshots
![Screenshot](https://dev-to-uploads.s3.amazonaws.com/i/m0wmyb6vrws89tj9snb4.png)

### Description
The UI is pretty basic but it fulfills the needs.
It looks and works like a RNG, so it must be a RNG!
Hopefully the UI is wacky enough for the submission category!

### Link to Source Code
{% github moagggi/dt_do_app__platform_hackathon %}

### Permissive License
[MIT](https://choosealicense.com/licenses/mit/)

## Background
I've already published other RNG apps to get known to new techniques and actually had a successful extended RNG.
It's just super easy to get some basic knowledge about a new language/stack by replicating something you already know.

### How I built it 
The RNG itself is a simple descriptive html page with inline javascript. This makes it perfectly fitted for the "static site" deployment through DO App Platform.
Though I didn't know about DO's App Platform before, the process from first commit to deployment is pretty straightforward and easy. It took me under 5 minutes to get DO up and running! Sweet :)

### Additional Resources/Info 
Although the result will never be best-of-class, such a simple project always encourages me to learn new things - in an easy way. Once you've digged deep enough into a new thematic, you're always free to "come back" and improve the initial try.

If you never start, you never level up!
Change Caps Lock to Ctrl
Tags: ubuntu
Published: 2021-01-10 14:15:16

One of the companies that I've worked at in the past had their development environment based on Emacs (due an esoteric language).

To avoid Emacs pinky, I've learned to set the Caps Lock key as Ctrl. Even though I don't have to use Emacs anymore, using Caps Lock as Ctrl still a must to me.

On Linux, edit:

```
sudo vi /etc/default/keyboard
```

For swapping the Caps Lock with Ctrl, change to:

```
XKBOPTIONS="ctrl:swapcaps"
```

For just changing Caps Lock (and not the Ctrl key):

```
XKBOPTIONS="ctrl:nocaps"
```


To apply the new configuration:

```
sudo dpkg-reconfigure keyboard-configuration
```

You may have to logout and login again depending on your distribution.
Don't DRY, CARE!
Tags: codequality, dry
Published: 2021-01-10 14:10:29

If you had to describe how you try to write code in a single acronym, what would it be? I thought a bit about it, and the best I could come up with is CARE. It stands for: Code Aspires to Resemble Explanation. Whichever way I'd explain the purpose of a body of code, I want my code to look like that explanation.

I'm not talking about trying to make lines of code resemble grammatically correct English sentences. It's more about code and (hypothetical) explanation having a similar structure. For example, if your domain is writing utensils and your explanation clearly delineates different behaviors for pencils, ballpoints, and fineliners, do those categories enjoy high-level visibility in your code too? Or will you only come across these categories in the occasional conditional deep down in the implementation?

There's more than one way to explain most things, and so it follows multiple people applying CARE to a problem might end up with very different results. I think that's fine.

Here's some smells that might indicate code could be more CAREful:

- Some terminology appears only in explanation or only in code.
- A single 'beat' in an explanation narrative requires coordination between multiple distinct bits of code.
- The existence of comments explaining _what_ is happening, suggesting the code doesn't explain itself well.