DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 967,911 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for I am a Crude Software Engineer
Nyior Clement Jr.
Nyior Clement Jr.

Posted on • Originally published at nyior-clement.netlify.app

I am a Crude Software Engineer

I have built things for the web and some of these things had really clever algorithms. I have written unit tests. I understand, and have done most of the things in-between building and deploying to a production server( this too included). Did I fail to mention that I’ve also collaborated with other developers using git ? Oh yeah I have.

Bruh! you are a pro mehn!

I wish... Even though I know I still have a lot to learn, there is one unchecked box that has become my biggest concern lately: I’m yet to master algorithms and data structures. Not mastering algorithms and data structures only means one thing:Β I’m a crude software engineerΒ .

Oh wow! These constructs must be really important in software engineering then

No! algorithms and data structures aren’t essential components of software engineering; They are software engineering!

I’d love to really ask what makes these constructs so important in software engineering, but I don’t even know what they are to begin with

A data structure is a particular way of organizing data in a computer. For example, we could organize data in an indexed, ordered structure(lists/arrays). An algorithm on the other hand is any step by step instruction that manipulates some data. For example, when you write a for loop that prints each element in a list/array, that’s an algorithm.

These constructs are so important in software engineering because they guarantee building efficient software systems.

I beg your pardon?!

Building efficient software systems entails crafting applications that require the least amount of memory possible and the minimum execution time that’s achievable, to execute tasks.

Why is this important you ask ?

Usually a computer has several applications installed and most times 2 or more running concurrently. This wouldn’t have been a problem if these computers had infinite memory and indescribably fast processor clock speed, but they don’t. Remember, now there is a need for speed(pun intended) every where you go. As a result, if a program requires so much space and takes too long to execute, it will considerably slow down the computer, but most importantly, this will result in a poor user experience. It is imperative that every software engineer builds programs that are highly efficient.

Okay now I think I get the gist, but tbh, I still don’t understand how understanding these constructs will help me write efficient code though

Mastering data structures presupposes understanding the several existing ways data could be organized in a program and by extension the computer(lists, linked-lists, binary trees etc.). Usually, a given data structure is optimized for certain operations. For example, while lists/arrays are optimized for retrieving items based on index, linked lists are optimized for operations like inserting and removing items( something lists/arrays are poor at). There is always the right data structure for your use case. Using the wrong data structure could result in a revoltingly inefficient code.

Mastering algorithms on the other hand encompasses understanding the several existing ways for efficiently performing some of the most common operations(e.g. searching and sorting) in computer programming. Because some of these algorithms are relatively more efficient, knowing what algorithms exists and their behaviour will enable one use the optimal or near-optimal algorithm in a given scenario. Most times as software engineers, we create our own algorithms; having a strong grasp of these constructs helps us measure the efficiency of our algorithms too.

So tell me, how can I possibly be a pro when, out of ignorance I’ve probably wrongly used a data structure? Β How can I be a pro when out of ignorance I’ve probably written code that searches my sorted python list(probably called arrays in your favourite programming language) in a linear fashion, when there is a more efficient approach called binary search. No! to be a pro I’ve got to understand the art and the technique of software engineering. I need to start writing code that not only does the right thing, butΒ does it well. To achieve this I need to start using correct data structures and highly efficient algorithms. Every software engineer needs to master algorithms and data structures! E get why!

Interested in understanding how to measure the efficiency of your algorithms? Read my post on space-time complexity, and the big-o notation

References

https://www.geeksforgeeks.org/data-structures/#

https://softwareengineering.stackexchange.com/questions/212575/why-are-algorithms-and-data-structures-important

Top comments (1)

Collapse
 
nyior profile image
Nyior Clement Jr. Author

You've got questions, concerns? Let's talk here in the comment section.

πŸ‘‹ Hey, my name is Noah and I’m the one who set up this ad. My job is to get you to join DEV, so if you fancy doing me a favor, I’d love for you to create an account.

If you found DEV from searching around, here are a couple of our most popular articles on DEV: