Inadvertently developed calorie control technique

I've always had a hard time with calorie control even when I eat clean, but realized today that I've been doing really well for the last couple of weeks.

Upon reflection, I realized this is because my work has been insanely busy lately, and I've been packing everything I eat-- breakfast, lunch, dinner, and snack---into a messenger bag before bed and just run out of the door with it in the morning. When I pack the food bag, I calculate the calories already, so my daily cal is all in there. Then all I need to do, all day, is to make sure I don't eat anything that I didn't pack in the bag.

For some reason it's much easier for me to do it this way than to remember how many more cals I am allowed to eat in a day. Has anyone done this before? Is this something I can do long term?