teleren/devto huggingface dataset:
I open sourced an AI that creates any UI in seconds.
Tags: ai, javascript, nextjs, chatgpt
Published: 2023-03-06 10:54:57

I am not posting a lot over dev.to, but I think this is a great opportunity to show something great 🚀

For the last 15 years, I have been playing the role of a full-stack developer and a team/tech leader for various companies.

I never stop trying new technologies, I wake up in the morning with a lot of passion to build great things. 

I recently started playing with chatGPT and some generative AI technologies, but as chatGPT API was released, it became a great opportunity to make some really cool things 😎

The world is changing fast, and I believe that very soon, most of the jobs, as we know them, will not be the same - AI will have its share in our life, involved in almost everything that we do. 


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


I build a lot of web applications, writing dozens of components every week. So I was thinking, what if I could make my life really easier and just ask ChatGPT to make those components for me? It turns out it is easier than you may think. Check this out:

https://ai2ui.co/


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


I open sourced it, so you are more than welcome to contribure make it better!

Here's a link to the repo:

https://github.com/yuvalsuede/ai-component-generator



![I create AI that works](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5l2sf5xws7zkol975i34.png)


[Follow me and learn how to make AI business](https://www.linkedin.com/in/yuval-suede/)

Please give me a star so I know I did something good 🙌🏻

Love you all :)
Batch Processing Mode
Tags: opengauss
Published: 2023-03-06 10:48:28

openGauss supports the execution of SQL statements from text files and provides the gsql tool to process SQL statements in batches.

Batch processing is recommended in the following scenarios:

**·** If you run a query repeatedly (for example, daily or weekly), you can set it as a script to avoid repeated input.
**·** You can generate a new query from an existing similar query by copying and editing the script file.
**·** For multi-line statements or multi-statement sequences, if an error occurs, you do not need to input all the content again. You only need to edit the script to correct the error, and then execute it again.
**·** You can distribute the script to others so that they can also execute the statements.
**·** When interactive use is not allowed in some cases, you must use the batch processing mode.

**Syntax**

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

**Parameter Description**

**· dbname**

Specifies the name of the database to connect to.

**· port**

Specifies the port number of the database server.

**· -f filename**

Specifies that files are used as the command source instead of interactively-entered commands. This parameter specifies the path and name of the text file to be read.

**Examples**

1. Create the **sql.txt** file locally. The file content is as follows:

CREATE TABLE customer
(
    c_customer_sk             integer,
    c_customer_id             char(5),
    c_first_name              char(6),
    c_last_name               char(8),
    Amount                    integer
);

INSERT INTO customer(c_customer_sk, c_customer_id, c_first_name,Amount) VALUES (3769, 'hello', 'Grace', 1000);
INSERT INTO customer (c_customer_sk, c_first_name) VALUES (3769, 'Grace');
INSERT INTO customer (c_customer_sk, c_customer_id, c_first_name) VALUES (3769, 'hello', DEFAULT);
INSERT INTO customer (c_customer_sk, c_customer_id, c_first_name,Amount) VALUES 
    (6885, 'maps', 'Joes',2200),
    (4321, 'tpcds', 'Lily',3000),
    (9527, 'world', 'James',5000);

2.Execute the SQL statements in the sql.txt file.

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

The result is as follows:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bt3dp7se2zrilatib3j9.png)
#TestCulture 🦅 Episode 27 – Concept of Work In Progress (WIP)
Tags: beginners, testing, agile, automation
Published: 2023-03-06 10:42:14

Work In Progress is a commonly used concept in agility. It consists in limiting the number of jobs in progress in order to ensure the quantity of work delivered to the customer.

In an Agile team, the absence of WIP monitoring often results in an accumulation of tasks in progress on a Kanban column.

There are various topics that can potentially impact product quality, including Test Automation. Then, depending on the organization of the company, test automation can be entrusted to a specialized team that is responsible for regression testing.

In other contexts, automation is performed within each development team. 👥 This structure results in the generation of customer-focused feature teams with members capable of automating test scenarios. 💪🏼

