teleren/devto huggingface dataset:
Stop Reinventing the Wheel — Automate Your Application Centric Infrastructure
Tags: cloudservices, devops, infrastructureascode, lowcode
Published: 2022-06-20 20:33:57

---
title: Stop Reinventing the Wheel — Automate Your Application Centric Infrastructure
published: true
date: 2022-01-14 02:07:00 UTC
tags: CloudServices,DevOps,InfrastructureasCode,LowCode
canonical_url: https://duplocloud.com/blog/stop-reinventing-the-wheel-automate-your-application-centric-infrastructure/
---

For years businesses large and small have been writing Infrastructure-as-Code to deploy their applications to the cloud. While IaC is an admirable way to shave the time and effort required to deploy cloud applications, it is littered with a whole host of pitfalls.

Infrastructure-as-Code (IaC) is certainly a well-known methodology for cloud infrastructure provisioning. This includes the basic cloud services: OS, compute, and storage. Application infrastructure components include networking, load balancers, firewalls, authentication mechanisms, data stores, containers, application monitoring and logging capabilities, and application security services. It is important to note that no matter what tool is used, the first step to any cloud application is defining the overall architecture. Once there, IaC is useful as it models itself off application development principles; in other words, writing code to deploy the infrastructure. Of course, just like coding, one can create scripts and templates for the creation and configuration of items that are typically repeated.

