teleren/devto huggingface dataset:
3.0-alpha Planning
Tags: opensource, programming
Published: 2022-04-21 20:42:15

## The Plan for 3.0-alpha

The semester is almost coming to the end, everybody is spending time on preparing for their exams, so we were planning to prioritize which features/issues needed to get done in 3.0-alpha and also 3.0 release. This week, we decided to focus on the features that we need for the final release, and removed anythings that was not important out of the milestones.

## My Contribution

I did not do a lot of works in terms of putting the new codes in Telescope, however, I tried to spend some times reviewing others' PRs. Even though it was "PR reviewing", but I thought it would take almost the same time as I was putting the new codes. Some of the PRs that I reviewed in this week:
- Fix Docusaurus broken links
- Get rid of Satellite information from Dashboard
- Run a Satellite instance to provide healthcheck route
- Add `GIT_COMMIT` override for local environments
- Beside getting rid of Satellite old links in Dashboard, Joel also added new links to the sidebar such as Portainer and Supabase production & staging

## Final Thoughts

When I reviewing the PRs, I would say that some of them would not take a lot of time to review and test it. However, there were also PRs that I spent hours seeing what happened with it as well as how to tested it out. Some time I had some failures because I didn't run `pnpm install` when pulling the new changes from `upstream`, I realized how clumsy I was even though I do it almost everyday :D
[Solved] Supabase 'insert()' not inserting table record
Tags: javascript, errorsolutions, supabase, debugging
Published: 2022-04-21 20:35:40

### Problem:

