teleren/devto huggingface dataset:
Database migration with Golang Goose
Tags: go, database, postgres
Published: 2021-10-19 19:10:09

---
title: Database migration with Golang Goose
published: true
description: Managing Database migrations with Golang goose using incremental SQL changes
tags: golang,database,postgres
canonical_url: https://citizix.com/managing-database-migrations-with-golang-goose-using-incremental-sql-changes/
//cover_image: https://direct_url_to_image.jpg
---

Database schema migration is the management of incremental, reversible changes and version control to relational database schemas. The migrations basically track granular changes to your database schema which are reflected as separate scripted files.

Golang Goose is a database migration tool. It allows you to manage your database schema by creating incremental SQL changes or Go functions.


Checkout this guide detailing how to manage database migrations with golang goose - https://citizix.com/managing-database-migrations-with-golang-goose-using-incremental-sql-changes/
3 Uncommon but useful HTML elements
Tags: webdev, codenewbie, html, javascript
Published: 2021-10-20 14:55:46

<h2>1) <code>&lt;abbr&gt;</code></h2>

The <b>abbreviation</b> `<abbr>` element is used to represent an acronym or abbreviation. If you include a `title` attribute, the text will be display as a tooltip on hover!

```html
<p>
  The <abbr title="Product Detail Page">PDP</abbr> provides
  information on a specific product.
</p>
```

<img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1634687036/JS%20Bits/abbr_tag_oimzss.jpg">

<hr>

<h2>2) <code>&lt;progress&gt;</code></h2>

The `<progress>` element will display a progress bar indicator that can be easily controlled with it's `value` attribute. The JavaScript in this example will incrementally fill our progress bar every 100ms as shown here:

```html
<label for="progress">Progress:</label>
<progress id="progress" max="100" value="0"></progress>

<script>
  const progress = document.querySelector('#progress');
  let val = 0;

  setProgress();
  function setProgress() {
    if (val > 100) val = 0;
    progress.value = ++val;
    setTimeout(setProgress, 100);
  }
</script>
```

<img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1634687087/JS%20Bits/progress_tag_jaqggk.gif">

<hr>

<h2>3) <code>&lt;wbr&gt;</code></h2>

The word break opportunity `<wbr>` element will allow you to specify exactly where a line of text should break when there is overflow. For example, if we have a super long line of text like this URL, we can tell the browser where the text should break if it doesn't fit on one line:

```html
<p>
http://is.this.just.real.life.com/is<wbr>/this/just/fantasy/caught/in/a/landslide/no/espace/from/reality
</p>
```

<img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1634687008/JS%20Bits/wbr_z3gckm.jpg">

----------
<b>Yo!</b> I post byte-sized tips like these often. Follow me if you crave more! 🍿

I'm on [TikTok](https://www.tiktok.com/@js_bits), [Twitter](https://twitter.com/JS_Bits_Bill) and I have a new [debugging course](https://jsbits-yo.com/bug-bash/) dropping soon!
Guide to building a Drone using Pixhawk 2.4.8 - Part 1
Published: 2021-10-20 03:06:12

In this first part, we'll look into all the parts we'll be using and what they do for the function of the drone

![Image credits to DIYDrones](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kt82xdb4ncnwju0n4dft.png)

## 1. The Control Board:
This is the main brain of the Drone and controls all the parts of the drone and ensures everything is in sync to make it fly. In this project we'll use Pixhawk as our control board(specifically version 2.4.8)

## 2. Motors:
These are the 4 motors that help in providing thrust to lift the drone of the ground, just remember two motors rotate clockwise while the other two rotate counter-clockwise for the same.

