⬆️ ⬇️

Motivation for health! Or how to keep healthy, constantly working at the computer

The story of one project.



While doing projects and working, sitting at a computer, for 12-15 hours a day (often longer), I began to notice how my eyes began to water and blush, cervical vertebrae just ached (a little stress and they just did not allow to live in peace), brushes hands, waist and legs numb. In the evening, after supper, I fell asleep, but at night I woke up and work again. The stomach grew, muscles sagged, became irritable.

Although we all know about the benefits of gymnastics. They read, saved a lot of exercises in their “Favorites” (at the very pile of such in their favorites and on disks). Maybe a couple of times, then they forgot either laziness, or not enough time, looking in the mirror and promising myself “Starting a new life on Monday!”. This is not another article that talks about what threatens us sedentary lifestyle and what benefits brings gymnastics - you probably know about it enough.



Let me tell you my story, from understanding the problem to implementing the solution as a service ...





After the delivery of the next project, I allowed myself a rest on the Red Sea coast. Sitting under palm trees and pondering plans for future projects, I realized with horror that I would return again to this regime. I realized that in a few years it will not be better, only worse and worse.

What to do? Fitness is often not enough time and effort. Yes, and fitness does not save from the fact that we sit all day in one position. It was decided to use the so-called exercise reminder programs.

')

And then the idea was born to make such a service. Could not wait to return home to start implementation.



After reviewing such projects on the Internet, I downloaded some and tried. In the course of work, the pop-up windows with exercises did not allow me to think, then I said to myself: “a little later,” “in time,” “not now” ... And I understood that my enthusiasm from charging was melting - something was missing. There was a lack of psychological motivation - words, pictures that would motivate me (they would give a “signal” to think for just an instant) and still encourage people to take a break from work for a few minutes.



First of all, after studying similar projects, I decided to get expert advice.

For a start, I went to a fitness club, in which my wife has been engaged for a long time, talked to professionals.

I realized that all is not lost for us office workers! I asked to write a few simple sets of exercises that can be performed directly while sitting in a chair at your desk.

The trainer picked up several complexes for different parts of the body: neck, eyes, legs, arms and shoulders, hands, etc.

Next, I have a doctor friend, an orthopedic traumatologist, a surgeon (just in the spine and back) who once saved my spine after a fall. Gave to check the exercises for safety, having received recommendations and warnings, as well as additional exercises to strengthen the muscles, I started to create a project on the organization of physical education in the process. At the same time and check ... how it can improve my health.



Gathering the team and telling the idea, I noticed that the guys liked it ... and most importantly saw the glance of people who are willing to spend time with me on the implementation of the idea - and this is important!



To begin with, we developed an action plan, drew all the flowcharts and worked out all the details on paper. Of course, now, looking around and comparing with the original plan - only the idea remained the same.

The next step - the choice of the engine ... or take ready or make your own. The main criterion in the choice is to withstand high loads. Having looked at the well-known engines, after reading the reviews and having tried some of them on the load tests, I decided that my brainchild would be, though not perfect, but mine, which I know and I can always modify. The engine was written long ago - for their projects. The basis was the MVC principle and modularity. The main criterion for its development was the moment of simplicity of writing modules, where the developer does not need to think about SQL queries and forms (all in abstraction), but only about the logic of actions in the module. But it was still necessary to rework it, first to revise the kernel, introduce some classes, review the concept of working with databases and caching.



The next step was to write the functionality in the modules. By this time, while preparing the engine for the project, a lot of ideas were collected that needed and what was not needed, the flowcharts were constantly changing, we swore and argued - children were born in disputes (c) the truth.

And here we made a gross mistake number 1 , because of which we lost a lot of time: extra functionality ... and the gallery, the social concept, and other baubles that made the project a little complicated, and the UI made it so complicated. As a result, I had to cut it alive to mark it in the TODO “for the future”. And what if we’ll grow and the necessary functionality will be easy to turn on.

By the summer we made the first prototype, loaded the test data and started trying ... it doesn’t warm up! What? In the team, no one wants to be distracted and do gymnastics! Error number 2 is that the test data (“Foo Bar”, “bla-bla-bla”) is not motivating, but rather depressing - it's time to introduce a psychologist to the team to create motivation, otherwise the project becomes threatened.



Placing a few ads in local resources (freelancing did not fit here) and communicating with many on their wave, he found a person among his acquaintances, a specialist in a healthy lifestyle, who could not only motivate us to work, but also pick up the first motivations for the prototype. Gradually, I began to notice how he periodically began to do something - siping, stretching, and just sit down for a couple of minutes exactly, and then the staff tightened up, periodically watching how they pull their hands during the work, turn their heads and stretch their necks ... moved! Well, you can go on! We hired an artist who, using exercise texts, drew pictures.



Each new person entering the team brought fresh blood ... thoughts and ideas - the controversy and curses began again. But thanks to the team, which, in spite of my lack of restraint, I put up with it and didn’t go down to YES slander to please me or to accept it. These disputes have simplified and improved functionality and usability. I realized that a well-coordinated team is power!



And what about health? I will immediately say what many have admitted - motivation did not immediately begin to act. After about 2-3 weeks. This was what the psychologist warned us that this is the threshold of habituation, because rule number 1 is to try to force yourself the first time if you are too lazy or not to respond to motivation. It is important!



What they noticed - my eyes stopped aching and watery, my pain went away from my neck and lower back. Hands stopped numb. In addition to office charging, I started doing a small gymnastics in the morning and become hardened. I also wanted to go to the gym, but the lack of time did not allow it. Now, having finished the first stage of the project, I went and bought myself a subscription.



Some in the team were so lazy that for them and 2-3 minutes it was a lot for themselves. As they say, laziness is the engine of progress ... And now, thanks to the lazy, another idea was born to make the option “ 15 seconds ”. These are short mini-exercises that do not need much time.



The principle is this: What is 15 seconds? This is nothing, especially for health. Such a meager figure helps break the psychological barrier of laziness. Make a contract with yourself that in any case you will devote to gymnastics for at least 15 seconds.

Even a seriously ill person will not find excuses against this condition. And starting the exercise, you can continue it as long as you see fit.

A simple calculation shows: on the one hand, 15 seconds is a miser in our schedule, on the other hand, it is from 35 to 50 exercises for an 8-hour working day, and you will agree a lot.

And many liked this version of gymnastics, a simple exercise in the style of "sit down and sit as much as you can ..." acted.



Looking through the statistics - at the beginning of 10-20% of completed exercises, then more and more - now the percentage of completion in a team is large, 70-80% and this is important. People have become calmer, slimmer, have changed the concept of food, instead of smoke breaks, they increasingly began to simply go out to socialize.



Technical data :

The project (website) is written in PHP.

MySQL database.

Template engine vLIB Template (simple Smarty-like)

jQuery, memcached, ngnix (frontend, he distributes static) + apache

Client part (widget) Flex + sqlite.

He took over the agreement with the adequate host about the server and load control, gradually increasing the server capacity. Why not a cloud? A purely human approach to rapid problem solving, over the course of many years, has convinced me to remain faithful.





Now, after almost a year, we can proudly present our project to the public.





What is PersFit?





This is an online service, site ( PersFit.com ) + small application (PersFit widget).

The main "trick" and difference from other similar resources is that by installing the widget, it will periodically remind you with your psychological motivations to take a break for a moment, think about yourself and encourage you to do several small physical exercises right at the desk.





How it works?



After registration, you will be added to the profile of exercises, several motivations and mini-exercises (15 seconds).

Download the application and install it on your computer - you can immediately start using:

Each period (once per hour by default) in the lower right corner will appear motivation, prompting you to take your mind off work.

- If you are busy at the moment, you can close or ignore the motivation. The motivation will disappear in 30 seconds and another will appear in 5 minutes, reminding you of yourself.

- If the motivation worked in your mind or (and) you found time for yourself, clicking on the text will open the main application window in which you will see the current set of exercises and a few buttons:



Yes, I did it! - Yes, I did the exercises and that is good.

I failed - I was broken off or busy or out of sorts, but what about the next time (by default in an hour) the motivation will try one more attempt to remind you to think about yourself and your health.

Let's do it later - Similarly, closing the motivation: “Let's remind me a little later (after 5 minutes) - well, very busy now!”

All programs - here you will see a list of exercise complexes, where you can choose any one from the list. This is usually necessary when you want to stretch your muscles or a numb neck or tired eyes, but you have another set of exercises on schedule.



All exercise complexes “move in a circle”, you can change the order in your profile on the site.

Motivation also appear randomly.





Statistics

Oh yes, this is interesting and necessary. Each time clicking the buttons “Yes, I did it!” And “I failed” these data are entered into the statistics on the site.

Then you can watch them in order to understand which sets of exercises you do most often and which are not interesting at all.

It is also the statistics of motivations, where you can see what motivates you, and, on the contrary, it has no effect. In this case, you can always add new sets of exercises or motivations, as well as remove unnecessary ones in your profile.





How does the 15 second option work?

Switching to this mode in the PersFit widget options, you will receive periodically, randomly, texts with mini-exercises and perform them as far as possible or desired.



I have a personal motivation (text, photo)

Fine! The best motivation is your own. Create your own motivation - it's easy!

Perhaps this is your photo 5-10 years ago and the text that asks "What will you be in 5-10 years?"



Management of exercises, motivations and mini-exercises for 15 seconds occurs on the site (add, delete, edit). Do not forget to synchronize the widget with the site after the changes on the site to get new exercises and motivations.



The project is still being finalized, so it’s very interesting to get feedback from you with suggestions, recommendations, comments — thanks for that in advance.

Source: https://habr.com/ru/post/130533/



All Articles