teleren/devto huggingface dataset:
New Job, New Challenges
Tags: discuss, career, devops, devrel
Published: 2020-10-24 09:00:26

So during this chaotic year I managed motivate myself and seek new pastures. As much as I liked working at my previous employer, I wanted to grow and learn.

I managed to go from a Junior DevOps title to DevOps Engineer. I was mainly focused on working on the infrastructure and maintaining pipelines to now being brought in to do a whole lot more.

It's been 3 weeks since I started my new role and it has been  tough. So much going on and so much to learn from the code, culture to working practises. Reflecting back, at my previous employment, I learnt so much from AWS, containers, CI/CD, etc., but mainly the way a team works and grows to deal with new challenges.

The biggest change I noticed was the culture. From a small business where I knew everyone and had a working relationship with them all, being able to chat and grow as a team. To a bigger business - which is currently rearranging its structure - and there is multiple historic cultures, different practises and noticeably, a lack of chat.

And now, with a bit of insight and pushing from my new manager, I'm starting to see the true nature of the DevOps role. I've got a lot to learn still but I'm starting to see what I'll need to do to fulfil my role.

Previously, I focused on automation, infrastructure and keeping the Developers 'happy' - either by simplifying things or taking away some of the burdens. 

Now I'm challenged with setting new practises, standards and creating a new productive culture. I know it's going to be long and uphill struggle at times but I'm looking forward to putting good and sustainable standards in place and building a more connected team. 

There will always be new technologies but I see building a strong culture of knowledge sharing, standards and shared responsibility as the biggest driver of software development.
Deployed SafeMath SmartContract on XinFin XDC Network
Tags: blockchain, xinfin, xdc, safemath
Published: 2020-10-24 08:56:39

Deployed a Smartcontract over Solidity's arithmetic operations with added overflow checks, on XinFin XDC Network under the injected web3 environment. 

Arithmetic operations in Solidity wrap on overflow. This can easily result in bugs, because programmers usually assume that an overflow raises an error, which is the standard behavior in high level programming languages.  `SafeMath` restores this intuition by reverting the transaction when an operation overflows.

`pragma solidity ^0.6.0;
library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;
        return c;
    }
    function mul(uint256 a, uint256 b) internal pure returns (uint256) 
{
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        return c;
    }
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}`



The successful deployment link of XinFin: https://explorer.xinfin.network/tx/0x62a632f5b1379f432450b6c295adbb0c61d5a5d105130b4ed9eb97551900d8fd
Loops in Ruby
Tags: ruby, codenewbie, beginners
Published: 2020-10-24 08:54:45

Good day, dear readers, coders, and enthusiasts! We have moved so far in Ruby that we can write pretty complex programs already. Now we have to learn repetitions and loops in Ruby.
  
# “while”
  
It is a regular repetition operator that is present in almost all programming languages. It compares the condition given to it and if it returns "true", it performs the expressions within its block. Anytime when the condition returns "false", it breaks the repetition and sends you out of the block. Here is the syntax:
  
```
a_number = 0

while a_number < 10
  puts "The number is = " + a_number.to_s
  a_number += 1
end
```
  
# “until”
  
It is exactly the opposite of "while" operator. It resembles "unless" which is the opposite of regular "if". It repeats the block within it till the time until the condition returns "true".
  
```
a_number = 0

until a_number == 10
   puts "The number is = " + a_number .to_s
   a_number += 1
end
```
  
# Stop the repetition — “break”
  
You will find "break" useful if you want to stop the repetition somewhere in the process. Here is an example to this:

```
# If you are looking for the number 5
# then we have to stop it when the value of a number is 5
a_number = 0
while a_number < 100
   break if a_number == 5
   puts "We did not find the number 5 yet..."
   a_number += 1
end
```
  
In the example above, we break the repetition with the help of the "break" operator when we find the number 5.
  
# Progress to the next iteration — “next”
  
