teleren/devto huggingface dataset:
"Application of Apache Doris in Dinky"_Apache Doris Summit 2022
Tags: database, datascience, bigdata, opensource
Published: 2023-02-08 02:52:41

https://www.youtube.com/watch?v=i90e18IrTrM

-------------------------------------------

Dinky is able to well-integrate with Apache Doris and accelerate the data synchronization tasks through a single SQL. In this lecture you will learn the practice of Dinky in a real-time data warehouse with Apache Doris.

Apache Doris is a real-time analytical database based on MPP architecture, known for its high performance and ease of use. It supports both high-concurrency point queries and high-throughput complex analysis. (https://github.com/apache/doris)

SelectDB is a cloud-native real-time data warehouse developed based on the Apache Doris open source project by the same key developers. The SelectDB company focuses on the enterprise-grade cloud-native distribution for Apache Doris. (Contact US: support@selectdb.com)

Follow us:
https://linktr.ee/apachedoris
Apache Doris @GitHub
https://github.com/apache/doris

Apache Doris Website
https://doris.apache.org/

Apache Doris @ Twitter
https://twitter.com/doris_apache

Apache Doris @ Medium
https://medium.com/@ApacheDoris

Apache Doris @ Dev.to
https://dev.to/apachedoris

Apache Doris @ Reddit
https://www.reddit.com/user/ApacheDoris

SelectDB Website
https://en.selectdb.com/

SelectDB @ Twitter
https://twitter.com/Select_DB

SelectDB @ Reddit
https://www.reddit.com/user/SelectDB

SelectDB @ Dev.to
https://dev.to/selectdb
Higher Order Function in JavaScript
Tags: javascript
Published: 2023-02-08 02:50:52

**Higher Order Function** (HOF) is a function that can take a function as an argument or a function that return another function.

Array.map is HOF, in below case, map receive an arrow function as an argument.

```
['cat', 'dog', 'bird'].map(animal => `Hi, ${animal}`)
```

##### Let's have a look another example
This function take `num1` as an argument, then return a function `function (num2) {return num1 * num2}`. So it's HOF.

```
const multiplyBy = function (num1){
		return function (num2) {
			return num1 * num2
		}
}
const multiplyByTwo = multiplyBy(2)
const multiplyByFive = multiplyBy(5)
multiplyByTwo(5) // 10
multiplyByFive(5) // 25
```
Let's convert above method.

```
const multiplyBy = num1 => num2 =>  num1 * num2
multiplyBy(2)(5) // 10
```
"Next-Generation Cloud Native Real-time Data Warehouse"_Apache Doris Summit 2022
Tags: database, datascience, olap, sql
Published: 2023-02-08 02:50:45

https://www.youtube.com/watch?v=B9goJiP-F8Q

SelectDB is a cloud-native real-time data warehouse based on the Apache Doris just like SnowflakeDB and Databricks. Check out this topic and explore more.

Apache Doris is a real-time analytical database based on MPP architecture, known for its high performance and ease of use. It supports both high-concurrency point queries and high-throughput complex analysis. (https://github.com/apache/doris)

SelectDB is a cloud-native real-time data warehouse developed based on the Apache Doris open source project by the same key developers. The SelectDB company focuses on the enterprise-grade cloud-native distribution for Apache Doris. (Contact US: support@selectdb.com)

Follow us:
https://linktr.ee/apachedoris
Apache Doris @GitHub
https://github.com/apache/doris

Apache Doris Website
https://doris.apache.org/

Apache Doris @ Twitter
https://twitter.com/doris_apache

Apache Doris @ Medium
https://medium.com/@ApacheDoris

Apache Doris @ Dev.to
https://dev.to/apachedoris

Apache Doris @ Reddit
https://www.reddit.com/user/ApacheDoris

SelectDB Website
https://en.selectdb.com/

SelectDB @ Twitter
https://twitter.com/Select_DB

SelectDB @ Reddit
https://www.reddit.com/user/SelectDB

SelectDB @ Dev.to
https://dev.to/selectdb
Types in JavaScript
Published: 2023-02-08 02:00:55

#### Primitive types

```
typeof 5 // number
typeof true // boolean
typeof 'wow' // string
typeof undefined // undefined
typeof null // object
typeof Symbol('just me') // symbol since es6
```

#### Non-Primitive types

```
typeof {} // object
typeof [] // object
typeof function(){} // functio
```

### Playground
> Primitive is pass by value

In below case, variable a have an address refer to somewhere that memory hold value 5.
`let b = a` means it will copy **value 5**, and create a new memory for it to store, then b refer to this new memory location.


![A pie chart showing 40% responded "Yes", 50% responded "No" and 10% responded "Not sure"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtl4rplmxygsormz4210.png)

```
let a = 5
let b = a
console.log(a) // 5
console.log(b) // 5
b = 10
console.log(a) // 5
console.log(b) // 10
```

> Non-Primitive is pass by reference

`obj2 = obj1` means  obj2 will refer to obj1 address.
so that obj1 and obj2 point to the same location where object store in memory

![A pie chart showing 40% responded "Yes", 50% responded "No" and 10% responded "Not sure"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nw4myd1l9hs1tvklll30.png)

```
let obj1 = {name:'hui', password:'123'}
let obj2 = obj1
obj2.password = '456'
console.log(obj1) // 456
console.log(obj1) // 456
```
AI Voice Cloning and Voice Changer Apps
Tags: ai, api
Published: 2023-02-08 01:32:39


Few weeks ago I was looking for AI Voice apps over API access and I stumbled upon Descript and oh boy I was shocked. Check this out:

{% embed https://youtube.com/shorts/QfaP3DR1YTQ?feature=share %}

I then decided to research applications and divide them into:

 - Voice cloning (your voice or someone else's voice)

 - Synthetic Voice Generation (human-sounding voice)

 - Text-to-speech overdub - your own voice

 - Voice Changers allow you to modify and modulate your own voice

My attempt to categorize this somehow into the comparison table is as follows:

[![AI Voice Cloning and Voice Changer Apps Comparison Table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7rqafn5c7r2idomc0oex.png)](https://docs.google.com/spreadsheets/d/1POMfNe3ghKZRThSnWL8bChCylJvuyl4n1j_-wt1rZBo/edit?usp=sharing)


But decided to record a YouTube Video about this instead:

{% embed https://youtu.be/vTaz4cpYEFU %}

Godspeed

PS. Follow me on Elon's Twitter. 
[https://twitter.com/dom_sipowicz](https://twitter.com/dom_sipowicz)

{% embed https://twitter.com/dom_sipowicz %}
kubernetes ingress-controller '400 Bad request - plain HTTP request sent to HTTPS port'
Tags: aws, kubernetes
Published: 2023-02-08 01:32:26

Resolvi criar um material de consulta rápida e que pudesse compartilhar, sobre um problema que me consumiu uma quantidade de tempo considerável. E como consegui resolver, resolvi compartilhar...:sunglasses:

Criei um cluster EKS do zero para testar algumas variações com Terraform.

Legal tudo ok, só que estava chamando a aplicação somente via HTTP e estava funcionando. Como teria um api gateway na frente, achei prudente que a chamada fizesse um redirect de HTTP para HTTPS.

Quando fiz este redirect foi onde comecei a receber a seguinte erro:

![erro400](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qy9o3hxp2lit91ui25l3.png)

O único lugar que havia configurado redirecionamento era no ingress-controller. Decide ir debugando por partes, primeiro validei se a requisição chegava até o POD, isso não ocorria.

Então no **service** que crie para aplicação, alterei o parâmetro abaixo:
Antes

![antes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dr5x0ms6jsrzm0r2t5c7.png)
Depois

![depois](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/espas78fhlqhlvxjul6b.png)
Com as alterações de redirects na parte do annotations, as requisições chegavam na aplicação.

Voltei o ambiente como estava antes, e fui pegar os logs do ingress-controller, as requisições chegavam mas dava 400. Com isso resolvi olhar para o service do ingress-controller.

Existe uma parte no service que estava assim:


![serviceantes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hsae1x15ehxvd15fjoyp.png)

E ficou assim:

![servicedepois](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sgqpzmvszy9pzi65l32m.png)

Isso porque no meu caso em específico, o ingress que configurei para aplicação, estava apontando para porta 80.

Espero ter ajudar e até a próxima!!!

E ai vamos se conectar? Entre em contato comigo:
https://www.linkedin.com/in/pcmalves/
TypeScript Type Inference
Tags: webdev, beginners, typescript, programming
Published: 2023-02-08 01:00:51

## TypeScript Type Inference

TypeScript is a statically typed programming language that builds upon JavaScript by adding optional types. It is becoming increasingly popular among developers due to its ability to provide a type-safe and scalable coding environment. One of the key features that sets TypeScript apart from other languages is its type inference capability.

Type inference is the process of automatically deducing the type of an expression based on the way it is used in the code. In TypeScript, this means that the compiler can determine the type of a variable or expression without the need for explicit type annotations. This leads to cleaner, more readable, and less verbose code.

For instance, consider the following example:

```typescript
let name = "John Doe";
```

Without type inference, you would need to specify the type of the name variable, like this:

```typescript
let name: string = "John Doe";
```

But with type inference, TypeScript can deduce that name is a string based on the assignment, so you don't need to specify the type.

Type inference is not only convenient but also helps prevent errors in your code. For example, if you mistakenly assign a number to a variable that should be a string, TypeScript will generate a compile-time error.

Another situation where type inference is useful is when working with functions. Consider the following example:

```typescript
function greet(name: string) {
  return `Hello, ${name}!`;
}
```

With type inference, you can omit the type annotation on the parameter, like this:

```typescript
function greet(name) {
  return `Hello, ${name}!`;
}
```

In this case, TypeScript can infer the type of the name parameter based on how it is used within the function body.

In conclusion, TypeScript's type inference capability is a valuable tool that can help make your code more concise, readable, and error-free. Whether you're just starting out with TypeScript or are an experienced user, it's definitely worth taking the time to understand and make use of this feature.
Apache AGE Tutorial - Creating Graphs, Nodes and Edges
Tags: postgres, apacheage
Published: 2023-02-08 00:30:00

Hello all! I'm happy to share with you a tutorial I made for Apache AGE, the extension that allows graph database on PostgreSQL. In this tutorial I'll show the commands to create graphs, nodes and edges and also show the result with AGE Viewer. Check it out here: https://www.youtube.com/watch?v=6IdfvNN32PU 

Apache AGE website : https://age.apache.org/
Apache AGE Github : https://github.com/apache/age
Get into Cloud computing with no experience
Tags: career, beginners, cloudskills, aws
Published: 2023-02-08 00:30:00

I have been working in the IT industry for almost 14 yrs now, in multiple roles, across the world, and luckily all of this experience has been with Cloud Computing technologies. Over the years hundreds of people have asked me same question - **how do I get into Cloud based roles?** 

A lot of folks want to get into Cloud Computing roles BUT companies want to see experience on your CV/resume. It is a dilemma for lot of folks.

> If you don't get hired into Cloud Computing projects, you can't get experience and without experience companies won't hire you 


So I thought I should talk about this in detail and help folks who want to make switch to Cloud Computing, because Cloud is the new normal now and it should have a place on your resume.

Watch this short YouTube video on how you can **build your skills, your resume and your brand to apply for jobs**. 

I do provide subtitles, and chapters so feel free to watch content you like.

Let me know in the comments section, if you have any questions or any topics I should elaborate more about. I am happy to guide folks so we all are successful in our own lives! I hope these give you a fair idea of where to start and motivate you to take your first steps into a successful career!

{% embed https://youtu.be/ks4MdFM4bO4 %}
Call, Apply, Bind in JavaScript
Published: 2023-02-08 00:27:41

### Definitions
**Call** method is used to change the context of the invoke function. In other words, to change the keyword `this` inside the function.

**Apply** method is similar to Call, the only different is that Apply method can receive an array as argument.

**Bind** method will return a new function - bind function. The keyword `this` will refer to the first argument.


### Examples
#### Call
In below case, archer only have two properties, name and health. He want to use heal() method to manager him health for temporary. So he don't need to create a new heal function, he can use `call` method to borrow `heal()`.
```
const wizard = {
	name: 'Merlin',
	health: 50,
	heal(){
		return this.health = 100
	}
}
const archer = {
	name :'Robin',
	health: 30
}
console.log('1', archer) // {name: 'Robin', health: 30}
wizard.heal.call(archer) // this in heal() point to archer
console.log('2', archer) // {name: 'Robin', health: 100}
```

```
const wizard = {
	name: 'Merlin',
	health: 50,
	heal(num1, num2){
		return this.health += num1 + num2
	}
}
const archer = {
	name :'Robin',
	health: 30
}
console.log('1', archer) // {name: 'Robin', health: 30}
wizard.heal.call(archer, 50, 30) // this in heal() point to archer
console.log('2', archer) // {name: 'Robin', health: 110}
wizard.heal.call(archer, 50, 30, 100) // only take the first two


wizard.heal.call(archer, 50) // if only put 1 parameter
console.log('2', archer) // {name: 'Robin', health: NaN}
```
#### Apply
Similar to `Call`, the only different is that receive an array as argument

```
const wizard = {
	name: 'Merlin',
	health: 50,
	heal(num1, num2){
		return this.health += num1 + num2
	}
}
const archer = {
	name :'Robin',
	health: 30
}
console.log('1', archer) // {name: 'Robin', health: 30}
wizard.heal.apply(archer, [50, 30]) // this in heal() point to archer
console.log('2', archer) // {name: 'Robin', health: 110}

wizard.heal.apply(archer, 50) // type error, only accept array
wizard.heal.apply(archer, [50,50,50]) // only pick the first two
wizard.heal.apply(archer, [50]) // NaN, at least 2 parameter
```

#### Bind
fun fact, archer wants to borrow a `heal()` from wizard, but he want to use it later on. So he can use `bind` method, as `bind method` will return a new function, he can use it whenever he wants.
```
const wizard = {
	name: 'Merlin',
	health: 50,
	heal(num1, num2){
		return this.health += num1 + num2
	}
}
const archer = {
	name :'Robin',
	health: 30
}
console.log('1', archer) // {name: 'Robin', health: 30}
// bind will return a function
const healArcher = wizard.heal.bind(archer, 50, 30) 
healArcher() // {name: 'Robin', health: 110}
```

#### Summary

> 1. call and apply are useful for borrowing methods from an object
> 2. bind is useful for call function later on
> 3. `this` always refer to who want to borrow or bind other function
2 tools that increase productivity
Published: 2023-02-07 23:35:48

I tied this tools and it's really great
the first tool is:

## CopyQ 
[CopyQ](https://lnkd.in/djyyX93q) is advanced clipboard manager with editing and scripting features.

The second one is

## Zim
[Zim](https://zim-wiki.org) is a graphical text editor used to maintain a collection of wiki pages.


Finally I got this nice website to add emoji to git commit
[gitmoji](https://gitmoji.dev)
Code Smell 195 - Yoda Conditions
Tags: webdev, javascript, beginners, programming
Published: 2023-02-07 23:23:53

*Best is to put the expected value last, if conditions you want to write.*

> TL;DR: In a natural way, write your conditions.

# Problems

- Readability

- The least surprise principle violation

# Solutions

1. Write your conditions with the expected value as the second.

2. Name the variables accordingly.

# Context

Most programmers write the variable or condition first and the test value second.

In fact, this is the correct order for assertions.

In some languages, this style is used to avoid accidental assignment instead of equality comparison, which can result in a logic error in the code.

# Sample Code

## Wrong

[Gist Url]: # (https://gist.github.com/mcsee/530570169b351c8d411c310d9a182d1a)
```javascript
if (42 == answerToLifeMeaning) {
  // 
}
```

## Right

[Gist Url]: # (https://gist.github.com/mcsee/3a59fd09423eef0bbc5ab7857d041309)
```javascript
if (answerToLifeMeaning == 42) {
  // might be mistaken with answerToLifeMeaning = 42
}
```

# Detection

[X] Semi-Automatic 

We can check for constant values on the first side of the comparison.

# Tags

- Readability

# Conclusion

Reliable, direct, and clear be when conditions your writing.

# Relations

{% post https://dev.to/mcsee/code-smell-99-first-second-j47 %}

# Disclaimer

Code Smells are just my [opinion](https://dev.to/mcsee/i-wrote-more-than-90-articles-on-2021-here-is-what-i-learned-1n3a).

# Credits

Photo by [Lia](https://unsplash.com/@liaphotography) on [Unsplash](https://unsplash.com/photos/2Wc_wz2k1Bs)  
  
* * *

> Any man can make mistakes, but only an idiot persists in his error.

_Marcus Cicero_

{% post https://dev.to/mcsee/software-engineering-great-quotes-26ci %}

* * *

This article is part of the CodeSmell Series.

{% post https://dev.to/mcsee/how-to-find-the-stinky-parts-of-your-code-1dbc %}
🗒️ 6 Tips on How to Transform your Organization to be KPI Driven
Tags: product, datascience, productivity
Published: 2023-02-07 22:56:15

### Join Me

Follow me on [#TheEngineeringBolt](https://engineeringbolt.com), [Twitter](https://twitter.com/alexrashkov) and [Linkedin](https://www.linkedin.com/in/alexrashkov) for more Career, Leadership and Growth advice.

<a href="https://engineeringbolt.substack.com/embed" target="_blank" title="Subscribe to Engineering Bolt ⚡ Newsletter">![Subscribe to Engineering Bolt ⚡ Newsletter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u2srkrj6arwrs0nclfs.png)</a>

### KPI Driven Organizations

Is your product team/organization KPI driven?

6 Tips on How to Transform your Organization to be KPI Driven.

1. **Align the KPIs with the company's overall strategy**: Make sure that the KPIs you select align with the company's outcomes, assumptions, and principles. This will ensure that the team is focused on the right things.

2. **Gather data and instrument the metrics**: Review all available data and ensure it is of good quality. Work with the engineering and data teams to instrument the metrics you need and ensure  you have a process for regularly collecting, analyzing, and reporting on the chosen KPIs

3. **Make KPIs accessible and understandable**: Ensure that the KPIs are easily accessible and understandable to all members of the team. This may involve creating dashboards or other visualizations to help team members quickly see how the product or organization is performing.

4. **Provide training and support**: Regularly provide training and support to team members to help them understand the importance of the KPIs and how to use them effectively to improve the organization.

5. **Review and adjust the KPIs regularly**: Regularly review and adjust the KPIs to ensure that they remain relevant and useful. Set targets annually and adjust mid-year if needed.

6. **Encourage a data-driven culture**: Make sure that all KPIs have their lower-level metrics clearly mapped, so that teams can see how they influence the input metrics. Encourage team members to be involved with the data and to make decisions based on the KPIs.

Becoming more KPI driven is a matter of desire and taste. No person, team, or organization attempts to change without believing that behaving differently will result in an improved outcome they care about. 

Some companies are steadfast that the use of KPIs should not equate to being data driven everywhere in the company. They prefer to have data informed teams that reserve room for intuition and qualitative insights. There is no right answer here.

### Join Me

Follow me on [#TheEngineeringBolt](https://engineeringbolt.com), [Twitter](https://twitter.com/alexrashkov) and [Linkedin](https://www.linkedin.com/in/alexrashkov) for more Career, Leadership and Growth advice.

<a href="https://engineeringbolt.substack.com/embed" target="_blank" title="Subscribe to Engineering Bolt ⚡ Newsletter">![Subscribe to Engineering Bolt ⚡ Newsletter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u2srkrj6arwrs0nclfs.png)</a>
REACTing to React
Tags: react
Published: 2023-02-07 22:48:43

1. Import dependencies. 
There are two of them. 

import React from 'react'; -- this is the core react library. 
import {createRoot} from 'react-dom/client'' (react-dom for web, react-native for mobile or desktop apps, and one more. 

React doesn't have divs, it has text, view, and pressable. 

2. Create a react element

React.createElement -- this is a funciton that accepts three or more arguments. 

3. Render the application

const container = document.querySelector('#root');
const root = createRoot(container);
root.render(element);

in html version of the file, you have the following element

<div id="root"></div>
A page from my diary (7-02-2023)
Published: 2023-02-07 22:36:27

Today, I started my journey with a bootcamp at University Of Toronto for coding. I've been thinking of becoming a coder for a while, and since I just moved to Toronto a month ago, I thought why not now. I wanted to changed my career from being a social media manager to a coder or something in Tech. I am on my way to finding my niche as I go along the course. 
The course has a lot of amazing resources and blog posts which focus on the basics of what is a computer, parts of the computer, how does it work, what is cloud etc. Basically, this course is for anyone who is a beginner too, just like me. 
I have been using the computer ever since I can remember but today I learnt that the middle row on they keyboard with the alphabets is called the hand row, that is where the fingers are spread across as you begin typing. 
Another fascinating term that I came across was Aas - which means As-A-Service, which is an interface that allows in house administrations of tasks, where you don't need to download software to your local system.
Day 690 : Happy Birthday J Dilla and Nujabes
Tags: hiphop, code, coding, lifelongdev
Published: 2023-02-07 22:03:04

_liner notes_:
- Professional : Today flew by. Had a meeting with my manager to plan out some stuff. I submitted a talk abstract for an event. Then I refactored and updated a project.

- Personal : Last night, I ran into an issue with trying to add Svelte to my side project. The reason I'm adding Svelte is because the dashboard needs to be pretty interactive and I don't think I can get it working with just Astro. Every other part of the site will be just Astro pages. Kind of makes sense because for my past projects, the site would be built with Astro and the dashboard would be a Svelte app. Two seperate things. This is the first time I'm combining them. I basically had to remove the node modules folder and then reinstall everything. It was pretty late because this was after going through tracks for the radio show and watched "Trigun Stampede" and "Vinland Saga". So I went to sleep once I got it installed properly.

![A dirt path leading to a waterfall and a pond in a lush dense rainforest in Sri Nakarin Nat'l Park, Thailand](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdji1va9wqeiumovlb50.jpg)

Going to see if I can get the authorization and authenication stuff I did in the Astro page into a Svelte component. Hopefully it won't be too bad because I've kind of done it before. Going to go through some tracks for the radio show. I'm out. Going to see how much I can get done.

Have a great night! Happy Birthday Nujabes and J Dilla!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube CgvGdZK9wXc %}