Professional WordPress enthusiast and developer with a recent interest in Laravel. When not doing WordPress, he enjoys Netflix and playing Nintendo. He is also available for freelance opportunities. Get in touch to hash out the details.
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.
Problem: Door Sensor won’t connect to Z-Wave Network
At our office, we have a small Z-Wave network setup running a Raspberry Pi and Home Assistant, specifically Hassbian because at the time of our purchase the newest Pi 3B+ was not supported for Hass.io.
On the Z-Wave network we have a single door sensor on the front door that theoretically notifies us when someone enters the office. Long story short, we had it setup remotely and after 3 days of shipping via USPS, it didn’t work at the physical office. Bummer!
Now, a few months later, I’m here to troubleshoot in person while in town helping out with other things. I set the thing up in the first place so it shouldn’t be too hard to fix right? Wrong again!
The EcoLink Door Sensor seems to be a decent product. It has pretty good range; ours is located about 30 feet away from the controller. The controller is inside a giant metal server rack and behind a solid wall. Not the best conditions for sure! The manual however is complete and total garbage. Below you will find the steps to completely remove the device and re-add it to your network.
Reset the Device
To properly “reset” the device you must first determine if it’s currently connected. In my case, the sensor actually thought it was still connected to something. Placing a magnet against it would cause the green LED to give one long flash. In this case here’s how you fix it.
Check that your battery is not dead. If the sensor has been unconnected from a Z-Wave network for a while, it’s likely tried to pair itself continuously and drained the battery.
Navigate to your Z-Wave controller software and initiate a node removal. In Home Assistant, there is a button called “Remove Node”. Press it.
Remove the cover and battery from the device for 5-8 seconds. Do not wait too long though or the node removal will time out. Within 20 seconds of initiating the node removal should be fine.
Plug the battery back in with the cover removed. The LED should flash continuously if it was successfully removed. (Note: these steps will remove the device from any Z-Wave network it was previously connected to)
Click the “Add Node” button on your Z-Wave control software while the LED is blinking.
Remove the battery for 5-8 seconds and then replace the battery. The LED blinking pattern should change and stop soon after pairing.
At this point, you should see confirmation of the added node in your controller software. To complete the process, run a network heal to make sure everything is communicating efficiently.
Now you should be able to monitor the state of your sensor in Home Assistant.
If you have any questions, leave a comment or shoot me a tweet @DaronSpence
I’ve been really getting in to Home Automation lately. I don’t own a home, but there is a surprisingly large pool of things you can implement when living in an apartment. Most recently I’ve been playing with automating lights, starting first with the humble bathroom! I’m one of those people who needs a light to use the bathroom. Even if it’s the middle of the day, the sun is shining, I have to turn on a light. This has been an experiment to relieve my brain of that pressure, as well as make any late night excursions a little more pleasant.
This whole project can be done for around $20 to just make the sensor. For a DIY approach, it’s not bad! The nice thing is that it’s also a great platform to add more sensors too down the line for a small investment.
Things you’ll need
Raspberry Pi Zero W (RPiZW for short)
8GB+ Class 10+ Micro SD Card
PIR Motion Sensor with headers
A few jumper wires (or loose wire to solder)
I decided to start with the hardware as this made the most sense. I picked up a RPiZW from my local Micro Center for $13 with header pins. I’m still relatively new to soldering, so it didn’t make sense to purchase the headers separately if I might screw it up. The price of headers with a bare computer also happened to be slightly more expensive. Win win for me! I also grabbed a cheap plastic case for around $5.
The next thing I needed was the motion sensor. I also picked this up from Micro Center, but at what I later found out was a steep premium. A 3 pack of these sensors can be found on Amazon for $5, whereas I paid $6 for one. If you want your homemade sensor to be multi-functional, a temperature/humidity sensor is a great addition for just a few more dollars.
Follow the directions to hook up your sensor to the Pi. In my case, the PIR needed 5V, a ground, and a data pin. I used GPIO 14, but feel free to use any open GPIO if you are adding this to an existing board. Using some extra female to female jumper wires I had laying around, it took all of 30 seconds to hook everything up. Now onto the software.
I used Etcher to mount Raspbian Stretch to the SD card. While I have the hardware necessary to setup the Pi using the GUI, it didn’t make sense considering I will likely never need to use it again, except to tweak a few values in a script file occasionally. I followed a setup guide for installing the OS headless, got it connected to my network and SSH’d in. Once logged in, I needed to install pip using the apt package manager then I needed to install paho-mqttusing the newly installed Python package manager. I did run into an issue here with the library being detected, so I recommend doing a reboot just to refresh everything. Since the computer is basically empty, it takes maybe 30 seconds even on the low spec hardware.
After that, I adapted a simple Python script I found online to access the GPIO pins, and constantly read the data for the motion sensor. When the pin is pulled high (1 in my case), then motion has been detected. Whenever motion is detected, I fire off a very simple MQTT event using paho.mqtt.publish. While it’s technically not the most efficient way to send data, it is much easier to read and the bathroom is such a low traffic area, the extra overhead to connect to the MQTT broker is not an issue. If you are potentially sending constant updates for temperature and humidity, it may be worth looking into the client method in paho.
To run the script on startup, I added a cron task on @reboot to start the Python script. I’m not an expert on the Linux startup processes enough to know when the network kicks in, so at the top of my Python script, it sleeps for a minute while the computer finishes booting and connects to my network. So far, this has worked fine and should continue to work even in the case of an ISP failure, since the Pi is connecting a MQTT broker on my local network.
With that working, I subscribe to the MQTT topic from within my Home Automation software, OpenHAB at the moment, and then everything else is connected there. For my own purposes I have a few simple rules. The bathroom light is controlled with wireless smart bulbs (IKEA Tradfri). Upon entering the bathroom, motion triggers the light to turn on. From there a timer starts for 2 minutes. If motion is sensed before that timer expires, it is reset back to 2 full minutes. This is fine for most bathroom tasks. Brushing your teeth or hair are very animated tasks that constantly trigger the sensor, which is positioned in the corner of the vanity, facing the door and whoever is standing in front of the sink. For other more, private rituals, two minutes can be a little too short if you like to read Reddit on your phone. Luckily a quick swipe of the arm or shake of the head will trigger the sensor again and turn on the lights.
For showering, I placed an IKEA Tradfri remote near the shower that can be used to manually turn on the light so poking an arm out is not required every few minutes. Upon exiting the shower, motion is sensed and the 2 minute timer is started. Unfortunately, there is no way to re-purpose the Tradfri remotes yet for custom events, otherwise I would have it be a manual override at all times. This way, one could press the button before getting in the shower and then press it again after they are done. Or perhaps manually overriding the timer for 45 minutes instead of 2. Plenty of time for a long shower or bath.
At Midnight, the bathroom light automatically changes to a very dim, but solid red. This is to help preserve night vision for those late night trips to the loo. At 6AM, the lights are changed back to a bright white, the preferred color of my wife and I for our lights.
Since it’s just the two of us, the 2 minute timer is fine to deal with. We’ve had it running successfully for 3 days now and haven’t minded the occasional shut-off. If anything it’s a reminder to hurry up since we only have one bathroom in our apartment! When guests come over, I plan to change the timer to a much more generous amount, most likely 10-15 minutes. I also plan to have the manually override ironed out by then.
In the future I may add a temp/humidity sensor to effect the timer, since even a moderately warm shower will raise the overall humidity in the bathroom. Adapting the script to read an extra GPIO pin or two should be straightforward as well.
Below is a short demo I recorded the night I got everything working. Over time I hope to add the script as well as some more in depth assembly photos. If that’s something that interests you, leave a comment or tweet me @DaronSpence and I’d love to hear your thoughts. I’m also happen to answer any questions about my setup.
Somedays are better than others. Somedays just suck. Somedays are pretty good. Lately, I’ve been on the lower end of the spectrum. I’m not sure what it is, but the past few weeks have been harder than usual. The mental breakdown between productivity and laying in bed all weekend is a finer line than I would like. This might just be a little rant, but as I was reading through Reddit, I got the urge to write down some thoughts so I’m going to vent. Hello stranger! I hope your stay here is fruitful.
Maybe this all started with the celebrity suicides? I have to admit, while I did know of both Chris Cornell and Chester Bennington, I never really knew much about them. Sure, I listened to Soundgarden and Lincoln Park, but I wouldn’t describe myself as anything more than an extremely casual “fan”. Seeing the interaction though, watching how one person’s decision had such a profound effect on someone else; it’s made me think.
Last summer, my father in law killed himself. I haven’t really talked to anyone about it. Not my wife, not my mother in law. Not my own friends or family. My wife found his legs sticking out from the closet in the master bedroom one morning. I rushed over to their house outside the city and waited in the front yard as the coroner arrived and cops continued to waltz in and out of the house. As they wheeled him out in a bodybag on a stretcher, I asked to see him. Call it morbid curiosity, but at the same time, I felt almost an obligation to him. I married his daughter and she would never see him again, so maybe it was up to me to carry on that final memory, for her sake? In case she ever wanted to know?
After they took his body away, I was left at the house to keep an eye on things. A relative had paid for a hazardous waste disposal company to come by and clean up the mess he left behind. Someone had to watch them right? What do you do in that situation? I sat on the edge of the bed for a few minutes, staring into the pool of blood in the closet where he shot himself. He put towels down. Despite being dramatically intoxicated, he took the time to make it “easier” for whoever was left to clean up the mess. There was something respectable about that.
The waste disposal team finally arrived. Not what I expected at all. It was an older couple in their late fifties, with a big pickup truck pulling a plain white enclosed trailer full of cleaning supplies, power tools, and even a few sheets of sheetrock. It makes sense when you think about it. Everything with blood on it has to be cleaned or removed. They were nice people. They’d obviously been doing it a long time. It took them a few hours to comb through the clothes in the closet, remove the ones with blood, and then rip up the carpet and the subfloor after soaking the blood with cat litter. Then they were gone. I was left alone in a dark house, with an few square feet of carpet missing in the master bedroom closet.
Again, I mentioned at the beginning I wasn’t sure where this was going. I live in that house now. My wife and I moved in to help her mom with the mortgage and the bills. Sometimes it’s weird to walk past that bedroom and think about what happened; about what I saw. It’s a small thought in the back of my mind at all times. An ever present darkness. I feel like that’s a book I read somewhere…
So maybe it’s just that? You see all the shit on the news about all the terrible things that happen in our world and they remind you of your own dark thoughts. But that’s part of being human right? Knowing that all of this is temporary; that it happens to everyone. I find comfort in that I think. That someone, somewhere is struggling to find meaning in the same things that I don’t understand. Maybe that person is you.
If you want to talk, reach out to me on Twitter, or a leave a comment if I still have those enabled. I honestly can’t be bothered to check right this second. I don’t think I’m in a “dark place” right now, just a difficult one, and maybe you are too. I think I’m gonna take a trip down to the coffeeshop and try to get some work done, drink some tea, try to find something useful in my own thoughts. Let me know if you find something useful in yours.
A few weeks ago, I was experimenting with https:// on the site for my plugin, ACF Widgets. I added the SSL cert for my domain using Let’s Encrypt and the requests were being handled fine, but I was only enforcing SSL on the checkout page. If you hit the ACF Widgets site with https:// initially, everything worked fine, but my login rules were causing some issues with people logging in to the support forums.
After 4 or 5 people contacted me through other channels telling me they couldn’t log in to get support, I decided to look into it a little more closely. As it turns out, the login pages were trying to work over SSL while people were trying to login with insecure http://POST requests. Whoops!
To fix this problem, I needed to convert the whole site to use https:// all of the time. This too worked out fine and wasn’t an issue. 3 lines in .htaccess that you can find on a million different blogs. Super easy stuff. What made things more difficult, was upgrading the URL for my plugin to check and receive automatic updates.
The problem with copying .htaccess rules
I think this goes back to a fundamental flaw with humans, in that we want results and we want them immediately. In 99% of the tutorials I found, most of them advocated for an .htaccess rule that looks something like this:
Generally, this will work, and it’s fine. Let’s go through it line by line.
Turn the Rewrite Engine on. This tells apache that we’re going to do a rewrite so it can load the required modules.
Set a condition. In this case, return true if the server is listening on port 80. (The standard port for HTTP)
Redirect the request to the given URL and pass in the URL query parameters.
Like I said, for most sites this works fine. However, when I pushed the next update to my plugin, I noticed I wasn’t getting any update notices. Why wasn’t it working?!
Now, in my most recent plugin update, I updated the store URL to my new https:// domain, so after everyone updated, I know whatever weird issue going on would probably go away. I did some tests and sure enough, requesting the update using the https:// store URL triggered an update. So why wasn’t it working with the http:// URL? What was happening during the redirect that broke things?
Since I have almost 500 customers, sending an email asking everyone to manually re-install this new version of my plugin was unacceptable. I knew I could do better. I decided to dig-in to the inner workings of APACHE and HTTP a little bit to understand what was going on behind the scenes.
A brief history of redirects in HTTP
So from my understanding of reading numerous blogs, is that the original intent of the HTTP/1.1 spec, was that if no redirect status code was specified (ie. 301, 302, etc) that the client was supposed to treat it as the same method as the original request. So if I send a POST request to /my-api-endpoint/ , the client should honor that POST request and it’s data if I do not specify a status code. In APACHE’s mod_rewrite this looks like:
RewriteRule ^(.*)$ https://example.com/$1 [R]
Using the [R] flag with no options.
Somewhere along the way (I’ve seen both IE and Netscape blamed) browsers and HTTP clients in popular languages begin to interpret any missing status code as a 302. In the HTTP spec, a 302 request is for GET requests only. Herein lies the problem with our updates.
EDD Software Licensing Update Process
To understand why updates are failing, I also needed to examine the source code for the update script I was using. At the time of this writing, ACF Widgets is build upon Easy Digital Downloads and the Software Licensing Add-On. It works great! Though in my case, updating the store to https:// was obviously causing issues. Digging in to the code, we find this:
And herein lies our problem. EDD SL uses wp_remote_post() to send API requests to the URL of our plugin store, which is fine, nothing wrong with that. However, when our POST request to our EDD store encounters a redirect without a specified status code, cURL redirects to a GET request for the homepage with no query parameters. Since that’s obviously not what we want, the EDD SL update script fails silently (like it should) so we don’t clutter the users dashboard with errors in case our store is down for any reason. In our case though, we want to preserve that POST request and any data we send. So how do we do that?
Enter the Magical Hero Extraordinaire Status Code™, 307
The requested resource resides temporarily under a different URI. Since the redirection MAY be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
Perfect! That’s exactly what we want! In short, this will preserve our POST request and any data we send. So now we can use this in conjunction with a normal 301 request to route all of our traffic through our newly secured domain.
So line by line, let’s go through this new .htaccess.
Turn on Rewrite Engine
Check for a request on port 80
Check for the GET request method
Redirect (via a 301 for SEO purposes) and ignore all other rewrite rules ([L] flag).
Now if we don’t have a GET request (maybe we have an API that uses PUT, POST, or DELETE) it will get routed through the second rule.
Check for a request on port 80.
Perform a 307 redirect, thus preserving our request method and data. Also, ignore any more rewrite rules ([L] flag).
Now for those of you worried about SEO, don’t worry. Google only cares about your visible stuff, AKA GET requests. You shouldn’t get a penalty for other request types (because Google won’t even know to access them).
As you can see, 307 redirects can be extremely powerful. With the correct caching headers, you can even instruct clients to cache the results while you update your API or tools to use your new secured endpoints, without sacrificing security.
So what next?
Since we now have a our store properly configured to redirect requests from plugins out in the wild, there isn’t anything else to do except wait. Customers will update the plugin to the new version which uses the new https:// store endpoint. If you have detailed stats about version usage for your plugin, you could eventually remove the redirect, though I don’t see a reason to for the vast majority of plugin stores out there. If anything, it’s a good catch all for anything you may add in the future and forget about.
Questions? Comments? Leave ’em down below. I would love to hear from you!