Skip to main content
edited title
Link
konijn
  • 34.4k
  • 5
  • 71
  • 267

Opinion on a small app I created using JavaScript Visualized bubble sort

added code formatting
Source Link
Mast
  • 13.8k
  • 12
  • 57
  • 127

Recently I created a small app using JavaScript, and I would love iffor some Expert JavaScript developers if they have the time of day, to tell me their opinions so I can grow and improve.

I'm mostly working on backendback-end tasks with PHP and Go, but I thought making something small in jsJS would be fun attempt.

Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image URL. The app then shuffles it and asks you what sort do you want.

It is then visual when sorting it back to original.

I know this is not a typical question, but I would love to get some opinions on code, and look of app. So, what do you think? Any recommendation ?

GithubGitHub of project:

https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/

Example of one sorting algorithm where I'm saving every swap into an array of "animations":

function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}

Recently I created a small app using JavaScript, and I would love if some Expert JavaScript developers if they have the time of day, to tell me their opinions so I can grow and improve.

I'm mostly working on backend tasks with PHP and Go, but I thought making something small in js would be fun attempt.

Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image URL. The app then shuffles it and asks you what sort do you want.

It is then visual when sorting it back to original.

I know this is not a typical question, but I would love to get some opinions on code, and look of app. So, what do you think? Any recommendation ?

Github of project:

https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/

Example of one sorting algorithm where I'm saving every swap into an array of "animations"

function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}

Recently I created a small app using JavaScript, and I would love for some JavaScript developers if they have the time of day, to tell me their opinions so I can grow and improve.

I'm mostly working on back-end tasks with PHP and Go, but I thought making something small in JS would be fun attempt.

Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image URL. The app then shuffles it and asks you what sort do you want.

It is then visual when sorting it back to original.

I know this is not a typical question, but I would love to get some opinions on code, and look of app. So, what do you think? Any recommendation ?

GitHub of project:

https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/

Example of one sorting algorithm where I'm saving every swap into an array of "animations":

function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}

Opinion on a small app I created using JavascriptJavaScript

Recently I created a small app using JavascriptJavaScript, and I would love if some better javascriptExpert JavaScript developers if they have the time of day, to tell me their opinions so I can grow and improve.

I'm mostly working on backend tasks with PHP and Go, but I thought making something small in js would be fun attempt.

Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image urlURL. The app then shuffles it and asks you what sort do you want.

It is then visual when sorting it back to original.

I know this is not a typical question, but I would love to get some opinions on code, and look of app. So..what, what do you think? Any recommendation ?

Github of project:   

https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/

Example of one sorting algorithm where I'm saving every swap into an array of "animations"

function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}
function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}

Opinion on a small app I created using Javascript

Recently I created a small app using Javascript, and I would love some better javascript developers if they have the time of day, to tell me their opinions so I can grow and improve.

I'm mostly working on backend tasks with PHP and Go, but I thought making something small in js would be fun attempt.

Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image url. The app then shuffles it and asks you what sort do you want.

It is then visual when sorting it back to original

I know this is not a typical question, but I would love to get some opinions on code, and look of app. So..what do you think?

Github of project:  https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/

Example of one sorting algorithm where I'm saving every swap into an array of "animations"

function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}

Opinion on a small app I created using JavaScript

Recently I created a small app using JavaScript, and I would love if some Expert JavaScript developers if they have the time of day, to tell me their opinions so I can grow and improve.

I'm mostly working on backend tasks with PHP and Go, but I thought making something small in js would be fun attempt.

Basically it's an app that sorts an image based on users choice of sorting algorithm. You first say how many rows and columns want, and past an image URL. The app then shuffles it and asks you what sort do you want.

It is then visual when sorting it back to original.

I know this is not a typical question, but I would love to get some opinions on code, and look of app. So, what do you think? Any recommendation ?

Github of project: 

https://github.com/fvukojevic/Image-Sorting-Visualizer (if someone wants to star 😁 😁) Application: https://image-sorting-visualizer.herokuapp.com/

Example of one sorting algorithm where I'm saving every swap into an array of "animations"

function bubbleSort(arrayCopy, animations) {
    let sorted = false;
    let counter = 0;
    while(!sorted){
        sorted = true;
        for(let i=0;i<arrayCopy.length -1 - counter; i++) {
            if(arrayCopy[i].val > arrayCopy[i+1].val){
                swap(i, i+1, arrayCopy);
                sorted = false;
                animations.push([i, i+1]);
            }
        }
        counter++
    }
}
Tweeted twitter.com/StackCodeReview/status/1216374458597986307
Source Link
Loading