teleren/devto huggingface dataset:
Babylon.js Browser MMO - DevLog #7 - Websocket with socket.io
Tags: gamedev, socketio, websockets, indie
Published: 2024-01-16 00:19:41


Hello!
For today, some changes in the web communication layer. Instead of using inefficient http polling I switched to the websocket. To be exact I'm using socket.io implementation. It adds lightweight abstraction layer on top of raw websocket and it's very easy and pleasant to use.

If You're interested how I did it and how my presentation skills improving (or not improving :P) Please check my DevVlog episode on YT:

{% youtube W_KQ_siGKR4 %}
Longing!
Tags: nontech, life, chatgpt
Published: 2023-12-28 02:28:06


In the labyrinth of existence, a man's perpetual yearning propels him forward, an insatiable craving that echoes through the corridors of time. Life's essence intertwines with this relentless pursuit, as survival becomes an intricate dance with desire. In moments of vulnerability, when the yearning seems insurmountable, he is forced to confront his own helplessness.

Yet, in the depths of despair, a revelation unfurls. The man, standing at the crossroads of longing and reality, whispers to himself the profound truth—he is the architect of his struggles. These battles are not etched in the fabric of the universe; rather, they are the vivid strokes of his own imagination. The struggles, poignant and profound, are but ephemeral specters of his mind.

As the narrative of existence unfolds, he realizes the transient nature of these self-imposed tribulations. They are mere illusions, transient phantoms born from the crucible of his thoughts. The man acknowledges the power vested in him, the ability to shape and mold his own reality. With each passing moment, he becomes the weaver of his destiny, a creator of struggles and triumphs alike.

In the grand tapestry of life, he discovers that the struggles, once perceived as insurmountable peaks, are but gentle undulations in the vast landscape of his mind. The man embraces the ephemerality of his tribulations, for in doing so, he unshackles himself from the chains of self-imposed limitations. As the orchestration of his own thoughts continues, the man finds solace in the realization that the true essence of his journey lies not in the struggles themselves, but in the ever-evolving narrative he scripts for himself.

(Text generated with ChatGPT)
Language types for integration safety
Tags: api, types, theory, programming
Published: 2024-01-16 00:04:21

In my post on web dev I extolled the virtues of types. Here's an example where static typing would help.

The current implementation of an algorithm I'm refactoring returns a new 64-bit float array for its results. For performance reasons I want to modify the array in-place. This runs awry of type assertions made in the tests. If I modify an int array in-place, I still have ints; the tests assert float.

https://github.com/dchaley/deepcell-imaging/issues/104

If I "just shipped it" – the new type contract maintaining ints – it could break downstream code surprisingly. For instance, somebody probably multiplies the result against an int matrix, expecting to still have floats (float * int = float). And you wouldn't know until it ran… or perhaps, until you noticed it ran incorrectly…

With static types, the compiler tells you, before you ship a thing, that something's gone awry. If you tell it you expect an array of floats, and give it ints, that's an error. Now, there's still plenty of room for generic behavior where types are passed through. Still: the mere existence of this layer provides automatic protection against errors.

In my case I think I can address with parameterization. I need to parameterize editing in-place anyhow. So, people using that new mode, would get the new contract. People using the current mode (return a modified copy) would keep that.

So I get to sidestep the problem in this case and avoid the breaking change. 😎
The Technical Challenges of Building Sensay: A Developer's Tale
Published: 2024-01-16 00:00:34

Hello, fellow developers!

I'm excited to share with you the journey we've been on while developing Sensay, a groundbreaking digital twin technology focused on memory preservation for dementia patients. While our mission is inspiring, the technical road to achieving it has been fraught with challenges. Here's a deep dive into some of the key hurdles we faced and how we tackled them.

## 1. **Complex AI and Machine Learning Algorithms**

Creating AI that can effectively replicate human memory and personality traits was no small feat. We had to:

- **Develop sophisticated NLP models**: To understand and replicate human speech patterns and memory recollection.
- **Implement advanced machine learning techniques**: For accurate personality mimicry and emotional responses.

## 2. **Data Privacy and Security**

Handling sensitive personal data required:

- **Robust encryption methods**: To ensure data security.
- **Compliance with privacy laws**: Like GDPR, which demanded a meticulous approach to data handling and storage.

