<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Taiwo Ifedayo</title>
    <description>The latest articles on DEV Community by Taiwo Ifedayo (@techmornach).</description>
    <link>https://dev.to/techmornach</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1086087%2Ffe2827fd-ab0d-4b1a-9ffc-17c977d3a56d.png</url>
      <title>DEV Community: Taiwo Ifedayo</title>
      <link>https://dev.to/techmornach</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/techmornach"/>
    <language>en</language>
    <item>
      <title>Data Structures in Javascript</title>
      <dc:creator>Taiwo Ifedayo</dc:creator>
      <pubDate>Sat, 03 Jun 2023 11:35:04 +0000</pubDate>
      <link>https://dev.to/techmornach/data-structures-in-javascript-4l6g</link>
      <guid>https://dev.to/techmornach/data-structures-in-javascript-4l6g</guid>
      <description>&lt;p&gt;For years &lt;strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript"&gt;JavaScript&lt;/a&gt;&lt;/strong&gt; was only used in the &lt;strong&gt;&lt;a href=""&gt;web browser&lt;/a&gt;&lt;/strong&gt;, this all changed with the emergence of platforms such as &lt;a href="https://nodejs.org/"&gt;Node&lt;/a&gt; and &lt;a href="https://spidermonkey.dev/"&gt;Spidermonkey&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that &lt;strong&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript"&gt;JavaScript&lt;/a&gt;&lt;/strong&gt; has begun its shift from only &lt;a href=""&gt;client side programming&lt;/a&gt;, programmers will find more need for tools provided by conventional languages such as &lt;a href="https://en.wikipedia.org/wiki/C%2B%2B"&gt;C++&lt;/a&gt; and &lt;a href="https://www.java.com/"&gt;Java&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Among these tools are the classic data structures such as linked lists, stacks, queues, and graphs, as well as classic algorithms for searching and sorting data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is Data Structures and Algorithms important
&lt;/h2&gt;

&lt;p&gt;From the title of &lt;a href="https://en.wikipedia.org/wiki/Niklaus_Wirth"&gt;Nicklaus Writh&lt;/a&gt; programming textbook &lt;a href="https://www.amazon.com/Algorithms-Structures-Prentice-Hall-Automatic-Computation/dp/0130224189"&gt;"&lt;em&gt;Algorithms + Data Structures = Programs&lt;/em&gt; (Prentice-Hall)"&lt;/a&gt;, it show the essence of computer programming.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Any computer program that goes beyond the trival "Hello world!" will require some type of data structure to manage the type of data the program is written to manipulate, along with some other form of algorithms for translating the data from its input form to its output form.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most programmers are only familiar with the &lt;strong&gt;Array&lt;/strong&gt; data structure, &lt;strong&gt;Arrays&lt;/strong&gt; are great for some problems, but for many complex problems, there aren't sophisticated enough.&lt;/p&gt;

&lt;p&gt;Most Experienced programmers will admit that for many programming problems, once they come up with the appropraite data structure the algorithms needed are easier to design and implement.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An example of a data structure that leads to efficient algorithms is the &lt;strong&gt;binary search tree&lt;/strong&gt; (BST). A &lt;strong&gt;binary search tree&lt;/strong&gt; is designed so that it is easy to find the minimum and maximum values of a set of data, yielding an algorithm that is more efficient than the best search algorithms available. Programmers unfamiliar with BSTs will instead probably use a simpler data structure that ends up being less efficient.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Studying algorithms is important because there is always more than one algorithm that can solve a problem, and knowing the efficient ones is imprtant for a productive programmer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are at least six or seven ways to sort a list of data, but knowing that the &lt;strong&gt;Quicksort algorithm&lt;/strong&gt; is more efficient than the &lt;strong&gt;selection sort algorithm&lt;/strong&gt; will lead to a much more efficient sorting process.&lt;/li&gt;
&lt;li&gt;It’s fairly easy to implement a &lt;strong&gt;sequential or linear search algorithm&lt;/strong&gt; for a list of data, but knowing that the &lt;strong&gt;binary sort algorithm&lt;/strong&gt; can sometimes be twice as efficient as the se‐ quential search will lead to a better program.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Study of data structures and algorithms not only teaches which data structures and algorithms are most efficient, but you also learn how to decide which data structures and which algorithms are the most appropraite for the problem at hand.&lt;/p&gt;

&lt;p&gt;There will always be trade-offs when writing a program, especially in Javascript, knowing the ins and outs of the various data structures and algorithms covered in this book will help you make the proper decisions for any programming problem you are trying to solve.&lt;/p&gt;

