teleren/devto huggingface dataset:
Leverage the power of the community
Tags: aws, productivity, career, news
Published: 2022-12-16 10:16:32


AWS has joined Collectives on [StackOverflow](https://stackoverflow.com/).

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

**What does it mean?**

As a [StackOverflow](https://stackoverflow.com/users/7013263/dejanualex) user and contributor, I can say that this is  the next step toward unlocking the power of the community.

With around 507k questions and answers, you have centralized and trusted knowledge at scale.

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

I strongly recommend checking the [AWS Collectives page](https://stackoverflow.com/collectives/aws), which is more than a home page it's a dedicated space that contains articles and bulletins, besides questions and answers. You can quickly check the latest events and releases  for example re:Invent 2022.

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

Just to put these numbers in perspective, currently, there are 236k questions with curated answers, and when one searches for a particular answer most often beside the official documentation a StackOverflow link will be right there, meaning that you can unlock the power of the community, and take advantage from others previous experience.


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



To sum up,  this is a great entry point into a technical community in which everybody can share, learn and grow.
Comment réaliser un Timer en Javascript
Published: 2022-12-16 10:12:37

Pour créer un Timer en Javascript, tout d'abord il faut commencer par créer 3 fichiers dans votre dossier: un fichier HTML, Un fichier CSS pour le style et un fichier Javascript pour interagir avec le DOM ( Notre fichier HTML ).

```
Index.html
app.css
index.js

```
Ensuite, nous allons vite créer un `div` qui va contenir notre Timer. Le Timer que nous allons créer va décrémenter à partir de 25min, lorque vous le lancez. 

```

 <div class="container">  
        <h1 id="counter">
            <span id="text"> 25 : 00 </span>
        </h1>
 </div>

```
N'oubliez pas de relier vos fichiers pour qu'ils interagissent entre eux ! Dans notre cas ici, nous allons relier notre fichier Javascript à l’intérieur de notre HTML comme ceci : 

```

 <script src="./index.js"></script>

```
Ce qui nous reste maintenant, c'est d'aller écrire du code dans notre index.js.
Pour interagir avec le DOM, nous devons sélectionner l'élément que nous souhaitons modifier, à partir de notre fichier Javascript. Et cela, nous allons le faire comme ceci :

```
document.getElementById("counter").textContent = "00 : 00"

```
Ce code, nous allons le mettre à l'intérieur de la fonction **setInterval**. En JavaScript, setInterval est plus utilisé pour déclencher des action après un intervalle de temps donné, ou de la répéter après un intervalle de temps. Voici ce que cela va nous donner:

```
setInterval(function () {
    if (minutes == 0 && secondes === 1) {
        document.getElementById("counter").textContent = "00 : 00"
    } 

```
À ce niveau nous avons crée une fonction avec la méthode setInterval. Nous avons posé une condition qui est tel que, les minutes lorqu'ils serons à 0 et les secondes à 1, que l'élément "counter" qui est sélectionné puisse afficher **"00 : 00"**, dans le cas contraire, il va décrémenter ! 

```
else {
        secondes--;
        if (secondes == 0) {

            minutes--;
            secondes = 60;
            if (minutes == 0) {
                minutes = minutes

            }
```
 Puis Ceci :

```
if (minutes.toString().length == 1) {
            minutes = "0" + minutes;
        } if (secondes.toString().length == 1) {
            secondes = "0" + secondes;
        }
        document.getElementById("counter").textContent = minutes + ":" + secondes;
    }
}, 1000)

```

et enfin voilà, la décrémentation de notre Timer va débuter à partir de 25 min et les seconde décrémenterons à partir de 60min..
How to check Cypress Services Status
Published: 2022-12-16 09:44:07

When you want to see if a specific website or service is working you generally open websites like https://downforeveryoneorjustme.com/ or https://down.com/ to check if others have the same issue and to calm a bit down.

But what do you do if you are running tests in Cypress Cloud ( see below ) or you run Cypress in a Docker image and for some reason, that you cannot figure out, somenthing is not working?


Cypress Status to the rescue

Cypress has a website (https://www.cypressstatus.com/#) dedicated to showing the current status of its services.

On the main page you can immediatly see if there are any services that currently have issues



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ps7y31r5ogh5dqxmu10.jpg)





Add alt text
No alt text provided for this image
You can also see a full overview of the most important services and their availability for the past 90 days




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




Add alt text
No alt text provided for this image
In case you are interested to see any past incidents, there is a list at the bottom of the page, in chronological order.




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5lhlct0v8unxhh8gdww8.jpg)




Add alt text
No alt text provided for this image
Also in case you do not want to load the page each time you think a Cypress service has an issue, there is the possibility to subscribe and get notification when Incidents are created, modifed or resolved.



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





Add alt text
No alt text provided for this image
Review and comment

Next time you want to know if all Cypress services are working you can use the website and its information. Have a look at the page, explore it and comment what do you think about the information offered, what would you change.
FuzzingWeekly CW 50
Tags: security, fuzzing, cybersecurity, testing
Published: 2022-12-16 09:42:53

Understanding Fuzz Testing in Go
-> https://blog.jetbrains.com/go/2022/12/14/understanding-fuzz-testing-in-go/

Fuzzing Golang msgpack for fun and panic
-> https://redcanary.com/blog/fuzzing/

Finding JIT Optimizer Bugs using SMT Solvers and Fuzzing
-> https://www.pypy.org/posts/2022/12/jit-bug-finding-smt-fuzzing.html#
Dating site for developers
Tags: dating, metamask, relocate, hiring
Published: 2022-12-16 09:41:36

Friends, I would like to share with you my wonderful and free project that will be of interest to you.

I have created a free dating site [https://it-dating.org/](https://it-dating.org/) for programmers (and not only) where you can find new friends, useful contacts, as well as a soul mate.

Forget about boring authorization.

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

You can register in two click via telegram or chrome metamask extension.

After registration, a nice profile account is available to you.


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

Go to the map (your country will detect automatically)

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

Choose city and looking for intresting person by tech skills

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

Or by interests

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

Enjoy [https://it-dating.org/]
Entry level remote jobs - RevampedCP
Tags: webdev
Published: 2022-12-16 09:11:48

####   Original Tweet From  [@RevampedCP](https://twitter.com/RevampedCP)
{% embed https://twitter.com/RevampedCP/status/1602358299449597952 %}
 


#### Associate, Primary Servicing
🏢 Company: [@situsAMC](https://twitter.com/situsAMC) 
💰 Salary: $50K - $85K 
🎓 Education: Associates degree or equivalent experience 
📄 YOE: Entry level, no years needed 
🔗 Application: https://careers.situsamc.com/job-detail/associate-primary-servicing-13975?utm_campaign=LinkedInSponsored

AdSpace Here!!


#### Associate Actuary, Product Performance
🏢 Company: [@getEthosLife](https://twitter.com/getEthosLife) 
💰 Salary: $70K+ 
🎓 Education: BS/BA
📄 YOE: Entry level, no years needed 
🔗 Application: https://boards.greenhouse.io/ethoslife/jobs/6361000002?gh_src=1854b75c2&source=LinkedIn

AdSpace Here!!


#### Account Executive
🏢 Company: [@Cerosdotcom](https://twitter.com/Cerosdotcom) 
💰 Salary: $70K - $110K 
🎓 Education: Not required 
📄 YOE: At least 2 YOE
🔗 Application: https://labs.ceros.com/jobs/?gh_jid=4481454&gh_src=810ef0911us&source=LinkedIn#/job/4481454


#### Sr. Finance Systems Analyst
🏢 Company: [@SeatGeek](https://twitter.com/SeatGeek) 
💰 Salary: $70K - $110K 
🎓 Education: Not required 
📄 YOE: 2+ years 
🔗 Application: https://boards.greenhouse.io/embed/job_app?token=4477153&gh_src=94e407181&source=LinkedIn

AdSpace Here!!



#### Multiple Job Openings 
🏢 Company: [@Affirm](https://twitter.com/Affirm) 
💰 Salary: $80K - $104K 
🎓 Education: Not required, experience preferred 
📄 YOE: 1+ YOE
🔗 Application:  https://boards.greenhouse.io/affirm/jobs/5440934003?gh_src=689c81d53us 




#### Account Executive - Corporate Sales
🏢 Company: [@Xometry](https://twitter.com/Xometry) 
💰 Salary: 85K+ 
🎓 Education: Degree not required 
📄 YOE: 2+ YOE in Sales 
🔗 Application: https://jobs.lever.co/xometry/91793e68-ae42-48ab-ade2-14644a0bab94?lever-source=LinkedInJobs

AdSpace Here!!


#### Auditor II (Retail)
🏢 Company: [@Cotiviti](https://twitter.com/Cotiviti) 
💰 Salary: $75K+
🎓 Education: Bachelor’s required 
📄 YOE: At least 2 YOE
🔗 Application:  https://careers-cotiviti.icims.com/jobs/9350/auditor-ii-%28retail%29/job 



#### Credit Specialist - Square Financial Services
🏢 Company: [@Square](https://twitter.com/Square) 
💰 Salary: $85K+ 
🎓 Education: Associate or Bachelors  
📄 YOE: 1+ YOE
🔗 Application: https://jobs.smartrecruiters.com/Square/743999866413278-credit-specialist-square-financial-services?source=Linkedin



Click [Here](https://www.knowledge-twitter.com/?utm_source=dev.to)  For More Posts Like This [https://www.knowledge-twitter.com](https://www.knowledge-twitter.com/?utm_source=dev.to)
Open-source low-code application and automation builder
Tags: webdev, opensource, beginners
Published: 2022-12-16 09:11:35

Hi,

In this announcement post, I introduce the open-source platform [DoTenX](https://dotenx.com). 

With DoTenX you can build websites, landing pages, web apps, APIs, automation and much more without any coding or with your custom code.

I'm excited to announce the release of DoTenX v3, an open-source alternative for bubble, webflow, carrd, zapier...

Repository:
https://github.com/dotenx/dotenx

Visit https://dotenx.com
useState vs useReducer - choose your champion 🤺
Tags: webdev, react, javascript, beginners
Published: 2022-12-16 09:09:53


Below are two ways of implementing a simple counter in a React application:

**Here's how to achieve that with useReducer:**


```javascript
import { useReducer } from 'react';

const initialState = {
  count: 0,
};

const reducer = (state, action) => {
  switch (action.type) {
    case "increment":
      return { count: state.count + 1 };
    case "decrement":
      return { count: state.count - 1 };
    default:
      return state;
  }
};

function ParentComponent() {
  const [state, dispatch] = useReducer(reducer, initialState);

  return (
    <div>
      <p>Count: {state.count}</p>
      <ChildComponent dispatch={dispatch} />
    </div>
  );
}

function ChildComponent(props) {
  return (
    <div>
      <button onClick={() => props.dispatch({ type: "increment" })}>
        Increment
      </button>
      <button onClick={() => props.dispatch({ type: "decrement" })}>
        Decrement
      </button>
    </div>
  );
}

```

**Here's how to  achieve that using useState**

```javascript
import { useState } from 'react';

function ParentComponent() {
  const [state, setState] = useState({ count: 0 });

  return (
    <div>
      <p>Count: {state.count}</p>
      <ChildComponent setState={setState} />
    </div>
  );
}

function ChildComponent(props) {
  return (
    <div>
      <button onClick={() => props.setState({ count: props.count + 1 })}>
        Increment
      </button>
      <button onClick={() => props.setState({ count: props.count - 1 })}>
        Decrement
      </button>
    </div>
  );
}

```

Which one are you picking and why?
25 Best websites to stay up-to-date for web developers in 2023
Tags: webdev, beginners, programming, tutorial
Published: 2022-12-16 09:09:51

25 Best websites to stay up-to-date for web developers in 2023
Here is the compiled list of the [25 best websites for web developers in 2023](https://www.hmablogs.com/best-websites-for-web-developers/):

**Below are the 4 Most Useful Jobs Websites for Web Developers:**
1. LinkedIn
2. Upwork
3. Freelancer
4. Fiverr

**Best News Websites for Web Developers:**
1. Hacker News
2. Designer News
3. Reddit
4. A List Apart
5. DEV Community
6. Slashdot

**Here is the list of 5 Most Useful Tutorials Websites for Developers:**
1. Google Developers
2. Smashing Magazine
3. GeeksforGeeks
4. CSS-Tricks
5. W3Schools

**The 5 most useful Code Challenges Websites for Web Developers:**
1. Codewars
2. HackerRank
3. CodeCombat
4. LeetCode
5. CodeChef

**Here is the list of 5 Best Networking Websites for Web Developers:**

1. Coderwall
2. GitHub
3. Stack Overflow
4. CodePen
5. Tech Twitter

To learn more details visit the blog post link: 
{% embed https://www.hmablogs.com/best-websites-for-web-developers/ %}
4 ways to check file size in Linux
Tags: linux, beginners, cloud, webdev
Published: 2022-12-16 08:22:35

The file size is an important factor for many reasons. Whether you are trying to save space on your hard drive or just need to know the size of a file, it's helpful to know how to get this information in Linux. 
In this blog post, we will discuss four different ways to get file size in Linux. We will also provide tips on how to use each method. Let's get started!

If you want to know the details about each command, you can check the following link.

[4 ways to check file size in Linux](https://www.howtouselinux.com/post/check-file-size-in-linux)


1. Checking File Size with the “du” Command: The du command is a very useful tool for getting file size in Linux. To check file size, type "du -sh filename" and hit enter. 
This will display the size of the file, as well as any subdirectories within it. You can also use the du command to check directory size. To do this, type “du -sh directoryname” and hit enter. 



2. Checking File Size with the “ls” Command: The ls command is another way to get file size in Linux. To check file size, simply type "ls -l filename" and hit enter. 
This command will display the size of the file in a format that is easier to read. 


3. Checking File Size with the “stat” Command: The stat command is another way to get file size in Linux. To check file size, type "stat filename" and hit enter. This will display detailed information about the file, including its size. 


4. Checking File Size with the “find” Command: The find command is an advanced way of getting file size in Linux.
 To check file size, type "find filename -size n" and hit enter. This will display all files in the directory that are exactly n bytes in size. 

Subscribe to HowToUseLinux!

Unlock the power of Linux with a click! Stay ahead of the curve with the latest trends, tools, and tricks in the Linux world. [Subscribe now and transform your Linux journey! ]
(https://www.howtouselinux.com/subscribe)

We are also looking for writers.

These are just a few methods of getting file size in Linux. With these tips, you can easily get the information you need to manage your files and directories on Linux systems. Do you have any tips for getting file size in Linux? Let us know in the comments section below! Thanks for reading.
Apache Airflow - Steps by steps
Published: 2022-12-16 06:00:33


![Airflow logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bisjinpdsnvjv5macj6c.png)

**Apache Airflow** is an open-source platform for managing and scheduling data pipelines. It is commonly used in data engineering and data science to orchestrate and automate complex workflows, such as data ingestion, data transformation, and data analysis.

Here are the steps to build an Apache Airflow pipeline:

-  Install Apache Airflow: To use Apache Airflow, you need to install it first. You can install Apache Airflow either using pip or by downloading the source code and installing it manually. 

-  Set up a database: Apache Airflow uses a database to store its metadata, such as the list of tasks, their dependencies, and their execution history. You can use either a built-in database (such as SQLite) or a separate database service (such as MySQL or PostgreSQL). 

-  Define the pipeline: A pipeline in Apache Airflow is a directed acyclic graph (DAG) of tasks that need to be executed. To define a pipeline, you need to create a Python script and define a DAG object in it. Within the DAG, you can define individual tasks and their dependencies. 


![bashoperator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1iq4171jvsgv0q5crgcl.png)



-  Create tasks: Tasks in Apache Airflow are represented by Operators, which are classes that define the behavior of a task. There are various types of operators available in Apache Airflow, such as BashOperator for executing a Bash command, PythonOperator for executing a Python function, and others. 

-  Set up the execution schedule: To run a pipeline, you need to specify when and how often the pipeline should be executed. This can be done by setting the start_date and schedule_interval parameters of the DAG object. 


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


-  Test the pipeline: Before deploying the pipeline, it is a good idea to test it locally to make sure it is working as expected. You can do this by starting the Apache Airflow web server and running the pipeline in the web UI. 

-  Deploy the pipeline: Once you have tested the pipeline and are satisfied with the results, you can deploy it to the Apache Airflow environment. This can be done by committing the DAG Python script to a version control system and pushing it to the Apache Airflow environment. 

-  Monitor and maintain the pipeline: After deploying the pipeline, you need to monitor it to make sure it is running as expected. You can use the Apache Airflow web UI or the command-line interface to view the status of the pipeline and troubleshoot any issues that may arise. You should also regularly maintain the pipeline by updating it as needed and cleaning up old data to keep it running efficiently.
Kotlin Code Smell 11 - God Objects
Tags: kotlin, codesmells, cleancode, programming
Published: 2022-12-16 11:51:31

---
title: Kotlin Code Smell 11 - God Objects
published: true
date: 2022-12-16 08:30:42 UTC
tags: kotlin,codesmells,cleancode,programming
canonical_url: https://yonatankarp.com/kotlin-code-smell-11-god-objects
---
> **TL;DR:** Avoid taking on excessive responsibilities. Use the single responsibility principle.

## Problems

* Lack of cohesion
    
* Tight coupling
    

## Solutions

* Split responsibilities.
    
* Follow the [Single Responsibility Principle](https://en.wikipedia.org/wiki/Single-responsibility_principle).
    
* Follow [**The Boy Scout Rule.**](https://en.wikipedia.org/wiki/Single-responsibility_principle)
    

## Examples

* Libraries
    

## Exceptions

* [**Facades**](https://en.wikipedia.org/wiki/Facade_pattern)
    

## Sample Code

### Wrong

```kotlin
class Soldier {
    fun run() {}
    fun fight() {}
    fun driveGeneral() {}
    fun clean() {}
    fun fire() {}
    fun bePromoted() {}
    fun serialize() {}
    fun display() {}
    fun persistOnDatabase() {}
    fun toXML() {}
    fun jsonDecode() {}
    //...     
}
```

### Right

```kotlin
class Soldier {
    fun run() {}
    fun fight() {}
    fun clean() {}
}
```

## Conclusion

In Object-Oriented Programming, we distribute responsibilities among multiple objects.

---

Stay updated with my latest thoughts and ideas by registering for my [**newsletter**](https://yonatankarp.com/newsletter). Connect with me on [**LinkedIn**](https://www.linkedin.com/in/yonatankarp/) or [**Twitter**](https://twitter.com/yonatan_karp). Let's stay connected and keep the conversation going!

---

## More info

* [God object - Wikipedia](https://en.wikipedia.org/wiki/God_object)
    
* [The S.O.L.I.D principles - Wikipedia](https://en.wikipedia.org/wiki/SOLID)
    
* [Refactoring Guru](https://refactoring.guru/es/smells/large-class)
    
* [Coupling](https://maximilianocontieri.com/coupling-the-one-and-only-software-design-problem)
    

## Credits

* [Code Smell 14 - God Objects](https://maximilianocontieri.com/code-smell-14-god-objects) by @[Maxi Contieri⭐⭐⭐](@mcsee)
DayNews24
Published: 2022-12-16 08:12:51

DayNews24  was created to help you promote your products or services.

 

Publishing articles online is an effective method of promotion, because it requires more work and your creativity is rewarded by Google .

 

By posting articles online you can increase the notoriety of your business, increase the confidence of potential customers who will be looking for information about your company, so that the sale of the products or services offered will be easier.

 

DayNews24 is an [online article](https://www.daynews24.ro) and press release directory that gives users the ability to publish articles online to generate traffic for their own websites.
Google BigQuery Tutorial | Analyze Data in BigQuery | Google Cloud Platform Training
Tags: bigquery, tutorial, beginners
Published: 2022-12-16 07:25:00

This Edureka video on 'Google BigQuery Tutorial' will provide an overview of the BigQuery service on Google Cloud Platform and its many services. It will also assist you in understanding crucial topics such as its architecture, features, price, and so on through real application. We will do a hands-on demonstration to analyse data from Stack Overflow and determine the top ten technologies that are currently trending.
{% embed https://www.youtube.com/watch?v=uSrV2N5H9YA %}
AWS: Lambda function
Published: 2022-12-16 07:20:08

**Amazon Lambda** is a serverless computing platform that allows you to run code in response to specific events or triggers. 

A Lambda function is a piece of code that is executed by the Lambda service in response to a trigger.

Here is an example of how you might use a Lambda function:

Imagine that you have a web application that allows users to upload images. When a user uploads an image (an event), you might want to automatically resize the image and create a thumbnail version. To do this, you could create a Lambda function that is triggered by the upload event and performs the image resizing.

The Lambda function might look something like this:


![AWS lambda function](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fvje87trmxht8nu7zryv.png)


This is just one example of how you might use a Lambda function. You can use Lambda functions to perform a wide variety of tasks, such as processing data streams, automating back-end tasks, and integrating with other AWS services.