## 3. **Scalability and Performance**

Ensuring Sensay could handle multiple users simultaneously meant:

- **Optimizing database management**: For efficient data retrieval and storage.
- **Implementing scalable cloud solutions**: To handle fluctuating demands without compromising performance.

## 4. **User Interface and Experience**

Developing an intuitive UI/UX was crucial. This involved:

- **User-centric design**: To make the technology accessible to a non-technical audience, especially the elderly.
- **Iterative testing and feedback loops**: To refine the interface based on real user interactions.

## 5. **Interdisciplinary Collaboration**

This project required a harmonious blend of skills. We collaborated with:

- **Psychologists and neuroscientists**: To accurately understand memory patterns and cognitive behaviors.
- **Ethicists**: To navigate the moral implications of digital immortality.

## 6. **Technical Documentation and Developer Community Engagement**

We're committed to transparency and collaboration:

- **Comprehensive documentation**: To ensure our methods and algorithms are open for peer review and improvement.
- **Active engagement with the developer community**: To foster innovation and improvement through shared knowledge.

---

This journey has been challenging but incredibly rewarding. We believe Sensay has the potential to make a real difference in the world. We're excited to continue improving and evolving this technology with insights and contributions from this amazing community.

Cheers,
Dan Thomson
Founder, Sensay
How Do You Restart Your Career After 55?
Tags: discuss
Published: 2024-01-16 00:00:00

---
published_at : 2024-01-16 00:00 +0000
---
Starting afresh in your career after 55 can be daunting. Share your strategies and experiences for a successful new beginning.
<br>
Follow the DEVteam for more discussions and online camaraderie! {% embed https://dev.to/devteam %}
Checking if some article in Dev.to is spam
Tags: bash, devto, httpie, jq
Published: 2024-01-16 15:35:32

---
title: Checking if some article in Dev.to is spam
published: true
date: 2024-01-16 00:00:00 UTC
tags: bash,devto,httpie,jq
canonical_url: https://jorge.aguilera.soy/blog/2024/is-spam-in-devto.html
---

These last days I’ve reported to the Dev.to admin a few posts as spam, so I’ve developed this small bash script to detect posible posts

INFO: You need to have `httpie` and `jq` installed. Also, an API-KEY is required

INFO: In fact, it’s more to practice httpie and jq filtering capabilities than a useful tool

```
#!/bin/bash
API_KEY=$1

(1)
latest=$(http https://dev.to/api/articles/latest api-key:$API_KEY accept:application/vnd.forem.api-v1+json per_page==80)

(2)
filtered=$(jq '.[] | select(.reading_time_minutes==1 and .user.user_id > 4)' <<< "$latest")

echo Total Last articles $(jq -M -r '.id' <<< "$filtered" | wc -l)
echo '-----'

echo Number of authors $(jq -M -r '.user.user_id' <<< "$filtered" | uniq | wc -l)
echo '-----'

(3)
users=$(jq -M -r '.user | .user_id' <<< "$filtered" | uniq)

for user_id in $(echo "$users"); do

   (4)
   strjoined_at=$(http GET "https://dev.to/api/users/$user_id" api-key:$API_KEY accept:application/vnd.forem.api-v1+json | jq -r '.joined_at')

   joined_at=$(date --date="$strjoined_at" "+%Y-%m-%d")
   days=$((($(date +%s) - $(date -d "$joined_at" +%s))/86400))

   (5)
   if (( ${days:-2} < 3 )); then
        echo "The $user_id user is suspect to be spam, see post:"
        jq --arg jq_user_id ${user_id} '.[] | select(.user.user_id == ($jq_user_id|tonumber)) | .url' <<< "$latest"
   fi
done
```

| **1** | retrieve last articles (80 max) |
| **2** | filter by `reading_time_minutes` as spam usually are short post |
| **3** | extract uniques `user_id` |
| **4** | find user details for `user_id` |
| **5** | check if this account was recently created |

Obviously not all articles that meet these conditions are spam. Lot of people (as me) write a hello-world just created the account so the script show the url, so I can read the post and decide if it’s spam or not.

For next version, I have time, I would like to include some kind of "IA" to automatically read the post and decide if the post is spam
Alexa, are you invading my privacy?
Tags: security, technology, ai
Published: 2024-01-15 23:46:09


We find ourselves in an age where the label "smart" has become ubiquitous – from smartphones and smartwatches to smart homes and smart cars. It's so ingrained in our daily lives that we've almost taken it for granted, moreover, normalized it. As a tech enthusiast, this raises concerns, not just because our smartphones already track us extensively, but now, we've essentially become mobile data sources for numerous companies.

Consider the fact that there are over 100 million Alexa-enabled devices in our homes. While these devices may initially seem like convenient time-savers, it's essential for us to reassess our perspectives. See Alexa devices are more than just voice-activated assistants. They are <u>listening, learning, and accumulating data</u> on our preferences, habits, and even conversations within our homes. The sheer volume of data collected can be staggering, leading to questions about the extent of our privacy in this interconnected world.

For those skeptical of these concerns,do you know that amazon was charged with Violating Children’s Privacy Law by Keeping Kids’ Alexa Voice Recordings Forever and Undermining Parents’ Deletion Requests?

According to a complaint filed by the Department of Justice on behalf of the FTC, Amazon prevented parents from exercising their deletion rights under the COPPA Rule, kept sensitive voice and geolocation data for years, and used it for its own purposes, while putting data at risk of harm from unnecessary access.

I personally own an amazon echo dot. I love how efficient it makes some of my daily mundane tasks as simple as saying "Alexa, set an alarm for 7:30 am". However, is this efficiency worth the invasion of my privacy rights?
Space Spy - Trested Crypto Recovery
Published: 2024-01-15 23:05:51

Best and most reliable service for me ever goes to Space Spy Recovery! Wow; these guys are so good with their job and their customer service so friendly and reliable. I made a huge error with a transaction at work, sending $88,000 worth of BTC to a wrong wallet address. Tension arose and I was literally shaking even while I searched online for a possible solution till I read something about Space Spy Recovery services and I immediately contacted them. Because the money hadn’t been withdrawn and contacting them on time, they were able to retrace transaction and money was credited back to company’s wallet swiftly. Here is how they can be contacted for help if needed: soacespy@hackermail.com
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hpxd339pynwthrrr9nd2.jpg)
Complexidade de Espaço dos Algoritmos
Tags: python, braziliandevs, algorithms
Published: 2024-01-15 23:02:22