&lt;p&gt;Credits&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Image made with &lt;a href=""&gt;Canva&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reference from &lt;a href="https://www.amazon.com/Data-Structures-Algorithms-JavaScript-approaches/dp/1449364934"&gt;Data Structures And Algorithms With JavaScript&lt;/a&gt; by [&lt;a href="https://www.amazon.com/Michael-McMillan/e/B001IU0RIG/ref=aufs_dp_fta_dsk"&gt;Michael McMillan&lt;/a&gt;]&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>The need for Reliable Scalable and Maintainable Applications.</title>
      <dc:creator>Taiwo Ifedayo</dc:creator>
      <pubDate>Fri, 02 Jun 2023 22:00:00 +0000</pubDate>
      <link>https://dev.to/techmornach/the-need-for-reliable-scalable-and-maintainable-applications-3e9k</link>
      <guid>https://dev.to/techmornach/the-need-for-reliable-scalable-and-maintainable-applications-3e9k</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The internet was done so well that most people think of it as a natural resource like the Pacific Ocean, rather than something that was man-made. When was the last time a technology with a scale like that was so error-free?&lt;/p&gt;

&lt;p&gt;Alan Kay, Dr Dobb's Journal (2012)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Many applications today are data-intensive rather than compute-intensive.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Raw CPU power&lt;/strong&gt; is rarely a limiting factor for these applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The main issues are usually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data Amount&lt;/li&gt;
&lt;li&gt;Data Complexity&lt;/li&gt;
&lt;li&gt;The speed at which data changes.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Data intensive applications are typically built from standard building blocks which provide a common needed functionality&lt;/em&gt;. Example, many applications needs to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Store data&lt;/strong&gt;, so it can be found when needed (&lt;a href="https://www.oracle.com/ng/database/what-is-database/#:~:text=A%20database%20is%20an%20organized,database%20management%20system%20(DBMS)." rel="noopener noreferrer"&gt;Databases&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remember results&lt;/strong&gt; of expensive operation, to speed up reads (&lt;a href="https://www.techtarget.com/searchstorage/definition/cache" rel="noopener noreferrer"&gt;Caches&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Allow users to &lt;strong&gt;search and filter&lt;/strong&gt; data by keyword and various ways (&lt;a href="https://www.algolia.com/blog/product/what-is-a-search-index-and-how-does-it-work/#:~:text=So%20what%20is%20a%20search,search%20engine%20algorithm%20retrieves%20information." rel="noopener noreferrer"&gt;Search Indexes&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Send messages&lt;/strong&gt; to other process for asynchronous handling (&lt;strong&gt;&lt;a href="https://www.techtarget.com/searchdatamanagement/definition/stream-processing#:~:text=Stream%20processing%20is%20a%20data,or%20another%20stream%20processing%20engine." rel="noopener noreferrer"&gt;Stream Processing&lt;/a&gt;&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Periodically crunch&lt;/strong&gt; a large amount of accumulated data (&lt;strong&gt;&lt;a href="https://aws.amazon.com/what-is/batch-processing/#:~:text=Batch%20processing%20is%20the%20method,run%20on%20individual%20data%20transactions." rel="noopener noreferrer"&gt;Batch Processing&lt;/a&gt;&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These data systems are such a succesful abstraction we use them without thinking too much.&lt;/p&gt;

&lt;p&gt;When building an application, you wouldn't dream of writing a new data storage engine from scratch, because databases are a perfectly good tool for the job.&lt;/p&gt;

&lt;p&gt;In the real world, things aren't that simple. We have so many database applications with different characteristics.&lt;/p&gt;

&lt;p&gt;Different applications have different requirements&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are various approaches to caching&lt;/li&gt;
&lt;li&gt;Several ways of buiding search indexes&lt;/li&gt;
&lt;li&gt;And many more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So when building an application, we need to figure out the right tool and approach for the task at hand.&lt;/p&gt;

&lt;p&gt;At times it is hard to combine several tools when you need to do something a single tool can't do alone.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;u&gt;&lt;strong&gt;Thinking About Data Systems&lt;/strong&gt;&lt;/u&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;We typically think of &lt;strong&gt;&lt;a href="https://www.oracle.com/ng/database/what-is-database/#:~:text=A%20database%20is%20an%20organized,database%20management%20system%20(DBMS)." rel="noopener noreferrer"&gt;Databases&lt;/a&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;a href="https://www.geeksforgeeks.org/queue-data-structure/" rel="noopener noreferrer"&gt;Queues&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://www.techtarget.com/searchstorage/definition/cache" rel="noopener noreferrer"&gt;Caches&lt;/a&gt;&lt;/strong&gt; e.t.c as being different categories of tools.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Databases and Message queues have certain superficial similariies;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They both store data for some time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;BUT&lt;/strong&gt; they have different access patterns, which leads to different performance characteristics and different implementations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SO&lt;/strong&gt; why are they under an umbrella term like &lt;em&gt;data systems&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;In recent years many new tools for data storage have emerged.&lt;/p&gt;

&lt;p&gt;These tools are optimized for a variety of different use cases, and they no longer neatly fit into traditional categories. For Example;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are data stores that are also used as message queues such as &lt;strong&gt;&lt;a href="https://redis.io/" rel="noopener noreferrer"&gt;Redis&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;There are message queues with database-like durability guarantees &lt;strong&gt;&lt;a href="https://kafka.apache.org/" rel="noopener noreferrer"&gt;Kafka&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The boundaries between these categories are getting blurred.&lt;/p&gt;

&lt;p&gt;Many applications now have such demanding or wide ranging requirements that a single tool can no longer meet all of its data processing and storage needs.&lt;/p&gt;

&lt;p&gt;The work is broken down into tasks that can be performed efficiently on a single tool, and those different tools are stiched together using application code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FOR EXAMPLE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you have an &lt;strong&gt;application-managed caching layer&lt;/strong&gt; (using &lt;strong&gt;&lt;a href="https://memcached.org/" rel="noopener noreferrer"&gt;Memcached&lt;/a&gt;&lt;/strong&gt; or similar), or a full-text search server separate from your main database (such as &lt;strong&gt;&lt;a href="https://www.elastic.co/" rel="noopener noreferrer"&gt;Elastisearch&lt;/a&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;a href="https://solr.apache.org/" rel="noopener noreferrer"&gt;Solr&lt;/a&gt;&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;It is normally the application code's responsibilty to keep those caches and indexes in sync with the main database.&lt;/li&gt;
&lt;li&gt;When you combine Several tools to provide a service, the service interface or API usually hides those implementation details from clients.&lt;/li&gt;
&lt;li&gt;You've essentially created a new special-purpose data system from smaller, general-purpose components.&lt;/li&gt;
&lt;li&gt;Your composite data system may provide certain guarantees, e.g that the cache will be correctly invalidated or updated on writes, so that outside clients see consistent results.&lt;/li&gt;
&lt;li&gt;You are now not only an application developer, but also a data system designer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When designing a data system or service, tricky questions that arise include&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How do you ensure that the data remains correct and complete even when things go wrong internally?&lt;/li&gt;
&lt;li&gt;How do you provide consistently good perfomance to clients, even when parts of the system are degraded?&lt;/li&gt;
&lt;li&gt;How do you scale to handle an increase in load?&lt;/li&gt;
&lt;li&gt;What does a good API for the service look like?
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftechmornach.vercel.app%2Fstatic%2Fimages%2FBlog%2FReliable-Scalable-Maintainable-Applications%2FDataSytem.png" alt="Data Systems"&gt;
&amp;gt; One possible architecture for a data system that combines several components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;There are many factors that influence data system design, which includes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Skills and experience of the people involved.&lt;/li&gt;
&lt;li&gt;Legacy system dependencies&lt;/li&gt;
&lt;li&gt;Time scale for delivery&lt;/li&gt;
&lt;li&gt;Organization tolerance for different kinds of risks&lt;/li&gt;
&lt;li&gt;Regulatory constraints&lt;/li&gt;
&lt;li&gt;E.T.C&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;There are three concerns that are most important in most software systems:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reliability
The system should continue to function correctly at the desired performance, even in the face for adversity, which may be hardware, software or even human error.&lt;/li&gt;
&lt;li&gt;Scalability
As the system grows in data volume, traffic or complexity there should be reasonable ways of dealing with that growth.&lt;/li&gt;
&lt;li&gt;Maintainability
Over time many different people will work on the system, they should be able to work on it productively.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We all use these terms without a clear Understandiing of what they mean.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Credits&lt;/strong&gt;&lt;br&gt;
Image by &lt;a href="https://www.freepik.com/free-vector/gradient-website-hosting-illustration_22650925.htm#query=scalable%20and%20reliable%20data%20intensive%20applications&amp;amp;position=45&amp;amp;from_view=search&amp;amp;track=robertav1_2_sidr" rel="noopener noreferrer"&gt;Freepik&lt;/a&gt;&lt;br&gt;
Reference from &lt;a href="https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/1449373321" rel="noopener noreferrer"&gt;Designing Data Intensive Application&lt;/a&gt; by &lt;a href="https://martin.kleppmann.com/" rel="noopener noreferrer"&gt;Martin Kleppmann&lt;/a&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>webdev</category>
      <category>api</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
