teleren/devto huggingface dataset:
Total POS - DataBase
Tags: flutter, opensource, spanish, totalpos
Published: 2022-04-10 22:59:10

> En un capitulo más de esta serie llamada:
> "Ingeniero aburrido un fin de semana"

## Usuario final vs Resiliencia 🤷‍♂️

Hay que utilizar alguna base de datos pero... embebida? o externa?

Si usamos una embebida podemos asegurarnos que cualquier usuario la puede utilizar con el simple hecho de instalar el punto de venta, pero si usamos una externa (PostgreSQL, por decir algo) damos la oportunidad de ser resilientes y extender la funcionalidad de manera sencilla.

Pff... ambas son buenas ideas, así que para no pelear conmigo mismo (porque soy mi propio project manager) decidí hacer ambas en ramas separadas, en fin, que puede malir sal?

## ORM en Flutter? 🤔

Al parecer a la comunidad de Flutter le encanta [Hive](https://github.com/hivedb/hive) y [ObjectBox](https://github.com/objectbox/objectbox-dart)... El problema es que no tenemos clientes externos que nos permitan ver los datos dentro de nuestras colecciones. Estaría dependiendo de correr el código cada vez que quiera tener un entorno donde ver los datos. Sin tomar en cuenta que tengo que ejecutar constructores de código que extiendan la funcionalidad de mis modelos antes de ejecutar.
(No entendía muy bien por que hasta que...)

## PostgreSQL

Decidí usar esta base de datos robusta y opensource, hay un [paquete](https://pub.dev/packages/postgres) que me permite trabajar con ella, pero hay que escribir los queries a mano, como últimamente eh estado aprendiendo Spring e Hibérnate me propuse a hacer un query builder al mas puro estilo de Java.

### Reflection - Dart

Pero Flutter no tiene soporte para reflection (Por eso hay que estar extendiendo la funcionalidad con builders).

![this is fine](https://media.giphy.com/media/NTur7XlVDUdqM/giphy.gif)

**Ni pepe... Toca rifarse un SQLQueryBuilder a pata, desde 0 y sin Reflects como dios manda.**

## Y al final? 🐛

Peleamos con el re-modelado de objectos, aprender ObjectBox, y hacer un SQLQueryBuilder este fin de semana (La verdad es que Copilot ayuda bastante). Ahí la llevamos. El sistema que usa postgres va mas adelantado (De hecho solo falta terminar de modelar el Ticket) y ObjectBox... pues ahí esta, no termino de convencerme pero le estaré dando soporte, por lo menos hasta sacar una release estable y que un par de usuarios me den feedback sobre la instalación.

Les dejo ambas ramas:

[ObjectBox](https://github.com/ushieru/total_pos/tree/object_box)

[PostgreSQL](https://github.com/ushieru/total_pos/tree/postgres)

## Pero... tú que piensas? 💭

Cuéntame en los comentarios. Y Happy Hacking 🧑‍💻🎉
How to create fake tweets ?
Tags: tutorial, fake, tooling
Published: 2022-04-10 22:06:46

You've probably seen fake Twitter discussions all over the internet. Images of such discussions quickly travel from one social media site to the next. The conversation threads are everywhere, from prime leaders debating World War II to fictitious characters conversing with one other as if they were actual people. All of them were created with the help of a fake tweet generator.

There are numerous md5 decrypt tools available online. Here's a step-by-step tutorial using [allinone.tools](https://allinone.tools/) website:

## How to create fake tweets using allinone.tools ?
1. Open your web browser, and go to [allinone.tools](https://allinone.tools/social-media/tweet-generator)

2. In the text inputs, enter the name, username, client, tweet content, likes, retweets, the tweet content.

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

3. Select a file from your computer / phone you want to put as an avatar, and add an image in the tweet (optional).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4igq7lvzxz5m7ourvkk9.PNG)
4. Preview your fake tweet at the top of the page.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ibpuzijhoi6sv1dg6k4p.PNG)
5. Click download tweet to create the fake tweet and save it as a PNG image.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b50exudlwjtdflfwa4mf.PNG)
## Contact
Email: contact@allinone.tools
Twitter: [@allinonetools](https://twitter.com/AllinoneTools)
An Old Noob #3 - Cloud Resume Challenge, that ol' 403
Tags: beginners, webdev, cloud, aws
Published: 2022-04-10 21:55:05

It's been a week.

My intention was to post weekly on the progress i've made completing the [Cloud Resume Challenge](https://cloudresumechallenge.dev/docs/the-challenge/).  This week is unfortunately more about obstacles than progress.

In retrospect, it hasn't been an entirely unproductive time.  I completed the javascript for my visitor counter which successfully increments my DynamoDB table, and was (previously) thinking i was prepared to say, "here world!  it's a good start!".  As i'm progressing though, i realize that there are plenty of guides out there for the steps to complete the challenge, but not necessarily as securely as i'd prefer.  I'm also discovering that the documentation is ...hit or miss.  And it's not for a lack of looking.


![Search results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfiweco3n1ctrtjmcdse.jpg)

While i had also originally said my intention was to stick to the specific challenge objectives, security is kinda my thing.  I don't want people to be able to access my content directly from an S3 URL, i want them to go through CloudFront.  I created an origin access identity on my bucket, an API gateway to forward the requests, and eventually built a Lamda@Edge after having read that was required to deliver the correct host value to the API...

Sadly, with public access disabled on my bucket, i continue to get the Missing Authentication Token error.  Even sadder, the number of things i've found and attempted to resolve this (20 at least? no exaggeration) have all been unsuccessful.

So this week finds an old noob a little discouraged.  


![1 Hour Later](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/50vh4r3axlmodr4s2qyf.png)

...and i'm still parsing settings and search results, trying to find that piece i'm missing.
What is a 308 Permanent Redirect?
Tags: webdev, beginners
Published: 2022-04-10 21:36:12

## What is a 308 Permanent Redirect HTTP response?

A **308 Permanent Redirect** is a server [HTTP response status code](https://www.searchcandy.uk/seo/seo-glossary/http-status-codes/) used for permanent redirection.

A 308 HTTP response is near identical to a [301](https://www.searchcandy.uk/seo/seo-glossary/http-301/), and has been confirmed to be treated as such by Google.

The only notable difference between a 301 and 308 HTTP response is that a 308 does not allow changing the request method from POST to GET.

## Example 308 Permanent Redirect Response

`HTTP/1.1 308 Permanent Redirect
Content-Type: text/html; charset=UTF-8
Location: https://www.example.com/
Content-Length: 356`

`<!DOCTYPE HTML>
<html>
   <head>
      <title>Permanent Redirect</title>
   </head>
   <body>
      <p>
         The document has been moved to <a href="https://www.example.com/">https://www.example.com</a>
      </p>
   </body>
</html>`

## RFC

[RFC7538](https://httpwg.org/specs/rfc7538.html), April 2015

## Is a 308 response good for SEO?

A 308 HTTP response has been confirmed by Google to be treated as identical to a 301 by its bots/algorithms.

However a 308 response is still a newer and more unusual status code, so it is unknown how all search engines/bots around the world will treat it.

## Non-Standard Usage of 308 Status Code

It should be noted that some sites may use a 308 status code in a non-standard way, such as in Google Drive - where a 308 Resume Incomplete status is used to indicate when an incomplete upload has stalled.
Factory Method
Tags: design, pattern, go, backend
Published: 2022-04-10 21:25:41

Hola, hoy venimos con un patrón de diseño creacional. 

El Factory Method, es un patrón que nace de la necesidad de abstraer la lógica de creación de un objeto. Es más fácil entenderlo con un ejemplo.

Pongamos en situación que estamos dándole mantenimiento a un sistema de logística, en donde el método de entrega siempre ha sido por tierra y todo bien, el sistema funciona de esta manera por varios años sin problemas. Llega el día, en que nuestra empresa decide diversificar las operación y se toma la decisión de ofrecer logística marítima. 

Vaya... parece que tenemos un problema, el sistema solamente esta enfocado a logística terrestre ¿Cómo haremos para resolver este problema? y sobre todo, ¿Cómo haremos para mejorar la escalabilidad del sistema? de manera que puedan haber tantos métodos de logística como se quiera sin mayores modificaciones. 

El Factory Method, nos puede ayudar en esta ocasión, es un patrón de diseño creacional listo para abstraer la lógica de la creación.

Ok, estamos listos para implementarlo. 

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

En este caso, necesitamos pensar en cómo llamaremos de manera general al grupo que envuelve el **camión** o el **bote**. Quizás **Transporte**.

![Truck](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1yt3pcd9mv9zu8q0flvt.png)
 

También necesitamos pensar en cómo llamaremos de manera general al grupo que envuelve la logística **Terrestre** y el **Marítima**. Quizás **Logística**.

Estamos listos. 

Por la parte del Transporte tendríamos el siguiente diagrama: 

![Diagrama transporte](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qqutdgz9img5rh4bvr1y.png)

Y por la parte de Logística tendríamos el siguiente:  

![Diagrama Logistica](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90yflh5a362x8e7n6v9d.png)
 
En mi GitHub podrán ver la implementación en Golang. [Enlace](https://github.com/juanmiguelar/CreationalPatternsGo/tree/main/FactoryMethod)
Muchas gracias por leer
Les dejo mis redes: [Enlace](https://linkr.bio/juanmiguelar)

Imágenes y ejemplo tomado de: [Enlace](https://refactoring.guru/design-patterns/factory-method)
Tech Jargon Defined: What is Bikeshedding?
Tags: webdev, beginners, discuss, codenewbie
Published: 2022-04-10 21:12:15

_This is part of a **Tech Jargon Defined** series focused on de-mystifying common tech jargon terms._

## Tech Jargon 

When you're new to tech, you might hear a lot of terms flying around that don't seem to have to do with software at all. What's 'bikeshedding', 'yak shaving', or 'dogfooding'? This series aims to help explain what some of this jargon really means. In this post, we'll look at 'bikeshedding'.  

## Bikeshedding

'bikeshedding' means focusing on the minor details in a discussion rather than the issue at hand. 

People arguing over what color to paint a bike shed when they haven't built a house are bikeshedding.

In web development, it might look something like an argument about how many categories to organize a blog under, when the CMS and overall architecture hasn't been chosen yet. 

This is an example of [verbing](https://www.grammarly.com/blog/the-basics-of-verbing-nouns/#:~:text=Verbing%2C%20or%20what%20grammarians%20refer,and%20to%2Dthe%2Dpoint.), or denominalization, which is a common phenomenon in tech jargon. As the name suggests, it's taking a noun and making it into a verb. Other examples of verbing not restricted to tech include 'texting' and 'cupping'. 

The word has its origins in Parkinson's 1957 [law of triviality](https://en.wikipedia.org/wiki/Law_of_triviality), in which he gives an example of a team given the task of designing a nuclear power plant. The team spends most of its time arguing over what color to paint the staff bike shed rather than arguing over serious matters.

The word then gained traction in the software development community and has been with us ever since.

Resource: https://css-tricks.com/what-is-bikeshedding/
Tech Jargon Defined: What is Dogfooding?
Tags: discuss, beginners, programming
Published: 2022-04-10 21:11:01

_This is part of a **Tech Jargon Defined** series focused on de-mystifying common tech jargon terms._

There's a lot of tech-specific phrases out there, and 'dogfooding' is a classic example of a piece of tech jargon. Hearing it always makes me a little queasy because it reminds me of Proverbs 26:11 "As a dog returns to his vomit, so a fool returns to his folly." 

Luckily, in reality, the meaning of the term is nowhere near as gross-- and in practice, it's a wise thing to do. 'Dogfooding' means that a developer adopts the software they create themselves. It's a casual way to test the user experience of a product. 

Keep in mind, there's no substitute for external feedback from a user out in the wild. When you're dogfooding, you'll certainly have blind spots. You'll know the next step in the user path because you designed it! At the same time, it can help you spot glaring errors.

So go ahead, try dogfooding your software. At the very least, it's not foolish. 

Resource: https://www.makeuseof.com/what-is-dogfooding/
Tech Jargon Defined: What is Yak Shaving?
Tags: codenewbie, programming, discuss, productivity
Published: 2022-04-10 21:10:08

_This is part of a **Tech Jargon Defined** series focused on de-mystifying common tech jargon terms._

'yak shaving', a unique piece of tech jargon, had its origin in [an MIT lab](http://www.catb.org/~esr/jargon/html/Y/yak-shaving.html), and means executing sub-tasks that seem unrelated to the task at hand but are ultimately necessary to accomplish it. Basically, it's when writing software tickets takes on a ['If You Give a Mouse A Cookie'](https://en.wikipedia.org/wiki/If_You_Give_a_Mouse_a_Cookie) vibe, but less recursive, and based on needs, not desires. 

For example, say you had to write a new component for a React project, but the css styles were broken because a dependency was out of date, and to update the dependency you had to update your node version first, and to do that you had to install nvm -- congrats, you're yak shaving. Best comment out the CSS for now and bang out the state logic first. ;)

Resource: https://seths.blog/2005/03/dont_shave_that/
Tech Jargon Defined: What is Rubber Ducking?
Tags: discuss, programming, codenewbie
Published: 2022-04-10 21:08:58

_This is part of a **Tech Jargon Defined** series focused on de-mystifying common tech jargon terms._

'Rubber ducking' is one of the more endearing [denominalizations](https://www.grammarly.com/blog/the-basics-of-verbing-nouns/#:~:text=Verbing%2C%20or%20what%20grammarians%20refer,and%20to%2Dthe%2Dpoint.) in the tech atmosphere. 

What does it mean? Simply put, it refers to the practice of using an inanimate object as your audience to talk through a problem. It's not uncommon for developers to house real rubber ducks at their desks to remind themselves to do this.

Developers might also refer to themselves as rubber ducks when they're lending an ear to a co-worker with a problem to solve. For example, let's imagine a Slack conversation:

Teammate #1: "Whenever I run this command I get a TypeError... wait! there's a side-effect in my function! Thanks, Teammate #2!"

Teammate #2: "🦆"

Resource: https://www.makeuseof.com/what-is-rubber-duck-debugging/
Using Lambda Function URLs to Collect Form Submissions
Tags: aws, lambda
Published: 2022-05-05 17:07:05

---
title: Using Lambda Function URLs to Collect Form Submissions
published: true
date: 2022-04-10 20:45:00 UTC
tags: AWS, Lambda
canonical_url: https://jasonbutz.info/2022/04/aws-lambda-url?utm_source=dev.to&utm_content=aws-lambda-url
---

This past week AWS announced [Lambda Function URLs](https://aws.amazon.com/about-aws/whats-new/2022/04/aws-lambda-function-urls-built-in-https-endpoints/), public endpoints you can enable for Lambda functions to allow them to be invoked. These endpoints can be authorized with IAM, or have no authorization. These new endpoints are well suited to one-off endpoints that don't require all the capabilities of API Gateway. These URLs are very well suited for use with webhooks. You can also use them to enable functionality on websites and blogs, for example accepting form submissions. Function URLs come with built-in [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) support, so using Function URLs for calls from websites was something AWS had in mind.

I've gone ahead and created a basic [proof of concept](https://github.com/jbutz/aws-lambda-url-poc) showing how you can use the AWS CDK to deploy a Lambda function with a Function URL enabled to accept form submissions from a website. It should be noted that this is a very simple proof of concept, and it is not meant to be a production-ready solution. It saves your form submissions as a log message in CloudWatch instead of sending any kind of email or saving it to a database. It also has no mechanism in place to filter out spam submissions. I do have throttling in place to help limit the impact of nefarious entities invoking the function frequently to maliciously increase costs.

The repo has setup instructions to walk you through setup and deployment, take a look, and if you run into issues feel free to leave an issue.

{% embed https://github.com/jbutz/aws-lambda-url-poc %}
How to Handle LinkedIn and Twitter Link Previews.
Tags: seo, html
Published: 2022-04-10 20:36:57

## **INTRODUCTION**
It's been a while I've posted an article on Dev Community, well, a while is somewhat over a year. Anyways, while I was gone,I've learnt quite a lot which I'll get into some other time.
 
So, I was working on my portfolio site, and I decided to share the link on LinkedIn and Twitter and noticed something was wrong;

The image previews and description wasn't showing up quite right, I made a couple of research and still saw I wasn't getting the image to show up. I debugged and discovered I wasn't sharing the image quite right.

In this article, I'd take you through a step-by-step process of getting your link preview done properly(especially that image part, lol).


## HANDLING THE PREVIEWS
Before I start, I know some people will say this is a job for marketers and not developers but it wouldn't hurt to know bit of it. 

When you make a post on LinkedIn or Twitter, they take data from the meta tags on that page and preview it  for the viewers to get a glimpse of what they'll be viewing by clicking on that link. Here's an example for Linked and Twitter respectively;


![LinkedIn Post Preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7up9h19bsoz6vp2m3370.png)<br>

![Twitter Post Preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ha0906hm64sjykgqx28.png) <br>



## HOW CAN YOU DO THIS ON LINKEDIN
To do this on LinkedIn, you need to include the following meta tags and make sure they are properly formatted.

![LinkedIn Meta Tags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8icgzarbvx1ow4h4an74.png)


Note that LinkedIn has a couple of rules concerning the image link placed here. I'll list them below;

- The maximum file size allowed is 5MB.

- The minimum image dimension should be 1200px X 627px.

I encountered a problem while trying to share my image from photo hosting sites like Imgur and Google Photos so here's how I got around that issue. 

I uploaded the photo to Google Photos but instead of creating a link to share the image, I opened up the image, right-clicked on it to pop open the menu and copied the image address. I pasted the address in the meta tag and it worked for me. I think LinkedIn can't pull data off the shareable link because, well, it is protected. Let me know in the comment section if that doesn't work for you.

## HOW CAN YOU DO THIS ON TWITTER
While LinkedIn relies on the Open Graph meta tags to preview links, Twitter does it's own a bit differently, it uses Twitter card meta tags.


![Twitter Meta Tags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tbh1l2e4683wgjocskk.png)

Again, I placed my url the same way I handled it for LinkedIn.

## CONCLUSION
So, in case you want to see how you page/site looks before actually posting them on Twitter or LinkedIn, you can use the  [LinkedIn Post Inspector Tool](https://www.linkedin.com/post-inspector/) for LinkedIn Posts or [Twitter Card Validator](https://cards-dev.twitter.com/validator) for Twitter Posts.


**THANKS FOR READING!!**
Why your git email address matters
Tags: opensource, git, bestpractices, transparency
Published: 2022-04-10 20:02:31

---
title: "Why your git email address matters"
published: true
description: "The email that you use with your open source commits isn't just perfunctory—it can communicate intent and important context"
tags: [opensource, git, bestpractices, transparency]
---
_Cross-posted from [juliaferraioli.com](https://www.juliaferraioli.com/blog/2022/your-git-email-matters/)_

When you were getting started with open source – and especially with git, you probably ran across guidance that told you to run commands such as this:

```bash
$ git config --global user.name "Your Name"

$ git config --global user.email yourname@example.com
```

to set your git username and email address.

It's an easy way to make sure that whichever repository you're contributing to, and wherever its canonical source lives, your commits are associated with _you_. Effectively signing your name or open source identity to your commits is a Good Thing™, because it allows the project to identify recurring contributors, (selfishly) provides people like me a way to do some analysis on git data, and more.

That said, the email address that you use matters.

We all operate in different _contexts_. I have personal, volunteer, side-project, and corporate contexts – and different email addresses associated with each of them. The email address that I use for a specific commit tells the project in which context my contribution has been made.

So in addition to (or instead of) running setting a global configuration for your email address, you can run:

```bash
$ git config user.email yourname@company.com
```

within your clone of a specific repository to configure the email address that your commits should use. If you have set a global `user.email` as well, that's what commits will use if you haven't set one within a repository ([git-scm documentation that describes this behavior](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_your_identity)).

As open source gains traction in nearly all (quite possibly all) industries with more companies and organizations contributing back to open source projects they use (also a Good Thing™), it is important to signal under which context people are contributing. Am I being a good open source citizen by fixing bugs in a framework that my employer uses? Am I trying to improve a library that [opensourcestories.org](https://opensourcestories.org) uses? Or am I contributing because I find the project interesting?

These are some possible scenarios where the additional information provided by your commit's email address can give maintainers more insight into your motivations.

It's a bit more work for you, but transparency is a core value of open source. Be transparent about your affiliation, and be thoughtful about your email address!