teleren/devto huggingface dataset:
How I passed the AWS Certified Cloud Practitioner Exam (with no prior AWS knowledge)!
Tags: aws, cloudcomputing, awsccp
Published: 2020-09-04 01:51:53

### Some overview of the exam:

The AWS Certified Cloud Practitioner exam is intended for individuals who can demonstrate an overall understanding of the AWS Cloud. The exam can be taken at a testing center or from home as an online proctored exam. I took the exam at home, it is a proctored exam and I was required to pass a verification to prove I wasn't cheating or using resources during the exam.

### Resources I used to prepare:

**I started off with this video from FreeCodeCamp:**
{% youtube 3hLmDS179YE %}
It's a 4 hour video but it highlights all of the topics that are included in the exam. Keep in mind that I started with no prior AWS knowledge so this video was a great starting point for me. I highly recommend doing the follow-along in the video, because there is no better preparation than hands-on experience. This resource was the most helpful for me. I did however watch it a couple times to solidify topics. I made flashcards after going through the video with definitions of highlighted topics/cloud concepts. There are a lot of abbreviations used instead of the full form of certain technologies within AWS so the flashcards were a huge help.

**Walk-through videos of sample exam questions:**

{% youtube ki0b5THoAvw %}
{% youtube bVUkofgOMcA %}


It was helpful to watch the walk-through of the sample questions to learn the different strategies that could be used to figure out some of the exam questions.



**Amazon Web Services Whitepapers:**

