teleren/devto huggingface dataset:
Collaborators Wanted (Need a Developer)
Tags: beginners, productivity, database
Published: 2023-09-06 22:44:54

Hi! I'm not a developer. I don't know how to build. I'm an Entrepreneur, Creative, & Business Owner.

I'm looking to collaborate with someone who can help build my ideas. I'm needing to create a Directory/Database for my Communities, Entertainment Talent, & Vendors. I will split all profits 50/50. I have the network, content, & connections that will be available for when I have a the platform/site up & running.  I just don't know how to build. 
If you are interested or would like to know the details & my ideas, please reach out to me.  

I'm skilled in my fields but completely ignorant to Dev. (I'm trying to find a good source on learning. I don't know where to start but my time needs to be focused on the business side of things.  
I'm excited to get something up & running.  I have so many monetization ideas as well as Marketing/Engagement strategies.  

I think we could create something awesome! Possibly collaborate on more if this is successful.

Thank you! 🦋

Sarah Nicole Campbell 
[](https://bio.site/sarahnicolecampbell)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4t7igd827nyfzr2w69zz.png)
Moving Developer Relations Forward
Tags: devrel, community, series
Published: 2023-09-06 22:34:24

_**Author's Note:** What follows is Part 1 of a (currently) 6 Part series on Developer Relations, and how we can move it forward into the years to come. It is not meant as a definitive roadmap, but more as a kickstart down the road of conversation. Please comment as you see fit, and be part of what Developer Relations can become._ 

One of the most common topics of conversation, or argument, over the last 5 years or so (maybe longer, but anything prior to the COVID-19 lockdowns is a bit of a blur) in the tech community is over a statement: “DevRel is (or is not) X”. The algebraic formula solving for X usually leads to any of the following:

* Sales
* Marketing
* Cool travel
* Lollipops and rainbows
* Easy
* Corporate shills
* ${any other combination of words}

And it has gotten really, (to put it plainly) fucking old. Conferences around DevRel and Community tend to have talks which are 101-level, espousing what DevRel is/isn’t in some weird formula, while providing very little in the way of actionable steps or framework to be applied. And do you know why? Because it’s _really_ (here it is again in plain terms) fucking hard to put together a framework or flowchart for a discipline that varies _wildly_ depending on factors like:

1. Is your company in early-stage or late-stage funding rounds?
2. Does your company have a Product, and is there Market fit?
3. Who is your customer? Startups, SMB, Consumers, Enterprise, etc.?

As well as more that I’m not even capturing here.

So with all of the variables at play here, how is DevRel supposed to prove its value to the Business? How is a DevRel team supposed to avoid the two dreaded questions:

1. “What is it you do here?”
2. “What is the ROI of that?”

![What is it you do here?](https://media.tenor.com/30vKQY6QirgAAAAC/bobs-interview.gif)

Before I lead you too far down the rabbit hole, let’s start with some basics , like “What is DevRel?” in the next post in the series, which you can find in the below widget. 

-----

Cover image via <a href="http://public-domain.zorger.com" title="public domain images">public-domain.zorger.com</a>
167. Two Sum II - Input Array Is Sorted
Tags: leetcode, medium
Published: 2023-09-06 22:16:51

Problem: [here](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/description/)

<strong>First approach</strong>

Utilize Binary search to conduct search for value needed to make the target sum.

```java
class Solution {
    public int find(int startIdx, int endIdx, int toFind,  int[] numbers) {
        int left = startIdx;
        int right = endIdx;

        while (left <= right) {
            int mid = (left + right) / 2;
            int midValue = numbers[mid];

            if (midValue == toFind) {
                return mid;
            } else if (midValue > toFind) {
                right = mid - 1;
            } else {
                left = mid + 1;
            }
        }
        return -1;
    }

    public int[] twoSum(int[] numbers, int target) {
        /**
        this can be solve with a normal twoSum approach using Map and for loop for a fast O(n) solution.

        Howerver, since this is a sorted array, can we try binary search?


        For i = 0; i < numbers.lenght; i++
            value = numbers[i];
            needToFind = target - value;
            Start finding from (i + 1, numbers.length - 1);
                return > 0 index if found
            simply return that as the result

        Can utilize another map to stored which value has been visited / explored

        => may cost O(n log n) to find the result. 
         */


        int[] result = new int[2];

        for (int i = 0; i < numbers.length - 1; i++) {
            int value = numbers[i];
            int toFind = target - value;

            int idx = find(i + 1, numbers.length - 1, toFind, numbers);

            if (idx > 0) {
                result[0] = i + 1;
                result[1] = idx + 1;
                break;
            }
        }

        return result;
    }
}
```

> This comes with an issue is that we might go through the same value several times using the binary search


<strong>Second approach</strong>

We can use two pointers to find the wanted target sum

```java
class Solution {
    public int[] twoSum(int[] numbers, int target) {
        /**
        This can be solved with two pointers
        

        start from left and right
        - if sum > target: move right down
        - if sum < target: move left up
        - else: return the result;

        left and right should never met in the middle.
        */

        int left = 0;
        int right = numbers.length - 1;
        int[] results = new int[2];

        while (left < right) {
            int leftVal = numbers[left];
            int rightVal = numbers[right];
            int sum = leftVal + rightVal;

            if (sum == target) {
                results[0] = left + 1;
                results[1] = right + 1;
                break;
            } else if (sum < target) {
                left ++;
            } else {
                right  --;
            }
        }

        return results;
        



    }
}
```
Overwhelmed? Try this! - Part 3 - Pomodoro
Published: 2023-09-06 22:16:33

> In this series, I describe all of the different methodologies I employ and encourage others to try to feel less burnt out, more focused and ultimately feel better during their working day.  Most of these are also job-agnostic so non-technical people - feel free to read on!

## What?

[The Pomodoro Technique](https://en.wikipedia.org/wiki/Pomodoro_Technique) is a way of micromanaging your time for focused tasks.  If you're employed in any field which requires dedicated concentration then you can employ this technique.  It works especially well if you suffer from any condition which prevents you from concentrating... _massively exaggerated nod to ADHD_

Follow these basic steps for a "Pomodoro":

1. Pick a task you need to complete - remembering [One-task-at-a-time](https://dev.to/markwalsh/overwhelmed-try-this-part-2-single-threaded-tasking-24jn)
2. Set a timer - For at least 15 minutes but it can be anything up to 30 minutes - it's probably best to stick to 5 minute increments
3. Work on your task and only this task during this time (more on this later)
4. Once the timer goes off - stop working for 5 minutes
5. Rinse and repeat steps 1 to 4.  Every 4 Pomodoros take a longer break, perhaps double or triple your 5 minute break.

I personally like to perform 25 minute Pomodoro and I use a software based Pomodoro timer located [here](https://apps.microsoft.com/store/detail/9P5ZSCL5QC8W?hl=en-us&gl=US) for Windows.  Here's one for [MacOS](https://apps.apple.com/gb/app/be-focused-pomodoro-timer/id973134470?mt=12) and one for [Linux](https://gnomepomodoro.org/).  Or you can buy a physical timer or use a timer on your phone.

In order to achieve peak concentration, I also make sure I mute all of my OS, IM and phone notifications during this time.  Not distracting yourself from your timed task is absolutely key to ensuring the success of this technique.

...BUT! as important as achieving your peak concentration during the task is the cooldown period.  Make a coffee, go outside for 5 minutes, check the stock market (if that relaxes you!?).  The important thing is that you honour the 5 minute cooldown by giving yourself a dopamine hit which is absolutely **not** work related.

## Why?

This technique is so effective because:

1. You're totally focused on a single task at a time with no context switching
2. There's a low-bar of entry - it's a really easy technique to learn and adhere to
3. Time-blocking tasks into chunks actually makes difficult or long tasks easier to process and digest
4. You can avoid burnout 
5. You can avoid decision fatigue
6. It's easier to forecast and plan your work when it's compartmentalised
7. You could find it easier to get started on a task

For software engineers I've found it's also beneficial because:

1. I've found it acts like a [Rubber Duck Debugging](https://en.wikipedia.org/wiki/Rubber_duck_debugging)-esque technique in the way that problems are often much more obvious post-Pomodoro 
2. It will improve your estimates if operate in an Agile manner because you can class user stories or tasks by how many estimated Pomodoros they will take
CanvasWizard
Published: 2023-09-06 21:51:42

Hello, everyone! I want to introduce you to my project, CanvasWizard.

link: https://zyabrik10.github.io/canvas-wizard

Because I enjoy working with canvas and JavaScript (simulating physics, creating visual effects using mathematics, and more), and because there's very little information on canvas projects online, how to create them, and the necessary knowledge (and the existing information is often in English and outdated), I've decided to create my own website-book about canvas. On this site, I will explain canvas, its API, mathematical and physical concepts required for projects. I'll delve into these topics, using images and videos, while maintaining a simple language.

The website is still under development, and its current appearance is not final. In the future, I plan to create Ukrainian, Japanese, Spanish, and Polish versions of the site, and I will enhance all articles. There will also be changes to the site's name and logo.

Currently, there is only one project, but there will be more coming soon.
The site is already searchable, but it doesn't have its own domain yet, which I plan to acquire.

Attention! Website compatibility with various browsers is still in development. So, the site may appear differently in your browser (for example, a transparent mobile menu).

If you have encountered this issue. Please contact me.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwg3gh8o8zsn3kvibqmd.png)
TIL about Portability and Optimization
Tags: spo600
Published: 2023-09-06 19:57:42

## Introduction to the Problems

The introduction highlights the challenges associated with **porting** and ensuring **portability** of software across different computer architectures. It explains that while most software is written in high-level languages, making it potentially portable, some code may contain architecture-specific elements due to various factors such as system assumptions, variable/word size, endianness, or reliance on platform-specific features. It also mentions that Assembly Language programming, once prevalent for performance and hardware access, has diminished in relevance due to advancements in compilers and libraries.

The introduction introduces the _**AArch64 architecture**_ as a recent addition, noting that open-source software has started to run on it, but optimization may still be lacking compared to older architectures. **Benchmarking and profiling** are explained as methods for evaluating software performance and identifying bottlenecks.

**Optimization** is described as the process of improving software performance through algorithm substitution, operation sequence alteration, architecture-specific coding, or build process changes. It emphasizes the need to maintain correct results and avoid performance regressions for different system configurations and goals.

The concept of "performance" is said to vary depending on specific system requirements, including factors like memory usage, execution speed, CPU utilization, or power consumption. Compiler optimization and build process alterations can significantly impact these trade-offs.

Lastly, the introduction touches upon the complexity of the software **build process**, including multiple stages, numerous source files, and various build configuration options. It underscores the importance of consistency in building software for achieving consistent benchmark results and mentions that build times for complex packages can be extensive.
kafka mongo sink. Create _id from key message
Tags: kafka
Published: 2023-09-06 21:47:11

Hello,

I have the following kafka message: key content is `{orderid: 123}` and the message value as `{name: "def", company: "abc"}`. I want to insert in mongodb the following document: `{_id: 123, name: "def", company: "abc"}` where _id takes the value of orderid from the key message. I have tried the following config and it looks ok except that the _id is being an object like this: `_id:{orderid: 123}`. Any idead how we can achieve this? I have the following config:

```
name = MongoSinkConnectorConnector_1
connector.class = com.mongodb.kafka.connect.MongoSinkConnector
topics = topicA

key.converter = org.apache.kafka.connect.storage.StringConverter
key.converter.schemas.enable = false

value.converter = org.apache.kafka.connect.json.JsonConverter
value.converter.schemas.enable = false

connection.uri = mongodb://localhost:27017
database = foo
collection = mycollection

# Use a single message as a document
document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.PartialKeyStrategy

# Post processing of the sink documents
post.processor.chain=com.mongodb.kafka.connect.sink.processor.DocumentIdAdder

# Document ID strategy using the Partial Key Strategy
document.id.strategy.overwrite.existing=true

# Provide a custom setting for which key values to consider for the _id
document.id.strategy.partial.key.projection.list=orderid,customerid
document.id.strategy.partial.key.projection.type=AllowList
```
Thank you!
Contributing to open source projects
Tags: python, airflow, opensource, data
Published: 2023-09-06 21:11:54

## TL;DR

I have made my initial foray into the realm of open-source contributions:

- [Airflow - Dynamic DAGs example to MWAA local](https://github.com/aws/aws-mwaa-local-runner/pull/280)

---

I have always been passionate about the open-source world. The majority of my current job relies heavily on open-source tools and packages. In fact, it is remarkable to acknowledge that a significant portion of the internet operates on open-source code.

However, I must say that I never truly comprehended why people would invest countless hours in building software merely for the sake of creation – that is, until I built my first website.

The high I got from building something out of thin air was amazing, even though it was poorly designed and nobody was going to use it. In fact, at times, I find the process of shipping a product with real users to be as fun as creating something that exclusively solves a problem for myself and perhaps for some of my friends.

I never really considered myself a good-enough engineer to contribute to an open-source project, though, and even browsing through open-source repositories was overwhelming and daunting.

However, this month, I decided to change that. I am proud to present my inaugural open-source contribution:

- [Airflow - Dynamic DAGs example to MWAA local](https://github.com/aws/aws-mwaa-local-runner/pull/280)

While it may not be a feat of engineering genius, and a significant portion of the code already existed elsewhere, hopefully it will help someone out there – or, at the very least, confuse a few robots lurking in the depths of the crazy interwebs.
Need Help From this Community to Contribute to Development of stackui.co
Tags: discuss, webdev, opensource, frontend
Published: 2023-09-06 20:34:58

**What is Stack UI? and Why I need your help?**

Front-end world has been deaminated by UI Frameworks like Bootstrap, Tailwind CSS, Material UI, MD Bootstrap, Materialize CSS.

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

I am on a mission to create a difference in this front-end world by creating an Open code UI Library which requires no documentation and installation!

This way developers can choose only the required and necessary stuff for their project and create a custom stack of front-end project to project basis. And by doing so developer will have full control over the UI Components and they can modify it however they want.

**All in one UI Library!**


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

It should be all in one UI library so there is no need for developer to Google anything

There are equal amount of paid resources and equal amount of free resources, and I want to create a resource which will continue to evolve as the time flows by and I am committed to keep it free forever as long as it is supported by people!

However I am one person and developing such extensive UI resource platform is slowly taking toll on me!

I have already made MVP live, which you can check it here - [https://stackui.co](https://stackui.co)

MVP already has **HTML**, **CSS** & **JavaScript** based components, and currently I am working on **React JS** and **Vue JS** components, after the work with React and Vue components is done I am going to make the **source code** available on **GitHub page!**

**The help I am looking for**

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

**Patreon Sponsors - ** Currently Stack UI has only 1 Patreon Sponsor who is supporting me from the initial stage. 

I want to more people to sponsor this initiative to make this huge extensive UI project work! 

Patreon sponsors are huge deal because those who will sponsor this project will have right to get their voice heard. On GitHub I will get bug reports/reviews but patreon sponsor will have right to decide via poll and they will decide which feature should be released and which should not be released. 

Money donated by Sponsors will be used for **Server Maintenance** and **Marketing** and for creating **premium quality creating tutorial videos** and it will help me in **creating a team** do develop this extensive UI Library!

So, If you think what I am working is worth supporting! Then please donate as it would meant the world to me

**Patreon link - ** [https://www.patreon.com/StackUI](https://www.patreon.com/StackUI)
Using fzf to choose from a list of choices
Tags: fzf, shell, docker, pygments
Published: 2023-09-06 20:18:53

---
title: Using fzf to choose from a list of choices
published: true
description: Some scenarios where fzf can help a lot
tags: fzf,shell,docker,pygments
cover_image: https://raw.githubusercontent.com/junegunn/i/master/fzf.png
---

## Some scenarios I use fzf to help me pick from a list of choices

### #1 - picking which docker images I'd like to remove

```shell
fzfrmimage () {
  # - list all docker images, skipping the first line
  # - feed these lines into fzf (user: TAB select/hit ENTER)
  # - format a list of 'image:tag's and pass it to `docker image rm` 
  images=$(docker image ls | tail -n +2 | fzf | sed -n 's/\(\S*\) *\(\S*\).*/\1:\2/p')
  docker image rm $(echo $images)
}
```

### #2 - picking from pygments themes (styles)

I used this as a oneliner (actually 2 for better legibility) in order to preview some sample code using the style.

```shell
pygmentize -L styles | sed -n 's/^* \(.*\):/\1/p' |\
  fzf --preview "pygmentize -P style={} -l python ~/prj/python/bored/main.py"
```
- list all styles
- filter for lines that start with an asterisk
- remove the trailing ':' character
- feed the list into fzf with a sample code preview
- user: TAB select / hit ENTER
- fzf prints the selected themes
- profit!

FZF is a super flexible tool that I'm always looking for ways to leveraging its powers. Thanks [Junegunn Choi](https://github.com/junegunn) for creating it!
Understanding NaN Equality in JavaScript
Tags: javascript, programming
Published: 2023-09-06 20:13:37

> Did you know `NaN == Nan` is actually `false`?

This might seem counterintuitive, but it's because NaN represents an `indeterminate` or `undefined` value. Therefore, it's impossible to equate two NaN values using the equality operator.


The correct way of checking for NaN is yung the `isNan`

```js
console.log(Number.isNaN(NaN)); // True
console.log(isNaN(NaN)); // True
```

these are built-in JavaScript function that checks if a value is NaN

[I learned a lot from this video](https://youtu.be/Rs7ARD5TCFU?t=627)
Deploy A SAMPLE APP USING Azure CLI
Tags: azurecli, cli, webapp
Published: 2023-09-06 20:10:34

To open the Azure cli click on the green box where the red arrow points.


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


Create the resource group:  use the command az group create --name <your choice of name > –-location <azure region of your choice> in the code snippet below, i have chosen to use the name bobobrp. 


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


Then create a resource group az group create --name bobobrp --location eastus. This command creates the resource group bobobrp




Create an App service plan: An app service plan provides the necessary compute resources to run your applications and manage the scaling and availability of the apps.





 Use the command : az appservice plan create --name ourAppServicePlan --resource-group bobobrp


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


Break down the parameters:
<plan_name>: Specify a name for your App Service Plan.
<resource_group_name>: name of the resource group where you want to create the App Service Plan.




Create an Azure App Service app: If you haven't already created an Azure App Service, you can create one using the Azure CLI by running the command az webapp create . With the supplied name  (i used bobofishandfishes), resource group, and app service plan, this command will build a new web app.
Note: Remember to create the resource group first before using it in the command

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


Web app created