Programs

Testimonials

My Version of The Everlasting Sorting Visualizer, a Medium article by Alexandre Zajac, ESILV Student

The tutorial, made by Clement Mihailescu, an Ex-Google and Ex-Facebook Software engineer, shows how to build a great software engineering project to add to the resume.

Alexandre Zajac is a Software Engineering and Data Science Student at ESILV Graduate School of Engineering and an author on Medium.com, a web-publishing platform. In one of his latest Medium articles, Alexandre takes us on a journey through the process of building his version of a Sorting Visualizer with React and Redux using Typescript.

The tutorial, made by Clement Mihailescu, an Ex-Google and Ex-Facebook Software engineer, shows how to build a great software engineering project to add to the resume.

Video unavailable

This content cannot be displayed because you have not accepted the required cookies (YouTube).

My Version of The Everlasting Sorting Visualizer

In this post, I will be presenting one of the most known software applications, a sorting visualizer!

I think that it is one of the first things I saw when I started classes about programming, and I remember the teacher introducing us to different kinds of sorting algorithms this way. I was intrigued by both the algorithms that powered the animations and the overall technical implementation behind the visualizer.

On top of that, I have been following a lot of Youtube channels related to Computer Science, whether it be interview preparation, coding challenges or talks about new tech trends.

One video by Clement Mihailescu particularly sparked my interest in building coding projects. Building a sorting visualizer was also a way to confront two concepts of CS: Core Algorithms and Visualization/UI. So I decided to build my own.

Challenges and implementation

The choice of the stack for building this application wasn’t that easy, because I had the choice between a traditional HTML/CSS/JS implementation or a stack I was more familiar with, React with custom Styled Components.

I chose the latter because I represented more of a challenge to me and because I was more familiar with it. I chose TypeScript as the main language because I have been using it in some other projects and I really appreciated the advantages it provided:

The static typing allows to read and debug more easily the code with functions containing complex arguments/returns.

Encourages to build interfaces before diving into the actual implementation (particularly useful with PropTypes in React). Easier to find function signature and to extend functionalities.

I also considered the fact that TypeScript adds a compiling step, and that it could add more boilerplate code to the project, but I chose to keep it because I found that the advantages overweighted the drawbacks for such a project.

For State Management, I hesitated a lot between native React top-down prop communication and a dedicated Redux store.

Even if the app contains only two core Presentational components, I chose to use the Redux Store for several reasons:

Even if it added a lot of setup code to the project, it allowed a more coherent and structured state management system.

I had to choose a way to hold all the sorting steps in memory to pass them to my React Component in charge of the sorting process, and Redux serving as a global store was the perfect choice for that.

It forced me to understand the “Redux way” of managing state and to structure my components according to it.

The last tweak that I created a class for providing sorting steps to my main component, but I had to find a better way of managing the sorting steps coming out of my algorithms.

This wasn’t a big issue, but it was a choice made especially for recursive algorithms such as Merge sort, Quick sort or Heap sort, holding all the nested steps for sorting in memory. What I did is converting all the sorting functions into generator functions, it blended better with Redux and the processing of each action at a time.

The last point I wanted to expose is strictly concerning the UI. As a huge fan, I couldn’t deliver such an app without a Dark mode.

I knew that this could be implemented with Redux, but the React Context API was perfect for handling such a feature, and as it was my first time trying it, I was pretty satisfied with it.

Demo and final notes

Here is a demo of the final version: https://alexzajac.github.io/ReduSort/

Actualités liées

Formations liées

Projets étudiants liés

  • PI² A4

    ESG & Corporate Quality

    Year 4 Industrial Innovation Project (PI²4) in the ESILV engineering Grande Ecole Programme, 2023-2024. Sustainable investment is at the heart of BNP Paribas Wealth Management's strategy. As such, the bank regularly researches and creates content to promote a sustainable approach among its clients. ESG analysis of companies is at the heart of this approach. The aim of the project is to assess the links between companies considered to be of high quality and their ESG profile. An initial phase of…

    Discover
  • PI² A4

    Web application for climate risk analysis and INSEE data (team 212)

    Year 4 Industrial Innovation Project (PI²4) in the ESILV engineering cycle, 2023-2024. Project description: The project involves developing a web application that will enable users to obtain information on climate risks as well as INSEE (French national institute for statistical and economic studies) demographic data based on a specified address or SIRET. The application will be developed in Python, using one of the Django, Flask or Dash web frameworks, and will be divided into two main parts:…

    Discover
  • PI² A4

    Generative AI analysis of User Stories

    Year 4 Industrial Innovation Project (PI²4) in the ESILV engineering curriculum, 2023-2024. Using generative AI to analyse Users Stories, with the aim of speeding up test design. - Identify common patterns, best practices and potential gaps. - Provide recommendations for improving the quality of user stories - Assessing the testability of user stories - Clarifying ambiguous requirements - Detecting errors and inconsistencies - Suggest test scenarios Difficulty: finding a large enough volume of…

    Discover
  • PI² A4

    Creation of a platform to measure availability based on micro PCs

    Year 4 Industrial Innovation Project (PI²4) in the ESILV engineering curriculum, 2023-2024. Development of an availability measurement platform based on micro PCs (or Raspberry pi) Objective: Deploy a minimalist, scalable infrastructure to measure availability (quality of wifi access, availability of the .... website). The platform will use performance testing tools (Gatling) or automation tools (robot framework) to model the path to be monitored. These paths will be controlled by a central…

    Discover
  • PI² A4

    DIVA - GRC

    Year 4 Industrial Innovation Project (PI²4) in the ESILV engineering curriculum, 2023-2024. 1. Presentation of the project To define and make operational a tool to support the management of e-governance, with the automation of the generation of customised action plans, indicators (KPIs) and other information, with the support of an AI, for customers. This is based on an open source tool designed to help set up and maintain an information security management system (ISMS). 2. Context An IS…

    Discover
  • PI² A4

    Automated autopsy report writing

    Year 4 Industrial Innovation Project (PI²4) in the ESILV engineering curriculum, 2023-2024. During an autopsy, forensic pathologists establish findings that they must transcribe in a written report. This secondary work is necessary for criminal proceedings, and the software we are looking for must be able to transcribe live the findings made by the doctor during the procedure. The implementation must take an external audio source (microphone in the autopsy room) while excluding surrounding…

    Discover