teleren/devto huggingface dataset:
Someone new talking about Recursion
Tags: javascript, beginners
Published: 2022-11-30 22:41:09

Recursion is a very interesting topic, as it is creating loops in code using functions. The more advanced explanation of recursion is a function that returns itself unless it hits a stop return.

```
function add(array, output=0){
  if(array.length === 0){
    return output;   // Key 1
  }
  output += array[0];
  return add(array.slice(1), output);  // Key 2
}
```
Key 1: The Stop
  This chunk of the code is the stopping mechanism. This insures that the functions stops at a certain point, as to not create an infinite loop. 

`if(array.length === 0)`
 
  This part is the check and usually results to true or false. If the check results in true, then it executes this line.
 
`return output;`

  This output is indicated by the output in the function build, but we will get to that soon.

Key 2: The Loop
  This section of the code is the looping mechanism. Basically the code does something, then returns the function call as its final act. In the case for the example we look at what is being done first before the loop occurs.

`output += array[0]`

  Output is being added to by the value at 0 in the array.

`return add(array.slice(1), output)`

  This is the meat of the loop. The return is pushing out the function call, but as you can see there are some changes that happen to are parameters as it goes though.

`array.slice(1)`

  Using the slice method, we are removing the number at the zero index of array and making the one index our new zero. This is important, as without that bit, you will create another infinite loop. The last thing is the output. If you started with an output in the function creation, you need to carry it over to the next call as it has been modified in the code either.

  *Not necessary to the explanation, but the output can be anything you assign it to to help make the recursion simple.*

  While recursions are simple to write, they take a lot more computing power to execute than a simple loop does. That doesn't mean they aren't practical however. Recursions are simple to design and loop just as well as a for loop can.
Service Lifecycle Management : The Beginner's Guide
Tags: slm, management, beginners, productivity
Published: 2022-11-30 22:24:08

In this post, we'll look at Service Lifecycle Management and reduce any negatives around SLM as much as possible.

## What is Service Lifecycle Management?

Service Lifecycle Management refers to a strategy that assists organisations in recognising their gross income potential and productivity.

It facilitates post-purchase service activities such as product registration, warranty, service contracts, parts, support, knowledge, and service. 

When done correctly, Service Lifecycle Management differentiates your product and provides incomparable value to customers.

**Key features of SLM software**

- Workforce Management
- Asset Management
- Reverse Logistics 
- Knowledge Management 
- Contract Management 
- Returns and Repair management 

## How can SLM make your company more profitable?

SLM's core objective is to continuously raise the quality of service, and productivity of an organisation to increase customer satisfaction and profitability by making use of management information.

**Figure 1: Connected Enterprise (Figma)**

![SLM.png](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bujlo9aapfplze9m3ki.png)

As seen in figure one, SLM is an integrated component of PLM software which is a valuable strategy for businesses, particularly manufacturers with increasingly thin profit margins. 

It allows businesses to increase revenue by offering services, add-ons, and upgrades. 

SLM provides high quality service at lower pricing, resulting in a higher ROI. 

## Other benefits of Service Lifecycle Management

- Improved Productivity
- Increased Revenue through targeted upgrades
- Improved Asset Uptime
- Increased Customer Satisfaction
- Lower Maintenance Costs
- Reduced Risks

## Conclusion

To summarise, SLM can increase service operational efficiency by making essential information available throughout a product's lifecycle.

SLM can help reduce service and parts expenses as well as wasteful returns of faulty products. It can also help to improve service quality, which can lead to higher customer satisfaction.

SLM methods and software also increase the profitability of service calls by include functions such as upselling replacement items and components, renewing service contracts, processing payments, and tracking warranties that are up for renewal.

## References

- https://sie.ag/3VnDKAz
- https://bit.ly/3Ve1iI9
- https://bit.ly/3Ve1o2t
- https://bit.ly/3gNIXTe
CAP Theorem: Consistency, Availability, Partition tolerance
Tags: systemdesign
Published: 2022-11-30 22:12:00

---
title: CAP Theorem: Consistency, Availability, Partition tolerance
published: true
description: What is the CAP Theorem and how does it apply to system design?
tags: systemdesign
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2022-11-30 22:12 +0000
---

This theorem states that it is impossible for a distributed system to simultaneously provide more than two of these three guarantees:

- **Consistency**: all clients see the same data at the same time no matter which "node" of the system they connect to

- **Availability**: any client which requests data gets a response even if some of the "nodes" of the system are not available

- **Partition tolerance**: the system continues to operate despite network partitions[^1]

[^1]: a partition indicates a communication break between two "nodes"

![CAP Theorem explained](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8myqpep523ji4f9zpdh.png)

## Ideal situation

In an ideal world, network partition never occurs

![CAP Theorem Ideal World](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdhvc3glacqtkcr0nav6.png)

