DEV Community

Discussion on: How programming helps solving your real world problem

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.