teleren/devto huggingface dataset:
Good architecture is saved money
Tags: webdev, architecture
Published: 2022-12-21 22:22:06

Good architecture minimizes the time for developers to read and maintain code, but to make it real, you need to invest significant time in organizing your code and correspondingly money.
To fix it:
Think of architecture in the beginning
Not violate the patterns of the organization of the code during development.

What factors should I take into account before building a new application?

## Potential load
if it's an application from scratch and you don’t have an existing application that you want to rewrite or redesign, it doesn’t mean you should make it without thinking about possible difficulties when real traffic starts to grow. If it's hard to predict and calculate, make a beta version with minimal functionality, expose the app to real users, and adapt the next release based on their feedback.

## Team experience 
You must take into consideration the team's strengths. Don't bet on hype or only your experience. The team should be able to implement ideas into real life with the path of least resistance. The most important is an adequate estimate of the tasks. So, regardless of team experience, always follow the scrum methodology. The deadline is always within sprints.

## Fallback plan
When you have only one plan, you don't have anything. If you have two plans, it means you are minimally protected. If your architecture looks theoretically sound but isn’t justified in actual practice, then your team should be ready to switch to a new solution in the early stage. And switch to the best version of the existing solution If you've gone too far.

Follow me on 🐦 [Twitter](https://twitter.com/DevMoroh) if you want to see more content.
Understanding the Role of Arrow Functions in JavaScript
Tags: javascript, beginners, programming, react
Published: 2022-12-21 22:20:21

**What are Arrow Functions?**

Arrow functions, also known as "fat arrow" functions, are a concise way to write function expression in JavaScript. They were introduced in ECMAScript6(ES6) and have become popular choice for writing functions in modern JavaScript code.

**Syntax of Arrow Functions**

The syntax for an Arrow function is quite simple. It consist of the following elemets:

- An optional list of parameters, surrounded by paranetheses.
- The "fat arrow" symbol (=>).
- The function body, which can be a single expression or a block of statements.

Here is an example of a simple arrow function that takes one parameter and returns its square:

`const square = (x) => x * x; `

If the function has multiple parameters, they are seperated by commas:

`const add = (x,y) => x + y;`

If the function has no parameters, the parantheses are left empty:

`const greet = () => console.log("First parantheses didn't have any param");`

If the function body is a block of statements, it must be enclosed in curly braces and the return statement must be explicitly specified:

```
  const sum = (arr) => {
   let total = 0;
   for (let i = 0; i < arr.length; i++) {
     total += arr[i];
   }
   return total;
}
```

**Benefits of Using Arrow Functions**

There are several benefists of using arrow functions in your code:

- They are shorter and more concise than traditional function expressions.
- They do not have their own `this` value, so they are less likely to have problems with `this` binding issues.
- They are well-suited for use in higher-order functions, such as `map`, `filter`, and `reduce`.

```
const numbers = [1, 2, 3, 4, 5];
const doubled = numbers.map(x => x * 2);
// doubled is [2, 4, 6, 8, 10]

```

**Examples of Using Arrow Functions in Real Applications**

Here are some examples of how arrow functions are used in real applications:

- In a React component, you can use an arrow functions as the event handler for a button click: 

```
class MyComponent extends React.Component {
  handleClick = () => {
  // do something when the button is clicked
  }
  
  render() {
    return (
      <button onClick={this.handleClick}>Click Me!</button>
    );
 }
}
```

- In Node.js server, you can use an arrow function as the callback for asynchronous function:

```
 fs.readFile('file.text', (error, data) => {
   if(error) throw error;
   console.log(data);

)};
```

- In a Redux action creator, you can use an arrow function to return an action object:

```
const addTodo = (text) => ({
  type: ADD_TODO,
  text
)};

```
**Conclusion**

Arrow functions are a useful and concise way to write function in JavaScript. They offer several benefits, including shorter syntax, better handling of the `this` value, and ease of use in higher-order functions. While the may not be suitable for every situtation, they are a valuable tool to have in your JavaScript toolbox.
Ok, I gave in to the Mastodon Hype
Tags: mastodon, programming
Published: 2022-12-21 21:46:40

Hello!

I have never ever liked social networks.  I have no idea why people like to have other people (mostly strangers) know about what they do for a living, or what they do for fun, or know about their family, etc.  It's beyond me how so many people like disclosing personal information.

So here I am, 48 years old and without ever creating a Facebook account.  My accounts for Twitter, Instagram and Tik Tok are merely to consume, never to publish.

So why am I on Mastodon?  In a few words:  I like the per-server, topic-based approach.  I have neighbors with similar interests and I can go ahead and expand my horizons if I want.

So here I am:

{% embed https://dotnet.social/@webJose %}

I found a .Net-specific Mastodon server.  That convinced me. :-)  Apparently some Microsoft hotshots are there too.  I'll let you guys know.

If you have Mastodon and you like my stuff, go follow!
Real-Time Streaming in Any and All Clouds, Hybrid and Beyond by Timothy ...
Published: 2022-12-28 15:50:08

---
title: Real-Time Streaming in Any and All Clouds, Hybrid and Beyond by Timothy ...
published: true
date: 2022-12-21 21:18:00 UTC
tags: 
canonical_url: 
---

<iframe frameborder="0" height="270" src="https://youtube.com/embed/fciswxMLfIM" width="480"></iframe>
The Dreaded Phase 1 Assessment
Tags: flatironschool, livecoding, javascript
Published: 2022-12-21 21:29:03

If you're just starting out phase 1, or you're almost done and you're getting ready for your phase 1 assessment, then I'm sure you are _**dreading**_ it.
From the moment I started this program I was so scared of this assessment because I think we are naturally afraid of the unknown. So I will be sharing some tips on how to prepare yourself for this assessment.

## Prepare Technically
If you're asynchronous, it is so important you pace yourself and take time to actually understand what you're reading and understanding the "why's" of the labs you're working on. It is also super important to study and touch up on topics you probably didn't even look twice at since completing. STUDY! Don't try to cram because I promise you will forget something. Take time each day to study a little bit and look back on previous topics.

## Prepare Mentally 
The first thing the instructor asked me was "How are you?" to which I replied, "Oh, I am so nervous". She then told me something that soothed my nerves a little bit and that was "This isn't like a normal school test, this is kind of like a mock interview."
Now, I am great at interview, but I still did not know what a technical interview would look like. So let me tell you what this one might look like:
_Have your project already running._ You don't want to waste time and take time away from your live coding.
You will want to also have your project GitHub repo open. 
You will walk through your code, the instructor may ask any questions they like about your code and ask for you to name or point out certain things e.g(callback functions, "what does this code do", "what is this section called").
After this, you will do the live coding. The instructors are there to guide you, they don't just silently sit there and watch you code so don't make them sit and watch you silently code. It's not a who-can-talk-less contest. Talk through your code, talk through what you're doing. Your instructor might say little words of encouragement or even "okay try it" to guide you the right way. They want you to pass, they just have to know what you're thinking in order to help you pass. 
Get help from your cohorts, we honestly are in this together, and once we realize that, the better. We all want to make it, and by working together you ensure each other's success and already made connections with people in the same field as you. 

This assessment is nothing to cry about nor is it something to be afraid of, I know that now.
Trigger an automation pipeline after a Dev pipeline runs
Tags: azuredevops, testing, dotnet, specflow
Published: 2022-12-21 20:39:19

In the perfect world you'd have multiple development environments, Dev/QA/Stage/Prod, especially if you have multiple microservices being developed concurrently. But in reality you might only have one Dev environment. So when do you run all of your automation integration tests? You might run them nightly on Dev or only on Stage after a release point. There are pros and cons to all these methods. Missing API regressions could be a very big con.

Another option is to trigger your service-specific API tests in an integration pipeline right after the corresponding Azure Devops Dev pipeline for the actual service runs. This is pretty easy to do in Azure DevOps YML. In my test integration pipeline under "resources:" I added a "pipelines:" section.

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

The options "pipeline", "source", "project" and "trigger" are simple and explained in this [Azure DevOps article](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops). Basically your integration test pipeline is triggered  right after the Dev pipeline. In this example the Dev pipeline is named "pin-app-payor-job-service". Below is the trigger result in ADO Pipelines

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



My team writes failed test runs to a Teams channel so everyone can see them. I have DEV another article on how to do that [here](https://dev.to/tswiftma/write-pipeline-failures-to-a-teams-channel-23jj).

Make sure your automation tests are scoped to the service under test. Running "Every test under the sun" is annoying and generates too much noise. We're currently using Specflow with XUnit so we tag our Scenarios according to the API that it tests. 

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

Then when we run tests in our pipeline yml with the "dotnet test" command we pass in the specific tag as a --filter Category for XUnit. 

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

Hope this article helps you run your automation at the right time!
Add One Day to Date in JavaScript
Tags: javascript, beginners, webdev, tutorial
Published: 2022-12-21 21:13:31

Learn how to add one day to date in JavaScript using the native date object.

## How to Add 1 Day to Date in JavaScript?

The best way to add 1 day to a JavaScript date is by using the `Date` object. On an existing `Date`, you can use the `getDate` function to get the day (between 1 and 31), add 1 to this number, then use `setDate` to update the date. Here's a short example: `date.setDate(date.getDate() + 1)`.

## Using the JavaScript Date Object

In JavaScript, you’ll often manipulate [the Date object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) to do diverse operations (e.g., add days to a date, format a date, etc.).

If you want to add one day to date, you can use a combination of these two Date functions:

 1. `yourDate.getDate()`: get the day of the month (you'll get a number between 1 and 31)

 2. `yourDate.setDate()`: update the day of the date to the number passed as a parameter

In practice, let’s say you have this date: `05/12/2022`. The `getDate()` function will return `5`. Then you can add one day to this number `5 + 1 = 6`. Finally, use `setDate()` to update the day of the month for your current date object.

Here’s a commented example:

```javascript
// Create a date
const todayDate = new Date()

// Before adding 1 day
console.log(todayDate.toString())
// Output: "Wed Dec 21 2022 18:19:23 GMT+0100 (Central European Standard Time)"

// Add one day to the current date
todayDate.setDate(todayDate.getDate() + 1)

// After adding 1 day
console.log(todayDate.toString())
// Output: "Thu Dec 22 2022 18:19:23 GMT+0100 (Central European Standard Time)"Bonus: Create a Function to One Day to Date
```

Now you know how to add days to a date, let’s make your code fancy!

One way to do that is to create a function that takes a date as a parameter, adds one day, and returns it.

Following what we did in the last part, here’s how:

```javascript
// Create a function to make the logic generic
const addOneDayToDate = (date) => {
  date.setDate(date.getDate() + 1)
  
  return date
}

// Get the current date
const date = new Date()

// Before adding 1 day
console.log(date.toString())
// Output: "Wed Dec 21 2022 18:24:38 GMT+0100 (Central European Standard Time)"

// Call `addOneDayToDate` with the current date
// and assign the result to a new variable called `tomorrowDate`
const tomorrowDate = addOneDayToDate(date);

// After adding 1 day
console.log(tomorrowDate.toString());
// Output: "Thu Dec 22 2022 18:24:38 GMT+0100 (Central European Standard Time)"
```

---

**Thanks for reading. Let’s connect!**

➡️ I help you grow into Web Development, and I share my journey as a Nomad Software Engineer. [Join me on Twitter for more.](https://twitter.com/gaelgthomas) 🚀🎒
Promises and Asynchronous Javascript - Part 1
Tags: javascript, programming, webdev, tutorial
Published: 2022-12-21 21:11:40

As we know Javascript is Single Threaded programming language, it means the code is executed line by line and one after another.
Thus, we can say javascript is Synchronous in nature.

Asynchronous javascript enables us to run the tasks which do not take much time and keeping the tasks aside which take much longer time for there execution, because of this technique we don't have to wait for the tasks which require more time for there execution and stopping the program at same point till the execution of that that function is not over, instead we run the other tasks without stopping the program at single point.

Now let's see some code examples to understand nature of javascript in detail.

```
console.log("Hi)
console.log("How are you?")
console.log("Bye)
```
The Output of the code above is

> Hi
> How are you?
> Bye

Same code using setTimeout().

```
console.log("Hi)
setTimeout(()=>{
console.log("How are you?")
},1000);
console.log("Bye)
```
Now the output will be


> Hi
> Bye
> How are you?

Now this may seems little confusing to you, **is it?**

Lets find out why we are getting this output

So we are using setTimeout() function in the code above, setTimeout() is a function which we get from the browser's webApi.
Whatever is written inside the setTimeout() function is executed after the milli seconds which we mention in it.

`setTimeout(() => {console.log("Hello")}, 1000);`

If you run the code above then **_Hello_** will be printed on the console after 1000ms or 1s **[1000ms = 1s]**. 

Let's see one more code example
```
function myName(name) {
setTimeout(() => {
return "My name is" + name;
}, 1000)
}
console.log("Hi)
const _name = myName("John");
console.log(_name);
console.log("Bye)
```
The Output of the above code is

> Hi
> undefined
> Bye

Now you may think why we are getting undefined **yes?**
we are using setTimeout() inside the myName() function thus the myName() function will return **_My name is John_** after 1s.
and as we know GEC is created inside the javascipt which maps all the variables initially to undefined in the memory allocation phase and assign values to them in the code execution phase when the line in which the value is assigned to the variable in the code is encountered. Thus initially the variable _name is undefined and after 1s it get the value **My name is John** but due to synchronous nature of javascript **undefined** is printed on the console.

**This is end of the Part-1**, I hope you got an idea about the nature of the javascript and what is the issue with synchronous nature of the javascript, we will learn about **callbacks and promises** in javascript in part-2.
A little about me
Published: 2022-12-21 21:11:35

As a full-stack developer with a strong background in Node.js, Express.js, React.js, Laravel and other technologies, I have a proven track record of delivering high-quality software solutions to some clients.

Over the past few years, I have had the opportunity to work with some companies in the industry, including ArcTouch and upFlow.me. In these roles, I have gained valuable experience using Node.js, Express.js, and React.js, as well as testing frameworks like Jest.

One of my most notable achievements to date is the development of a complete application suite for Grupo MOV, a company that provides forklift maintenance services. This project included the creation of a MySQL database, mobile applications using React Native and Expo, a REST API in Laravel, and a web app in ReactJS. I also integrated the application with Firebase and a mail service, and I was able to successfully roll out the application to over 100 users.

Working as a full-stack developer at Bernoulli Educação, where I was responsible for the development and maintenance of Laravel and React Native systems. I have also assisted in the structuring of a new Laravel project, including the creation of a docker environment and the standardization of class structures.

Currently, I'm working in Arctouch, a company that is my first opportunity to work with USA based clients, I'm loving to work here and learning a lot. 

In my free time, I enjoy staying up to date with the latest developments in the tech industry, and I am always looking for new ways to improve my skills and knowledge. I am excited to continue building my career as a full-stack developer, and I am confident that my skills and experience make me a valuable asset to any team.
PHP conferences in 2023
Tags: php, conferences, developer
Published: 2022-12-21 21:08:59

---
title: PHP conferences in 2023
description: PHP conferences that a PHP developer should look at in 2023
tags: PHP, conferences, developer
published: true
---

Hi Folks, I will share a list of great conferences for PHP developers in 2023.

- [Laracon EU](https://laracon.eu/)  **January** 26 - 27, 2023 | **Lisbon** 🇵🇹
- [PHP UK Conference](https://www.phpconference.co.uk/)  **Feb** 14 - 16, 2023 | **London** 🇬🇧
- [Laracon IN](https://laracon.in/)  **February** 25 - 26, 2023 | **Ahmedabad** 🇮🇳
- [SymfonyLive Paris 2023](https://live.symfony.com/2023-paris/)  **March** 23 - 24, 2023 | **Paris** 🇫🇷
- [php[tek] 2023](https://tek.phparch.com/)  **May** 16 - 18, 2023 | **Chicago** 🇺🇸
- [phpday 2023](https://2023.phpday.it/) **May** 18 - 19, 2023 | **Verona** 🇮🇹 or **Online** 🌐
- [International PHP Conference](https://phpconference.com/berlin-en/)  **May** 22 - 26, 2023 | **Berlin** 🇩🇪 or **Online** 🌐
- [SymfonyOnline](https://live.symfony.com/)  **June** 15 - 16, 2023 | **Online** 🌐
- [Laravel Live UK](https://laravellive.uk/) **June** 22 - 23, 2023 | **London** 🇬🇧
- [LaraconUS](https://laracon.us/)  **July** 19 - 20, 2023 | **Nashville** 🇺🇸
- [Dutch PHP Conference](https://phpconference.nl/)  **October** 13, 2023 | **Online** 🌐
- [International PHP Conference](https://phpconference.com/munich/)  **October** 23 - 27, 2023 | **Munich** 🇩🇪
- [Longhorn PHP](https://www.longhornphp.com/)  **November** 2 - 4, 2023 | **Austin** 🇺🇸
- [LaravelDay](https://2023.laravelday.it/)  **November** 09, 2023 | **Verona** 🇮🇹
- [LaraconAU](https://laracon.au/)  **November** 16 - 17, 2023 | **Sydney** 🇦🇺
- [SymfonyCon](https://live.symfony.com/2023-brussels-con/)  **December** 7 - 8, 2023 | **Brussels** 🇧🇪


Could you write a comment if you plan to attend or have already purchased tickets?
If you would like to contribute to this list, suggesting a conference or pointing out inaccuracies, feel free to share it in the comments.
JavaScript, C# .....
Tags: help
Published: 2022-12-21 20:52:10

Hello,

Firstly let me introduce myself, I'm Ben and I want to learn to programme, I've been on and off learning for about 6 months now but I still feel slightly lost....

Anyway so I'm just hoping for a little insight into my "Stack" as programmers/coders/people seem to refer to it as..

In my current job role (support I.T) I've enquired about entering the development department which handles all systems and programmes and codes their internal systems, I have been advised to learn the following:

- HTML
- JavaScript
- C#
- Bootstrap
- .NET

With this stack, I'm slightly confused on how it all comes together, I first thought it would be a front end development with JavaScript/Bootstrap been my front end and C# been the backend.

Where would you say I start, would I learn JavaScript or C# first off in your opinion(s) and in time what recommended portfolio pieces would you recommend in terms of employability showcase.

I know it's not a lot of info but any advice would be greatly appreciated.
How to be successful on Etsy 2023
Published: 2022-12-21 20:40:43



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dk2lp90lfy9tlm6rep3.jpg)
There are a few key things that you can do to be successful on Etsy in 2023:
1. Offer unique, high-quality products: One of the keys to success on Etsy is to offer unique and high-quality products that stand out from the competition. This can help you attract customers and build a loyal following.
2. Create a professional-looking shop: To attract and retain customers, it's important to have a well-designed and professional-looking shop. This includes having high-quality product photos, a clear and concise shop policies page, and an easy-to-navigate shop layout.
3. Use keywords effectively: To help your products get found by potential customers, it's important to use relevant keywords in your titles, tags, and descriptions. Research the keywords that your target customers are using and include them in your listings.
4. Engage with your customers: Building relationships with your customers is important for success on Etsy. Respond to customer inquiries and reviews promptly and be sure to thank them for their business.
5. Utilize Etsy's marketing tools: Etsy offers a number of marketing tools to help you promote your products and shop, including promoted listings and Etsy Ads. Consider utilizing these tools to reach a wider audience and drive sales.
6. Keep your prices competitive: It's important to stay competitive on price, especially in a crowded market like Etsy. Be sure to research your competition and price your products accordingly.

By following these tips, you can increase your chances of success on Etsy in 2023.

[READ MORE](https://deardigitalsart.etsy.com)