Meng Xuan Xia

  • Home

  • Archives

  • Tutoring

  • Projects

  • About

  • Tags

A modern content publishing stack

Posted on 2020-06-26 | Comments:
Symbols count in article: 2.1k | Reading time ≈ 2 mins.

I’ve been writing on this blog ever since 2012. Years passed, I wonder: what a modern content publishing stack should look like?

Personal blogs were a niche before powerful blogging engines like Wordpress popularized it. Then, microblogging took over. We were obsessed with writing 140 character short posts. They didn’t take much time to write and were quick to share. Micro blogs are also more lenient on writing styles; when the content is short, one’s inexperience in story telling is less obvious.

Then we saw the rise of Medium, and later on, Ghost and other blogging software that tried to mimic Medium’s unobstructive writing experience. But user experience was only part of Medium’s success. Reading and writing on a centralized blogging platform means your articles have a better chance of being discovered by readers thanks to the platform’s recommendation and ranking system. It’s hard to get your content out without a easy way for your readers to discover you.

These days, Medium is a more often a platform for startup companies to advertise their products, for Machine Learning researches to write tutorials on how to stack layers with Keras, Pytorch and etc.

Of course, there are also static site generators that are often used as blogs, such as Jekyll, Pelican, Hugo and Hexo (which powers this blog.) These site generators were popular among software developers because Github pages can be used to host these static content for free. And us Layer 7 arm chair enthusiasts are happy to continue using commandlines and markdown.

What should a modern content publishing stack look like? It should have the obstructive authoring experience and discoverability of Medium; a mobile-first interface that let people piece small chunks of microblog content into meaningful articles; and finally a self-hosting, control-your-own-data model that doesn’t depend on the survival of a single site.

It sounds like I’m imagining a Ghost CMS connected with ActivityPub protocol to form a federated publishing network just like Mastodon does for micro blogging.

Can’t wait for it to come true.

The Cycles of Staying Up Late

Posted on 2020-06-20 | Comments:
Symbols count in article: 2.8k | Reading time ≈ 3 mins.

I recently discovered that I’ve been passively testing out the neurological limit of my body every once in a while. Almost like a cycle that keeps going on.

The cycle goes like the following: I start with a normal routine of 11:30 pm sleep time and 8:00 am wake up time. Over a period of 2 to 3 weeks I’d be sleeping later and later from midnight all the way to 1:30 ish. I slept late not because I had something to do, but rather having a unexplained urge to discover new things on the internet, flipping through pages of hackernews and YouTube subscriptions, simply not wanting to fall asleep and end my day. Part of me knows it’s bad to stay up this late and do nothing productive, sometimes even not entertaining or relaxing. But the other part of me keeps telling me to stay awake and flip to another Tiktok video, reddit thread or whatever.

Despite of sleeping late, my wake up time doesn’t deviate nearly as much from the routine. I’m usually awake by no later than 8:45 am. I sleep less as each day passes. It’s like a inward spiral that once this started it’s very hard for me to stop doing it. I sometimes don’t even realize that I was taking sleep time away from myself. Even when I do, when it comes to the night, I just ignores my realizations during the day and keep maintaining my bad routine.

This continues until my body collapses from chronic lack of sleep, usually ending up with me getting sick, catching a cold, or suddenly feeling an unstoppable fatigue in the afternoon and evening. I’d sleep for 12 hours that day. The following day I’d back at my 11:30 - 8:00 routine. But, it would only be a matter of time until I repeat this again.

–

I’m not alone in this. It appears that this is a common thing for the unlucky folks of my generation [1] [2].

We are sleeping late these days not because our body is rewarding us with dopamine from the content that we are consuming while staying late. But more like we are trying to vent. Venting what though? Every day, most of our time is consumed by work, chores, feeding ourselves and fulfilling responsibilities. That short time that we lay on the beds is solitude time that our subconscious is seeking. Not going to sleep at time almost feels like a protest against the time taken away from our innerselves during the day.

It’s only when our body finally complains that we realize passively staying up late is doing nothing good for us. Taking a step back for a few days but ultimately going back into the spiral because there are no better alternatives.

–

Is it bad though? Almost certainly, it’s a common understanding that staying up late is bad for health and our bodies have been given us similar warnings as well. But I’m also glad that I get to repeatedly test (and perhaps improve) my limit. It’s time to adopt better habits and try something new.

On writing and content creation

Posted on 2020-06-07 | Comments:
Symbols count in article: 5.6k | Reading time ≈ 5 mins.

I remember writing a lot when it was 2006.

I was freshly immigrated to Canada, learning a new language from scratch. Time spent in school felt really, really long. My mind was in constant production of thoughts and emotions in Chinese, but it simply wasn’t possible for me to express them in French, not to mention my English was also quite broken at that time. I was putting myself in own bubble of writing software.

Every day I was just waiting for school to finish at 3 pm, race to my home to turn on my Hisense PC and start a 5-hour marathon in front of it. During that time I was writing my first bot for a multi-player online strategy game called Travian, with 易语言 (EPL) as the programming language. EPL is a VB6 inspired programming language and IDE, localized in Chinese. At the time, its native language made it easy for me to get started, and it was the only good part about that programming language.

I published the bot for free and started advertising it on many BBS’es where players gathered. On each advertising post I would list all the features that the bot provides, some screenshots and the methods to obtain the software. In a matter of weeks, I gained a few hundred users and started to receive praises, bug reports and feature requests.

