You’ve probably heard that brain cells need glucose and that’s why you need to eat high carb foods. Well, it’s true, but not completely correct.
If you eat standard western diet high in carbohydrates, and eat on average 6 or more times a day, indeed your body will use glucose for energy most of the time, excluding periods of overnight fasting. It means that your brain cells almost most of the time use glucose for energy.
But if you are on a low-carb, ketogenic diets and/or doing intermittent fasting, then there are periods in a day, and in case of keto it can be throughout the day, that you brain cells will switch to using ketones for energy plus using glucose too.
If your doing prolonged fasts longer than 24 hours, say 48 hours or more or strict ketogenic diet, then brain cells will switch to using ketones as the main energy source.
In his lecture prof. Stephen Cunnane described an interesting finding that brain cells consumption of glucose is independent of the level of glucose in blood. He calls this glucose pull. It means that brain will use more glucose for energy only when brain cells are more active, say you are thinking hard on a particular task, like playing chess.
It means that even if you consume a lot of sugar, energy drinks, fruits etc., it won’t help your brain metabolism, unless your brain works harder.
On the other hand, if there are ketones in your blood, then brain will try to use them as a fuel preferentially as much as possible. It means that when the level of ketones increases in the blood, brain cells will use more of them. Prof. Stephen Cunnane call this push of ketones.
Takeaway
To summarize, brain cells do need glucose, but glucose neither most efficient nor preferred brain fuel.
The use of both glucose and ketones as the brain’s two main fuels is governed by five principles: First, two distinctly different strategies regulate the use of glucose and ketones by the brain, a concept we call ’Push-Pull’ (Cunnane et al., 2016a, b). Brain glucose uptake is controlled by brain cell activity. Glucose is transported into the brain via glucose transporters in response to brain cell activation (Pull), so it is largely independent of blood glucose concentration. In contrast, ketones are transported into the brain via monocarboxylic acid transporters directly in response to plasma ketone concentration (Push), not brain activity. Hence, when ketones rise in the blood, they are immediately transported into the brain, an effect not seen with glucose.
If you struggle to lose weight following various diets and training regimens then there could be a couple of issues with your approach. But the most import thing to understand about weight loss is that you need to really know the root cause behind weight gain and what to do about it.
Blindly trying diets, without understanding how they work if at all, and going to the gym may cause a slight weight loss. But, most probably, you’ll gain weight back as soon as you stop following a diet, which happens to most of the people.
So what is the root cause you may ask?
Well, if you don’t have a rare genetic condition, then, most probably you are overweight, obese, pre-diabetic or even having type 2 diabetes due to excessive consumption of carbohydrates that causes Insulin level in the blood to be high throughout the day. This causes Insulin resistance in the long run in two ways: glucose in food you eat causes high level of insulin in the blood and fructose in food you eat causes high level of uric acid that causes insulin resistance indirectly.
As soon as insulin hormone is high in the blood it causes excess glucose in the blood to be stored as fat, and also prevents utilization of the fat that you already have as energy for the body.
Also, when insulin level is low, when you don’t eat for a period of time, due to fasting or after overnight fast this allows the body to use fat deposits that you have as energy for the body, hence weight loss.
Now, that we know that weight gain in most cases is caused by frequent consumption of foods rich in glucose and fructose, the solution is quite straightforward – there is a need to lower carbohydrates intake in any possible way. It can be a low-carb diet, it can be a ketogenic diet, it can be intermittent fasting alone or in combination with low-carb or keto. That’s it.
There is no need to be on a regular caloric restriction diets which cause you to be always hungry and have lower metabolism. There is no need to buy an expensive gym membership or any other sport equipment.
What you may find useful when you start losing weight is that you become more energetic and may find walking, which is free and affordable, enjoyable.
Personally, having been overweight for more than 10 years since my 30’s until 40’s, I wasn’t able to lose weight doing sport exercises or following a diet.
What helped me, was starting Intermittent Fasting regimen almost 2 years ago. Since then, I was able to lose 22 pounds (10 kg) and maintain this weight.
Yep, you’ve heard it right. It has been almost two years of quite effortless weight maintenance.
These Beta-Hydroxybutyrate (BHB) ketone salts work.
I’ve noticed people complaining that they took these pills as prescribed on the bottle and saw no results:
3 pills taken 3 times a day, which is 9 pills. The package information says that 1 pill contains about 0.542 grams of BHB salts.
Well, there is a big problem with such prescription. And the issue is as follows.
Scientific studies that are available at PubMed Central (PMC) show that the smallest does that was shown to induce exogenous ketosis was 3.75 grams at once taken twice daily.
Taking into consideration that 1 pill contains only 0.542 gram it means that to get 3.75 grams of BHB salt to induce mild ketosis (0.7 mmol/L after 15 minutes as was in the paper below) [ref #1], one needs to take:
Note: In the study #1, they gave ketone salts to juveniles, it means that for an adult to get 0.7 mmol/l of ketones you need to up the dose to about 10 or even 15 grams of ketone salts. I’ve taken 10 grams at once of Potassium D-BHB ketone salt and was able to measure only 0.5 mmol/l using Digital Ketone Breath Meter which measures Acetone ketone in breath.
So, it means you need to take at least 7 pills at once, while the bottle has only 90 pills in total.
Now, you can see why you see no results after taking 3 or even 6 pills at once.
What can you do?
1. If you usually practice Intermittent Fasting for at least 16 hours, then your body, most probably, is already got used to producing ketones. Then, possibly, you don’t need to take more than 6 pills at once to induce ketosis on the last hours of your fast. Pay attention, studies show that BHB salts are much more effective taken in a fasted state [ref #2].
2. If you practice ketogenic diets or very low carb diets, then too, you possibly can induce exogenous ketosis between meals with 6 to 9 pills taken at once.
3. If you do intensive exercises like cycling, spinning or weight training for at least 60 minutes or more, then, again, in a resting period between meals taking 6-9 pills at once may help you induce ketosis.
In other cases, studies show that regular people who don’t practice one of the above need at least 3.75 grams of BHB salts taken at once! [ref #1]
Moreover, the dosage in various studies was 3.75 grams, 7 grams, 12.75 grams, 22.1 grams, 42.2 in one sitting! [ref #3].
So there you have it, taking 3 pills, 3 times a day won’t work for most of regular people.
Today in the morning on approximately 10th hour of the fast my weight was 81.5 kg (179.7 lb).
After walking 6.24 km (3.87 mi) at 0 degrees Celsius temperature outside in a fasted state my weight went down to 80.7 kg (177.9 lb). It’s a delta of 0.8 kg (1.76 lb) within 1:10 hour, which is impressive to say the least!
Limitations of my experiment:
Some of the weight loss is due to poop just before walking
Some of the weight loss is due to perspiration (sweat).
But, there was for sure loss of glycogen and fat!
So there you have it.
Walking is free, affordable and easy to do, unless you have severe hip or knee joint issues. In the case of joint issues you may resort to spinning and swimming, which requires equipment or a pool.
Well, extended or prolonged fasting which is fasting for more than 24 hours is not your lovely 16/8. It’s more challenging and I should say it’s another level of fasting altogether.
First, it requires more dedication since unlike short fasts you still need to live in an environment where people continue to eat and you have to deal with food preparation for them and feel all the smells and looks of the food.
So if you can, do extended fasting when there is no one around, so not to be distracted.
Second, prolonged fasts are less comfortable than 16/8. After about 24 hours into a fast you start feeling a feeling of emptiness in the stomach that is a little bit annoying, but bearable. And at 8:00 PM as it also happens during regular fast you’ll feel hungry due to high levels of ghrelin hormone.
The good news is that in the morning of the second day of fasting if you do 42 hours for example, you don’t want to eat at all. Which is the same thing I feel during short fasts too.
Third, when you do prolonged fast you may feel coldness and low energy even though after about 24-36 hours (depending on the amount of glycogen in the liver) body should switch to using fat as main source of energy. Also, you may feel like going to sleep very early. Which is the case for me today, as usual when doing 42 hours fast.
Benefits of extended fasting
But, don’t forget that this is not in vain:
During prolonged fasts you lose fat really fast.
You have more time since you do not need to buy, cook or prepare food, unless you have kids. Then it sucks.
You have an opportunity to look at your usual life from outside and see how our life is food-centric most of the time.
Autophagy is in full swing only during prolonged fasts starting after 24 hours into fasting. I am not sure that 16/8 turns on autophagy at all (I’ll check this point in scientific papers later).
So there you have it
Extended fasting is challenging, but it comes with some benefits. If you don’t do it too frequently it can be even fun, when you do it with a partner, and kids are sent to spend time with grandpas and grandmas. And you use free time for walking, reading and sleeping.
When you understand this simple thing then you can do three things below:
You can change what you eat to lessen or completely remove sugary and starchy foods and drinks from food you eat. This approach is also known as Insulin lowering diet (aka low-carb and Ketogenic diets)
Or you can go on an Intermittent Fasting lane and strive to do 16 hours long fast and 8 hours long eating window. It’s flexible and you can start from 12 hours fast, which means skipping your breakfast. It’s simple as that.
Or you can combine both of the above approaches.
3. Then if you feel like it you can start walking. As soon as you start losing weight (at first water) after stopping eating ultra processed food and sugar, you may find yourself more energetic and walking is a good thing to engage in.
4. At last, if you want to you can start doing resistance training using your own body (push-ups), resistance bands or dumbbells (these can be expensive to buy new, but you can find used ones at FB marketplace for example).
To summarize
For most of the people, it possible to lose weight without using drugs, surgeries and going to the gym by understanding that excessive amount of Insulin hormone is what is driving weight gain.
When you stop eating sugary and starchy foods, drinking sugary drinks all of which is called Ultra Processed food there is nothing that can prevent you from being healthier.
You can do it!
References:
The people that theirs advice I listen very carefully are:
Benjamin Bikman, PhD – “Why We Get Sick”
Jason Fung, MD – “The Obesity Code”
Gary Taubes, investigative journalist – “Why We Get Fat”
Mark Mattson, PhD – “Intermittent Fasting Revolution”
I’ve long being intrigued by meditation, but I never tried it myself. I’ve heard it was useful to calm you down. It was said it provided some health benefits etc. What caused me at last to change my mind about it was the talk that Lex Fridman had with the historian Yuval Noah Harari in which Yuval mentioned that he meditated for two hours a day and had a one month long meditation retreat once a year.
One additional motivating factor for me was that I, as I think most of the people on Earth, can’t get no satisfaction as The Rolling Stones famously sang. And indeed it’s the case, if you think carefully about it. In this information age we are bombarded with lots of things that cause us to want to buy that thing or the other. Subscribe to that service, like Netflix or the other etc. It seems like a never ending story of addiction that gets worse from day to day. Then, what can be a way out of it you may ask? Well, one of them, apparently, is meditation.
It turns out that thinking about meditation as a tool to relax and get calm is not exactly what meditation is meant for. Though, it definitely can make you calm it’s a by product of meditation, but not the main purpose of doing it.
Since Yuval mentioned meditation in that talk I googled the best books on meditation and got a list of a number of books. Among them were two books in particular that resonated with me.
The first one was 10% Happier book by former ABC News journalist Dan Harris in which he described his path to meditation and how it played out for him. I bought a used copy of that book and found it interesting and useful.
The second book in that search list was the How To Meditate book by Pema Chodron a Tibetan Buddhist nun who is a teacher at Gampo Abbey in Nova Scotia, Canada. That book was unlike the 10% Happier and it had much more profound impact on me in comparison to Dan Harris’ book. If you’ll read it and it will resonate with you, then I think you’ll understand what I mean by profound impact.
Since then, I read a number of other books that Pema Chodron wrote and each one of them is a treasure chest of wisdom and provides practical advice on how to mediate, what meditation is all about and what meditation can do for you and for all humanity if we practice it wholeheartedly.
If you are a person who still uses pens to take notes or write anything else on paper then you may find this post interesting. Also, do you think any pen will do or, maybe, selecting a pen is an important step to make? I think a pen that is comfortable, durable and nice is a very important thing to have.
Pens come in a number of types like ballpoint, rollerball and fountain. Also, they can be made from different materials such as plastic, aluminum and even wood. The ink that is used in pens can be water or oil based. In addition, the refill tip can have a different diameter which effects the thickness of the lines you can draw or write.
So far, I had a quite expensive Parker fountain pen and more affordable Parker ballpoint pens. I liked the most Parker ballpoint pens, since they are durable and require no maintenance in comparison to fountain pens. And I’ve used ballpoint pens for more than twenty years now.
Parker Jotter pen I had for a long time
I also like the Frixon clicker series of Pilot pens which are made in Japan and have a renowned Japanese quality. These pens allow you to erase what you’ve written and functionally they are just like pencils, except you don’t need to sharpen them.
Frixon clicker erasable pen
Recently, I’ve been looking for a new comfortable pen and a quick search brought to my attention an interesting and peculiar pen from Japan. It was OHTO GS01-S7 ballpoint pen with an aluminum body and having an oil-based black color ink. What is interesting about this pen is that its body comes in a number of colors, while the ink is always black. This pen feels nice to hold and it looks good. Functionally it resembles Parke Jotter pen, but it looks more engineered, in my opinion, and it feels more comfortable than Jotter. Maybe, it’s due to the fact the OHTO pen is longer than Jotter and has a hexagonal cross-section.
OHTO GS01-S7 with 0.7 mm refill
One unexpected feature of OHTO GS01-S7 is that you can swap its original refill with the Parker Jotter one and visa versa. I’ve found about this while watching a review of the OHTO pen by a Japanese youtuber.
Parker Jotter and OHTO GS01-S7 disassembled, side by side
I very much value quality pens, since they have this surprising capability in them. Especially, since OHTO pen only comes with black refills. So if you want to have a blue ink then you can use Parker’s original blue ink with OHTO pen! Isn’t it nice?
OHTO pen with Parker refill
Also, as I mentioned, you can put OHTO GS01-S7 0.5 or 0.7 mm refill in Parker Jotter if you fancy to. Which can be an interesting twist to do.
Parke Jotter pen with OHTO refill
All in all, OHTO GS01-S7 is a solid pen that have a nice looks and feel. It’s delivering smooth writing experience and is satisfying to click, just like a pop it toy. If you’re look for something new and creative, then this pen is for you.
As you probably have heard by this time ChatGPT a machine learning based chatbot created by OpenAI is very famous. It is based on Generative Pretrained Transformer model, hence, GPT in short. It’s quite successful in various tasks ranging from text summarization, essays generation to questions answering. But did you know that it can also generate working code in various programming languages? If you didn’t then this post will provide you with some ideas to try.
Task at hand
I am a Java developer and recently at work I need to solve a certain task. The task was to sort a list of objects where each object in the list had a date time field. Date time field may look like this: 2023-09-17 20:01:02.23.
For example, in the JSON Crack online tool below you can see how such a list of objects can look like
This task seems quite straightforward when the field is of a Java Date type, but in this case the field was of type String. It means that sorting the objects by this field won’t be correct since the objects will be sorted alphabetically instead of based on date and time. A solution is to convert the String data time field into proper Date type and then to sort the objects.
To summarize what needs to be done is as follows
Iterate over the list of objects and compare objects createdDate field by first converting it from String type to Date type.
Using Java Stream API approach
Java 8 version introduced a powerful Streams API that allows processing of collections in a functional way. For example, it is possible to filter, apply mapping or sorting to a collection in a single line of code using a declarative syntax somewhat similar to SQL. So, accomplishing the task of sorting a list of objects that have a createdDate field of Date type is quite simple and if you google how to do it you’ll find a number of solutions.
For example, this is how it can be done based on the Stack Overflow answer.
The issue was that I wasn’t quite able to find a solution that exactly would solve the issue I had, even though I searched a lot. Then I had an idea. When I played with ChatGPT at OpenAI’s website I also played with code that ChatGPT generated for various languages. So, I went to Microsoft Edge browser and opened Bing Chatbot, powered by GPT-4, and wrote the following
and this is the solution that the Bing chatbot provided
Certainly! Here’s an example of a Java code snippet that sorts a list of objects while converting a string field to date type:
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<YourObject> yourList = new ArrayList<>();
// Add objects to yourList
// Sort the list based on the string field "dateString"
Collections.sort(yourList, new Comparator<YourObject>() {
@Override
public int compare(YourObject o1, YourObject o2) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date date1 = dateFormat.parse(o1.getDateString());
Date date2 = dateFormat.parse(o2.getDateString());
return date1.compareTo(date2);
} catch (ParseException e) {
e.printStackTrace();
}
return 0;
}
});
// Print the sorted list
for (YourObject obj : yourList) {
System.out.println(obj);
}
}
}
class YourObject {
private String dateString;
public String getDateString() {
return dateString;
}
public void setDateString(String dateString) {
this.dateString = dateString;
}
// Add other fields and methods as needed
}
In this example, we have a list of objects of type YourObject that contains a string field called dateString. We want to sort the list based on this field, treating it as a date.
To achieve this, we use the Collections.sort() method and provide a custom Comparator implementation. Inside the compare() method, we parse the dateString of each object into a Date object using a SimpleDateFormat. We then compare the two dates using the compareTo() method and return the result.
Please note that you need to replace YourObject with the actual class name and modify the code according to your specific requirements.
Let me know if you need any further assistance!
If you try the example above in a Java online compiler you’ll see that it works right away. Isn’t it amazing? The only issue that I wanted to have this solution using Java Stream API, so I rephrased what I wanted to get.
Certainly! Here’s an example of a Java code snippet that sorts a list of objects while converting a string field to date type using the Java Stream API:
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<YourObject> yourList = new ArrayList<>();
// Add objects to yourList
// Sort the list based on the string field "dateString" using Java Stream API
yourList.sort(Comparator.comparing(obj -> {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date date = dateFormat.parse(obj.getDateString());
return date;
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}));
// Print the sorted list
yourList.forEach(System.out::println);
}
}
class YourObject {
private String dateString;
public String getDateString() {
return dateString;
}
public void setDateString(String dateString) {
this.dateString = dateString;
}
// Add other fields and methods as needed
}
In this example, we have a list of objects of type YourObject that contains a string field called dateString. We want to sort the list based on this field, treating it as a date.
To achieve this using the Java Stream API, we use the sort() method of the List interface and provide a lambda expression as the comparator. Inside the lambda expression, we parse the dateString of each object into a Date object using a SimpleDateFormat. We then return the parsed date for comparison.
Please note that you need to replace YourObject with the actual class name and modify the code according to your specific requirements.
Let me know if you need any further assistance!
Testing the generated code almost as is in an online Java compiler
Well, that last answer was what I needed. We can take it and check that it can run almost as is in an online Java compiler. I made a couple of small adjustments in the generated code:
I instantiated three objects with dateString populated.
I added these objects to a list and
I adjusted println function to print the dateString field, instead of the object itself.
This is how it looked after running
Below come a full source code if you need it
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<YourObject> yourList = new ArrayList<>();
// Add objects to yourList
YourObject obj1 = new YourObject();
obj1.setDateString("2023-09-01");
YourObject obj2 = new YourObject();
obj2.setDateString("2022-07-02");
YourObject obj3 = new YourObject();
obj3.setDateString("2021-08-06");
yourList.add(obj1);
yourList.add(obj2);
yourList.add(obj3);
// Sort the list based on the string field "dateString" using Java Stream API
yourList.sort(Comparator.comparing(obj -> {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date date = dateFormat.parse(obj.getDateString());
return date;
} catch (ParseException e) {
e.printStackTrace();
}
return null;
}));
// Print the sorted list
yourList.forEach((obj -> System.out.println(obj.getDateString())));
}
}
class YourObject {
private String dateString;
public String getDateString() {
return dateString;
}
public void setDateString(String dateString) {
this.dateString = dateString;
}
// Add other fields and methods as needed
}
Blowing your socks off
So there you have it. If you are trying to find a solution for a coding issue you face and you don’t find a good example at Stack Overflow or elsewhere, try using GPT-4 based chatbot, for example, Bing and see how it goes. You can be amazed.
Recently, I went to BASICs and I found it fascinating. It is much more interesting programming paradigm then compiled languages development as C like languages since you can program in BASIC interpreter and in assembly at once and get feedback instantly. Also, 6502 CPU is quite easy to understand and memory mapping of the 6502 is also straightforward and interesting to play with.
The only issue is that I find it tedious to type the code in the Commodore 64 emulator directly. But there is a solution, it is possible to import files in D64, RPG and other formats that the emulator supports. It means that you can write BASIC or assembly code in your favorite editor and then import it.
How can you do it?
To be able to do this it there is a need to convert the text file to a format that is supported by Commodore 64. If you search you’ll be able to find a number of tools that people wrote to do just that. Since I have a PC with Windows 11 so I am using a Windows based tool. This tool is called C64List and it comes in handy to be able to convert BASIC files into text files and vice versa.
Prerequisites
Operating System: Windows
Download and extract C64List tool
(Optional) Review supporting documentation file with a very detailed and helpful