teleren/devto huggingface dataset:
Detailed explanation of GPRS module wireless communication technology
Tags: gprs
Published: 2022-11-07 05:07:50


The GPRS wireless module is the abbreviation of General Packet Radio Service. It breaks through the way of thinking that the GSM network can only provide circuit switching. It is realized by adding corresponding functional entities and partially transforming the existing information base station system. Packet switching, the investment in this transformation is relatively small, but the user feedback data rate is very impressive. GPRS module (General Packet Radio Service) is a wireless communication module developed with data transmission technology based on Global System for Mobile Phones (GSM), which can be said to be the continuation of GSM. The GPRS wireless module is not different from the previous continuous transmission on the channel. The GPRS wireless module transmits in a packet (Packet) format, so the cost borne by the user is calculated by the unit of transmission data, not by its use. The whole channel, theoretically it's cheaper.

The transmission rate of the GPRS module can generally be increased to 56bps or even 114Kbps. Since it is no longer necessary to add a communication intermediary converter to the current wireless application of the Internet of Things, the connection and transmission will be more convenient and easier. Therefore, users can choose to surf the Internet online, participate in video conferences and other interactive communication, and users on the same video network (VRN), even without dial-up Internet access, and continue to maintain a connection to the network.

[GPRS Module](https://www.cdebyte.com/Module-4GNBGPRSGPSCAN)
GPRS wireless communication technology embodiment - wireless packet switching technology:
[Remote IO module](https://www.cdebyte.com/Modem-RemoteIOmodule)

The general wireless packet service of the GPRS module is a wireless packet switching technology based on the GSM system. Packet switching technology, also known as (data) packet switching technology, divides the data transmitted by users into a certain length. The part of a separate area is called a packet, a technique for transmitting information by transmitting packets. It is a kind of exchange technology that realizes the communication between computers and computers through computers and terminals. The quality of transmission routes is not high and the network technology means is relatively simple. There is a packet header (packet header) in front of each packet to indicate which destination address the packet is sent to, and then the switch forwards each packet to the destination according to the address mark of each packet. This process is called packet switching.
UEle - Tiny UI Reactive library
Tags: webdev, react, signals, javascript
Published: 2022-11-07 04:55:49

A tiny reactive frontend library.

UEle - https://github.com/kethan/uele

It has the following features for less than 1K GZip.

- Small.
- Fast and Simple API
- JSX
- Fragment
- Components
- SVG
- Refs
- Style Maps
- Lazy Components
- Promise support out of box
- AscynIterable
- Rxjs Subscribe
- Control Flow Components - **If, For, Show**
- Extend with any reactive library - **effect, memo, is, get**

Simple Counter example to play with - https://stackblitz.com/edit/vitejs-vite-rs9chm?file=main.jsx&terminal=dev

```js
import * as React from 'uele';
import { api } from 'uele';
import { o, effect, memo } from 'ulive';

// ulive settings
api.effect = effect;
api.memo = memo;
api.is = (v) => v.$o;
api.get = (v) => v();

const count = o(0);
const inc = () => count(count() + 1);
const dec = () => count(count() - 1);

const Counter = () => {
  let square = memo(() => count() * count());
  let cube = memo(() => square() * count());
  effect(() => console.log(count(), square(), cube()));
  return (
    <div>
      <div>
        Count: {count} {square} {cube}
      </div>
      <button onclick={inc}>+</button>
      <button onclick={dec}>-</button>
    </div>
  );
};

document.body.appendChild(<Counter />);
```
[TIL] A better response to post request (Spring Boot)
Tags: java, todayilearned, webdev, api
Published: 2022-11-07 04:55:23

When writing an api that saves the data it would be nice if there was a way to see the the data stored. So usually the id is returned in the response of the api. 
 Spring Boot provides a better way to handle this, By providing the created method in response entity which accepts a url as an argument and returns 201 as he response status.

```
ResponseEntity.created(
  URI.create("http://domainname/getEndpoint/"+entity.getId())
).build();
```

This would apply a response header called **Location** with the above mentioned url.


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

However, we want to make the domain name dynamic as the api can be deployed in multiple environments.
A quick google search led me to this Stack Overflow Answer{% embed https://stackoverflow.com/questions/1490821/whats-the-best-way-to-get-the-current-url-in-spring-mvc %}

Here is the code snippet for that 

```
URI uri = ServletUriComponentsBuilder
             .fromCurrentContextPath()
	     .path("/get/{id}")
             .build(String.valueOf(entity.getId()));

return ResponseEntity.created(uri).build();
```

and the final response


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


**Conclusion (da ta daaa)** So after almost a year I posted here again. Any form of constructive critisism is always welcome with open arms. So.. see you around I guess ${insert akward goodbye}.
Which Best Web Development Stack is in Demand?
Published: 2022-11-07 04:37:50

## [Best stack for web development](https://www.cronj.com/blog/top-web-development-stack/) (Front-End)

**React**

React JS is a top [web development stack](https://www.cronj.com/blog/top-web-development-stack/) form of the frontend development framework. Or more specifically, a library that has achieved widespread appeal among developers.

React deploys website pages differently, making them unique and responsive to client interaction. However, it is more generally known as React. In 2011, Facebook created React JS for web development while improving its platform.

It grew in popular web development stacks as a result of its innovative approach to creating user interfaces, spawning a long-running dispute between Angular vs. React vs. Vue and other important web development tools.

**Advantages of this best web development stack:**

- Simple to use and learn
- Libraries for JS
- Reusable components
- Improved performance

**Disadvantages of this best web development stack:**

- Inadequate documentation
- Some SEO issues
- As a barrier, JSX is used, as well as
- The rapid rate of development

## Best stack for web development (Back-End)

**ASP.NET**

ASP.NET is a popular web development stack and the top web development stack cross-platform, open-source framework for online application backend development. With the aid of ASP.NET development services, you may create mobile, desktop, online, gaming, and IoT apps using a variety of libraries, editors, and languages.

ASP.NET supports the Common Language Interface (CLI). However, it also adheres to the best web development stack practices when developing an application using the way you chose. You may join the hundreds of developers who are already contributing to the.NET platform because of its tremendous popularity and open-source nature.

**Advantages of this best web development stack:**

- Allows for concern separation
- Provides out-of-the-box functionality
- Extensibility and customizability
- Cuts down on coding time

**Disadvantages of this best web development stack:**

- No sufficient documentation, as well as
- Expensive migrating

## Databases
**AWS**

Amazon Web Services (AWS) is a large, developing top web development stack cloud computing platform that provides Infrastructure as a Service (IaaS), Packaged Software as a Service (SaaS), as well as Platform as a Service (PaaS). Furthermore, AWS services provide organization tools like computing power, content distribution, and database storage.

Moreover, AWS, which was created by Amazon in 2006, quickly became a prominent cloud platform in the IT sector. Because AWS development services provide companies with scalable and cost-effective cloud computing solutions.

**Advantages of this [best web development stack](https://www.cronj.com/blog/top-web-development-stack/):**

- Simple to use
- Strict security
- Balanced elastic load, as well as
- Provides speed and agility

**Disadvantages of this best web development stack:**

- Security constraints
- Charges for additional technical help
- Amazon EC2’s limitations, as well as
What is stack and how to choose the Right Tech Stack?
Tags: stack, fullstack, mernstack, mean
Published: 2022-11-07 04:28:55

The phrase “stack” refers to a collection of programming languages, software tools, and technologies. A stack is often divided into two types:

Application stacks: These stacks cover basic functions like email, databases, and word processing.
**Technology stacks: **These stacks refer to a list of the technical services required to operate an application.

## What are Tech Stacks?
A tech stack outlines the programming languages, frameworks, and tools required for a developer to interact with the application. 

Developers use tech stacks like [MEAN stack vs MERN stack vs Full stack](https://www.cronj.com/blog/full-stack-vs-mean-stack-vs-mern-stack/) to express a lot of information about the application development process.

Furthermore, the tech stack indicates the entire application’s strengths and shortcomings. Because most coding languages have well-known performance qualities and limits.

For example, a programmer understands that a PHP-based project will have a big and tough debugging coding process. The term may also apply to marketing services (Martech Stack) or sales services (Sales Stack). However, it originally comes from the software development community.
A technological Full stack vs MEAN stack vs MERN stack is a multidisciplinary approach to software development. The most well-known examples of a technological stack are MERN Stack vs MEAN Stack.

So, let us take a closer look at MEAN Stack vs [MERN Stack vs Full stack](https://www.cronj.com/blog/full-stack-vs-mean-stack-vs-mern-stack/).

## How to choose the Right Tech Stack?

Consider the following questions when selecting your MEAN stack vs MERN stack vs Full stack:

What are the specifications of your project?
Do you want agility?
Do you wish to go above and beyond project requirements to reach a larger audience?
Is your team/business knowledgeable and experienced in this field?
Can you call your development team scalable and adaptable?
What does the total development cost?
[ Introduction to Ruby ] The Programming Language Designed for Humanity by Japanese Snr.
Tags: ruby, tutorial, fundamental, beginners
Published: 2022-11-07 03:41:09

> So, someone on Earth has told you to learn coding?

There are a numerous doorways to get started with the code. But, you know, there's always some special choices which are preferred by lucky people. And one of those is Ruby - the programming language is designed for humanity by Japanese souls.

For anyone who is starting to learn the code, the most important aspect of the starter tools is always about friendliness. And by the word "friendliness", what really I means is "human readability". The closer the language is to our nature tongue, the easier it is for us to engage in learning to express the logical thinking in the code.

## Hello, Ruby!

And the first program that people ever wrote in any programming language is "Hello, World!". Just a seamless transient from our nature speaking language to a computer's one: "Hello, Ruby!"

`~/Desktop/main.rb`
```
main = Proc.new {
   puts "Hello, Ruby!"
}

main.call
```

Does that make a sense? Just like the progress to do any task in our daily life, here we've given the computer a `Proc(edure)` - a series of the steps needed to do to cause a result that we wished.

It may end up with a change happened on the level of a Graphical User Interface application at some point on our learning progress. But, for the start time, it happens with a mere sign of a subtle message which is `put` on our Command Line Interface window.

## Installing Ruby

Feeling eager to run your very first program written in Ruby? Here's the link where you can download the installer for Ruby Runtime Tools: [Downloads Ruby Installer for Windows](https://rubyinstaller.org/).

If you're a Linux user then you can search and install it from the default repository. Just a single command in the Terminal, I guess. Some thing like `sudo apt install ruby` should work for a Ubuntu user, or `sudo dnf install ruby` for a Fedora fellow.

Got it installed? Then we can just run our very first program:

`CMD|Terminal.io`
```
cd Desktop
ruby main.rb 
```

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

## Hello, fellows coders!

Noticed the point we `call` our very first `procedure`? That's the place where we can make our very first program a little more flexible. What if we can just bind a name or a kind of friendly word at that place and then the result just happens according to the object of the greeting phrase?

`main.rb`
```
main = Proc.new { |name|
   puts "Hello, " + name + "!"
}

main.call "fellow coders"
```

`CMD|Terminal.io`
```
clear
ruby main.rb

Hello, fellow coders!
```

Is that just a simple shiny tweak? We've added an input `|name|` and use it in the greeting phrase to inject the to-be-bound value at the place when we call the `procedure`. And by the time you've got familiar with some only Command Line basics that we ever need. It's good to move on and just learn more stuff only of the language Ruby itself.

See you in the next chapter: [[ Boxes of Ruby ]](https://dev.to/thinhtran130290/boxes-of-ruby-43lo)
Load JSON into env in NodeJS
Published: 2022-11-07 03:12:22

Almost all of us have heard of [dotenv](https://www.npmjs.com/package/dotenv), which loads key-value pairs from `.env` into `process.env` so it is globally accessible. 

But what if we don't want to install another package to perform a similar task? We can keep it as a one-liner to load a JSON file into `process.env`.

NodeJS has a built-in function called `Object.assign` which merges one object to another object. In our case, object 1 would process.env & object 2 would be our parsed JSON. We would then want to set `process.env` to our updated object.

EDIT: `Object.assign` automatically adds the values to the first object and doesn't create a new object (like `Object.create`) so we don't need the `process.env =` before the rest of the assignment.

Let's do exactly that:{% embed https://gist.github.com/humanfriend22/e4f88ad6539050c68b69eaf71c258819.js %}
Is Stack Overflow a forum filled with snobs?
Tags: discuss
Published: 2022-11-07 02:28:00

I participate on occassion @ the (in?)famous [Stack Overflow](https://stackoverflow.com), mostly out of boredom.  I rarely ever ask any question there, so most of the time I browse and if I know an answer, I post.  That's about it.

But what I have seen in said website during the course of several weeks now, is the behavior of the experts running the forum.  It's like:

> This is a forum, that, only if you are worth it, you may ask a question.  First, you must pass a series of tests.  Everthing you write must be in perfect English. 2 ortographic mistakes and you're out.  Then you must demonstrate that you have read at least 2 1000-page books on the topic.  Your question must come with 3 citations.  Finally, a single wrong tag and you're done.  Toast. But after that we'll try to help ya and joke about it.

Or am I wrong?  What do you think?  Have you asked questions over there?  What's the general feeling about the website in your minds?  I'm curious.
Do you provide feedback?
Tags: discuss, feedback
Published: 2022-11-07 02:20:27

When I get shipment notifications from Amazon, I am prompted to provide feedback on my delivery with two simple choices - a thumb up or down. Selecting either will pull up a web page with more options. On a recent occasion, I decided to time how long it took to complete the process.

It took a total of 8 seconds to provide feedback.

I timed the process because I realized I often provide feedback in this context, but skip the process with others. I feel like I subliminally know I can provide instant feedback with Amazon, but must question my investment of time with others who prompt.

This raises questions I would love to hear from others on:

* Do you provide feedback when prompted?
* Do you provide feedback only when there is an issue?
* Have you seen quality feedback systems that you wish other companies would implement?
* Have you implemented a feedback system and have any stories to tell on engagement?

I realize I am asking for feedback on feedback - so I hope this will be a fun discussion!
Alternatives to Terraform Cloud
Tags: terraform, iac, automation, github
Published: 2022-11-07 02:00:44



---
title: Alternatives to Terraform Cloud
published: true
description: Automating infrastructure as code with terraform
tags: terraform, IAC, automation, github
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64rnsqzb3ev6vpu6j8mc.png
## Use a ratio of 100:42 for best results.
## published_at: 2022-11-07 01:17 +0000
---

Like most folks who probably arrived at this blog, I attempted to introduce Terraform cloud to my organization but was ushered away due to cost.

I needed a better solution to managing our terraform state in a large team that did not require cumbersome locking processes.. *cough* *cough* DynamoDB

[Atlantis](https://github.com/runatlantis/atlantis) turns out to the the tool i had been looking for.

It is a no-frills application that listens for Terraform pull request events via webhooks. In my case, I used GitHub webhooks to automate and enforce my organization's terraform workflows in an auditable manner.

**Quick Rundown**

It enables a CI/CD pipeline for infrastructure (GitOps), which causes the PR to become the system of record.

![architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/izxxxdmnswtklv9ayd4h.png)

*Benefits*
- Increased visibility and auditing of Infrastructure changes
- Manages terraform state locking until the pull request is merged
- Approval-based infrastructure builds
- Centralizes permissions to service accounts vs. users
- Enables collaboration with all engineering teams

*Cons*
- webhook interactions happen one way via pushes. This requires a public endpoint to interface with Github (if your VCS is self-hosted, this may not be an issue)
- Drift detection alerts for rarely used repositories need to be manually configured.

*PR Workflow*

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

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


**Conclusion**
If you are on a budget and looking for remote state management, then this is the best OSS alternative to terraform cloud that I have found.
What pattern is considered CQRS?
Tags: tutorial, eventdriven, architecture
Published: 2022-11-07 01:57:05

This week, in our study group, there is an interesting question.

> If our service use MongoDB as the primary database and leverage ElasticSearch to benefit searching. Each request is in, our service is responsible for a dual write to update both MongoDB and ElasticSearch. Is this implementation considered CQRS?

In fact, this implementation is indeed generating a read model for searching and a write model for domain operations. If there is any search request, we can build a search layer or a search service for that.

This looks like CQRS, doesn't it?

In my opinion, such an implementation is not CQRS.

There are two core concepts about CQRS.
1. event sourcing
2. responsibility segregation

Let's see their actual meaning.

## Event sourcing

Event sourcing is the most important concept for CQRS. When we have a new feature requirement, we can leverage the existed events and replay to generate a new read model so that we don't need to modify the original code base.

In other words, we can easily fulfill any query requirement without impact the production functionality.

Let's go back to the original example.

If our service keeps every input event in MongoDB so that new read models can be generated in the future, then I would say it's "very much like" CQRS.

## Responsibility segregation

The another key point is the responsibility segregation, i.e., the last two letters of CQRS.

What does that mean?

From my point of view, responsibility for building the read and write models must be separated.

If our service is responsible for both update MongoDB and update ElasticSearch, that doesn't sound separate at all.

In order to release the burden of updating many models, CQRS introduces an event synchronization mechanism for event consumers to generate read models and make them consistent eventually.

Let's continue with the original example.

If our service maintain the MongoDB's domain states and keep every domain operation as audit logs. Then, we can build a worker who regularly digest these logs and update ElasticSearch. So, this is a CQRS definitely.

## Conclusion

Why do we need to clarify these terminology details? Is it important to know if it is considered CQRS?

Well, it depends.

If we want to make the original system better, then we need to know exactly what a paradigm means. If we hastily assume that the original system is already a paradigm, then we miss the opportunity to look at it deeply.

The original implementation actually works well at the moment. However, if the input request increases, updating ElasticSearch will become a bottleneck while handling domain operations. At that time, we then have to make additional improvements.

Those paradigms are the indexes that provide how to improve. Because of this, we need to understand the specifics of the paradigms.