teleren/devto huggingface dataset:
First post, lets see where this goes.
Tags: webdev, javascript, beginners, programming
Published: 2023-01-05 01:08:48

So I just found this site and decided that it would be a good idea to start blogging/writing about where I am at in my journey. I am currently working my way through the Foundations portion of The Odin Project. 

In the process of refactoring a rock, paper, scissors program so that it can be interacted with and displayed through the web page of a browser instead of the console. I am learning a lot through this process and after struggling this last week to figure out what I was missing I finally had a breakthrough!

Thanks to [this](https://stackoverflow.com/questions/35936365/what-exactly-is-the-parameter-e-event-and-why-pass-it-to-javascript-functions) post I figured out how 'e' can represent an event and that after triggering this event an object is passed to the handler function which can then be referenced within that handler function elsewhere. Originally I had no idea where this 'e' argument was coming from but this one post was so nicely worded it cleared everything up and the fog was lifted.

I will likely go into more detail in future posts, with snippets of any code I was working on but, for now I just had to get off my chest the sense of relief and satisfaction I felt when finding this solution. Really does make all the struggling worth while when the pieces start to come together.
Motive
Published: 2023-01-05 01:05:26

Hi, I'm Rohith!

I am a final year BTech Computer Engineering Student. I am writing this blog to document my journey in the Cloud computing world.

I am starting this blog to structurize my learning and try to keep this an informative blog so that others can learn through my journey.

I would like to return to this page and say that I am a successful cloud engineer. 

Onwards and Upwards!
Gamification-as-a-Service?
Tags: webdev, productivity, api, help
Published: 2023-01-05 01:00:06

Is anyone aware of any developer-friendly Gamification APIs for web products? I'm looking to add a gamified layer to an existing SaaS product, but I'd prefer not to have to build it myself.

Key features I'm looking for are:

- **Collaborative, point and click achievement builder** — Non-engineers can manage and experiment with new achievements. Achievement criteria can include event counters, time conditions, etc.
- **Streak management** — Configure streak goals and issue achievements when reached
- **Identity management and event triggers** — Users are identified via unique ID at sign in, then I can fire events via SDK that count towards the user's achievements/streaks.
- **UI widget** — Drop-in UI widget to display streaks and achievement progress in realtime.

Some nice-to-have features would be:

- **API** — API access to fetch achievement/streak data and format the display however I want.
- **Versioning/migrations** — Change management so users don't get upset if an achievement changes after they have already started.

The closest thing I've been able to find is Gameball.co, but it seems to be e-commerce/marketing focused and you have to go through sales to get SDK access.
Build Your First Rails API
Published: 2023-01-05 00:52:43

In this article i am going to quickly show you how you can build a simple rails api. This will give you an idea of what building API entails.
I am going to make this as simple as possible so that you understand the basics.
The api end point that we will be building will get us a random greetings.
Lets dive in and get our hands dirty.
First, you will need to create a Rails API app by running the following command:

```
rails new my_api --api --database=postgresql

```
We will need to create the database by running 

```
rails db:create
```
Next, you will need to create a model for your greetings table by running the following command:

```
rails g model Greeting content:string

```
Run the following command to create the table in your database:

```
rails db:migrate
```
Next, you will need to seed your database with some greeting data. You can do this by adding the following lines of code to the db/seeds.rb file:

```
Greeting.create(content: "Hello")
Greeting.create(content: "Hi")
Greeting.create(content: "Good morning")
Greeting.create(content: "Good afternoon")
Greeting.create(content: "Good evening")

```
Run the following command to seed your database:

```
rails db:seed

```
Now you can create your API endpoint. In your config/routes.rb file, add the following line of code:

```
get '/random_greeting', to: 'greetings#random'
```
Create a GreetingsController by running the following command:

```
rails g controller Greetings
```
In your app/controllers/greetings_controller.rb file, add the following action:

```
def random
  greeting = Greeting.order("RANDOM()").first
  render json: { greeting: greeting.content }
end

```
Now when you make a GET request to the '/random_greeting' endpoint, it will return a JSON response with a random greeting from your table.
I hope this helps! Let me know if you have any questions.
Using vue-clickaway for your dropdowns
Tags: beginners, javascript, vue, newbie
Published: 2023-01-05 00:45:16

Do you ever want to close a dropdown anytime the user clicks outside of it? vue-clickaway is a package that covers listening for clicks outside an element so you can perform actions when it happens. I will be taking you on the easy installation process and how to use it within your components.

## PREREQUISITE

- Knowledge of [Vue](https://vuejs.org/guide/quick-start.html) or [Nuxt](https://nuxtjs.org/docs/get-started/installation)
- Install [vue-clickaway](https://www.npmjs.com/package/vue-clickaway)

Click [here](https://www.npmjs.com/package/vue-clickaway) to install the package via npm or yarn. After installing, the recommended way of usage is to import clickaway into the component you intend to use it as a mixin like this:

`import { mixin as clickaway } from 'vue-clickaway';`

The next step is to call the mixin inside your

`export default` like this `mixins: [ clickaway ]`

After that, you call the method you want to trigger on clickaway in your template on your dropdown parent element.

`v-on-clickaway="away"`

Final step is to create the `away` function and watch the magic happen. Let's go ahead to demonstrate an example for you so you can understand how it works, if you don't already.

This example was built on a Nuxt.js project. The first thing I did after installing clickaway was to create it as a plugin so I would not have to import it and use it as a mixin on every component I intend to use it on

```javascript
// plugins/clickaway.js

import { mixin as clickaway } from 'vue-clickaway'
import Vue from 'vue'

Vue.mixin({
  mixins: [clickaway]
})

```

Now add the clickaway file inside the plugins array in your nuxt.config.js

```javascript
// nuxt.config.js

plugins: [ '~/plugins/clickaway' ],

```
Now we can go ahead to call our method on the clickaway directive

```javascript
// components/Navbar.vue
<script>
  export default {
    data: () => ({
      showCityDrop: true,
      cityDrop: [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ]
    }),
    methods: {
      closeCityDrop () {
        this.showCityDrop = false;
      }
    }
  }
</script>

<template>
  <div v-if="showCityDrop" v-on-clickaway="closeCityDrop">
    <p v-for="item in cityDrop" :key="index" :to="item.to" class="drop flex items-start text-primary mb-4">
      {{ item }}
    </p>
  </div>
</template>

```
And that's all you need to do to use clickaway to close your dropdown when the user clicks outside of it. It has other use cases aside the use case demonstrated above. You can use vue clickaway whenever you need to listen outside of an element to perform actions.

I hope you find this helpful
Develop machine learning applications inside the containers
Tags: machinelearning, deeplearning, docker, python
Published: 2023-01-05 00:42:54

{% embed https://docs.google.com/presentation/d/e/2PACX-1vTPrXjF_ae__fJv5F7W_n8W10NT8Fqu04sLbucd7vtgjEsV67De5xPMj1cOdEnif5IXOMLCu_yxZf0v/embed?start=false&loop=false&delayms=3000 %}
Switching Result and Option in Rust with Transpose
Tags: rust
Published: 2023-02-11 23:06:08

---
title: Switching Result and Option in Rust with Transpose
published: true
date: 2023-01-05 00:00:00 UTC
tags: Rust
canonical_url: https://imfeld.dev/writing/rust_option_result_transpose
---

When writing Rust code, it’s common to have an `Option` value that you want to map through some fallible operation. For example, you have an `Option<String>` and you want to parse it as an integer. You could do something like this:

```rust
fn parse_maybe_int(s: Option<String>) -> Option<Result<i32, ParseIntError>> {
    s.map(|s| s.parse::<i32>())
}
```

But this gets awkward if you want to return an error when the parsing fails, but don’t want to unwrap the `Option` just yet. When I first started writing Rust I would use the match syntax to take care of it.

```rust
let input = Some("3".to_string());
let value = match parse_maybe_int(input) {
    Some(Ok(value)) => value,
    Some(Err(e)) => return Err(e),
    None => None,
};

```

One of Rust’s best features is the `?` operator, which allows you to unwrap a `Result` and return if it’s an error. So having to write this match every time gets old quick.

Fortunately, there’s a method in the standard library that addresses this exact problem. When you have an`Option<Result<T, _>>` or a `Result<Option<T>, _>` you can use the `transpose` method to swap the `Result` and `Option`.

```rust
let input = Some("3".to_string());
let value = parse_maybe_int(input).transpose()?;
```

And then from there, you can build the transpose straight into the method:

```rust
fn parse_maybe_int(s: Option<String>) -> Result<Option<i32>, ParseIntError> {
    s.map(|s| s.parse::<i32>()).transpose()
}

let input = Some("3".to_string());
let value = parse_maybe_int(input)?;
```

Much better. I haven’t seen `transpose` mentioned much, but I’ve found it very useful, so I hope this helps someone.
Onboarding
Tags: personal, onboarding, abuelocebolleta
Published: 2023-01-22 12:20:55

---
title: Onboarding
published: true
date: 2023-01-05 00:00:00 UTC
tags: personal,onboarding,abuelocebolleta
canonical_url: https://jorge.aguilera.soy/blog/2023/onboarding.html
---

Hoy, 5 de enero de hace justo un montón de años (pero que muchos), el vecino me consiguió un trabajillo de un día para poner las frutas escarchadas en los roscones de la pastelería donde él trabajaba.

<dl>
<dt>INFO</dt>
<dd>
<p>Obviamente, eran otros tiempos y era en "negro", claro está.</p>
</dd>
</dl>

Como buen JASP, (si eres de mi quita recordarás la referencia a joven aunque sobradamente preparado), me levanté superpronto y acudí dispuesto a darlo todo

"Aquí coges los roscones, aquí está la fruta y los metes en estas cajas. Los vas apilando aquí. No te entretengas que hay mucho currele" fue mi onboarding. Tal cual me dio las instrucciones, tal cual se fué a despachar

Pinpan pinpan fui sacando roscones a toda mecha como buen becario aplicado (admito que alguna frutilla caía en mi boca durante el proceso)

A media mañana, el pastelero con cara satisfecha y clientela casi despachada entro a supervisar la faena

Quiero recordar su cara enrojecida, pero sería mentir, mis recuerdos no llegan a tanto, pero sí recuerdo cuando me gritó

"pero qué estás haciendo????? En las de cuarto solo tienes que poner 4 frutillas y en las de medio 6!!!!!!" (Cifras inventadas porque no me acuerdo ya)

Sin niguna instrucción previa y simplemente usando mi intuición de lo que a mí me gustaría ver en un roscón había puesto frutitas a discreción.

Su cabreo y desesperación fue en aumento según abría cajas y veía que me había aplicado a conciencia.

Creo recordar que aún así, al terminar el día, me pagó lo que le había dicho a mi madre que me daría.

#onboarding
What podcasts have I been listening to
Published: 2023-01-06 08:04:05

---
title: What podcasts have I been listening to
published: true
date: 2023-01-05 00:00:00 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2023/what-have-i-been-listening-to/
---

I love listening to podcasts so I thought I would share what I have been listening to over the last few days.

## Source Open vs Open Source and IdentityServer with Dominick Baier and Brock Allen

[.Net Rocks episode 1824](https://www.dotnetrocks.com/details/1824)

The creators of the open source project Identity Server which went commercial discuss the reasons for doing so. This was a very interesting discussion on the challenges of running open source projects and ways that they can be more maintainable. I have seen Twitter arguments on both sides about various products that have done this. It is a very nuanced problem, which I don’t know much about so interesting hearing what was involved.

## Growing as an Engineering Manager with Taylor Poindexter

[Hanselminutes episode 871](https://hanselminutes.com/871/growing-as-an-enginering-manager-with-taylor-poindexter)

A discussion about being an engineering manager, mentoring and growing and learning. I am not a manager and I don’t have people that report to me, however, I am a senior developer so anything that can help me improve on the leadership side of things is great. On a side note, I love how diverse the guests are on Hanselminutes, I often listen to people on this show I would never have heard of or known about if I just stuck to topics I know about.

## Top 5 Scenes at a Table

[TrekRanks episode 149](https://www.trekranks.com/trekranks-podcast)

Star Trek for me has always been about positivity and Trek Ranks delivers this in spades. The concept, in case you don’t know, is to choose 5 episodes about the chosen topic, but it is really an excuse to talk about them! So what 5 scenes at a table would I choose?

1. Undiscovered Country - Dinner with the Klingons. Klingons, Shakespeare, terrible table manners what is not to love about this scene
2. Q Who - Scene in the observation lounge with Q and Guinan as they discuss how to respond to the newly discovered Borg
3. Civil Defence - Scene in Ops between Garak and Dukat while the crew hide from an automated phaser firing at them, the best bit is when Duakt tried to leave and ends up trapped with the rest of the crew
4. Mirror, Mirror - Scene where Bones realises that some things are the same in the mirror universe, the spot where he spilt acid
5. Unification Part 2 - Spock, Picard and Data have been captured by Sela, and Sela comments that she doesn’t get to write many speeches, and then Data comments that maybe she would be happy doing another job
Most commonly used JavaScript methods
Published: 2022-12-22 18:56:34

## There are many commonly used JavaScript methods, as the language has a large and comprehensive standard library. Some of the most commonly used methods include:

---


```
console.log()
```
_This method is used to log messages to the console. It is often used for debugging and testing purposes._

```
document.getElementById()
```
_This method is used to retrieve an element from the DOM (Document Object Model) by its unique ID._

```
array.forEach()
```
_This method is used to iterate over the elements of an array and perform a specific action on each element._

```
string.split()
```
_This method is used to split a string into an array of substrings based on a specified delimiter._

```
string.replace()
```
_This method is used to replace a specified value in a string with another value._

```
Math.random()
```
_This method is used to generate a random number between 0 (inclusive) and 1 (exclusive)._

```
array.sort()
```
_This method is used to sort the elements of an array in place, according to their natural sort order or a custom sort function._

```
array.map()
```
_This method is used to create a new array by performing a specific action on each element of the original array._

```
object.hasOwnProperty()
```
_This method is used to check if an object has a specific property defined directly on it (as opposed to inherited from its prototype)._

```
string.trim()
```
_This method is used to remove leading and trailing white space from a string._

**These are just a few examples, but there are many other commonly used methods in the JavaScript language.**

For a complete list check out the [Mozilla Developers Network](https://developer.mozilla.org/)
DEV vs INFRA – A Guerra dos Mil Dias
Tags: devops, cloud, infra, devs
Published: 2023-01-04 23:15:58


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

De um lado temos o DEV, o desenvolvedor, neste papel a pessoa que, independentemente da stack, tem a responsabilidade de criar as soluções/softwares que resolvem os problemas e desafios apresentados.
Do outro lado temos a INFRA , Todos esses recursos permitem às organizações utilizar novas aplicações e desenvolver suas atividades profissionais, ampliado a necessidade de desempenho e segurança para garantir uma operação eficiente

E quem vence a batalha DEV vs INFRA ?

Para quem já viu Cavaleiros do Zodíaco (Saint Seiya) a Guerra dos Mil Dias já pode ser familiar, mas para quem não conhece: é uma situação hipotética na qual dois cavaleiros de ouro se enfrentam e mesmo que se passem mil dias a luta não tem vencedor.
Quando ocorre DEV vs INFRA o resultado é praticamente o mesmo que a Guerra dos Mil Dias, além de não existir vencedor, o desgaste tende a prejudicar o projeto e o resultado deste é refletido em todos, independente dos papéis.
É importante lembrar que as funções são complementares, não concorrentes, o ideal é trabalhar em conjunto. Trabalhar a empatia pode ajudar, uma maneira é um DEV conhecer um pouco de INFRA e vice-versa, isso ajuda a compreender melhor as dificuldades e a importância de cada papel.
Um exemplo de impacto positivo da troca de conhecimento é que o DEV conhecendo mais sobre qualidade pode inserir os conceitos e práticas em sua rotina e código e a INFRA conhecendo mais sobre desenvolvimento de código pode criar ou ampliar a automação, gerando ganho em agilidade na conclusão de funcionalidades com qualidade.
Falando em agilidade, em metodologias ágeis uma das propostas já é criar times multidisciplinares para que pessoas com papéis diferentes trabalhem juntas como um time e entendam de forma mais direta que o resultado não é medido por uma pessoa, mas pelo conjunto.
Portanto, esqueça as disputas de papéis, não hesite em entender e aprender sobre outras funções, seja através de cursos, bootcamps, workshops, treinamentos internos ou mesmo com troca de conhecimento com comunidades e colegas de trabalho, conhecer ao menos o básico irá contribuir para melhor comunicação, argumentação e execução de tarefas por todos
Please don't forget to specify your file type
Tags: noob, react, javascript, beginners
Published: 2023-01-04 23:04:10

Hi fellow coders. 

Today I have messed up again while creating a new component to add onto my react project. 

Me and my teammate both went through each lines of code to make sure my logic makes sense. It wasn't until he told me to look in my console tab (after inspecting the page). 
It was all mumbo jumbo until I read one line,

> Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/static/media/CommentForm.822d12a9fce48c39b3fb') is not a valid name.

Hmmm.... so the DOM wasn't even being created and/or being mounted onto the mother component (App.js)?

Me having no idea what this means decided to just reverse google search it. 

Boom. The first result was some other people running into the same problem on StackOverflow. 

Skim..
Skim..
Skim..
"... have you added .js at the end of your file name?"

OH MY GOD I FORGOT TO ADD .JS AT THE END OF MY COMPONENT FILE. 



Goodnight folks ( I know it's 3pm )
Day 666 : Hot minute
Tags: hiphop, code, coding, lifelongdev
Published: 2023-01-04 22:54:31

_liner notes_:
- Professional : Had a couple of meetings earlier in the today. Then spent the rest of the time doing creating tickets, research, reviewing some projects in a repo and some coding. Day flew by quick!

- Personal : Last night, I worked on the proof of concept for my next project. Got pretty far, I think. There's a bunch of placeholder images, but I'm getting the data structure down for what I'll need to send from the back end.

![Aerial view looking inland from the ocean at the rocky coast of Old Harry Rocks, England coming to a point in the center of the photo with some tall rock formation coming up out of the water.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tckku7zvzophu50zwy77.jpg)

Going to work on the details page of my side project. I think once I get it to a good place with all the elements that will be needed, I'll show it to my friend to get their feedback. I recently signed up to Curiosity Stream and Nebula. They show a bunch of documentaries and it's been a hot minute since I've watched one. Maybe it'll help me go to sleep earlier. haha.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube _VwQhWWcUz4 %}
Quickly Manga Translator on CSharp
Tags: csharp
Published: 2023-01-04 22:35:29


Hello!  I am developing my own program for quickly translating manga into any language in the world.  Page on github: https://github.com/AntonRls/Manga-Translator .  Now the program is really useful, and with it you can easily translate manga.

The only problem I've encountered is the recognition of Japanese letters.  I used IronOcr, but it is paid and is given only for 30 days, maybe someone knows what can replace it?
Original:
![Original](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lgzo6j1fkfhacai7enxe.jpg)

Translation:
![Translation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lnz0vjhevdklcy7qjjx.png)
Welcome!
Tags: beginners, javascript, react, career
Published: 2023-01-04 22:16:58

Hey there! If you are reading this, this is my first post on this community. Let me introduce myself then.

Hi, My name is Martha, a passionate front end developer that build websites using React. I am really passionate about learning and impacting what I have learnt to others.

My coding skills include; intermediary experience in HTML, CSS, JavaScript, Tailwindcss & React. I would say intermediary because learning for me never stops, its like a deep pit that can never be filled.

In my spare time, I venture into technical writing and open source collaboration, hoping to make more collaborations in the future. I also have a YouTube channel where I teach front end development languages. 

Let me stop here. For further discussions, you can get across to me.