[AWS Overview](https://d1.awsstatic.com/whitepapers/aws-overview.pdf)
[AWS Pricing Overview](http://d1.awsstatic.com/whitepapers/aws_pricing_overview.pdf)
[AWS Support Plans Overview](https://aws.amazon.com/premiumsupport/plans/)

Now, I know that it's not fun to read these, but personally it was helpful to skim through these for review. You don't need to know everything in the whitepapers line by line. Just an overview will suffice. 

There are lots of paid resources and classes for this exam but after using these I don't think those are necessary at all.
Everything that was asked in the exam was covered by most of the resources that I listed above. If you have any other questions, leave a comment!
Why I Became a Software Developer.
Published: 2020-09-04 00:49:55

Growing up, I’ve always been interested in technology and how it was possible to make such intricate programs and websites. As high school came to an end, I was left with the decision to decide what I wanted to major in. I ignored all my instincts to study a tech-related field and chose psychology. I sold myself short because I simply thought that I couldn’t become a successful software engineer. When I thought of people who were successful in this field I never really thought of people I, as a woman, could relate to, and it discouraged me from even starting to study software engineering. After a semester of studying psychology, I started to become uninterested and the reason for that is simple. I didn’t have the passion to study psychology. I was truly passionate about software engineering but I shied away from getting into the field because 18 year old me told myself I couldn’t do it.

I started self studying programming and got into the basics of coding. Within a few tutorials, I realized that this is what I’ve been wanting to do all along. While doing my research, I found out about women like Grace Hopper and Betty Holberton who were one of the many pioneers of software engineering. I felt inspired and I soon realized that I should’ve never sold myself short in the first place. I should’ve went with what I was passionate about instead of putting myself down. But what’s done is done and now I will never sell myself short when doing something I am passionate about. Now, I take on challenges as they are thrown at me instead of turning the other way and choosing an easier option. Not only do I want to be a successful software engineer because of my love for what I’ve learned so far in programming, but to represent women in technology for other aspiring women so that they don’t feel underrepresented in any way.

When I found out about Lambda School, I was taking CS courses at my local community college and I was planning to attend a coding boot camp. I enjoyed studying Computer Science however, I wasn’t able to apply the information to real-world projects partly because everything was being presented in lecture format. In my personal opinion, one cannot become a successful software engineer by listening to lectures and taking multiple choice tests. After researching Lambda School, I found that it taught software engineering with the progressive approach that I wanted from college all along. Lambda School provides a more hands on approach to learning software engineering. It also pushes working as a team and learning how to network with others in order to accomplish tasks which is similar to how software engineers work in the real world. Ultimately, it would give me the skill set to become a successful software engineer.
How to add featured image to a new wordpress theme
Published: 2020-09-04 00:48:06

## **1) Add featured image setting on functions.php**

function theme_post_thumbnails() {
    add_theme_support( 'post-thumbnails' );
}

add_action( 'after_setup_theme', 'theme_post_thumbnails' );

## **2) Add the feature image to your post**

![Featured image](https://dev-to-uploads.s3.amazonaws.com/i/fvaj647g3bdeag531ian.png)


## **3) Add the image to your single posts**


Here you have to go to single.php, or create that file in the case that you don't have it, and here write something like this:

![Code post](https://dev-to-uploads.s3.amazonaws.com/i/pi2clqmkma6mxsxqh8sx.png)

## **4) Now go to your post, and... thats all!**


![Post result](https://dev-to-uploads.s3.amazonaws.com/i/ar0pkqzlsoj75s46ra0c.png)

Sayonara
How do you cope with database migration?
Tags: question, discuss, database
Published: 2020-09-03 23:19:39

---
title: How do you cope with database migration?
published: true
description: I want to hear your database tricks!
tags: question,discuss,database
//cover_image: https://direct_url_to_image.jpg
---

I find databases (mostly the relational one) to be one of the components more adverse to change in a software system. That's even worse if there some kind of ORM between the tables and the data model in our application.

There's always some resistence in altering a database, especially in a consolidated product that is already live in production. 

With database migration I mean every operation needed to handle the porting of a database from its current version to some new version, maybe after introducing some new feature in the app that impact the data schema.

So I'm talking about versioning, scripts, data import and update, dedicated automation etc.

I'm a long time user of [Liquibase](https://www.liquibase.org/) for this kind of stuff, but I find it a little cumbersome in its usage and painfully slow when there are lot of migrations to analyze (I'm using it in it's Groovy flavour, maybe it depends on that).

Recently I explored Active Record migration and found it quite refreshing, although I think it's a bit tied to Rails (where Liquibase it's more obiquitous).

I'm curious to hear what are your tools and strategies to cope with database migration.
BFE.dev challenge #58. get DOM tree height
Tags: javascript, challenge
Published: 2020-09-04 00:37:41

> https://bfe.dev is like a LeetCode for FrontEnd developers. I’m using it to practice my skills.

This article is about the coding problem [BFE.dev#58. get DOM tree height](https://bigfrontend.dev/problem/get-DOM-tree-height)

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

## Look at the interface

```js
/**
 * @param { HTMLElement | null } tree
 * @returns { number }
 */
function getHeight(tree) {
  // your code here         
}
```

Height of a tree is the **maximum subtree height** + 1, so this could be easily done by recursion.


## Start coding(recursion)

```js
function getHeight(tree) {
  if (tree === null) return 0
  return Math.max(
    ...Array.from(tree.children).map(getHeight), 
    0
  ) + 1
}
```

Notice the `null` case and usage of `Math.max(...[])`.


## rewrite with iteration

When we meet recursion, we should try to rewrite it in iteration. 

As we want to get the height, it means to get **count of level**, so we could just use a `queue` to solve this.

Here is the basic code.
```js
function getHeight(tree) {
  if (tree === null) return 0
  const queue = [tree]
  let height = 0
  while (queue.length > 0) {
     // TODO
  }
  return height
}

```

Notice we use a `queue` array to hold each level. Initially it is the root node.

In the `while` loop, we do as follows

1. shift all the elements out
2. increment height
3. push all their direct children in the queue.

This leads us to 

```js
function getHeight(tree) {
  if (tree === null) return 0
  const queue = [tree]
  let height = 0
  while (queue.length > 0) {
    let count = queue.length
    height += 1
    while (count > 0) {
      const head = queue.shift()
      queue.push(...head.children)
      count -= 1
    }
  }
  return height
}
```

## Passed!

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

This is easy one. Maybe you can also have a try at https://bfe.dev

Hope it helps, see you next time.
Logical OR (||) vs Nullish coalescing (??) operators
Tags: javascript
Published: 2020-09-04 00:27:01

Whenever I talk about `??` people have asked me the difference between Logical OR (||) vs Nullish coalescing (??) operators, so here is a quick post.

__Truth Table for logical OR `||`:__

`LHS || RHS` returns either of the truthy value.

| LHS | RHS | Result |
|-----------|-----|--------|
| null | 1 | 1 |
| undefined | 1 | 1 |
| 0 | 1 | 1 |
|false | 1 | 1 |
| '' | 1 | 1
| `` | 1 | 1
| NaN| 1 | 1


__Truth table for Nullish coalescing `??`:__

Returns the RHS for "nullish" LHS values. 

Else returns RHS.

[`nullish` -> `null` or `undefined`]



| LHS | RHS | Result |
|-----------|-----|--------|
| null | 1 | 1 |
| undefined | 1 | 1 |
| 0 | 1 | 0 |
| false | 1 | false
| '' | 1 | ''
| `` | 1 | ``
| NaN| 1 | NaN

__Quick image with more details:__

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

[Original Post](https://h3manth.com/new/blog/2020/nullish-coalescing-vs-logical-or/).
Golang Web - Render Partial HTML Template
Tags: go, backend, webdev
Published: 2020-09-04 00:16:29

In this series, we will to learn how to Create, Parsing, and Render all it files, so lets do it.

# Structure Application
Create new project, prepare files, and folder with arrangement like with this picture.

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

# Backend 
Open file main.go, and then fill in the following code

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

Next, still in the function main, add the new both Route

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

# Frontend
- Open file index.html, and then write this code.

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

- File about.html

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

- File _header.html

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

- File _message.html

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1bi8k79ormtjuj7dugqi.JPG)

# Run & Test

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0d8bcse6lbn5j2mqokr6.JPG)

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

Finally! Grats, hope your enjoy it.
How to get all the attributes of an element using JavaScript?
Tags: javascript
Published: 2020-09-04 00:00:00

---
  title: How to get all the attributes of an element using JavaScript?
  published: true
  tags: JavaScript
  date: Fri Sep 04 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/get-all-attributes-of-element-dom-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-faaeb22f18f55f4e06b7720c7400ef98.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/get-all-attributes-of-element-dom-javascript)
  
To get all the attributes of a DOM element, we can use the `attributes` property on the element using JavaScript.

Let's say we have a `h1` tag with custom attributes `data-color` and `data-maxlength` like this,

```html
<h1 data-color="red" data-maxlength="50">Heading</h1>
```

Let's get all the attributes using the `attributes` property on the element.

```javascript
// first get the reference to h1 element
const h1 = document.querySelector("h1");

// get all attributes
// using attributes property
const h1TagAttributes = h1.attributes;

console.log(h1TagAttributes);
```

The property returns the attributes as `NamedNodeMap` array-like Object.

So to make it easy let's map through each attribute using the `for...of` looping statement and get each attributes name and value.

```javascript
// first get the reference to h1 element
const h1 = document.querySelector("h1");

// get all attributes
// using attributes property
const h1TagAttributes = h1.attributes;

// loop through each attribute
for (let attribute of h1TagAttributes) {
  console.log(attribute.name); // attribute name
  console.log(attribute.value); // attribute value
}
```

See live example in [JSBin](https://jsbin.com/wikogututi/1/edit?html,js,console,output).

### Feel free to share if you found this useful 😃.

---
Let’s Take A MEME Break!!!
Tags: meme, programming, humor
Published: 2020-09-10 07:39:07

---
title: Let’s Take A MEME Break!!!
published: true
date: 2020-09-04 00:00:00 UTC
tags: MEME,Programming,Humor
canonical_url: https://www.loginradius.com/engineering/blog/lets-take-meme-break/
---

Programming is one of the fields which have a lot of funniest memes and dark jokes available. we have to deal with lots of bugs and errors/issues, which ruins the whole day. So, a little meme break is necessary for a Programmer, which will help in releasing the stress and anxiety…

   
[Read On](https://www.loginradius.com/engineering/blog/lets-take-meme-break/)
4th September 2020: IAC Team Status Update
Tags: puppet, modules
Published: 2020-09-04 18:45:10

---
title: 4th September 2020: IAC Team Status Update
published: true
date: 2020-09-04 00:00:00 UTC
tags: puppet,modules
canonical_url: https://puppetlabs.github.io/iac/team/status/2020/09/04/status-update.html
---

The IAC team has been active over the past week.We worked on releasing modules and also reviewing contributions from the community.Here’s a resume of the most cool things:

## Module Releases from IAC Team

We’ve had a few modules released this week:

- [puppetlabs/kubernetes](https://github.com/puppetlabs/puppetlabs-kubernetes) (v5.3.0)

## Community Contributions

We’d like to thank the fantastic Puppet Community for the following contributions over the past week:

- [puppetlabs/puppetlabs-kubernetes](https://github.com/puppetlabs/puppetlabs-kubernetes): Thanks to [Jason Whall](https://github.com/JasonWhall) for this [change](https://github.com/puppetlabs/puppetlabs-kubernetes/pull/436) which updates docker yumrepo default .
- [puppetlabs/puppetlabs-accounts](https://github.com/puppetlabs/puppetlabs-accounts): Thanks to [Jarret Lavallee](https://github.com/jarretlavallee) for this [change](https://github.com/puppetlabs/puppetlabs-accounts/pull/333) which allow for Sensitive type passwords in accounts::user .

### DSC User Testing

With the last of the major technical hurdles out of the way, the PowerShell DSC Puppetizer is ready for another wave of user testing.[Joey Piccola](https://github.com/joeypiccola) reached out to offer some help with testing (thanks, Joey!) and we were quickly able to Puppetize and send over both ActiveDirectoryDsc and xFailOverCluster - putting almost 30 puppetized DSC resources into his hands in mere minutes!Not only have the build times slimmed dramatically, but the packaged size of these modules is _tiny_, under 150kB each!If you’re interested in participating in our beta testing program, you can reach out to us at [dsc@puppet.com](mailto:dsc@puppet.com)!

### Welcome to the Team

We want to announce to you that [Disha Kareer](https://github.com/disha-maker) is the newest member of the IAC Team.[Disha](https://github.com/disha-maker) is Undergraduate student studying BSc Computing and Information Technology including Professional Experience.She enjoys volunteering and meeting new people.She will help us to fulfill the IAC Team noble mission.

## Wrap-up

That’s it for this weeks update, a big THANK YOU for all your contributions and support.
OWO - A fuzzy string transformer written in Golang.
Tags: go
Published: 2021-04-15 10:12:58

---
title: OWO - A fuzzy string transformer written in Golang.
published: true
date: 2020-09-04 00:00:00 UTC
tags: Go
canonical_url: https://mnlwldr.com/owo/
---

Huohhhh. fuwwy stwing twansfowmew ;3

Built [@zuzakistan](https://twitter.com/zuzakistan "zuzakistan on Twitter")’s ([@BBCBweaking](https://twitter.com/BBCBweaking "BBCBweaking on Twitter")) OWO with Golang.

Source: [mnlwldr/OWO](https://github.com/mnlwldr/owo "GitHub").

```Go
package owo

import (
	"math/rand"
	"strings"
	"time"
)

// Define a prefixes variable as a slice of strings
var prefixes = []string{
	"<3 ",
	"0w0 ",
	"H-hewwo?? ",
	"HIIII! ",
	"Haiiii! ",
	"Huohhhh. ",
	"OWO ",
	"OwO ",
	"UwU ",
}

// Define a suffixes variable as a slice of strings
var suffixes = []string{
	" ( ͡° ᴥ ͡°)",
	" (இωஇ )",
	" (๑•́ ₃ •̀๑)",
	" (• o •)",
	" (●´ω｀●)",
	" (◠‿◠✿)",
	" (✿ ♡‿♡)",
	" (　\"◟ \")",
	" (人◕ω◕)",
	" (；ω；)",
	" (｀へ´)",
	" ._.",
	" :3",
	" :D",
	" :P",
	" ;-;",
	" ;3",
	" ;_;",
	" >_<",
	" >_>",
	" UwU",
	" XDDD",
	" ^-^",
	" ^_^",
	" x3",
	" x3",
	" xD",
	" ÙωÙ",
	" ʕʘ‿ʘʔ",
	" ʕ•̫͡•ʔ",
	" ㅇㅅㅇ",
	", fwendo",
	"（＾ｖ＾）",
}

// Translate the given text. You can set withPrefix and withSuffix
// to true or false, if you want them or not.
// It returns the translated text
func Translate(text string, withPrefix bool, withSuffix bool) string {

	// Define a concat variable as a slice of strings
	var concat []string

	// if withPrefix is set to true add it to the concat slice
	if withPrefix {
		concat = append(concat, prefixes[random(len(prefixes))])
	}

	// substitute characters and add the processed string to the concat slice
	concat = append(concat, substitute(text))

	// if withSuffix is set to true add it to the concat slice
	if withSuffix {
		concat = append(concat, suffixes[random(len(suffixes))])
	}

	// Join the concat slice and return it as a string
	return strings.Join(concat, " ")
}

// It replaces characters in the given text
// It returns the processed string
func substitute(text string) string {
	return strings.NewReplacer(
		"r", "w",
		"l", "w",
		"R", "W",
		"L", "W",
		"no", "nu",
		"has", "haz",
		"have", "haz",
		"you", "uu",
		"the ", "da ",
		"The ", "Da ").Replace(text)
}

// It returns a random number
func random(max int) int {
	return rand.New(rand.NewSource(time.Now().UnixNano())).Intn(max)
}
```
HTML DOM manipulation by JavaScript. . .
Tags: html, javascript, htmldom, webdev
Published: 2020-09-03 23:04:43

In Web Development career, `HTML`, `CSS` & `JavaScript` are the core subjects. Without these technologies, We can't develop web content. Before knowing about HTML DOM, we must have intermediate 
knowledge about `HTML` & `CSS`, we must know how HTML works & what we can do with it & also having knowledge of HTML __Elements__ 
& __Attributes__, list is also given below. ![Alt list of HTML Elements & Attributes](https://dev-to-uploads.s3.amazonaws.com/i/k2e6uqmdh1d4tyqaozo2.jpg)
On `#CSS` side, we must have knowledge about `#CSS` Selectors like,
![Alt CSS Selectors](https://dev-to-uploads.s3.amazonaws.com/i/xtofkrqrm3u4pmdqx0u6.jpg)
These `#CSS` selectors are following the HTML-DOM standard.
Let's move to the main point that what exactly HTML DOM is?
basically DOM stands for __Document Object Model__ you can see the picture below that how HTML-DOM looks like. 
![Alt HTML-DOM](https://dev-to-uploads.s3.amazonaws.com/i/vs368uy70ic2ko1w5506.png) 
                             __OR__
![Alt HTML-DOM](https://dev-to-uploads.s3.amazonaws.com/i/i8exoqk4wdyufownihvt.png)

Don't worry HTML-DOM is not rocket science it is just a simple way to interact (exchange any kind of data) to HTML page & nothing more! __Note: HTML-DOM can be manipulated (insert, delete, update) with any other programming languages too like Java, C# etc.__ So, now we knew that HTML-DOM is not part of JavaScript language but HTML. In the real-world, we mostly use JavaScript for it because JavaScript has advanced features for developing web content. Actually JavaScript is specially made up of web development. But it is not true that we can only programme web page by __JS__ for short. Well known company __Sony__ has many desktop software products which are written in JS language. Don't underestimate the power of JS. 
So, HTML has defined their own `Methods` & their `properties` to interact with HTML-DOM beacuese HTML-DOM is the part of HTML, we took one HTML-DOM method which is `document.getElementById()` & we also took property `innerHTML`
 ![Alt HTML and JavaScript source code](https://dev-to-uploads.s3.amazonaws.com/i/laurlfsk0o80f1hf9m4b.jpg)
Actually here we manipulate the HTML element `<p>` with attribute `id` & its value `p-tag` & `value` is the property of `id` attrubute. Now, see the reslut of same code but on browser side.
 ![Alt HTML JavaScript Code](https://dev-to-uploads.s3.amazonaws.com/i/6uwpuuk9agax93jj30yn.jpg)
 If you fully understand the __HTML-DOM__ manipulation you will be able to understand the hierarchy of __HTML__ page & you can easily play with HTML elements in `JavaScript` & `CSS`. Furthermore, __HTML-DOM__ is a way to play with elements according to your imagination. In this article, we have just discussed about __HTM-DOM Manipulation__ only we didn't study all the methods and properties. You can study in-depth about `HTML-DOM`.
https://www.w3schools.com/js/js_htmldom.asp
Algebra Expression Simplifier
Tags: javascript, webdev, showdev, serverless
Published: 2020-09-03 23:03:57

This is my relatively simple algebra expression simplifier! You can use it online [here](http://kiraprograms.com/equation-simplifier/), or see the GitHub repository with explained code [here](https://github.com/i8sumPi/algebra). 

I was having a lot of difficulty finding a free, moderately fast algebra simplifier online, so I decided to make my own. Hopefully it can ease the process of solving difficult mathematical problems (but please don't use it for cheating!). Simply enter an expression or equation, and you will get a step-by-step solution and simplified result.

For those interested in making their own algebra expression simplifier, I started by making a simple arithmetic simplifier following [this tutorial](https://medium.com/@stoopidguy1992/how-to-write-a-math-expression-parser-in-javascript-b5147bc9466b). Then, I changed that code so that it could handle equations as well. I made this project for fun and by myself.

I am mainly posting it here because, even though I spent a lot of time debugging the algorithm, there are probably still bugs. If anyone finds a bug while using the program, please let me know. Hope you enjoy!
<br><br>
UPDATE: I fixed the negative multiplication bug. Now, expressions such as `-1*-2` work.