๐Ÿ” Search Operation Explained for Non-Programmers

A comprehensive ๐Ÿงต ๐Ÿ‘‡ ๐Ÿ”  Search Operation Explained for Non-Programmers
In this ๐Ÿงต, I will explain

๐Ÿ™‹๐Ÿผโ€โ™€๏ธ What is Search?
๐Ÿ™‹๐Ÿผโ€โ™€๏ธ Where do we use it?
๐Ÿ™‹๐Ÿผโ€โ™€๏ธ How important is it?
๐Ÿ™‹๐Ÿผโ€โ™€๏ธ How better can it be?

Understand about concepts like Sorting, Hashing.

No programming knowledge required for reading this thread.
(1/n)

What is Search? - Search is basically when you are looking for something.

You must have come across terms like 'Find', 'Filter', 'Fetch', 'Get', 'Check', 'Select', 'Read', 'Look for' etc. They all involve 'Search'.
(2/n)

In our day-to-day life, we use search everywhere.

Your morning starts with alarm ringing. You are looking for your phone to snooze and ๐Ÿ˜ด for some more time.

After getting up, you went to rest room and looking for your tooth brush.
(3/n)

After bathing, you are looking for your dresses in the wardrobe.

You go to the key-holder and looking for your car key.

Inside office, you check for important meetings. You gather all the files that you need to submit to your manager.
(4/n)

Ranging from very simple to complex ones, we search for items almost through out the day.

Is it always straight forward for us to find what we are looking for? How frustrating and tedious is it?

Let's see some situations.
(5/n)

Have you ever faced difficulties while trying to find a dress you are looking for?

How difficult is it to find a good restaurant for your special occasion?

Do you get the record on time that you have kept somewhere earlier?
(6/n)

Finding an item that you are looking for gets tedious once the number of items increases.

Example, think of a book. You read something yesterday and forgot to mark that. Today when you plan to resume, you are clueless.
(7/n)

You will check page by page, line by line until you find at where you stopped yesterday.

Unless you are so fortunate, you would be searching almost till the end. You may abandon in between out of frustration.
(8/n)

What arrangement should you have made? The answer is however it suits you and will make your life easier in finding the right item quickly.

The person who is searching should know about the arrangement to take maximum benefit out of it. It is the most important part.
(9/n)

One such arrangement is keeping items in a sorted manner. How will sorting help in searching?

Consider this. If you know everything is sorted from A to Z, you want something starting with P. You randomly choose one and find out it's R. OK, now just search 2 items behind.
(10/n)

Another popular option is 'Hashing'. Hashing is like creating a shortcut for your item. Instead of searching big items, you now search small 'hashes'.

If hash values are arranged properly, finding an item becomes so straight forward many a times.
(11/n)

But it must be noted that hashes are not unique. It means, you may get same hash value for different items.

So combining Hash Values and Sorting will help search operation very fast. Keep items sorted for same hash values.
(12/n)

These are not the only choices that we have. But it's definitely that if some arrangement is made, search operation could become faster.

Let's have a real life example and see how do you arrange.
(13/n)

You must be tweeting regularly. With time, number of your tweets increases. It's getting time consuming to find an old tweet.

So what do you do? How can you find your popular tweets easily? How do you arrange?

I have seen people arrange these by creating a master ๐Ÿงต
(14/n)

Now you must have got why do programmers give so much importance on Searching. In a programmer's life, searching takes 75% time.

Do you know about CRUD? If you don't know, it stands for Create-Read-Update-Delete. In real world, almost all items undergo these 4 operations
(15/n)

Out of these 4, Read, Update and Delete require an item to be searched. So it's approximately 75% (may be more).

People may judge an application depending upon how fast it does search operation. Google is searching for you in micro seconds. Think if it's in seconds!!!
(16/n)

Little bit about programming now. You designed a web page. Browser renders it. CSS styles it. To fetch a UI element and its styles you have DOM, CSS Selectors.

Depending upon how fast these perform, your website will be performant.
If you have made this far, congratulations. I believe it must have given you some understanding about Search Operation and its importance.

If you liked and want to support me, please ๐Ÿ” the original tweet. ๐Ÿ’ฌ Reply if you have any thoughts. ๐Ÿ™

โ€ข โ€ข โ€ข

Missing some Tweet in this thread? You can try to force a refresh
ใ€€

Keep Current with Swapna Kumar Panda โœจ

Swapna Kumar Panda โœจ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @swapnakpanda

17 Aug
6 Insert Techniques for JavaScript Arrays

Check the ๐Ÿงต ๐Ÿ‘‡

#DEVCommunity #javascript
(1/n)

Insert an element at the beginning of an array by both mutating and not mutating the original array.

๐Ÿ‘‡
(2/n)

Insert an element at the end of an array by both mutating and not mutating the original array.

๐Ÿ‘‡
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(