Professional software developer with extensive experience in Laravel and WordPress. When not writing code, he enjoys Netflix and playing Nintendo. He is also available for freelance opportunities. Get in touch to hash out the details.
While working on Let Them Eat Cake 🍰 , I noticed when I was end-to-end testing the app locally, I need a few different things running at once:
Laravel Queue Worker – running queued jobs
Expose – Proxy for allowing external webhooks needed for my app
Stripe CLI – Passing Stripe webhooks to my app without using a proxy
Laravel Mix – Bundling static assets
Running each of these commands separately isn’t that big of a deal, but it can be a hassle to remember to start them all. This was very apparent yesterday as my computer decided it wanted to reboot every time it went to sleep! A short trip around town running errands with my wife and my computer restarted 3 times in a couple of hours; frustrating!
Today I decided to look into some potential solutions. I had a few basic requirements while I was looking around.
It needs to be easy to start and modify for each new project – this also implies some flexibility. No sudo password required nonsense.
I can stop all running processes with SIGINT (CTRL+C)
All process output is still visible so I can see compile errors or bad requests.
Process output is in one terminal window/tab (optional – but I wanted it!)
A little searching and some testing later and I think I’ve come to a nice solution that gives me plenty of control and flexibility.
One of the first tools I discovered was moreutils, a package you can install with brew that essentially adds a handful of helpful CLI utilities. The name is play on coreutils, a set of packages included in most Linux distros. Specifically, there is a package called parallels that seemed to be just what I was looking for. It has lots of extra features and can start lots of parallel processes and close them all at once. The reason I ultimately chose not to go this route, was in case I work on any of my projects with other developers. Given the simplicity of my use case compared to the feature set of the package, it was honestly overkill. This also means my project is that much more portable between machines and developers. I keep my own dotfiles, but if I can avoid complexity, I like to try that route first. 🙂
A quick rundown. The first process is essentially another wrapper with some Expose configuration details. The output from this is a big tail-ing table of incoming requests. The second is my queue worker. I opt for queue:listen here so the worker will automatically restart itself when any code in my application changes. Output from this command is a line for every queued job that is processed. Third is the Stripe CLI, which needs to be configured beforehand, but is a once every 90 day thing. Seeing as it has access to my payment data, I’m okay with the hassle tradeoff.
I’m still debating on whether or not to include my Laravel Mix watch command in this, and I might add a runtime flag for it, but without trying it for any reasonable length of time yet, I’m guessing I’ll need to start/stop the watcher to do production compiles more often than anything else. The other commands can run mostly unmonitored unless I need to check something, but I tend to get a lot more feedback when I inevitably screw up the closing brackets in a JS file. 😬
Hope this helps you out! Feel free to ask any questions here or send me a tweet @DaronSpence. ✌️
On one of my side projects, Let Them Eat 🍰 , I recently needed to do some migrations to combine / merge two models. I originally had optimized a bit too much, and later realized things would be a lot simpler if I only had one model.
There wasn’t a ton of info about this online, so I’m going to do my best to try and explain what I did. For this migration, I was using Laravel 8.
So turns out, merging models is kind of a pain! In my case, I was merging a SlackUser::class model with the default User::class model that ships with Laravel. From a data perspective, it wasn’t too bad. I needed to add a few columns to the User table that were previously on the SlackUser table. The issues arose when I realized there were a lot of places in my code that were reliant on accessing each model off of a relationship of the other. So lots of calls to $user->slackUser and $slackUser->user intermingled across the app, dependent on what I was doing at the time.
Since my ultimate goal was to completely delete any reference to a SlackUser, I had to take a careful approach when modifying the database.
First, I added the extra columns I needed to the users table.
I continued in much the same process for other tables that needed to be modified.
After the tables were modified, I queried all of the SlackUsers and looped over them to create new User models if they didn’t have one already. In my app, a User model was only created if the person logged into the webapp, otherwise they would happily live on as only a SlackUser. Now, everyone gets a user model, and I don’t really care if they log in or not!
Some advice on the Shifty Coders Slack recommended not to rely on Eloquent here. This makes sense as in a future release, I’ll be completely removing the SlackUser model, so if I relied on Eloquent for the migration, it would throw an error if I ever deleted that class. Here’s what the migration looked like:
This is all pretty straightforward. For each SlackUser, check if they have a User model already, and if not, create a new User and give them a random password. My app doesn’t actually use passwords for authentication, instead relying solely on Slack Oauth, so the password field is irrelevant. In the future I may want to allow for other auth methods, so I left it for the sake of simplicity.
After all of the users were migrated, I could then go about the business of updating other models that used the SlackUser as a foreign key. In my case, I had messed up in the original migrations and not enforced those foreign keys, but if they are enforced in your app, you’ll need to drop the foreign key before you go about migrating all of this data around.
Here is what the migration to change the foreign keys on my Cake model looked like.
Again, notice that I’m not using Eloquent to access the SlackUser model, instead relying on the DB:class facade. I’m free to delete the SlackUser::class at anytime now!
All of this code was added to the up() method of my migration, and I carefully reversed all of the column changes for the down() method. One thing I did not do in the down method, was remigrate any data. I figured if the deploy went so bad that I needed to do that, then I would be better off restoring the database entirely from a backup instead. The down() changes I made were purely so I could migrate up/down for tests, which weren’t reliant on any database values anyway.
That brings me to another pain point: tests! 90% of my tests had to be updated since they mostly relied on the SlackUser. I started with one test file at a time, running the entire file first, then each failing test. I generally changed any instance of SlackUser to User first and then saw what broke. The first few were painful as there were references to relationships that needed to be updated. Often times while doing this, I would catch something that needed to be updated in my migration as well.
Eventually, most of the methods from SlackUser were migrated to User and all of the relationships were updated. Views were the last thing to be checked and I even managed to add a few missing tests based on failures I found while manually browsing the site locally.
// One of my newly added tests!
/** @test */
public function a_user_can_view_the_perk_redemption_page() //phpcs:ignore
$user = factory(User::class)->create([
'is_owner' => true
// Make fake users for the manager selection.
'team_id' => $user->team->id
'title' => 'an image perk',
'cost' => 100,
'image_url' => 'https://perk-image.com/perk.jpg'
$res = $this->get(route('redeem-perk-create', Perk::first()));
// Check for all of the names on the page. (manager selection for perk redemption)
In the end, the Github PR had 57 changed files! A huge undertaking by any standard. I would venture a guess that those 57 files represent 80-90% of all of the code I had written for the app.
Overall, I’m happy I did this, as the logic surrounding users is much simpler to understand. I also got the opportunity to try out some new things and learn a bit more about the built in DB facade. I’m still kinda intimidated by SQL in general, but I’m getting more courageous every time I tackle one of these projects. Backups are still really important though! 😉
If you have any questions, feel free to reach out to me on Twitter or leave a comment!
Well, here we are a week later and I have to admit I feel better. I’ve overloaded on fasting propaganda from across the internet, though primarily YouTube and Reddit.
I’ve gone back and listened to a few lectures by Dr. Jason Fung. His “The Aetiology of Obesity” series has been my sleeping playlist for a few nights now. It’s a 6 part lecture series, each lecture running about an hour, discussing theories on why humans become obese and the different factors that can contribute. Overall just interesting stuff, plus he has a pleasant voice (IMO) and he’s very easy to digest (heh).
Practically, not much has changed re: my diet compared to earlier fasting cycles. Tuesday, I broke a 44~ hour fast with a burger patty topped with a fried egg, a half pound of salad with strawberries, feta, walnuts, and a few spoonfuls of a ranch-like dressing. I followed that up with some popcorn and a few slices of bacon.
Last night I ate again, this time getting lured into a chicken bowl with cauliflower rice from Chipotle. I walked over there and back home, proceeding to pile the contents of my bowl onto some low carb tortillas I already had at home. I followed that up with the rest of the strawberries, some more popcorn, and 3-4oz of pistachios. I drank 3 cans of sparkling water with dinner and by 9pm, I felt pretty full so decided to start my fasting timer an hour early.
Now I begin another 40+ hours until dinner on Friday evening. Sleep has been pretty meh, but that’s to be expected while fasting. I was tired earlier and managed to be in bed by 11pm, which is rare for me. I woke up around 6~ this morning and got out of bed around 7:30 to get some coffee and write this post.
I have a therapy appointment this afternoon, the second with my new therapist, and I’m tentatively looking forward to it. If the weather isn’t too bad I might try and walk over there.
Overall, this week has been a step in the right direction and I’m optimistic it will continue to trend in that way.
One thing I do want is to find some more fasting support from local friends. I don’t know what we’d talk about but it feels intuitively easier to stick with something when there is accountability, even if it’s unspoken.
My dad is kinda doing IF right now with his church’s new year resolution/diet/fast. He’s had good results so far but I’m not sure how he feels about continuing it after his church finishes the fasting period. I’ll text him later today and see how things are going.
As always, feel free to tweet me @daronspence or leave a comment if you have questions.
Fuck, 2020 felt like a dumpster fire to a lot of people in the world, and that means me too!
Note: please excuse me if it feels like I’m rambling. It’s late and I’m typing this on a keyboard I’m not really used to so it takes longer to get my thoughts out with extra editing.
I’m just so disappointed in myself. I know it’s late as of the time of this writing, but I think that might just point towards something I feel is true. I know what I need to do, but overcoming that split second instinct to run towards the comfortable is obviously hard to ignore.
Just now, I thought it might be a good idea to go to Whataburger just to get some unsweet tea, since they’re the only place open late with anything close to fresh tea. But I know I’ll be tempted to order something else in that drive thru line. It’s too easy and I’m looking for any excuse.
In 2019, my wife bought me a coat on a random trip to the mall. It’s a very nice peacoat that cost her a lot of money, but she knew how much I missed my old one and she figured I deserved it for whatever reason. I really like it and I got a lot of compliments on how good I looked when I wore it out and about, especially with people I had not seen in a year or two.
It finally got cold enough this past month to warrant wearing a coat outside more. I got up a 6am to get ready to volunteer at church, when I realized it would be an excellent day to wear the pea coat. I was devastated when it didn’t fit. I almost wore it to prove to myself it was possible. I could have stretched it out and done up the buttons, but I knew deep down in that instant, that I was lying to myself and it wasn’t worth it. I reached over a few hangers and grabbed the biggest coat I owned, which is also much to insulated for indoor wearing, and zipped it up. I distinctly remember my hand passing over the 4 other jackets in my closet and settling on this one. It’s much to big, but it’s comfortable and it hides my imperfections. It hides the overeating I’ve done for months.
But it can’t really hide me from myself…
So tonight, I’m writing something. Maybe it’s more empty promises. I’m not sure. I’ve saved a few of my favorite salad restaurants in a Google map, hopeful that I’ll turn to them in my next moment of weakness, but I’m not sure I’ve convinced myself yet.
I think I’ve barely convinced myself this blog is worth posting.
I think I’m burnt out. Wow. Super surprising. The real question, is what the fuck am I burnt out on?
In the past few weeks, I’ve tried to look at every area of my life and take a break from what I can. My coworkers graciously picked up my slack at work for a few days, though I know my productivity since coming back has suffered. It’s so hard to focus. I can usually wake up after a good night’s sleep, 8 hours or more, and then by the time I walk to my office, the dread has set in.
Nature helps somewhat. I’ll make a move outdoors and I can feel somewhat rejuvenated, but the feeling is fleeting. I’ve tried visiting friends and family and again, I get that same temporary satisfaction of human contact, but then I have to retreat home to my cutout in the uptown skyline.
Pair that with the complete and total dietary failure and it just feels worse. I can’t help but dive into this self sabotage headfirst; concern for my future self thrown to the wind in search of momentary satisfaction.
And then the pity party afterwards. The catharsis of complaining to myself and to others. Synapses of satisfaction firing for a brief moment before they power down for another solitary serenade. It feels freeing to bitch and complain to the 3 people who I know will read this; some possessing real power to drastically alter my life, for better and worse.
I don’t know what to do. I probably definitely need a therapist, but the looming of Covid-Part-2 Electric Boogaloo has kept me away from professionals and amateurs alike. Instead I have you.
Thanks for listening, but I don’t blame you for leaving my sorry ass alone either.
Progress from August to September of 2020 – 237.5 lbs current weight
It’s been kind of a weird month. My diet has been pretty steady all things considered, but my progress was noticeably slower. I’ll talk a little further down about my experiences with binging this past week.
My birthday was August 18, and as a bit of a treat, that weekend I went to a local baker who specializes in low-carb and diabetic friendly confections and got a large cheesecake. I ended up snacking on that for 2 weeks and the side effects were interesting to say the least!
Warning: potentially gross content in the next few paragraphs. Skip to the next heading if you aren’t interested. One of the side effects of the artificial sweetener this bakery used, I think is constipation. I’ve tried searching for information but it tends to be mixed. Some sweeteners can cause diarrhea, while others can make you constipated. I’m usually a pretty regular dude, once or maybe twice a day if I eat a larger meal, but for whatever reason, this cheesecake stopped me up for 3 days at one point! It never really got to the point of discomfort, but it definitely could have I think if I didn’t make an effort to move things along.
If you find yourself in a similar situation, eat some straight plain salt. I ate a small pinch and then waited an hour, then got another one. I’m not 100% up on the science here, but salt is essentially natures laxative when taken on it’s own. Be warned though that you need to replenish your electrolytes (with more salt!) if you go this route.
I want to try and organize some thoughts here that I have on binging. Obviously, food is and was a massive (hah!) part of my life. I got fat from turning to food to cover up my problems. Sometimes I was just overeating, but looking back now, there were definitely periods of binging that weren’t healthy.
I feel like I sorta had one of those moments on Labor Day this past weekend. We had breakfast with some friends outside in their front lawn and to stay sociable, I worked out my eating schedule from the day before so I could join everyone. The menu was pancakes and bacon with fruit and juice. Not an unhealthy breakfast by any stretch, but definitely not first on my dietary list. I ate 3 pancakes with syrup, some bacon and a banana, then had some tortilla chips with a cream cheese dip a little later. If I had stopped there for the day, probably would have been fine.
Then later, I went to my parents house and had a late lunch. Chili cheese dogs (no bun!) but then a good portion of potato chips and some assorted popcorn while watching some movies.
Finally, on the way home, the wife and I stopped at an old drive-in burger place here in Dallas that we noticed that morning. I had a cheeseburger and some onion rings. Kellers
Now, normal people read this and don’t see a particularly large problem. However, I’ve been eating one meal a day for about 18 months now! 3 decently sized meals, all of which were by themselves over my carb limit is unusual.
Looking back, I think I just wanted to live in the moment and feel good. The food tasted good, everyone else was eating, it was easy. But that’s childish. Children do what feels good and act on impulses. I need to make a conscious effort to resist or remove myself from these situations in the future, but that’s a challenge in and of itself too.
The Next 30 Days
September, despite a rocky start, is looking better. Despite my binge at the start of this week, I’m back down on the scale and actually at my lowest weight of 2020! I think a good short term goal is under 230 lbs by the next update post, or even more ideally, before the end of the month. That’s going to take a lot of discipline though and maybe even a little exercise. Either way, I’m feeling good now and I think that’s something to celebrate.
One thing that I hope will make things easier is a change in my delivered meal plan. The past 2 boxes I ordered have featured 2 dishes that I didn’t totally love; Prime rib with blue cheese and brussels sprouts and a bun-less burger with artichoke hearts. The protein in each of these was fine, but the sides are putting me off now. The first few times I ate each of them I didn’t seem to mind, but the more times I eat each one, the less interested I am in those vegetables. I’m sure prepared differently I wouldn’t mind, but the sort of mushy-watery texture inherent in a frozen prepared food isn’t as appetizing. I want my food to work for me rather than make me want to eat something else. I’ve since purchased a few bags of frozen broccoli to supplement.
My newest order of delivered meals should be here tomorrow and does not include these dishes. I’m hoping this will keep me motivated to not talk myself into getting something to-go from a restaurant under the guise of “date-night” with my wife!
If you have questions, feel free to leave a comment or reach out on Twitter @daronspence . I’m sometimes slow to reply here on the site, but if more people comment it might motivate me 🙃
My weigh in this morning was 241.4 but the average for the month is a little higher. As you can see from the below chart, this past 12 months has been ups and downs. You can see the gradual decline from my past posts discussing my progress before falling off the wagon.
This month has been interesting for sure. At the start of the month, I took a road trip with my 16 year old brother from Texas up to the Great Lakes. During our trip I stuck to my eating windows but went absolutely hog wild with what we ate. We were having a good time trying all of the local food and enjoying each other’s company.
Side note: Wisconsin cheese curds are fucking amazing…
I thought I’d mention something else here as well that my wife keeps bringing up.
My current ritual is to weigh in on Friday mornings right after I wake up and use the bathroom. Depending on what I’m doing in regards to work, this might be 9-10am even if I wake up at 8am. During that time from rise to first bathroom break, I do not drink any water. I also try to not go ham with the water on Thursday night. My thought is that if I wake up and chug a 32oz cup of water, that I’ve essentially “gained” 2 pounds. In terms of keeping an accurate track of my weight loss numbers, this seems like an okay practice.
My wife thinks is unhealthy to think of water in such a negative way. I’m not sure if we’re having some sort of miscommunication as I’ve tried explaining it different way and she says she understands and still thinks it’s problematic. Tell me your thoughts. I’m interested to hear them!
My weekly routine
I’ve had various people ask about my routine so I thought I’d update the internet here with what I’m doing and what’s working currently. If I change something in between these posts I’ll try to remember to make a not of it in future posts.
At the start of the week, I’m usually volunteering with my local church. Eating is a social activity we usually partake in with friends so I keep Sunday’s a bit lax. Obviously with Covid-19, we’re not going to church or seeing friends, but I still eat Dinner and sometimes a light lunch. I aim to stop all food intake by 10 PM.
This is a fasting day. No food, only water and my meds (asthma pills and some supplements). Ask your doctor if your medicine needs to be taken with food. Mine do not.
Around 5-6 PM (or later) I’ll eat dinner with the goal of finishing by 10 PM. My current diet consists of two meals from https://www.cleaneatzkitchen.com/ and then a bag of popcorn if I’m still hungry. I’ve really been trying to eat my food slower and allow the hormones to work their magic to make me feel full. The problem I still have to a degree is my ability to inhale food at such a rate that my body can’t even react to being full.
Most of the time I’ll start my fasting timer right after I finish eating, irregardless of the time. Bed time is around midnight.
Basically a repeat of Tuesday. I may eat an extra serving of some frozen vegetables in preparation for Thursday, but it depends.
Another full fasting day! No food, just water and my meds. Like I mentioned before, I try to not go crazy with the liquids after 10pm or so because of weigh in on Friday morning. Basically I just want to ensure that I’ll have to pee soon after waking up and that my body is actually getting rid of the extra water I don’t need.
Weigh in day! I have a lot of work calls on Friday’s so it’s a busy morning. If I have to use the bathroom, I’ll do that and then immediately weigh myself. Tracking is always done in my birthday suit for maximum results and easier reproduction.
After that, it’s water and meds until 5-6 PM for dinner. Same meals as the previous week, though I’ve been known to grab some Wingstop on the weekend. Aim to finish eating by 10 PM.
A repeat of my other eating days basically. If we were having social events, I’m sometimes less picky about eating times, but I still aim for 16 hours fasted as least. Rarely do we have events before noon so in those cases I would politely decline anything until later in the day. If we do have breakfast plans with someone, I’d probably eat, but opt for as low carb as possible. Eggs, bacon, vegetables. An omelette does sound pretty good right now. 🙂
Re: Food choices
I’ve historically made pretty terrible food choices. Weighing 310 pounds is evidence enough of that. Self control when it comes to food has been very difficult for me, and frankly a lot of other things as well.
I’m very spontaneous and when I want something I tend to get it pretty quickly afterwards. New toys, going somewhere, eating something. I’ve really had to work at controlling these urges and work on planning ahead of time.
As part of embracing more planning and self control, I opted to purchase pre-cooked meals in bulk. I’ve essentially removed any ability to cheat by limiting myself to these pre-purchased meals and a handful of pre-approved snacks!
So far, I have to admit that it seems to be working. I’m not tracking it explicitly, but my daily calorie intake on feasting days is somewhere around 1200-1600 calories. For a dude who still weighs 240 pounds, this is a significant deficit from what my body needs to function, thereby forcing it to burn more fat.
During my first attempt at this last year, I would say I was normally eating more than 2,000 calories a day making my own food. The portion sizes were larger mainly, and I wasn’t afraid to load up on low carb, yet calorie rich, liquids like ranch or butter.
I wonder when I’ll get to eat “normal” food again but for now this is working. Especially with the world in a state of quasi-lockdown, it is nice to not have to worry about making grocery store runs. My wife buys food for herself on her way to / from work.
If you have questions, feel free to leave a comment or reach out on Twitter @daronspence . I’m sometimes slow to reply here on the site, but if more people comment it might motivate me 🙃
Long time no chat! It’s been over year since my last update and a lot has changed, and yet, some things continue to persist. As a fun aside, I think this is the first long form post I’ve written in the new WordPress block editor? I saw a popup welcoming me so I’m assuming…
Since my post in April, I’ve continued to make at least some progress on the personal health front. 2019 actually went pretty well, all things considered. I started a new job in September which brought it’s own challenges and new stresses, but I persevered and stuck to my fasting guns. The real challenge came at the tail end of the year when the holiday shenanigans started to roll in.
I had been doing really well, all things considered. I went from somewhere around 310 pounds down to 228 according to my weight tracker. 80 pounds in 9 months is no small feat! I used this new found confidence to convince myself I deserved some sort of reward. In this case, a guilt free holiday of indulgence with friends and family. My last weigh in was November 17, 2019 and I was feeling pretty good.
If we follow the trend line though, something happened. Retrospectives are always harder to perform without solid data and this is no exception. My next weigh in was February 2020. For 3 months, I neglected any sort of accountability to myself and fell off the wagon. I was still roughly watching the timing in which I ate, but my diet went back to a lot of the same shit it was before. I had changed some habits, sure, but even with healthier food options, it’s not hard to imagine gaining weight if you eat massive quantities of food.
When I dared step on the scale again in February, my weight had creeped back up to 240! Ten pounds in about 3 months. Now, taking into account that my lowest weight was done coming off of a 48 hour fast and when my diet featured few carbs, it’s not hard to attribute a lot of that to extra water that was hanging around with an increased carb intake. I remember at the time feeling bummed though.
The next weigh in was 2 weeks later. March 3, 2020. I was back down to 231.7! Success, I convinced myself it was all water weight and I was still on track. Typing this out I’m feeling elated and proud! I didn’t actually fuck up! I think you all know what happens next though…
The world fell into a bit of a tailspin. I’m sure you all have your own stories, so I won’t spend a lot of time here, but suffice to say, the introduction of a global pandemic was jarring.
My favorite coffee spot was closed, and coincidentally a lot of my weekly social life was reduced to uninspiring trips down the hall to the self serve coffee machine in my apartment building clubhouse. While I didn’t talk about my weight loss in those interactions, looking back I think there was a part of me that enjoyed the challenge of being noticed; of someone else seeing a marked change and making a comment. I knew from my trips to see family that I enjoyed the compliments I received and it felt good to have someone else acknowledge the hard work I put into bettering my future self.
The numbers don’t lie and at this point, my memory doesn’t either. I was stuck at home, but totally now, since I worked from home already before the pandemic. My wife’s schedule was weird as her job made changes. I was following a lot of the day to day politics of it all and getting depressed.
I turned back to my old friend food to cope. I don’t want to go back into my bank history and count the midnight trips to Whataburger, but there were a lot of them. My habits were somewhat better sure; unsweet tea is my new go to, and I was usually only getting one sandwich… but when you’re already eating dinner courtesy of a cheap meal box option that heavily features potatoes to reduce the cost of the service, it’s not surprising that my weight continued to rise.
I’d like to point out that that during all of this, my eating window largely remained in the popular fasting schedules. 16+ hours between meals was totally normal. Some days I was tired and went to bed early after dinner. Other days I ate lunch and dinner and a midnight snack, though those were more rarely seen.
My most recent weigh in was July 3. 253 pounds. That’s 4~ pounds a month or roughly 14,000 calories, or a bit under 8 trips to Whataburger per month with my usual order. Not counting my indulgences at other fine dining establishments during the same time period! It’s not hard to imagine 8 extra meals per month sneaking in. Twice a week! What’s the harm? 20 pounds in the harm. Reversal of my hard earned progress is the harm. My confidence in myself is the harm.
Today is July 29, 2020. I’m writing this at the start of the day before starting work. I just got out of the shower and I’m listening to some quiet chill-hop to prevent my own brain from echoing to itself in the hollow box that is my head.
Yesterday, I did okay. I have a new meal service that is much healthier, at around the same cost per meal. It also requires much less time to prepare, making it easier to put off eating until I’m absolutely ravaging, thus prolonging my fasting times. I ate around 6pm. I did also finish off about a half a bag of tortilla chips with some leftover salsa from a restaurant trip last week that I didn’t want to just throw away for whatever reason. The chips ended up only making my hungrier so I made a couple of plain burger patties with a little cheese and some frozen peas.
I then waited a couple of hours and occupied myself with a video game until making a bag of popcorn around 9pm. By 9:20 I hit the button to start timing my next fast, feeling really full. I obviously ate too much. I could feel it, but at that point it was too late to do anything about it.
My current streak is sitting strong at a full week of my ideal fasting schedule. Eating only dinner, in a less than 4 hour window, 5 days a week, skipping food entirely on Monday and Thursday. Today is Wednesday, so I’ll be eating dinner again tonight, but I think I’m going to commit here in this post to only eating my pre-prepared meal somewhere between 8 and 10pm.
My next weigh in is Friday. Not sure if I’ll post that here, but I will be logging it of course! I’m hopeful to see the scale move in the “right” direction but you never know. It could go up even more, and that’s something I’ll have to live with and overcome. I sure hope it doesn’t though. 😅
If you enjoy reading these, send me a tweet @daronspence and let me know. Accountability is important to my own progression I’m finding and unfortunately it is hard to get that anywhere but online in our current world.
Now that Tailwind CSS is approaching version 1.0, I wanted to go ahead and start using it on some projects that will be launching in the next few months. It seems the API is stable, so now seems like as good a time as any to document how to get Tailwind up and running with a new Laravel project.
All you need to do is run a few simple commands.
Install Tailwind 1.0 Beta
yarn add -D tailwindcss@next
Install Laravel Mix Tailwind
yarn add -D laravel-mix-tailwind
Generate Tailwind config file
yarn tailwind init
This is where all of your modifications to Tailwind will live. Check the official documentation for specifics on which keys to add/override depending on your needs.
In your webpack.mix.js file, replace it with this snippet to mimic the default behavior in a new Laravel project.
const mix = require('laravel-mix');
| Mix Asset Management
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
The above snippet will compile Tailwind using the standard app.scss as the base. Be sure to add your Tailwind directives to the top of that file so the utility classes are injected. You can also still use SASS if that’s something you want to take advantage of inside of your custom CSS components.
Running Mix is the same as always.
yarn run watch
yarn run dev
If something changes when Tailwind 1.0 is officially released, I’ll try to update this article accordingly. Leave a comment or reach out on Twitter if something needs to be updated or modified.
Well, as usual it’s been a while since I’ve posted something here on the blog, but some recent life events have convinced me it’s time to share what’s been going on.
On February 25th, 2019, I went to the doctor for a checkup for the first time in almost a decade. I’d been secretly dreading the appointment because I knew that he was going to say some things I did not want to hear. Stepping on the scale it wasn’t really a surprise to hear him say I weighed 310 pounds. I was honestly expecting it to be a bit higher. Next, came my blood pressure readings, my resting heart rate, and a plethora of other measurements. By the end of the exam I felt worse than the week before when I had an upper respiratory infection.
We went back to his office from the exam room and discussed some more specifics. I was so unhealthy, I was/am practically a walking heart attack at 24 years old (the results of my blood work taken that day later confirmed that). I was devastated inside. I didn’t know what else to say other than, “Ok.”
Near the end of our time together that day, the doctor gave me some tips. He suggested looking into intermittent fasting; something my wife’s doctor had recommended to her to help her reach her goal of losing a few pounds. That sparked a small bit of hope inside of me. Even if I had to change my eating habits, at least I could share the schedule with my wife. While I was sort of correct in this assumption, I was also not expecting what happened next.
When I got home (after grabbing some Korean fried chicken from Bonchon), I started doing what any good millennial would do; research on the internet. I started on Reddit since I remembered seeing a /r/fasting sub, but that quickly led to /r/intermittentfasting where I was assaulted by pictures of people who looked a lot like me slimming down in record times. I was honestly skeptical but willing to try it.
I found my way to the Zero fasting app and jumped right in with an 18:6 fast (eighteen hours fasting, six hours eating). My normal schedule was already skipping breakfast most days and eating a late lunch. I figured a 2PM lunch would force me to eat my next meal with my wife after she got home for work around 6 or 7PM each night.
Over the next two days, I continued the routine. My diet was probably still sub-optimal. On my doctor’s advice, I was cutting out a lot of carbohydrates as well. Instead of fries with my chicken wings, I got coleslaw instead. By day 3 I noticed I was pretty much fasting for 20 hours a day from dinner the night before to the time my wife got home, so I decided to bump up my fasts to 20:4. Why not take advantage of the extra fat burning time?
This was where I began really diving into more information about intermittent fasting, especially around people who are seriously overweight. I soon discovered Dr. Fung, a kidney specialist who focuses on patients with complications from type 2 diabetes. I won’t go into too much detail here but I do recommend you browse through his YouTube channel if you’re interested in more.
Unlike other “celebrity” doctors, Fung has very few uploaded videos of his own, which indicated to me that he wasn’t creating content for the money. He does however, frequently appear on other YouTube channels and radio shows discussing his ideas and findings. I especially recommend his series titled “The Aetiology of Obesity”, a six part series that appears to be a collection of lectures he gave to other doctors. It’s a big commitment to watch, but the information really eased some of my fears and quashed some common misconceptions around fasting.
The crux of his research and testing has basically boiled down to that fact that type 2 diabetes and many of it’s complications can be solved simply by fasting. Simply restricting the intake of calories (liquid or solid) tells your body to enter into fat-burning mode once all the glycogen (sugar, basically) is used up from your previous “meal”. I use quotes because sugary juices and sodas aren’t viewed any differently by your cells when it comes to absorbing nutrients.
Learning all of this really got me thinking. After a couple of weeks, I got the nerve to try a 24 hour fast (or one meal a day) for the first time, despite basically I having achieved that milestone a few times already. Some of my 20 hour fasting days had only comprised one meal, but I was afraid to start my next fast early in case I felt that I really needed a banana or small snack before bedtime. 24 hours was a piece of cake. I felt so good, I decided to try it again on the day leading up to my next doctor’s appointment. That would be my first return since starting this experiment with intermittent fasting.
The Checkup, Pt. 2
In the days leading up to my appointment, I was nervous. During these few weeks, I had purposefully stayed away from the scale so as to not get discouraged by fluctuations of water weight from day to day. Reddit comments always hammered that on posts from people seeing little progress after only a few days of intermittent fasting.
Arriving at the doctor’s office, I walked into the exam room and he ushered me to the scale. I could feel my heart pounding and wondered if it would affect my resting heart rate results later. The doctor plopped the largest weight over to the 300 mark, where it had been from my previous visit, and immediately it fell to the right; too heavy! Success! I had at least dropped 10 pounds in 24 days. The doctor gave a small smirk, seemingly surprised and pleased. He kept adjusting the weights and my eyes kept getting wider and my heart kept pounding faster.
When he was finally finished, the scale reported 289. I had lost 21 pounds in 24 days. Nearly a pound a day on a diet of chicken wings, beans, brown rice, chicken thighs, fish, and a cheat meal of Domino’s pizza while babysitting. I was absolutely ecstatic. I should also mention that I didn’t exercise at all, only doing my normal routine.
The doctor finished taking some other measurements, noting that my heart rate and blood pressure had gone down significantly since my last visit. I honestly think he was probably a bit surprised as well. I’m sure it must be nice to have your patients listen to your advice once in a while.
Back in his office, we discussed the results of my blood work taken from the previous visit. 3 weeks prior, I technically met the definition of a type 2 diabetic. My cholesterol was also very high, a side effect I later learned was due to inflammation caused by my body’s resistance to insulin. I was dreading the news that I would need to start on some sort of diabetes medication, but because of my results that day, the doctor said he was not going to prescribe them yet, dependent on my continued improvement.
I left his office that day with a prescription for some cholesterol controlling medication and a recommendation to work my way up to 4000mg of fish oil tablets per day; a common suggestion for individuals with high cholesterol levels. I was a bit disappointed, but I was also hopeful that I may be able to wean myself off of this stuff with continued results.
Following my appointment, I was now more determined than ever to see things through. I now had the validation that what I had been doing was working. I also had more confidence in myself and my ability to control my cravings and impulses.
Peer Pressure & Progress
Shortly before my second appointment, I discovered the LIFE Intermittent Fasting app. I was initially drawn to it after seeing the progress bar in the app, showing progress points within each fast of when your body has started reacting in a new way.
Upon downloading the app, I also learned of it’s built in social features; encouraging you to connect with other people who are fasting and share your progress throughout your fasting period. I quickly got my wife and a coworker on board and watching each of our progress bars advance was a great motivator when I was feeling hungry before my it was time to eat again. Reading stories on /r/intermittentfasting was also a huge motivator.
A week or so after my second appointment, I decided to experiment with a longer fast of 48 hours. From the information I had consumed, there are a plethora of benefits from fasting more than 24 hours and I was excited to see what kind of results I could achieve and push my willpower even further. Worst comes to worst, I could back off and eat whenever, not feeling guilty at only making it 24+ hours.
The second half of my first 48 hour fast was brutal. The hunger pangs were intense when they arrived, not helped at all by my insistence to torture myself with cooking shows on YouTube. I discovered water was even more of a friend than I previously thought, filling my stomach with as much as I could when hunger reared it’s head. Eventually the rumblings would subside, usually within a half hour of drinking a lot of water and I was back to work or playing some video games to keep my mind occupied on something other than food.
At the end of the 48 hours, I was happy to eat again and proceeded to stuff my face with what was probably 3000+ calories in one meal. It’s important to note however, that my daily energy expenditure just from existing is around 3500 calories a day. So even gorging myself I was still at a deficit. I’m sure as I continue to lose weight that resting calorie burning rate will decrease, but whatever it is, I’m still far below that threshold on any normal eating day.
Feeling good about my progress, I decided to try couple more 48 hour fasts, sometimes coming up a couple hours short but not sweating it too much. 46 hours is still great and I would rather eat a nice dinner with my wife at her normal dinner time. I now have really come to internalize that intermittent fasting is about a lifestyle change that should work for you as an individual. I refuse to feel guilty breaking a fast early to socialize with friends or family, though I do admit I am now addicted to seeing the “Fast complete!” notification on my phone every night.
Every Friday I now weigh myself. I still don’t weigh daily due to water fluctuations and I know from previous diet attempts that seeing the scale bounce up and down every day isn’t good for my mental health. I figure a week is enough time to show a trend without worrying if I’m a pound or two heavier/lighter due to how much water I drank the day before.
As a side note, I’ve had a Fitbit Aria scale for a few years now and really enjoy it despite not owning an actual Fitbit anymore.
This Week in Fasting
After completing a few 48 hour fasts, I resolved myself this week to attempt a 72 hour fast. I started Sunday evening, made it through the obstacle course of snacks at my church small group meeting on Monday night, and was feeling good heading into Wednesday. I was already fantasizing about my dinner for that evening. As the time grew closer and closer though, I realized that I wasn’t really hungry. Sure, I could eat, but I had grown so used to the rumbling of my stomach and the mental feeling of hunger, that I started to wonder if I needed to eat at all? With another hour of contemplation, I decided not to break my fast, and instead continue for at least 24 more hours.
At the time of this writing, it’s now Friday. This evening I will break my fast seeing a movie at a dine-in theater with my wife after 120 hours of not eating anything and only drinking water, tea, black coffee, and a few carbonated waters (with only a small squeeze of lime for flavoring). I’ve made it 5 entire days without eating anything, all the while watching friends and family eat their meals while I gaze on, trying to keep up the conversation.
At my weigh-in this morning, I weighed 275 pounds. 35 pounds lost in 39 days. I know this kind of rapid progress won’t last forever, but I’m grateful for the results in the meantime. Overall, I feel better, more alert during the day, less tired when I should be focused, and look better to boot! I count all of that as a win.
I’m really proud to have completed a five day water fast. I’m not sure when I will do it again, but I can now picture a future where two day fasts are even more frequent. If my schedule with allow it, I would love to try an even longer extended fast in the coming months, perhaps 14, 30, or even 40 days! I realize that with extended fasting comes more variables to consider such as micro-nutrients and electrolytes, but I’m confident I can navigate those obstacles effectively.
If anyone is considering starting intermittent fasting, for weight loss reasons or otherwise, I would encourage you to at least give it a shot for a few weeks. You don’t need to drastically change your diet. Simply cut out all food for at least 16 hours a day and only drink water during that fasting time. For most people, this can mean an eating window of 12pm-8pm. Adjust that forward or back according to your personal schedule and needs.
If you have any questions at all, feel free to leave a comment, or reach out privately. My DMs on Twitter are open and I would love to chat about whatever you want, fasting or otherwise. If you want to join a circle with me on the LIFE app, you can click this link to be added instantly.
I look forward to meeting you soon and seeing how we all progress together!
Photo credit to Stas Knop and downloaded from Pexels.