DEV Community

loading...

How programming helps solving your real world problem

entrptaher profile image Md. Abu Taher πŸ‘¨β€πŸ’» ・Updated on ・4 min read

Time, we don't have time. That's why we hire people to do our job. We don't have time so we write data on spreadsheet instead of on paper. We don't have time for anything. Having no time is a real world problem. And programming actually solves that problem directly as if it's the sole reason programming was invented.

Let's solve a real world problem, unfortunately there isn't any code here on this post yet so you have to waste your time and read the whole post to understand where we are going at.

Yesterday I was talking about programming to a student (to-be) who doesn't know programming. Usually I would start talking about variable, loops etc if I were in any normal programming session. However, I decided to use a real world problem that the student was facing.

He was asking me about programming for last 2-3 months but I just wasn't able to allocate a good time for him. He said he was doing data entry jobs and earning good money but he is not satisfied with the workload, also was a bit interested in programming.

Check this out, so many people are waiting to do data entry jobs. It's cheap labor with lots of repetitive work.

On the call, I asked him to show me a real work he was doing at that moment. He showed me his recent work where he was spending around 5-10 hours just copy pasting some data from a early 2005+ website to a spreadsheet. The usual process was like this,

There were around 1.8k data to be filled up. We also measured how much time it took to do just one of them, and it took around 1~1.5 minutes. At that moment he had done around ~600 data.

How much time he had to spend just going thru some pages, copy paste the data and repeating over? ~600 minutes for ~600 rows of data. It's actually more than 600 minutes, since he was to take break or readjust data sometimes, there was also a factor with the webpage loading speed etc.

So, I wrote some code just to automatically done just 1~5 seconds out of the whole 1 minute process. Figuring out the structure with early 2005+ website and writing (+testing and fixing) the small code took me around 30 minutes. At the end, I could automatically do something that would take 1 to 5 seconds.

Not a big deal!, I could see from his face. Like I just wasted 30 minutes to do something that would take him 5 seconds. Which idiot would waste time like this? Am I a scam then?

Then I jumped him with the real calculation. Say, it took me 30 minutes just to automate 5 seconds, I just wasted 30 minutes, right? But what if you think about all 1.8k rows of data? Didn't I just do something that would take 5 * 1.8k seconds from your workload? Yes, I spent 30 minutes so that I can save the rest 120 minutes.

Think about it. Automating 5 second took me 30 minutes, maybe automating 1 minute would take me 360 minutes, that's a maybe. Now, after I am done with my automation, all I have to let it run and it would go on and complete rest of the task which would take around 1800 minutes.

With programming, if I spend 360 minutes, I can save the rest 1440 minutes.

Yup. While you will be busy copying around the boring data from one place to another, I would be done with it, grab some tea/coffee, keep it running, getting the data super fast, deliver already, and get paid.

Say, if you get paid 200$ for working 1800~2700 minutes, that's 4-6$ per hour. However I will be paid same 200$ for working only 360~400 minutes. That's 28-40$ per hour. My customer will also be super happy with fast delivery. I win in every case just because I know a bit of programming. (Was I bragging or showing off? No!)

He was like,

wow! I didn't think this way. Programming is super awesome! So, how do I start?

See how programming actually solves a real world problem? It solved the issue with time. And I explained the whole stupid thing to a newbie with a real world example, where he the victim of boredom by simple tasks. Now I got him in my hook for future lessons!


Check these guys, they will be providing the same thing. Same data entry, web research and so on. But with a different method. They will be spending the time wisely and write a script.

If a data entry worker learns programming, it will be his/her best investment of time. It's super hard, it's a long road. Their life will change after they put their knowledge in action. They will lead a better life.

Or not, they will be now wasting their time on debugging their programs for their whole life 😈. Programming solves timing issue for the clients, not for the workers.

btw, Could you write a script or use a program to read this big boring post to you instead of wasting your precious time to read it all?

Happy programming!

Edit

Here is how the end product looked like without any concurrency. It was able to save 800+ data within under 1 hour (again, without any concurrency). Instead of 1 minute per row, it could easily go thru the whole flow, grab data within 1-5 seconds. More on this on a later post.

Discussion (5)

pic
Editor guide
Collapse
amberbdr789 profile image
Amber Bdr. Kharka

Very informative, great work.. this is my real interest. I have just started learning javascript. Can you help where can i get this kinds of problems ? I am really interested to work with this kind of problem rather than spending lot of time in building demo projects because after all there will be still vast difference between demo projects and real projects.....
Thank you..

Collapse
shaiay profile image
shaiay

Obligatory xkcd
xkcd.com/1319
In which he has a point - it rarely really just takes 30 minutes ...

Collapse
entrptaher profile image
Md. Abu Taher πŸ‘¨β€πŸ’» Author

I would point out reasons why it took me 30 minutes to write few lines of code. The reasons includes,

  • I was thinking about doing something on fly. Its like taking on an exam without knowing the subject before.
  • I tested regex, normal string functions and so on.
  • I had to make sure the script works on multiple situations.
  • I had to test the script several time.
  • I had to optimize the code for quality.
  • I wanted to show the benefit of programming to someone who doesn't know about it, but not how to optimize my code, since he wouldn't even understand the point of optimization at that point. etc excuses.

Though it shouldn't take 30 minutes, it's not like I did not have the time. I had plenty of time, remember total 1800 minutes? Spending 30 minutes to find out an optimized way obviously isn't much.

Even before I am replying this comment, I generalized the little script even more so it looks super simple and might feel stupid as to why I even spent so much time on it.

Collapse
entrptaher profile image
Md. Abu Taher πŸ‘¨β€πŸ’» Author

Here is a final bot, took me around 3-4 hours to build it all, test everything out and optimize it. More on this with actual code will be posted soon as part two (I hope).

Collapse
muhimen123 profile image
Muhimen

I dis the same. And now, I hosted the app on a server and collecting a ton of data from dev.to for my next research.