## 3. Propellors:
![Image credits to rcdronegood](https://www.rcdronegood.com/wp-content/uploads/2016/08/quadcopter-prop-rotation-diagram.jpg)

Here we observe we have two types of propellors and those are pusher props and the normal props, pusher props which have the **R** symbol on them are used for clockwise movement and the normal ones are used for counter-clockwise movement

## 4. Electronic Speed Controllers:
These help in sending and recieving signals between the motor and the control board. Each ESC has three wires(Red, black, white) which pertain to (vcc, gnd, signal) respectively.

For this build, we'll be removing the vcc cable and connecting the ESCs to the following ports:
![Pixhawk Outputs](https://ardupilot.org/copter/_images/Pixhwak_outputs.jpg)
![Pixhawk Motors](https://ardupilot.org/copter/_images/MOTORS_CW_CCWLegend.jpg)
![Propellors](https://ardupilot.org/copter/_images/prop-direction.png)

## 5. GPS Module:
The GPS module which contains the GPS module and other extra miscellaneous instruments help in maintaining the stability of the drone in terms of altitude and other various aspects.

## 6. Battery and Battery Level Indicator:
A lipo battery is used to control the parts of the drone and is connected to a power connector which routes the power to the motors, and the pixhawk board simultaneously. You might need one depending on your build.
![Battery Wiring](https://s2.bukalapak.com/img/72069685/w-1000/UL20200-2.jpg)

And please buy a Battery level indicator if you don't trust your batteries. Batteries fail a lot with me personally and so I used to have this which used to inform me whenever the batter level falls below a level after which I used to charge them.

## 7. Receiver and Transmitter:
For this you can use any RC modules but if you need to use more than 6 channels you probably would have to buy a PPM sum module too
I wasted 2 months in tutorial hell😖😫
Tags: developer, css, webdeveloper
Published: 2021-10-20 10:30:01

As I started learning to code, I was stuck in tutorial hell. It felt like, I am learning a lot of the stuff. I have mastered CSS and JS.


After Creating a lot of projects while watching tutorials. One day I decided to create a project of my own, and the biggest myth busted 😫.

I came to know that I don't know anything so I started another course and then the same happens until I discovered that I was in tutorial hell.


## WTF is Tutorial Hell?

Tutorial hell is when you continuously watch tutorials one after another and you feel like, you are learning a lot of things.


But when you start doing something your own, you found out you're even not able to solve a basic coding problem.


## The problem with tutorial hell?

- You get fake confidence.
- Fake feeling of growth.


Quote by Albert Einstein - 

> " insanity is doing the same thing over and over again and expecting different results. "


There is nothing wrong with using tutorials to learn new things. You just need to stop that desire of starting a new tutorial as soon as you finish the one you were working on.


When you complete a tutorial, try to recreate the same code using only your memory.  You will probably be stuck in a few things so rewatch/reread and again start the solving problem.


### How to Break tutorial hell?

- Learn the Basics
- take Proper Notes
- Start With a Small problem
- Be consistent
- Teach others
- Build Projects

Deep Dive 👇


#### 1. Learn Basics - 

Don't try to jump into advanced stuff without learning enough basics.

> Core Fundamentals >>>> frameworks


#### 2. take proper Notes - 

Notes are the best way to revise your learning because we humans are never able to remember all the things.

> Note the key points.


#### 3. Start with a small problem -

Always start with small coding problems, do not try to solve big problems because you get demotivated easily in the beginning.


Coding is all about solving problems so always break your problem into small sub-problem. 

#### 4. Be consistent - 

Do not try to learn everything in one or two months. be consistent with your learning soon you will see Great results.


#### 5. Teach others -

teaching is the best way to Recalling back what we have learned. 


#### 6. Build Projects - 

The more you code, The better you become 💛, Don't just watch the tutorials, practice what you learn.

## Conclusion - 

If you are able to relate to this article that you are in tutorial hell. Use the given techniques to escape from tutorial hell. 

I hope you enjoyed reading

Let's connect with me on 

- [twitter](https://twitter.com/Ali6nX404)
- [Linkedin](https://www.linkedin.com/in/mahesh-patidar-34a982192/)
Обзор нововведений в C# 10
Published: 2021-10-20 11:48:28

В данной, статье рассмотрим новую версию языка C# 10, которая включает в себя небольшой список изменений относительно C# 9. Ниже приведены их описания вместе с поясняющими фрагментами кода. Давайте их рассмотрим.
Choosing a storage solution for simple user input
Tags: storage, db, json, optin
Published: 2021-10-20 13:05:08

---
title: Choosing a storage solution for simple user input
published: true
description: JSON, key-value store, or a relational DB are all viable choices — but what are the pros & cons?
tags: storage, DB, JSON, optin
//cover_image: https://direct_url_to_image.jpg
---

Hi everyone,

here's an engineer-y question for you regarding lead generation online. 

Say you had to collect your visitors' name & email through a landing page opt-in. What storage mechanism would you use:

* a JSON file
* a key-value store
* a relational DB?

My current solution is a JSON file, however it's not very efficient because when saving a new entry, you need to parse all the existing ones into an Array from JSON, add the new data, then again serialize the entire collection as JSON, then write it back to the file. 

Also, if I'm going to do uniqueness tests (no double entries allowed for email, for example), I'll have to traverse the entire array to find the duplicate — I suspect this is more efficiently handled by the other two storage mechanisms (hash-based lookup in constant time).

Thanx for your input!
Coffee and Code: Git and GitHub Essentials Every Developer Must Know Right NOW!
Published: 2021-10-20 13:59:19

If you are an engineer, you might have worked with Git at least once in your life. However, would you vouch for being a Git expert and knowing all the technical how-tos? If not, then we have an event coming up for you.

Sankalp Swami will be live with Aviyel to help you get started with Git and GitHub, the must-knows for developers, and 1:1 Interaction on open source, contribution, and coding in general. Tell me a better way to bid goodbye to Hacktober?

**Speaker Spotlight:** Sankalp is a self-taught NodeJS Developer from India. With hands-on experience in JavaScript and NodeJS, Sankalp has worked with startups going global as a backend developer. In his free time, he writes blogs, reads technologies, and uses Django and Linux together.

**When:** October 21st, 9 pm PST | October 22nd, 12 AM EST

**Where:** To join, tap (even link)👇🏻
https://bit.ly/3BZ8Swt

If you are an open-source advocate or a developer who stands for freedom of code, Join Aviyel in building OSS today!

Till then, happy building. 🎉
See you at the event!
What happens when you send an email to spam?
Tags: email, beginners, cloud, inthirtyseconds
Published: 2021-10-20 16:07:36

TDLR: When you hit “Report spam”, this happens:

1. The offending email is moved to the spam folder
2. Spam detection systems are updated
3. If registered, an email complaint is sent through the FBL program in ARF format
4. The original sender should take action to prevent further spam

----

*Read on for more details, the extended, original post is on the OhMySMTP blog here: https://blog.ohmysmtp.com/blog/what-happens-when-you-send-an-email-to-spam/*

When you hit "Report Spam", at a minimum most email clients will place the email in a spam folder, and many providers will also update their spam detection models to prevent future spam.

That is helpful, but what about the person who sent the original email? If it genuinely is spam, then who cares? But perhaps the email was mis-categorized, or the sender wasn’t aware that it would be marked as spam. They need to know about spam reports to correct the issue.

There’s a solution: **Feedback Loops (aka FBLs)**. FBLs are systems that email inbox providers have set up to send back details of any emails that have been marked as spam to the original sender's platform.

Email providers and high volume senders can register for the FBL with the email providers, and they will share these spam reports (also known as Complaints) to a Feedback email address. The sender can then review these and choose to stop sending to the addresses or take other action.

There are FBL programs at the big inbox providers (Google, Microsoft, Yahoo), and https://validity.com have consolidated many smaller systems. Reports are sent using the [Abuse Reporting Format](https://en.wikipedia.org/wiki/Abuse_Reporting_Format).

Going through the FBL process can take a long time (hours or days), and many senders/services are not registered in the first place. 

Therefore to reduce spam in your inbox your best bet is to look out for unsubscribe links or use [temporary email addresses](https://www.idbloc.co/) and turn them off when done.
Agrippa 1.2 is out 🎉🎉
Tags: react, javascript, webdev, news
Published: 2021-10-21 08:42:10

[Agrippa](https://github.com/NitzanHen/agrippa) is growing steadily - it's been out for a little over two months, and already has a small community around it! 🎉🎉

If you're not using Agrippa yet, [get started here](https://github.com/NitzanHen/agrippa). If you *are* using Agrippa, thanks for being part of the community! Let us know what you think about it, here or elsewhere.

Either way, these are the changes introduced in v1.2.0:

In general, the two main changes brought about in v1.2.0 are more options, this time with a focus on supporting different structural conventions that exist among React developers.

Most notably, you can now:

- export a component as a default export (instead of a named export)
- declare a component as a `function()` declaration (instead of as a `const` with an arrow function)
- create `memo()` components.

These changes came as part of a larger reform in component generation. Generation logic was remade from the ground up - instead of a large, unwieldy template, we now have proper composition patterns and a `ComponentComposer`; internal terminology aside, this reform makes it much easier to scale, maintain and test the generation logic.

Following this reform, we have begun the process of writing standardized tests - testing for some of the core code already exists, and the rest will be covered in the soon future.

In parallel, we got some bonus enhancements - the API docs were rewritten and are now both comprehensive and easy to read, and Agrippa will also now search for a new version when run, so that you'll always be informed when a new version is available.

You can also find this information at the release page.

That's pretty much it! We already have some ideas for v1.3.0 - we're currently looking into adding support for styled-components, React native `Stylesheets` and `Mui 5` styling, writing more tests and more.

Join the community! If you haven't, try Agrippa out, and if you find a bug in Agrippa or want to suggest a new feature, please reach out here or on GitHub.

Thanks for your time, have a great day!
Mind Reader Cards
Tags: reactnative, gamedev, productivity, android
Published: 2021-10-20 19:27:14

Mind Reader Cards allow users to first guess one card from given 21 random cards and then it performs the magic algorithm to identify which card user have guessed. To reveal the card, app asks 3 simple questions and based on answer of those questions, app finds out the true card.

The app is built on reactnative. It can be downloaded from below link.

https://play.google.com/store/apps/details?id=com.mindreadercards

Please rate the app or drop the review so I can improve myself or the app.
code
Published: 2021-10-20 21:56:31

import logo from "./logo.svg";
import "./App.css";
import React from "react";
import { Document, Page, Text, View, StyleSheet } from "@react-pdf/renderer";

// Create styles
const styles = StyleSheet.create({
  page: {
    flexDirection: "row",
    backgroundColor: "#E4E4E4",
  },
  section: {
    margin: 10,
    padding: 10,
    flexGrow: 1,
  },
});

// Create Document Component
const MyDocument = () => (
  <Document>
    <Page size="A4" style={styles.page}>
      <View style={styles.section}>
        <Text>Section #1</Text>
      </View>
      <View style={styles.section}>
        <Text>Section #2</Text>
      </View>
    </Page>
  </Document>
);

export default MyDocument;
Magento Store speed Optimization
Tags: php, javascript, webdev, programming
Published: 2021-10-22 09:59:35

Page speed, as we all know, is critical to the seamless operation of your eCommerce site. Users may become frustrated if a website or store is too slow, so Magento Store optimization is required.

##What is Page Speed?

The page loading speed of contents on a website is referred to as page speed. The page speed is influenced by a number of factors, including the site's server, the size of the page files, and picture compression. The more quickly a web page loads, the more efficient it is for users. Many of them claim that page speed and site speed are the same thing, yet they are not. The average speed of numerous pages of a website is called site speed.

##What is Page Speed Optimisation?

The technique of optimising a page to lower its loading time is known as page speed optimization. Because there is a link between page speed and SEO, it is critical that the page loads quickly for a better user experience. The faster a page's information loads, the better its chances of ranking in a search engine. Quickly loaded pages are more enticing to site visitors, resulting in a lower bounce rate.

##Why Page Speed Optimisation is a major factor when it comes to SEO?

As discussed above, pages with higher load time have a higher bounce rate percentage and tend users to get frustrated with slow loading. Google measures time to the first byte when considering the page speed. The consistent increase in the bounce rates decreases the overall ranking on google. Thus, Page speed acts as a crucial ranking factor for search engines.

##Get the Cheapest Magento Store Optimisation:
If you opt for the Magento Page Speed Optimisation Service by CedCommerce, then the following will be the benefits from the experts to your Magento store:

>> Image Minified
>> JS and CSS Minification and Merging
>> Enabling of Magento Cache
>> Enabling Browser Cache
>> HTML Minimising
Magento Site in Product Mode and much more.

Speed up your Magento store today as with every second you delay, you are losing potential customers.
Better to Avoid General-Purpose Wrapper Exceptions [RE#12]
Tags: article, productivity, javascript, typescript
Published: 2021-10-22 14:45:23

---
title: Better to Avoid General-Purpose Wrapper Exceptions [RE#12]
published: true
date: 2021-10-22 14:30:00 UTC
tags: article, productivity, javascript, typescript
canonical_url: https://babakks.github.io/article/2021/10/22/re-012-better-to-avoid-general-purpose-wrapper-exceptions.html
series: Regular Encounters
---

If you’ve ever faced such temptation to wrap inner exceptions within some neatly-defined exception type, you’d better off fight the devil. Let exceptions be themselves and freely fly high the call stack. 💸

To elaborate on the issue, consider the hypothetical `DataProcessor` and the general purpose exception type `DataProcessingFailure` below:

```ts
class DataProcessingFailure extends Error {
  constructor(public innerError: Error) {
    super();
  }
}

class DataProcessor {
  process() {
    try {
      // Some processing
    } catch (err) {
      throw new DataProcessingFailure(err)
    }
  }
} 
```

Here, the `process()` method only raises a `DataProcessingFailure` exception, if any. Whatever exception occurs (e.g., `DivisionByZero`) the caller of `process()` just catches a `DataProcessingFailure` instance. So, `DataProcessingFailure` is a _wrapper exception_.

The reason behind advising against wrapper exceptions is the change of behavior that you exert on the downstream system seen by higher level controllers. For instance, you could mask a well-defined exception that itself is an intricate part of the domain model. Another example is when your wrapper could mask network related exceptions, most of which resolve just by retrying, albeit if some caller at higher level of call stack could catch them as they are.

Putting it all together, you’d logically prefer minimizing footprints/side-effects of various components/implementations on each other, so that you could avoid unwanted couplings/special-treatments.

* * *

**_About Regular Encounters_**  
_I’ve decided to record my daily encounters with professional issues on a somewhat regular basis. Not all of them are equally important/unique/intricate, but are indeed practical, real, and of course,_ **_textually minimal._**
First Hacktoberfest and open source contribution
Tags: opensource, webdev, hacktoberfest, javascript
Published: 2021-10-22 20:02:49

![comtribution shot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uoejfil4tnv63q95wtgv.png)
##About Me
Hey! I am Krishna from India final year student of Mater of Computer Applications and skilled in web development, Machine learning and cyber security enthusiastic. And also passionate about open source.

##How I started open source

This is started 3 months ago when I was watching a video on YouTube by Kunal Kushwaha and Eddie Jaoude They talked about open source and how a college student start contributing to open source. After the video I have join [EddieHub](https://www.eddiehub.org/) and other community.

If you are beginner and want to start contribute to open source then you have to join **EddieHub** organization. There you will get step by step guidance about how to get started.

First time start contribution in EddieHub organization repository after that some day I listen about **hacktoberfest** before this I don't have any idea about Hacktoberfest then I starts asking question in community and search on google about this.

*Hacktoberfest is a month-long celebration of open-source software by DigitalOcean that encourages participation in giving back to the open-source community. Developers get involved by completing pull requests, participating in events, and donating to open source projects. During this event, anyone can support open source by contributing changes and earn limited-edition swag*.

This is the beginner friendly so any can participate no matter you are a coder pro level coder or a newbie even you can start by contributing in documentation.


If you like this connect with me 
[Twitter](https://twitter.com/krishnapro_) [github](https://github.com/Krishnapro)
Hacktoberfest-2021
Tags: beginners, programming, hacktoberfest, webdev
Published: 2021-10-23 08:23:57

Hey Coders! Is this your first time contribution to open source for which you are being awarded?

A big **Yes** :stars: for me.
Hacktoberfest-2021 is my first time contribution to open source.
Here's my github link : https://github.com/thebhavana

* Contributing to open source projects is a different level of satisfaction.
* Getting rewards for the same is cool :smile:

Github platform allows us to work on multiple projects by eliminating the geographical gap of world. There are so many open-source projects available on github.
Adding codes to the existing repository and closing the issues was cool.  
*Looking for more such opportunities* :sparkles: