DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,503 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
NuclearEagleFox
NuclearEagleFox

Posted on

How I Kept 14 of My 2017 New Year's Resolutions (with a Little Programming)

I know this is pretty late, but one of the tricks I've discovered is that you can start any time. Make your own program, make your own rules.

Until recently, I never really made or kept New Year's Resolutions because I thought they were ineffective and kind of silly. But then I noticed I wasn't reading as many books as I wanted to. Moreover, my book selection wasn't very diverse, mostly sci-fi and a few (read: extremely few) classics sprinkled in. I've enjoyed reading since I was a kid and decided I wanted to jump start my interest with a resolution. After some accidental research (specifically the podcast Pop Culture Happy Hour), I found some problems with the traditional approach that I decided to address with the help of some programming!

My strategy includes several sub-strategies and tools:

  • Planning:
    • Personal Motivation
    • Quantifiable Goals
  • Spreadsheets:
    • Day-by-Day Calculation
    • Year-on-Year Goal Setting
  • Calendars:
    • Month-by-Month Updates
    • Calculated Reminders

I'll go through them in order. At the end, I'll list all the formulas I use.

Planning

My first and only suggestion for this is: do only what works for you and no more. Resolutions are personal. If you find any part of what I'm suggesting odious, ignore it! I'm not selling anything here.

Personal Motivation

Find your own way in. I set all this up because I wanted to read more books (and it has grown from there). Maybe you want to see more shows or spend more time with friends, anything works. You have to be passionate about it though. This wouldn't have worked if I had chosen "I want to sew more tuxedos" as a starting point because I'm not passionate about that.

Quantifiable Goals

Having resolutions with specific targets means I can calculate my progress easily and allows me to automatically determine when I've completed a goal. This -- of course -- limits what kind of resolutions I can make (in this system). I can't, for example, quantify "I want to be more open with my friends". That goal is admirable, but it simply can't be quantified. (Note: I have goals like this, but there's nothing novel about how I deal with them.)

I also have to stick to goals that result in a specific event taking place, like finishing a book or taking a picture. Things like "I want to lose 10 pounds" don't fit. But I find other ways to include them, such as: "I want to exercise 52 times (this year)" or "I want to go on 12 morning jogs (this year)". The goal is to exercise, not reach a certain weight. If I keep up with it, my weight goal will happen eventually.

Another thing: choose goals that are fun! This year I've added "Go Skiing 3 Times" and "Play 20 New Games".

Spreadsheets

Personally, I use Google Sheets out of convenience. Theoretically, this all could be done with a database and scripts or even a web form, but Google Sheets is easy to get started with and I already knew a bunch about formulas, etc.

Day-by-Day Calculation

Here's where the programming comes in!

Test

Under Scheduled Amount there, you can see how much of this goal I should have completed by this time in the year. The formula is as follows:

=ROUND(IF(DAYS(NOW(), DATE(2018, 1, 1)) > 365, 365, DAYS(NOW(), DATE(2018, 1, 1))) / 365 * D37, 0)

Written in a more traditional language, it might look like this:

if (days_between(now(), date(2018, 1, 1)) > 365)
    time_distance = 365
else
    time_distance = days_between(now(), date(2018, 1, 1))
goal_fraction = ((time_distance / 365) * goal)
return Math.round(goal_fraction, 0)

As you can probably guess, this calculate the fraction of the year that has passed and then determines the fraction of the goal that should be completed.

This helps me schedule time to complete goals and tells me how far behind I am. To give myself a better picture of that I do some simple subtraction and then some string concatenation and store it under Schedule as you can see above. Notice, I don't show how far ahead of schedule I am, because I never want an excuse to slack off.

This is an essential part of my motivation. Seeing that big number under goal is somewhat abstract and demotivating ("It's so far away!"), but seeing this smaller number and knowing I can bring that to zero in a week or less is very helpful. The conditional coloring is also important, our brains respond to more than just numbers! Put the bad numbers in displeasing colors and the good numbers is pleasing colors.

Year-on-Year Goal Setting

Another problem I've encountered is stagnation. For certain goals (such as "Give Blood"), the goal can't really change due to external forces. But for others, I feel I should always be pushing myself. This means that I should always be increasing my goal from the previous year. Hey! I can do that with a formula:

=ROUND(AVERAGE(Worthwhile_Pictures_2017), 0) + 1

There's some important, subtle things to note here. Worthwhile_Pictures_2017 is a range that includes the goal from last year and the actual amount of pictures I achieved last year. I take the average of the two and add one. This results in a couple benefits. First, it means that if I fail a goal the previous year, this year's goal is modulated downward in the hopes it will be achievable. Second, for very small goals, it means I am always increasing. With large resolutions, it is unlikely that I will match the goal exactly and so the averaging will take care of that. But with small goals (such as Travel above), I may only get to visit one new location this year. If that is the case, the goal would never increase (and I want it to). Therefore, I add + 1 because it'll increase the small goals without affecting the larger goals much.

I also track how I've improved in the Change column, which shows whether a goal is New, Decreased, Same, or Increased over the last year. You can find the formula listed at the end of the article, there's not much about it worth discussing at length.

Calendars

I use Google Calendar for all forms of scheduling (surprise!). Specifically, I make liberal use of the reminder functionality it provides.

Month-by-Month Updates

On the first day of every month, I open this spreadsheet and update the Current column one by one. How do I track how much of each goal I've completed? It varies from goal to goal. For goals I track and schedule using Google Calendar Reminders, I can look at the past month and view all my completed reminders. For books, I use Goodreads. For journaling, I check all the relevant files. This is a feature I hope to improve upon (with automatic updates using relevant APIs and file processing). A lot is based on my memory.

Calculated Reminders

As I said above, I use Google Calendar Reminders to help me complete goals that take less than a day. Say I want to exercise 50 times this year, I can calculate how often that reminder should occur according to the formula FLOOR((365 - day_of_year) / 50). Using Google Calendar's custom recurrance tools, I can set this perfectly:
An example from my calendar
This can be a little tedious because each of these has to be created individually.

Summary

  • You can start at any time of the year.
  • Only do as much as you need to.
  • Choose goals you are motivated to finish.
  • Choose goals that can be measured. (If you want to use a system similar to this.)
  • Use a spreadsheet to track your goals and display relevant information.
  • You can use formulas to calculate how much of a goal should be completed and set goals for future years.
  • Use a calendar to update your goals and remind you to complete them.

This system isn't perfect, and I'm constantly trying to improve it. That being said, last year I was able to complete 14 out of 16 goals. This year, all the carryover goals have increased and I've added 29 new ones. We'll see how that turns out!

Code Listings

Goal

=ROUND(AVERAGE(Worthwhile_Pictures_2017), 0) + 1

Scheduled Amount

=ROUND(IF(DAYS(NOW(), DATE(2018, 1, 1)) > 365, 365, DAYS(NOW(), DATE(2018, 1, 1))) / 365 * D37, 0)

Schedule

=IF(E37 > C37, CONCATENATE(ABS(E37 - C37), " Behind Schedule"), "Ahead of Schedule")

Completion

=IF(D37<=C37, "Complete", "Incomplete")

Change

=IF(D37>INDEX(Worthwhile_Pictures_2017, 0, 2), "Increase", IF(D37<INDEX(Worthwhile_Pictures_2017, 0, 2), "Decrease", "Same"))

Reminder Occurance

FLOOR((365 - day_of_year) / 50)

Have a good year!

Top comments (0)

Does your company have something to share with DEV?

Create an Organization and start sharing content with the community on DEV.