teleren/devto huggingface dataset:
Go Clean architecture rest api example 🚀👋👨‍💻
Tags: go, tutorial, architecture, microservices
Published: 2020-12-04 13:47:52

<img src="https://media.giphy.com/media/WUlplcMpOCEmTGBtBW/giphy.gif" width="30">I write my first [Go](https://golang.org/) simple example project, it doesn't has any advanced business logic or full test coverage, but i hope it can be intresting and usefull for someone 🤓. I didn't write all in details with code examples, here is link on [Github repository](https://github.com/AleksK1NG/Go-Clean-Architecture-REST-API), but if my pet project would be interesting for someone, so ready to share all my existing experience on this moment :)

Tried to create [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) REST API closer to real world production projects using, [PostgreSQL](https://www.postgresql.org/) as database, [Redis](https://redis.io/) for sessions and caching,
[AWS S3](https://aws.amazon.com/) for images uploading, [Jaeger](https://www.jaegertracing.io/) [OpenTracing](https://opentracing.io/), [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) metrics,
[Swagger](https://swagger.io/about/) documentation, [Docker](https://www.docker.com/) infrastructure for development.
For web framework i have chosen most popular for today [Echo](https://github.com/labstack/echo), another possible good alternatives [Gin](https://github.com/gin-gonic/gin), [Chi](https://github.com/go-chi/chi), [Mux](https://github.com/gorilla/mux).
SQL db standard solution on my opinion is combination of [sqlx](https://github.com/jmoiron/sqlx) and [pgx](https://github.com/jackc/pgx).
Redis for sessions and caching [go-redis](https://github.com/go-redis/redis)
[Viper](https://github.com/spf13/viper) for configuration.
[Zap](https://github.com/uber-go/zap) for logger, but this two is good too [zerolog](https://github.com/rs/zerolog) and [logrus](https://github.com/sirupsen/logrus).
Swagger for api documentation, i used [swag](https://github.com/swaggo/swag), another good one is [go-swagger](https://github.com/go-swagger/go-swagger)
[MinIO](https://min.io/) for AWS S3 good variant [minio-go](https://github.com/minio/minio-go)
[Validator](https://github.com/go-playground/validator) is good solution for validation.
For testing and mocking [testify](https://github.com/stretchr/testify) and [gomock](https://github.com/golang/mock) very good tools.
Session and Token Based Authentication, implemented both for this example project, used [jwt-go](https://github.com/dgrijalva/jwt-go) for JWT.
For database migrations i found [migrate](https://github.com/golang-migrate/migrate) is very nice tool and recommend use it.

Wraped all in docker, but for local development i found more cofortable separate run docker-compose with all necessary containers and separate run Go application, because its easier and faster for debug and rebuild.
For docker development created compose file with hot reloading using [CompileDaemon](https://github.com/githubnemo/CompileDaemon).

Full list of used technologies and source code u can find [here](https://github.com/AleksK1NG/Go-Clean-Architecture-REST-API) 👨‍💻 :)
Let’s be clear on what a domain is
Tags: domain, strategy, communication
Published: 2020-12-04 13:44:54

*by Daniela Kirchner*

Being clear and precise is a main advantage of coding language. Compared to the clarity we lack in our spoken everyday language. It is very hard to use the precise words and expressions to make them understood in the same way it was meant.

I am a Digital Strategist and one of my jobs is translating. Not literally, but as I want to make sure that everyone in a team shares the same ambition, I heavily push for a shared understanding.

Recently we were talking about **domains**. I recognised that different things were mixed up: platform, URL and field of expertise. 

If you look on Wikipedia, you’ll find various disciplines that make use of the term **[domain](https://en.wikipedia.org/wiki/Domain)**.In information technology there are several subterms such as **[application domain] (https://en.wikipedia.org/wiki/Application_domain)**, **[programming domain] (https://en.wikipedia.org/wiki/Programming_domain)** or **[network domain] (https://en.wikipedia.org/wiki/Network_domain)**. And of course, the topic goes beyond. Domain-driven design, for instance, is worth its own examination. 

This broad field raises the question of if there is a common origin for the term itself. According to the Oxford Dictionary, the late Middle English “Domain” stems from the French “domaine” of Old French “demeine” for “belonging to a lord”. 

This proves especially interesting as the word itself is a contronym: **“domain”** combines a meaning of both relatedness and separation in one. 

Therefore, communicating a clear meaning of “domain” is imperative. I push for this definition: **A domain is a distinct subset that specifies a particular field and relates to a certain owner.** 

However, The Oxford Dictionary’s definition is important for providing a baseline understanding for our field: domain is *“a distinct subset of the internet with addresses sharing a common suffix or under the control of a particular organization or individual”.*

The definition is very important. We need to be aware of it when we change the information architecture, adjust the hosting, compile backends, migrate URLs or define touchpoint strategies. 

What do you observe when people talk about domains? 
What are the fallacies you see?
Which other terms require clarification?
Indie makers and the Sunk Cost Fallacy
Tags: indie, economics, discuss, codenewbie
Published: 2020-12-04 13:43:00

---
title: "Indie makers and the Sunk Cost Fallacy"
description: "What is sunk cost fallacy? It's a cost that you sustained in the past (be it time, money, energy, whatever) and cannot be reversed, cancelled or undone."
tags:
  - indie
  - economics
  - discuss
  - codenewbie
cover_image: https://images.unsplash.com/photo-1536477832394-ac86b93e3753?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=600&q=80
published: true
canonical_url: https://cri.dev/posts/2020-11-18-Indie-makers-and-the-Sunk-Cost-Fallacy/
---

**Originally posted on [cri.dev](https://cri.dev/posts/2020-11-18-Indie-makers-and-the-Sunk-Cost-Fallacy/)**

The Sunk Cost Fallacy is a real pain.

**It's a cost that you sustained in the past (be it time, money, energy, whatever) and cannot be reversed, cancelled or undone.**

The fallacy is that yet *knowing about the sunk cost of a project*, you are often tempted to *justify your future investments* because of your past (most likely lost) investments.

The sunk cost *should not influence your future decisions*, yet it does. And the outcomes are often delusion, sadness and stress.

---

## Cut your losses

You might get *emotionally* attached to your projects.

Your idea "is awesome!", yet your **expectations** are not met by others.

You can't possibly understand why your project doesn't do as well as you have **hoped**.

You spent the last month *contacting potential clients, shipped v1/v2/v3/Beta1 and Beta2, optimized your landing page to maximize conversions*.

Yet nobody gives *a flying fuck* about your project, although your research and feedback received.

**This is when you should cut your losses.**

## Move on

It's perfectly normal to feel stressed/disappointed when you need to cut your losses and move on.

**But you need to realize it.**

If you don't realize it, or realize it too late, *you get burned*.

**You get burned by your own emotional decisions, which should have been rational all along.**

**It's business decision making after all.**

> It's not kindergarten where you just cry out loud and a nanny comes to cheer you up and console you.

*Just move on.*

It seemed a good idea in theory, but people have better things to do than to *feel pity over your failure*.

**And you do too.**

## Learn from your mistakes

You have nothing left to do than to learn from what you did **wrong**.

> Write it down. 
>
> Visualize the process you followed. 
>
> Maybe it wasn't that good after all.

Did you first of all understood that there was a real *value* for your potential customers, or you just thought *people would donate you money* because you spent months on your pretty project?

As you might have noticed, **You** is mentioned quite a few times in this post.

*This should make you reflect.*

It's not about you, but about **market, niches, interests, potential clients, value proposition, communication, marketing, connections, content.**
NTFS_FILE_SYSTEM error Windows 10 😱, and I guess I know some stuff I don't know.
Tags: windows
Published: 2020-12-04 13:14:47

This weekend I left my laptop on without power supply a hp spectre, while going out for a walk with my kids. When I got home the laptop had been turn off (in a bad way). When trying to turn it on I got a blue screen with the error code NTFS_FILE_SYSTEM. 😱 No!! What to do, my warranty just when out. Is the hard drive broken. It's a ploy to get me to buy a new computer. All the crazy stuff went through my head, as I panicked. 

After cooling down (after some hours) I found that I could reach the command line tools, and the computer had a x drive (partitioned), then something back in my head said "chkdsk" try "chkdsk". But I ignored that, and did all the other stuff. Try to run reset to a old restore point in Windows, and all the other stuff I don't know what does. Event thought about formatting the disk, and reinstall everything. But the voice in my head still said "chkdsk, try chkdsk " . Ok!! lets try chkdsk then. Run chkdsk C: /f from the x drive, some messages about fixing some bad stuff. Waiting.... reboot, worked. 

So what did I learn. Don't leave the computer on (without power saving on) un plugged. And listen to you inner voice, event it's telling you some old stuff you don't know you know.
Validate Forms with Event-Driven Javascript
Tags: javascript, beginners, codenewbie, webdev
Published: 2020-12-20 17:02:26

---
title: Validate Forms with Event-Driven Javascript
description: Validating input on the front-end is a great way to improve users' experience. I'll teach you to use event-driven JS to check user input before they submit!
published: true
date: 2020-12-04 13:09:00 UTC
tags: Javascript,beginners,CodeNewbie,webdev
canonical_url: https://raddevon.com/articles/validate-forms-with-event-driven-javascript/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ps853ram2l7yrub2v50q.jpg
---
Validating form input on the front-end is a great way to make your users’ experience better. When _I’m_ the user, I’d rather know immediately that something is wrong with my input than having to wait until I submit the form and get the results back.

In my previous video, I showed [how you can access a form’s values](https://raddevon.com/articles/working-with-html-form-fields-in-javascript/) which is one piece of the front-end form validation puzzle. This video completes the puzzle.

If you want to work along, [go to this video's page on my site](https://raddevon.com/articles/validate-forms-with-event-driven-javascript/) to get the project starter.

{% youtube hv20XIUFXiM %}

Before I teach you to write Javascript form validation, I’ll teach you ways to validate your form _without_ writing custom JS. HTML5 forms have some validation capability baked right in, and using this is preferable to custom validations.

Later, we move on to a scenario where built-in validation either wouldn’t work or would be more difficult than the custom variety. We’ll start by hooking into an event. This allows us to start running some Javascript when the user interacts with our form. Then, we’ll check the user’s values to see if they are valid. If they aren’t, we’ll stop the form from submitting.

Be sure to leave a comment if you have any questions. Thanks for watching!
#showdev: Bootstrap 5 Generator
Tags: webdev, design, css, html
Published: 2020-12-04 13:06:53

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


Build fast, responsive sites with Bootstrap 5 Generator

is a browser-based drag and drop Bootstrap template builder with powerful possibilities to create any pages for your business.

https://generator.ws
hacktoberfest
Tags: fest
Published: 2020-12-04 13:03:42

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/p4a78bbt0zzb0luh3mxb.jpg)
Hi all. 
I'm of course sorry it's so late, how do I get my badge?
My first hackfest, very unexpected of course. Thank you for your attention 
<3 
I'm from UA  Artem.
Daily Developer Jokes - Friday, Dec 4, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-12-04 13:00:17

---
title: "Daily Developer Jokes - Friday, Dec 4, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Friday%2C%20Dec%204%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12596739999.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Why couldn't the React component understand the joke?

___A:___ Because it didn't get the context.
 -->
NET NEUTRALITY
Published: 2020-12-04 12:55:01

Internet is free source of getting information. It allows people to connect and exchange information freely. Many of us must be reading about this for the first   time, for the rest they must have heard it but not sure, what it is actually related to?

WHAT'S NET NEUTRALITY?


Net neutrality is one of the biggest issues debated globally by the telecom regulators and TRAI is also in the process of finalising what will be a landmark recommendation for Indian telecom.

Net neutrality means that the individual should be free to use all contents and applications equally, without Internet service providers (ISP) discriminating against specific online services or websites. In other words, it is the principle that the ISP that  connects you to the internet does not get to control what you do on the internet.

In most of the countries there are rules to prevent internet service providers from interfering with how the user makes use of the internet. For example, we pay for the internet to ISP, we can use it however we see fit and the ISP has nothing to do with how we use it.

 { Without net neutrality, the internet as we know it will not exist. Instead of free access,  there could be "package plans" for consumers. To access international websites, you may have to pay a more.}


What will happen if there is no net neutrality?

ISPs will have the full control of internet traffic so that they can derive profit from it. For example, some ISPs believe that they can earn more by charging separately for some services like YouTube by giving a reason that.


Without net neutrality, the internet as we know it will not exist. Instead of free access, there could be "package plans" for consumers. For example, if you pay Rs 500, you will only be able to access websites based in India. To access international websites, you may have to pay a more. Or maybe there can be different connection speed for different type of content, depending on how much you are paying for the service and what "add-on package" you have bought.

Lack of net neutrality, will also spell doom for innovation on the web. It is possible that ISPs will charge web companies to enable faster access to their websites. Those who don't pay may see that their websites will open slowly. This means bigger companies like Google will be able to pay more to make access to YouTube or Google+ faster for web users but a start-up that wants to create a different and beer video hosting site may not be able to do that


What are public reaction to the concept of net neutrality?


People are trying on their part to oppose this concept by tweeting, by posting status on social networking or blogging. Some held conference to make people aware of this cruel step of ISP. There were also strikes carried out by people for net neutrality.


Since this topic has become a national issue, we all should bring to people's notice to oppose this concept and not to support it, for user's rights.
Project 1, Week 1, Day 5
Published: 2020-12-04 12:49:59

No progress made today. Quite a few things left to do. If it's some consolation the server is complete. Although just a skeleton of it. It can run a basic webRTC app but most of the work is yet to be done. 

Tasks left: 

* Create a Peer connection (I don't know how yet)
* Send Id of the peer to socket (So that it can be broadcasted)
* Make the app user-friendly and usable
* Run tests, improve performance

Luckily it's a long weekend. :)
Also, I just don't want it to be a project, just for the sake of a project. I want it to be useful to people. So, I have to make it fast and snappy. I don't know how to do that. I'll set up a CI/CD and make it open source maybe. There are a great deal of better developers out there, who could make it better. :) I think :)

[Pull Request](https://github.com/Cijin/project-we/pull/5)
Hacktoberfest 2020 badge
Tags: hacktoberfest, opensource
Published: 2020-12-04 12:45:27

I'm very happy to share that I received Hacktoberfest 2020 badge! This was the very first Hacktoberfest I've ever participated. I took the first step towards being an open source contributor. Hope to participate in Hacktoberfest 2021 !!!
Open-Source community and Hactoberfest.
Tags: hacktoberfest, opensource, codenewbie, github
Published: 2020-12-04 12:39:11

My journey in the tech world started this October with Hactoberfest in action. I was new to opensource and GitHub, even coding. 

It was a journey that helped me in several ways. Hactoberfest helped me get familiarize with the opensource community. I worked on a variety of projects from website development in HTML/CSS to React, Django, Flutter, and even backend in NodeJs. And throughout I had my opensource folks having my back, helping me out. I noticed within a few days it was me who was maintaining a project and reviewing. 

It was a journey of growth, meeting amazing people, and learning new things. The very essence of open-source is sharing and growing. That is why I am going to work even harder and enjoy along the way!:cherry_blossom: I feel really grateful to everyone.

Recently I also got my Hactoberfest badge that's why I decided to write this post. :smiley:

*Comments and thoughts are welcomed! Do let me know about your Journey!* :star2:

#Happy-Coding!
Top 6 no-code and low-code tools for MVP building
Tags: webdev, technology, frontend, development
Published: 2020-12-04 12:33:55

Need to build an MVP or a prototype to test your idea in the short-term & at minimal costs?
Here are the top 6 #nocode and #lowcode tools UI/UX designers choose to build good-looking MVPs and app prototypes in less time.
Bubble, Fluid UI, UI Bakery, Glide, etc.

Check the full list with their pros and cons -> https://webdesignledger.com/top-6-web-app-builders-designers-choose-to-create-an-mvp-or-an-app-prototype-in-2020/?utm_campaign=ui_bakery%20-%20webdesignledger%20-%20article%20-%20cacq%20-%20top-6-web-app-builders-designers%20-%20traffic&utm_source=devto&utm_content=article_announce
Motivate myself everyday
Published: 2020-12-04 15:34:20

---
title: Motivate myself everyday
published: true
date: 2020-12-04 12:29:44 UTC
tags: 
canonical_url: https://phongduong.dev/blog/motivate-myself-everyday/
---
Every day I get up, I find it hard to keep up the momentum. Things don't happen as I expected. When I publish a piece of content, I expect many people would consume it. But it doesn't. Although it's fun to create content and express my creativity, I'm sometimes frustrated because it doesn't get any engagement.

I have to motivate myself to keep going. I have watched an anime series recently. It's Run with the Wind. The series is about a group of 10 college students who are trying to take part in a marathon contest. They don't have any experience in running and have to run 5km in 16 minutes to meet the qualification. After all, they meet the qualification and take part in the contest. They get in the top 10.

There are many inspiring quotes in the series. I rewatch it 3 times and will watch one more time. These quotes help to motivate me. I find myself in the series. I am doing what I like and happy with it. But I can't be happy all the time. My process is not always linear.

To motivate myself, I choose to consume other creator's content. I read blogs and books, watch videos and anime. While consuming content, I can have new ideas for my content. It also inspires me to keep going because if they can, me too.
Got my first hacktoberfest badge !!!
Tags: hacktoberfest, opensource
Published: 2020-12-04 12:23:05

---
title: Got my first hacktoberfest badge !!!
published: true
description: 
tags: hacktoberfest, opensource
//cover_image: https://dev-to-uploads.s3.amazonaws.com/i/rtpqkqwua3uvkyd1kajr.jpg
---
Hi everyone, 
I'm very excited to tell that I just got my hacktoberfest 2020 badge and this is my first badge on dev.to. I look forward to engage more in dev.to and collect more badges.
[2020 ver.] Steps to build a modern front-end environment
Tags: eslint, prettier, sass, react
Published: 2020-12-04 11:54:21

# TL;DR
As I work in a department that develops new services and products, I frequently have to set up new environments in my work. For that reason, I would like to summarize the steps I always take.

# This is one for those who use Gatsby
You can perform steps 1-3 of the following steps with a single command.
One of the React frameworks [Gatsby] (https://www.gatsbyjs.com/) (the official React page uses this framework as well) has a package called "starter" that allows you to build an environment with just one command. You can use the package to build an environment with a single command.

I have created a starter to build an environment in steps 1-3
[gatsby-starter-typescript-sass](https://www.gatsbyjs.com/starters/pkino/gatsby-starter-typescript-sass)


# Procedure
We recommend using libraries such as React and Vue or Sass, but even if you don't, the following steps may be applicable.

1. create a Git repository
2. introduction of TypeScript
3. introduction of ESLint Prettier
4. perform various settings of VSCode and save the configuration file
5. CI/CD Settings

## The reasons for each step
### 2. Introduction to TypeScript
Types can prevent useless errors and make completion useful.

### 3. Introduction to ESLint and Prettier
It automates the rules and formatting of the code creation. We use it because we want to reduce the number of things that don't need to be done by humans. (You can set it for VSCode.) However, to ensure that the Linter runs, you can use husky to precommit the Linter to run it.


### 4. Configure VSCode settings and save the configuration file
As mentioned earlier, you can set up Linter and others to run on `onSave` and so on. As mentioned earlier, you can configure the settings to run onSave`, etc. If you save the settings to a workspace, you can share them with other developers.

### 5. CI/CD Settings
By implementing a build/deploy mechanism that allows you to build/deploy at the same time you commit to GitHub, you can save yourself the trouble of doing that every time you develop.


## Notes
- If you need to build without using libraries, etc., you need to take advantage of tools such as percel.