## Real world distributed system

In a distributed system, data is usually replicated multiple times because partitions cannot be avoided.
In the example below, node `n3` becomes unavailable and cannot communicate with nodes `n1` or `n2`. Also data cannot be propagated to `n3` from `n1` or `n2`.

![CAP Theorem Real world](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yjrdogdnajqlhn6db2pe.png)

If we choose **consistency over availability (CP system)** we must block all write operations to nodes `n1` and `n2` to avoid data inconsistency among these three nodes, and this makes the system unavailable.

However, if we choose **availability over consistency (AP system)** the system remains available and accepts read operations, even though it might return stale data. For write operations, nodes `n1` and `n2` will keep accepting them and data will be synced to node `n3` when the network partition is resolved.
Manage AWS S3 Object Storage via the CLI
Published: 2022-11-30 22:10:06

AWS S3 is a viable serverless object storage service that can be utilized via your command line. 

A bucket is the name for the cloud storage and an object is the file within it.

To create a bucket, simply have your aws cli already configured and run the following command with the region in which you would like your storage to be hosted.

```
aws s3api create-bucket --bucket <name> --<region>
```

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

Sending data from your local directory straight to an s3 bucket can be done by utilizing the copy command. 

```
aws s3 cp <local directory> <s3 bucket w/ path>
```
Call the local directory path with the s3 path-based naming style afterwards by appending s3:// as a prefix to the bucket name.

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

Note that the difference between using `aws s3` vs `aws s3api` is that the s3api command reflects the operations of plain API commands, while as "aws s3" can be utilized for higher level commands such as file transferring.

View currently active s3 buckets with the following command.

```
aws s3api list-buckets
```

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

The data is neatly shown in JSON format with the name of each bucket and its creation date.

To view the contents of and individual bucket run

```
aws s3 ls <bucket name>
```

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

And lastly to clean up an environment, and in turn save on additional unwanted costs, its necessary to remove old s3 buckets and the objects within them.

Remove a bucket including all the contents within it, , and --force as an ending flag.