![](https://miro.medium.com/max/1400/0*F5z9O2b1rapxpxZD)

IaC itself has spawned a new category of skill set, DevOps, forcing knowledgeable IT staff to learn coding techniques of the most skilled developers or perhaps more typical, throwing the application infrastructure creation directly into the hands of application developers. While app developers like writing code, they typically operate at a higher level, creating immersive user interfaces and coding complex business logic into cohesive SaaS-based applications that benefit a wide variety of users. Even so, they need fast access to infrastructure resources. This can be out of reach for many, especially at smaller companies where IT staff is scarce and security is an afterthought in the deployment process.

We believe the fundamental change in the approach to IT will not come from companies whose core audience have been operators. It will be from cloud vendors or developers who have experienced the pain first hand.

To that end, we have created a world where all the Infrastructure-as-Code, infrastructure provisioning, including security and compliance controls, as well as application deployment tasks are automated and done right the first time.

The post [Stop Reinventing the Wheel — Automate Your Application Centric Infrastructure](https://duplocloud.com/blog/stop-reinventing-the-wheel-automate-your-application-centric-infrastructure/) appeared first on [DuploCloud](https://duplocloud.com).
Yard Sale - event-driven e-commerce
Tags: atlashackathon, rails, ruby, eventdriven
Published: 2022-01-14 01:22:49

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission

**Yard Sale** was an idea of old to enable people to list things they have for sale and let them manage the list. I used the opportunity of the hackathon to play with a few technologies and patterns I did not know well enough, so the project is more technical than visually appealing.

These technologies were:

* Event sourcing - I had previous experience, but I wanted to do it with available libraries, not home-baked solution
* Specific read models generated from events and optimized for read (these are in MongoDB in this case, while event store is PostgreSQL)
* Rails 7 on Ruby 3.1 with [Hotwire](https://hotwired.dev/)
* TailwindCSS for server-side rendered content (spoiler: oit's rather not worth it)
* [SDLand](https://sdlang.org) for seeds (see my post about [seeds-driven development](https://katafrakt.me/2020/09/14/seeds-driven-development/))

Demo: https://yard-sale-dev.herokuapp.com/


### Submission Category: 

E-Commerce Creation


### Link to Code

{% github https://github.com/katafrakt/yard_sale/ %}


### Additional Resources / Info

Open source used:

* Ruby on Rails 7 with Hotwire on Ruby 3.1
* RailsEventStore with PostgreSQL as event store
* Mongo driver (as Mongoid is not ready for Rails 7, but it's a good thing, because it forced me to [use repositories](https://github.com/katafrakt/yard_sale/tree/main/app/repositories))
* TailwindCSS with style inspired by:
 * [Nordic Store](https://www.tailwindtoolbox.com/templates/nordic-store)
 * [Notus](https://www.creative-tim.com/product/notus-js)
* [dry-rb](https://dry-rb.org/)

### Screenshots

Home page:

![Home page of YardSale](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l1rbuq5clteb4v1l7cai.png)

Sale view:

![Sale view with offers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0b624k5ia4m1ztd3mum0.png)

Offer view:

![Single offer view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wqwfx44hob2u34s9x7e0.png)

RailsEventStore dashboard (available in dev env only):

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/718anzmnx4q3jur9c71q.png)
The eCommerce App
Tags: atlashackathon
Published: 2022-01-14 00:38:44

### Overview of My Submission
An e-commerce app for rental holiday home with full-text search capability. Visit the app [here](https://devhackathon2022-bqftl.mongodbstitch.com/).
Built with MongoDB Atlas & MongoDB Realm


### Submission Category: 

E-Commerce Creation


### Link to Code

{% github https://github.com/kit-t/mongodb-devhackathon2022/ %}


### Additional Resources / Info
- Built with the [MongoDB Realm GraphQL Template](https://github.com/mongodb-university/realm-graphql-apollo-react)

- Screenshot
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1zc5odxcpktqowdab78f.png)
SPECIESS: CSS artworks of endangered species 🌎⚠️🐼
Tags: atlashackathon, mongodb, nextjs
Published: 2022-01-14 00:30:48

---
title: SPECIESS: CSS artworks of endangered species 🌎⚠️🐼
published: true
description: My submission to the MongoDB Atlas Hackathon on DEV!
tags: atlashackathon, mongodb, nextjs
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k65o4o23q43ectkwrbpq.png
---

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)

### Overview of My Submission

Unfortunately today there are many species in danger of extinction or disappearing.

SPECIESS is a space that aims to help a little to raise awareness about this problem as a website to create, explore and share artworks with CSS on endangered species taken from the IUCN Red List

You can check it at: [speciess.vercel.app](https://speciess.vercel.app/)

### Submission Category:

Choose Your Own Adventure

### Link to Code

{% github https://github.com/leviarista/speciess %}

### Additional Resources / Info

* This project is built using [Next.js](https://nextjs.org/) and deployed with [Vercel](https://vercel.com).
* I am using the powerful [MongoDB Atlas](https://www.mongodb.com/atlas/database).
* This DB is storing information about 142 000 species from the [IUCN Red List](https://www.iucnredlist.org/).
* It's my first time using MongoDB and I found it quite easy to get started with, even with a lot of documentation, but understandable.
* I am using the [MongoDB Data API](https://docs.atlas.mongodb.com/api/data-api/) to store some info.
* It was very interesting and comfortable to use [MongoDB Charts](https://docs.mongodb.com/charts/) in this project too.

Here are some screenshots of the project:

![Home](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fli3nfiyaipuf6p2ufm.jpg)

![Create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lq3wnhip3kajimzrw7r2.jpg)

![Create Instructions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbj93233c8szx8y1xkgw.jpg)

![Explore](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b6zroeofcvnji78kmzrv.jpg)

![Artwork Detail](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohpkjzfl8mxm3gstnhj9.jpg)

![Charts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zx3r75ck54pvrnfh9cqx.jpg)

PS: I really liked how powerful MongoDB Atlas is, my only observation would be that it would be great to add more examples with more use cases for Node.js 😉
#15 - Digits explosion CodeWars Kata (7 kyu)
Tags: javascript, webdev, tutorial, 100daysofcode
Published: 2022-01-14 00:30:09

##Instructions

Given a string made of digits [0-9], return a string where each digit is repeated a number of times equals to its value.

**Examples**
> explode("312"); // => "333122"
> explode("102269"); // => "12222666666999999999"

---

##My solution:

```javascript
function explode(s) {
  return s.split('').map(d=>{
    let y = '';
    for(let i = 0; i < +d; i++){
     y += d
    }
    return y
  }).join('')
}
```

---

##Explanation
First I splitted the first string into an array and mapped it, then I made a variable "y" that contained an empty string.

> function explode(s) {
>   return s.split('').map(d=>{
>     let y = '';

---

Then I added a for loop that would continue iterating until the i varible is higher than the digit that is being mapped.
Inside of this loop I just added the digit string to the "y" variable, and at the end of this loop I just returned y

> Input Digit: '4'
> Output String: '4444'

---

at the end I would end up with an array of strings like this ones:
> Input String: '4213'
> Output String: ['4444', '22', '1', '333']

---

So at the end I just joined the result array so I get something like this.

> Input string: ['4444', '22', '1', '333']
> Output String: '4444221333'

---

**Comment how would you solve this kata and why? 👇🤔**

[My Github](https://github.com/Cesardlr)
[My twitter](https://twitter.com/cesar__dlr)
[Solve this Kata](https://www.codewars.com/kata/585b1fafe08bae9988000314)
Product Catalog Web App with Flask, Vue and Mongo
Tags: atlashackathon, flask, vue, mongodb
Published: 2022-01-14 00:23:36


### Overview of My Submission
Product Catalog web app is a simple catalog where user named Supplier will create products and Customer will browse these products on the platform.

The product has few information such as product name, category of the product, supplier of the product, to mention only 3.

Customer can search based on product name, category name or first name of the supplier (this is done by Flask with Atlas Search). After receiving search results, they can also filter those search results (This is done by Vue in the browser).

ROLES SUMMARY: Supplier -> (creates product); Customer -> (search among products, rate the product)

I built the app using Flask, Vue and MongoDB. Vue is responsible for displaying data stored in MongoDB to users and Flask is serving as an interface between MongoDB and Vue. Products' images are stored in Cloudinary using its public API.

### Submission Category:
- E-Commerce Creation
[Note]: # (E-Commerce Creation, Prime Time, Action Star, Automation Innovation, or Choose Your Own Adventure)


### Link to Code
- Flask API link: https://github.com/ValentineSean/product-catalog-api

- Vue App link: https://github.com/ValentineSean/product-catalog-app

### Additional Resources / Info
- App demo Youtube link: https://youtu.be/DPZ_p9JU5SU
- App link:  https://product-catalog-vsc.netlify.app/
- suppliers credentials: ["go@productcatalog.net", "john@productcatalog.net"]
- customers credentials: ["foo@productcatalog.net", "java@productcatalog.net"]
- all passwords are "123456"

### Database structure and indexes images:

![Product collection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jn7gzsdgksc8xwe2gko4.png)


![Category collection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/baqv9x5k7fdgsd61zszo.png)


![User collection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82j3dh7ndqcr8t4aagwn.png)


![Supplier search index](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nhm4f8bm4ojh6se3bw9i.png)


![Category search index](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/600cqrkemrfqlikeqk7z.png)


![Product search index](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2opl85y75oghiome5ppy.png)
First post
Tags: webdev, programming, javascript, react
Published: 2022-01-14 00:20:36

Just started this account because this site seems a great place learn what other developers are up to.

I plan on posting updates on my current projects, and whatever new knowledge I may be digesting at the current moment. Here's a screenshot of the project I'm working on today; it's a simple mixer that loads several soothing _sleep_ sounds with audio elements and allows the user to manipulate the volume of each/all with range inputs, I'm writing it in part to improve my Javascript and also to learn React.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pki34azccl6cvspxf0o.png)

See you soon.
Day 509 : Early
Tags: hiphop, code, coding, lifelongdev
Published: 2022-01-14 00:09:19

_liner notes_:
- Professional : Got up SUPER EARLY to do a presentation for a group in Japan. Doing it online is just as good as doing it in person right? Right?! haha Had a good time. I think it went well. Since I was up, I attended a meeting that was normally way too early for me. After that, I took a nap and then got up to do back to back meetings. I was pretty much done after that. haha.

- Personal : Since I wanted to get up early to make sure I made it to the presentation, I went to bed early.

![A dirt path in Papudo, Chile with some trees with stripped barks on either side of the path.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/210nbdp61ybuvqqoezn2.jpg)

Tonight, I'll probably go through a bunch of tracks for the radio show and then maybe some coding on my side project. Still pretty tired from the day.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube pJJyKlRxyvA %}
Web Services 101: Why x00 status codes are so generic
Tags: programming, web
Published: 2022-01-14 00:05:10

---
title: Web Services 101: Why x00 status codes are so generic
published: true
description: 200, 300, 400, 500...so generic
tags: programming,web
series: Web Services 101
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1nunvxjoahkp6yux3i0j.jpg
---

> Photo by picjumbo.com from Pexels

## Quick intro to HTTP status codes

HTTP status codes are sent in every HTTP response to indicate the result of servicing the request.

They are arranged into categories by 100's, as follows:

| Code range | Meaning |
| :-- | :-- |
| 200-299 | Success |
| 300-399 | Redirection |
| 400-499 | Client error |
| 500-599 | Server error |

A useful reference to bookmark is [https://httpstatuses.com](https://httpstatuses.com/).

## x00 status codes

Now let's look closer at the definition of each x00 status code.

| Code | Meaning |
| :-- | :-- |
| [200](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1) | OK |
| [300](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1) | Multiple Choices |
| [400](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1) | Bad Request |
| [500](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) | Internal Server Error |

Why do you think these are so generic like "Bad Request," "OK," or the even more vague "Multiple Choices?"

## Explanation 

The vagueness is on purpose. These codes are supposed to cover all possibilities. The HTTP specification describes them as the "stand in" codes for those situations where a _custom HTTP status code_ has been defined by the service, and the client needs to interpret the response anyway.

> HTTP status codes are extensible. HTTP applications are not required to understand the meaning of all registered status codes, though such understanding is obviously desirable. However, applications MUST understand the class of any status code, as indicated by the first digit, and treat any unrecognized response as being equivalent to the x00 status code of that class...

> [RFC2616](https://www.rfc-editor.org/rfc/rfc2616#section-6.1.1)

## Conclusion

So we can conclude two things. 

First: we can create our own custom HTTP status codes. Maybe we want to pick the unused status code `442` and define it as   "&lt;SomeProperty&gt; is required." That's totally fine. 

Second: we can also conclude that our clients will interpret our custom HTTP status codes as their x00 counterpart. For the given example of `442`, clients will assume this is equivalent to `400` "Bad Request."
Event emails reminder using Mongo DB Atlas
Tags: atlashackathon, mongodb, node, javascript
Published: 2022-01-14 00:03:54

### Overview of My Submission
The main aim of this project is to fire an email to the user with an appropriate description when the time of the particular event (set by the user prior) is up.

### Working
1.The events are stored in **documents**. Each **event** has `keys`: **description**, **time**, **processed**, **emailId**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ru9vi013vbqrfa4bdod.png)

Index is used to make query process fast
`db. remindersList.createIndex({ processed: 1, date: 1 })`

2.The time (in `time` field) controls when the event will be fired. The **scheduled trigger type** is deployed which checks what event has been passed in regular intervals.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lymxcklp0hoqkq4jyizk.png)

3.The event occurrence, **email** is fired to email id (in `emailId` field) with description (in `description` field). For sending email, I am using 3rd party dependency `SendGrid`.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dmxh1zpfoa4241ncfux2.png)


4.After the event is processed, the `processed` field is set true, so that event is not fired again.
 `context.services.get("mongodb-atlas").db("reminders").collection("remindersList").updateOne({_id:id},{$set:{processed:true}})`


### Submission Category: 
**Choose Your Own Adventure**

### Atlas services used:
1. `Atlas Database`
2. `Realm Triggers`
3. `Realm Functions`

### Link to Code
{% github https://github.com/shivamarora1/mongodb-realm %}


### Additional Resources / Info

- https://docs.mongodb.com/realm/tutorial/backend/#automatically-comment-on-github-issues

- https://docs.mongodb.com/realm/triggers/trigger-types/
- Send Grid Email API
MongoDB Submission Post Public Wishlist
Tags: atlashackathon
Published: 2022-01-14 00:01:25

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
I've built this small WebApp & API which allows people to make a public wish and post it in the Website. I've used Express.js and Mongo Atlas as my Database as it provides much faster and optimized Database Operations. More info will be found in my GitHub Repo.
[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)


### Submission Category: Mongo Atlas
### Link to Code: [Public Wishlist](https://github.com/OctoplusNinja/Public-Wishlist)
10 Great Questions To Ask To Become Familiar With a Huge Codebase
Tags: beginners, productivity, career
Published: 2022-01-19 19:41:53

---
title: 10 Great Questions To Ask To Become Familiar With a Huge Codebase
published: true
date: 2022-01-14 00:00:00 UTC
tags: beginners,productivity,career
canonical_url: https://mannes.tech/10-questions-codebase/
---

You've made it.

You got through the interview process, and now you’re part of a new team.

But as you get access to the repository, you’re overwhelmed. It’s huge. And full of stuff you know nothing about. So. Much. Unfamiliar. Code.

## Ask Questions

Your mentor, colleague, or lead dev has created a meeting to walk you through the code base. Here are some questions to get the most out of that time:

* Understand the **goals**
  * “What are the goals of this project?”
  * “What does this software do?”
* Learn about the **history**
  * “When did this project start?”
  * “Who started it and how big was the team at first?”
  * “How many people have worked on this over the last few years?”
* Get to know the **architecture**
  * “Which technologies do you use?” Go through dependencies, e.g. in package.json.
  * “Did you do any major refactorings recently, or are you currently doing a major refactor?”
  * “Which architectural concepts do you follow? What should I read up on?”
* Find out more about their **processes**
  * “What is your process regarding pull requests?”
  * “Can you walk me through your release process?”

Apart from that, someone should take you on a tour through the codebase.

## Your First Task

Your first task should be **small and easy to start with**, because:

* You’ll need to get everything running locally
* You’ll get familiar with the processes from assigning a task to merging a pull request
* You won’t need to get too much into the code base

That’s it. Now you’re ready for your first big task.

## 3 Tips For Your First 3 Weeks

Three tips for your first few weeks:

1. Do tasks and ask questions.
2. Pair program whenever possible.
3. Let the team know how the onboarding experience was. Point to outdated documentation or unclear parts of the codebase.