Ok, i am here to share how i completed 3 hours of data entry work in just 10 minutes. Yesterday, i was doing some database work with the new blog that i just bought. There’s some problem with the hyperlinks of images in each post and i needed to edit those code manually for each posts. And there was around 200+ post for me to edit.
Well, 200 posts is hell lot of work and instead of just wasting my time looking at each of the post for the hyperlinks and editing them, i decided to do out a simple php script that runs on the web server. So, when the script runs, it will automatically change the hyperlinks in each post to what i wanted. And expectedly, this idea works out quite well.
So the first thing i do in the script is to connect to the database, then i do a for loop which will loop all the entries in the database. After that, i check for the specific column that i am looking at and use preg_replace. Preg-replace as defined in php.net, is to perform a regular expression search and replace. So in this case, it will replace the old image hyperlink with the new hyperlink i wanted. And that’s it, i completed a expected 3 hour task in just 10 minutes.
So the moral of this post is to emphasize on the importance of solving problems with different methods and maximising your time. I think that applies to working in the industry, blogging, and many other stuffs too. If you happened to be told by your boss or superior to do some data entry work, there’s not really only one way to do so (copying and pasting). Methods are being invented by human and i believe that there are many different ways to complete a similar task. Just like solving a maths question, there are many correct ways. Don’t just try one way, try many others and find the best path.
For example, you are told to enter records or edit records in an excel file which probably will take 8 hours to do so. Instead of just wasting the 8 hours on entering and editing the records, why not spent 1 hour to code out a simple script that will helps you to do the task? You save time and you have proven yourself to be effective and efficient infront of your boss.
Hope this post give you some insights.
If you enjoyed this post, make sure you subscribe to my RSS feed!



{ 1 comment… read it below or add one }
If only you could give a bit more information that would be great.