Eai, cês tão bem? 

Nesse [meu post](https://dev.to/analaura/complexidade-de-tempo-dos-algoritmos-o-que-eu-aprendi-512l) falei sobre complexidade de tempo dos algoritmos e hoje pra finalizarmos esse tópico de complexidades, irei falar um pouco sobre a complexidade de espaço. Bora lá? 🌚	

**_ps: Usarei python para explicar alguns conceitos_**

## O que é complexidade de espaço 🪐

No post que citei acima falei sobre a complexidade de tempo, que, em resumo, diz respeito à "quantidade de tempo" que um algoritmo precisa para executar. Agora, vamos de falar sobre a complexidade de espaço, que se refere à quantidade de memória necessária para executar um algoritmo. Em termos simples, a complexidade de espaço é expressa considerando a quantidade de memória adicional utilizada em relação ao tamanho da entrada fornecida ao nosso algoritmo.

👀 Dê uma olhada no código abaixo:

```py
def doubled_number(numbers):
    result = []
    for number in numbers:
        result.append(number * 2)
    return result
```

O que fazemos aqui é percorrer cada elemento do array passado como parâmetro, multiplicá-lo por dois e adicioná-lo a um novo array chamado `result`.

Podemos concluir, então, que se eu passar um array com 100 números, ele me retornará um novo array com 100 números. Da mesma forma, se eu passar um array com 10 elementos, o resultado será um novo array com 10 elementos.

"Então, Ana, qual conclusão tiramos disso tudo?" Quanto mais a entrada cresce, a saída também cresce e, consequentemente, o espaço ocupado por ela também aumenta. Isso implica dizer que a Complexidade de Espaço é dada por `O(n)`.

Vamos ver outro exemplo agora:

```py
def sum_list(numbers):
    sum = 0
    for number in numbers:
        sum += numero
    return sum
```

A função acima percorre uma lista de números, soma todos eles e, no final, retorna o resultado dessa soma.

A complexidade de espaço para essa função é `O(1)`, ou seja, constante. Isso ocorre porque a função utiliza apenas uma variável adicional, `sum`, para armazenar todo o resultado acumulado.

_**Independentemente do tamanho do array de entrada, a quantidade de espaço necessária para a variável soma permanece constante.**_

De forma prática, a complexidade de espaço `O(1)` significa que o consumo de memória da função não aumenta com o tamanho do array. Mesmo se o array tiver milhões de elementos, a função ainda exigirá a mesma quantidade de espaço adicional para a variável `sum`.

👀 E pra finalizarmos vale super a pena dar uma olhada neste site [aqui](https://www.bigocheatsheet.com/), que mostra a complexidade em um gráfico e pode ajudar a entender, especialmente em relação à notação Big O, utilizada para descrever a eficiência de algoritmos em termos de tempo e espaço. Se tiver dúvidas sobre isso, falei mais a respeito neste meu [artigo aqui](https://dev.to/analaura/complexidade-de-tempo-dos-algoritmos-o-que-eu-aprendi-512l).


Espero ter ajudado! 😊

bjs bjs e até a próxima 💟
2024-01-12: Happy birthday to me
Tags: devjournal
Published: 2024-01-15 22:32:14

This past week has been utter hell.

For whatever reason, last weekend, an insane amount of OpenAI API calls started cropping up. Like $200 a day. For the record, the usage is usually only about $5 a day. One day it got up to $1000.

Thus, pretty much this entire week was dedicated to this one issue.

We had to brainstorm solutions and do a ton of investigation, but my first hunch from the very start was having a malicious user just racking up usage because it was definitely unnatural. No way it was weekend traffic. That's millions upon millions of tokens.

Eventually after looking at the Kubernetes logs on GCP, I noticed that there was an error message regarding websocket connections closing, and there had been an issue with websockets disconnecting every 30 seconds, so I thought it might be related. However the other team added in logging via Mixpanel and started tying the issue to one account, which I then deleted from our database and it quickly went away (for the most part). This weekend, it was still being pretty crazy but not as bad as during the week itself.

I had tried myself to add Mixpanel tracking and token limits, but it was hard for me because I was sick from Tuesday to Thursday unfortunately.

I am hoping that we're able to launch as soon as possible because our project is hinging on investors for funding. I may have to take a temporary pay cut until we do get funding.

Well, anyway, until next Friday, cheers.
Things to know about Global Dependencies with Dev Containers
Tags: javascript, docker, vscode, node
Published: 2024-01-15 22:19:22

Node.js is one of a few runtime that packs the dependencies locally, similar to C where you make dynamic linked libraries etc. 
Python, Ruby and others usually store your dependencies system wide.
This idea of local dependencies in Node.js allows us to ship all sorts of things, for better or worse... It used to be just JavaScript but people started to ship an entire runtime, Bun as an example can be a dependency of a Node.js project, so can headless chrome, if its an entire executable program, should it be in NPM?
Lets gloss over that.. this is the inversion of the problem of global vs local, as the local becomes the new global, the problem isn't solved its moved.
 
## Switcheroo
In devcontainers the global dependency are scoped within the container, this flips the above on its head, if the point was to ship dependencies with your project, but your entire environment is your project, then whats the point in local dependencies anymore?

Yes, I think there is, I can think of a situation where you might want to stay local, even in a container, many developers have not yet taken on devcontainers yet, they should give it a try, but they might not see the benefit until they do try, in that case supporting this use case means writing the project in a traditional local dependency way, which is actually more work in dockerfiles and scripting, no scripting is obviously preferred.


## Redundant
So then you are supporting devcontainers and local development, I’ll level with you, I’m on team devcontainers, you should not support both, you need to make a call, choose one and drop support for the other, there is no point in adding overhead to development, but know that devcontainres are showing some real potential, they offer;
a way out of the not on my machine problem,
 a way out of on-boarding new developers problem, the what’s your version problem, all while adding your entire dev environment into the project version controlled and shared, centralised and fixable, and are really something you need to consider seriously.
Salary Range of a python developer in India & Overseas ?
Tags: webdev, python, beginners
Published: 2024-01-15 21:40:00

I am a Btech Student, I'm wondering if i should go with python or not , I'm not clear if it'll really help me in the upcoming future.
I just want to some accurate -figures regarding the salary of a python developer.
While on this also please provide some other python opportunities.
Running effective meetings
Tags: meetings, development, rnd
Published: 2024-01-15 21:27:26

---
title: Running effective meetings
published: true
description: few tips on running effective meetings
tags: meetings, development, rnd
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-11-28 08:49 +0000
---


After experimenting with meetings in recent years at Sproutt, here are some of our conclusions for running effective meetings:

1. ***Utilize a Meetings App:***
Have your meeting agendas and notes on a cloud app for time savings and increased transparency. Tag colleagues with action items or notes before and after meetings. At [Sproutt](https://sproutt.com), we use [Fellow](https://fellow.app).
![CloudApp](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cvcw1idorokkrhrndo0r.png)

2. ***Template Recurrent Meetings:***
Create templates for recurring meetings (Weekly, R&D Monthly, Product-R&D, 1:1, Retrospective) to save time on agenda preparation. Fellow templates work well for us.
![Template meetings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynwij5rcr8znz63wfhct.png)

3. ***Schedule 15min Meetings:*** 
Experiment with shorter, 15-minute meetings. No introductions and side-talks, get things done..


4. ***Schedule Meetings Around Recurrent Events:*** 
Avoid spreading meetings throughout the day (1x morning... 1x afternoon); it disrupts a maker's schedule. Instead, schedule them ***next to existing and recurring events***, like lunch or Daily to minimizing interruptions and ***context switch***.

5. ***Weekly Meetings Planning:***
Start each week by dedicating 20 minutes to plan and outline agendas for all upcoming meetings. Automation (what you communicate in each meeting) isn't just for development; it can also streamline your meetings..
![Weekly think](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a78158qczl9brc3xfs9i.png)

6. ***Keep Attendees Minimal:***
For technical meetings, limit participants to four or fewer; for non-technical meetings, a maximum of six is ideal.
Monitoring resources spec attributes with kubectl
Tags: kubernetes, k8s, shell, development
Published: 2024-01-15 21:27:15

When developing a controller for an operator in Kubernetes, it's always good to check if the attributes of the managed resource are being properly handled.

To do this, you can use `kubectl` in conjunction with `jq` to inspect the desired property of the resource.

In the command below, for example, you can obtain the configuration defined for the update strategy of each StatefulSet:

```sh
kubectl get statefulsets -o json -w | jq -r '.spec.updateStrategy.type'
```

Where `'spec.updateStrategy.type'` is the json path to the property that will be printed to console.
Next.js Codebase Analysis <> Part 1<> create-next-app
Tags: webdev, javascript, nextjs, opensource
Published: 2024-01-15 21:05:58

[Next.js](https://github.com/vercel/next.js) is MIT licensed open source, popular, recommended React framework. It has 117k stars on Github at the time of writing this article.

We all have used `create-next-app` but have you ever wondered what happens internally when you execute `npx create-next-app`?

In this article, I will explain where you can find the `create-next-app` related code in [Vercel/Next.js](https://github.com/vercel/next.js)

## Where is create-next-app code?

![create-next-app package](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87b2cgplr66qg74yf7l5.png)

When you navigate to [Next.js](https://github.com/vercel/next.js), You will see a lot of files. At first, I thought “So many files, so much code, how am I ever going to understand this?”. Well, we all have been there.

I remember, when I was getting started with programming, I would spend good 2 days to understand code inside a single .js file and I have come a long way now to make attempts to understand large, FOSS stuff. Consistency is the name of the game.

Open [/packages/create-next-app](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) in the root folder.

There it is, the mystery behind create-next-app.

Don’t forget to checkout the [Readme.md](https://github.com/vercel/next.js/blob/canary/packages/create-next-app/README.md) for `create-next-app`.

## Conclusion

As I keep making efforts to learn from open source, I have now chosen next.js to perform codebase analysis and I will keep writing about all my findings.

I am building a platform that explains best practices used in open source by elite programmers. Join the waitlist and I will send you the link to the tutorials once they are ready.

If you have any questions, feel free to reach out to me at ramu.narasinga@gmail.com