teleren/devto huggingface dataset:
Communication in Tech
Tags: programming, career, community
Published: 2023-02-26 22:33:04

Communication is important, everyone will tell you that, every position will require it in the postings… but how important is it really? And, how are we communicating exactly?

Today I wanted to make something different, so I did this:

[https://forms.gle/W51Pek7WZGArC8Xs7](https://forms.gle/W51Pek7WZGArC8Xs7)

3 required questions, 3 optional ones, 3 minutes tops.

Share, subscribe, leave a like and all that stuff then wait for the follow-up, two weeks from now in a new post.

---

Again: [https://forms.gle/W51Pek7WZGArC8Xs7](https://forms.gle/W51Pek7WZGArC8Xs7)

I’ll tell you all about why I chose the questions I did and what we could learn from the responses I did.

I’ll also release all the data, so you can check all the answers and come to your own insights.

---

[https://forms.gle/W51Pek7WZGArC8Xs7](https://forms.gle/W51Pek7WZGArC8Xs7)
Managing multiple AWS Accounts and Environments with CDK.
Tags: aws, cdk, typescript
Published: 2023-02-26 22:19:40

This is just a small post that will be followed up later with pipeline examples.

We do not want our CDK applications to know much about how and where they are deployed, instead it is all defined in a small private npm package that contains all account information.

Here is how we have it, so we can import it in multiple projects and pipelines.

```typescript
import { Annotations, Stack } from 'aws-cdk-lib';
import { Construct } from 'constructs';

export const DeploymentRegion = {
  EU_NORTH_1: 'eu-north-1',
  EU_CENTRAL_1: 'eu-central-1',
};

export const ApplicationStack = {
  DEV: 'dev',
  TEST: 'test',
  QA: 'qa',
  PRODUCTION: 'production',
};

type ApplicationStackType = (typeof ApplicationStack)[keyof typeof ApplicationStack];
type DeploymentRegionType = (typeof DeploymentRegion)[keyof typeof DeploymentRegion];

export class AwsAccount {
  private static accounts: AwsAccount[] = [];

  // -- Applications --
  // - Production -
  static readonly APP1_PRODUCTION = new AwsAccount('APP1_Production', '100000000001', ApplicationStack.PRODUCTION, [DeploymentRegion.EU_NORTH_1, DeploymentRegion.EU_CENTRAL_1], true);

  // - QA -
  static readonly APP1_QA = new AwsAccount('APP1_QA', '100000000002', ApplicationStack.QA, [DeploymentRegion.EU_NORTH_1, DeploymentRegion.EU_CENTRAL_1], true,);

  // - Test -
  static readonly APP1_TEST = new AwsAccount('APP1_Test', '100000000003', ApplicationStack.TEST);

  // - Dev -
  static readonly APP1_DEV = new AwsAccount('APP1_Dev', '100000000004', ApplicationStack.TEST);
  static readonly APP2_DEV = new AwsAccount('APP2_Dev', '200000000001', ApplicationStack.TEST);

  // -- Aws Core --
  static readonly AUDIT = new AwsAccount('Audit', '900000000010', ApplicationStack.PRODUCTION);
  static readonly LOG_ARCHIVE = new AwsAccount('Log archive', '900000000011', ApplicationStack.PRODUCTION);

  // -- Infrastructure --
  static readonly OPS = new AwsAccount('OPS', '000000000001', ApplicationStack.PRODUCTION);

  private constructor(
    public readonly name: string,
    public readonly accountId: string,
    public readonly stack: ApplicationStackType,
    public readonly deploymentRegions: DeploymentRegionType[] = [DeploymentRegion.EU_NORTH_1],
    public readonly approveBeforeDeploy: boolean = false,
  ) {
    AwsAccount.accounts.push(this);
  }

  static fromScope(scope?: Construct): AwsAccount | undefined {
    if (!scope) {
      return undefined;
    }
    const accountNumber = Stack.of(scope).account;
    const account = this.accounts.find((acc) => acc.accountId === accountNumber);
    if (account) return account;
    Annotations.of(scope).addError(`Couldn't find account [${account}] in AwsAccount array!`);
    return undefined;
  }
}
```
In next post I will show you how we utilize this in pipelines to make life esier.
Day 1 of learning
Published: 2023-02-26 20:56:35

Today, I started my first step in my new bootcamp and opened up my pre-work todo list. One of the modules led me to create a profile on this platform and to document something that I learned about today. After I created my profile, I stumbled across a post from "Code of Relevancy" called "All about Promises in JavaScript". I read through this blog and it introduced me to the concept of promises within JS. I had heard of promises before and knew that they had something to do with conditions but no real understanding. Before I was not really sure how they differed from an "if then" statement. I think I know a little more now in that these allow you to work with asynchronous programming (which I still don't fully understand) and makes it easy to read and write code for those types of operations. If I had to take my best guess at asynchronous and promises, I would say that it is like if then statements but that can be executed out of order or at the same time? I am sure it will make more sense as I play with them. -- Watched a quick video since writing the above info. I am now thinking that asynchronous programming allows you to execute code on the side and let you program continue to run while it waits. Thinking maybe an example would be how your browser will let you continue browsing even while you are downloading something. Instead of being in a frozen state waiting for the download to finish like a windows update instillation, you can continue to use your browser while what ever you downloaded does its thing in the background. If anyone happens across this, feel free to let me know!
Geo Assist - A Spatial Engine
Tags: linodehackathon
Published: 2023-02-26 21:34:31

## What I built
Geo Assist is an opensource spatial library that allows you to manage spatial data in-memory.

After working for multiple years with applications of huge scale, I tested this approach in multiple projects that served ~43m requests per day to customers, and this worked like a charm. Hence I built a generic opensource project for everyone with easy consumption.

### Category Submission:
Integration Innovators

### App Link
[GeoAssist - https://github.com/thegeekyasian/geo-assist](https://github.com/thegeekyasian/geo-assist)

### Screenshots

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

### Description
 

### Link to Source Code


### Permissive License
Apache

## Background
(What made you decide to build this particular app? What inspired you?)

I have worked on different applications that requires finding nearby objects based on geo-coordinates. Every time we faced an issue, we ended up doing minor improvements to our databases. Yet there was another incident being built for us.


### How I built it
(How did you utilize Linode? Did you learn something new along the way? Pick up a new skill?)


### Additional Resources/Info
Week 7 Hw
Published: 2023-02-26 21:18:41

# What is confusing about platforms?

* I think the confusing part about platforms is that there are so many options to choose from. When having so many options to choose from being thrown into a random platform to work in is hard for a beginner. You have to do a lot of research for code that works on that platform. Then when you switch to a different platform that may not run the right way.

# How could web components and VanillaJS standards be taught in a way that is more approachable?

* I would say starting with just the fundamentals would be a good way to approach it. If you learn the fundamentals of VanillaJS from the beginning and not throw yourself into a big project without an understanding of what you are working with it is difficult. So just focusing on VanillaJS makes it easier to then approach web components as well.

# What did you find easiest to work with on 1st stab? (You don't have to say web components, this is an honest take, if it was Vue cool, but justify it)
* I thought the easiest to work with was angular. Just for the sole reason it had a lot of similarities in my previous knowledge of coding. I also think it was easier to maneuver and put my code into certain places.

# Think back on the tooling. What parts were confusing? What clicked with you immediately?
* I think the part that clicked most was the css it was easy to create and had a lot of aspects that I could understand. What was hard for me at first was understanding how some things were constructed. For example, it took me a minute to understand what a div was and why we used it. 

# What additional readings did you have to do in order to make sense of things.
* I had to do a lot of additional reading in order to make sense of things. I've watched youtube videos, read different articles, and I read over W3schools a lot. Most of the things that I didn't understand, which was a decent amount, I had to look up.
How do I get twitter developer improved access?
Tags: beginners, productivity
Published: 2023-02-26 21:17:41

Use case overview required, practice for get admission to thru your developer account, three Apps/environments (1 Project) up to 2M Tweets per month on [sublimation](http://printerlake.com/best-sublimation-printer-for-small-business/) statistics endpoints. Enterprise: Use case overview required, practice for Enterprise access, 3+ Apps/environments (1 Project). Access starts at 10M Tweets per month
Backend Development explained in 2 minutes
Tags: backend, development, serverless
Published: 2023-02-26 20:54:29


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rk0ylmvtnocume191c1s.png)
Websites and applications are common these days. However, it's important to understand that behind the cool design and features lies the technology that makes them work. Every website and application has a hidden backend that is responsible for its functionality, such as processing data, managing databases, and handling security.

In this blog article, I will explain backend development for beginners, simplifying the concepts and making it easier to understand.

**What is Backend Development?**

Back-end development is also known as “sever-side” development.

Backend development is the process of building and maintaining the server-side of a web application. This includes the server, the database, and the APIs that allow communication between the frontend and backend of the application.

_The backend is responsible for handling tasks such as processing user data, managing databases, and handling security and authentication. It is essentially the engine that powers the web application._

Backend development uses a variety of computer languages and frameworks, including Java, Python, Ruby on Rails, and Node.js. Each language has its advantages and disadvantages, and the choice of language is influenced by the project's particular specifications.

Model-view-controller (MVC) architecture, which divides the application into three key parts: the model, the view, and the controller, is typically used to build a web application's server-side. The controller is in charge of handling user requests and updating the model and view as necessary. The model is in charge of managing data, the view is in charge of displaying data to the user.

To store and handle data, backend developers also employ databases. A relational database, like MySQL or PostgreSQL, is the most typical type of database used in backend development. Because of their scalability and flexibility, NoSQL databases like MongoDB and Cassandra are also gaining popularity.

Backend developers use APIs to communicate with the frontend of the web application (Application Programming Interfaces). APIs are a set of guidelines and standards that enable interaction between various software programs.

_Security and authentication are also important aspects of backend development. Backend developers must ensure that the application is secure and that user data is protected. They use various techniques, such as encryption and authentication, to ensure that the application is secure and that user data is safe._

**In summary,** backend development is the process of creating and maintaining a web application's server side. Using APIs, it entails managing data, responding to user queries, and interacting with the application's front end.

originally published @ [link](https://ehuntober.hashnode.dev/backend-development-explained-in-2-minutes)
A New Web Developer's POV on the Modern Web
Published: 2023-02-26 20:37:40

## What is confusing about platforms?
Speaking from the perspective of someone new to the bells and whistles of the modern web, platforms took some getting used to. I think the main issue that I and many others faced while moving over to platforms was the "all JS" methodology. From my previous experiences working with web programming, it was common to have three separate documents all linked to each other with HTML, CSS, and JS, however, that methodology as stated above is primitive in comparison. Furthermore, I believe understanding how the "all JS" methodology functions and works together also take time to understand. Not to mention, some platforms use different syntaxes that differentiate from one another. 

## How could web components and VanillaJS standards be taught in a way that is more approachable?
The first thing that I would consider in making web components and VanillaJS more approachable is breaking it down into sections and having simplicity. Looking at concepts that are familiar with basic web concepts but different can be beneficial. From my own experience, I work well with seeing examples of how something is done, so having simple examples that build upon each other would also be of aid. 

## What did you find easiest to work with on 1st stab? (You don't have to say web components, this is an honest take, if it was Vue cool, but justify it)
Being able to get functional applications on the first try wasn't difficult at all, however, it wasn’t delivered the way a typical application would be on the web. My applications were being delivered through 'index.html' instead of being delivered via 'insert-app-name.js'.

## Think back on the tooling. What parts were confusing? What clicked with you immediately?
Using the CLI was pretty native to me and understanding how to install software using the CLI. The confusing part at first was understanding how everything worked together to create an application (vs code, GitHub, lit, etc.).

## What additional readings did you have to do in order to make sense of things.
Youtube is a good resource to get a visual on how things take place in-action instead of just reading an article. I preferred using Youtube as I learn more easily by watching than doing.
ChatGPT在数学和逻辑方面表现不佳
Tags: cn, blog, chatgpt, math
Published: 2023-02-26 20:24:19

一题简单的数学逻辑题: 一口井10米深，一只青蛙在井底，它白天往上爬3米，晚上往下掉2米，请问青蛙几天能爬出去？

<a href="https://justyy.com/archives/61190" title="浅谈ChatGPT对用户生成内容 (UGC)的影响">ChatGPT</a> 不在行这种题，简直就是糊说八道 睁眼睛说瞎话。现在的人工智能基本上是基于大数据+机器学习也就是模式识别 Pattern Matching, 海量的数据进行训练，如果数据本身就有问题（比如错误或者有偏好Bias），那么通过学习得到的答案就有可能有问题。

这题的正确答案是8天，青蛙7天爬7米，第8天的时候往上3米就上了10米了。

[caption id="attachment_61307" align="alignnone" width="836"]<a href="https://justyy.com/wp-content/uploads/2023/02/chatgpt-weak-at-logic-puzzle.jpg"><img src="https://justyy.com/wp-content/uploads/2023/02/chatgpt-weak-at-logic-puzzle.jpg" alt="ChatGPT 对数学和逻辑题不是很在行" width="836" height="1094" class="size-full wp-image-61307" /></a> ChatGPT 对数学和逻辑题不是很在行[/caption]

<blockquote>
**ChatGPT:

这道题可以用数学模型来解决。

设青蛙爬出井口需要x天，则：

第一天：青蛙爬了3米，距离井口还有 10 - 3 = 7 米。

第二天：青蛙爬了3米，距离井口还有 7 + 3 - 2 = 8 米。

第三天：青蛙爬了3米，距离井口还有 8 + 3 - 2 = 9 米。

第四天：青蛙爬了3米，距离井口还有 9 + 3 - 2 = 10 米。

青蛙在第四天爬出井口，因此答案为4天。

因为青蛙在第4天爬出井口，所以它需要爬4天。

**我:
不对，你再好好想想

**ChatGPT: 

非常抱歉，我的回答有误。在这个问题中，我们需要注意到<a href="https://justyy.com/archives/7243" title="兄弟俩在音乐会上钢琴合奏 Leap Frog (跳跃的青蛙)">青蛙</a>在晚上会下滑2米，这意味着它在每天晚上都会回到之前爬过的位置，也就是说，它需要在第二天重新爬起来，而不是从第一天的位置开始爬。

在这种情况下，我们可以通过以下方式来解决这个问题：

第一天：青蛙爬了3米，距离井口还有 10 - 3 = 7 米。

第二天：青蛙爬了3米，距离井口还有 7 + 3 - 2 = 8 米。

第三天：青蛙爬了3米，距离井口还有 8 + 3 - 2 = 9 米。

第四天：青蛙爬了3米，距离井口还有 9 + 3 - 2 = 10 米。

因为青蛙在第四天爬出井口，所以答案为4天。

因此，青蛙需要爬4天才能从井口爬出来。感谢您指出我的错误，希望这次的回答更加清晰明
</blockquote>

ChatGPT是一种自然语言处理技术，它可以帮助人们更好地理解和使用自然语言。它的主要特点是可以根据上下文生成准确的回复，并且可以学习新的语义和语法。尽管ChatGPT在处理自然语言方面表现不错，但是它在<a href="https://justyy.com/archives/46296" title="P站上讲数学微积分的张旭老师">数学</a>和逻辑方面表现不佳。

这是因为ChatGPT的核心技术是基于神经网络的，而神经网络本质上是一个非常弱化的技术，它无法处理复杂的数学问题和逻辑问题。神经网络只能处理大量已有数据中出现过的问题，而对于新出现的问题则无能为力。因此，ChatGPT在数学和逻辑方面表现不佳。

此外，ChatGPT也无法很好地处理一些具有抽象性、隐含性或异常性特征的问题。例如：“如何才能成功”这样一个问题就不能很好地由ChatGPT来回应。这是因为ChatGPT无法判断这样一个问题中所包含的含义；而当遇到这样一个具有隐含性特征的问题时，ChatGPT就会显得力不从心。

此外，ChatGPT也无法很好地应对一些异常情况。例如当用户使用不正常、不通顺、不正当或者充满歧义的语句来表达意思时，ChatGPT就会显得力不从心。这是因为它无法理解用户所使用的语句中所包含的意思和内容；而当遇到<a href="https://justyy.com/archives/6183" title="因为一个 try catch 好几天优秀点赞程序挂掉了我却以为是节点的问题">异常</a>情况时，ChatGPT就会显得力不从心。

总之，尽管ChatGPT在处理自然语言方面表现出众，但它在<a href="https://justyy.com/archives/31565" title="组合数学中卡塔兰数的动态规化求解方法">数学</a>和逻辑方面表现却并不十分出众。原因有三: 首先, ChatGPT依托神经网络技术, 其次, 对于一些具有抽象性、隐含性或异常性的问题, ChatGPT都无能为力; 最后, ChatGPT也无能为力处理一些具有异常性的问题. 由此可以看出, ChatGPT在数学和逻辑方面表现不佳.

ChatGPT 每次给的答案都不完全一样，因为并不是基于逻辑处理的，经过海量复杂的神经网络的训练，ChatGPT在Prompt Engineering这方面取得了不错的成就。

同样的问题，用英文问 (<a href="https://helloacm.com/how-chatgpt-solves-a-math-puzzle/" rel="noopener" target="_blank">How ChatGPT Solves a Math Puzzle?</a>)，ChatGPT的智商明显就强了一些，至少在指出错误的时候第二次给出的答案就比较靠近正确答案了。看来互联网上英文的资料还是最多，训练数据的质量要好过其它语言。

博客: [ChatGPT在数学和逻辑方面表现不佳](https://justyy.com/archives/61306)
JavaScript Tutorial Series: Arrow functions
Published: 2023-02-26 20:17:19

The `function` keyword is typically used to declare functions. 
In ES6, a new syntax for writing functions with a clearer and more readable structure was introduced which is called `arrow functions` . With this syntax You can write the same function in a shorter format by using arrow functions.

Let's look at an example.

This is the traditional way of declaring a function with the `function` keyword.

```JavaScript
function Multiply(a, b) {
  return a *b;
}

console.log(Multiply(2,3));//6

```
Let's take the same example but use an `arrow function`

```JavaScript
const multiply = (a,b) => { 
  return a *b;
}

console.log(multiply(2, 3)); //6
```
The above function can be shortened. We can remove the brackets and the `return` keyword if the function only has one statement and the statement returns a value like so: 

```JavaScript
const multiply = (a,b) => a*b;

console.log(multiply(2, 3)); //6
```
We've previously seen `arrow functions` in the [JavaScript Tutorial Series: Higher order functions](https://dev.to/fullstackjo/javascript-tutorial-series-higher-order-functions-507b) lesson. 
Using arrow functions as callback functions is a great idea due to their clear syntax, implicit return. They can make your code simpler to read and understandable, and lessen the likelihood of bugs and errors.
Stop using isset() in PHP - Try This Instead!
Tags: php, laravel
Published: 2023-02-26 20:17:09

If you're a PHP developer, chances are that you've come across the `isset()` function. It's a handy little function that checks whether a variable is set and not null. However, there's another function that you should consider using instead: `array_key_exists()`.

So why should you use `array_key_exists()` instead of `isset()`? The answer is simple: `isset()` also returns false even though the variable is set to NULL and won't throw an exception. This can cause unexpected behavior in your code and make it harder to debug.

Let's take a look at an example to illustrate this. Consider the following code:

```php
$data = array(
    'foo' => null,
    'bar' => 'baz'
);

if (isset($data['foo'])) {
    echo 'foo is set';
} else {
    echo 'foo is not set';
}
```

You might expect this code to output "foo is not set" because `$data['foo']` is set to `null`. However, it actually outputs "foo is set". This is because `isset()` returns false when a variable is set to `null`.

Now let's rewrite this code using `array_key_exists()`:

```php
$data = array(
    'foo' => null,
    'bar' => 'baz'
);

if (array_key_exists('foo', $data)) {
    echo 'foo is set';
} else {
    echo 'foo is not set';
}
```

This code correctly outputs "foo is set". `array_key_exists()` checks whether the specified key exists in the array, regardless of whether its value is `null`.

Using `array_key_exists()` instead of `isset()` can also make your code more readable. If you're checking whether a key exists in an array, it's clearer to use a function that's specifically designed for that purpose.

In conclusion, `array_key_exists()` is a more reliable and readable way to check whether a key exists in an array than `isset()`. Remember that `isset()` returns false even if a variable is set to `null`, which can cause unexpected behavior in your code. By using `array_key_exists()`, you can avoid this issue and make your code more readable at the same time.
Remove Duplicate Elements From An Array In JavaScript / TypeScript
Published: 2023-02-26 20:16:15

I realise it has been a minute since I have last posted anything and in an attempt to try and get myself posting again, I have a very quick tip to share with you all for removing duplicated elements from an array in JavaScript or TypeScript.

Check it out!

```ts
const duplicates = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5];

