Work smarter, not harder

How answering few questions can help you to save time?

Give me 6 hours to chop down a tree and I’ll spend the first 4 sharpening the axe. Lincoln

This quote genuinely summarises the idea.

This concept implicitly forces you to answer the following questions before to start a new task:

Do I have all the information to start?

What’s the scope of this tasks?

Is it a repeatable task?

What’s all the solutions to achieve this task?

What’s the best solution for this given context?

Being a smart achiever requires time and practice. But once you are familiar and comfortable with this process then you’ll be able to produce more code while ensuring a high standard of quality.

Ok. Nothing better than an example to understand what it means to be a smart achiever.

One-shot tasks

Today, your lead developer asks you to exceptionally insert the content of a CSV file in the database. The CSV file is light and it only refers to a single table without association.

Each line corresponds to a record to insert. Pretty simple, isn’t it?

3 obvious solutions:

Insert directly in database.

Create a simple script

Producing a reusable code

The first one is absolutely forbidden!

Indeed, inserting data directly in database can produce unwanted side effects because it bypasses all the guards that you’ve implemented: code review, QA, CI, etc..

On the other hand, creating a verbose script that fits to this CSV format seems to be the perfect solution.

Indeed, developing a library that consume any kind of CSV to insert in any tables seems a bit overkill as this insertion is exceptional..

Conclusion

Taking the time to collect information in order to take the right decision depending on your context, can help you to save plenty of times during your developments.

Each task that you achieve helps to sharpen your intuition.

Voilà!