If in some cases, you don't want to execute the block of code within the repetition and pass to the next iteration, the "next" operator comes in handy for this. In some other programming languages, you can meet the same operator, but called "continue". 
  
```
a_number = 0
# if you want to output only odd numbers between 0-100

while a_number < 100
   a_number+= 1
   next if a_number% 2 == 0
   puts a_number
end
  
# if the condition after the "next" operator returns "true" 
# then it does not execute the code coming after that and 
# goes to beginning, to the "while" operator.
```
  
Ruby also has many repetition and looping operators besides these. We will look at many of them when we write about the related topics, like Arrays, Hashes, Lists, Ranges. Some of those methods are “for” and “each”.
  
# Fin
  
We came to an end of the "Ruby loops/repetitions" article. Wow, you have a pretty rich set of tools now. Every day, you learn a new set of tools and get more experienced. Your software also gets more professional and more productive. 
Learning always lets you move forward. No matter who you are, how old you are.
Please write your feedback and comments. I will be glad to read them.
See you in the next article!
JS FUNCTIONS AND MORE BASIC QUESTIONS
Published: 2020-10-24 08:53:00

Am learning how to create webpages, i have gone through basic html n css, now am trying to make javascript work but theres alot am not understanding about the code, so i was just viewing fuctions in js and having trouble understanding this statement...

const factorial = function fac(n) { return n < 2 ? 1 : n * fac(n - 1) }

console.log(factorial(3))
Hacktoberfest challenge completed!!
Tags: hacktoberfest
Published: 2020-10-24 08:31:44

Hello!🍁
I participated for the first time in Hacktoberfest 2020 and completed the challenge.🎊

### Background
I knew nothing about open source before participating in hacktoberfest. I recently joined Github and came to know about the fest while I was exploring github projects. I just thought of giving it a try. 

### Contributions

I contributed to tails-Devdojo project which provides custom tailwindCSS components for websites wherein I created a testimonial section having a sticky notes look. The other three contributions were programs for competitive programming helpful in cracking interviews.


### Reflections
Hacktoberfest 2020 has been a beautiful beginning for me to start my open source journey. It helped me gain a fair knowledge of open source giving my confidence a boost. I'm eagerly looking forward to participate in further Hacktoberfests.🥳
Free React Landing Pages!
Tags: react, gatsby, javascript, startup
Published: 2020-10-24 08:01:01

Welcome to Startup Landing! We've brought you a great collection of absolutely free landing pages built with React, Next JS & Gatsby JS. Every week, We will add super-fast mobile-optimized demos on different niches from our collection. And yes, it's completely free 🔥.

👉 Check it live here: https://startuplanding.redq.io/
👉 Check it on Github: https://github.com/Startup-Landing/Startup-Landing
👉 Check it on Producthunt: https://www.producthunt.com/posts/startup-landing

Every week, we’ll be adding lightning-fast startup landing page demos to our collection. Stay connected to get the latest updates!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ogejia9yrw90wy0sxi76.png)
document.getElementById vs jQuery ID selector
Tags: javascript, jquery
Published: 2020-10-24 07:24:35

document.getElementById and jQuery ID selector are not equivalent.

```javascript
var element = document.getElementById('id');
```

returns an HTML DOM Object, and

```javascript
var element = $('#id');
```

returns a jQuery Object. In jQuery, to get the same result as document.getElementById we can do:

```javascript
var element = $('#id')[0];
```
Create Arrows in CSS using the border property
Tags: css, design, ui
Published: 2020-10-24 08:00:05

---
title: Create Arrows in CSS using the border property
published: true
description: Use border property to create arrows in CSS.
tags: CSS, design, UI
cover_image: https://raw.githubusercontent.com/IsAmrish/images/master/dev-to/arrows.png
---