const dedupe = <T>(arr: T[]) => Array.from(new Set(arr));

const unique = dedupe(array);

console.log(unique) // [1, 2, 3, 4, 5]
```

That's it! How incredibly simple right?

Now because we have used generics, our unique array will be benefit from some lovely type inference!

What do you think?

Let me know if you have any quick and easy methods to achieve the above.

**NB.** Generics are unique to TypeScript if you are unaware. This means you would want to remove them if you are just using JavaScript.
Linking Github repositories
Tags: github, git
Published: 2023-02-26 19:39:37

## Git Submodules

Someone may come across a situation where they might want to link or associate two Github repositories. You may want to do  this, probably for referencing on something. You need to have your two repositories ready in Github, In this tutorial, I will not go to much details on handling advanced git commands.</br>
For both, one has the required submodule with you will put in the other that does not have it.
This is a picture of how the targeted repos

![@joe-jngigi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4znvdp1p30zk1gd75nhh.png)



>1. Navigate to the local git-repository that you want to add the git-submodule: In this case, I added `Python_Codebase` as a submodule to to the `lux_data_scince` repo. If you type `git submodule`, it will show you a few commands.

>2. To link the repos, use `git submodule add <add_your_target_url>`. This will clone your targeted URL into the new repo. After wards you can now push your changes to the main repository.

>3. `git clone <add_your_url> --recurssive` This will clone the Github repo _`lux_data_scince`_ that contains the submodules. If not the gitsubmodule you added are left behind

**.gitmodules** is a file that shows how it links to the repo, and you can use `tree` to view your repo tree

- Alternatively, you can setup `git config submodule.recursive true` This is if the incase of a pull/clone and you want to get all your modules

- You can used `git submodule update --init`  to download/update the repo submodules

>>The branches will not have any problems, and if you make any changes to the targeted repository, it will not affected your main repository.