When using [supabase](https://supabase.com/) the `insert` statement is not inserting new records into the specified database table

![Insert operation in usage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9nqu45l52kcv4luv9y0.png)

_Figure 1: Insert operation in usage_

### Solution:

There are many causes for this error. Here is one potential solution:
Make sure to examine/log out the `error` parameter in the `const { data, error } ...` statement. Often times a mismatching column type or missing column will cause errors when trying to insert a record in a specific database table.

To aid in the debugging process try using your native browser debugger. [Here is a guide](https://developer.chrome.com/docs/devtools/javascript/) on how to use the debugger in Google Chrome DevTools, and [here is a corresponding guide](https://firefox-source-docs.mozilla.org/devtools-user/debugger/) for Firefox

## Conclusion

Thanks for reading this blog post!

If you have any questions or concerns please feel free to post a comment in this post and I will get back to you when I find the time.

If you found this article helpful please share it and make sure to follow me on [Twitter ](https://twitter.com/Shehan_Atuk)and [GitHub](https://github.com/ShehanAT), connect with me on [LinkedIn](https://www.linkedin.com/in/shehan-atukorala-8631491a5/) and subscribe to my [YouTube channel](https://www.youtube.com/channel/UCtxed_NljgtAXrQMMdLvhrQ).
Help me please!
Published: 2022-04-21 20:24:43


Hi, am prosper and am having a downtime currently. My pc is broken and I need a replacement. please help
You can support me via [buy me a coffee](https://www.buymeacoffee.com/yongdev) or via  [PayPal](https://paypal.me/yongdev) 
![my pc](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uimn0qvhfohy2salk1cr.jpg)
Overwhelmed by Docker? Start with this easy 55-second animation
Tags: docker
Published: 2022-04-21 20:17:49

Let's be real: getting into software engineering is hard. Even when you're focused on one specific technology you want to learn, there's so much depth to everything. If you've tried getting into Docker before but felt disoriented, here's a short animation that can help you see the forest through the trees.

{% youtube vP_4DlOH1G4 %}

It touches on Docker's purpose, Docker images, containers, and several frequently used Docker commands. This summary will send you on your way and bridge the gap towards the more detailed resources you find all over the internet.
SaaS Vendors: Should You Build or Buy B2B SSO (Federated SAML/OIDC)?
Tags: saas, startup, security, webdev
Published: 2022-04-21 19:48:09

Don’t struggle to build this critical capability only to find you don’t support your potential customers’ identity platform of choice. Datawiza offers a No-Code approach to supporting every identity solution.

If you’re selling your SaaS application to businesses, you’ve got to see security through the eyes of your customers. Sure, you’re doing everything you can to build security into your product, but that’s not the only challenge your potential customers have. They’re also thinking about their own Zero Trust architecture, and this includes Zero Trust for their applications.  A key strategy they’ve adopted is using a modern identity management platform like Azure AD or Okta, which includes single sign-on (SSO) and multi-factor authentication (MFA), and it’s critical for them to bring their new SaaS applications into this environment.

If you want your product to appeal to the greatest number of potential buyers, you need to support ALL the identity platforms they may be using. And Identity-platform-based SSO isn’t the only log-in scenario potential customers may demand. To meet the needs of their customer bases, many companies are now implementing a mix of strategies, including username/password, SSO, social login, and passwordless – and they will likely want to keep adding new strategies as they emerge. If you can’t support their needs – especially if your competition does – you risk lost sales.

So being able to support every log-in scenario – the Log-in Your Way imperative – has to be seen as a critical feature of every mature product. In fact, to maximize the interest in a new product, Log-in Your Way should be a foundational capability of the minimum viable product (MVP) you use to engage your potential audience. So there’s no decision around “if” you will support all identity platforms and what the timeline should be for that support. The only question is “how” you can support them from Day 1. 

A classic choice: Build the connections yourself? Is there a No-Code Buy option?

[Learn more...](https://www.datawiza.com/blog/industry/b2b-saas-sso-build-vs-buy/)
Cache in asynchronous Python applications
Tags: python
Published: 2022-04-21 20:06:13

---
title: Cache in asynchronous Python applications
published: true
description: Let’s talk about caching techniques in asynchronous Python applications and try to implement it on our own.
tags: python
---
Modern Internet would be impossible without caching. It is present literally everywhere in the web app: browser keeps its own cache to speed up page loading, CDN helps to serve static files faster, databases use buffer cache to optimize i/o operations on high rate queries. And applications are no exception. Unfortunately, most applications don’t use caching as much as they could. This is because developers typically use caching as a last resort to speed up a slow application. Caching also adds some overhead to an application: keeping the cache consistent and invalidate it at the right time is not an easy task.

In the article, we will talk about caching techniques in asynchronous Python applications. First, we’ll try to implement it on our own and then will take a look at third-party libraries.

Why asynchronous python, exactly? Regular python already has a lot of production-ready third-party libraries. Also, async python gives us some interesting possibilities, for example, we can run multiple coroutines to manage the cache.

Learn more: https://medium.com/the-pandadoc-tech-blog/cache-in-asynchronous-python-applications-aa83157af712
Paracetamol.js💊| #105: Explica este código JavaScript
Tags: javascript, webdev, spanish, beginners
Published: 2022-04-21 19:49:03

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Intermedio</mark></center>

```js
const getPerro = ({ id=0, datos:{nombre, cola, edad} = {nombre:"SN", cola:true, edad:0} } = {} ) => {
  return {id, nombre, cola, edad}
}

const perro = {
  id: 5,
  datos: {
    nombre: "Boby",
    cola: true,
    edad: 2
  }
}

console.log(getPerro())
```

A. `{ cola:true, edad:2, id:5, nombre:"Boby"}`
B. `{ cola:true, edad:0, id:0, nombre:"SN"}`
C. `Syntax Error`
D. `Reference Error`

Respuesta en el primer comentario.

---
Maximum Non-Adjacent Tree Sum
Tags: programming, algorithms, cpp, 100daysofcode
Published: 2022-04-21 19:33:37

# Description

Given a binary tree `root`, return the maximum sum of the integers that can be obtained given no two integers can be adjacent parent to child.

**Constraints:** 

- `n ≤ 100,000` where `n` is the number of nodes in `root`

## Example 1

### Input

```
root = [1, [4, [3, null, null], [2, null, null]], [5, null, null]]
```

![Untitled](https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5f1c5c80-6267-4336-99a0-0fdcfd1279de/Untitled.png)

### Output

```
10
```

### **Explanation**

```
We can pick 3, 2 and 5. Note if we picked 4, we wouldn't be able to pick 3 and 2 since they are adjacent.
```

---

# Intuition

dfs + dp

# Implementation

```cpp
/**
 * class Tree {
 *     public:
 *         int val;
 *         Tree *left;
 *         Tree *right;
 * };
 */

pair<int, int> dfs(Tree* node) {
    if (!node) return make_pair(0, 0);
    auto [leftWith, leftWithout] = dfs(node->left);
    auto [rightWith, rightWithout] = dfs(node->right);

    int withRoot = leftWithout + rightWithout + node->val;
    int withoutRoot = max(leftWith, leftWithout) + max(rightWith, rightWithout);

    return make_pair(withRoot, withoutRoot);
}
int solve(Tree* root) {
    auto [with, without] = dfs(root);
    return max(with, without);
}
```

## Time Complexity

- Time: O(n)
- Space: O(logn)
Mentoria para iniciantes em programação
Tags: javascript, webdev, beginners, programming
Published: 2022-04-21 18:05:46

Durante um tempo já venho planejando fazer esse projeto, neste momento quero anunciar que oficialmente abre o formulário para se inscrevem para primeira turma de mentoria comigo.

A ideia por trás desse projeto e ajudar os devs que estão no início do processo de conhecimento ou não tem nenhum conhecimento na área eu irei pegar cerca de 5 ou 10 pessoas e criar uma turma e atendê-los de modo particular com atividades em grupos, também irei trabalhar com métodos 1:1 o qual eu irei trabalhar cada um individualmente para alcançar o foco desejado.

Muitos desenvolvedores iniciantes não avançam na carreira por insegurança algumas bem específicas devido a forma de ensino errada, essa mentoria além desse processo também irei ministrar alguns mini cursos durante mas de forma dinâmica dependendo da necessidade do grupo .

A detalhe e totalmente gratuito :), se caso você se interessou basta preencher este formulário e aguardar que irei entrar em contato e jaja irei disponibilizar para um bate papo 1:1

[Clique aqui para preencher](https://docs.google.com/forms/d/e/1FAIpQLSe-OicIC8gYFFN4O51SJLP06fvtTawWTHiM08XlfK8HPNWrgw/viewform?usp=sf_link)
#GitHubCoPilot 🤖 – Also writes jokes ! 😁
Tags: englishpost, githubcopilot, joke
Published: 2022-04-27 17:08:25

---
title: #GitHubCoPilot 🤖 – Also writes jokes ! 😁
published: true
date: 2022-04-21 18:59:15 UTC
tags: EnglishPost,EnglishPost,GitHubCopilot,joke
canonical_url: 
---

Hi !

Yesterday, I was sharing my GitHub CoPilot experience, and someone in the audience asked:

### Can CoPilot write a joke?

I didn’t want to test this live, you never know the output of an AI. However, today I created a simple text file, and I had some 😁😁😁 thanks to CoPilot.

![](https://brunocapuano.files.wordpress.com/2022/04/2022-04-21-copilot-knock-knock-joke-01.gif?w=1024)

What do you think ? And remember, CoPilot was trained using public code, there must be some knock knock jokes in those repositories !

And, if you want to take a look at the full series of my experiences using CoPilot with Python, C++, C#, JavaScript, TypeScript and Markdown, check this post:

### [New sessions about learning #JavaScript and #TypeScript with #GitHubCopilot 🤖](https://dev.to/azure/new-sessions-about-learning-javascript-and-typescript-with-githubcopilot-1egk)

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

* * *
Why You Can't Outsource and Automate SEO
Tags: seo
Published: 2022-04-21 18:49:22

So this title might be a little misleading...because in reality you CAN [outsource your SEO to an agency](https://tuffgrowth.com/seo/), and you CAN automate some parts of your SEO efforts. 

However, I'm fairly certain that the people/companies/websites that do their own SEO and content marketing will be more successful than those that try to automate and outsource it.

## Why You Can't Automate Your SEO
This is pretty simple. SEO is about providing the _best_ content for the people who are looking for it. You need to answer users' questions better than every other website out there.

If you want to standout, you need to provide new insights, different opinions, and thought leadership. AI can't do this. AI will just take all of the content that already exists and spin it to sound different. Your industry experience is your most valuable asset when it comes to SEO.
Newbie Career Catch 22
Tags: programming, webdev, career, java
Published: 2022-04-21 18:36:09

I've been coding in my spare time now for approx two years. There are times during those two years where I've spent 6 months not even thinking about code which was more down to pandemic related depression and scattiness.

In the times I have been coding, I've been very much in love with everything I look at. I'm like a less successful Pete Davidson. I love JavaScript, I love React, I love CSS and I love Java. I love learning about everything besides databases.

The problem this has created, is that I've not really retained much. I go from tutorial to tutorial, Udemy course to Udemy course (most are never completed), and after two years, I still dont feel like I would be competent doing this as a job. 

This is a bit of a catch 22 because I really feel like I need to be doing this full time to get my teeth into something. To really learn how commercial applications are built and the standards and practises used. I've had a couple of interviews this year and each time it makes me feel like I'm just not ready, and on the same note I believe that its exactly what I need to help me get started.

So along side my dissertation project, I'm toying with the idea of a portfolio site. I am busy with work (DevOps) and with Uni, so a portfolio site on the side was be expensive time wise. It would be great to hear from people who have gone down this route, was it useful? Did it help demonstrate your skills to others?

Any other feedback people can provide would be very greatly appreciated.
why you shouldn't upgrade your skills so fast..
Tags: devjournal, webdev, codenewbie, beginners
Published: 2022-04-21 18:34:06

If you've started your dev journey already, you have probably realized by now how fast this market grows.
This means everything is fairly "new" and this would cause everyone to tell you that you should be learning how to use that new software that just released because "you'd be ahead of the crowd". - this is partially true.
Although learning new things is a good way to get ahead of everyone else, you shouldn't allow this to topple your already set goals and pause everything else because "you'd be ahead". - first of all, if you're not learning what many people already know, which is that language or technology you're learning right now, you're still going to be behind.

So, focus on what you have at hand, and when you get really good at it, you're not only going to have time to work on new things, but also have better methods and an easier time working on it.
Unable to connect Zookeeper in gke cluster
Published: 2022-04-21 17:18:14

I am getting the below error while deploying the Apache Zookeeper bitnami charts
To connect to your ZooKeeper server run the following commands:
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=zookeeper,app.kubernetes.io/instance=zookeeper,app.kubernetes.io/component=zookeeper" -o jsonpath="{.items[0].metadata.name}")
kubectl exec -it $POD_NAME -- zkCli.sh

**error:**
error: error executing jsonpath "{.items[0].metadata.name}": Error executing template: array index out of bounds: index 0, length 0. Printing more information for debugging the template: template was: {.items[0].metadata.name} object given to jsonpath engine was: map[string]interface {}{"apiVersion":"v1", "items":[]interface {}{}, "kind":"List", "metadata":map[string]interface {}{"resourceVersion":"", "selfLink":""}}
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/blnx3tz83l0qzydf6yz4.JPG)
error: pod, type/name or --filename must be specified

Kindly help me in this for my running project.
Golang: generated code + version control
Tags: discuss, go
Published: 2022-04-21 18:14:58

I realized that Golang communities seem to have a very different opinion on this topic than other languages. 

I understand that there are pros and cons on checking in generated code to the repositories. In golang specifically, that will make repos more go-gettable. However, I did see how generated code being version controlled can cause confusion and lead to problematic situations.

I am genuinely curious about your thoughts: 

**Would you check in source code generated by a generator into the repositories and why?**
Shallow Copy vs Deep Copy in Javascript
Tags: javascript
Published: 2022-04-21 17:13:07

Copying objects in javasceript to manipulate  is common best practice.

✅ When you copy javascript objects or arrays keep in mind that only the outer properties are actually copied while the nested properties inside them only get referenced.

javascript default copy mode is shallow copy, to save on memory. But in the same time introduce a weird behavior.

💥When you try to change a property of a shallow copied object the change will effect the original object, that causes nasty bugs that get you stuck on for hours.


![Shallow Copy vs Deep Copy in Javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmm6t4cw04804jeoymxh.png)
Are you exposing secrets in your react app?
Tags: react, webdev, beginners
Published: 2022-04-21 17:42:05

When creating a react project you may have some variables you wouldn't want to expose and commit to github. You perhaps have used an environment variables. Excellent job! That's good practise.

However, Because react apps create static client side JS, HTML and CSS files the environment variables such as `REACT_APP_SECRET_API_KEY` will be `process.env.REACT_APP_SECRET_API_KEY` in your hosted repository but in the actual running app anyone can view the source code and find the API key. Uh-oh. Disaster. Check now if you want. Go to your site and if you are in chrome open dev tools, go to the sources tab and search for your env variable in a JS file. You may find that you are exposing those secrets. 

![Panic Gif](https://media.giphy.com/media/HUkOv6BNWc1HO/giphy.gif)

Please remain calm. There is a solution. I felt the same when I became aware of this. 

When you added `REACT_APP` at the beginning you were "protecting" yourself from accidently revealing other secrets on the server if you set a similar named environment variable. Well that worked...

## So what is the solution? 
![Go on gif](https://media.giphy.com/media/l2YWxte7sJB2XuE8M/giphy.gif)

Don't store secrets in your react app. That's probably a first rule. If you store any API keys, access keys or anything like that, please be careful when storing in you react app because all the code is exposed client side. 

React is simply a HTML file running a big JS file with all your js code in. You can also set `GENERATE_SOURCEMAP=false` which will hide your source code but I want you to be extra safe.  

*But how could you do it safely?* 
You can store the keys on the server side. Which means you'll have to create a small express server which can use `process.env` and then in your react code you can call an API which is on your server rather than using and exposing an API key. The youtube channel 'Code with Ania Kubów' does an excellent job at explaining how to do this (see the notes at the bottom)

By doing it this way any API calls can be to your local server at `mywebsite.com/api/endpoint`. This endpoint can then call your actual api endpoint with the API key and any other secrets appended on the end or included in the body. This request will be hidden as it's on the backend rather than running in the client.   

Thank you so much for reading this article. If you have any comments or feedback please leave a comment or like this article. It means a lot. Thank you. 

That's all folks.

![Gif of congratulations](https://media.giphy.com/media/3aRilV33fWkUw/giphy.gif)

### Extra Resources
[Code with Ania Kubów Video on storing API keys in React](https://www.youtube.com/watch?v=FcwfjMebjTU)

[React documentation about custom environment variables](https://create-react-app.dev/docs/adding-custom-environment-variables/)
Day-71 Training at ryas
Tags: javascript, webdev, beginners, programming
Published: 2022-04-21 17:41:21

Date:21/04/2022
Day:Thursday

Today, I started at about 10:30 am and as I was in progress to complete my java script course so, I started with the left over task I started with working with array modules as firstly the instructor started with simple array methods in this it included simple method declared and using map we declared the array with predefined values and after this I started with the new method in this basically we manipulated the arrays as we get result of console.log(array-1) as declared array so, as the result we get the number of elements of array-1 so, this was basically for having the count of elements of array after this I started with for each loop The JavaScript forEach method is one of the several ways to loop through arrays. Each method has different features, and it is up to you, depending on what you're doing, to decide which one to use The forEach method passes a callback function for each element of an array together with the following parameters Current Value ( The value of the current array element),Index (The current element's index number),Array (The array object to which the current element belongs) after this I started with for each with Map it is used with forEach(function(value, key, map) this syntax and after this I worked with the project named as auction system so, this way my day ended up and I got to learn many new things.