```
aws s3 rb s3://<bucket name> --force
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dhup18lzzowgxbcaz9uq.png)
Why are Digital Assistants so meh?
Tags: machinelearning, ai
Published: 2022-11-30 22:04:04

Why hasn't Siri, Bixby, Alexa or Cortana dominated human tech interaction as predicted in science fiction? 

Who knows, but personally I think an AI assistant should be one that you don't have to prompt every time you need something, proactivity should be built into its core.

Lack of trust doesn't help matters either. Trust is hard to build, especially from giant tech corporations that essentially have a listening device which monitors your every word. 
 Then there are the screeds of confusing T&Cs that you don't even know what they are using your data for.

Long term this is unsustainable, there are 1001 AI assistants out there all with their own niches. I am just another fool to add to the list, though my hope is that AMU (my AI) will thread the needle of actual usefulness with something we can trust.

Beta sometime in 2023 but some Alphas available on my youtube channel. 

https://www.youtube.com/c/mcmurchie
Patching It Up, Part 1: Planning
Tags: javascript, beginners, opensource
Published: 2022-11-30 21:59:01

## The work

For the upcoming weeks, I'm going to work on improving/fixing the sign-up area of the [Telescope project](https://github.com/Seneca-CDOT/telescope) in a series of issues.
I have done some PRs for the repo in the past and has become familiar with some parts of the related code. This helps me feel comfortable tackling issues regarding these part of the code. Since my previous PRs for the project often focus on display and arrangement of text and UI for improvement of user experience, I'm looking to get a bit deeper into how the code functions in the background in this big and complex project, to push the scope I work with.
The issues I have chosen are more closely related to the website handles user entries of their Twitch and Youtube channels during sign-up. 

## The issues
[The first one](https://github.com/Seneca-CDOT/telescope/issues/3612) is about the sign-up page incorrectly accept channel URL not chosen/confirm by the user.
[The second one](https://github.com/Seneca-CDOT/telescope/issues/3608) is about streamlining the overall sign-up process itself to minimize the need to repeatedly confirm ownership of the accounts/channels entered.
[The third one](https://github.com/Seneca-CDOT/telescope/issues/3610) is about incorrect channel URL(s) being shown after validating user entries.

## Approach

First, I will need to look at how the code handles channel URL information in the background to see how I can fix issue 1 and 3. To tackle issue 2, I will need to trace the code to see how the code handles the sign-in form of each step to change how the sign-in process works.

After having understood the code, I would formulate some ideas of what to need to be changed and test the ideas, for each issue. If I have many solutions in mind, I tank them and go from the top choice first.

When I'm satisfied with the works, I would make PR(s) to get feedback from reviewer(s) and see if I'm missing something. Changes will be made according to discussions with them.

That's the generally format I would follow for each issue. Some issues might end up being more ahead than others.
🤖 ED-209 BOT is coming (for you)
Tags: security, webdev, funatwork, javascript
Published: 2022-11-30 21:12:26

## Intro

Marre de ceci : 

{% twitter 1597878125047717889 %}

Alors...

## 👮 Security first

{% youtube nDSetRGIfiw %}

## 😱 (Not so) Fun related content

{% twitter 1596584987314491392 %}

{% embed https://www.businessinsider.com/google-ai-write-fix-code-developer-assistance-pitchfork-generative-2022-11 %}
Prototype - Short Notes
Tags: softwaredesign, programming
Published: 2022-11-30 20:50:34



Series on Software Design Practices - Part 2

In this small series on software design practices, I write about various practices. In every article, I give a brief and simple explanation. In [part 1](https://dev.to/claudioaltamura/spike-solutions-short-notes-4la1) I wrote about [Spike Solutions](https://dev.to/claudioaltamura/spike-solutions-short-notes-4la1). This time I present prototypes as a software development design practice.

A prototype is a **simplified, functional model of a planned product or component**. It serves as a preparation for production, but can also be used to illustrate a specific concept. The prototype is often the first milestone in a project to test the suitability and acceptance of a new technology, application or process.

The prototype is an **essential development step** regarding the future solution. However, it **should not be used in production** after the feasibility check. The building blocks, on the other hand, can be used and improved in the final solution.
  
Photo by [Hal Gatewood](https://unsplash.com/@halacious?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/prototype?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
First step in management
Tags: management, freelancer
Published: 2022-11-30 20:28:15

## New job, new me

It's been a while since a write something in here... Life gets in the way. I've been lucky enough to land a new gig, as a freelancer, and I have been tasked with managing a team.

It's been 3 months now that I took on a manager role, on top of the developer role and I thought it would be a good idea to write down this part of my journey. Not to teach, because I really don't know what I'm doing, but to record my experiences, organize my thoughts and perhaps learn from them.

## The context

Quick word about the context. I have never been, in my 7 years as a freelancer, part of a team of developers. I have always been the only developer. Being part of a team is really something I've come to enjoy. This feeling of belonging to a group, working towards the same goal, speaking the same developer language has been a breath of fresh air.

The company recruited some new people, and I'm now managing 2 other developers, who are juniors. I consider myself to be an intermediate level, but I love the idea of spreading the little knowledge and experience I have to help others.

## First steps

The first few weeks have been complicated. Obviously, when you don't know how to manage a team or a project, you have to make mistakes. I'm lucky to have a CTO that is always available to help, answer questions and provida guidance. In that regard, the environment is absolutely perfect.

There are, I believe, 3 things that went wrong for me at the beginning:

- Not using all the resources at my disposal
- Not understanding the bigger picture of the project
- Not trusting my coworkers enough


I'll touch on the first one here.

To manage efficiently, I must understand what resources I can use. Resources can take different forms, but for example:

- my team of developers
- the CTO willing to help me
- the company financial backing if I need tools
- the product owners knowledge 
...

Because of my career being the story of a lonely developer doing everything by himself, I didn't realise that I should use all of this to achieve our goals. I tried to do too many things by myself, where other people had the knowledge to tell me what should be done, or how it should be done, or even better, **if** it should be done al all...

So, the first few weeks became a one man show. One manager trying to do everything, because he didn't understand that the manager's job is to correctly use the resources at his disposal. To be **efficient**. We ended up meeting goals for the first month, but it was a grind, that ended with a few 12 hours work days for me and my team. 

So that was my first lesson. Understand that I have a whole bunch of different tools at my disposal, and that I can be creative in the way I use them to achieve the goals I've been set.

Many more to come. 

See you soon <3
50% Maybe I Can Get a Job?
Published: 2022-11-30 20:26:33

I wrote to several HR personnel and also one boss of a technology company saying "Money is not the issue, I am only after gaining experience, first I self-studied Test Automation with Python and Selenium, then I started studying JavaScript and I want to enhance my capabilities". Then that boss wanted to see me, we talked and they told me that they are going to send me a case to see where I actually am in my coding journey.

I waited the whole day for the "case" to arrive, but they've never sent me any. I am not sure why it takes long but probably I'll remind tomorrow, this time to the boss and we'll see.

Also today a company called me to offer 2 months of German lessons and then they'd hire me. In 10 days these lessons are going to start. So chances are, I am going to be starting with either of 2 in 10 days. Let's see where this peculiar journey takes me! But in either case, I'll complete my JavaScript course, and then I'll move onto John Smilga's course on React.
Reflect: Release 0.4 1/3
Published: 2022-11-30 20:17:13

Release 0.4 is the last assignment we have for DPS909. In this assignment we are going to be working on a project that has bigger scale, more complexity than other open-source project we have contributed to throughout this course. 
To make this very last assignment meaningful, I would like to work on a project that has more than 100 contributors and I will choose an issue that requires me to add a feature instead of fixing a bug.
The repositories that I would like to choose from are these:
## Repository List
1. https://github.com/AntennaPod/AntennaPod
This is a podcast Android app project that I have worked with previously for release 0.3. 

2. https://github.com/CatimaLoyalty/Android
This is a gift card managing app on Android. I have made 2 contributions to this project during Hacktoberfest 2022, the repository owner of this project is very nice and has a high standard on code quality. This is the project that I want to work with the most. 

3. https://github.com/nextcloud
NextCloud is an Android app that helps users to view and manage their phones on the cloud. Up until now, this project has more than one thousand opened issues for me to work on.

4. https://github.com/nextcloud/server
This is the server side of NextCloud I mentioned earlier. This project is implemented in JavaScript with Node.js, to make more the variety of the project I contribute to, I might choose to work on this as well.

5. https://github.com/Seneca-CDOT/telescope
Telescope as the project of the project that's collectively created by Seneca students, I feel that I'm very much obligated to make as much contribution as I could to it. In addition to this, since I spent a lot of time on this project during Release 0.3, I've already gotten more experience with this project, which means that I might find it easier to work on this project than start working on a new project from ground zero.
Tip rápido: Cambiar el puerto en React
Tags: react, spanish, frontend, tutorial
Published: 2022-11-30 20:01:38

Por defecto cuando ejecutamos `npm run start` en nuestro proyecto de React, se toma el puerto 3000 por defecto. 
Si por algún motivo queremos que corra en otro puerto, por ejemplo el 3001, simplemente añadimos ese numero de puerto a nuestras variables de entorno:
- Creamos un archivo .env en la raíz del proyecto
- Dentro del archivo añadimos lo siguiente:

```javascript
PORT=3001
```
Y listo, ¡ya lo tenemos! Ahora cada vez que corras `npm run start` se tomara el puerto 3001.
R3 NYC Tech Meetup: The DLT News You Need to Know in 2023
Tags: dlt, corda, blockchain, crypto
Published: 2022-11-30 19:33:52

Don't miss R3 CTO Richard G Brown in New York next week! Devs, bring your business colleagues. Business leaders, bring your engineering teams. Great space to learn about DLT, drink free beer, and do some networking. Registration is now open: [R3 NYC Tech Meetup](https://events.bizzabo.com/437619)
![R3 NYC Tech Meetup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9h4m00bi12pb9dv9fc12.jpg)
Guess the logo : #4
Tags: webdev, logo, opensource, programming
Published: 2022-11-30 19:25:26

Hey hey.. 🙌

Welcome to yet another episode of "Guess The Logo" series. 💻

You can guess the logo related to programming, for each logo, there will be 3 sec time ⏱️ to guess.

Ready for comment ✍️ the correct guess count.

{% embed https://youtu.be/mJeO-R_qHVU %}
What is VueJS
Tags: javascript, webdev, beginners, vue
Published: 2022-11-30 19:14:18

Vue is a progressive framework for building user interfaces. It is also one of the most popular frameworks among developers. It's simple, flexible, and has the ability to change as the project demands.

Vue provides a declarative, easy-to-learn syntax. It also provides reactive data binding and a simple API for managing the application state.

Some of the best use cases for Vue are:

- Building web applications with single page applications

- Creating interactive web apps

- Creating mobile apps

## VueJS vs ReactJS

Vuejs and Reactjs are both JavaScript libraries for building user interfaces. They are often compared to each other, as they have many similarities. They both use virtual DOM and can be used with a variety of different tools. The choice between the two is often based on personal preference, but there are some differences that should be considered.

Vuejs is more compact and easier to learn than Reactjs, which makes it a good choice for beginners. Vuejs also has an advantage in terms of size when it comes to the final bundle size, making it a better choice if you're looking for something lightweight that will not take up too much space in your project. However, Reactjs has more flexibility as it allows you to use JSX or ES6 syntax.

Vue.js is an open-source library that helps you create interactive web interfaces with a component-based approach that offers simple API and great performance out of box. It also provides data binding capabilities and routing solution to help you build apps faster with less code.

The framework has been growing rapidly in popularity over the last few years because of its simplicity and ease of use, which make it perfect for new developers as well as experienced ones who want to build something quickly without sacrificing quality or performance.

With Vue’s simplicity, it’s a great choice for those looking to develop their skills in web development or create apps faster than other frameworks may allow them to do so.

React is a JavaScript library for creating user interfaces and applications with a minimal amount of code. React is more suitable for rendering single-page applications (SPA) whereas Vue excels in the creation of simple websites or web apps that use multiple pages.

React has been around longer than Vue and it has more backing from the community. It also has better documentation and tools but at the cost of being more complex than Vue which can be appealing to developers who are new to this field.