teleren/devto huggingface dataset:
How to start Software Development career efficient
Tags: career, programming, productivity
Published: 2023-05-07 09:13:24

![Writing code is new reading](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/np123akaagkah9gz3v2m.jpg)

New engineers are often bombarded with information and advice, from pursuing expensive courses to taking up small projects or freelance work. However, the key to success in this field lies in a simple principle: 

> _gaining firsthand experience by building great products for customers at scale._

This is valid for several reasons:

**Accelerated learning:** Building great products from the start allows developers to learn and adapt quickly, accelerating their growth and understanding of software development.

**Real-world challenges:** Working on significant projects exposes developers to real-world problems, complexities, and scenarios that they may not encounter in courses or smaller projects.

**Collaboration:** Building great products often involves teamwork, which helps developers learn to collaborate, communicate effectively, and contribute to a shared goal.

**Customer focus:** Developers who prioritize creating valuable products will naturally develop a strong customer focus, learning to consider users' needs and desires when making decisions.

**Scalability:** Working on large-scale projects teaches developers how to build scalable solutions that can handle increasing user demands and adapt to changing requirements.

**Comprehensive skill development:** Building great products requires developers to acquire and apply a wide range of skills, including coding, testing, problem-solving, and project management. There is simplified version of getting all of this - [Game about software development](https://devmanager.carrd.co/)

**Efficient time management:** Focusing on creating valuable products helps developers avoid distractions and learn to allocate their time and resources effectively.

**Portfolio building:** By working on high-quality, large-scale projects, developers can create a strong portfolio showcasing their skills and accomplishments, which can help them secure future opportunities.

**Industry credibility:** Developers who consistently deliver valuable products will gain credibility and respect within the industry, leading to networking and collaboration opportunities with other professionals.

**Adaptability:** The experience gained from building great products helps developers adapt to new technologies, methodologies, and industry trends, making them more resilient and adaptable in a constantly changing field.

_Follow me on [Twitter for more details](https://twitter.com/snowman647)_
11 Discord Game Dev Communities for Gamers
Tags: beginners, gamedev, discord, community
Published: 2023-05-07 08:48:33

Are you looking for even more GameDev communities?

We’ve got you covered. We’re talking about top Discord GameDev communities. Discord is so big that we wrote an entire blog for the best game development communities.

Here is the list…


## 1. Brackeys

First up, we’ve got Brackeys. Brackeys is originally a game dev Youtube channel founded by Asbjørn Thirslund. The first video uploaded by Brackeys dates back to December 2012. It’s the first of a long-running series of Unity video tutorials with millions of accumulated views.

During eight years, Asbjørn’s vision grew from a homemade tutorial channel to a full-fledged company with an incredibly passionate team.

## 2. Game Dev League

This community has been around for more than seven years now. With approximately 20,000 active members and a net base of over 70,,000 people, Game Dev League is one of the most significant game dev communities out there. Additionally, it is one of the most complete, offering a place where developers can explore various topics related to their interests and careers.

## 3. Game Dev Network

Our next entry is Game Dev Network, a booming game dev Discord filled with friendly devs. It was founded in 2017 by indie dev Liam Sorta, parallel to his day job at Unity Technologies and his part-time indie studio, now known as Acureus.

Liam Sorta also released his third Steam game, Cave Guessers, which launched in October 2022. His community Game Dev Network has more than 35,000 members as of this writing.

## 4. Godot

The free and [open-source game engine](https://thelastwords.wiki/open-source-game-engines/) that is winning the hearts of more and more devs each day. Of course, a big community-driven project like Godot needs a place to host such a community. The Godot Discord is an active and thriving server with over 50 thousand subscribed members and countless ongoing conversations and interactions.

---

Continue Reading......

This Blog is Originally Published at **The Last Words**

Read More from Here: [11 Discord Game Dev Communities](https://thelastwords.wiki/discord-gamedev-communities/)
[Storybook GPT] Design and implement application UI
Tags: webdev, githubhack23, tailwindcss, uidesign
Published: 2023-05-07 08:48:23

The last thing that is has to be done is the UI, it is important to ensure that it has to be intuitive and easy to use. With those things in mind and to gather inspiration and ideas, I started looking for some design references on Dibbble and Behance. After a few hours tinkering in Figma, this is the design I came up with:

![Application UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aqv4vrkm22iuik6qroqb.png)

As I mentioned before, on the left we have two inputs where the use can add the **OpenAI API Key** and the **React Component** that will be converted. On the right we have one big text area input to show the user the **Storybook story**. This input is read-only and allows the user to copy the content by clicking on it.

To make it mode secure I also added form validation for the two input fields:

![Form validations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hv1g4a1dr4y7n74nncba.png)

After completing some code refactoring, the application is ready to be deployed on Vercel to be a part of the vastness of the internet.

![Application](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ofv3pvamta0sfpuq26u5.gif)
StepFunctions Approval Action with One-Time HTML Page Confirmation
Tags: aws, stepfunctions
Published: 2023-05-07 08:19:06

In this blog post, I will discuss an improved architecture for approval actions using AWS StepFunctions, featuring a one-time HTML page for confirmation. This enhanced design aims to make the approval process more efficient and user-friendly.


## Motivation

### Previous version

In my previous blog post, [(Lambda Function URLs for Approval Actions in StepFunctions)](https://medium.com/@shimo164/lambda-function-urls-for-approval-actions-in-stepfunctions-eeea1eba15e2), I explained how using Lambda function URLs can eliminate the need for API Gateway.


![Previous architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg9xpxrj6yywerhjjwrs.png)

This works well. But I'm thinking of making it more useful. For example, the email notification contained long URLs (like below), and users could accidentally approve or reject requests with a single click, without any confirmation.

![Email to request approval or reject](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2t4qc08rkoyyridj9b0a.png)

### Newer version

This time I added some resources to confirm with multiple steps. Here are the specifications of the new architecture.

![Newer Architecture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grr42qxhsb6n3s5clk04.png)

1. First Lambda Function
  - Sends an email to the user containing a URL to a one-time HTML page for approval actions.
  - Generates a unique HTML page for each approval action, accessible via S3 static hosting.

2. User Interaction
  - Users access the HTML page and click either the "Approve" or "Reject" button, triggering the second Lambda function.

3. Second Lambda Function
  - Reports the approval result to the StepFunctions.
  - Deletes the HTML page.


## Workflow

1. Start State Machine: When you start a state machine, an email is sent to the user.

### Check email
![Email](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0obeb0dn3ra6ypbfct3s.png)

2. Access Approval Page: By clicking the link in the email, users are directed to the one-time HTML page containing "Approve" and "Reject" buttons.

### Access approval page
![Appearance of approval or reject](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xpdkaroh792tzdo38664.png)

3. Confirmation: After clicking the "Approve" button, a confirmation message box appears.

### Confirmation
![Confirmation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xplp465cpt6ntal7aj3e.png)

By selecting OK, you can finally approve!

## Summary

In this blog post, I introduced an improved approval action architecture using AWS StepFunctions. By incorporating a one-time HTML page for confirmation, users can avoid making accidental decisions and benefit from a more streamlined approval process.


Note: Please refer to [my repository for the CDK code examples](https://github.com/shimo164/demos/tree/main/cdk-approval-multi-steps) to explore this architecture further.
How to extract data from Google maps using Golang
Tags: scraping, googlemapscrawler, datascraping, marketing
Published: 2024-06-19 20:28:53

---
title: How to extract data from Google maps using Golang
published: true
date: 2023-05-07 07:26:23 UTC
tags: Scraping,googlemapscrawler,datascraping,marketing
canonical_url: https://blog.gkomninos.com/how-to-extract-data-from-google-maps-using-golang
---

This post introduces a command-line application that allows you to extract data from Google Maps. If you want to extract to collect some data for local businesses using Google Maps then this tool is for you. The tools retrieve and export to a CSV fil...
What's Your Favorite IT Quote or Rule? And How Does It Influence Your Work?
Tags: discuss
Published: 2023-05-07 07:00:00

Quotes and rules can be great sources of inspiration and guidance in the world of IT. Some of our favorites here at DEV are the Agile Manifesto and this quote by Grace Hopper:

> 
The most dangerous phrase in the language is 'we've always done it this way. 

Share your favorite quotes and rules and discuss how they've helped shape your approach to IT and technology. 

---

Follow the DEVteam for more awesome discussions and online camaraderie!

{% embed [https://dev.to/d](https://dev.to/t/codenewbie)evteam %}
Senior Front-End Developers Share Advice for Juniors: What Would You Add?
Tags: beginners, codenewbie
Published: 2023-05-07 07:00:00

Dear senior front-end developers,

You've been in the industry for a while, and you've gained a lot of experience and knowledge along the way. What advice would you give to junior developers who are just starting out? How can they improve their skills and become better developers? What are some common mistakes you see junior developers make, and how can they avoid them? 

Share your thoughts and insights to help the next generation of front-end developers succeed.

---

Follow the DEVteam for more awesome discussions and online camaraderie!

{% embed [https://dev.to/d](https://dev.to/t/codenewbie)evteam %}
Truncate a String
Tags: webdev, javascript, algorithms, beginners
Published: 2023-05-07 06:28:35


### DESCRIPTION:

Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a ... ending.

### Examples

```js
truncateString("Peter Piper picked a peck of pickled peppers", 11)
 //should return the string `Peter Piper....`

truncateString("A-tisket a-tasket A green and yellow basket",
 "A-tisket a-tasket A green and yellow basket".length)
//should return `A-tisket a-tasket A green and yellow basket.`
```

### My approach for solving this problem:


> - check the str length.
> - if the length is equal to num `return str`
> - if not return sliced str with num length

### My solution:

```js
function truncateString(str, num) {
  let slicedstr;

  if(str.length > num){
    slicedstr = str.slice(0,num)+"..."
  }else{
    slicedstr = str
  }

  return slicedstr;
}

truncateString("A-tisket a-tasket A green and yellow basket", 8)
```

>  Any tips or edit are most welcome. share it with me on the comments. Thanks for being here!

### Follow _Muhmmad Awd_ on 
<a href="https://www.linkedin.com/in/muhmmadawd"><img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white"/></a>

<a href="https://github.com/MuhmmadAwd"><img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white"/></a>

If you have any questions or feedback, please feel free to contact me at 
<a href="muhmmad.awd@gmail.com"><img src="https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white"/></a>
Weekly Challenge 215
Tags: perl, python, theweeklychallenge
Published: 2023-05-07 06:16:29

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-215/), [My solution](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-215/sgreen)

## Odd one Out

### Task

You are given a list of words (alphabetic characters only) of same size.

Write a script to remove all words not sorted alphabetically and print the number of words in the list that are not alphabetically sorted.

### My solution

I would have thought that by definition the first world would have being defined as sorted alphabetically. However, the second example shows that this is not the case. So I have a bit of code that will return the length of the list if the first word is not the first alphabetically.

I then set the `current_word` variable to the first word, and the `unsorted_words` variable to 0. I loop through the remaining words, and update the `current_word` variable if it is greater than the current `current_word` or add one to `unsorted_words` if it isn't.

### Examples

```bash
$ ./ch-1.py abc xyz tsu
1

$ ./ch-1.py rat cab dad
3

$ ./ch-1.py x y z
0
```

## Task 2: Number Placement

### Task

You are given a list of numbers having just 0 and 1. You are also given placement count (>=1).

Write a script to find out if it is possible to replace 0 with 1 in the given list. The only condition is that you can only replace when there is no 1 on either side. Print 1 if it is possible otherwise 0.

### My solution

Sometimes it is easier to brute force the solution, and that is the approach I took with this one. I start by taken the last value from the input, and assign this to the variable `to_place`.

I then loop through the array from the second position to the second last one. If the preceding value, the current value and the next value are all zero, I change the current value to one, and remove from from the `to_place` variable. If this is zero (i.e. we have placed all numbers), I print `1 and exit.

If I have ended the loop and `to_place` is not zero, I cannot place all the numbers, and print `0` to represent this.


### Examples

```bash
$ ./ch-2.py 1 0 0 0 1 1
1

$ ./ch-2.py 1 0 0 0 1 2
0

$ ./ch-2.py 1 0 0 0 0 0 0 0 1 3
1
```
Repeat a String for Num times
Tags: webdev, javascript, algorithms, beginners
Published: 2023-05-07 05:58:00

### DESCRIPTION:

Repeat a given string str `(first argument)` for num times `(second argument)`. Return an empty string if num is not a positive number. For the purpose of this challenge, do not use the built-in `.repeat()` method.

### Examples

```js
repeatStringNumTimes("abc", 3)
//should return `abcabcabc`.
```

### My approach for solving this problem:


> - return "" if the num is negative.
> - loop for num times
> - storge the str value inside result var
> - return the final result

### My solution:

```js
function repeatStringNumTimes(str, num) {
  let result = ""

  if(num<0){
    return ""
  }

  for(let i =0;i<num;i++){
    result += str
  }

  return result;
}

repeatStringNumTimes("abc", 3);
```

I breath with your support, sometimes I feel discouraged when I don't get reactions on my posts. so please Like 👍 & share if you can. Thanks for being here!

### Follow _Muhmmad Awd_ on 
<a href="https://www.linkedin.com/in/muhmmadawd"><img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white"/></a>

<a href="https://github.com/MuhmmadAwd"><img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white"/></a>

If you have any questions or feedback, please feel free to contact me at 
<a href="muhmmad.awd@gmail.com"><img src="https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white"/></a>
APIs: A Beginner's Guide to Understanding and Implementing Them
Published: 2023-05-07 05:54:41

<p><strong>API</strong>, or Application Programming Interface, is a set of protocols, routines, and tools for building software applications. Essentially, an API specifies how software components should interact with one another. This allows different software programs to communicate with each other, exchange data, and access each other's functionalities.</p>
<p>&nbsp;</p>
<figure><img style="max-width: 100%;" src="https://images.unsplash.com/photo-1610986603166-f78428624e76?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=Mnw0Mjg1OTN8MHwxfHNlYXJjaHwxfHxmcm9udGVuZHxlbnwwfDB8fHwxNjgzMzc4MzMy&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1080">
<figcaption></figcaption>
</figure>
<p>&nbsp;</p>
<p>APIs are used by developers to build new software applications or to integrate existing ones. For example, a developer building a new app that needs to access a user's location data can use an API provided by a location service provider like Google Maps. This API will allow the app to retrieve the user's location data without the developer having to create their own location tracking system.</p>
<p>APIs can be public or private. Public APIs are available to third-party developers, while private APIs are only accessible within an organization. Public APIs are often used to build new apps or services that can integrate with existing ones. Private APIs, on the other hand, are typically used for internal purposes such as integrating different software systems within a company.</p>
<p>APIs can also be categorized based on the type of data they exchange. Some common types of APIs include REST APIs, which use HTTP requests to access and manipulate data; SOAP APIs, which use XML to exchange information; and GraphQL APIs, which allow clients to specify exactly what data they need and receive only that data in response.</p>
<p>The use of APIs has become increasingly common in the digital age, as more and more businesses rely on software applications to operate. APIs have made it easier for developers to build new applications and services by providing access to pre-existing functionalities and data. They have also allowed businesses to integrate their software systems, enabling more efficient and effective operations.</p>
<p>Overall, APIs have had a profound impact on the world of software development, allowing for greater collaboration and innovation. As technology continues to advance, we can expect APIs to become even more important in the years to come.</p>
The Most Familiar Stranger - JavaScript - 物件
Tags: javascript, beginners, chinese
Published: 2023-05-07 05:36:25

[分享記錄檔 YouTube](https://www.youtube.com/watch?v=KzuDNYxb9Ts&list=PLal-nRIQU5sunSCOSeZZEzUrXUXF22gep&index=6)

### 定義物件

除了原始型別以外，都是物件 ! 例如：array、function 等

一般我們常用到的物件是用 {} 包裹，內含 key 與對應的 value 組成

key 可使用能轉換為 string 的值、Symbol 型別，value 可以是任意的

```jsx
const symbol = Symbol('symbolKey');

const obj = {
	0: 'zero',
	'zero': 0,
	[symbol]: 'symbolValue',
}
```

### 取值

```jsx
const user = {
	name: 'John',
	age: 30
}

console.log(user.name);   // John

const prop = 'age';

console.log(user[prop]);   // 30
```

### 傳值

當我們將物件賦值給變數時，實際上是指向該物件的記憶體位置，而不是創建一個新的物件 ( call by reference )。也就是說，如果更改物件的的屬性，被賦值的變數也會進行更改。

```jsx
const obj1 = {
	name: 'John',
	age: 30
}

const obj2 = obj1;
obj2.age = 18;

console.log(obj1);   // { name: 'John', age: 18 }
console.log(obj2);   // { name: 'John', age: 18 }
```

### 淺拷貝 ( shallow clone )

怎樣避免上述的狀況呢，我們可以創建一個新的物件。

```jsx
const obj1 = { a: 1, b: { c: 2 } };
const obj2 = Object.assign({}, obj1);
const obj3 = { ...obj1 };
```

為什麼叫淺拷貝呢? 因為使用這種方式我們雖然創建了新的物件，但新物件內 value 的物件參考還是會跟原始物件共享，所以改變 value 內的物件時，還是會同樣受影響。

```jsx
// 承接上一個範例
obj2.b.c = 5

console.log(obj1);   // { a: 1, b: { c: 5 } }
console.log(obj2);   // { a: 1, b: { c: 5 } }
```

### 深拷貝 ( deep clone )

如果創建一個新的物件且新物件跟原始物件不共享 value，做到完全的不受影響，這就是深拷貝。

```jsx
const obj1 = { a: 1, b: { c: 2 } };
const obj2 = JSON.parse(JSON.stringify(obj1));
```

但這個方法因為 JSON 本身的限制在某些情況會有問題

- undefined ⇒ 忽略
- function ⇒ 忽略
- 循環引用 ⇒ 報錯

```jsx
const obj1 = { 
	a: 1, 
	b: { 
		c: 3, 
		d: undefined, 
		e: () => {} 
	} 
};

const obj2 = JSON.parse(JSON.stringify(obj1));

console.log(obj2);   // { a: 1, b: { c: 3 } };
```

```jsx
const obj1 = {
	a: 3,
	b: {}
}

obj1.b = obj1;

const obj2 = JSON.parse(JSON.stringify(obj1));   
// Uncaught TypeError: Converting circular structure to JSON
```

為了避免這個問題我們可以使用第三方的 library

例如：lodash ( [https://lodash.com/docs/4.17.15#cloneDeep](https://lodash.com/docs/4.17.15#cloneDeep) )

### Map

是 key-value 的集合，key 在 Map 中是唯一的

### Map vs Object

|  | Map | Object |
| --- | --- | --- |
| 意外的 Key 值 | Map 沒有額外的 key，只有實際放入的 key | 物件有從原型鏈帶來的 key，有可能發生衝突 |
| 安全性 | 使用 user 輸入的內容當 key-value 是安全的 | 使用 user 輸入的內容當 key-value 有可能覆寫物件原型鏈，造成 object injection attacks |
| Key 的型別 | Map 的 key 可以是任意值 ( 函式、物件、原始型別等 ) | 物件的 key 要是 String or Symbol |
| Key 的順序 | Map 是有序的，依照加入的順序 | 物件的 key 目前是有序的，按照固定的順序 |
| 有多少 key-value pair | 直接取用 size  | 透過 Object.keys(obj).length 取得 |
| 迭代 | Map 是可以直接迭代的 | Object 是不可以直接迭代的，通常透過 for … of 處理  |
| 效能 | 有針對頻繁的加入、移除 key-value pairs 做最佳化 | 沒有針對頻繁的加入、移除 key-value pairs 做最佳化 |
| 序列化和解析 | 沒有原生支援 | JSON.stringify()、JSON.parse() |

### Set

儲存不重複的值，值可以是原始型別或物件

[https://leetcode.com/problems/contains-duplicate/](https://leetcode.com/problems/contains-duplicate/)