teleren/devto huggingface dataset:
Should we run unit tests in the cloud?
Tags: unit, test, cloud
Published: 2023-06-17 14:37:07

---
title: Should we run unit tests in the cloud?
published: true
description: Running unit tests in the cloud - Is it possible? Should it be possible? We can do it with automation tests, so why not unit tests also?
tags: unit, test, cloud
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pbqig040iex6krla12hw.png
---

Imagine if you could push your current branch to a test server and have it automatically run all of your unit tests!

You could get feedback on your entire test suite in a few minutes, rather than waiting for a lengthier CI process, which might take up to ~20 minutes (depending on the infrastructure and setup in your organisation).

Several automation test platforms now exist, to perform cloud testing on longer-running end-to-end tests. These include [Selenium Grid](https://www.selenium.dev/documentation/grid/), [TestingBot](https://testingbot.com/) and [BrowserStack](https://www.browserstack.com/).

Why not extend this kind of service also to unit tests?

Advantages of cloud-based unit test execution over CI:

* CI can be time-consuming, if it runs a full build, linting, type-checking and other operations. Cloud-based unit testing lets us isolate just the tests.
* CI tends to be monitored on a separate web-page. Cloud-based unit testing (in theory) could be integrated directly into the developer's IDE, so it would feel similar to running the tests locally.

Advantages of cloud-based unit test execution over local:

* When working with a very large code base, with a large number of tests, and not well de-coupled, we might want to run all the tests. An optimised cloud environment might be able to do this faster than a dev box, and without consuming resources which could cause our IDE and other tools to slow down.

So far I don't know of any platforms that actually do this, but perhaps the aforementioned automation testing platforms could be configured/tweaked to enable it.

What do you think?
Java 語言筆記
Tags: java
Published: 2023-06-17 14:24:06

## 迴圈控制

### Break

`break` 用來中斷整個迴圈：

```java
for (int i = 0, i < 10, i++) {
    if (i = 2) {
        break; // i = 2 就中斷整個迴圈
    } else {
        System.out.println(i);
    }
}
```

輸出：

```
0
1
```

### Continue

`continue` 用來略過某次迴圈：

```java
for (int i = 0, i < 5, i++) {
    if (i = 2) {
        continue; // 跳過 i = 2 的迴圈
    } else {
        System.out.println(i);
    }
}
```

輸出：

```
0
1
3
4
```

### Label

如果是巢狀迴圈的話勒？

Java 的迴圈是可以命名的，稱為 label，可以指定要 `break` 或 `continue` 的是哪一層的迴圈：

```java
labelA: while (i > 0) {
    labelB: while (j > 0) {
        if (j = 2) {
            break labelA; // 會中斷整個 labelA
        }
    }
}
```

帥吧！


## 常數

很簡單，在宣告前加個 final 關鍵字就是常數，如同多數程式語言，常數的命名習慣上全大寫。

```java
final int MY_ANGEL = 689;
```

常數建立後是不能修改的，編譯時會檢查。
Gleamy, print-foil on the web.
Tags: npm, svg, react, opensource
Published: 2023-06-17 14:21:45

Hey there y’all!

🎉 Are you tired of staring at boring, lackluster websites? Get ready to break open the piñatas and unleash the confetti! 🎊 Gleamy's new React library is here, and it's more exciting than finding a glitter bomb in your mailbox! 💥 Get it on NPM! https://www.npmjs.com/package/gleamy
Say goodbye to dull dishwasher water and hello to vibrant, customizable UIs. Don’t want to explore the code library? Try the ‘Glam generator’, a powerful configurator on the Gleamy website. 💻 https://www.gleamy.dev/ 

--
Some background: I've been a bit bored with the minimal design philiosophy. I mean, yes, it's of course a lot cleaner, but it also gets boring at times. So I've decided to start something that gets back some of that shineyness of when we still printed a lot more things. The web is limited in terms of this kind of stuff, and I thought it would be great for some companies to be able to "foil" their logo. So,... this is what I've done. 

The project is far from "done", but then again, when is software really done?. I hope to get some traction to keep developing this NPM package as open source. There's plenty of ideas for additions.

Other than the goal of bringin more shineys to the web, I hope to gain some more sponsorship to be able to work a bit more on Gleamy, and at some point, sell merchandise to be able to contribute to support neurodiversity.
Difference between Dimension and Fact tables in SQL
Tags: datawarehousing, sql, analytics, datamodelling
Published: 2023-06-17 14:02:17

In SQL and data warehousing, dimension and fact tables are two types of tables used in a star schema or snowflake schema to model and organize data. They serve different purposes and play key roles in data analysis and reporting. Here are definitions and real-life examples of dimension and fact tables:

**Dimension Tables:**
- Dimension tables contain descriptive attributes that provide context and additional information about the facts in a data warehouse.
- Dimension tables are typically small in size and have a one-to-many relationship with fact tables.
- They are used to categorize, filter, and group data for analysis.
- Examples of dimension tables:
  - `Customers`: Contains information about customers, such as customer ID, name, address, demographics, etc.
  - `Products`: Contains details about products, including product ID, name, category, price, etc.
  - `Time`: Contains time-related information, such as date, month, quarter, year, etc.
  - `Locations`: Contains information about geographic locations, such as country, city, region, etc.

**Fact Tables:**
- Fact tables contain quantitative and numeric data, also known as facts, and are the central focus of analysis in a data warehouse.
- Fact tables typically have a large number of rows and capture the measurements or metrics associated with business processes.
- They have foreign key relationships with dimension tables, enabling data aggregation and slicing based on various dimensions.
- Examples of fact tables:
  - `Sales`: Contains information about sales transactions, including the product sold, customer involved, date of sale, quantity, revenue, etc.
  - `Inventory`: Contains data about available inventory quantities for various products, locations, and time periods.
  - `Website Visits`: Contains data about website visits, including visitor ID, page visited, duration, timestamp, etc.
  - `Call Center Logs`: Contains data about call center interactions, such as call duration, agent involved, customer ID, call outcome, etc.

In summary, dimension tables provide descriptive attributes and serve as the "who, what, where, and when" context for analysis, while fact tables store the numerical measurements or facts associated with business processes. Together, they form the foundation for multidimensional analysis and reporting in data warehousing scenarios.
Data Warehousing: The Context
Tags: database, warehousing, sql, analytics
Published: 2023-06-17 14:01:19

In the context of data warehousing, several components come together to form a comprehensive data warehousing environment. These components include:

**1. Data Sources:**
Data sources are systems or databases from which data is extracted to be stored in the data warehouse. These can include transactional databases, legacy systems, external data feeds, spreadsheets, and more. Data from various sources is collected and consolidated for analysis and reporting purposes.

**2. Extract, Transform, Load (ETL) Process:**
The ETL process involves extracting data from the source systems, transforming it into a suitable format for analysis, and loading it into the data warehouse. This process includes data cleansing, data integration, data transformation, and data loading tasks. ETL tools or custom scripts are commonly used to automate this process.

**3. Data Warehouse:**
The data warehouse is a central repository that stores large volumes of historical and current data from different sources. It is specifically designed for analytical purposes and provides a consolidated view of the data. The data warehouse typically employs a schema such as a star schema or snowflake schema to organize data into dimension and fact tables.

**4. Dimensional Modeling:**
Dimensional modeling is a design technique used in data warehousing to structure the data in a way that facilitates efficient querying and analysis. It involves creating dimension tables that describe the context of the data (e.g., customers, products, time) and fact tables that contain the numerical measures or facts associated with business processes.

**5. Business Intelligence (BI) Tools:**
Business Intelligence tools are used to analyze and visualize data stored in the data warehouse. These tools provide capabilities for creating reports, dashboards, ad hoc queries, and data visualizations. They enable users to gain insights, perform data exploration, and make informed business decisions based on the data.

**6. Data Mart:**
A data mart is a subset of the data warehouse that focuses on a specific department or business area within an organization. Data marts are typically created by selecting and aggregating relevant data from the data warehouse to meet the specific needs of a particular user group or department.

**7. Reporting and Analysis:**
Reporting and analysis involve using the data stored in the data warehouse to generate reports, perform ad hoc queries, and gain insights into business performance. Analysts and business users can leverage reporting tools and ad hoc query capabilities to explore the data, identify trends, track key performance indicators (KPIs), and support decision-making processes.

These components collectively form the data warehousing context, enabling organizations to store, integrate, and analyze large volumes of data to support business intelligence and decision-making activities.

_Image credit: https://corporatefinanceinstitute.com/resources/business-intelligence/data-warehousing/_
Code Debugging with AI for 5x speed!
Tags: code, development, programming, beginners
Published: 2023-06-17 13:30:00

Why is code debugging important, you ask? Well, my fellow developers, it's the superhero skill that saves you from countless hours of frustration and helps you build clean and reliable code! 💪🔍

**DON'T WANNA READ THE LONG POST?**
[FIND THE LINK TO ALL AI](https://www.aiforme.wiki/?search=DEBUGGING)

Now, let's unveil three game-changing AI tools that will revolutionize your code debugging process! ✅

1️⃣ [DebugPT](https://www.aiforme.wiki/ai/tools/DebugPT):
🖥️ Say hello to your AI debugging companion! DebugPT is an AI-powered desktop application that identifies potential bugs, provides code corrections, and assists programmers in debugging their code. It's user-friendly, promises to improve code debugging, and is a promising tool for developers of all levels.

2️⃣ [DebugCode.AI](https://www.aiforme.wiki/ai/tools/Debugcode):
🚀 Need fast and accurate debugging solutions? Look no further! DebugCode.AI, a free tool from codedamn.com, uses advanced AI technology to quickly detect errors and provide accurate solutions. With its user-friendly interface and integration with codedamn.com's platform, it's a practical and accessible tool for developers.

3️⃣ [CodeI](https://www.aiforme.wiki/ai/tools/Codel): 
🕵️‍♀️ Unlock the secrets of efficient debugging with CodeI! This AI-powered application helps developers quickly find and debug code. With code snippets, error identification, resolution assistance, and examples for basic tasks, it's a comprehensive debugging toolkit.

Don't let bugs hold you back! These AI tools will turbocharge your debugging process and help you build robust code with ease. Click the link to explore more about these incredible tools!

**Get ready to debug like a pro! 🚀💻**

[FIND THE LINK TO ALL AI](https://www.aiforme.wiki/?search=DEBUGGING) 🌐💻 

#CodeDebugging #AITools #AI
What you learning about this weekend?
Tags: codenewbie, discuss, learning, beginners
Published: 2023-06-17 13:00:00

Hey folks 👋

What ya learning on this weekend?

Whether you're sharpening your [JS](https://dev.to/t/javascript) skills, making PRs to [your OSS repo of choice](https://github.com/forem/forem) 😉, sprucing up your portfolio, or [writing a new post](https://dev.to/new) here on DEV, we'd like to hear about it.

Wishing ya the best on your work... remember to take breaks and enjoy yourself!

![A scene from the opening theme to Rocko's Modern Life where Rocko has a massive book titled "Knowledge" crammed into his head.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c0e54qib5bfper7ss6yh.gif)
Intro
Published: 2023-06-17 12:54:14

Hello world!

I'm Kelly, a full-stack software developer since 2009. I have always loved technology from my early teen age. Does that make me a tech-enthusiast? Oh, yes!

I have watched several technologies evolve in the last 13 years (as at the time of this post), and I can tell what is good, sustainable and worthy of adoption.

I am the founder and CEO of Bloomnet Digital Technologies Limited, and have founded and co-founded alot of other startups and tech innovations. I also have a professional career in the Fast-Moving Consumer Goods industry (FMCG), as a data/tech-sales analyst, having currently worked with over 3 big multinationals.

I have always wanted to write about technology, but somehow, I get lazy and procrastinate.

Today, I have decided to start putting something out here, no matter what and no matter the source. Someone might need what I have to offer.

So, I am going to use this medium to express myself, my tech-belief, share my experience and perhaps some nice codes for learners.

Hoping to have an interesting technical writing journey right here on dev.to.

Learn with me, but judge me not because I am going to do it my way on this channel.

Cheers.


-Kelly
GDG Prayagraj
Tags: gdg, gdgprayagraj, community, uttarpradesh
Published: 2023-06-17 12:30:34



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








Google Developers Group Prayagraj (GDG Prayagraj) is for developers who are interested in Google's developer technology; everything from the Android, App Engine, and Google Chrome platforms, to product APIs like the Maps API, YouTube API and Google Calendar API.



We organize CodeLabs, tech talks, hackathons, Extended events, devFests, and study jams.

The group is free to attend and open to all who are interested in discussing and learning more about software development with tools and technologies from Google or the open-source community.



join group https://t.me/gdgprayagraj
Simple ChatBot with tests
Tags: osdc, python
Published: 2023-06-17 12:18:26

Hi all,
The NLP field is pretty amazing, specially with ChatGPT4 around, so as part of my MSc studies I tried to learn a bit about the techniques used to build such AI systems.
I looked around in Github and found several repositories implementing chatbots, so I used some of them to build [this Encoder/ Decoder based chat model](https://github.com/FredAdiv/Chatbot).
It uses an [intents.json](https://github.com/FredAdiv/Chatbot/blob/main/intents.json) file which is contains several input patterns and optional responses.
The readme file relates to some of the sources I used.

#Using the chatbot:

1. Clone the repository to your local computer:
_git clone https://github.com/FredAdiv/Chatbot_

2. (_Optional_) I suggest you use a docker container for the project. This is a sample command line for creating such a container:
_docker run -it --name chatbot -w /opt -v c:\users\<username>\chatbot:/opt python:3.11 bash_

3. If the container was created but didn't open then 
use the following command: 
_docker container start -i chatbot_

4. Install dependencies from the requirements file:
_pip install requirements.txt_

5. (_Optional_) Use pytest to make sure that everything works:
_pytest_

6. Run the bot:
_python chat.py_

Happy Chatting.
Custom 404 Page in Nuxt
Tags: vue, nuxt, nuxt3
Published: 2023-06-17 11:59:53

## How to create a custom [Nuxt3](https://nuxt.com) error page  
  
**NOTE:** This solution is for projects using both the Layout and Page directory options in Nuxt and assumes you already have those directories set up. 

If you want to skip right to the demo, see the Stackblitz [here](https://stackblitz.com/edit/nuxt3-custom-404?file=layouts%2F404.vue). 

---

**Step 1.** First step is to create the 404 layout file inside the layout directory using the Nuxt CLI tool [nuxi](https://nuxt.com/docs/api/commands/add), as well at your error page at root. 

```
npx nuxi add layout 404
touch error.vue
```
Note: please `error.vue` goes at root, not in pages

**Step 2.** Update your error page: 
```
<template>
  <NuxtLayout name="404">
    <div>
      <div class="text-4xl">You've Arrived Here on Error, boss</div>
      <button class="font-bold button" @click="goBack">Back</button>
    </div>
  </NuxtLayout>
</template>

<script>
export default {
  methods: {
    goBack() {
      this.$router.push('/')
    }
  }
}
</script>

<style scoped>
.button {
  padding: 4px 6px;
  margin: 10px 0px;
  background: black;
  color: white;
}
</style>
```

Notice, the `NuxtLayout` template accepts a prop allowing you to pass the name of your 404 page layout template. 

Step 3. Style your layout by adding your navbar or whatever else is appropriate for your website. 

--- 

Read more about Nuxt error handling [here](https://nuxt.com/docs/getting-started/error-handling).

And if you want to learn more about `NuxtLayout` you can go [here](https://nuxt.com/docs/api/components/nuxt-layout#nuxtlayout).

Again, you can visit the Stackblitz here: https://stackblitz.com/edit/nuxt3-custom-404?file=layouts%2F404.vue
Javascript 【tricky】💡interview output questions (Part 1)
Tags: javascript, webdev, frontend, beginners
Published: 2023-06-17 11:48:11

## What is the output for each code mentioned below and Why ? 
Add your solutions with explanation in the comment section.

### **Question 1**
```javascript
(function(){
  var variable1 = variable2 = 3;
})();
console.log("variable1 defined? " + (typeof variable1 !== 'undefined'));
console.log("variable2 defined? " + (typeof variable2 !== 'undefined'));
```

### **Question 2**
```javascript
var myObject = {
    value: 1,
    printVal: function() {
        var self = this;
        console.log("printVal:  this.value = " + this.value);
        console.log("printVal:  self.value = " + self.value);
        (function() {
            console.log("inner printVal:  this.value = " + this.value);
            console.log("inner printVal:  self.value = " + self.value);
        }());
        } };
myObject.printVal();
```

### **Question 3**
```javascript
console.log(0.1 + 0.2);
console.log(0.1 + 0.2 === 0.3);
```

### **Question 4**
```javascript
for (var i = 0; i < 5; i++) {
  setTimeout(() => console.log(i), 1000 * i);
}
```

### **Question 5**
```javascript
var arr1 = "john".split("");
var arr2 = arr1.reverse();

arr2.splice(arr2.length - 1, 1);

console.log("array 1: length=" + arr1.length + " last=" + arr1.slice(-1));
console.log("array 2: length=" + arr2.length + " last=" + arr2.slice(-1));
```
Talking About Digital Marketing
Tags: developers, career, careerdevelopment
Published: 2023-06-17 11:34:51

The Tech field has indeed taken hold of the world, placing its feet on almost every ground in the world's economy. Along with this is the vast change of career paths of people all over the world with sub-fields in Tech as their goal. One of these sub-fields is what I'll be shedding light on in this article. 
**Digital Marketing** 
Digital Marketing entails the entire process of bringing the knowledge of various products and services to the minds of end-users using the internet. It possesses the advantage of speed, a larger audience, and is pocket-friendly compared to other forms of marketing.
**Digital Marketer**
A Digital Marketer anchors the process of Digital Marketing. He/she can wield the power of the internet in favour of his/her client. 
**Getting Started**
If you are a novice when it comes to Digital Marketing, keep reading because this article is for you as I will be bringing to you insights on the field as well as easy-to-take steps in kick-starting a career as a Digital Marketer. 

1. Research the field and all it entails. 
2. Take up online courses. I suggest you start with free courses. 
3. Get into a community of like minds for growth, consistency, and accountability. 
4. Create milestones as regards your learning process. Add time frames to your goals and let them be feasible. 
5. Put to use the knowledge that you acquire as you progress. 
6. Market yourself. 
Concluding, do not delay your success, make a plan and put it in motion. I'm rooting for you all the way.
Join our Thriving #PHP Uzbekistan Group!
Tags: php, laravel, community, uzbekistan
Published: 2023-06-17 11:12:29

Here are some key features of our **PHP Community Group**:

1. Networking Opportunities: Connect with like-minded professionals, expand your network, and foster new business relationships with PHP developers from various backgrounds and industries.
2. Knowledge Sharing: Engage in insightful discussions, ask questions, and share your expertise. The group thrives on the collective knowledge and experiences of its members.
3. Job Opportunities: Stay informed about PHP job openings and career prospects shared by group members or potential employers seeking PHP talent.
4. Industry Insights: Receive updates on the latest PHP frameworks, tools, best practices, and emerging trends to stay ahead in your PHP development journey.

To join our **PHP Community Group**, simply click this link:
https://lnkd.in/dH4BKvtV
120 Days Of Learning DevOps
Published: 2023-06-17 10:36:15

Good day Everyone, How are we all doing? i ought to have drop my lessons for yesterday but i'm sorry i couldn't drop what i learnt. reason been that i got engaged in some activities that took my time which made me had little time to study. though i did a littke study but i,m yet to get my head wrap around it fully.
 i promise to continue with day 4 today. Thanks