Skip to main content


Showing posts from December, 2021

My childhood favourite fantasy series: Enchanted Forest Chronicles by Patricia C. Wrede

  This is my love love love number 1 favourite fiction fantasy book!! I read this book during my  primary school day and it was totally by chance that I found the title. Since I found it as I scrolled through shelves of book in a library looking through the book cover arts. What is this book about? It is about the adventures of this princess, Cimorene, who is so unprincess-like. We have a lot more models like her nowadays. For example, Shrek's Princess Fiona is also an atypical princess character.  Cimorene is very different from her sisters and she constantly tries to learn things of interest to her such as magic or sword skills (I was thinking if I am in that world, I would love to learn too!) However, all these attempts would be quickly stopped by her parents for being not proper. The fun starts when she runs away from an arranged marriage to become a dragon princess. She met Kazul who is a very wise female dragon.  What do I love about the story? I love Cimorene who is a very p

Eating healthily with Grain Bowls~

If you had read about my intermittent fasting post, you know that I had maintained my weight at 63kg since Sep21. Well, the good news is that it is still at 63kg, bad news is that it is almost 3 months since then and it had not gone down a bit. Must be all the chocolate I consume daily >< or because I am getting used to my workout intensity. However I am not a big fan of increasing my intensity, my main fear is that if I cannot maintain the routine, will this cause weight fluctuations. So I had been slow at adding new routines. Well, I will figure that out eventually. Today I would like to share with you what I had been eating at least once per week and I absolutely love how easy it is to prepare and make. Grain Bowls! I read up on how to make it  here . It really blows my mind. So from the article, the recipe goes: 1. Pick your grain. I always have brown rice at home. Grains really gives a sweet taste to the bowl and I only ate about a 1/4 cup. I also thought to use potato or s

Python quick bite 04: Catching exceptions

So far whenever we face an error message after running our code, we just took it back to reading the code line by line and trying to resolve them. However, when our codes become more and more complex, possibly with thousands of lines (dreaming about that since I am still a beginner), it will get harder to do that.  Here is the python syntax to help us capture these exceptions so that we know possibly where our codes had gone wrong and so how to resolve them and in some cases still allow the code to proceed. try : something that might cause an exception except: do this if there was an exception else: do this if  there were no exceptions finally: do this no matter what happens eg.  try:     file = open("a.txt")       # this will not work if there is no existing file.   except FileNotFoundError :      #if there is nothing after except, then when the codes in the try clause fails, it will just move to the  #except clause. If there is more than one error happening in the try

SQL quick bite 02 (Conversion and working with NULLs)

Implicit conversion - compatible data types can be automatically converted Explicit conversion - requires an explicit conversion function CAST/TRY_CAST CONVERT / TRY_CONVERT  PARSE/ TRY_PARSE STR CAST and CONVERT are same but favor CONVERT for dates for a particular date format. It can be implicit convert from str to date but the month  PARSE make it into a number STR make it into a string TRY works but trying to convert if it can rather than run into error. Eg for using converting data types SELECT CAST(ProductID AS varchar(5)) + ':' + Name AS ProductName FROM table or  SELECT CONVERT(varchar(5), ProductID) + ':' + Name AS ProductName FROM table Take note of the difference in syntax requirement to use CAST and CONVERT. In this case, both give the same results.  Eg for converting dates SELECT SellStartDate,      CONVERT(nvarchar(30), SellStartDate) AS ConvertedDate,     CONVERT(nvarchar(30), SellStartDate,126) AS ISO08601FormatDate FROM table; The first convert changes