@JacobSorber
  @JacobSorber
Jacob Sorber | Code Review #2: Generalizing and D.R.Y.ing things up. @JacobSorber | Uploaded 4 years ago | Updated 10 hours ago
Patreon https://www.patreon.com/jacobsorber
Courses https://jacobsorber.thinkific.com
Website https://www.jacobsorber.com
---


I haven't done a code review for a while, but today, I'm reviewing some code sent to me by Nikhil, who was wondering about how best to generalize his timing analysis of some sorting algorithms.
https://github.com/mrillusi0n/Sorting-Algorithms-Analysis

In this video, I take a run at it, giving you an example of finding a common interface and replacing one-off code with array and loop-based alternatives. This result is, I think, a cleaner and more general setup for testing these sorting functions. I also look a little at the simple correctness tests included in the code.

Related videos:
Timing code: https://www.youtube.com/watch?v=1KQqpiXxvWQ
Function pointers: https://www.youtube.com/watch?v=axngwDJ79GY

Prior code review videos:
https://www.youtube.com/watch?v=k2K2HVg4Arc
https://www.youtube.com/watch?v=BM9cnSEY23s





***

Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.


About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.

More about me and what I do:
https://www.jacobsorber.com
https://people.cs.clemson.edu/~jsorber/
http://persist.cs.clemson.edu/

To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [https://www.patreon.com/jacobsorber]
+ rep the channel with nerdy merch --- [https://teespring.com/stores/jacob-sorbers-store]

Source code is also available to Patreon supporters. --- [https://jsorber-youtube-source.herokuapp.com/]




Want me to review your code?
Email the code to js.reviews.code@gmail.com. Code should be simple and in one of the following languages: C, C++, python, java, ruby. You must be the author of the code and have rights to post it. Please include the following statement in your email: "I attest that this is my code, and I hereby give Jacob Sorber the right to use, review, post, comment on, and modify this code on his videos."

You can also find more info about code reviews here.
https://www.youtube.com/watch?v=k2K2HVg4Arc
Code Review #2: Generalizing and D.R.Y.ing things up.The Most Useless Keyword in C?Real Programming vs TutorialsDebugging Embedded Systems With GDB?Requesting your help. Did I fix my audio issues?Debug faster with gdb layouts (TUI)What are Language Standards? Do they matter?How my channel is changing in 2020.Whats the Best Way to Copy a Struct in C and C++?Quick Question. I need your input.How To Implement a Graph in C. (adjacency matrix version)Matthew McConaughey and the Terminal

Code Review #2: Generalizing and D.R.Y.ing things up. @JacobSorber