teleren/devto huggingface dataset:
Sharing my experience: Transforming traditional app into SaaS architecture
Tags: saas, architecture, devjournal, tutorial
Published: 2022-12-08 15:06:17

SaaS, also known as Software as a Service, is a cloud service that has won massive popularity in recent years. The worldwide public cloud services end-user spending will be [approximately $171 thousand](https://www.gartner.com/en/newsroom/press-releases/2021-08-02-gartner-says-four-trends-are-shaping-the-future-of-public-cloud) by the end of 2022. The trend is predicted to grow even more, and it is no stopping. The advantages of cloud computing are innumerable, and it gives a significant benefit for the ones adopting it in a growing IT market.

If you are someone considering [migrating your existing application to SaaS architecture](https://www.simform.com/blog/saas-migration/), you need to start by considering the following factors 

Would your customers benefit from a SaaS solution? - No doubt that the SaaS application has many benefits. However, collecting customer feedback on how they will feel moving forward with a SaaS-based application is always recommended.

**Time-resource scope triangle** - With limited resources and little time, you can't accomplish "all the things" (as is frequently the case with migrations because you don't want to pay for two systems for an extended period of time). The ability to prioritize effectively will determine if the migration is successful, and frequently delivering the most crucial feature on schedule will satisfy the stakeholders. Providing they are aware of when the "nice to haves" will arrive.

**Not everything will be migrated** -  It can be challenging to understand this one, but chances are your current system has a lot of undesirable data or content that you don't want to import into the new one. The old items you are considering copying out of concern about losing "historical data" will do nothing but create clutter in your new space.


**Some things need to be reorganized** - In keeping with the analogy of moving apartments, your new place has a different floorplan than your old one, so your workstation could wind placed in the living room instead of your bedroom or that plant in the kitchen. Recognize the same thing with the new system you are putting in place. Given the new chance to reconsider workflows and processes, it is worthwhile to spend some time considering how your data/content should be bucketed because the data structure, user interface, and functionality are different (which is why you are switching).
Precedent, a better prettier idea
Tags: idea, webdev, tooling, ai
Published: 2022-12-08 14:54:40

This is just an idea post, hit me up if you want to make it with me.

Precedent is the name for this IMAGINARY product, a code formatter with no config, well apart from one, you elect a team lead to set the precedent, their code style is analysed and the code is formatted to fit that style, so if the leads code style changes that changes the overall formatting. After all what else is a team wide formatted for but to make the lead happy! 😆

Okay okay, well maybe we could instead average the entire teams code and create a formatting rule set based on that.

But even better, how about it finds the idiomatic style from the community and makes everyone do that?

So AI decentralised code formatting what do you think?
Cloud Transformation Seminar at KIT, Coimbatore
Tags: aws, cloud, beginners
Published: 2022-12-08 14:53:08

Engaging students, be it tech and non-tech conversation is something which keeps me in good spirit. 

That too when you get an invite from a good friend and fellow engineering batch mate, no second thought. By the way, he is [Dr. Suresh Seetharaman](https://in.linkedin.com/in/suresh-seetharaman-518a8832), Dean Student Affairs, KIT. He is also a famous career guidance reaching students from all walks of life through his [youtube channel](https://www.youtube.com/channel/UCLRzmYpX7BVx_cvHbov4bNw) 

Here is yet another occasion to rejoice.

Onbehalf of KIT - Kalaignar Karunanidhi Institute of Technology,  management and other  officials, [Dr. Suresh Seetharaman](https://in.linkedin.com/in/suresh-seetharaman-518a8832), Dean Student Affairs, had extended his invite to join the Seminar on 13th Sep 2022.
![Invite](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fm7bcuyfhxvfkk0ip7bg.png)

Thanks for that warm gesture, friend 🥰
![DeanSA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/obxzge4udoax9vwtlggc.png)

Had a great conversation Principal, Vice Principal, Dean Academics and Head of the Department - CSE, EEE before the event talking about the syllabus, placement training and so on.

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


So heart warming to start the amazing event with lighting the lamp, singing Tamil Thai Valthu (தமிழ்த்தாய் வாழ்த்து) to begin the session really gave me goose bumps

![Lighting Lamp(https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iym057twzmazsbw61sy0.png)

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

It was an absolute pleasure to have Principal, Vice Principal, Dean Academics and Dean Student affairs for the inauguration. 

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

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

Got to meet my friend's family too.

![Family Time](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6wj9pebhr0e7shrby80s.png)

Date: 13th Sep 2022

**Gallery**

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oreoc7j3in6vzdwvnj49.png)
JavaScript Higher Order Functions and Callback functions
Tags: javascript, callbackfunction, programming, webdev
Published: 2022-12-08 14:51:54


In this article, I will explain what callback functions are and what higher-order functions are. 

 
.
**Higher Order Functions**

Higher Order functions are functions that take other functions as parameters. So basically, higher-order functions have other functions inside them. So they either accept the functions as an argument or return the functions. A simple example of a higher-order function is

_function getStandard(standard) {
  // Invoke the passed function
  standard();   
}_
getStandard(function(){
console.log(‘elements’);
Here, the getStandard function is the higher order function while the standard function is the parameter and this is called the callback function. Another example can be:

_function makeHigh(highLevel, fn) {

  return fn(highLevel);
}
makeHigh(“Welcome to greatness”, console.log);//Welcome to greatness_

Here, the result is “Welcome to greatness” in your console.

One of the advantages of higher order function is that the code can be reused
 You do not have to write numerous functions that can be added as one function

_function mimic1(mimic){
    return console.log(mimi);
}
function mimic2(mimic){
    return alert(mimic);
}
function mimic3(mimic){
    return prompt(mimic);
}
function mimic4(mimic){
    return confirm(mimic);
}_
_function mimic5(mimic){
    return console.log(mimi + " from a callback function!");}_

Instead of writing all these functions, we can write just one and pass another function to it. A function that is passed as an argument into another function is called a callback function.



.
**Callback Functions**

Any function that is passed into another function as an argument is called a callback function. This is then invoked inside the outer function. Callback functions execute code in response to an event. Events could be events triggered by the user like the mouse hover, mouse click etc. This code might be executed at particular times and under certain circumstances based on the instruction you give to your code.


.
**Why do we need Callback Function**

Callback functions are needed because javaScript actions are asynchronous hence, they do not stop the code from running until it is executed.

The major reason we have callbacks is to execute codes based on an event.
An example of a callback:

_function magnet(color) {
  alert('Hello ' + color);
}

function magnetDevice(callback) {
  var name = prompt('Please enter your name.');
  callback(name);
}
magnet Device(magnet);_

setInterval, setTimeout are all examples of callback functions.

My Twitter Handle: https://twitter.com/mchelleOkonicha

My LinkedIn Handle: https://www.linkedin.com/in/buchi-michelle-okonicha-0a3b2b194/
Building applications using (PIC) progressive Incremental Change method.
Tags: programming, webdev, android, react
Published: 2022-12-08 14:50:15

The progressive incremental change method is a software development approach that entails constructing an application in tiny, incremental phases. This technique is a popular alternative to the traditional "big bang" process of building an application all at once and then deploying it in a single, massive update.

In a variety of ways, the progressive incremental change strategy outperforms the old approach. For starters, it allows developers to independently test each change, allowing them to identify and solve any flaws before they become big issues. Additionally, this technique enables developers to collect user feedback at each stage of development, which may help influence the application's direction and ensure that it meets their needs.

Another advantage of the progressive incremental change technique is that it enables developers to provide new features and upgrades to consumers on a more frequent basis. This can help keep users engaged and interested in the application while also assisting developers in gaining extra data on how users interact with the application, which can be used to improve future updates.

## Implimentation
To use the progressive incremental change method, developers must first define the essential functionality of their application, without which the application would be useless, and then construct that core feature in a series of small, incremental stages. This can include breaking down the development process into smaller, more manageable portions, such as adding a new feature or upgrading an existing one.

Once the core functionality has been developed, the developers can proceed to add other features and upgrades to the application in a similar manner. Working with users to get feedback on the application and incorporate their suggestions into future upgrades is one example.

In general, the progressive incremental change strategy is a useful tool for developing apps. By breaking down the development process into simple, manageable chunks, developers may build applications more swiftly and effectively, while also keeping users engaged and satisfied.
Max Consecutive Ones III
Tags: javascript, leetcode
Published: 2022-12-08 14:43:03

[Max Consecutive Ones III](https://leetcode.com/problems/max-consecutive-ones-iii/description/)
```js

/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
var longestOnes = function(nums, k) {
     let start = 0;
  let next = 0;
  let end = nums.length;
  let index = 0;
  let maxOnes = -Infinity;

  while (next < end) {
    let element = nums[index];

    if (k > 0) {
      if (element === 0) {
        k--;
      }
      maxOnes = Math.max(maxOnes, next - start + 1);
      next++;
      index++;
    }else 
    if (k === 0) {
      if (element === 1) {
        maxOnes = Math.max(maxOnes, next - start + 1);
        next++;
        index++;
      } else if (nums[start] === 1) {
        start++;
      } else if (nums[start] === 0) {
        start++;
        k++;
      }
    }
  }

  return maxOnes 
};
```

Above solution can be optimised further... i will recheck my code
What are the drawbacks of using test-driven development?
Tags: tdd, beginners, cleancode, testing
Published: 2022-12-08 14:37:00

I have been practising TDD professionally for 4 years now and I have seen some strong benefits of using TDD. On the other hand, there're some drawbacks as well.

Test-driven development (TDD) is a software development methodology in which tests are written for a piece of code before the code is actually written. This approach has several benefits, such as helping to identify defects early in the development process, ensuring that the code is tested thoroughly, and providing a basis for refactoring and improving the code.


However, there are also some drawbacks to using test-driven development. Some of the potential drawbacks of TDD include the following:


1) TDD can be time-consuming. Writing tests for a piece of code before actually writing the code can take more time than simply writing the code without tests. This can be especially challenging for large, complex projects with tight deadlines.
2) TDD requires a high level of discipline and focus. For TDD to be effective, the tests must be written before the code, and the code must be written to pass the tests. This requires the development team to be disciplined and focused, and to follow the TDD process consistently.
3) TDD may not be suitable for all types of projects. Some projects, such as those with a high degree of uncertainty or those that require a lot of experimentation, may not be well suited to TDD. In these cases, other development methodologies may be more effective.
4) TDD may not be suitable for all team members. Not all developers may be comfortable with the TDD approach, and some may find it challenging to write tests before writing code. This can lead to friction and conflict within the team, and may require additional training and support.


Overall, while test-driven development has many benefits, it also has some drawbacks that should be considered when deciding whether to use this approach for a particular project.

{% embed https://www.youtube.com/watch?v=eQ0njlPHmPA %}
Optimizing GUID Generation Step by Step
Tags: csharp, dotnet, performance, programming
Published: 2022-12-08 14:13:28

Consider you need to create 2,000,000 GUIDs per second. And believe me, you need it to be so fast!
In this post, I'm going to write a simple code and then optimize it step by step.

This is the first code most developers would start with:

```csharp
List<Guid> Loop_List_Simple()
{
    var list = new List<Guid>();
    for (var i = 1; i <= 2_000_000; i++)
        list.Add(Guid.NewGuid());

    return list;
}

// Elapsed time: 212ms
```
It's just a simple loop that generates and adds **2 million GUIDs** to the `list`. Using the benchmarking library on my computer, it shows that it takes `212ms` to run this code.

The first optimization we could apply, is to make the list a fixed-size one:

```csharp
List<Guid> Loop_List_Fixed_Capacity()
{
    var list = new List<Guid>(2_000_000);
    for (var i = 0; i < 2_000_000; i++)
        list.Add(Guid.NewGuid());

   return list;
}

// Elapsed time: 197ms
```

That was a little better, but not that much: `212ms` to `197ms`.

Now let's bring the `Linq` in, and see what happens:

```csharp
List<Guid> Linq_Simple() 
{
     return Enumerable
         .Range(1, size)
         .Select(n => Guid.NewGuid())
         .ToList();
}

// Elapsed time: 197ms
```

Now it takes `197ms` again, not any better. But we want more, absolutely!

Time to add some parallelism to our code. We will do it by adding a simple `.AsParallel()` to our LINQ:

```csharp
List<Guid> Linq_AsParallel()
{
    return Enumerable
        .Range(1, size)
        .AsParallel()
        .Select(n => Guid.NewGuid())
        .ToList();
}

// Elapsed time: 87ms
```

Wowwwww... It took just `87ms` that's huuuuge improvement. But wait we can get more!

This time we are going to use `Parallel.ForEAch` method which is a part of `PLINQ`:

```csharp
List<Guid> Linq_Parallel()
{
    var list = new Guid[size];
    Parallel.ForEach(list, (_, _, index) =>
    {
        list[index] = Guid.NewGuid();
    });

    return list.ToList();
}

// Elapsed time: 45ms
```


A very big wowwwwww, **can you believe it!?** We have reached to `45ms`, **5X faster** than `212ms`!!!

## Summary
Well, we just finished our journey. We started our journey with a piece of code which took `212ms` and finished with a code which took `45ms` We have made it about `5X Faster!`. Here are the final results using [BenchmarkDotNet](https://benchmarkdotnet.org/):


![Optimizing Guid Generation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6uchg3iqtfoo35t40z5f.png)

Also, the benchmarking code is available [here](https://github.com/mehrandvd/GuidGeneration.Benchmark/blob/main/GuidGeneration.Benchmark/Program.cs) on my GitHub.
Improving visuals effects of my game
Tags: programming, gamedev, news, android
Published: 2022-12-08 14:00:00

## Falling Square v0.4.0

Hi everybody, a new release of my game [Falling Square](https://github.com/EmilienLeroy/FallingSquare) was released the last week. In this release you will find new visual effects, new sound effects and a new statistics view to see how you are good at this game. The game is currently available only on [Android](https://play.google.com/store/apps/details?id=fr.emilienleroy.fallingsquare&hl=fr&gl=US&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1), but an IOS version should be available begin of 2023.

## Better visuals effects

In this release, the biggest improvement is in the design of the game. A lot of details had been added to improve the user experience. The first change is the touched item animation, which is much better. Before only the color changed, but now the item explodes in little particular, which is very satisfying. The second change is the design of the touch zone. Now this zone is animated which adds a bit of difficulty when the square is little. I have also added a red flash when you lose a life. This help knows when a square is out of the screen. This allows users to always focus on items and not on the number of life


![Better visuals effects](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5i4ei33rcf6s12hifmki.gif)

## Adding sounds effects

Music and sound effects are important parts of games. Now Falling Square has background music and sound effect for each item. This improves the user experience. I also added two options to disable music and sound effect. I didn't add a volume slider because this game is only on a phone and on this device, the user often updates the global sound of the phone using the physical button and not the direct app sound.


![Options for music](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lpnseffoqa2nx0h7ei9q.png)

## Statistics

The last feature of this release is the new statistics view. Now after each game, the number of each item touched is stored on the phone. You can access the data via the statistics view.


![Statistics](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/690l8bz6tyzm7awr1rdo.png)

## What's next

That's all for this release. The next release will come in current begin in 2023 with an IOS version of the game. For the moment, you can download [Falling Square on Android](https://play.google.com/store/apps/details?id=fr.emilienleroy.fallingsquare&hl=fr&gl=US&pcampaignid=pcampaignidMKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1) and find the source of the game on the [GitHub repository](https://github.com/EmilienLeroy/FallingSquare). Thank you for reading this article!
Message Me
Tags: atlashackathon22, mongodb, webdev
Published: 2022-12-08 13:21:55

[Instructions]: # (To submit to the Appwrite Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
Use can contact to owner of the page directly


### Submission Category: 
Choose Your Own Adventure




### Link to Code

[`{% https://github.com/harshit-paneri/message-me-firebase %}` 
](https://github.com/harshit-paneri/message-me-firebase)

### Live application 

[`{% message-me-firebase.netlify.app/ %}` 
](message-me-firebase.netlify.app/)

### ScreenShot of Application


## First View

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


## DB 

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










[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. Prizes for winning projects with multiple collaborators will be sent to the person who posts this submission and they will distribute the prize evenly.)

## Future Plans
To make it saved for every user personally so that they will always able to access it from every where
DPS909 Blog: Release 0.4
Tags: opensource, beginners
Published: 2022-12-08 11:45:50

Hey everyone, thanks for reading my Blog post.

This week I have worked on the issue which i have described in my previous post [Planning](https://dev.to/anshul137/dps909-blog-release-04-planning-3idk).

## General Overview
Worked on the [ChatGPT for Google](https://github.com/wong2/chat-gpt-google-extension), which is the browser extension to display ChatGPT response alongside Google Search results, supports Chrome/Edge/Firefox.
And
[Basic-memory-game](https://github.com/Aatmaj-Zephyr/Basic-memory-game).
I have really liked their idea and want to contribute into their project which i have learned in `DPS909`. 
I have searched through their issue and their repository
and find out they are not using  any `Linter` in their code.
I have learned about the `Linter` in one of my labs which motivated me to add that into their work. 

I have added [ESlint](https://eslint.org/) into their code and created the `npm` script to run it from the command line.


## Links

[Issue-56](https://github.com/wong2/chat-gpt-google-extension/issues/56).
[PR](https://github.com/wong2/chat-gpt-google-extension/pull/58).

[Issue-106](https://github.com/Aatmaj-Zephyr/Basic-memory-game/issues/106)
[PR](ttps://github.com/Aatmaj-Zephyr/Basic-memory-game/pull/107)

[Issue-108](https://github.com/Aatmaj-Zephyr/Basic-memory-game/issues/108)
[PR](https://github.com/Aatmaj-Zephyr/Basic-memory-game/pull/109)

## Conclusion 

As of this blog post, I haven't received any reviews on my pull requests from the maintainers.
When starting off this assignment, my goal was to add features which i have learned in `DPS909` in open source Projects.
For my PRs, I was able to experiment with a variety of tools  some of which I've used before, and some are new for me.
I think all the skills which i have learned in this course will be useful when I work on any future projects.I was also able to experiment with different styles for light and dark modes during this course. Overall, I think this was a great end to a wonderful course and I hope to continue contributing to the open source community.
If I can go back to the first day of the open-source course, I will tell myself that focus more on how to utilize  git. I think an open-source project is not possible to be done without knowledge about git and GitHub. Throughout this course, git was the hardest part for me because I was worried if I break the branch. So, I was very careful when I was practicing the git bash commands. However, now, I feel a bit more confident because I practiced more through the labs and assignments of this course. But still, I need to practice some more to be fully confident. 

`Thanks`