It was incredibly motivating, and I poured countless more hours into this project. While the bot gained popularity, I also made some good friends. One of them operated 086webgame.cn, which was intended to be a frontend page of web games at that time (always dream big!). With his help, I started a blog under his web server and started using it to publish and communicate updates to the bot. At that time, I was simultaneously working on the bot and writing release logs and feature roadmaps. The content creation in the latter two was sometimes more enjoyable than working on the bot itself.

I continued working on it for about 2.5 years until my interest to Travian and the bot slowly died. The blogging system also saw multiple updates and I lost content in mid transitions. Fortunately, I still have a copy of the last blogging system

Later, dating and keeping a good academic standing took quite a bit of my attentions. I was also comfortable enough at programming that I started taking on freelancing jobs. I was writing software for clients, but I wasn’t doing as much content creation as I used to do when I wrote software for myself.

This continued during my Cegep time. When I finally started at McGill, I discovered that our school of computer science hosted personal webpages. That discovery started the current blog on https://cs.mcgill.ca/~mxia3, where you are likely reading this article from, if not on Medium.

At the time, I was carrying to classes a ThinkPad laptop running a fedora 16. I started learning to use vim and was trying to take live Math notes in markdown and LaTeX math. If anyone tried to take Math notes live from the classroom, you’d know how frustrating it can be. I posted my class notes on my blog and shared the links within my small group of friends. The next year, I also added algorithm and data structure lecture notes. As the difficulties in the topics gradually ramped up, it was becoming increasingly more difficult to understand the subject at the same as taking live notes, so I put a pause to it.

At the last year at McGill, I started doing a different kind content creation, in the form of academic papers. The content within an academic paper is a lot more rigorous than technical blogs. I grew to love the way we write papers - express your conclusion first and then describe your method and logical reasoning in detail to let the readers validate your approach. This unfortunately isn’t a very catchy way to tell a story for average people, and we don’t see this type of writings outside of the scientific community.

I always saw writing blogs as ways to simultaneously share knowledge and interesting stories with others, as well as a way to build a brand for myself. After I graduated from McGill and started my profession, I still kept writing blogs on various tech topics, such as creating Schemats as a way of provide statically typed PostgreSQL queries in Typescript.

But the problem of writing tech articles is that they often become obsolete too fast. Especially in today’s world where software engineering evolves rapidly. Information has its own timeliness in positive proportion to its values.

As time passes by, I write less and less. I can attribute this to a many different reasons: lacking the time, lacking enthusiasm or lacking motivations. But deep down I feel that I’m running away from it because of fears for losses. When I first started my career in tech, I was young (still am 😂), naïve and arrogant. There was little stake involved and a lot to gain from shouting my thoughts at the world. But as I built a career now, there are substantial amount of intangible things at stake, yet the gains from publishing my thoughts are disportitional to the risks.

When I shared this thought with a friend today, he said:

Interesting, how did you get yourself in a situation at a such a young age where you’re in a similar position to say people with family/very very stable career?

So true! I chuckled. Perhaps I’ve achieved the career-wise of what most people have in their 30’s, but yet without a family, making this sounds a lot more childish.

But I don’t have to keep writing disruptive, polar and controversial articles. I can put more effort on discussing nuanced topics, hoping they will stand the test of time.

A few notes on organizing clothes

Posted on 2020-05-17 | Comments:
Symbols count in article: 1.3k | Reading time ≈ 1 mins.

For the last 20 something years, I’m probably like a lot of you, ignored organizing things. As long as the drawer can close, it’s mostly fine for me. But the situation with Covid has given me the time to attempt on things that I wouldn’t spend time on before… like organizing clothes properly.

For the longest time I’ve been using just the quick-fold method and the rolling method. But there are serveral issues with each of them:

Issues with folding:

  1. Folded items are meant to be stacked. Putting items on top or bottom of the stacks are easy, but inserting into the middle is not.
  2. Folded items need to be held together to stay folded, either by gravity, or by compression inside a drawer.

Issues with rolling:

  1. Rolled items are not easy to be stacked. If they are stacked, retriving items from the middle is difficult.
  2. Requires careful handling as it’s easy to unroll them.

That said, I need a method that is:

  1. Self-held together and does not become loose over itme.
  2. Stackable and rearrangeable.
  3. At the cost of marginal increase in preperation (folding/rolling) time.

Surprisingly there is perfect method on youtube (chinese); which I’ve summrized below:

  1. Make rectangular shape based on the height, width, depth of the drawer.
  2. Use features from the cloth itself to hold it together.
your browser does not support the video tag

NL Hold'em Analysis: Playing two overs with backdoor flush draw on a 3 bet pot Out of Position

Posted on 2019-07-04 | Comments:
Symbols count in article: 3.8k | Reading time ≈ 3 mins.

NL Hold’em Hand Analysis below are advanced content. We assume that the reader understand fundamental concepts of hand ranges, odds, bet sizings and basic mathematics of poker.

Preflop

  • Effective stack is 100BB
  • Hero opens from MP with K♠ Q♠ for 3BB.
  • Button 3-bets to 9BB.
  • Hero calls.

Want to stop losing money in live poker? Track your hand history with PokerMemory

Flop 7♦ 8♦ 4♠ (19.5BB)

  • Hero checks
  • Villain bets 6.5BB (1/3 pot)

Versus this small of a flop bet, we should be able to continue with our range very often. The question is, should we call or raise ?

Read more »
12…16

Meng Xuan Xia

Blog posts on math, computer science, software development and NLP.

78 posts
5 categories
82 tags
RSS
Github
© 2013 – 2022 Meng Xuan Xia | 225k | 3:25