Software engineering and personal development

Tag: time (Page 1 of 2)

How to Calculate the Time Spent in Python

In programming, it’s important to optimize code for performance. One way to do this is by measuring how long it takes for code to execute. In this blog post, we will explore a Python snippet that can be used to calculate the time it takes to execute a particular piece of code.

Python’s time module provides a simple way to measure the execution time of a program. The time.time() function returns the current time in seconds since the epoch (January 1, 1970, 00:00:00 UTC) as a floating-point number. We can use this function to measure the time before and after a particular piece of code and calculate the difference to get the total time it took to execute the code.

Continue reading

Find time differences quickly and easily in Ruby using TimeDifference gem

Img source: timeanddate.com

It is hard to think about a project where you do not have dates and timestamps involved in it. You may need to find the day when a user has performed a particular action, or when an event has occurred and many other cases. TimeDifference is a really helpful gem that makes it really easy to calculate the difference between two time periods. It allows you to calculate the difference in years, months, weeks, days, hours, minutes and seconds.

Continue reading

Reduce the amount of time you waste online using HabitLab

Img source: Chrome Web Store

One of the easiest ways that we can waste our time on is by browsing aimlessly without having defined intentions. Our habits determine are the behaviors that we are doing most of the time and taking the time to build better habits will most likely lead to better lives. This includes building better habits online. A Chrome extension from Stanford is to help us with that.

Continue reading

A quick tip on how to stop sending emails you are not done writing yet

Probably most of us have been in a situation in which we have sent an email that we did not want to send. We might have not finished formatting, or double checking it before the actual sending process, but we hit the Send button. Most of the times, it can be unintentionally, and as a result, we may write one or two PS follow-ups as replies to that email, adding or sending clarifications about certain things that have been mentioned in that email. During this week, I learned a small trick from a friend of mine that can help you in such occasions. Continue reading

Save up time and focus better on YouTube by hiding recommended videos with DF YouTube

Img source: DF YouTube

Have you ever gone to watch a short informational or educational YouTube video, only to find out that two hours have passed, and you are still watching many other related videos? If that’s your case, then you are not alone. We all get trapped into this process of mindless watching many YouTube videos without any prior intention. Luckily, there is a really beneficial Chrome extension, called DF YouTube. It hides recommended videos on YouTube and gives you the opportunity to only focus on the video that you are currently watching. Continue reading

Find a reason for saving your time

Source: yast.com

Source: yast.com

I think the number one technique that should be learned about managing time is having a compelling reason to save it. There are a lot of blog posts in the internet regarding this issue of telling you how to manage your priorities in life and thus saving more time for other important things. Being so, there is no excuse for someone to say that I do not know how to manage my time. One thing that I have consistently seen missing from these articles is that they do not put into the question the emotional factors, or reasons that would be as a motivation for a person to be more productive. Continue reading

Our different selves through time that prevent us from a qualitative lifestyle

Source: lookbody.top

Source: lookbody.top

In a recent email, the author of the book The Best Place to Work: The Art and Science of Creating an Extraordinary Workplace, Rod Friedman mentioned something very interesting. He told a story that happened to him and his daughter recently. A couple of days ago he went to the cinema with his daughter and although they had an unpleasant experience while watching the movie, they did not recall that particular story that way. They initially did not like the movie and considered it as not worth their time, but later on, as they were thinking a bit differently. They actually did change their opinion about the movie and thought that it was not that bad, and that it did deserve worth a watch. Rod considered this occurrence to happen as a result of our different selves that might change throughout different times. Continue reading

« Older posts

© 2024 Fatos Morina

Theme by Anders NorenUp ↑