[https://codepen.io/isamrish/pen/MWebELW](https://codepen.io/isamrish/pen/MWebELW)
My new Portfolio!
Tags: portfolio, html, css
Published: 2020-10-24 07:49:16

I've made a new version of my Portfolio. I went with a clean and minimalistic design, using a dark color palette and some nice emojis. Let me know what you think!

https://www.sageeconway.com/ 

And here is the code: https://github.com/SaConway/portfolio-v2
Top and Open Source Game Development Frameworks and Libraries For Different Programming Languages
Published: 2020-10-24 07:48:44

###For all the game developers out there, here is a really cool article on open-source Game Development frameworks and libraries.

(#programming #developer #react #java #php #html #python #gamedevelopment #gamedesign #frameworks #opensource)

https://medium.com/datadriveninvestor/top-and-open-source-game-development-frameworks-and-libraries-for-different-programming-languages-30d71fe1d83d
Clean your code by using Git Rebase!
Tags: opensource
Published: 2020-10-24 07:37:26

### Introduction
As usual, my assignment this week is to keep improving my code's readability. In my previous commits, I always keeps all my functions under one entry point file. As a result, it would be such a struggle for me and other to maintain and understand my code efficiently.

### What I do
#### Improvements
I am fully aware of the inconvenience that I would end up if I don't make any improvements. So there are some changes:
##### Move all functions to separate helper files
* All functions working with URLs will be moved to an URLs helper file.
* All functions interacting with files will be moved to an fileInteraction file.

Whenever I feel like using any of these functions above I would easily import it from the files. Therefore, my code structure would be way more organized and easier to maintain if there is any problem.

##### Reduce code duplication
* All blocks of code that is used multiple times will be convert into a function. So, I can reuse them without rewriting them over again.

##### Squash all commits into one by using `git rebase`

### Difficulties 
* Sometimes we will be in trouble if I forget to import the functions after separating them since all of them are tightly connected to each other. By which, I mean fileInteraction functions sometimes call URL helper functions and we have to import them properly in order to make our app run smoothly.

### Conclusion
Knowing what to do to enhance your code performance could give you chill. However, I know so clearly that my work is still flawed and I am more than welcome if any one can suggest any improvements I could make. You could check my latest commit at [c22a005](https://github.com/phast184/link-checker-tool/commit/c22a005e8d1998b3970dec741bf2afa8bdcdabab).
How to install Alexa App? and echo dot setup?

Tags: downloadalexaapp, echodotsetup, amazonalexaapp
Published: 2020-10-24 07:25:30

Setup Echo Dot using the Alexa app
Echo Dot devices are highly efficient and they can perform multiple tasks as compared to any other expensive echo devices. Amazon Echo dot has more than one functions, some of them are, music playback, alarm setting, to-do list creation, setting timers, weather updates, current news, etc.

If you want to shop then the Echo dot can place an order for you at Amazon online store. Echo devices can also manage and control smart home devices such as switch the lights, locks, Ac thermostat, ON/OFF washing machines, vacuum cleaner, and many more.

Amazon Echo dot artificially intelligent to learn new skills and it keeps learning all the time. They are also adaptive in nature and can adapt to the user’s speech pattern, vocabulary, and personal preference.

Echo Dot Setup
1. For the <a href="https://wifistreaming.us/echo-dot-setup/"> Echo dot setup</a> the user needs to connect Echo dot to wifi connection with the Alexa app. It is a simple and basic task that can be executed by following the instructions showing on the screen or you can follow the steps described below.

2. The user needs to place an Echo device at the central location but bears in mind to keep it at least 21 centimeters away from the walls and also away from vents and blowers.

3. Now plug your echo dot device and turn it on.

4. At the same time, the user requires to <a href="https://wifistreaming.us/">Download alexa app</a>
 on smartphone/iOS/Android.

5. Alexa App is for IOS, Android and Dekstop users can download Alexa App from Apple App Store, from Google play store or Alexa Amazon com and with windows 10.

6. The user also requires Amazon account for Alexa App and Amazon Alexa login. Connect Alexa to wifi for Alexa App Setup. After Echo Dot Setup, the Alexa App feels like a Standalone device.

7. Continue to follow on-screen instructions in the Alexa app and choose a particular language that you are comfortable with.

8. Select the Echo Dot device from the list of various devices. And grant all permissions that are asked by the Alexa.

9 For Echo Dot Wifi Setup- search for a wifi network. Now select a wifi network and connect the echo dot by using a password in it.

10. The orange light ring on the Echo dot turns on which shows the connection of the internet.

11. Within a few minutes, the light turns to blue, denoting the established connection.
Successful completion of hacktoberfest challenge!
Tags: hacktoberfest
Published: 2020-10-24 07:09:57

## What I Learned From Hacktoberfest

My first ever contribution to the open source community was through #hacktoberfest 2020 by @DigitalOcean.
Initially was a unsure if I will be able to do it, if I will be able to apply whatever I have learned so far. But I am grateful to the #hacktoberfest community for being so resourceful, helpful and encouraging.
To all those who want to be a part of open source community, don't hesitate to ask questions, don't hesitate to make a contribution. PR accepted or not accepted, either ways it is a learning experience!
Reporting screen load delays in Android apps and iOS apps, and fixing them.
Tags: ios, android
Published: 2020-10-24 06:27:27

Think about this. Your user opens your mobile app, launches the first screen, and (s)he clicks to move to next screen. What (s)he expects is the new screen to appear or gradual graceful display using content animation. What if (s)he instead encounters a delay of few seconds before the second screen opens? That situation is enough for the user to be turned off from your app.

Let us see how we can handle the situation.

# 1. Handle the bug gracefully

Well, agree that you cannot always do a fool proof testing before you launch the app. But what you can do is to detect the bug in realtime and programmatically show a message apologising for the delay, and that you will get this issue fixed soon. That should calm down the user.

# 2. Identifying the root cause

To fix the issue what you will need is a chronological sequence of life cycle events of the Activity / Fragment in case of Android app and ViewController in case of iOS app. This will help to identify where exactly the delay happened. Once that is known you will be able to check what exactly is happening there. Some of the common causes are:

* Database interactions.
* Network calls to the API.
* Third party interactions.
* Thread blocked waiting for response from another thread.

# 3. Fixing screen load delays

Now that you have identified the root cause, fixing them is much easier. You just need to ensure such heavy operations are moved to a later stage of the screen lifecycle after the screen is properly loaded. Avoid doing any such operations in _onCreate_, _onStart_ or _onConfigurationChanged_ lifecycle events of the _Activity_ in case of Android app. If it is an iOS app, move out any such code from _loadView_, _viewWillAppear_, _viewWillLayoutSubviews_ or _viewWillTransition_ events in _ViewController_.

Use your animation and screen design skills to handle the operations after screen load process is done.

# 4. How to detect the delay and collect data

Use an SDK / framework like Finotes ([https://finotes.com](finotes.com)) which has the capability to detect the bug and report the lifecycle events along with timestamps. Also Finotes has a call back mechanism when a bug is detected and you can use this call back to show messages and execute graceful handling of the situation.

Here is a blog on how Finotes can be used to detect screen load delays in Android - [https://www.blog.finotes.com/post/how-to-detect-screen-load-delays-in-android-apps](https://www.blog.finotes.com/post/how-to-detect-screen-load-delays-in-android-apps).

The capability is available in Finotes iOS framework as well.
How to Internationalize Your Game in Godot
Tags: godot, game, gdscript
Published: 2020-10-24 06:21:34

Hi, I'm [Hideki](https://twitter.com/hideckies).
---

>This article is originally posted [here](https://hideckies.github.io/posts/how-to-internationalize-game-in-godot/).  

---

I use Godot when developing [my games](https://hideckies.github.io/works/) in most cases.  

By the way, I am Japanese.
So I make my game in Japanese first. But I want people all over the world to play my game so I need to make it internationalized.  

**Godot is great. We can do it easily😍**


## 1. Make CSV files

As written in [this document](https://docs.godotengine.org/en/stable/getting_started/workflow/assets/importing_translations.html#doc-importing-translations), We need to make `.csv` files that describes the translation of each words.  

For example:

```
keys, en, ja
INFO,About this game,このゲームについて
SAVED,"Saved successfully.","保存しました。"
RESET,"Reset successfully.","リセットしました。"
```

`keys(here INFO, SAVED, RESET)` will be used in your code in gdscript later.
Separate each word with a **comma(,)** for each language.  

<br />

## 2. Import .csv file

Now, put this .csv file into the root of your Godot project.  
For example:  

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

<br />

Click this .csv file and click the `Import` tab.  

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

Click "Reimport".  

<br />

## 3. Configure the translations.  

Go to `Project` -> `Project Settings` and then click `Localization` tab.    

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

You can add the translation file(ex: `text.en.translation`) by pressing the `Add...` button.  

<br />

## 4. Convert key to text

When you created `.csv` file, you specified some keys(In my situation, INFO, SAVED, etc...). The opportunity to use it has come.  

For instance:  

```
$Label.text = "SAVED"
```

If you write like the above,  the string "SAVED" is converted to **"保存しました。"** in the devices supported Japanese, or **"Saved successfully."** in the other devices.  

Well done!  

<br />

## 5. Test

If you want to check if localization works properly, you can check it by the following:  

```
func _ready():
    TranslationServer.set_locale("en")
```

*"en" is the language you want to check.  

Please refer to the [Locale list](https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html#doc-locales) to check the language code you want.  


## Now your game is International🌌
Why do I need a VPN?
Published: 2020-10-24 06:19:17

People don’t like to be tracked and watched – that’s the main reason why they use a virtual private network.

When you’re browsing through a VPN, your traffic is encrypted. No one can see what you do online, nor interfere in any way.

A VPN also allows you to bypass internet censorship. When you connect to remote servers, you can easily access the global internet.

You use public Wi-Fi regularly - By definition, VPN is your best friend when using public Wi-Fi. Hackers have many methods to steal your data on public hotspots, but using a VPN means that you can stop worrying about that. With a secure VPN connection over Wi-Fi, you can browse online in full privacy.

You want to access blocked websites - If you want to use Facebook in China or access streaming services while abroad, a VPN can help. It changes your IP address and redirects your connection to the internet through a remote server. This way, a VPN allows you to unblock various websites.

You use file-sharing services - Despite many legitimate uses, many ISPs try to discourage their users from P2P file sharing by setting bandwidth limits. A VPN makes it difficult for your internet service provider to detect that you are sharing files and shape your internet connection.

https://sites.google.com/view/nordvpn-3-year-plan/
Completed Hactoberfest
Tags: hacktoberfest
Published: 2020-10-24 06:15:20

✨Hactoberfest is a fun with coding experience ✨


Hactoberfest is a very well organized online coding platform with Github. Learned some basics about Github, specially pull request. An excellent platform to learn and grow.

Below is my repository link where I created pull request

https://github.com/DhirajLotlikar?tab=repositories


Excited to get my developer swags and interested in further open source coding challenge from Hactoberfest and Dev.
4 benefits of Arch Linux 
Tags: linux
Published: 2020-10-24 06:01:17

Hi! At the moment I have an Arch and Manjaro dual boot. What are the benefits of using Arch?

1. You get a rolling release, meaning updates are constantly integrated into your current OS, there is no overwriting of an Arch v.1 with an Arch v.2. So you always have the latest software instantly (which can be also a disadvantage when there are still bugs)

2. You can make use of the Arch Wiki which is an excellent resource and sometimes also looked at by users of other distros.

3. You will learn a lot by building your own system from scratch.

4. You know whats on your system meaning there is nothing installed at the start that needs to be removed.

If you want a more chilled start into an Arch based distro, you could try Manjaro. Also I dont recommend Arch Linux for beginners, because you need to put a bit of work into it which is easier with some Linux experience. What do you like about Arch? Have a nice day. :)