📰 Learn more about the concept of Work in Progress [here](https://agilitest.com/cards/wip-work-in-progress)

A card written by the agile testing expert Christophe Moustier.
How to minify private methods in a TypeScript class?
Tags: typescript, javascript, programming
Published: 2023-03-06 10:40:22

# Introduction

As you may notice during minification your long and descriptive variable names are changed into e.g.: "a", "rd", "xd". However, when you minify class names of methods stay the same:

```typescript
class Cls {
  method() {
  }
}

const cls = new Cls();
cls.method();
```

Will be compiled into 

```typescript
"use strict";(()=>{var c=class{method(){}},e=new c;e.method();})();
```

Is logical because `method` has been used in other scripts. But what about private methods?

```typescript
class Cls {
  public publicMethod() {
    this.privateMethod()
  }
  private privateMethod() {}
}

const cls = new Cls();
cls.publicMethod();
```

This code with be compiled into:

```typescript
"use strict";(()=>{var t=class{publicMethod(){this.privateMethod()}privateMethod(){}},e=new t;e.publicMethod();})();
```

The private method stays the same. Is logical cause code is firstly transpile into JavaScript and then minified. During transpiration information about method privacy will be lost.

# Terser

[Terser](https://github.com/terser/terser) is JavaScript compressor that can minified specific method names.

```javascript
// terser.config.js
const fs = require('fs');
const terser = require('terser');

(async () => {
    const file = fs.readFileSync('index.js', 'utf8')
    const {code} = await terser.minify(file, {
        mangle: {
            properties: {
                regex: `^(privateMethod)$`,
            },
        },
    });
    fs.writeFileSync('index.js', code)
})();
```

This code will create something like this:

```typescript
"use strict";(new class{publicMethod(){this.t()}t(){}}).publicMethod();
```

Great success? Not yet. We can not manually paste every private method to the config file.

# Find all private method

We can use bash to find all names of private methods.

1. Print all TS files
```bash
cat src/**/*.ts
```
2. Filter lines by pattern `private methodName(...) {`

```
grep -E "^  private (.*?)\("
```

You can use [prettier](https://prettier.io/) to be sure that all methods are formatted in the same way.
3. Map lines like with `private methodsName(` into `methodName` by
```bash
awk '{split($2,a,"("); print a[1]}'
```

4. Join each method with `|` separator by: 
```bash
tr '\n' '|'
```

5. Merge it with bash pipes: 

```bash
cat src/**/*.ts | egrep "  private (.*?)\(" | awk '{split($2,a,"("); print a[1]}' | tr '\n' '|'
```


The output should looks like this: `privateMethod|privateMethod1|privateMethod2`. It exactly the same that what we can paste to regex in the `terser.config`.

# Fix collision

Unfortunately is public method will have the same name like a private one, both will be minified. How to fix that? Use previous script to find all public methods then just filter in out in the `terser.config.js`

```javascript
const methodsToMinify = privateMethods
  .split('|')
  .filter(item => !publicMethods.includes(item))
  .join('|');
```

# Result

In my project helped me reduce bundle size by around 11%. It doesn't sound impressive, however applying this solution is relatively fast
Getting Started with Google Cloud Platform (GCP)
Tags: gcp, devops, datascience, webdev
Published: 2023-03-06 10:35:44

Getting started with Google Cloud Platform (GCP) can be a bit overwhelming at first, but there are some simple steps you can take to get started:

Create a GCP account: The first step is to create a GCP account if you don't have one already. You can do this by going to the GCP website and signing up for a free trial account. You will need to provide your billing information, but you won't be charged unless you use resources that are not covered by the free tier.

Navigate the GCP Console: Once you have created your account, you can access the GCP Console. The console is the central hub for managing your GCP resources. You can use it to create and manage virtual machines, storage buckets, databases, and more.

Learn about GCP services: GCP offers a wide range of services, from computing and storage to machine learning and analytics. Take some time to explore the different services that are available and what they can do for you. The GCP documentation is a great resource for learning about these services.

Start a project: To start using GCP, you will need to create a project. Projects are containers for resources that allow you to organize and manage your GCP resources. You can create multiple projects within your account.

Try out GCP services: Once you have a project set up, you can start trying out GCP services. For example, you can create a virtual machine, deploy an application, or set up a database. There are also many tutorials available that can help you get started with specific services.

Get help: If you get stuck or have questions, there are many resources available to help you. The GCP documentation is a great place to start, and there are also forums and community groups where you can ask for help. Google Cloud Support is also available if you need more personalized support.

By following these steps, you can start using GCP and exploring its many capabilities.
Road to Employment: A Junior Dev's Job Search Adventure (Ep. I)
Tags: startup, webdev, javascript, nextjs
Published: 2023-03-06 10:30:08

## My first taste of Startup life

Back in May 2022 I finished my bootcamp at Ironhack and graduated as a MERN Stack Developer. This marked the start of what would be my career in Web Development!

Following the months after I finished my course, I just spend the next two months studying on my own, building different playgrounds to experiment with different coding challenges and late August, early September, a friend that had been through the bootcamp with me offered me a chance to work in a startup just for experience (i.e. not being paid) - _which is great because I was still searching for a job and this would give me first hand experience in the field_. 

For the first month I was working with a mid-senior developer that was teaching me the methodologies that we would be working in (Agile) with daily Stand Ups.

Although we were aiming to go for a no-code platform for the MVP we quickly switched to using Next.js (which was something completely new, well, _to an extent_) - so I spent the week reading the documentation and followed [this](https://vercel.com/guides/nextjs-prisma-postgres) to get a general understanding.

![General understanding](https://media.giphy.com/media/v0bsXL94EKbao/giphy.gif)

Within a month I was _officially_ hired and stopped searching for Jr. positions as this job was allowing me to grow in the field. A few weeks later I was able to have some mentoring from a Sr. Developer which was the most insightful thing I could've asked, he helped me:

- Organise my code (clean code approach, i.e: removing unnecessary code, delete console.logs for security reasons, etc) _keep in mind this was all new to me_;
- Backlogs and tickets using Gitlab - _up to this point, I only knew how to work with Github_;
- Different branches for different tickets;
- Different approach when dealing with issues.

Besides that, on a more managerial side, I had coaching regarding feedback and summarising each day:

- Organise workflow for the works' day;
- Give midday updates;
- End of day summary through bullet points.

Of course there was more to it, but it really gave me a good insight in what is like working in a team, which I think will give me an advantage when settling into a new team.

## The Search

My time with the Startup ended after around 4 months which I was grateful everyday and now I am on a _hunt_ for job that will continue to help me grow in the field.

## This Blog

I am wanting to share with you my journey into finding my first (_post startup_) job and all the things I've learnt on the way. I will mostly share what I am currently doing, learning and developing. Also share my interview experiences.

## Final Note

I hope you enjoy this first draft, I will be happy to receive feedback on the blog. You can check my latest work [here](http://codewalk.vercel.app/).
Aliases
Tags: opengauss
Published: 2023-03-06 10:20:47

SQL can rename a table or a column. The name is the alias of the table or the column. Aliases are created to improve the readability of table names or column names. In SQL, **AS** is used to create an alias.

**Syntax**

**·** Column alias syntax

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

**·** Table alias syntax

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

**Parameter Description**

**· output_name**

You may use the **AS output_name** clause to give an alias for an output column. The alias is used for displaying the output column. The **name**, **value**, and **type** keywords can be used as column aliases.

**Examples**

Use **C** to indicate the alias of the **customer_t1** table to query data in the table.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7dg9xkpocfl88rsi1ajp.png)
UNION Clause
Tags: opengauss
Published: 2023-03-06 10:17:22

The **UNION** clause computes the set union of the rows returned by the involved SELECT statements. The SELECT statement inside the **UNION** clause must have the same number of columns, and the values of the columns must have similar data types. In addition, the sequence of columns in each SELECT statement must be the same.

**Syntax**

**· UNION**: retains only one value if duplicate values exist in the results.

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

**· UNION ALL**: displays all results, including duplicate values.

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

**Examples**
Take table1 and table2 as an example. The table data is as follows:

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

**·** UNION

Lists the names of all employees in two tables and retains only one duplicate value.

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

**·** UNION ALL

Lists the names of all employees in two tables, including duplicate values.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zvqgxod6nsa8rw18uruz.png)
Tags: opengauss
Published: 2023-03-06 10:11:55

**NULL** indicates unknown data. **NULL** and **0** cannot be compared because they are not equivalent to each other.

When creating a table, you can specify whether **NULL** can be stored in a column. For details, see **NOT NULL**. This section describes the IS NULL and IS NOT NULL operators.

Create the **customer_t1** table. The data in the table is as follows:

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

**IS NOT NULL**

In the **WHERE** clause, locate the column whose value is **NULL**.

For example, list the column whose **c_customer_id** is not set to a null value in the **customer_t1** table.

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


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

**IS NULL**

In the **WHERE** clause, locate the column whose value is **NULL**.

For example, list the column whose **c_customer_id** is set to a null value in the **customer_t1** table.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8tyx0a20jr4b9x17i6ka.png)
ChatGPT API Connector: Learn how to integrate OpenAI’s GPT-3 API into your workflows. (APJ Edition)
Tags: chatgpt, api, openai, webmethods
Published: 2023-03-06 10:10:24

The second ChatGPT API Connector webinar is almost here: Tuesday, March 7th, 4:30 a.m. AEST; 11:00 a.m. IST; 6:30 a.m. CET. 

Here’s what you can expect:  
-The amazing Dave Pemberton will be developing a Generative AI business use case live, using our [ChatGPT API Connector](https://tech.forums.softwareag.com/t/webmethods-io-chatgpt-api-connector-available-now/268371)!  
-We are going to discuss the use of generative AI, such as ChatGPT, and how it can augment human capabilities.  
-You are going to have the opportunity to participate in an [iPaaS Puzzle](https://tech.forums.softwareag.com/t/generative-ai-chatgpt-augmenting-human-capabilities-ipaas-puzzle/268991) challenge, which is already live. You can learn more about it and the API Connector and submit your suggestions on how we can integrate Generative AI in our workflows to increase our productivity. Everyone who shares a workflow will receive a Community gift, so check them out!  
**This event is free and open to everyone**, so book your spot now: 

https://groups.softwareag.com/e/mp5wt9/  
Once you register, don’t forget to add the event to your calendar.  
See you there 😊
JOIN
Tags: opengauss
Published: 2023-03-06 10:06:19

The **JOIN** clause is used to combine rows in two or more tables based on the common columns in these tables.

In openGauss, the **JOIN** clause has five types of join operations.

**·** CROSS JOIN
**·** INNER JOIN
**·** LEFT OUTER JOIN
**·** RIGHT OUTER JOIN
**·** FULL OUTER JOIN
table1 and table2 are used as examples to describe different types of join operations. The table data is as follows:

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

**CROSS JOIN**

CROSS JOIN is a Cartesian product, which refers to any combination of all tuples in two relations.

For example, perform CROSS JOIN operation on table1 and table2. The result is as follows:

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

**INNER JOIN**

When INNER JOIN is used, if the related columns in two tables meet the join conditions, data is extracted from the two tables and combined into a new record to create a result table. That is, in an INNER JOIN query, only the tuples that meet the conditions can be displayed in the result relation.

INNER JOIN is the most common and default join type.

Example: Query the columns whose **name** is set to the same value in table1 and table2.

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

**LEFT OUTER JOIN**

In LEFT OUTER JOIN, all tuples in the left table of the keyword are listed. If a matched tuple can be found in the right table, the content of the matched tuple is displayed. If no matched tuple is found in the right table, the corresponding tuple is **NULL**.

The keyword in the LEFT OUTER JOIN statement is **LEFT OUTER JOIN**. **LEFT OUTER JOIN** indicates that data in the right table must meet the join conditions, and data in the left table is exported regardless of whether it meets the join conditions.

Example:

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

**RIGHT OUTER JOIN**

RIGHT OUTER JOIN is similar to LEFT OUTER JOIN. The difference is that all tuples in the right table of the keyword are listed and the data in the left table must meet the join conditions. The data in the right table is exported regardless of whether it meets the join conditions.

The keyword in the RIGHT OUTER JOIN statement is **RIGHT OUTER JOIN**.

Example:

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

**FULL OUTER JOIN**

In FULL OUTER JOIN, tuples in both the left and right tables are output. If no matched tuple is found, **NULL** is used.

Example:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6tg4gx907o24qjp8wcf.png)
Aggregate Functions
Tags: opengauss
Published: 2023-03-06 09:46:14

sum(expression)

Description: Specifies the sum of expressions across all input values.

Return type:

Generally, it is the same as the argument data type. In the following cases, type conversion occurs:

**· BIGINT** for **SMALLINT** or **INT** arguments
**· NUMBER** for **BIGINT** arguments
**· DOUBLE PRECISION** for floating-point arguments
Example:

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

**·** max(expression)

Description: Specifies the maximum value of expressions across all input values.

Parameter type: any array, numeric, string, date/time type, or IPv4 and IPv6 addresses (INET and CIDR data types)

Return type: same as the argument data type

Example:

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

**·** min(expression)

Description: Specifies the minimum value of expressions across all input values.

Parameter type: any array, numeric, string, date/time type, or IPv4 and IPv6 addresses (INET and CIDR data types)

Return type: same as the argument data type

Example:

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

**·** avg(expression)

Description: Specifies the average (arithmetic mean) of all input values.

Return type:

**NUMBER** for any integer-type argument.

**DOUBLE PRECISION** for floating-point arguments.

Otherwise, it is the same as the argument data type.

Example:

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

**·** count(expression)

Description: Specifies the number of input rows for which the value of the expression is **NULL**.

Return type: BIGINT

Example:

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

**·** count(*)

Description: Returns the number of input rows.

Return type: BIGINT

Example:

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

**·** delta

Description: Returns the difference between the current row and the previous row.

Parameter: numeric

Return type: numeric

**·** mode() within group (order by value anyelement)

Description: Returns the value with the highest occurrence frequency in a column. If multiple values have the same frequency, the smallest value is returned. The sorting mode is the same as the default sorting mode of the column type. **value** is an input parameter and can be of any type.

Return type: same as the argument data type

Example:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxgkdobt0fbfm18i3fe6.png)
How does AI impact privacy?
Tags: discuss, ai, watercooler
Published: 2023-03-06 10:06:00

---
title: How does AI impact privacy? 
published: true
description: 
tags: discuss, AI, watercooler
# Use a ratio of 100:42 for best results.
published_at: 2023-03-06 10:06 +0000
---
The use of personal data as well as data collection and analysis has left a lot of people concerned about privacy, especially when it comes to AI. 

**How does the use of personal data by AI systems impact individual privacy, and what steps do you think should be taken to address these concerns?**