[{"content":"","date":"29 August 2025","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"I won’t write happy poems\nFor joy must pass, never stay.\nOur moments captured in rhythms\nBecome shadows swept away.\nShould full moon be the sign we recall,\nWe lose the beauty of its waxing light.\nIf every feast is saved for شَوَّال,\nThe years dissolve into ashes by night.\nI once wrote a happy poem\nOf the Muse who set my soul aflame.\nNow I only have my rhythms\nWhere love and tears remain unnamed.\nHappiness is a hideous tragedy\nFor no joy is ever carved in stone.\nSo play for me the heartiest melody\nBefore memories turn to ghosts unknown,\nThe only chorus is sorrow’s own.\n","date":"29 August 2025","externalUrl":null,"permalink":"/post/2025-08-29-part-ii-i-won-t-write-happy-poems/","section":"Posts","summary":"","title":"Part II: I won't write happy poems","type":"post"},{"content":"","date":"29 August 2025","externalUrl":null,"permalink":"/categories/poems/","section":"Categories","summary":"","title":"Poems","type":"categories"},{"content":"","date":"29 August 2025","externalUrl":null,"permalink":"/post/","section":"Posts","summary":"","title":"Posts","type":"post"},{"content":"","date":"29 August 2025","externalUrl":null,"permalink":"/tags/romance/","section":"Tags","summary":"","title":"Romance","type":"tags"},{"content":"","date":"29 August 2025","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"I am a full-stack clinician, currently working as a resident doctor and engineer in London. I am passionate about improving front-end patient care through back-end biomedicine, data science, and tech.\nI love reading, writing, and bouncing off ideas. You can read my analysis about myself here, and here is what I am doing now.\nView CV More about me ","date":"29 August 2025","externalUrl":null,"permalink":"/","section":"Timing Liu","summary":"","title":"Timing Liu","type":"page"},{"content":"Before the Greek statues,\nI lingered, held fast.\nThey kept a perfectness\nno breath could outlast.\nThen marble turned mortal,\na Muse out of stone.\nShe kissed, and the radiance\nwas hers to enthrone.\nWe met at a table,\ncandlelight on the floor;\nglass, laughter, and motion,\na soft, silver shore.\nThough light grew dimmer,\nher face outshone the crown;\ncold diamonds grew humbler,\ntheir fire was sinking down.\nWhere oceans lie jeweled\nin amethyst flame,\nher depths were concealed,\nno obsidian could claim.\nLong nights did their brewing,\naffection ripened through years;\na hush of old pressure,\nprosecco sparkled into spheres.\nThe seasons kept changing;\nbut one card stayed the same.\nThe Lovers kept drawing\nour old, heartful name.\nShe came, then the stillness\nkindled into flame,\na brief history of time,\nconstellations in her name.\nSo if this feels ancient,\nalready once known,\nit’s marble turned breathing,\na cosmos of our own.\n","date":"22 August 2025","externalUrl":null,"permalink":"/post/2025-08-29-part-i-white-stone/","section":"Posts","summary":"","title":"Part I: White stone","type":"post"},{"content":"\u0026ldquo;I’m ready to go.\u0026rdquo;\nThat afternoon, the patient looked at the sunlight spilling across the hospice floor and said quietly, “It’s about time.” He spoke calmly, as if describing his breakfast. Unlike my feelings toward an English breakfast, he did not cry, choke up, or show pain. He simply sat there. In that moment, I thought he looked like a child waiting for the school bus, knowing it had arrived and it was time to leave.\nI stood there, unsure what to say. I realised I had not yet learned how to bear the weight of a life.\nWhen a patient expresses a wish to end their life, modern medicine tells us to screen for depression. Yet the man before me was not escaping pain. He simply had nothing left worth waiting for.\nThe frightening thing is not death itself, but its uncertainty. Whether in Heidegger’s “being-toward-death” or the Stoics’ “living through death,” mortality is no stranger. Sometimes death even allows people to let go. I have seen a patient with depression whose symptoms eased after being diagnosed with late-stage cancer.\nThe real anxiety comes from knowing that night will fall, yet never hearing its approaching footsteps. If we knew it would arrive tomorrow, perhaps we could still persuade ourselves to savour today. Instead, it hides somewhere in an indefinite future.\nThere may be people to see or tasks to finish, yet uncertainty makes them hard to plan. The body grows weaker, and each day offers fewer things to do. It is like being a long-distance runner without a finish line, or a traveller waiting for a delayed train while the announcement repeats, “Thank you for your patience.”\nWhat follows is life’s “garbage time.” Usually, garbage time is harmless. There is always another chapter, and in the worst case, you can quit and try again. But the garbage time of life is like reading a serial novel you already know will end abruptly. Will you keep turning the pages, or stop?\nThat patient told us he hoped for a painless death. Painlessness is not difficult. Whether from breathlessness or internal bleeding, modern medicine can relieve suffering. But the final act of ending life is something we cannot do.\nI have often questioned the meaning of prolonging life when a patient has clearly given up the will to live. Yet what does “clearly” mean? Patients with depression are treated against their will. Those with anorexia are force-fed. We say their illness impairs judgment, but what we call illness is shaped by society’s shifting consensus on life and death.\nPalliative care, however, does not use many resources. These patients are not kept alive in the ICU, connected to endless machines. They are simply accompanied toward the end.\nIf doctors were allowed to end life, new questions would appear. Who qualifies? Only late-stage cancer? Mental illness? Who decides for those who cannot speak for themselves? There are no universal answers.\nPerhaps it is better to draw a clear line: a doctor’s duty is to prolong life while preserving dignity, not to choose its ending. This line must be guarded.\nThe meaning of life, however, can only be found by the patient. It might be beginning a new project, seeing the light on a flower petal, or simply sharing an embrace with a stranger.\nAs a doctor, I will guard a patient’s life within the limits of my profession.\nAs a fellow human being, I will step one small pace beyond that line to give him a hug, even if that is all I can offer.\n","date":"10 August 2025","externalUrl":null,"permalink":"/post/2025-08-10-goodbye/","section":"Posts","summary":"Thoughts on palliatative care","title":"Goodbye","type":"post"},{"content":"","date":"10 August 2025","externalUrl":null,"permalink":"/tags/medicine/","section":"Tags","summary":"","title":"Medicine","type":"tags"},{"content":"","date":"10 August 2025","externalUrl":null,"permalink":"/categories/thoughts/","section":"Categories","summary":"","title":"Thoughts","type":"categories"},{"content":"","date":"10 August 2025","externalUrl":null,"permalink":"/tags/thoughts/","section":"Tags","summary":"","title":"Thoughts","type":"tags"},{"content":"康河酿酒\n旧梦在沉浮里宿醉\n烟花绚烂\n映出黑夜无边\n仲夏的星座\n于老地方划开新伤痕\n我在燃尽的枝上\n耗光了火焰\n作者笔记 # 五月，是舞会的季节，是毕业的季节，是盛开的季节，也是告别的季节。我们分享的，是日历上不曾存在过的日子，是剑桥的五月，是童话的记忆，直到六月的到来。1\nEnglish Interpretation # As River Cam is brewed into wine,\nold dreams lie in drunken slumber in a punt,\nswaying between rise and fall.\nFireworks burst into brilliance,\nonly to reveal the endless dark.\nThe constellations of midsummer\ncut new scars across familiar skies.\nAnd I, upon branches burned to ash,\nhave spent the last of my flame.\nAuthor\u0026rsquo;s note: # May is the season of May Balls, the season of graduations, the season of bloom and farewell. Yet such days do not exist on the calendar, they live only in the Cambridge May, only in the fairytales of memory, as June comes.2\n剑桥五月舞会通常在六月份举行\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nMay Balls in Cambridge are usually held in June\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"1 June 2025","externalUrl":null,"permalink":"/post/2025-08-30-may/","section":"Posts","summary":"","title":"五月 May","type":"post"},{"content":"TL;DR: Let me know if I can be of any help.\nIf my skills could be useful to you, drop me an email at timingliu[at]outlook[dot]com with the subject: Service Sunday (symbols translated to English to avoid spammers). I will build a running to-do list and help as much as I can. Undone tasks will be attended to in the subsequent weeks. If you are here because you messaged me via other means, rest assured that your request will be taken care of, too.\nIn the email, please specify the importance and urgency of the task.\nDo note that because everyone only has 24 hours a day, I will prioritise services of the following nature:\nscalable (e.g. if you are asking for advice, can I write a blog post about it so that everyone can benefit) atomic (i.e. small, well-defined but impactful) reproducible: (i.e. can my services be passed on to help more people. The simplest thing to do is to let me know if you are keen to set up a similar scheme to help others) well-researched (there are so many information out there, so if the answer can be obtained from other sources (who are probably more authoritative than me), go for it) At the moment I will set aside one hour on Sunday to serve others and will adjust if needed. This also helps me to better focus during the week to become the more reliable and competent friend that you are looking for. Please let me know how I can help you.\nDid I forget anything? Oh yes. Charge. That is straightforward: you pay a flat fee of 0.\n- Service with honour1\nWhat I can and can\u0026rsquo;t do # Examples of what I can do: # evaluation/discussion of ideas publicity for your work (e.g. speaking at the MedTech Foundation ) introduce you to like-minded people What I (probably) can\u0026rsquo;t do within that time: # coding for a project My plate is full currently, but feel free to email me anyways. I might happen to be free then or I might introduce someone to you. that is my high school motto, by the way.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"9 July 2023","externalUrl":null,"permalink":"/post/2023-07-09-service-sunday/","section":"Posts","summary":"","title":"Service Sunday","type":"post"},{"content":"","date":"15 April 2023","externalUrl":null,"permalink":"/tags/alternative-career/","section":"Tags","summary":"","title":"Alternative Career","type":"tags"},{"content":"","date":"15 April 2023","externalUrl":null,"permalink":"/categories/career/","section":"Categories","summary":"","title":"Career","type":"categories"},{"content":"","date":"15 April 2023","externalUrl":null,"permalink":"/categories/conference/","section":"Categories","summary":"","title":"Conference","type":"categories"},{"content":"","date":"15 April 2023","externalUrl":null,"permalink":"/tags/conference/","section":"Tags","summary":"","title":"Conference","type":"tags"},{"content":"I will be at New Orleans 23 - 28 April to give an oral presentation at ARVO on retinal biomarkers for systemic diseases. Let\u0026rsquo;s meet up if you are around!\nHere is the presentation detail:\nRoom: Great Hall BC, New Orleans Ernest N. Morial Convention Center Presentation Start/End Time: 1:30 PM to 1:45 PM, 23 April Conference: Association for Research in Vision and Ophthalmology (ARVO) The work is supported by friends and colleagues at Moorfields Eye Hospital, London and UCL Institute of Ophthalmology. I hope you get to meet these amazing people, too!\n","date":"15 April 2023","externalUrl":null,"permalink":"/post/2023-04-15-conference-at-new-orleans-arvo-2023/","section":"Posts","summary":"Association for Research in Vision and Ophthalmology (ARVO)","title":"Conference at New Orleans: ARVO 2023","type":"post"},{"content":"After 7 months in clinical medicine, I have decided to stay on this career path.\nBecoming a doctor provides me with the opportunity to acquire the knowledge and skills to help people during their most vulnerable moments. Although there are other careers that also provide value to society, medicine is unique in its context. As a doctor, I can help minimize the harm that diseases could cause to individuals, which aligns perfectly with my stoic mindset. My life\u0026rsquo;s reward function is to \u0026ldquo;minimize the maximum loss,\u0026rdquo; and there is no greater loss than the loss of one\u0026rsquo;s health or life. Thus, being a doctor allows me to help minimize this loss in myself, my loved ones, and my patients. This is a significant factor in my decision to pursue medicine.\nSecondly, medicine is a fulfilling career due to the trust that people place in healthcare professionals. From day one of my clinical placement, I was astounded by the amount of trust that patients put in me as soon as I put on my healthcare uniform. They allowed me to perform procedures such as drawing blood, which is a sacred trust that I am determined to uphold to the best of my abilities. Additionally, there is a tremendous sense of accomplishment in empowering someone\u0026rsquo;s life.\nThirdly, a career in healthcare aligns with my life goals. Although a career in finance might offer a higher salary, that is not the only factor I consider when choosing a career. While I have the computational skills and interest to pursue algorithmic trading, arguably the path that gives the highest salary, I do not see myself pursuing that field for the rest of my life. My primary desire is to maximize my impact in the world, and healthcare provides me with the opportunity to see tangible outcomes of my work through patient outcomes and device development.\nFourthly, medicine is a financially sound career choice. Although a trader\u0026rsquo;s lifelong earnings may be higher than those of a doctor, becoming a trader is a selective path. In contrast, medicine is a safe career that offers a comparable salary to most financiers at the senior clinician level. Additionally, healthcare has tremendous potential for technological innovation that can provide large market value given its enormous size.\nIn conclusion, clinical medicine and healthcare innovation are fulfilling career paths that provide both personal and financial safety. As someone with a minimax mentality and a desire to make an impact in the world, becoming a doctor aligns perfectly with my values and goals.\nFor more context, see this post on my thoughts about leaving medicine.\n","date":"15 April 2023","externalUrl":null,"permalink":"/post/2023-04-15-why-i-am-still-in-healthcare/","section":"Posts","summary":"Why medicine is still the top career choice for me","title":"Thoughts about staying in medicine","type":"post"},{"content":"I run a small shop called \u0026ldquo;Pawnshop for Dreams,\u0026rdquo; and let me tell you, it\u0026rsquo;s not an easy job. People come here to sell their dreams for money, and sometimes listening to their stories can be heart-wrenching.\nBut I\u0026rsquo;ve also seen the other side of the coin. Some people come here to buy other people\u0026rsquo;s dreams. They\u0026rsquo;re usually wealthy individuals who have everything but still feel empty inside. They think buying someone else\u0026rsquo;s dream will fill that void.\nIt\u0026rsquo;s a cynical business, but it\u0026rsquo;s how I make a living. Besides, who am I to judge people\u0026rsquo;s actions?\nOne day, a man in an expensive suit and a luxury car walked into my shop. He wore a smug smile, as if he were superior to everyone else in the store.\n\u0026ldquo;I want to buy someone\u0026rsquo;s dream,\u0026rdquo; he said to me, flashing a wad of cash.\nI raised an eyebrow, not sure what kind of dream this man was looking for. Was he seeking fame, wealth, or something more personal?\nHe didn\u0026rsquo;t specify, but he seemed like the kind of person who wanted it all.\nI told him I had some dreams for sale, and he skimmed through them, eyeing most with disdain. He believed most of them were trivial or unrealistic, but suddenly, he found one that caught his eye.\nIt was a dream written by a teenager about love and happiness, just after going through a painful breakup. The man smiled, thinking he had found the perfect dream to buy.\nHe handed me the cash and left the store, feeling pleased and satisfied with his purchase.\nBut he didn\u0026rsquo;t know dreams aren\u0026rsquo;t like tangible goods. Dreams aren\u0026rsquo;t something you can hold in your hands.\nThe teenager who sold the dream of love and happiness lost everything. He thought selling his dream would help him move on from the breakup, but it only left him feeling emptier and lonelier.\nAnd as for the man who bought her dream? He later realized that money couldn\u0026rsquo;t buy true happiness, leaving him with a void that no material wealth could fill.\nAs for me, I continue to run \u0026ldquo;Pawnshop for Dreams,\u0026rdquo; knowing that this business is built on other people\u0026rsquo;s hopes and desires. But every time I see a customer leave the store, I can\u0026rsquo;t help but wonder if they made the right choice.\nI was inspired by the real-life experience of passing by a pawnshop in Cambridge. It struck me that the items being sold in the pawnshop carried a deeper meaning than just their physical value. Many of these items were earned through hard work and hope, representing the lives and dreams of the people who had to part with them out of necessity. This got me thinking, what if we could trade our hopes and dreams directly without the need for physical products as intermediaries? With the help from ChatGPT (13 Feb 2023 version), the initial version painted a romanticized picture of someone selling their dreams only to buy them back later in life. However, upon reflection, I felt that this version lacked the depth and complexity that the topic deserved. Instead, I have chosen to explore the emotional toll that such a transaction might take on the individuals involved and found this version more thought-provoking.\n我经营着一个名为“梦想当铺”的小店，这可不是一份容易的工作。人们会来这里卖掉自己的梦想换取钱，有时候，听他们倾诉的故事会让我感到很心痛。\n但我也见过另一面。有些人来这里买别人的梦想。他们通常是富有的人，他们拥有一切却还感到内心空虚。他们认为买到别人的梦想会填补这种空虚感。\n这是一个很愤世嫉俗的生意，但它能够让我谋生。何况，我又有什么资格去评判别人的行为呢？\n有一天，一个穿着一身精致西装开着一辆豪华汽车的男人走进了我的店。他面带傲慢的微笑，仿佛自己比店里的其他人都优越。\n“我想买一个人的梦想，”他对我说道，同时在我面前晃动着一沓钞票。\n我挑了挑眉，不知道这个男人想要什么样的梦想。他是在寻求名望、财富，还是别的什么更私人的东西？\n他没有具体说明，但他似乎是那种想要得到一切的人。\n我告诉他我有一些梦想出售，他一一过目，并用挑剔的眼神打发了大多数。他认为其中大多数都是琐碎或不切实际的，但是突然间他看中了一个。\n那是一个年轻人写下的关于爱和幸福的梦想，他刚刚经历了一次痛苦的分手。那个男人微笑着，认为他找到了完美的梦想来购买。\n他交给我现金，离开了商店，对自己的购买感到得意和满足。\n但他不知道，梦想不像商品一样可以买卖。梦想不是你可以拿在手中的有形物品。\n那个卖出爱和幸福梦想的年轻人却失去了一切。他认为出售梦想会帮助他从分手中走出来，但结果只让她感到更加空虚和孤独。\n而那个购买梦想的男人呢？他后来意识到金钱无法买到真正的幸福，留下了一种无法用任何物质财富填补的空虚感。\n至于我，我继续经营“梦想典当行”，知道这个生意建立在别人的希望和愿望之上。但每次看到一个客人离开商店，我都不禁想知道他们是否做出了正确的选择。\n","date":"12 March 2023","externalUrl":null,"permalink":"/post/2023-03-12-dream-pawnshop/","section":"Posts","summary":"A short story about that pawnshop for dreams","title":"Dream pawnshop","type":"post"},{"content":"","date":"12 March 2023","externalUrl":null,"permalink":"/categories/fiction/","section":"Categories","summary":"","title":"Fiction","type":"categories"},{"content":"","date":"18 February 2023","externalUrl":null,"permalink":"/categories/journal/","section":"Categories","summary":"","title":"Journal","type":"categories"},{"content":"","date":"18 February 2023","externalUrl":null,"permalink":"/journal/","section":"Journals","summary":"","title":"Journals","type":"journal"},{"content":" Week 8 # The algorithmic trading conference was a highlight. To see the interplay between quants, hedge fund, and asset management made me realise algorithms would probably not eat the world (just yet). It would still take a lot of effort for people that speak both langauges (ML and the domain of their application) to bring the two teams together. The languages that I speak are really machine learning and healthcare, so I asked a few technical questions during the talk, but it was super interesting to learn the parallels between finance and healthcare in terms of machine learning applications - how do you curate the data, and what are the practical considerations when algorithms are applied. I was surprised to learn the effect of regulations on machine learning development in finance.\nFor my personal projects, I have improved the model performance for project P quite a bit and throughout the process I have deepened my understanding for deep learning architectures in PyTorch. Constrasting it with the tidymodels in R was helpful for learning software design. Progress has also been made for project O, now that we have a plan on conduting genetic analysis.\n2023-02-26 # Target\nKaggle competitions 2023-02-25 # Target:\nReflection on past week and plan for the next 2023-02-24 # Target:\nProject P:\nDiscuss direction\nBuilt a regression model\nHang out with friends\n","date":"18 February 2023","externalUrl":null,"permalink":"/journal/2023/","section":"Journals","summary":"To-dos and progress in 2023","title":"Public journal 2023","type":"journal"},{"content":"Recently, I have been facing a number of issues. But instead of focusing on each problem, I have realized that it\u0026rsquo;s more important to focus on things that I can control to maintain my happiness. To help with this, I created a checklist of things that make me feel happy, such as maintaining healthy sleep hygiene, eating nutritious food, exercising, socializing, managing tasks, and meditating. I remind myself that if I haven\u0026rsquo;t completed everything on the checklist, it is futile to focus on any external problems. It\u0026rsquo;s true that some opportunities or relationships may not have worked out, but if I focus on my checklist, I will eventually enjoy the present more and be better prepared for the future. More importantly, I can live a good life without relying on any one thing in particular.\nIt\u0026rsquo;s important to remember that everyone has problems, and it\u0026rsquo;s a privilege to be able to devote our time and attention to them. As we take on more responsibilities in our personal and professional lives, others\u0026rsquo; priorities might take over. In either case, life is too short to focus on negatives. Instead, we should focus on what makes us happy - to pursue things we love and surround ourselves with people who care about us. Even though we might inevitably experience pain, it is still a choice whether to suffer from them, or simply to appreciate what life has to offer. Life can be that bitter expresso, but someone would enjoy the fragrance that comes with the bitterness.\n","date":"13 November 2022","externalUrl":null,"permalink":"/post/2022-11-13-the-pursuit-of-happyness/","section":"Posts","summary":"Focusing on well-being maintenance","title":"The pursuit of happiness","type":"post"},{"content":"At present, the landscape of medical innovations is fragmented. Scientists produce discoveries that take a long time to benefit bedside care; technicians might not fully grasp the patient needs, and business professionals face challenges in gaining trust for their social enterprises; clinicians could struggle to articulate practical product design. This must change.\nMany clinicians are typically presented of the two main career paths: to stay in the clinical route and pursue clinical excellence, or to leave medicine and work as a biomedical scientist or consultant. Integrating these paths is often hindered by administrative difficulties, lengthy training years, and poor work-life balance. It is a pity. This must change.\nThe concept of \u0026ldquo;full-stack clinician\u0026rdquo;1 came to mind: someone who is skilled and knowledgeable in the back-end of biomedical science, the media of software and hardware technology, and the front-end of clinical management - all strung together by lean business development strategies.\nPerhaps, it feels like just another synonym for clinician-scientist/entrepreneur/engineer, but it is hard to ressit the excitement of integrating multiple domains to develop a minimum viable product that ultimately pushes medicine forward. Unlike any of the clinician- terms above, the role of full-stack clinicians stands from the overall development cycles of medical innovations. Our future full-stack clinicians should be proficient in science and technology without succumbing to feature creep, understand the impact of capitals but look beyond profits, and be familiar with clinical management without being accustomed to its issues.\nIt takes the whole medical tribe to raise full-stack clinicians. It requires a paradigm-shifting change in our medical education, both pre- and post-graduation; our healthcare systems must adopt a mindset more akin to that of technology firms, embracing innovation at every turn. Most importantly, a group of clinicians must rise to the challenge, build a community, and drive the necessary change.\nYes, change will come in the long run, but how long can we wait? We must act now to prevent our fragmented healthcare system from being repeatedly overwhelmed by global pandemics, to protect our healthcare data from exploitation by unethical firms, and to address the lack of effective innovation in our field. As John Maynard Keynes famously said, \u0026ldquo;In the long run, we are all dead.\u0026rdquo;\nThe change must happen within us.\nLet us bring about the change.\nThe term \u0026ldquo;full-stack\u0026rdquo; comes from the field of computer science, where a \u0026ldquo;stack\u0026rdquo; represents the assortment of technical components needed to complete a task. Being a full-stack developer signifies the ability to handle both back-end server-side and front-end client-side programming. I do full-stack development, too, because understanding the technology is necessary to link biomedicine and bedside care.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"3 August 2022","externalUrl":null,"permalink":"/post/2022-08-03-a-case-for-the-full-stack-clinicians/","section":"Posts","summary":"Build a community of clinicians with various skills","title":"A case for the full-stack clinicians","type":"post"},{"content":"","date":"3 August 2022","externalUrl":null,"permalink":"/tags/full-stack/","section":"Tags","summary":"","title":"Full-Stack","type":"tags"},{"content":"I spent three years trying to get into medicine, two years learning it, and the past one year thinking about leaving it.\nok the real life was not so drama, but I needed a good intro ;)\nLearning potential and work-life # I want to prioritize learning skills, improving myself and accumulating career capital, at least in the early part of my career. However, as I went through the clinical school curriculum, I realised that a large chunk of time would have to be spent on rote memorization. To me, memorization is often the least useful way of learning, especially of random details that are not organised in a systematic way (such as the various numbers in clinical guidelines). I know I will easily forget about them in the future if I do not choose the clinical speciality, and no trace of my effort will be left. In contrast, informatics projects are built on top of each other; even if some details were forgotten, the projects could be made into products with actual benefits, and live forever in my portfolio.\nEven if I decide to finish medical school, I am not sure about medicine as a full-time career. A big chunk of being a doctor is mundane paperwork that provides little room for growth. I am also worried about the opportunity for developing interpersonal relationships in medicine. There is a clear professional boundary between doctors and patients. As I value developing long-term friendships, this might be another pull away from medicine (maybe less of a problem for private practice). Should I specialise, if I am interested in digital medicine? Specialization is great in making an expert but experts can be blinded from other aspects of healthcare. It is nice to have a hammer, but not every problem is a nail.\nThe broader context of decision-making # I must consider the broader context that influences my thoughts. The decision to study medicine was my own, but it must have been guided partly by people around me. It is difficult for me at age 16 to know exactly what career I want. Even if some students saw the mundane side of medicine, it seemed bearable since students were also learning things mostly for the sake of getting selected into a good undergraduate course. However, the university gives me the freedom to explore subjects like engineering and to be surrounded by Olympiad gold medalists who had chosen a subject that improved their thinking and not just knowledge. That made a world\u0026rsquo;s difference in skills and career adaptability - even just after two years of training. They can analyze problems with partial differential equations, and I got acquaintance with Sir Krebs and his amazing cycle that I have also forgotten. On the other hand, leaving medicine has become a fad because of the boom of entrepreneurship and content creation, so I might have been subconsciously encouraged.\nPays # Of course, I need to care about my standard of living. As a student, I find myself stressed about money from time to time. All I want is a job that provides enough income so that I can focus on what I enjoy the most (which can be my work). As my Engineering friends graduated, reality crept in. Some of them are getting jobs at finance firms with £200k+ starting salaries and planning to retire at 30, and some get jobs at software firms with (more standard) £60-80k. I did not maximize my earning potential by shopping around for jobs, so my summer\u0026rsquo;s data science internship pay in the public sector is at the lower end, but it is already higher than a junior doctor\u0026rsquo;s pay. These pay discrepancies across different sectors frustrate me because the type of work they do is mostly the same. In fact, I would argue that firms that pay better are also more established and therefore offer better career training pathways - in other words, they learn faster (at least at particular skills). The tech firms are also much more transparent and results-driven - again, better for self-improvement. So why on earth would someone want to spend three years and £180k+ international medical student fees to start a job that\u0026rsquo;s paid less and offers less learning?\nThe bright side # And yes, there are reasons why one would do that. For one, learning medicine can (sometimes) be really fun. Even when I go to the hospital as a patient, whenever I introduce myself as a medical student, the doctors are all super excited about teaching me, and I really enjoy the clinical reasoning and decision-making. Medicine can also be really fulfilling (sometimes, also in the right speciality). I can never forget the time when I was still young and impressionable - when I pushed a patient back to his family and the joy flowing through my blood by knowing that the patient can probably live 10 years longer because of an afternoon\u0026rsquo;s work by the surgeon. This level of human touch and trust is rare. Besides, medicine can allow for more autonomy as compared to corporate jobs after age 30, once one becomes a senior doctor and starts their own private practice. Moreover, I cannot ignore that medicine is a really safe career option - the kind of safety which one could rely upon even during a world war. I mean, if I were to be put into a concentration camp, hopefully, I would still be given the potatoes in the soup if I were a doctor whom the guards would need. This kind of safety, thinking as a financer, should make up the majority of one\u0026rsquo;s portfolio. Then one can add entrepreneurship as a high-risk high-return kind of endeavour. Last but not least, while going into finance will probably make the most money, it is harder to visualize the actual impact as compared to building a startup. And if I still want to work on health tech, perhaps getting to know the healthcare system a bit more will be a better idea. Of course, I have to think about how much clinical medicine I need to know for what they want to do. Training till 80 will probably give me the most clinical insights, but is this really what I want?\nMaking a career that I want # Of course, one may cry (myself included), what exactly do I want? This is exactly the problem. I know I want to make good healthcare available to the mass on demand, but I do not know how to get there. I believe it needs someone or a team with scientific, technical, clinical, and business skills, but what is the right mix? Sadly, no company puts up advertisements to hire a business-minded graduate with both medical and engineering degrees - which would exactly match my profiles. Wait a minute, maybe that is where a problem can also be an opportunity. No pre-made job for my profile is disappointing, but it indicates an opportunity for innovation. Someone needs to marry data science into healthcare and do it at scale so that my dream jobs can be created. Maybe that person can be me :)\nMarket opportunities and career training come hand-in-hand. A great job market does not live independently from a great market. When we build attractive health tech ventures as healthcare providers, someone will develop a new way of training clinicians with technical skills with less emphasis on rote learning, and someone will offer the trainees my dream jobs on demand. But it will not be that exciting anymore, since the groundwork has been laid. Such a career will also NOT be that secure anymore: if someone can be trained by a system, they can also be replaced by the system.\nFinishing thoughts # So yes, there are a lot of factors to get my head around: learning, work-life, pay, and impact. Decision-making would have been easy if we could predict the future. But prediction is hard, especially about the future :P.\nMy current plan is to go to clinical school to learn enough clinical insights to be useful as a clinician in interdisciplinary collaborations, and to become familiar with the healthcare system for future entrepreneurship. I have never let schools dictate my education, so I will carefully examine what I need to learn and learn them well. While queuing in the medical career path, Meanwhile, I will work on informatics projects with real-world impact - I expect these to take off but am not exactly sure when, and perhaps another decision needs to be made when that happens.\n","date":"3 August 2022","externalUrl":null,"permalink":"/post/2022-08-03-thoughts-about-leaving-medicine/","section":"Posts","summary":"TL;DR: I am not leaving yet","title":"Thoughts about leaving medicine","type":"post"},{"content":"","date":"18 January 2022","externalUrl":null,"permalink":"/tags/entrepreneur/","section":"Tags","summary":"","title":"Entrepreneur","type":"tags"},{"content":"I think entrepreneurship is a subject where no rules can be derived for success. So I rely on these principles for elimination. Most ideas were borrowed from the great minds in the footnotes.\nSolve a problem that you face yourself1 Do not work full-time on something until your customers ask you to1 No \u0026ldquo;marketing\u0026rdquo; until your first customers do it for you1 Optimize for each customers\u0026rsquo; experience before optimizing for scale (e.g. investment, workflow)2 Monopolies (e.g. Google) create their own market and draw analogies to existing industries; homogeneous firms fake niches by drawing intersections of existing markets3 Have a secure career back-up4 If prototyping allows you to learn, stop hesitating and strategizing. Keep building until it becomes too easy Before selling, know how it was built, even if you do not have the skills to build it yourself Successes are random; failures are deterministic - learn from (others\u0026rsquo;) failures5 Innovation is about iterations6 Ideas are worthless without good execution1 Invest in a bonded and capable team, rather than a single idea that may have to be pivoted Inverse. Solve or prevent a problem is better than (over-)optimizing an existing solution7 Derek Sivers\u0026#160;\u0026#x21a9;\u0026#xfe0e;\u0026#160;\u0026#x21a9;\u0026#xfe0e;\u0026#160;\u0026#x21a9;\u0026#xfe0e;\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nPaul Graham\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nPeter Thiel\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nAdam Grant\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nJack Ma\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nMatt Ridley\u0026#160;\u0026#x21a9;\u0026#xfe0e;\nCharlie Munger\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"18 January 2022","externalUrl":null,"permalink":"/post/2022-01-18-my-principles-of-entrepreneurship/","section":"Posts","summary":"How to solve a problem worth solving","title":"My principles of entrepreneurship","type":"post"},{"content":"Nothing triggers impostor syndrome more than going through the final year of a degree knowing (nearly) nothing beforehand. This is how I felt during my first week as a third-year engineer at Cambridge.\nFor this academic year, I am doing what the other 200+ students at Cambridge are doing: completing a BA degree in engineering. What is different is that I have not done the first two years of the course. Everything is new to me. In the past term, I took five modules with examinable credits, but I also audited two more related modules at Cambridge and some courses available online to catch up on prerequisite knowledge and deepen my understanding.\nUpdates: I finished the BA engineering in the top 1/3 and my machine learning project was awarded the top project of the cohort. It has been a difficult journey, but was definitely worthwhile. Please contact me for any project advice.\nInformation engineering # Signal processing and information theory # Information engineering is at the intersection of electrical engineering, computer science, and mathematics. The information engineering modules this year tackle signals and how we process them using statistical tools. I am interested in this field because it provides a perspective of looking at machine learning algorithms as a way to encode and decode the signal and distinguish them from noise. Many well-respected machine learning researchers like Mihaela van der Schaar have backgrounds in this field.\nThe reason why information engineering has such wide applications is that virtually everything we are concerned with has some form of information. When we measure the information with one metric and observe how it changes with another metric, we get a signal. A signal describes how some variables change with another variable. When we study \u0026ldquo;how it changes\u0026rdquo; from the perspective of the sender, we use random process from probability theory. When we study the same how question from the perspective of the receiver, we use estimation and inference from the field of statistics. The distinction between the sender and receiver lies in the fact that only the sender has perfect information of the signal, and the job of the receiver is to infer what the signal is. Receivers may also want to ask \u0026ldquo;whether there is a signal\u0026rdquo; with detection theory and recover the information by using noise filters.\nSignals contain information, and can eventually influence a system that we are interested in. To study how this interaction works, we investigate the transfer function of the system. Sometimes the signal can destabilize the system. For example, wind can be seen as a signal correlating force with space-time, and it can destroy a poorly-built bridge, which is the system that we are interested in. The field concerns with this are control theory.\nOther times, we want to represent one source of information in other forms, so we encode the information in an efficient, compressed way, communicate the information through a channel that may distort our message, and try to decode them probabilistically afterwards. We also want to quantify \u0026ldquo;how much\u0026rdquo; information there is. Information theory allows us to do this.\nThat is pretty much what has been covered in information engineering so far. For many topics, the properties of continuous (e.g. how blood pressure varies with time) and discrete (e.g. how blood pressure differs between 9 am and 9 pm) are different, so we need to study them in parallel.\nI completed three projects for information engineering. In the first project, I designed and implemented a compressor using adaptive and contextual compression. In the second project, I studied a few techniques in probability theory, including histogramming \u0026amp; kernel density estimate, Monte Carlo simulation, Jacobian transform, and generation Laplacian and student-t distribution from a scaled normal distribution. In the third project, I studied requirements to stabilize an air-plane and implemented an auto-pilot system.\nInference # I studied two more modules in Information Engineering. The first module is called Inference, covering the mathematics of basic machine learning techniques, including regression (linear and Bayesian regression), classification, clustering (K-means and EM algorithm), dimensionality reduction, and sequence modelling (Markov and Hidden Markov models for discrete (N-gram) and continuous (AR) data, the Kalman filter, and forward algorithm). The lectures were well-motivated and enjoyable. In the project, I developed a classification algorithm using radial basis function kernels.\nMedical imaging and computer graphics # The second module is on medical imaging and computer graphics. According to a friend whose acquaintances were involved in developing the course, it was made up of three courses\u0026rsquo; worth of materials. The first part covers the physics and engineering details of medical imaging techniques such as X-ray, CT, MRI, nuclear imaging, and ultrasound. The conceptual framework for each imaging modules include 1. what properties are detected, 2. how are such properties stored in signals, and 3. how are these signals processed. The mathematical treatment is very rigorous - one has to understand the details of concepts like the back-projection theorem and iterative reconstruction technique.\nThe second part covers how do 3D data get stored in the computers. The questions covered include how do we store points efficiently, how to form lines and surfaces using parametric equations, how to create isosurfaces using various algorithms like thresholding and marching cubes. Since there is always ambiguity in data capture, how do we interpolate data using equations like B-spline and algorithms like distance transforms, and lastly the engineering details of how do we directly capture 3D data using a scanner.\nThe last part of the course concerns how do we render the stored data effectively. Shape-wise, this concerns perspective projection, clipping, and viewing systems. Color/light-wise, we learned the Phong reflection model, rasterisation, shading (flat, Phong and Gouraud shading) and determining depth and shadow using z-buffers. We also touched on other techniques like texture mapping, ray tracing and volume rendering, and the mechanisms of graphics hardware.\nIn the project, I implemented the above concepts in C#.\nBiological and medical engineering # Biomaterials (medical device engineering) # From drug delivery, tissue engineering, and implant to device regulation, this covers a wide range of topics in medical technology. Yet, the depth of the topics is by no means compromised, as we learned how to use mathematical models for the mechanical and chemical properties of the device.\nIn the project, I investigated the gelling, absorptive, and mechanical properties of different types of the hydrogel.\nMolecular engineering (synthetic biology) # Initially, I thought this would be an \u0026ldquo;easy\u0026rdquo; module given I have studied biochemistry and worked as a geneticist. However, the paradigm is very different in engineering. The focus of the engineering course is on how we can utilize biological systems. Delving deep into using biological systems to build synthetic circuits or to use DNA as information storage is simply fascinating.\nIn the project, I designed a COVID-19 vaccine and test based on the RNA sequence of the virus.\nComputational neuroscience # The first few lectures covered the basics of neuroscience, from synapses to electrical conduction. The part on decision making and reinforcement learning is fascinating, as it draws parallels between the biological algorithms (e.g. dopamine) to mathematical reward functions currently used in reinforcement learning (e.g. how to estimate the total reward given the observed reward). The project uses the principle component analysis and a cost function to model visual cortex mechanisms, which again is very interesting.\nMathematical physiology # An extensive and challenging module covering the mathematical modelling of many physiological and biological mechanisms, from molecular diffusion, osmosis, enzyme reaction on the micro level to electrophysiology, fluid dynamics, and ventilation on the macro level. This module involves a lot of mathematical proofs involving partial differential equations and assumptions involving biological understanding. The most interesting part of the module is to see the interplay of mechanisms. For example, molecular diffusion and fluid dynamics during gas exchange.\nMangement modules from Judge Business School # Modelling risk # This module involves operation management, decision making, portfolio theory and forcasting. I took away many useful concepts (e.g. how variability affects queuing, how variance can be a representation for risks). Overall a very interesting module.\nProject work # Machine learning # A reinforcement learning project where data is obtained from a physical simulator of the cart-pole system. The aim of the project is to 1. model the cart-pole dynamics using linear regression and kernel regression; 2. Control the cart pole using \u0026ldquo;controller\u0026rdquo; that can exert a horizontal force of a certain magnitude at a given time as spcified by the controller function. The task is to optimize the controller function based on data collected from 2a. the observed dynamics or 2b. the fitted model from part 1 so that the pole can stay vertical above. 3. Optimize the model performance with observed or dynamical noise.\nComputer graphics # During the first half of the project, I developed algorithms that reconstruct the raw data collected from computed tomography (CT) to images through Radon transform, Fourier transform, filtering, and calibration. In the second half the project, a reconstructed image was given and we were involved with reconstruction (under parallel beam assumption), 3D visualization, modelling, and printing of the image data for the purpose of designing lung transplant.\nConclusion # Overall, it has been a very challenging journey to juggle understanding concepts, finishing problem sets, and completing projects. However, it is invaluable to have developed the confidence in dealing with quantitative subjects, and the perspective of looking at any problem from an engineer\u0026rsquo;s eyes.\n","date":"1 January 2022","externalUrl":null,"permalink":"/post/2022-01-01-engineering-my-way-to-engineering/","section":"Posts","summary":"Reflection on my engineering journey at Cambridge","title":"Engineering my way to Engineering","type":"post"},{"content":"Hi friends,\nHope you have had a great start to the new year.\nI sent my appreciation over the New Year and I am surprised to find out the huge impact it had on my well-being.\nI had considered myself somewhat a self-made man in the past: born in an under-developed Chinese town, I won a scholarship to study at Singapore, where I worked hard and eventually got a place to study medicine at Cambridge. On the surface, the odds were not in my favour: the scholarship required me to outcompete hundreds of brightest students from 13 cities, and the admission rate was about 1/1000 for international students to get into medicine at Cambridge. There was some hard work involved: during my last year in high school, weekends were all I got for curricular work, as I spent all the time outside a class on my research. There was a lot of uncertainty as to whether this would help with my university application. I was extremely anxious over those days but my experience did stand out and I got a place.\nThat is enough self-pitying. Through writing those appreciation letters I was reminded again just how important other people are for my achievements. During the time I struggled most, I had a very supportive supervisor who guided me through my research journey. I was hugely supported by my friends and teachers and even the school system changed in my favour - coincidentally, of course. My year was the first year when the students were no longer ranked based on their percentiles for the internal exams, and this gave me enough assurance that I could spend more time on my research. Without their support and these random happenings. I might never have been where I am today. I am not saying that I have come a long way, but I do know that in each step I have been supported and inspired by people around me.\nYes, there were odds against me and I had to work harder than others sometimes to get what I want. I appreciate how those experiences shaped my character but let us not forget how fortunate we already are. I am not a self-made man and I never will be. I am writing these because I want you to remind me. If ever I recall those memories and lamented how challenging my life was, I hope you could cut me off and tell me just equally how lucky I was. We are not entitled to anything just because we worked hard for it; I cannot thank enough what life has graciously offered to me.\n","date":"1 January 2022","externalUrl":null,"permalink":"/post/2022-01-01-the-myth-of-being-self-made/","section":"Posts","summary":"Without the support and inspirations from others, I will never be where I am","title":"The myth of being self-made","type":"post"},{"content":"","date":"25 December 2021","externalUrl":null,"permalink":"/post/2021-12-25-full-stack-clinician-curriculum/","section":"Posts","summary":"","title":"Full-stack clinician curriculum","type":"post"},{"content":"","date":"19 December 2021","externalUrl":null,"permalink":"/categories/data-science/","section":"Categories","summary":"","title":"Data Science","type":"categories"},{"content":"","date":"19 December 2021","externalUrl":null,"permalink":"/tags/desktop-programming/","section":"Tags","summary":"","title":"Desktop Programming","type":"tags"},{"content":"","date":"19 December 2021","externalUrl":null,"permalink":"/tags/os/","section":"Tags","summary":"","title":"Os","type":"tags"},{"content":"","date":"19 December 2021","externalUrl":null,"permalink":"/tags/quantified-self/","section":"Tags","summary":"","title":"Quantified Self","type":"tags"},{"content":" Objective Set up a desktop notification programme that prompts self-reflective questions. The answers will be logged into ActivityWatch for later analysis with other data to identify how my internal state (e.g. peace of mind) is linked to my computer activities.\nMethods System information Windows 10 Powershell ActivityWatch 0.11.0 Software requirement Install aw-watcher-ask First, create a new python virtual environment (here I used conda) with python installed. Then, follow the instructions on the aw-watcher-ask repoistory and install the package and relevant dependencies with pip: python -m pip install git+https://github.com/bcbernardo/aw-watcher-ask.git.\nCaveats Here all python libraries required to call the package has been installed, but it still needs the interface, zenity, to start desktop notification. When zenity is not installed, the python library pyzenity will attempt to install the package by provoking sudo rights (not a good practice). This will require sudo rights on a UNIX based computer, and will prompt an error message because sudo is not available in Powershell. To verify this error:\n\u0026gt; python Python 3.10.0 | packaged by conda-forge | (default, Nov 10 2021, 13:20:59) [MSC v.1916 64 bit (AMD64)] on win32 Type \u0026quot;help\u0026quot;, \u0026quot;copyright\u0026quot;, \u0026quot;credits\u0026quot; or \u0026quot;license\u0026quot; for more information. \u0026gt;\u0026gt;\u0026gt; import zenity \u0026gt;\u0026gt;\u0026gt; zenity.show() \u0026#39;sudo\u0026#39; is not recognized as an internal or external command, operable program or batch file. False Set up Zenity First, download the latest release of go port zenity from here. Then, add the directory containing the .exe file to Powershell path by $env:Path+= \";C:\\path_to_exe\" (customize here). This will tell pyzenity where zenity is so it will not attempt to install zenity on its own.\nConclusion All done! Now you should be able to run aw-watcher-ask with commands specified on this page.\nAcknowledgement Thanks to Bernardo and Nuno’s help in building the software and troubleshooting the setup.\nOther (unsuccessful) attempts Windows Subsystem Linux 2 Although the go port zenity supports WSL, the aw-watcher-ask installed in the WSL2 environment will not be able to communicate with the localhost port that ActivityWatch runs on. One needs to open the Windows port and make WSL2 recognises the Windows port. I did not follow through with this path because I am not confident whether it will work eventually (because the watcher and ActivityWatch) will run in different systems. It might be more straightforward in WSL1 because it shares the same localhost with Windows.\n","date":"19 December 2021","externalUrl":null,"permalink":"/post/2021-12-19-setting-up-zenity-with-windows-python-go/","section":"Posts","summary":"Ask my computer to ask me questions","title":"Setting up ActivityWatch Watcher-ask on Windows","type":"post"},{"content":"","date":"19 December 2021","externalUrl":null,"permalink":"/categories/software-engineering/","section":"Categories","summary":"","title":"Software Engineering","type":"categories"},{"content":"","date":"27 August 2021","externalUrl":null,"permalink":"/tags/communication/","section":"Tags","summary":"","title":"Communication","type":"tags"},{"content":"Political correctness distorts our reality. It does not help anyone.\nWe can discuss politically incorrect topics without hurting anyone if we are emotionally minded.\nBefore discussing these topics, we can build as much consensus as possible. This includes the purpose of discussion, consensual facts and common values we all uphold, and the emotions surrounding the topic. This helps us to remove the existing biases associated with the sensitive topics and encourages people to focus on the problem, not position.\nAny discussion about group differences can sensitive. Therefore, before discussing them, we should establish:\nwhy we are discussing them: if our end goal is to ensure everyone has the best opportunity to succeed, we need to recognise potential differences to personalize our education, healthcare, social services to ensure equity consensual facts: any differences in group average are likely to be much less than the differences within groups the category of discussion is only one factor of a much complex picture the category of discussion is potentially a social construct and are never deterministic of individual outcome common values: we all share values such as social justice, fairness, and truthfulness emotions: share our emotions when hearing about this topic wheel of emotions I have found such conversations effective on many occasions. Such conversations are getting rarer and rarer on the internet: we are compelled to self-censor, to state our positions in echo chambers that support us, and to argue for agreement, not understanding.\nLet\u0026rsquo;s be emotionally correct instead. Beneath our different political inclinations, we will find shared humanity and values.\n","date":"27 August 2021","externalUrl":null,"permalink":"/post/2021-08-27-let-s-be-emotionally-correct-instead/","section":"Posts","summary":"We can discuss politically incorrect topics without hurting anyone if we are emotionally minded.","title":"Let's be emotionally correct instead","type":"post"},{"content":"We cannot find most solutions through discussions.\nI have two criteria on whether a problem can be solved through discussions: 1. convergence test: do the conclusions converge by discussing with more people; 2. singleton test: whether the problem would still exist if I were the only person on earth.\nThis post will address the converge test. In machine learning, many algorithms look for the global optima, a point where errors are minimized. This is recognised as a solution to the problem. In science, we set up questions, experiments, and debates, hoping we are approaching truth in the process. Through these discussions, we either find one person\u0026rsquo;s theory closer to the possible truth; or, we seek a unifying theory that explains both observations. In both cases, we reach a local optimum that is closer to the global optimum.\nHowever, many problems in life, like relationships, do not have optima. Your conclusion converges at different points depending on who you are talking to and they are equally valid. There is no point where everyone can agree on. If some topics fail the convergent test, you will find your understanding about this issue keep turning around in a circle and there is no final answer. Therefore, we must realise that when we discuss a non-convergent problem, we are not looking for a solution. We are asking for the other person\u0026rsquo;s experience with that problem, with a sample size of 1. It is an extreme case of Wittgenstein\u0026rsquo;s Ruler - we are seeking to understand the person much more than understanding the problem.\nP.S. Though this post is about discussions, the same thinking can be applied to learning, if we consider learning as an asynchronous discussion between authors and us.\n","date":"21 August 2021","externalUrl":null,"permalink":"/post/2021-08-21-problems-without-global-optima/","section":"Posts","summary":"We cannot find most solutions through discussions.","title":"\"Futile\" discussions ","type":"post"},{"content":"","date":"21 August 2021","externalUrl":null,"permalink":"/tags/philosophy/","section":"Tags","summary":"","title":"Philosophy","type":"tags"},{"content":"Here is the personal statement that I used to apply to Cambridge. I removed sensitive information (about others) in []. Huge thanks to people1 who helped me proof-read this essay and I hope this helps you in pursuing your dreams.\n[INTRO]\nMedical science enthralls me for it integrates many fields to provide wide clinical applications: basic physical properties like nuclear decay are used in Tc99 to diagnose embolism. Each stage in the complex chemical reactions behind biological processes can be utilised to treat diseases. This is seen in how inhibiting production of a single folic acid intermediate, dihydropteroate, can kill microorganisms. On a macro level, a simple act of tilting to abduct shoulder can be used to diagnose conditions in the supraspinatus, which I learnt during Anatomy Challenge and internship at orthopaedic clinics. To me, the greatest gain was to realise my passion in various chemical and mechanical workings behind our fine biological structures and their applications.\nUnsatisfied by reading theories, I went on to explore sciences through research projects. Honoured to be the only student from my school chosen for NUS\u0026rsquo;s research programme, I exploited the opportunity to [improve neurogenetic diagnosis]. I learnt to design primers that produce DNA strands of different lengths to overcome failures in replicating the AFF2 gene to diagnose Fragile XE and X Syndrome. Although experiments did not work well at first due to minor procedural errors, I persisted to perfect my lab skills to obtain more reliable results. When I emerged as the 2nd runner-up in NUS Chemistry Practical Challenge, I proved my dexterity and meticulousness by transferring my biomedical experimental techniques under time constraints. After completing the first project, I delved further with more independence by self-learning bioinformatics and exploring molecular diagnoses with Nanopore Sequencing, where I designed my own protocols and reagents. Presenting my Gold-award project at the Singapore Science Engineering Fair and International Researchers Club\u0026rsquo;s Conference not only improved my scientific communication skills, but also confirmed my career choice as a clinician scientist to contribute to push the frontiers of science.\nMedical science is exciting, but only meaningful when aptly applied to benefit the public. I learnt the clinical side of medical science in biweekly hospital volunteering: I coordinated with volunteers and engaged patients with cognitive activities to prevent delirium. It not only bettered my interpersonal skills, but also enlightened me on how simple clinical procedures like orientation can reduce post-operative complications. As a certified CPR AED instructor, I observed how attentive trainees were when I lectured how AED resuscitates, which taught me the importance to bring the science to application. When working at SG Hospital as a research associate, I learnt how statistical tools like KM estimator helps decision making. With observation in Chinese hospitals where herbs began to be used in evidence-based ways, the various ways to improve medical sciences inspired me. This resonated with my literature research and observation on improved cardiologic treatments: although interventions can be physically exhausting, they are all worthwhile for they prolong patients\u0026rsquo; lives. When I saw the patients discharged from the hospital brimming with hopes for a better life in front of them, I thought to myself, nothing can be more gratifying than an opportunity to study medicine, not just at as a degree, but as a lifelong commitment.\nEND\nThat is it. It is not a perfect personal statement but the authentic version is probably more useful than a better edited one that I would have written now.\nPeihao Xu, Kaiwen Wang, Kevin Sim, Yezhou Li, Huiting Liu\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"5 August 2021","externalUrl":null,"permalink":"/post/2021-08-05-personal-statement-that-got-me-into-cambridge/","section":"Posts","summary":"","title":"Personal statement that got me into Cambridge","type":"post"},{"content":"","date":"5 August 2021","externalUrl":null,"permalink":"/categories/university-admission/","section":"Categories","summary":"","title":"University Admission","type":"categories"},{"content":"Instead of one single mission, I would like to think of my \u0026ldquo;passions\u0026rdquo; as many possible futures that I want to live in. Here is a list of them:\nDigital Healthcare architect Building a data-driven healthcare system integrating multi-omic, clinical, and lifestyle data, in a privacy-preserving way, to improve medical research and patient outcome. We have the individual components now, but we still need to build the operating system. This is the goal that I am working on. Other possible, non-exclusive futures: Surgeon Practitioner of genome medicine (in the safest way) Engineer for computer-brain interface Developer of data science software Student of languages and cultures Teacher in the rural developing world Violin and tango instructor Sichuan cuisine chef Monk Devoted family member Space (and time!) traveller ","date":"24 July 2021","externalUrl":null,"permalink":"/futures/","section":"Timing Liu","summary":"","title":"Possible futures","type":"page"},{"content":"","date":"14 July 2021","externalUrl":null,"permalink":"/tags/conda/","section":"Tags","summary":"","title":"Conda","type":"tags"},{"content":" Export environment # conda env export \u0026gt; environment.yml\nRecreate environment # conda env create --name/--proxy xxx --file environment.yml\n","date":"14 July 2021","externalUrl":null,"permalink":"/post/2021-07-14-conda-command-to-live-by/","section":"Posts","summary":"","title":"Conda command to live by","type":"post"},{"content":"","date":"1 July 2021","externalUrl":null,"permalink":"/talks/","section":"Recent \u0026 Upcoming Talks","summary":"","title":"Recent \u0026 Upcoming Talks","type":"talks"},{"content":"Presentation at Sanger Institute\nEvent: Wellcome Sanger Institute · Location: Cambridge, United Kingdom\nSlides\n","date":"1 July 2021","externalUrl":null,"permalink":"/talks/2021_07_journal_club/","section":"Recent \u0026 Upcoming Talks","summary":"","title":"UKBioBank exome imputation and variant association","type":"talks"},{"content":" My first paper is now published. It has been more than four years since I started on this project and I am thrilled to see its fruition.\nI remember asking myself this question in the year leading up to A levels: if I have only one year of life left, would I still want to work on this project? The answer was yes. As workaholic as it may sound, I hope my life could be part of some bigger cause - like improving the diagnosis of genetic diseases in this case. I guess this would be a good rule-of-thumb for me: the only reason to do something is that it adds meaning to life.\nWhat I said after Singapore Science and Engineering Fair 2018 still resonates: the biggest takeaway from the journey so far is perhaps, what matters most in the end is not the results, but the passion and people around. In this way, regardless what the results are, one person will have no regret for they never harm their own or others’ lives, and no fear for the future because the passion and people are still accompanying them for the challenges ahead.\nReally really grateful for all my mentors, teachers, friends \u0026amp; family who support me directly and indirectly throughout my research journey, which has by no means ended.\n","date":"27 June 2021","externalUrl":null,"permalink":"/post/2021-06-27-my-first-paper/","section":"Posts","summary":"","title":"My first paper","type":"post"},{"content":"","date":"27 June 2021","externalUrl":null,"permalink":"/tags/research/","section":"Tags","summary":"","title":"Research","type":"tags"},{"content":" Benefits of using renv over R CMD INSTALL:\nno manual downloading and installing of packages no need to worry about R package dependencies (to other packages) other goodies of renv: e.g. reproducible environment Prerequisite:\nAccess to a machine with internet connections in the same operating system as the server’s operating system. If using RStudio on Windows, you need a Windows machine If using R in Linux, need a Linux machine (Farm server works too) Virtual machine and WSL should probably work Steps\nInstall the same R version on your machine as the offline machine’s Windows will require Rtools to compile from source Create and open an R session in a new directory Install packages needed When installing some packages in an old version of R (e.g. 3.5), there could be cases where installation from source will be newer than installation from binary (because CRAN did not build binary for an old version of R), and these new versions will be dependencies for other packages. Thus, if you do not install from source, installation of other packages can return error. Pro tip: package pak allows simultaneous download so will probably speed up the installation install.packages(‘renv’) Renv is a R package management tool Create a script in the directory, and load the libraries that you need in that script using library(package) so that renv knows that you need these packages in the directory renv::init() renv::isolate() Now move the directory to the offline server (probably zip it first). When you open an R session in the directory on the server, all packages should now be available to you ","date":"30 April 2021","externalUrl":null,"permalink":"/post/2021-04-30-install-r-packages-on-an-offline-server/","section":"Posts","summary":"Use renv to automatically manage installation and dependencies","title":"Install R packages on an offline server ","type":"post"},{"content":"","date":"30 April 2021","externalUrl":null,"permalink":"/tags/r/","section":"Tags","summary":"","title":"R","type":"tags"},{"content":"","date":"30 April 2021","externalUrl":null,"permalink":"/tags/r-package/","section":"Tags","summary":"","title":"R Package","type":"tags"},{"content":" ID naming # TOPMED returns chr:pos:ref:alt.\nrsid\nREF:ALT to major:minor translation # if (AF == MAF) =\u0026gt; ALT = minor, REF = major\nSNP matching # switching # flipping # SNP: chr:pos:alt:ref\nHow do I know if it matches chr:pos:allele_1:allele_2\nFirst: chr:pos are equivalent Second: Matching four scenarios If it matches, use the target variant id (often the variant in the plink files) as the new id.\n# ","date":"29 April 2021","externalUrl":null,"permalink":"/post/2021-04-29-snp-analysis/","section":"Posts","summary":"","title":"SNP analysis","type":"post"},{"content":" Reading files # vroom # Skip columns: # col_types = list(hp = col_integer(), cyl = col_skip(), gear = col_factor())\n","date":"21 April 2021","externalUrl":null,"permalink":"/post/2021-04-21-big-data-in-r/","section":"Posts","summary":"","title":"Big data in R","type":"post"},{"content":" The following code will generate a randomly named *_reprex.md file that can be copied for others.\nreprex::reprex( { library(tibble) library(purrr) library(dplyr) mutate(tibble(a=1),b = map(a, ~ tibble(c=1))) } , outfile = \u0026quot;reprex.html\u0026quot;, html_preview=FALSE, session_info = TRUE ) ","date":"20 April 2021","externalUrl":null,"permalink":"/post/2021-04-20-use-reprex-without-browsers/","section":"Posts","summary":"","title":"Use reprex without browsers","type":"post"},{"content":"","date":"15 April 2021","externalUrl":null,"permalink":"/tags/debugging/","section":"Tags","summary":"","title":"Debugging","type":"tags"},{"content":" vscode tutorial create config file select python interpreter put stop points (you can add different conditions by right clicking) move to debug console for interacting with variables the variable will not show up unless you step in once how to add arguments ","date":"15 April 2021","externalUrl":null,"permalink":"/post/2021-04-15-debugging-python-with-vscode/","section":"Posts","summary":"","title":"Debugging python with vscode ","type":"post"},{"content":"","date":"15 April 2021","externalUrl":null,"permalink":"/tags/python/","section":"Tags","summary":"","title":"Python","type":"tags"},{"content":"","date":"12 April 2021","externalUrl":null,"permalink":"/categories/book-review/","section":"Categories","summary":"","title":"Book Review","type":"categories"},{"content":"How strongly I recommend it: 9/10\nA great book summarising the main arguments why you should learn in public.\nWhy should one show their work Audience is eager for process Getting feedback helps with the creative process Artists can gain financial independence We are all amateurs - you do not have to be an expert to show your work How should one show their work Focus on producing great work Produce content daily - the process Explore different possibilities Focus on one channel Do not be afraid of failing - given our mortality, \u0026ldquo;you are already naked\u0026rdquo; Have your own base - social media can go obsolete Use your social media as \u0026ldquo;flow\u0026rdquo;, but collect the flow into \u0026ldquo;stock\u0026rdquo; Think \u0026ldquo;self-invention\u0026rdquo;, not \u0026ldquo;self-promotion\u0026rdquo; Give credit and give links to people with credits Know the structures of story-telling and tell good stories Choose the right self-description Create real (e.g. offline) connections with like-minded people Social media is a place to meet, not a place to build relationships (to some extent, just like dating websites) Improve your work with criticisms, and block the haters Build a newspaper How not to show your work Do not post anything that you are not prepared for the whole world to see \u0026ldquo;post as though everyone who can read it has the power to fire you\u0026rdquo; Do not hoard Do not single-mindedly promote your work without learning from and sharing others Qaulity of followers \u0026gt; quantity Followers easy to gain are also easy to lose - Yihui Xie Do not ask people to follow you Stop doing things/meeting people that drain you Do not share things that are too close to you to be exposed to criticism Do not indulge in the fame and forget producing great work. ","date":"12 April 2021","externalUrl":null,"permalink":"/post/2021-04-12-book-review-share-your-work/","section":"Posts","summary":"Learn in the public; share your progress","title":"Book review: Show your work ","type":"post"},{"content":"","date":"12 April 2021","externalUrl":null,"permalink":"/tags/personal-development/","section":"Tags","summary":"","title":"Personal Development","type":"tags"},{"content":"","date":"11 April 2021","externalUrl":null,"permalink":"/tags/history/","section":"Tags","summary":"","title":"History","type":"tags"},{"content":"I divide history reading into two categories: micro and macro.\nThe best example of macro history books is Homo Sapiens which is full of mental models applicable to different historical contexts and therefore our times.\nMicrohistory include books that focus on individual experiences (like fictions), and they are used as wisdom-training tools. When reading these books, I pause and reflect: given the existing data, what would my next action be if I were the protagonist. This helps to test my models\u0026rsquo; performance and avoid overfitting so that they can be applied in more contexts that we may put ourselves into. Work that fall into this category includes biographies and even historical scientific papers.\nWhen there were not many non-fictions available, history books were the most prominent sources that people use to develop their mental models and wisdom.\nHistorical facts (year, location etc.) are often irrelevant outside the contexts above. I used to be fixated on the historical facts. Although knowing these facts helped me understand the mental models better (by applying them to different contexts) when I came across macro history books, I could have done much better had I read the facts with models in mind.\n","date":"11 April 2021","externalUrl":null,"permalink":"/post/2021-04-11-how-i-read-history-books/","section":"Posts","summary":"","title":"How I read history books","type":"post"},{"content":"","date":"11 April 2021","externalUrl":null,"permalink":"/tags/reading/","section":"Tags","summary":"","title":"Reading","type":"tags"},{"content":"","date":"10 April 2021","externalUrl":null,"permalink":"/tags/learning/","section":"Tags","summary":"","title":"Learning","type":"tags"},{"content":" Facts Mental models Wisdom Insights Practice This post contains analogies and theories that I find helpful to understand learning. Treat it like a tweetstorm.\nLearning is a cornerstone of personal development. It can be grouped into the following aspects:\nFacts: data that can be acquired Mental models: transferable framework across subjects. A synonym is “idea” Wisdom: a trained model for intuitive thinking Other concepts:\nInsights are (relevant) facts organised around mental models Problems are processes to develop models Facts Facts are (mostly) useless outside mental models.\nFacts used to be valuable when information was in scarcity. However, most facts are within clicks away. Of course, intelligence agents are still scouting for confidential data, but that is irrelevant to this post unless such data can cause a paradigm shift and refute existing models.\nPeople are still eager for facts. This may explain the popularity of pub quizzes and tabloid news. However, facts without models are not reproductive: they cannot be transferred or inspire new ideas. They are DNA materials in a dysfunctional egg or sperm.\nThe reason why we are getting smarter is probably not because we remember more facts, but because we understand more mental models.\nFacts are still necessary for learning, but I find the best way to learn facts is through mental models.\nMental models1 Models are representations that make sense of the complex world. They tell us how data are retrieved, organized, validated, processed, communicated (etc.) and why these ways are chosen.\nMental models can be “heavy” or “light”, “broad” or “specific”. They can also build upon one another. The more quantitative a subject is, the more models it contains - mathematics, physics, statistics, engineering are full of useful mental models.\nModels are difficult to define because it is in the middle of the spectrum of facts and wisdom, but in general, they should be transferable and applicable.\nIn biology, evolution is a light and broad model that builds on randomization and survival of the fittest. In contrast, the parasympathetic supply of the cranial nerves is a heavy and specific model. Still, both models can be transferable. Evolution can be applied to ideas and companies; the cranial nerve model can be applied to design thinking that promotes redundancy.\nModels need to be applicable to be useful. This is why we solve problems when learning. Problems examine the rigour of our models. Feynman’s technique is a problem-solving approach to building models. It is about transferring knowing the name of something to knowing something. In medicine, it is about looking at a structure from a functional view before memorizing its names.\nLearning models require facts. The process is like building a house with concrete. First, you often need to understand more facts than necessary so that even when some degrades, there is still enough left to support the latticework. Second, you can’t build it too fast by cramming because some parts must solidify first before other parts can be built.\nWhen reading, I like to focus on the mental models that produce the results rather than the results themselves (unless these results are helpful to my mental models). That is to say, I tend to focus on transferable units that the authors employ to build the system, rather than the products of the system. For example, when reading genetics papers outside my project scope, I no longer look for “what does gene X do”, but how and why the authors adopt a certain methodology.\nThere is not much difference between models that we use to solve problems and models that we use to build models. It is like functional and meta-programming. The functions of functions are still functions.\nWhen models are sufficiently trained, they become a part of the high-order system 1 thinking that I call wisdom.\nWisdom Wisdom is the intuition to make decisions, not a detailed calculation via a spreadsheet. It is more like a neural network that gives you the answer directly (after sufficient data is collected).\nThe calculative and articulated part of our brain may be like a five-dollar calculator. A calculative decision-making process occurs when we think linearly, summing the pros and cons. I find myself anxious when making such decisions: arbitrary values assigned to each factor can be wrong and I cannot possibly consider all factors in the complex world. Now I realise the anxiety comes from the underdevelopment of wisdom.\nIt is an interpretable neural network. People can break down what factors they are considering when coming to that decision, but just like most neural networks, the interpretable version will lose some fidelity as to how exactly the decision is made. This is one of the reasons why we all need to train our own wisdom instead of directly using the models from others.\nAnother reason why we need to DIY our wisdom is that our society changes (more and more rapidly). Previous models lose their specificity and sensitivity as the nature of data changes. Developing our own wisdom improves our ability to develop models fitted to our context.\nJust like all neural network models, wisdom needs good data to produce good output. The processing of collecting such data is called forming insights.\nInsights Insights are relevant facts organized around mental models. Being relevant means the facts need to be up-to-date, but acquiring facts can be time-consuming. Thus, few people are insightful across many fields. Even Charlie Munger and Warren Buffett chose not to invest in most technology companies for this reason.\nMy approach is to build insights only in the field that have problems that I want to solve and ignore most of the facts in other fields. This is especially helpful when reading non-fiction full of facts (and examples) because most content is just data that help to validate the authors’ model. It also helps when deciding which newspapers/websites/podcasts to subscribe to.\nPractice What do all these mean in practice?\nBuild strong lattice of mental models through structured learning and deep work (rather than getting distracted and read scattered blog posts, which should only come later after the latticework is built) problem-solving (including explaining) maintaining relevant facts through techniques like spaced repetition Reading not for facts, but with questions like these in mind what mental models are used here how do the facts concern/support/refute my existing models what would I do given the data available to protagonist Transfer mental models across subjects the more contexts we use them, the more likely they become intuitive (and the wiser we become) the more mobile a model is, the more likely it will reproduce with others to form new models How to handle failures Failures are information overload. It indicates that our brain does not have sufficient models to explain the data presented to us. I began to understand its importance thanks to Charlie Munger, Naval Ravikant, Tim Urban, Xiaolai Li, and many others.↩︎\n","date":"10 April 2021","externalUrl":null,"permalink":"/post/2021-04-10-theories-about-learning/","section":"Posts","summary":"Facts, models, wisdom, insights, and practice","title":"Theories about learning","type":"post"},{"content":" Many functions in base R has faded away from my daily use of R because of tidyverse and the paradigm to do as many operations as possible in a data.frame.\nGet the variable name deparse(substitute(variable))\nIndexing and subsetting which to return a logical vector that can be used in [] for subsetting\nTidyverse alterantive (notes for myself) Imagine that I have a list of data.frames (group_split split a dataframe into lists of dataframes by the value of column specified)\nlibrary(tidyverse) ## Warning: package \u0026#39;tidyverse\u0026#39; was built under R version 4.0.5 ## -- Attaching packages --------------------------------------- tidyverse 1.3.1 -- ## v ggplot2 3.3.5 v purrr 0.3.4 ## v tibble 3.1.6 v dplyr 1.0.7 ## v tidyr 1.1.4 v stringr 1.4.0 ## v readr 2.1.2 v forcats 0.5.1 ## Warning: package \u0026#39;ggplot2\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;tibble\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;tidyr\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;readr\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;dplyr\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;forcats\u0026#39; was built under R version 4.0.5 ## -- Conflicts ------------------------------------------ tidyverse_conflicts() -- ## x dplyr::filter() masks stats::filter() ## x dplyr::lag() masks stats::lag() list_df \u0026lt;- iris %\u0026gt;% group_split(Species) list_df[[1]] ## # A tibble: 50 x 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa ## 4 4.6 3.1 1.5 0.2 setosa ## 5 5 3.6 1.4 0.2 setosa ## 6 5.4 3.9 1.7 0.4 setosa ## 7 4.6 3.4 1.4 0.3 setosa ## 8 5 3.4 1.5 0.2 setosa ## 9 4.4 2.9 1.4 0.2 setosa ## 10 4.9 3.1 1.5 0.1 setosa ## # ... with 40 more rows To get dataframes whose sum of large Sepals’ lengths (Sepal.Length \u0026gt;5) is larger than 200, I can either pull out the values \u0026gt; 5, calculate their sum, compare to obtain a vector of TRUE values and subset by the logical vector, in this way:\nsubset_vector \u0026lt;- list_df %\u0026gt;% map_dbl( ~ filter(., Sepal.Length \u0026gt; 5) %\u0026gt;% pull(Sepal.Length) %\u0026gt;% as.double() %\u0026gt;% sum(na.rm = TRUE) ) list_df[which(subset_vector\u0026gt;200)] ## \u0026lt;list_of\u0026lt; ## tbl_df\u0026lt; ## Sepal.Length: double ## Sepal.Width : double ## Petal.Length: double ## Petal.Width : double ## Species : factor\u0026lt;fb977\u0026gt; ## \u0026gt; ## \u0026gt;[2]\u0026gt; ## [[1]] ## # A tibble: 50 x 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; ## 1 7 3.2 4.7 1.4 versicolor ## 2 6.4 3.2 4.5 1.5 versicolor ## 3 6.9 3.1 4.9 1.5 versicolor ## 4 5.5 2.3 4 1.3 versicolor ## 5 6.5 2.8 4.6 1.5 versicolor ## 6 5.7 2.8 4.5 1.3 versicolor ## 7 6.3 3.3 4.7 1.6 versicolor ## 8 4.9 2.4 3.3 1 versicolor ## 9 6.6 2.9 4.6 1.3 versicolor ## 10 5.2 2.7 3.9 1.4 versicolor ## # ... with 40 more rows ## ## [[2]] ## # A tibble: 50 x 5 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; ## 1 6.3 3.3 6 2.5 virginica ## 2 5.8 2.7 5.1 1.9 virginica ## 3 7.1 3 5.9 2.1 virginica ## 4 6.3 2.9 5.6 1.8 virginica ## 5 6.5 3 5.8 2.2 virginica ## 6 7.6 3 6.6 2.1 virginica ## 7 4.9 2.5 4.5 1.7 virginica ## 8 7.3 2.9 6.3 1.8 virginica ## 9 6.7 2.5 5.8 1.8 virginica ## 10 7.2 3.6 6.1 2.5 virginica ## # ... with 40 more rows Or, I can do everything within the data.frame, in this way:\nlist_df %\u0026gt;% map( ~ filter(., Sepal.Length \u0026gt; 5) %\u0026gt;% mutate(length_sum = sum(as.double(Sepal.Length), na.rm = TRUE)) %\u0026gt;% filter(length_sum \u0026gt; 200) ) ## [[1]] ## # A tibble: 0 x 6 ## # ... with 6 variables: Sepal.Length \u0026lt;dbl\u0026gt;, Sepal.Width \u0026lt;dbl\u0026gt;, ## # Petal.Length \u0026lt;dbl\u0026gt;, Petal.Width \u0026lt;dbl\u0026gt;, Species \u0026lt;fct\u0026gt;, length_sum \u0026lt;dbl\u0026gt; ## ## [[2]] ## # A tibble: 47 x 6 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species length_sum ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; \u0026lt;dbl\u0026gt; ## 1 7 3.2 4.7 1.4 versicolor 282. ## 2 6.4 3.2 4.5 1.5 versicolor 282. ## 3 6.9 3.1 4.9 1.5 versicolor 282. ## 4 5.5 2.3 4 1.3 versicolor 282. ## 5 6.5 2.8 4.6 1.5 versicolor 282. ## 6 5.7 2.8 4.5 1.3 versicolor 282. ## 7 6.3 3.3 4.7 1.6 versicolor 282. ## 8 6.6 2.9 4.6 1.3 versicolor 282. ## 9 5.2 2.7 3.9 1.4 versicolor 282. ## 10 5.9 3 4.2 1.5 versicolor 282. ## # ... with 37 more rows ## ## [[3]] ## # A tibble: 49 x 6 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species length_sum ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; \u0026lt;dbl\u0026gt; ## 1 6.3 3.3 6 2.5 virginica 324. ## 2 5.8 2.7 5.1 1.9 virginica 324. ## 3 7.1 3 5.9 2.1 virginica 324. ## 4 6.3 2.9 5.6 1.8 virginica 324. ## 5 6.5 3 5.8 2.2 virginica 324. ## 6 7.6 3 6.6 2.1 virginica 324. ## 7 7.3 2.9 6.3 1.8 virginica 324. ## 8 6.7 2.5 5.8 1.8 virginica 324. ## 9 7.2 3.6 6.1 2.5 virginica 324. ## 10 6.5 3.2 5.1 2 virginica 324. ## # ... with 39 more rows The advantage of doing it in a data.frame way is that I can continue using the rich vocabulary that tidyverse provides. For example, I can condition the sum on Sepal.Width using group_by in each category of flowers:\nlist_df_advanced \u0026lt;- list_df %\u0026gt;% map( ~ mutate(., width_category = if_else(Sepal.Width \u0026gt; 3, \u0026quot;wide\u0026quot;, \u0026quot;narrow\u0026quot;) ) ) list_df_advanced %\u0026gt;% map( ~ filter(., Sepal.Length \u0026gt; 5) %\u0026gt;% group_by(width_category) %\u0026gt;% mutate(length_sum = sum(as.double(Sepal.Length), na.rm = TRUE)) %\u0026gt;% ungroup() %\u0026gt;% filter(length_sum \u0026gt; 200) ) ## [[1]] ## # A tibble: 0 x 7 ## # ... with 7 variables: Sepal.Length \u0026lt;dbl\u0026gt;, Sepal.Width \u0026lt;dbl\u0026gt;, ## # Petal.Length \u0026lt;dbl\u0026gt;, Petal.Width \u0026lt;dbl\u0026gt;, Species \u0026lt;fct\u0026gt;, width_category \u0026lt;chr\u0026gt;, ## # length_sum \u0026lt;dbl\u0026gt; ## ## [[2]] ## # A tibble: 39 x 7 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species width_category ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; \u0026lt;chr\u0026gt; ## 1 5.5 2.3 4 1.3 versicolor narrow ## 2 6.5 2.8 4.6 1.5 versicolor narrow ## 3 5.7 2.8 4.5 1.3 versicolor narrow ## 4 6.6 2.9 4.6 1.3 versicolor narrow ## 5 5.2 2.7 3.9 1.4 versicolor narrow ## 6 5.9 3 4.2 1.5 versicolor narrow ## 7 6 2.2 4 1 versicolor narrow ## 8 6.1 2.9 4.7 1.4 versicolor narrow ## 9 5.6 2.9 3.6 1.3 versicolor narrow ## 10 5.6 3 4.5 1.5 versicolor narrow ## # ... with 29 more rows, and 1 more variable: length_sum \u0026lt;dbl\u0026gt; ## ## [[3]] ## # A tibble: 32 x 7 ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species width_category ## \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;dbl\u0026gt; \u0026lt;fct\u0026gt; \u0026lt;chr\u0026gt; ## 1 5.8 2.7 5.1 1.9 virginica narrow ## 2 7.1 3 5.9 2.1 virginica narrow ## 3 6.3 2.9 5.6 1.8 virginica narrow ## 4 6.5 3 5.8 2.2 virginica narrow ## 5 7.6 3 6.6 2.1 virginica narrow ## 6 7.3 2.9 6.3 1.8 virginica narrow ## 7 6.7 2.5 5.8 1.8 virginica narrow ## 8 6.4 2.7 5.3 1.9 virginica narrow ## 9 6.8 3 5.5 2.1 virginica narrow ## 10 5.7 2.5 5 2 virginica narrow ## # ... with 22 more rows, and 1 more variable: length_sum \u0026lt;dbl\u0026gt; I can’t think of a straightforward way to achieve this in base R without many loops…\n","date":"8 April 2021","externalUrl":null,"permalink":"/post/2021-04-08-base-r-notes/","section":"Posts","summary":"","title":"Base R notes ","type":"post"},{"content":"","date":"8 April 2021","externalUrl":null,"permalink":"/tags/data-communication/","section":"Tags","summary":"","title":"Data Communication","type":"tags"},{"content":"","date":"8 April 2021","externalUrl":null,"permalink":"/tags/ggplot2/","section":"Tags","summary":"","title":"Ggplot2","type":"tags"},{"content":" {DT} is a package to render html tables. It is an interface to the datatables javascript library. It should not be confused with the {data.table} package, which is a package useful for data wrangling.\nA similar package of the same purpose is {kableExtra}. I found that {kableExtra} is more suitable for making static tables, whereas {DT} is more suitable for making interactive tables.\nDT Adding captions DT::datatable(iris[1:10,],caption = htmltools::tags$caption( style = \u0026#39;caption-side: top; text-align: center; color:black; font-size:200% ;\u0026#39;,\u0026#39;Table1: Iris Dataset Table\u0026#39;) ) ","date":"8 April 2021","externalUrl":null,"permalink":"/post/2021-04-08-learning-dt/","section":"Posts","summary":"","title":"Making tables in Rmarkdown: {DT} and {kableExtra}","type":"post"},{"content":"","date":"8 April 2021","externalUrl":null,"permalink":"/tags/rmarkdown/","section":"Tags","summary":"","title":"Rmarkdown","type":"tags"},{"content":" This contains notes for Rmarkdown and markdown. All notes for markdown are generally applicable for Rmarkdown.\nmarkdown Footnote Rmarkdown Markdown extras Adding toggle \u0026lt;details\u0026gt;\u0026lt;summary\u0026gt;toggle title\u0026lt;/summary\u0026gt; toggle content \u0026lt;/details\u0026gt; Image quality knitr::opts_chunk$set(dpi=300)\nShare html report A report should be self-contained. In xaringan, set self_cotained = TRUE in yaml and download html with Chrome, not Firefox.\nFor DT, downloaded html from browser does not work - see here. Hence, use the rendered html directly.\n","date":"8 April 2021","externalUrl":null,"permalink":"/post/2021-04-08-rmarkdown-notes/","section":"Posts","summary":"","title":"Rmarkdown and markdown notes","type":"post"},{"content":" Case # snakecase::to_any_case() help to fix the case of words - useful for converting between presentation data and processing data.\nRegex # The regex in R is not 100% perl flavored. For example, escape character is \\\\ instead of \\.\nI love the [{rev}](https://github.com/kevinushey/rex package). The most salient point that this package solves is on the interpretation of regex.\nWhen not to use regex # Not all strings are interpreted as a regex. Sometimes, one needs to opt-in via a parameter in the function. I have also found myself mistakenly using regex with the ==, which expects a pure string.\n{stringr} # general pattern: str_x(string, pattern). (I sometimes forgot that it is the variable to be put in front).\n","date":"8 April 2021","externalUrl":null,"permalink":"/post/2021-04-08-string-processing-in-r/","section":"Posts","summary":"","title":"String processing in R","type":"post"},{"content":" Font Font size Font format (e.g. subscripts) Font family Combine plots Helpful packages: Colours 3D rendering Rough plots It will be useful to consult Rmarkdown notes because I often use Rmarkdown to render ggplot.\nFont Font size Global adjustment (e.g. the default font size is small when rendering with Rmarkdown with ) theme’s basic size\nSee individual adjustment here and also in this RStudio2021 conference talk and this\nFont format (e.g. subscripts) ggtext is a much more elegant solution than using expression.\nFont family showtext is very useful for adding font from google.\nThis post show the font families available on Windows.\nCombine paste and expression https://stackoverflow.com/a/4992890/9580812\nCombine plots Helpful packages: https://github.com/PhanstielLab/BentoBox https://github.com/thomasp85/patchwork#patchwork- Colours library(paletteer) paletteer_d(\u0026quot;basetheme::dark\u0026quot;) 3D rendering RayShader\n3D graphics are often singled out as bad examples in data visualization, but in the case of maps and heatmaps, they are really helpful. Watch this talk for more details.\nThe computer may get hot, but the package is so COOL! https://t.co/ZvUHYfIP28 — Tim Liu (@TimingLiu) April 9, 2021 Rough plots rroughviz uses base-r syntax and renders well formatted graphs.\nggrough transforms ggplot graphs but because the latest update was two years ago, there is some incompatibility.\n","date":"8 April 2021","externalUrl":null,"permalink":"/post/2021-04-08-the-bright-side-of-plots/","section":"Posts","summary":"","title":"The bright side of plots (R plot notes)","type":"post"},{"content":" NA are necessary markers for missing data. However, Working with them can be tricky because of their special properties. Care should also be taken when reading in and presenting the data.\nProperties of NA Types There are different types of NA that are denoted by the NA_*. This shhould be noted when working with NA data in a data.frame. Operations like case_when require all output data to be of the same type.\nInfection NAs can be infectious in operations i.e. including them will make the result from logical and math operations NA. The result in string processing is more complicated because of base R does not have many functions for string processing, so it depends on the implementation of the libraries that you are using.\npaste0 and glue::glue converts NA to strings \"NA\" whereas stringr::str_c retains the infectious property\nlibrary(tidyverse) ## Warning: package \u0026#39;tidyverse\u0026#39; was built under R version 4.0.5 ## -- Attaching packages --------------------------------------- tidyverse 1.3.1 -- ## v ggplot2 3.3.5 v purrr 0.3.4 ## v tibble 3.1.6 v dplyr 1.0.7 ## v tidyr 1.1.4 v stringr 1.4.0 ## v readr 2.1.2 v forcats 0.5.1 ## Warning: package \u0026#39;ggplot2\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;tibble\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;tidyr\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;readr\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;dplyr\u0026#39; was built under R version 4.0.5 ## Warning: package \u0026#39;forcats\u0026#39; was built under R version 4.0.5 ## -- Conflicts ------------------------------------------ tidyverse_conflicts() -- ## x dplyr::filter() masks stats::filter() ## x dplyr::lag() masks stats::lag() paste0(NA, 1) ## [1] \u0026quot;NA1\u0026quot; glue::glue(\u0026quot;{NA}{1}\u0026quot;) ## NA1 stringr::str_c(NA, 1) ## [1] NA Reading in NA can be represented by many symbols in human readable files e.g. “.”, ” “. To clean up these values and convert them to NA, one can use naniar::replace_with_na(). I do not think this has been integrated well into the mutate across syntax yet, so this is what I use:\ntibble(x= \u0026quot;.\u0026quot;) ## # A tibble: 1 x 1 ## x ## \u0026lt;chr\u0026gt; ## 1 . tibble(x= \u0026quot;.\u0026quot;) %\u0026gt;% naniar::replace_with_na_all(~ .x == \u0026quot;.\u0026quot;) ## # A tibble: 1 x 1 ## x ## \u0026lt;chr\u0026gt; ## 1 \u0026lt;NA\u0026gt; Presenting When presenting the data, the audience may not be R trained and may not understand what does NA mean. Changing it to a text like “missing” may help to bridge the gap.\ntidyr::replace_na() together with mutate mutate(across(everything, ~replace_na(., \"missing\")))\ntibble::tibble(a = NA) ## # A tibble: 1 x 1 ## a ## \u0026lt;lgl\u0026gt; ## 1 NA tibble::tibble(a = NA) %\u0026gt;% mutate(across(everything(), ~replace_na(., \u0026quot;missing\u0026quot;))) ## # A tibble: 1 x 1 ## a ## \u0026lt;chr\u0026gt; ## 1 missing ","date":"8 April 2021","externalUrl":null,"permalink":"/post/2021-04-08-working-with-na-in-r/","section":"Posts","summary":"","title":"Working with NA in R","type":"post"},{"content":"","date":"7 April 2021","externalUrl":null,"permalink":"/tags/functional-programming/","section":"Tags","summary":"","title":"Functional Programming","type":"tags"},{"content":" Why use functional programming Avoid intermediate objects In any loop, the standard practice is to create a new list before the loop, do some processing for each element of the list in the loop and then add the processing result as an element to the new list (following the same index). It makes programming more fun Thinking about that index i is simply not as fun as working with the whole list. It makes the code clearer to read Without the cluttering of object assignment, you convey your objective faster.\nOthers It earns you respect when your colleagues cannot understand your code and prevent them from messing around your code.\nOf course, I am kidding on this aspect, because the primary goal of any code is to communicate in a collaborative environment. Key components map and its derivatives - control output type the default parameter is a function name use ~ when the function needs to be called with other parameters or more complicated patterns use {} when there are multiple steps (e.g. assignment of values) use .x (and .y) when you need to refer to the variable being mapped Best practices map should always be thought of as a recipe. The first argument is the ingredients stored in a list-like object and the second parameter is the procedure to be done on each of the ingredients.\nCaveats If it takes too long to come up with a functional programming solution, use for loop There are other ways to batch process a list. For example, on a meta level using targets’ pattern Some error: reprex::reprex( { library(tidyverse) tibble(a=1) %\u0026gt;% mutate(b = ~ tibble(c=1)) }, session_info = TRUE )\n","date":"7 April 2021","externalUrl":null,"permalink":"/post/2021-04-07-learning-functional-programming-in-r/","section":"Posts","summary":"","title":"Learning functional programming in R","type":"post"},{"content":"","date":"4 April 2021","externalUrl":null,"permalink":"/tags/bioinformatics/","section":"Tags","summary":"","title":"Bioinformatics","type":"tags"},{"content":"This is a summary post of the medical school application process.\nIf you read Chinese, this Zhihu answer is where things got started.\nThe whole application can be broken down to the following aspects:\nCurriculum Class performance Research Other interests BMAT Interview Leadership The central theme is about being interesting.\nIn fact, I believe this is everything that I need to write\u0026hellip; The specifics are more or less repeated elsewhere, so I will come to them only when I got time.\nto be continued\n","date":"4 April 2021","externalUrl":null,"permalink":"/post/2021-04-04-medical-school-application/","section":"Posts","summary":"","title":"Medical school application","type":"post"},{"content":" This is not intended to be a comprehensive review of Bioconductor packages - there are too many of them. These are my personal notes.\nFirst of all, I must declare a love-hate relationship with many Bioconductor packages. On one hand, they are very useful for specific purposes. On the other hand, there is often less underlying logic for these packages as compared to the tidyverse ecosystem. Even the authors admit that sometimes they forget what functions are there in their packages (I should link here to a Bioconductor support page, but not in the mood to do so). However, I must acknowledge that the data types that Bioconductor packages are designed to work with are not often as straight-forward and generalizable as tables in tidyverse - a lot of the data have biological contexts and are more complicated than basic R types. It is thus more difficult to have a generalizable approach to all data analysis steps.\nNaming convensions Many Bioconductor packages share the same spelling with the base counterparts, except with some different capitalization. It can thus be painful to find relevant documentations via a search engine\nSolution: add Bioconductor in one of the search terms.\nConflict with tidyverse There are many functions that clash with tidyverse. Notable examples include rename and slice. The issues with rename is the most tricky because while slice usually returns errors when used in a tidyverse way to slice rows, rename is different from dplyr::rename in the sequence of the names. In dplyr, the column name to be renamed should be in front rename(\"new_name\" = \"old_name\"). In Bioconductor it is the other way around.\nThe dplyr’s logic is probably: Charles is now the King.\nThe Bioconductor’s logic is: the King is now Charles.\nBoth are perfectly logical, thus perfectly confusing.\nDataFrame It enables an ordinary data.frame to contain more data types in the column. When you convert that to a data.frame or a tibble, the column names can be quite unexpected and require some bit of fixing.\nSubsetting It has the same subsetting syntax as base data.frame and does not work with tidyverse syntax. When using pipe. you can subset by DataFrame %\u0026gt;% .[x,y].\nGenomicRanges The function that I quite most often is makeGenomicRangesFromDataFrame given that I am mostly in the tidyverse. In the tibble bioinformatics world, I use chr and pos to denote SNP positions. However, GenomicRanges force the names to become seqnames, start and end because, well, it stores range data.\nI have two related strategies to avoid constantly fixing the column names when working with a bunch of tibbles + GenomicRanges.\nFirst, the variable name should denote the type of the object. I usually just add _GR if the object is a GenomicRanges object.\nSecond, if the variable is a tibble, it must have standard column names that follow chr and pos. I write custom wrappers for functions like makeGenomicRangesFromDataFrame so that it always converts the same columns to GenomicRanges.\nOthers Not just for Bioconductor packages, but I generally find packages with pdf documentations a bit difficult to manage. I make notes on them but it is time-consuming to keep and retrieve a catalogs of pdfs (insert in some ads music). Now Zotero has helped a lot with this aspect.\n","date":"4 April 2021","externalUrl":null,"permalink":"/post/2021-04-04-bioconductor-packages/","section":"Posts","summary":"","title":"Notes on Bioconductor packages","type":"post"},{"content":" Semantic scholar # A NLP-powered \u0026ldquo;PubMed\u0026rdquo; that generates quick summaries for articles\nScite # For each article, it indicates the nature of the citation i.e. approving, neutral, disproving\nMeta # A research feed generator\nOthers # Connected Papers and CORE. Both are available on aRxiv and show relationship between papers. Connected Papers show a map.\n","date":"4 April 2021","externalUrl":null,"permalink":"/post/2021-04-04-ai-powered-research-tools/","section":"Posts","summary":"","title":"Research tools","type":"post"},{"content":"","date":"4 April 2021","externalUrl":null,"permalink":"/tags/tools/","section":"Tags","summary":"","title":"Tools","type":"tags"},{"content":"This is an important mental model that I have been building over the past few years.\nInteresting means attention-capturing. Attention is the currency that we are trading in the information age. Thus, the value of almost everything can be assessed on whether they are interesting.\nBeing interesting has two components: relevance and uniqueness.\nTo me, a film star\u0026rsquo;s divorce is unique but not relevant; medical school applications from a student with straight-A grades but nothing else is relevant but not unique. Neither is interesting.\nRelevance comes from hard work. On one hand, you need to understand what the other party is looking for. On the other hand, you need to improve yourself so that your skills/qualifications are helpful to what is required of you.\nUniqueness stems from being yourself. No one can beat you at being yourself1. This is the soul of a personal brand. It is why you do what you do. In the digital age, you can ignore 99.9% of the world and still be liked by millions of people (the remaining 0.1%). In a medical school application, you just need to be loved by one school.\nMost people focus on relevance when trying to be interesting: they tick all the boxes that someone gives them; they work hard on a status game (e.g. getting the best ranking) where the competition is the highest. In the end, they live a relevant but not interesting life.\nThis idea is from Naval Ravikant\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"4 April 2021","externalUrl":null,"permalink":"/post/2021-04-04-what-does-interesting-mean-to-me/","section":"Posts","summary":"","title":"What does being \"interesting\" mean","type":"post"},{"content":"This documents the common pitfalls when working with Bioinformatics data and how to prevent them.\nHeaders # Case # use janitor::clean_names to standardize names to snakecases.\nNames # use a standardized name:\nchr for chromosome, instead of chrom, seqnames etc. Sometimes you have to change the name to fit a certain software (e.g. GenomicRanages), but only convert the name within the call of the function itself, and immediately change back. Never propagate the name change to the next function because it will then be a headache to deal with the dependencies between functions. Chromosome names # Decide on one naming convention. For now, I decide on chr# instead of # because most bcf files that I work with contain such names.\n","date":"3 April 2021","externalUrl":null,"permalink":"/post/2021-04-03-caveats-when-working-with-bioinformatics-data/","section":"Posts","summary":"","title":"Caveats when working with bioinformatics data","type":"post"},{"content":"","date":"3 April 2021","externalUrl":null,"permalink":"/tags/data-science/","section":"Tags","summary":"","title":"Data Science","type":"tags"},{"content":" Intro This is a documentation of how I split a string type column by its length, and combine them together in a directory format (which was a necessary step for me to check whether each directory existed in my analysis).\nlibrary(tidyverse) data \u0026lt;- tibble(string = c(\u0026quot;123456\u0026quot;, \u0026quot;987654\u0026quot;)) print(data) ## # A tibble: 2 x 1 ## string ## \u0026lt;chr\u0026gt; ## 1 123456 ## 2 987654 Step 1 strsplit splits the string into a list of strings, and in tibble it will show up as a column of list type.\nsplit_data \u0026lt;- data %\u0026gt;% mutate(split_str = strsplit(string, \u0026quot;(?\u0026lt;=.{2})\u0026quot;, perl = TRUE)) print(split_data) ## # A tibble: 2 x 2 ## string split_str ## \u0026lt;chr\u0026gt; \u0026lt;list\u0026gt; ## 1 123456 \u0026lt;chr [3]\u0026gt; ## 2 987654 \u0026lt;chr [3]\u0026gt; Step 2 First method: combine string + unnest split_data %\u0026gt;% mutate(split_str_dir = map(split_str, ~ str_c(., collapse = \u0026quot;/\u0026quot;))) %\u0026gt;% unnest(split_str_dir) ## # A tibble: 2 x 3 ## string split_str split_str_dir ## \u0026lt;chr\u0026gt; \u0026lt;list\u0026gt; \u0026lt;chr\u0026gt; ## 1 123456 \u0026lt;chr [3]\u0026gt; 12/34/56 ## 2 987654 \u0026lt;chr [3]\u0026gt; 98/76/54 Second method: unnest (wider) + unite split_data %\u0026gt;% unnest_wider(split_str, names_sep = \u0026quot;_\u0026quot;) %\u0026gt;% unite(split_str_dir, starts_with(\u0026quot;split_str\u0026quot;), sep = \u0026quot;/\u0026quot;) ## # A tibble: 2 x 2 ## string split_str_dir ## \u0026lt;chr\u0026gt; \u0026lt;chr\u0026gt; ## 1 123456 12/34/56 ## 2 987654 98/76/54 Outro In my opinion the second method is more straightforward in syntax but it requires someone to know the existence of unnest_wider (how many problems in programming are due to unknown unknowns?).\nThe first method requires some understanding of functional programming syntax i.e. map and ~. It also requires someone to understand the difference between str_c’s parameters: sep and collapse .\n","date":"3 April 2021","externalUrl":null,"permalink":"/post/2021-04-03-how-to-split-a-string-column-by-length/","section":"Posts","summary":"","title":"How to split a string column by length","type":"post"},{"content":"","date":"3 April 2021","externalUrl":null,"permalink":"/tags/programming/","section":"Tags","summary":"","title":"Programming","type":"tags"},{"content":"","date":"3 April 2021","externalUrl":null,"permalink":"/tags/tidyverse/","section":"Tags","summary":"","title":"Tidyverse","type":"tags"},{"content":"This will be a part of a series of articles on learning programming and data science. There are many articles on this topic already, but these are for my friends.\nThis post focuses on learning programming. Most data scientists use Python and R. Between the two, I think Python is a more programming-oriented language. The types of objects are more straightforward, the syntax is easier, the object-oriented approach is clearer, too. There is no doubt that R excels at table manipulation, graphics, and statistical calculations, but I would recommend people to start with Python, even if it is not immediately helpful to your next research project.\nDay 1 # Figure out why you want to learn programming # For me, the joy of creating a virtual world with little physical dependencies is what got me started. It also helps me to automate a lot of tasks in life. I recommend taking a look at the https://automatetheboringstuff.com/ book to know the range of activities that Python can help you with.\nObject-oriented programming also enthrals me on a philosophical level, because by its extension every machine, including us, is made of algorithms (i.e. a series of set rules).\nDay 2 # Set up the programming environment for Python # Many people quit programming after day 2 because they overestimate what they can achieve on that day. Set the expectation low and use an editor like @vscode. Call it a day if you can print \u0026ldquo;hello world\u0026rdquo; to the console.\nThere is a lot more to programming than just knowing the concepts. A large chunk of time is spent making the software systems compatible with one another. It is one thing to write algorithms to achieve what you want in a controlled environment, and another thing to deploy the algorithm so that it can become an application. Most tutorials tend to focus on the former, but remind yourself that the second half is just equally challenging.\nDay 3 # Learn Python basics # I think this is well covered by most tutorials. At a basic level, most languages have variables. These variables can be grouped into lists. You then have operations (methods, functions) that modify these variables. Lastly, you have loops that apply the operations on elements of the lists and conditionals that decide whether to apply an operation.\nDay 4 # Learn object-oriented programming # Well-covered by most tutorials. You do not have to understand everything, but it is something that you should keep at the back of your mind because most libraries are designed in this way and you will need it one day for organizing your code.\nDay 5 # Learn git # Git is a life-long learning tool for most people. I still consult with StackOverflow for many uncommon git commands. But git is also one of the most powerful tools invented in programming. It allows you to save the current state of the project and then revert to it any time in the future. For starters, just consider git as a linear structure. git add and git commit to save the current status, and use a vscode addon like git tree to revert to its older state and you are good.\nDay 6 # Learn how to load and use libraries written by other people # Programming is community work. Register an account on GitHub, now that you know how to use git. Related to Day 5 and 7 as well, as you will learn how to git clone other libraries, or use pip or conda to install the libraries. Learn how to raise an issue on GitHub and ask questions on StackOverflow.\nDay 7 # Start a project # My recommendation is to choose a project in the book https://automatetheboringstuff.com/ and implement it. The best way to keep what you learned fresh is to bring what you learned to your own life. There is no better problem to solve than the problems you are facing yourself.\nNext steps # If you are interested in a data science project, I would move on to learning R with https://r4ds.had.co.nz/ and Hands on programming with R. That\u0026rsquo;s for another day.\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-how-i-would-learn-programming-in-7-days/","section":"Posts","summary":"","title":"How I would learn programming in 7 days","type":"post"},{"content":"As a student of life, I\u0026rsquo;ve come to embrace certain superstitious concepts, despite considering myself a rational person. I believe that denying these beliefs at face value would be foolish, and have found two specific superstitions that have proven useful in my life.\nThe first is fortune-telling, a common form of superstition. While many may scoff at the idea of predicting the future, I have found that reading the ancient Chinese book, I Ching, has offered valuable insights into life\u0026rsquo;s different states. For instance, the book\u0026rsquo;s first state, 潜龙勿用, translates to \u0026ldquo;the hidden dragon should not exert too much effort.\u0026rdquo; This state suggests that we should withdraw our efforts and be less engaged with external pursuits. In a complex world, it\u0026rsquo;s often impossible to know with certainty what we should do, so having benign statements we trust can help us navigate confusing situations. By following these statements, we can often extricate ourselves from difficult scenarios sooner than if we relied solely on our own calculations.\nThe second superstitious concept is 缘, or Yuan, a Chinese Buddhist belief similar to karma. Unlike karma, which focuses on each individual, Yuan is more about the interactions between people. I\u0026rsquo;ve found this concept particularly helpful because it acknowledges the insatiable and often unrealistic desire we have to know and control other people. However, human interaction is incredibly complex, and each person has their autonomy, with internal states that they may not wish or be able to articulate through language. Rather than blaming ourselves for not having done enough to influence someone\u0026rsquo;s behavior, it\u0026rsquo;s often more helpful to tell ourselves that \u0026ldquo;it is ok, the Yuan is not here yet.\u0026rdquo; By attributing outcomes to a lack of Yuan rather than our own shortcomings, we become kinder to ourselves and cherish every moment and interaction as a gift from Yuan. This mindset allows us to move on from lost friendships or missed job opportunities, accepting that sometimes things simply aren\u0026rsquo;t meant to be.\nIn conclusion, while superstitions may seem irrational, embracing certain concepts can offer valuable insights into life\u0026rsquo;s complexities. By using fortune-telling and Yuan as tools to navigate the world around us, we can gain greater perspective and compassion towards ourselves and others.\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-how-to-make-superstitions-work/","section":"Posts","summary":"","title":"How to make superstitions work for me","type":"post"},{"content":"Being an extremely (\u0026gt;3 s.d.) future-focused person, I have been conditioned to think that unpleasant things can be good for my future, medications, running the last lap etc. There is of course a bias here. Unpleasant things are much more reflection-provoking than pleasant things. I am more inclined to ask myself \u0026ldquo;why am I going through all these\u0026rdquo; when things are unpleasant.\nUnpleasant things also provoke learning. I learn much better (or so I think) when I have a question that I want to seek an answer to. Having confusion is not pleasant, but it makes learning more effective.\nUnpleasant things can be addictive. A lot of addictions, e.g. cigarettes, alcohol, and regrets are bitter, but somehow people find it hard to escape. It feels as if we are intrinsically masochistic.\nIt has become a problem because there are really good experiences in life. But somehow after these experiences, I cannot help asking myself: what is the meaning of all these. Often I cannot think of a good answer. Not a future-oriented one, despite how much I have enjoyed myself. I find it a huge burden that I have to live like a slave for the future self.\nIs it reasonable to say this: pleasant things are meaningful at the present, and unpleasant things are made meaningful for the future. I do not know. I only know that if there is one thing that cannot be taken away from a person, it is the quest for meaning.\nThis post will be updated as I have thought through this a bit more.\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-is-anything-enjoyable-also-meaningful/","section":"Posts","summary":"","title":"Is anything enjoyable also meaningful","type":"post"},{"content":"The learning of philosophy is to see things as they are. To possess no internal judgement over external things. In Buddhism, there is a saying \u0026ldquo;无明是苦\u0026rdquo;, which can be translated to \u0026ldquo;suffering comes from the lack of clarity\u0026rdquo;. Incidentally, 明, or clarity, is part of my Chinese name, so I am constantly reminded that things can be a bit clearer than they are.\nLearning philosphy has no destination. One question that has bothered me for a while is why we are constantly searching answers for the same questions. Since the beginning of time, we have been asking ourselves what is happiness and how to make meaning of all the sufferings in the world. For me, I always thought that I reached somewhat a higher state at the end of one suffering, until I am struck by another one. I seek consolation in philosophy, but I cannot help asking myself what is the point of all these, if I am just in a perpetual cycle of suffering and delusional enlightenment.\nThe answer is probably two-fold. On one hand, I cannot deny that we do live through cycles. It is important to acknowledge that. Just like the Tai Chi illustration in Taoism, the negative breeds positive and vice versa. We cannot have one without having the other. The meaning can be derived through observing our progress through these cycles. Hopefully, we can better cope with the ups and downs in life, realizing they are having less and less impact on our internal stability. This process is going to continue, until we achieve a state of non-identity.\nReligion is the sigh of the oppressed creature, the heart of a heartless world, and the soul of soulless conditions. It is the opium of the people.\nI will borrow the second perspective from Karl Marx. It may not be right to treat any philosophy as the solution to the suffering. Like religions, they are just opium. We cannot reduce future pain by taking more opium this time. I also like to think them as vaccination. It is not sufficient to learn what a philosphy is about; it is important to take boosters and to be constantly reminded of them.\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-learning-philosophy/","section":"Posts","summary":"","title":"Learning philosophy","type":"post"},{"content":"I like good films, but I do not always desire to watch them. I enjoy flowers blossoming in the botanic garden, but I do not always desire to bring them back home and keep them for myself.\nLiking something or someone means there is concordance with your value. It is natural. There is no need to suppress it. All we have to do is to acknowledge its existence and also acknowledge that this idea, like any other, is flowing down our thought stream, and we should not mistake it as ourselves.\nDesire is a state of dissatisfaction and insufficiency. Desires indicate no value attachment. Desires put ourselves in a state of unhappiness until we get what we desire; the relief, though, is always transient (what I learned from Naval Ravikant).\nWhen studying Buddhist philosophy, I have sometimes mistaken my liking for my desires; I try to suppress my liking because I do not want it to bring unhappiness. This suppression has confused me and even pushed me towards desiring what I deny myself. The separation of these two allows me to appreciate what I like, enjoy the present moment more without fearing the future.\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-like-and-desire/","section":"Posts","summary":"","title":"Like and desire","type":"post"},{"content":"","date":"28 March 2021","externalUrl":null,"permalink":"/tags/self/","section":"Tags","summary":"","title":"Self","type":"tags"},{"content":"I have been working on research projects since age 15 and here are the tips that I often share with my friends regarding research project application.\nHow to approach the whole process # It is normal to experience frustration because honestly, it is not meant for someone who first joins the field: 1. it is a far more natural process if you have been reading papers in the field for 1-2+ years and much easier to articulate why the work done by the researcher is important and interesting (and what skills do you bring to the table) 2. conversely, it can be difficult for newbies to write about these when they only read just very few papers (after taking days)\nI am saying this not to discourage anyone, but to put things into perspectives. It is not an easy process, and kudos for beginning on this journey despite the challenging start.\nWhat to include the email # As early-stage researchers, I feel it is more important to demonstrate an interest to learn than to show initiatives on what you want to work on. It is a counter-argument to the tendency to propose a project in their first email to the researcher. Most researchers\u0026rsquo; projects are tied to their current grants and resources so the chances of finding someone who happens to have the capacity to take on a new project is somewhat small.\nI recommend the email to be short, containing 2-3 paragraphs with 2-3 sentences in each. You should include more links (e.g. personal website) and less content, so that people are not overwhelmed, and they can still explore further if they are interested. The sweet-spot impression one wants to make is 1. you are interested 2. you are pro\nNote, some email servers will mask the URL you sent so I do not recommend putting all URLs into the main text (because it may look messy).\nHow to send the email # In addition to the Principal Investigator that you are interested in, send to other people in the lab, too. They may have more time and if they trust you for being a conscientious student, they may recommend you to the PI and the chance of getting noticed will be higher. Similarly, if there are professors who know your academic performance, reach out to them as well to seek recommendations.\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-tips-to-apply-to-research-labs-for-undergraduates-high-school-students/","section":"Posts","summary":"","title":"Tips to apply to research labs (for undergraduates/high school students)","type":"post"},{"content":"\u0026ldquo;What does your name mean\u0026rdquo; was the first question I got during the most important interview in my life. This also becomes the question that I like to ask others. I enjoy listening to these backdrop stories of a person\u0026rsquo;s life and what meanings they derive from it.\nI was born to Chinese parents who hardly speak any English. By family tradition, like everyone else in my generation, my name should have a character \u0026ldquo;明 Ming\u0026rdquo;, or clarity in English. My father decided on the word \u0026ldquo;题 Ti\u0026rdquo;, which means questions. Combined, Ti Ming, or questions clarified, has set me on an eternal journey of seeking answers to life\u0026rsquo;s questions.\nThe beauty of Chinese is the same pronunciation can have different words, thereby giving different meanings. The same name also reminds me to \u0026ldquo;啼明\u0026rdquo; (wake up early and work hard), , 题名 (succeed in intellectual pursuits, one of the Confucian ideals) and \u0026ldquo;提名\u0026rdquo; (nominate others for success). So together the narrative is: work hard, succeed by helping others, and figure out the question of life 😜.\nIt never occurred to my parents that when combined, Timing can also be pronounced as timing, as in the right time to do something. The English pronunciation of the Mandarin characters happens to be the same as Cantonese. Given my love for Cantonese culture, it is a perfectly justified pronunciation. Still, I feel humbled when people say that \u0026ldquo;Timing is everything\u0026rdquo;, even though the country song of the same name (Timing is everything) is my guilty pleasure.\nTimothy was the church name that I was given while being a hospital volunteer. I like the meaning behind the name - in God\u0026rsquo;s honour. To me, it is a reminder of the quote by Ragen that \u0026ldquo;God\u0026rsquo;s work must truly be our own\u0026rdquo;, and that by Hu Shih \u0026ldquo;Success does not necessarily lie with you, but none of the efforts will be wasted\u0026rdquo;. It reminds me to be part of something big - in a team (Tim).\nThe surname, 刘, means to kill. Combined with the first name, this gives the name a somewhat Buddhist meaning - to kill my external self. It consists of two parts, 文 and 刀, or literature and weapons. Being good at both is a Confucian ideal; it also serves as a Taoist reminder to keep a balance between the extremes. It comes from the family that started the Han Dynasty, whose name is still used by the more populous ethnicity in the world. Of course, the surname is mostly paternal, and I always hold pride for my female ancestors and what they have sacrificed for the family.\nI would love to hear your stories too, and please feel free to comment below :)\n","date":"28 March 2021","externalUrl":null,"permalink":"/post/2021-03-28-my-name/","section":"Posts","summary":"","title":"What is in a name","type":"post"},{"content":"Dividing my days into phases is one of my favourite habits.\nThe basic idea of phasing is to divide our awake hours into phases and devote each phase to a single project and nothing else. Conversely, the projects will be attended only during their designated phases. Here are the few benefits that I have found.\nWork expands so as to fill the time available for its completion - Parkinson\u0026rsquo;s Law\nThe first benefit is a sense of urgency. Without the phases, the basic unit of time is a day. By compressing that into phases (often four hours), I begin to constantly ask myself: what needs to be done in the next few hours in this project to call it a day. This pushes me to focus on the activities with the highest leverage. I have found it especially helpful when working from home, because, without that separation between office and home, we begin to fool ourselves that we are working longer, while in fact the work just became more inefficient.\nSecond, it ensures that each project makes progress. Managing a few projects at the same time can be difficult. Phasing ensures each project gets taken care of. Before I set up the phases, my days were occupied by fire-fighting because tasks came to my attention by their urgency. Now I will work on the project during their phase even if there are no urgent tasks. This has enabled me to work on important but not urgent tasks, which often produce better results overall.\nThird, it allows batching and reduces context switching. Every day, I only gather the tools and materials for one project once at the start of the phase. I also create a Kanban board for each project and this is the only to-do list that I will look at during that phase. Because of this, I become more mindful when working on each task and this has brought me higher efficiency and more happiness.\nFourth, it allows breaks between each task. Context switching is not evil. I used to divide my revision days into interleaving humanities and science subject phases so that different parts of my brain can take turns to work hard. This may increase creativity and allows for spaced repetition. Besides, sometimes we will face bottlenecks for one project (e.g. work dependent on others, data processing time) so it is best to change the project while waiting for these things to be processed in the background.\nThere is also a bonus benefit: between each phase, I give myself some time to process distractions that are generated during the phases. These are often valuable ideas or actions that I realise I should attend to but are quite irrelevant to the phase that I am going through. These blank spaces between phases prevent me from jumping down the rabbit hole to explore these ideas, but also allow me to negotiate a deal with my monkey mind to focus during the phases, and be wild outside the phases.\nAfter all, this is a system that has worked for me, and I encourage you to try out the same principles and let me know which style has worked best for you. I have made templates for different number of phases. Right now, I find a four-phase day fit my current project load the best and here is an example of how I arrange my day:\n","date":"26 March 2021","externalUrl":null,"permalink":"/post/2021-03-26-live-through-phases-not-days/","section":"Posts","summary":"","title":"Live through phases, not days","type":"post"},{"content":"Cutting all my hair away has become a regular practice during the lockdown.\nThe practical reasons include hygiene and convenience. Long hair takes a long time to groom. The whole process of delicate grooming as the first thing in the morning takes away too much willpower and decision-making capacity that could have been better spent elsewhere.\nThere are also schools of philosophy that I am constantly reminded of by this new haircut.\nBy Buddhism, I was encouraged to search for myself behind everything external: achievements, possessions, and even my own physical body. Looking at my hair provokes an existential question: these were once part of me, but they are all lost now. What is it in me that cannot be taken away by the environment? Who am I? What does self-identity even mean? (Admittedly, I have not thought about the idea of \u0026ldquo;non-identity\u0026rdquo; much, but just trying to cut the ties between external appearance and internal self has been really helpful).\nFrom Stoicism, I learned that we should be used to be ridiculed for things that are non-essential to us. This allows us to stand up even when we are going to be laughed at and that we are not constantly seeking compliance and outside approval. I have not been ridiculed, but the haircut is somewhat unconventional for someone in civil society (i.e. non-military) at my age. The experience teaches me to become comfortable with being different.\nThe above are the reasons why I kept my current haircut.\nI feel it is also appropriate to record down an anecdote of getting a haircut before COVID-19. In the middle of the last haircut I had, because I told the barber that his masterpiece was somewhat asymmetrical, he became angry at me and was holding a few of my hair at one time and asked me how much I wanted it to be cut. This was a bit traumatizing: just imagine your brain surgeon holding your brain scan and ask you which part to be cut away after he has already opened your skull; this was the low-key version of that 😂. There are occasions where the customers should only have expectations for the results and not involved in the execution process. So who knows, perhaps I am just philosophizing over my Freudian trauma 😜.\n","date":"26 March 2021","externalUrl":null,"permalink":"/post/2021-03-26-philosophy-of-haircut/","section":"Posts","summary":"","title":"Philosophy of haircut","type":"post"},{"content":"It feels a bit strange to write a post on overthinking because then I can be accused of overthinking about overthinking :P\nThis question stems from the observation that my conversations seldom end after talking. I always take pleasure in writing down the sparkles generated in the conversation and producing more thoughts afterwards. I realise that my dad loves it, too - he always writes to me essays after some kind of discussion. If anyone is interested in running a genetic study on overthinking, we will be happy to donate our blood\u0026hellip; yes, we reached this conclusion after pondering for hours (just kidding)\nOverthinking can be a bit frustrating sometimes. It means that I am more prone to clinging to the past. I found myself habitually saying \u0026ldquo;hold on\u0026hellip; let me think what the take-home message of our chat is\u0026rdquo; when my friends were trying to end the conversation. This is a quirk that I am working on to change.\nAm I overthinking it? Well, I need to think about it a bit more and let you know.\n","date":"20 March 2021","externalUrl":null,"permalink":"/post/2021-03-20-am-i-overthinking/","section":"Posts","summary":"","title":"Am I overthinking","type":"post"},{"content":"Presentation at Sanger Institute\nEvent: Wellcome Sanger Institute · Location: Cambridge, United Kingdom\nSlides\n","date":"1 March 2021","externalUrl":null,"permalink":"/talks/2021_03_journal_club/","section":"Recent \u0026 Upcoming Talks","summary":"","title":"Rare variant association with urine metabolites","type":"talks"},{"content":"I am in a mid-medical school crisis.\nI often find myself anxious about what is the right thing to do.\nWith a bit of both medical and technical skills, I find myself to be Buridan\u0026rsquo;s donkey. When I learn medicine, I lament that I am not solving problems at scale; when I improve my software programming skills, I wonder what is the point of writing beautiful code if all I want is prototyping; when I delve into statistical algorithms, I worry that I am not doing things that are immediately applicable to my medical career.\nAnd it dawns on me that I have been asking myself the wrong question.\nThe problem with goal setting # As a society, we are too used to asking ourselves \u0026ldquo;do I need to do X or Y or Z\u0026rdquo;. It is good to be selective, but the caveat lies in what we are being selective for. Many people, including me, have an extrinsic goal in mind. \u0026ldquo;do I need to do X to build my perfect CV, or is it better to do Y\u0026rdquo;. Some try to internalise that goal, so the question becomes \u0026ldquo;does doing X help me become the person I want to be\u0026rdquo;. Although the latter is often more praised, here are the problems I have had with both goals.\nFirst, it is important to recognise that there is not that much difference between an extrinsic and intrinsic goal in this case. In career development, self-identity is always condensed into a few pages of a CV in the first pass. Unless one is an eternal idealist, the reality is going to force someone to look at their CV from time to time and collapse the two goals into one.\nSecond, goals bring anxiety because of uncertainty. This problem is especially pertinent to emergent careers. There is no job advertised for someone medically trained and technically savvy. And I am not going to apply for these jobs until 5-10 years down the road. Therefore, it is extremely challenging to try to project that long-term vision into our daily prioritization of what to focus on.\nThird, goals are denials to our present self. If we need to do X/Y/Z to become the person we want to be, it implies the present us are not good enough. Again, perhaps such goals will be good motivators in the short-term, but to live in self-denial for years or decades? I do not think it is a healthy way to approach life if the only way to pursue a higher aim is to dislike our current status.\nThe alternative question # So, rather than asking who we want to be, how about changing the question to \u0026ldquo;what problems do I want to solve\u0026rdquo;.\nI find this question helpful because it takes the pressure off me. I no longer scream \u0026ldquo;me me me!\u0026rdquo; when I reflect on this question. It is also more concrete. I stop imagining the nebulous me in ten years and fantasizing how he will fit in the job market then. Instead, I focus on the real pain that people are experiencing, and I know I can take action to address them NOW.\nI find status games are often played as a means to an end. \u0026ldquo;If I am at the top of this exam/first author in this paper/\u0026hellip;, I will have a better foundation for achieving my goals\u0026rdquo;. While it is important to be recognised, it is not everything. Often, it is good enough to be in a position to quickly learn the skills needed to solve a particular problem. It is best to be recognised as the expert for real skills and not just external validations.\nTo help me answer the question of \u0026ldquo;what problem\u0026rdquo;, I have come up with the following criteria\ndifficult, so solving it improves our skills and career capital interesting, so we are having a fun time solving it impactful, so others can benefit from the solution, and they can be motivated to join us To me, this problem is about how to make data more useful in medicine. So I know I need medical knowledge to understand the health/disease, coding skills to write maintainable software, and statistics to interpret the findings. I also need to join and foster a like-minded community to pursue this grand aim. It is no longer about improving the current imperfect me; it is about delivering a better solution to the world. Yes, I still need to improve myself to achieve that aim, but I no longer do it for my ambiguous self-interest.\nAfter all, I think it is an application of memento mori (remember that we have to die). What is the point of maintaining a perfect image of myself that is going to dust? I will focus on solving a tiny part of the problem for our civilization that outlives me (hopefully 😛).\nReflections on 20 March 2021: # I thought about this for a bit and I think one element that is lacking in the problem-solving approach is continuity. My favourite quote from Andrew Solomon\u0026rsquo;s TED talk is \u0026ldquo;forge meaning, build identity\u0026rdquo;. It feels like we somewhat still need an overarching \u0026ldquo;identity-building\u0026rdquo; approach to recognise why we are solving the problems we want to solve and to seek meaning in life.\n","date":"28 February 2021","externalUrl":null,"permalink":"/post/2021-02-28-the-problem-solving-approach-to-cv-building/","section":"Posts","summary":"why even intrinsic goals can be harmful","title":"The problem-solving approach to CV building ","type":"post"},{"content":"Presentation at UCL Moorfields Eye Hospital\nEvent: Wellcome Sanger Institute · Location: Cambridge, United Kingdom\nSlides\n","date":"22 January 2021","externalUrl":null,"permalink":"/talks/2021_08_journal_club/","section":"Recent \u0026 Upcoming Talks","summary":"","title":"Deep genomics","type":"talks"},{"content":"Presentation at Sanger Institute\nEvent: Wellcome Sanger Institute · Location: Cambridge, United Kingdom\nSlides\n","date":"22 January 2021","externalUrl":null,"permalink":"/talks/2021_01_22_journal_club/","section":"Recent \u0026 Upcoming Talks","summary":"","title":"Use rare variants to improve polygenic risk score","type":"talks"},{"content":"TL;DR: Let me know if I can be of any help.\nIf my skills could be useful to you, drop me an email at timingliu[at]outlook[dot]com with the subject: Service Sunday (symbols translated to English to avoid spammers). I will build a running to-do list and help as much as I can. Undone tasks will be attended to in the subsequent weeks. If you are here because you messaged me via other means, rest assured that your request will be taken care of, too.\nIn the email, please specify the importance and urgency of the task.\nDo note that because everyone only has 24 hours a day, I will prioritise services of the following nature:\nscalable (e.g. if you are asking for advice, can I write a blog post about it so that everyone can benefit) atomic (i.e. small, well-defined but impactful) reproducible: (i.e. can my services be passed on to help more people. The simplest thing to do is to let me know if you are keen to set up a similar scheme to help others) well-researched (there are so many information out there, so if the answer can be obtained from other sources (who are probably more authoritative than me), go for it) At the moment I will set aside one hour on Sunday to serve others and will adjust if needed. This also helps me to better focus during the week to become the more reliable and competent friend that you are looking for. Please let me know how I can help you.\nDid I forget anything? Oh yes. Charge. That is straightforward: you pay a flat fee of 0.\n- Service with honour1\nWhat I can and can\u0026rsquo;t do\nExamples of what I can do: # evaluation/discussion of ideas publicity for your work (e.g. speaking at the MedTech Foundation ) introduce you to like-minded people What I (probably) can\u0026rsquo;t do within that time: # coding for a project My plate is full currently, but feel free to email me anyways. I might happen to be free then or I might introduce someone to you. that is my high school motto, by the way.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"13 January 2021","externalUrl":null,"permalink":"/post/service/","section":"Posts","summary":"Let me know if I can be of any help.","title":"Service Sunday","type":"post"},{"content":"","date":"13 January 2021","externalUrl":null,"permalink":"/categories/website/","section":"Categories","summary":"","title":"Website","type":"categories"},{"content":"","date":"3 January 2021","externalUrl":null,"permalink":"/tags/programming-experiment/","section":"Tags","summary":"","title":"Programming Experiment","type":"tags"},{"content":" This is a fun and quick Christmas project and a reflection on whether I overthink too much.\nCompound interest is the eighth wonder of the world. He who understands it, earns it … he who doesn’t … pays it. - Einstein\nRegardless whether Einstein actually said that, it is no doubt that even small incremental improvement makes a large difference in the long term. Here I decide to apply the model to personal growth. Here I simulated compound growth rate and see if divided incremental improvement over a smaller period of time is better than sum incremental improvement over a larger period of time.\nThe conclusion is that assuming the growth rate is constant, there is no tangible benefits of smaller incremental improvement over larger ones. Considering the cost of context switching for reflection (2nd part), there may actually be a disadvantage.\nHowever, the caveat is that we can’t assume growth rate is independent of personal growth. In other words, frequent reflection may help us to maintain a high growth rate and avoid negative growth rate (e.g. procrastination or going in the totally wrong direction). Thus, for future work, this simulation will be repeated with a stochastic error rate that can only be corrected with reflection. For now though, it satisfied my whimsical curiosity.\nassume one grow 0.001 per hour\nthe first model assumes daily growth of 0.024 after 365 days the second model assumes hourly growth of 0.01 after 365*24 hours a \u0026lt;- tibble(x = 1:(365*10)) %\u0026gt;% mutate(daily = 1.01^x, hourly = (1+0.01/100)^(x*100)) %\u0026gt;% pivot_longer(cols = c(daily, hourly), names_to = \u0026quot;frequency\u0026quot;, values_to = \u0026quot;growth\u0026quot;) ggplot(a) + aes(y = growth, x = x, colour = frequency) + geom_line() + scale_color_manual(values = c(\u0026quot;blue\u0026quot;, \u0026quot;red\u0026quot;)) assume one grow 0.001 per hour:\nthe first model assumes daily growth of 0.024 after 365 days the second model assumes hourly growth of 0.0099 after 365*24 hours, due to context switching of reflection a \u0026lt;- tibble(x = 1:(365*10)) %\u0026gt;% mutate(daily = 1.01^x, hourly = (1+0.0099/100)^(x*100)) %\u0026gt;% pivot_longer(cols = c(daily, hourly), names_to = \u0026quot;frequency\u0026quot;, values_to = \u0026quot;growth\u0026quot;) ggplot(a) + aes(y = growth, x = x, colour = frequency) + geom_line() + scale_color_manual(values = c(\u0026quot;blue\u0026quot;, \u0026quot;red\u0026quot;)) + xlab(\u0026quot;days\u0026quot;) ","date":"3 January 2021","externalUrl":null,"permalink":"/post/2021-01-03-should-i-reflect-daily-or-hourly/","section":"Posts","summary":"","title":"Should I reflect daily or hourly","type":"post"},{"content":"Rating: 10/10\nIt was a second masterpiece written by Derek. Don\u0026rsquo;t let the word masterpiece deter you since it was written in such an approachable way. To continue with my analogy with Confucianism last time, this book is more like 论语 (Analects of Confucius). So different from Anything you want which is centred around Derek\u0026rsquo;s entrepreneur journey, this book is organized in different themes. As I read through Derek\u0026rsquo;s reflections in the book, I can\u0026rsquo;t help reflecting on my life:\nAm I saying too few noes and thus too few \u0026ldquo;hell yeah\u0026rdquo; Do I fear about being global Am I being future-oriented and neglecting the present Am I promoting myself as a tool, not an art \u0026hellip; The list goes on and you will probably see some reflections on this blog or newspaper later.\nget it from his personal website\n","date":"7 November 2020","externalUrl":null,"permalink":"/post/2020-11-07-book-review-hell-yeah-or-no/","section":"Posts","summary":"","title":"Book review: Hell yeah or no","type":"post"},{"content":"","date":"7 November 2020","externalUrl":null,"permalink":"/tags/derek-sivers/","section":"Tags","summary":"","title":"Derek Sivers","type":"tags"},{"content":"非淡泊无以明志，非宁静无以致远 -诸葛亮\nI went to the woods because I wished to live deliberately, \u0026hellip;, and not, when I came to die, discover that I had not lived. - Henry David Thoreau\nI will be on a retreat from today onwards. This involves\nreading, writing and meditating more time for self-reflection Why\nbetter understand myself and the world become a more empathetic person to others and myself make progress on projects that help others (instead of getting drowned in replying messages) experiment - an unexamined life is not worth living This implies\nI will only open instant messaging apps and emails between 11:10-11:15 and 19:10-19:15 every day (except Saturday which is the offline day) Thus, I may not have enough time to read and reply every instant message because the blocker extension will close all social media sites outside the specified hours. I may still send emails but all incoming emails are redirected out of the default mail box and will not be checked outside active hours I will not be able to attend social events until the retreat ends What does this mean to you:\nPlease forgive my delayed replies and regretful declination to invitations\nBUT please feel free to reach out to me if I can be of any help. Drop me a message for my emergency contact. Helping others is part of the retreat, too.\n","date":"3 November 2020","externalUrl":null,"permalink":"/post/2020-11-03-retreat/","section":"Posts","summary":"","title":"Retreat","type":"post"},{"content":"","date":"30 October 2020","externalUrl":null,"permalink":"/tags/app/","section":"Tags","summary":"","title":"App","type":"tags"},{"content":"","date":"30 October 2020","externalUrl":null,"permalink":"/tags/medtech/","section":"Tags","summary":"","title":"Medtech","type":"tags"},{"content":"Research, inspire, collaborate, educate\nVisit the project site\n","date":"30 October 2020","externalUrl":null,"permalink":"/project/medtechfoundation/","section":"Projects","summary":"Research, inspire, collaborate, educate","title":"MedTech Foundation","type":"project"},{"content":"","date":"30 October 2020","externalUrl":null,"permalink":"/project/","section":"Projects","summary":"","title":"Projects","type":"project"},{"content":"Rating: Life-changing\nAfter reading this book, I simply felt touched. I love how Derek simplified the whole entrepreneurship business into one phrase: creating happiness for you and your customers. It is that simple. This is a book written for the purest ideal in everyone’s heart. It also has the power of transforming that idea into practical actions that make a difference to the world. In Confucianism, he seems to have achieved the state of Junzi(君子), someone who projects his positive energy to benefit the society and cares more about the virtue, Ren (仁), than personal gains.\n❓ The material in questions: # Why engage in entrepreneurship How to be a happy entrepreneur Focus on customers, not profits Focus on activities, not formalities Focus on yourself (e.g. skills, interests), not efficiency or anyone\u0026rsquo;s expectations Focus on problems solved, not support won (e.g. funding, clients) How to bring your ideas to reality Make small wins in building rapport with customers Explore different options until there is a hit Trust, delegate and verify Foresee long-term consequences of short-term conveniences I loved this book and will read it over again. Every single sentence is my favourite quote.\nget it from Amazon or his personal website\n","date":"25 October 2020","externalUrl":null,"permalink":"/post/2020-10-25-book-review-anything-you-want/","section":"Posts","summary":"","title":"Book review: Anything you want","type":"post"},{"content":"","date":"25 October 2020","externalUrl":null,"permalink":"/tags/business/","section":"Tags","summary":"","title":"Business","type":"tags"},{"content":"","date":"25 October 2020","externalUrl":null,"permalink":"/categories/communication/","section":"Categories","summary":"","title":"Communication","type":"categories"},{"content":"I have just published my first document with bookdown and I am feeling euphoric at the moment. Somehow this gives me a very different satisfaction as compared to creating just a google document. Yes, they serve almost the same function, but the presentation of a bookdown document is much better. It also provides more functionalities and flexibilities than a google doc.\nHere are the minimal steps needed to customize a document from Yihui\u0026rsquo;s guide.\nFollow his guide and download a copy of bookdown-demo Add you own content Here are the few things you need to change so that it is fully customized: Yihui kept a chapter in index.rmd. You can delete that chapter (i.e. including the # mark but it may still persist). This is because bookdown detects a discrepency between the number of rmarkdown files and number of chapters that it used to generate and decided to go with the last rendered version of the first chapter (which has been deleted in rmd). To remove that chapter, simply move the content from 01-introduction.rmd to index.rmd and delete 01-introduction customize the header of index.rmd, including title author github repo description it seems if you change site then it cannot be published with RStudio then, edit _output.yml to change the toc and edit url to your book\u0026rsquo;s name and github\u0026rsquo;s repo if you would like people to download your book, use the following command to generate the books. # pdf bookdown::render_book(\u0026#34;index.Rmd\u0026#34;, \u0026#34;bookdown::pdf_book\u0026#34;) # epub bookdown::render_book(\u0026#34;index.Rmd\u0026#34;, \u0026#34;bookdown::epub_book\u0026#34;) # docx (remember to add this as an option in the output.yaml) bookdown::render_book(\u0026#34;index.Rmd\u0026#34;, \u0026#34;bookdown::word2_document2\u0026#34;) follow the instruction here to publish on RStudio. As of Oct 2020, the default option of RStudio is to publish it privately first and you can change the access later in the panel. when using bookdown::publish_book(), change the argument name = \u0026quot;\u0026quot; so that it publishes according to your book\u0026rsquo;s name (the website title) That\u0026rsquo;s it! Have fun :D.\n","date":"25 October 2020","externalUrl":null,"permalink":"/post/2020-10-25-communication-published-my-first-document-with-bookdown/","section":"Posts","summary":"","title":"Tips for publishing your first document with bookdown and RStudio","type":"post"},{"content":"Rating: Life-changing\nThis book changed my life. It provides extremely useful tips about productivity and prioritization even if you do not intend to quit your job, start your own business and travel around the world. The fact that this book was published more than a decade ago but is more relevant to the current economy says loads about Tim Ferriss\u0026rsquo; farsightedness. I have to say that I appreciated this book a lot more because I went through an immersive learning experience and found what I used to consider as work was simply me trying to get instant gratification (checking emails being one). The second half of the book may be somewhat less relevant to someone who does not intend to quit their full-time job now so I would recommend skimming it through and coming back to it later.\nIronically, the GoodReads review of this book is below 3.9 as this article is published. I get it, many tips in the book do sound uncooperative and even Tim Ferriss himself acknowledges that. But, the advice also prompted us to ask ourselves if our fear is real. It does not sound that disastrous even if someone says in the same way that Tim does in his book, does it? Then, it is up to us to take some of the ideas and present them in a much more empathetic and cooperative way. We need to talk is what I am reading right now to learn to be more empathetic and listen more.\n❓ The material in questions: # How to reduce the time spent on work How to decide on the priorities Threefold technique Remind yourself: am I being busy or productive Parkinson\u0026rsquo;s Law: do not let work expand to fill the time How to improve communication efficiency Develop a culture of only holding essential meetings and succinct phone calls Remove yourself from being the bottleneck of all communications Reduce the email frequencies and use a phone for emergency contact How to outsource non-essential activities Choose a team of freelancers to remove dependencies Give clear instructions and ask for stage-wise feedback Focus on work, not hours spent Give autonomy How to convince your workplace to accept your ideal working style Encourage experiments How to start your business How to prototype and test your ideas What is the market fit that brings you the most profit and least maintenance cost How to establish authority Why revenue/salary isn\u0026rsquo;t everything 20/80 rule: the 20% income may give you 80% of the headaches A modest income can still provide a comfortable lifestyle by working remotely and living in low-cost countries How to have a life after cutting down working hours How to travel around the world Only bring the essentials How to find meanings 💡 Favourite quotes: # Unreasonable people want the world to fit them but reasonable people change themselves to fit the world. It is therefore the unreasonable people who change the world. A person\u0026rsquo;s success in life can usually be measured by the number of uncomfortable conversations he or she is willing to have. Most people are fast to stop you before you get started but hesitate to get in the way if you\u0026rsquo;re moving. Excitement is the more practical synonym for happiness, and it is precisely what you should strive to chase. It is the cure-all. It\u0026rsquo;s lonely at the top. 99% of people in the world are convinced they are incapable of achieving great things, so they aim for the mediocre. The level of competition is thus fiercest for \u0026lsquo;realistic\u0026rsquo; goals, paradoxically making them the most time and energy-consuming. If you are insecure, guess what? The rest of the world is, too. Do not overestimate the competition and underestimate yourself. You are better than you think. get it from Amazon\n","date":"24 October 2020","externalUrl":null,"permalink":"/post/2020-10-24-book-review-4-hour-work-week/","section":"Posts","summary":"What to do trumps how much you do","title":"Book review: 4-hour work week","type":"post"},{"content":"Rating: 10/10\nThis is the kind of book that you want to finish once you have read the first page. Chris Lovejoy is a Cambridge medical graduate and physician-data scientist. He shares great content about productivity, data science and medicine on his blog and YouTube Channel so do check it out. This is the book that every medical student should read - the earlier the better.\n❓ The material in questions: # How to have a fulfilling career in medicine What is your definition of a successful career trail of whys attending your own funeral How to expand one\u0026rsquo;s impact incoporate soomething you like work on self-directed research projects How to cope with down time When and how to leave medicine (consciously) How to be an effective medical student How to study content effectively spaced repetition flashcards periodic review system understanding question-based learning (what this review is about!) Feynman method active recall remove distractions weekly reviews memorization techniques How to learn clinical skills effectively goal-oriented break down the game communication skills role model teach write What I love about this book how Chris presented his advice. Reading it is like having a coffee with him, listening to his seasoned advice and then receive a recommended reading list to explore these ideas further. He wrote his book for his sister and how I wish I had a brother like him! But fortunately he published this book, use it well.\nget it from amazon\n","date":"24 October 2020","externalUrl":null,"permalink":"/post/2020-10-24-book-review-the-modern-medical-student-manual/","section":"Posts","summary":"","title":"Book review: The Modern Medical Student Manual","type":"post"},{"content":"","date":"24 October 2020","externalUrl":null,"permalink":"/tags/medical-school/","section":"Tags","summary":"","title":"Medical School","type":"tags"},{"content":"","date":"24 October 2020","externalUrl":null,"permalink":"/tags/productivity/","section":"Tags","summary":"","title":"Productivity","type":"tags"},{"content":"","date":"24 October 2020","externalUrl":null,"permalink":"/tags/tim-ferriss/","section":"Tags","summary":"","title":"Tim Ferriss","type":"tags"},{"content":"It was the season of light, it was the season of darkness - Charles Dickens, A Tale of Two Cities\nHere are some lessons I learned from this summer, organized by projects:\nMedTech # CovMD.org # It was my first attempt to set up a startup. The aim was to create a forum to connect doctors on COVID-19 related topics. The project did not go as smoothly as we expected after 1-2 month and I have to personally pivot it by creating another platform.\nlesson learned:\ntime-sensitive projects can be very risky; we should work on projects that both benefit the current situation and has potential for the future keep an open organizational culture. Keep bringing in new people and ideas. The survival of the venture should depend on a team, not a single person ideation, quick prototyping and marketing ClinicianWiki.com # This project is ongoing and expanding fast so please email contact@clinicianwiki.com if you are interested. We adopted the lessons from CovMD and I learned how to organize a volunteer team, allocate roles, and many intricacies of dynamic website development.\nlesson learned:\nTreat any team as a volunteer team. People are hardly motivated by only monetary returns. Instead, lead a team along by giving mission, autonomy and growth to the members (and yourself) A self-motivated team can lead themselves and survive even when the founder is gone. Always build a mission-led team and develop leaders around us. Technology: Azure, DevOps, LAMP stack, lean development App development # I wrote apps for AreteMedTech and Cambridge University Hospital using Flutter and Xamarin (separate projects: one for respiratory disease diagnosis and one for COVID-19 monitoring). I was very fortunate to have great leaders and mentors in both project management and app development from whom I learned a lot. This whole experience strongly reinforced my learning of quick prototyping and exposed me to deeper software and hardware development. I will be continuing supporting these projects.\nlesson learned:\nWorking for fewer hours on more days has the benefits of keeping the mind refreshed and seeking support from others when they are available, but the cost of context switching is also high. The optimum should be the number of hours that one needs to complete at least one git commit (i.e. an independently functional unit). Technology: app development including backgrounding, animation, and hardware including Arduino MedTech Foundation # I was appointed as the National Programme Director for MedTech Foundation. In the next two years, I aim to foster a network and community in MedTech Foundation and build a platform that links different professions and industries.\nlesson learned:\nMany to come, but so far it has been great fun to organize national meetings and work with fantastic people to build a network that allows people to better connect.\nComputational Biology # I am working on a project to correlate rare variant to changes in metabolic level with Wellcome Sanger Institute and continuing my projects of developing diagnostic pipelines for pre-implantation diagnosis with the National University of Singapore.\nlesson learned:\nHow to achieve the \u0026ldquo;flow\u0026rdquo; state in data science work\u0026quot;flow\u0026quot; (hehe): I have been trying out ways to optimize both data analysis and package development pipelines. The mantra is always to remember that whatever is done twice (or even once) will be done many times so it is important to keep improving the way we do things to avoid spending time working on steps below our calibre. The importance of reproducibility. Again this ties nicely with the previous point. Good workflows should also allow results to be directly produced from data. Use git lavishly and use the release function on GitHub to provide production-ready code for collaborators. The art of data-intensive software design. Data-intensive software has different priorities from app development. It is important to understand which parameters to optimize for (e.g. I/O speed, often project-specific), design independent data structures and unit test data (in addition to code). The craft of presentation. I deeply enjoyed making interactive graphs, dashboards and shiny apps. Rmarkdown has revolutionized scientific reporting. Personal # I have gone through social isolation, scams and like many people, anxiety about COVID-19. It deepened my understanding of stoicism and mindfulness practice and I am very grateful for the lessons that made me a more mature/self-reliant/rational person. I also prepared and passed with decent results for the first-year medical school examination at Cambridge and I appreciate how this immersive learning experience that taught me the value of focus. It also laid a really good scientific foundation that I feel constantly benefitted from. Thanks to everyone for your support because nothing would have been possible without you. \u0026#x2764;\u0026#xfe0f;\nP.S. There are also some other projects that I explored and I will share them when the time comes.\n","date":"22 October 2020","externalUrl":null,"permalink":"/post/2020-10-22-2020-summer-update/","section":"Posts","summary":"","title":"2020 summer update","type":"post"},{"content":"TL;DR: look for communities, not just to seek help, but to help others.\nWe are in a loneliness pandemic (in addition to the ongoing COVID-19, of course). To find a solution, I have been very keen on looking for a community, where I can connect with like-minded people and collaborate to solve exciting problems. The idea of community resonated with me particularly well when I watched this video by the school of thought. The lack of communities would tend to misdirect us to romanticism, should we assume that all we need to solve our life problems is an ideal partner. Since an IDEAL partner is not a realistic solution, I start putting more faith in communities.\nIdeas, once rooted in our mind, often turn into a sponge that grows as it absorbs the fleeting information that we would have missed. I started hearing more people talking about how communities helped with their learning of programming, solving their startup problems. So I decided I must go and look out for a community, and I will live happily ever after. Sadly, this has not been the case. Of course, online forums have been very supportive, but there are still problems that I am unsure where to look for help. Even after I pose them, they sometimes receive very few replies. So communities did not solve all my problems, either.\nIn all this agony, I came to realize that I have been treating the idea of communities wrongly. A community is not a punch of brains for you to pick or wash (i.e. brainwash, pretty awful pun, I admit). The community support does not come by itself. It requires one person to build a strong group of followers. What that means is one has to contribute values to that community first. Community is not a panacea to all our problems; no one else will be as eager to solve our problems or spread our ideas as we do. In other words, communities are just a place and do not confer any solutions. What we are looking for is perhaps power. Power, not in the sense of exploiting others to serve our greed, but of directing a group\u0026rsquo;s energy to solve problems that we believe are worth solving. Power is what makes communities useful.\nBut before that, let\u0026rsquo;s solve some interesting problems, help a bunch of people, and build our expertise in the domain. Power comes from the strength within and positivity we spread. Once we have done that, people will start following us and we can finally lead the community for good.\n","date":"13 October 2020","externalUrl":null,"permalink":"/post/are-we-searching-for-communities-or-power/","section":"Posts","summary":"","title":"Are we searching for communities or power","type":"post"},{"content":"Rating: 8/10\nGrowth mindset used to be a quite trendy topic about 5 years ago and I remember myself being determined to develop the growth mindset. This book is sort of a revisit to the concepts that I was exposed to earlier.\nWhat I learned from the book:\nif fixed mindset people want to validate themselves, why don\u0026rsquo;t they stop after validating themselves once? there will always be challenges in life and fixed mindset people treat each of the challenges as a potential pitfall that can depreciate their worth, instead of an opportunity to grow. how should we educate children? we should not praise children on their qualities or success, but we should praise them on their effort. When children fail, it is fine to say things like \u0026ldquo;You do not deserve the win because others put more effort than you\u0026rdquo; instead of \u0026ldquo;this competition is useless and the judges are out of their mind\u0026rdquo; growth mindset are area-specific. One can have growth mindset in certain areas (e.g. programming) but fixed mindset in others (e.g. language learning). fixed mindset people tend to sacrifice their companies long-term growth for their short-term personal gains What I would have changed about the book :\nI would cut the book to be about 1/2 of its current length. The author gave a lot of examples to illustrate his point but those links are somewhat elusive to me. The author stated that these people succeeded because they had growth mindset and those did not (or failed after initial succcess) because they had fixed mindset. Unless the author has done the psychological tests on these people, I am not fully convinced that their mindset must be the main reason that these people succeed or fail, let alone the only reason.\nOverall, I think it is a good book that is worth skimming through (I listened to the audiobook at 1.5x to 2x the speed). What has really changed me is that instead of seeing growth mindset just as a personal development tool, I begin to view the world more in this lens so I can help to build a growth mindset community around me (and change/avoid fixed mindset people).\nGet it from Amazon\n","date":"13 October 2020","externalUrl":null,"permalink":"/post/book-review-mindset-by-carol-dweck/","section":"Posts","summary":"","title":"Book review: Mindset","type":"post"},{"content":"","date":"13 October 2020","externalUrl":null,"permalink":"/tags/power/","section":"Tags","summary":"","title":"Power","type":"tags"},{"content":"","date":"13 October 2020","externalUrl":null,"permalink":"/tags/psychology/","section":"Tags","summary":"","title":"Psychology","type":"tags"},{"content":"","date":"13 October 2020","externalUrl":null,"permalink":"/tags/review/","section":"Tags","summary":"","title":"Review","type":"tags"},{"content":"","date":"10 October 2020","externalUrl":null,"permalink":"/categories/contact/","section":"Categories","summary":"","title":"Contact","type":"categories"},{"content":"","date":"10 October 2020","externalUrl":null,"permalink":"/tags/contact/","section":"Tags","summary":"","title":"Contact","type":"tags"},{"content":"","date":"10 October 2020","externalUrl":null,"permalink":"/tags/medical-school-interview/","section":"Tags","summary":"","title":"Medical School Interview","type":"tags"},{"content":"Recently I have received many questions on medical school interview so I thought it might be good to share my tips with you.\nFirst, congratulations on receiving an interview invitation. It means that your application has passed the first few steps of screening and now you should discard any inferiority complex (if you have any) and believe that you have as much chance of getting in like any other people if you can shine in the interview.\nSecond, ask yourself what is the purpose of the interview. In most cases, it is a way for the interviewers to assess your suitability to the medical school that you are applying. So look at the admission criteria and jot down stories that demonstrate your fit. What is especially important (and neglected by many) is that the interview is an opportunity to be a three-dimensional person. For places like Cambridge, the interviewers are going to select the students that they are going to meet on at least a monthly basis so you want to behave like one. It is not about acting, but about being authentic and the best part of yourself. The same will of course apply to any other medical school. Although you may not have interactions with the academics on an as frequent basis they want to meet a student who is ready to become part of the university community. Remember to smile.\nThird, and this is specific to academic interviews and somehow a continuation of the second point. Treat academic interviews as a free lesson from the world\u0026rsquo;s top researchers in this field. Yes, seriously, engage in the academic discussion, explain your thought process and ask questions about the topic because you truly want it to be an enriching experience. The interviewers care much more about whether you are a teachable student than whether you know a bunch of facts. Knowing some facts will help, and it may be helpful to look up the \u0026ldquo;syllabus\u0026rdquo; in the first year and get yourself familiar with the topics, but what is more important is you can engage with the discussion, explore different possibilities, and do not fixate on a single answer. Be curious.\nFourth, practice. Practice makes perfect and like any mocks, they should be as close to the real experience as possible. That is about finding someone familiar with the interview process, wearing the same outfit and being in the same environment.\nFifth, take it easy. Remember, if you want to be a doctor, you will be one. You can apply this year, next year and many years after that. Your life goes on and you can always develop the knowledge and skills that help your medical career outside a professional training course. Perhaps you will also find something that fits you better, or you will develop some skills that make you a truly unique doctor. So think about your best alternatives. It can be another medical school, a different degree, or a gap year. The fact is any degree is probably just a means to an end, with the ending being the person you want to become. I told myself this when I was waiting for Cambridge\u0026rsquo;s application results: \u0026ldquo;even if Cambridge rejects me, I can still become the clinician-scientist who makes an impact on healthcare\u0026rdquo;.\nThat\u0026rsquo;s it. I wish every best with your application and if you want personalized tips or mock interviews, feel free to email me with University admission in the subject. I will try my best to respond, but if I am too busy (like this year), I can forward to my friends who may be available.\n","date":"10 October 2020","externalUrl":null,"permalink":"/post/medical-school-interview-my-two-cents/","section":"Posts","summary":"","title":"Medical school interview: my two cents","type":"post"},{"content":"TL;DR: I reply to non-urgent messages over the weekend when I not fully occupied. If a sooner response is expected, I will appreciate a reminder of the importance and urgency of my reply via a desktop-based platform.\nIt is undoubtedly frustrating when you try to reach someone but they do not respond. I hope this post provides some clarity if that \u0026ldquo;someone\u0026rdquo; happens to be me.\nI tend to check messages much less frequently than I did before. This is because the cognitive cost of context switching is quite high for me and so if there are matters that require rapid replies, asking for my emergency contact will help. I also check phone-based messengers much less frequently than desktop ones, so that means I will probably read your email first before getting around WhatsApp and WeChat. Sometimes I read a message when I do not have the capacity to write a good enough reply. But the messenger apps will check it off and I may regretfully forget to reply to these messages. Please send me a reminder if it is important and I really appreciate that. Many questions should be best asked on a public domain (e.g. StackExchange) and gather replies from people who are much more knowledgeable than me. If you do respect my opinion on this, I will be happy to receive a link to the question. Some questions, though, can be easily answered by a search engine. Unless it is mutually assumed, it is a good practice to indicate why the receiver is the best person to respond to that request and show why other means of getting an answer do not work. There will be times when I simply cannot check all messages, including but not limited to my exam time. I believe others may also have similar issues. In those cases, it may be good to check their website/social media to see what is the latest updates and adjust expectations. In conclusion, the following may be a good workflow when messaging someone, including me:\ncheck their current status indicate why they should receive the message send again via other means if important Thank you and I will be thrilled to receive your messages.\n","date":"10 October 2020","externalUrl":null,"permalink":"/post/reply/","section":"Posts","summary":"TL;DR: I reply to non-urgent messages over the weekend. If a sooner response is expected, I will appreciate a reminder of the importance and urgency of the message via a desktop-based platform.","title":"My replying habits","type":"post"},{"content":"I started writing daily when I was 16. Most of the writings were just dumping my thoughts so that my brain can be less burdened by them. It is the exact reason why computers have hard disks in addition to RAM. Writing thoughts down is simply a much less costly way to store them than holding them in the mind. It was only until recently that I started to write down my thoughts on my blog and I would like to share why.\nAs Francis Bacon said, writing makes an exact man. Putting pen to paper helps, but the benefits are multiplied when the work is shared with others. My writing is noticeably more biased and flawed in my journal than in my blog. When I write for my blog, I had to think about how others may critique my work and I would try to avoid glaring errors as much as possible. In this process, I achieved a more neutral argument that becomes more convincing even to myself. This increased level of clarity means I can live happier – the same type of happiness when you wiped away the raindrops on your glass and finally see the world as it is.\nIn this regard, writing also helps us to learn. As Feynman said, if you could not explain an idea to a twelve-year-old, it means that you have not really understood the idea. An analogy to computers here may help (you may skip to the next paragraph if it is too technical). If we were computers, each of us would be running a different operating system from others. In computers, the software can be transferred in semi English scripts but the machines process in binary digits. It is similar for us: ideas are transferred in languages understood by humans but not really the languages that our brains use, which communicates within itself using neurotransmitters between neurons. In order to use any scripts on a computer, the compilation must be done. The compilation is usually not a big problem for computers due to the limited number of operating systems available. But for us humans with unique operating systems modified by our education, families, and experiences, we will never know if compilation has been done correctly unless we test the output. Here is the value of writing – we can read others’ ideas, remember them (download the source code) and compile them (practice them), but until we write our thinking out (generate compilation log/bug report), we will hardly know the flaws in our thinking. It is not just for self-interest, either. The writer may have a very different operating system from you, and by writing out how you compiled their source code, you help so many people to learn, as they may share similar operating systems to yours.\nFurthermore, writing can help reduce trifling communications. Unlike talking, whatever is written can be skimmed, read, and reused countless times. This is frankly one of the greatest inventions of humanity because it allows ideas to spread like a pandemic. Speaking of which is probably the reason why most of us are alive. Imagine a world where diseases spread faster than the information about it. Most of the population will probably be killed by the time they know about it. It is thus a bit puzzling to see that so many of us are solely relying on primitive ways of one-to-one communication. I am not denying the need for private communications and the benefits it brings to interpersonal bonding, but it is indeed a pity if someone has great ideas that only get reiterated at dining tables. One of the baffling memories of any encounters is to be bombarded with the same questions repeatedly. For busier people among us may, for this reason, avoid such social occasions and ghost such private inquiries in whatever forms they may be. It will be a blessing for both the masters and the curious minds if this message is delivered to unsolicited visitors: “My thoughts and experiences have been discussed in depth in these articles. I will be happy to discuss them (probably to a bigger audience) if you could kindly send the questions over. Private communications are welcome but perhaps best conducted at breakouts in the events that I attend. Here is a list of them…”. The person who has done it really well is Jane McGonigal.*\nOne potential downside of writing is this: our ideas may (or will) change and we may not want to be held accountable to our past selves. This was one fear of mine. However, I realized that the important line to draw is not to be offensive in any form of communication, regardless of whether they will be documented. Other than that, there is no need and no way to try to please everyone and avoid judgment. Communication is the primary objective. Being stereotypically labeled by some may simply be an inevitable cost. As long as we document our thoughts and remain open, we can find a like-minded community and that is what matters. The cost of remaining in our shells can be too high.\nAnother fear that some people may empathize with is the fear of being unoriginal. What if we are just rehashing someone else\u0026rsquo;s ideas? What if the thoughts have been summarized so well by other people and my writing is just a waste of both the readers\u0026rsquo; and my own time? First of all, there may not be that many original ideas after all. there are 7 billion people on this planet, with billions died and trillions to come. Our human condition, however, stays largely the same. What troubled our ancestors 5000 years ago are still troubling us at this age, despite the vast improvement of our livelihood. So yes, I will not be surprised if my ideas have been expressed in one form or another. but the point here is that you are unique. The experience you went through (and your operating system) is unique. Trust me, people will want to see the thoughts and reflections behind our self-marketing.\nSo, go and share your thoughts with the world. I will be delighted to see you share them in the comments below (or via private messaging).\n*Nevertheless, there is a huge amount of value in private communication besides interpersonal bonding, but I will leave that to a future article.\n","date":"15 August 2020","externalUrl":null,"permalink":"/post/why-i-write/","section":"Posts","summary":"","title":"Why I write","type":"post"},{"content":"","date":"7 August 2020","externalUrl":null,"permalink":"/tags/decision-making/","section":"Tags","summary":"","title":"Decision-Making","type":"tags"},{"content":"This is an article written to properly document my experience about the first scam that I fell prey to, and the reasons why (I think) this happened. Note that this article is probably doomed with attribution errors and may not reflect what truly happened. Nevertheless, I believe through attributions we seek meanings and through meanings, we regain the confidence to live hopefully more wisely.\nThe protagonist behind the scam, who preferred to remain anonymous and refused to comment on this incident (as if I could ever contact them), hacked @mikkasmusic’s verified twitter account and changed its display name and profile to Elon Musk’s. They then commented on Elon Musk’s tweet about www.tesla-bitcoin.info that offers a double return to all cryptocurrencies sent to the website, with a limited number of bitcoins and Ethereum left. When I saw the post, I thought of it as a publicity stunt posted by Elon Musk himself. At that time, I did not even have a cryptocurrency account, but rather than giving up immediately (which I should), I saw it as a challenge worth solving. Within the next two hours, I set up a cryptocurrency account, spent all my summer funding on Ethereum and sent the money through. Unfortunately, the hackers did not keep their words and not a single cent was sent back to me☹… hey!\nIt was strange how I 100% believed in the scheme during those hours. One possible explanation may be that I am simply gullible, but past evidence showed it might not have been the case. I have received countless scam messages, but I often identified them through their spelling errors, suspicious URL/email address, poorly designed websites and lack of https encryption. In fact, my alertness was perhaps not that low during this whole scam either. During the hours of the adrenaline rush, I was stressed but I was also careful enough to check whether the website that I bought Ethereum might have been a scam. I was also meticulous when purchasing Ethereum: as it required bank transfer, I was careful enough to first transfer 10 pounds and saw the money through before I transferred a bigger amount. The mistake here was getting too deep in the rabbit hole without ever stepping back and reflecting on the whole event. I was the smart fish carefully crafted a plan to catch that delicious worm, only to be caught by the hook behind.\nApart from not taking time to think about the bigger picture, here are a few other reasons why I was deceived:\nFirst, I was greedy. I have been looking into MedTech recently and I realised that so many people succeeded after they received grant or investment at almost zero cost to them and I was eager for similar success. This scam was an embodiment that a person like me could also succeed fast and easily. I had placed too much trust in finding the right opportunities. The whole mechanism looked too familiar to me: I captured the opportunity when not many people noticed, I learned how to use cryptocurrency and once I showed the world my progress, I would get rewarded.\nSecond, I had unconditional belief on something, this time technology and its embodiment, Elon Musk. I have been having personal worship of Elon Musk for a long time and I did not give a thought that this could be a scam at all. A key component to hypnosis is unconditional belief. I was unknowingly priming myself for the scam for the few days before the scam as I was listening to podcasts on a MedTech firm founded on blockchain technology. This recent experience heightened up hope and dropped alert for a technology that could be used to cause harm. This unconditional belief also came from ignorance. In fact, all unconditional beliefs come from ignorance or even self-selective ignorance. Had I been aware of the epic twitter hacking happened a week before my scam, I would probably have easily dismissed words like “bitcoin” and “double return”. It was a shame that I did not keep up-to-date with the news because I was focusing on work and when I did try to let information in, the scammer delivered the fake one.\nThird, I went in alone. I skipped all communications when I was involved in the scam. The scam created an illusion of community by first posting grateful comments on twitter, then led the victims to a fake Medium page with further comments of appreciation, and lastly to the main scam page with fake records of incoming Ethereum and double returns out. This also got me thinking about the underlying problems about how most of us evaluate the validity of anything online: we often sought others’ reviews without carefully considering whether they are indeed real. Yes, I was careful when reading the positive reviews put up by the sellers themselves on their websites, but I did not put up a defence against second opinions on social media platforms. Another way that the scammers minimized social interactions was the time pressure. The remaining amount of Ethereum was dropping fast and although I wanted to call my family and friends to share the good news with them, given that it is not always possible to reach others immediately, I chose to get my “reward” first and then share my profit thereafter. The isolation enforced by the pandemic did not help with the situation, either.\nFourth, I had no workflow that I could have followed when making financial decisions. The summer funding came just a few days ago and was lying in the current account. I had not been a careful person with money because I considered it as a distraction to my work. I have been frugal enough that I rarely needed budgeting to make ends meet. This is where I failed. Had I been more serious about financial security, I would have carefully contemplated the risks involved by considering it as a serious investment. But no, I thought I was in a safe position as I had never really been responsible for my financial decisions. This is perhaps one manifestation of the classical moral hazard – I took a risky decision because subconsciously I thought that someone else would pay for the price of failures.\nWhen I look back on this whole incident, I often think that I am the real protagonist that deceived myself. No, sorry there is no plot twist that I created the scam in my sleep. If I did, I hoped that subconscious me return the money to my account when he saw this post. NOW. Jokes aside, it was me who raised my cortisol (stress hormone) level by working for too long and that perhaps clouded my thinking; I primed myself for an online scam that perfectly fit my mentality, working style and beliefs; I was in a situation where no one was nearby to offer advice (in fact, I think I may just call the police to seek their advice next time before I transfer any money to strangers again). I saw the red flags: weird URL (testla-bitcoin.info, why not just use tesla.com?), fake medium page, and a reasonable remaining amount of Ethereum even after two hours of running the event, but I made up stories for that. Oh, maybe it is just a public stunt website and perhaps people were too afraid to send in the money, especially when the remaining amount becomes low because there may be a chance of losing. It is important to recognise our brain’s power in legitimizing what we want to believe. As Bertrand Russell said, “I Would Never Die for My Beliefs Because I Might Be Wrong”. It is perhaps helpful to remain as a sceptic, even to ourselves.\nThanks for reading thus far. Yes, I am flawed, but perhaps we all are. I am grateful for the flaws exposed by this incident so that I can work on them and minimize the chances of making rush decisions that may harm other people. There are too many learning points from this incident that I would love to share, but I decided it would be wise to first read and listen more before I write to make your reading worthwhile. Stay tuned and take care :).\nP.S. Being sceptical is essentially what being a scientist is about, except for most people scientific education has largely been about acceptance and memorization rather than questioning. I am trying to become a true scientist, too.\nP.P.S I am not sure if it is a good idea to share my weakness online, so I may actually remove this article in the future. For one I am worried about being frowned upon and secondly, I do not want other scammers to psychoanalyze me for future gains. What do you think? Let me know in the comments or drop me a private message.\n","date":"7 August 2020","externalUrl":null,"permalink":"/post/getting-scammed-what-happened-and-why/","section":"Posts","summary":"","title":"Getting scammed: what happened and why","type":"post"},{"content":"Nothing is unhealthy when exercised at a moderate amount. Whether or not certain activities can be considered as excessive depends on how well our values align with the underlying motives of the activity. Shopping, though a harmless activity in itself, can be intrinsically outward-seeking and mind-manipulating if we do not approach it with an understanding of its repercussions.\nFor one, shopping encourages us to own possessions so that we can please other people. We need to ask ourselves the question of how much of our belongings are needed if we are the only living human being on this planet. From this, we will be able to filter out those we need and those we possess to impress others. Critics may argue that most activities, apart from basic physiological needs, have others\u0026rsquo; involvement. So we inevitably spend some time thinking about others\u0026rsquo; judgement on our work. But the key difference between shopping and other work that we do is that other work is about solving a problem that is critical to our species\u0026rsquo; existence and understanding of nature. For example, even if I am the only person on earth, I will still be curious to know the mechanisms behind cancer, and how our history rolled out the present, but I will be much less conscious about how I look and whether I am using the most luxurious product. The underlying motive for shopping, therefore, is largely to use our resources to improve others\u0026rsquo; impression of us. But since we have little control whatsoever over what others\u0026rsquo; think, we inevitably choose to live in a more unsettling life when we spend more time pleasing others.\nSecondly, to shop without a clear need in mind is to thoughtlessly subject oneself to the all-powerful marketing strategies that are so good at creating fake demand. There is no doubt that when we give up our independent thinking before taking actions, others will swiftly take over our thinking and inject in ideas that will benefit them. It is like watching prolonged YouTube advertisements that we tend to skip when we think rationally. Of course, a point must be made that sometimes it is relaxing to let go of the control and just wait for others to tell us what we need. After all, most of the education is about parents and teachers teaching us what they think we need to know. It is also necessary to explore before deciding what may be best for us. The key here is the degree to which we explore. For me, I tend to go shopping once or twice a year to decide what may be my best outfit for the season, and I buy a lot of them, mostly the same type, that can satisfy my needs for the rest of the year. I believe shopping on a positive side is an activity of adjusting our goals. Every time we shop with the intent to explore, we explore what our goals are for our outward projections. It is thus unwise to spend too much time adjusting one\u0026rsquo;s goal - a big tech\u0026rsquo;s CEO may engage in strategic thinking a few times a year, but they probably do not wake up every morning and contemplate whether their company should go to marine, construction, or oil business. They decide their objectives and do not look back until another appropriate time. It is thus necessary for those of us who shop on a frequent, regular basis to reflect whether adjusting so much is indeed necessary.\nShopping is also a social activity. Many go shopping to spend time with their loved ones. This is entirely reasonable after we ask ourselves the question of whether this will be the best way to foster the bonding. For some of us, yes. Shopping malls contain myriad products that may inspire discussion topics, but if one wants to look beyond our everyday thinking around products, other places should at least be an option before we decide on our plans. A more thought-provoking environment built by nature or human\u0026rsquo;s best creativity: a mountain, a beach or a museum, can be a better place to know about each other\u0026rsquo;s personality than our materialistic shopping malls. Of course, there is no question that many shopping malls are masterpieces of designers proficient in arousing desires. They are probably worth visiting for studies on human\u0026rsquo;s manipulative mind and subliminal messaging.\nShopping itself is not harmful, and it is an essential activity that our economies run on. Excessive shopping, however, may be a symptom of subconscious insecurity and misplacement of our values that we should at least be aware of.\n","date":"7 August 2020","externalUrl":null,"permalink":"/post/pitfalls-of-shopping/","section":"Posts","summary":"","title":"Reflections on shopping","type":"post"},{"content":"While I initially intended to write about rest being a myth, but after contemplating and discussing with friends, it will perhaps be more reasonable to write about our often mythical thinking about rest. Rest here is defined as the time outside our standard working hours and time required to meet our physiological needs (e.g. sleep). We all can roughly divide our 24 hour day into three parts. We spend 8 hours on sleep, 8 hours on contracted jobs, and it is how we spend the last 8 hours that defines our life.\nA large part of our perceptions about rest is artificial and set by the media and the social environment that we are in. For example, the idea of weekends was created by Henry Ford when he realised that the demand for his cars was low among his workers because they simply had no time to travel. Thus, he set his workers free on Saturday and Sunday in a bid partly to encourage his workers to consume. A 40-hour workweek was also legalised to combat unemployment at that time.\nUnderstanding that rest hours are simply the expectation of the employers may help to prevent us from unnecessarily internalizing that expectation. They are simply the hours that we are not expected to work for our companies. But for those of us who hold higher expectations of ourselves, we should not let the external expectations be self-limiting. In fact, if we strongly believe that we should not work after a certain time, work will be doubly exhausting when we have to do them: one for the energy required by the work and one against our own unwillingness to work. If we think of our world like the Matrix in the epic film, the so-called standard working hours are simply the routines set up by the software. To gain true freedom, we must learn to believe in our abilities and break those limits. We must also learn to leap, not between buildings, but across our dichotomy of “work” and “life”.\nFor those of us unable to wait for the rest hours as an escape from our work, we must think deeply about whether we truly enjoy it. There is nothing wrong with taking a break from prolonged work, as even the most exciting work can become mundane and monotonous if we are too accustomed. Yet, it demands deep retrospection if our work is pulling down the level of our happiness and we need rest hours to be filled with dopamine to restore our ideal equilibrium (by the way, dopamine does not bring happiness but that is the topic for another day). Yes, everyone can be exhausted from our work, but those with a strong interest in their work are more likely to seek peace and reflection than games and TV shows that still require mental energy. I choose to refrain from commenting on parties because of the alleged difference between how introverts and extroverts recover their energy state.\nA strong argument for rest is to avoid spending all our time on work where our performance is consciously or subconsciously judged. If we spend all time on work, we may start to misplace our identity solely on work and may mistake the quality of our work as an assessment of our values. However, that should not prevent us from engaging in self-improving and productive hobbies, or projects that do not have tight deadlines. Regardless of how hard we try, a certain degree of our values will be inevitably placed on the work we do (I will correct this when I have achieved nirvana). Then, by working on different projects, we diversify that value investment so that in any unfortunate event that some projects did not go well, we can still be happy about our career in general. If we (and we should) work in highly welcoming and motivating teams, our values may be further aggregated by the social support from them.\nIt is, of course, entirely reasonable to think about our priorities outside our work and spend the time on activities that support those priorities, but it will be unwise to indulge in entertainment without thinking. Thinking is the keyword here. Family is, of course, a top priority for many of us, and it is natural for us to tend to spend more time with our loved ones. But it is not merely sufficient to meet the quantity of time. It is equally important, if not more, to plan activities that foster the bonding among family members. Reading for your children or hiking with them, for example, maybe much more enriching experiences than watching TV series on the sofa. Many of us merely take rest as an excuse to escape active planning and thinking. That is where the myth comes from.\nAs Socrates said, an unexamined life is not worth living. We are often forced to examine the hours at work, but it is often the self-examinations outside the work that makes a difference.\nP.S. I had to examine my own belief about rest after I was scammed. I had to reflect whether long working hours is the reason for my clouded thinking. The answer is that it probably is part of the reason, but not the root cause. Long working hours were merely a manifestation of an unbalanced lifestyle. I noticed that I spent less time reflecting, planning, meditating, exercising and eating healthy food. I also took less pomodoro but instead rushed to get the work done (and ironically, took more time as a result). This article does not intend to preach workaholism. What I am advocating is to think independently, creatively and most importantly, think, even when no one asks us to.\n","date":"6 August 2020","externalUrl":null,"permalink":"/post/the-myth-of-rest/","section":"Posts","summary":"","title":"The myth of rest","type":"post"},{"content":"Recently, a new identity has been added to my list – a scam victim. The price I had to pay for this new identity is the funding that I had for the whole summer. For the past few days, I have been trying to draw wisdom from this experience in life, and here is the first post on the many thoughts that I had.\nIf we divide everything in life into internal and external categories, money probably belongs to the external one for most people. It was only after this first personal financial crash that I came to realise, most unhappiness associated with the external things is linked to a desire for control. If we do not delude ourselves that we have controls over something, we will not have pain associated with those things. Take the weather for example. Its natural variations are something that most of us get used to. Yet, we find it hard to accept when weather forecast got it wrong and spoiled our planned picnic with rains, or marathon with burning sunlight. This is because we assumed complete control over things that we frankly have little of it. Although many of us may assume that we have control over our financial assets, the unfortunate truth is we do not. Partial control simply means that things can still go haywire. There are so many ways money can be lost in modern life: physical cash can be stolen, the bank account can be hacked, and all the monetary tokens would become valueless should our current financial systems collapse. The same principle applies to power, friendship/relationship and even health. All these conventional sources of joy can and will leave us and bring us unhappiness, as Schopenhauer once put in his essays.\nThat is not to say that we are completely powerless in life. We still have controls over two things in life, action and attitude. These two attributes can help us exert influence on other external things, but they cannot bring us control. To use them well, I propose two mental models that may help us.\nThe first is the normal distribution and it is linked to the actions we take. The gist of the normal distribution is to think events in our life not as an absolute value but as a relative probability. Our actions can increase or decrease the likelihood of certain events’ happening by pushing up or pulling down the average, but no matter how much we do, it cannot change the fact that undesirable things can still happen and overthrow our assumed control over life.\nThe second is perspective thinking and it is related to our attitude. As Hamlet said, there is no good or bad but thinking makes it so. It provides us with extreme confidence to deal with the seemingly unfortunate events in life if we adjust our objectives to be a philosopher. Philosophy means love of wisdom, and to a philosopher, nothing is more desirable than events that increase our wisdom, even though those events may bring us physical and/or emotional pain. Many Buddhist monks chose to give up all their life savings so that they can leave the materialistic life behind and gain the freedom of the soul. Things that we want can at the same time be something that some people strong detest, and the things that we desperately want to drive away, maybe the things that some wise men are actively seeking. When life gives you a lemon, do not complain that it did not give you an apple, and perhaps not even immediately turn that into a lemonade. Learn to appreciate that lemon for its sourness is what life has to teach you.\nBy forsaking the illusion of control over external things, we will avoid compromising our actions and attitude for life’s losses and regain our control on how we face them. As William Ernest Henley’s Invictus goes, we probably have no control over how charged with punishments the scroll, but we can remain as the captain of our soul.\nFor more information, I recommend Mo\u0026rsquo;s talk at Google\n","date":"31 July 2020","externalUrl":null,"permalink":"/post/the-downside-of-control/","section":"Posts","summary":"","title":"The downside of control","type":"post"},{"content":"","date":"19 July 2020","externalUrl":null,"permalink":"/tags/full-stack-clinician/","section":"Tags","summary":"","title":"Full-Stack Clinician","type":"tags"},{"content":"How we educate our next generations of clinicians is still largely based on rote learning. This must change.\nRight now, the landscape of medical innovations is fragmented: the scientists produce discoveries that take a long time to benefit bedside care; the technician may not fully understand the needs of the patient management; the business professionals could face challenges in gaining trust for their social enterprises; the clinicians find it difficult to articulate practical product design. This must change.\nMany clinicians constantly get reminded about the two main career paths in medicine. The first path is to stay in the clinical route and pursue clinical excellence and the second path is to leave medicine and work as a biomedical scientist or consultant. The effort to integrate these two paths often face administrative difficulties, lengthy training years and worse \u0026ldquo;work-life balance\u0026rdquo;. This is a pity. This must change.\nThe idea of \u0026ldquo;full-stack clinician\u0026rdquo;1 came to my mind: someone who is skilled/knowledgeable in the very back-end of biomedical science, the media of soft and hardware technology and the very front-end of patient management - all strung by lean business development.\nPerhaps, it feels like another synonym for clinician-scientist/entrepreneur/engineer, but I cannot resist the excitement of integrating multiple domains to developing a minimum viable product that ultimately push medicine forward. Unlike any of the clinician- terms above, the role of full-stack clinicians stands from the overall development cycles of medical innovations. Our future full-stack clinicians should be proficient in science and technology but not blinded by feature creep, understand the impact of capitals but look beyond profits, familiar with patient management but not accustomed to its problems.\nIt takes the whole medical tribe to raise full-stack clinicians. It requires a paradigm-shifting change in our medical education, pre- and post-graduation; it requires our healthcare systems to act more like technical firms that embrace innovation and most importantly, it requires a group of clinicians to step forward, take on the challenge, and build a community that brings about the change.\nYes, change will come in the long run, but how long can we wait. We can\u0026rsquo;t wait and let our fragmented healthcare system be hit by global pandemics again and again; we can\u0026rsquo;t wait and allow our healthcare data to be monopolized by unethical firms; we can\u0026rsquo;t wait and permit our patients and colleagues to endure the lack of effective innovation in our field. As Keynes put it, in the long run, we are all dead.\nThe change must happen within us.\nLet\u0026rsquo;s bring about the change.\nFull-stack is originally a computer science term. \u0026ldquo;Stack\u0026rdquo; refers to the set of technical components to complete a task. Being full-stack indicates the capability of doing both back-end server-side and front-end client-side programming. I do full-stack development, too, because understanding the technology is necessary to link biomedicine and bedside care.\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","date":"19 July 2020","externalUrl":null,"permalink":"/post/opinion-the-case-for-full-stack-clinician/","section":"Posts","summary":"Let’s build a community of clinicians with various skills","title":"The case for full-stack clinicians","type":"post"},{"content":"Predict attacks and target treatments for asthma and COPD\nVisit the project site\n","date":"30 June 2020","externalUrl":null,"permalink":"/project/arete/","section":"Projects","summary":"Predict attacks and target treatments for asthma and COPD","title":"Arete","type":"project"},{"content":"I founded ClinicianWiki as a spin-off of the MIT COVID19 Challenge winner CovMD. Our vision is to create an online medical knowledge base free for everyone to read and every clinician to edit. During COVID-19, our mission is to provide a non-profit platform that is more structured than social media and more interactive than UpToDate/official guidelines. It aims to facilitate communication of clinical and scientific findings among clinicians and direct them to the relevant evidence. It is currently viewable by all members of the public and editable by clinicians.\nWe welcome clinicians (e.g. doctors, nurses, community healthcare workers), developers, business professionals and anyone with ideas and skills to join our project.\nTo get in touch, please email hi@clinicianwiki.com and feel free to register an account.\n","date":"30 June 2020","externalUrl":null,"permalink":"/project/clinicianwiki/","section":"Projects","summary":"Spread expertise, not virus","title":"ClinicianWiki","type":"project"},{"content":"","date":"30 June 2020","externalUrl":null,"permalink":"/tags/open-medicine/","section":"Tags","summary":"","title":"Open Medicine","type":"tags"},{"content":"","date":"4 May 2020","externalUrl":null,"permalink":"/tags/dynamic-website/","section":"Tags","summary":"","title":"Dynamic-Website","type":"tags"},{"content":"","date":"4 May 2020","externalUrl":null,"permalink":"/tags/log/","section":"Tags","summary":"","title":"Log","type":"tags"},{"content":"","date":"4 May 2020","externalUrl":null,"permalink":"/tags/mediawiki/","section":"Tags","summary":"","title":"Mediawiki","type":"tags"},{"content":" Recently I have been working on a project to set up a customized Wiki with MediaWiki. It is a new challenge for me because it is the first time that I am building a dynamic website that requires the setup of a server.\nThe end goal is to host it on Azure, but there have been some challenges in using either a web app or a virtual machine. So I decided to localize the issue and first set up the website on a local machine. This will separate problems of cloud computing from setting up website and server and setting up locally will also provide me a few GUI tools to easily experiment with.\nThe biggest problem faced today is the set-up of MySQL server. The LAMP on my computer was installed more than half a year ago for me to test Shiny app installation. Because those were not properly documented (lesson learned!), I have forgotten most of the set-up. The importance of documentation cannot be stressed further, especially when adjusting system settings that I am not familiar with. This is because when I set those configurations, I mostly just follow the instructions online and not documenting what has been done can result in problems from incompatibility (bugs) to security issues.\nMySQL The first issue occurs when trying to log in to MySQL server. mysql -u root -p First error: Can\u0026#39;t connect to local MySQL server through socket \u0026#39;/var/run/mysqld/mysqld.sock\u0026#39; (2 \u0026quot;No such file or directory\u0026quot;) Resolved by this document.\nsudo service mysql stop sudo service mysql start Second error (same command): mysql \u0026quot;ERROR 1524 (HY000): Plugin \u0026#39;unix_socket\u0026#39; is not loaded\u0026quot; Resolved by a combination of this and this solution. 1.\nsudo su /etc/init.d/mysql stop sudo nano /etc/mysql/my.cnf\nAdd the following lines at the end:\n[mysqld] skip-grant-tables sudo service mysql restart\nmysql -u root\nuse mysql\nselect * from mysql.user where user = 'root'; - Look at the top to determine whether the password column is called password or authentication_string\nIn my case it is called Password.\nUPDATE mysql.user set *password_field from above* = PASSWORD('your_new_password') where user = 'root' and host = 'localhost'; - Use the proper password column from above UPDATE mysql.user set Password = PASSWORD('your_new_password') where user = 'root' and host = 'localhost';\nexit\nsudo nano /etc/mysql/my.cnf\nRemove the lines added in step 2 if you want to keep your security standards.\n/etc/init.d/mysql stop kill -9 $(pgrep mysql) /etc/init.d/mysql start For more info on kill -9, see here. The command actually returned format error but I think that is because all processes with $(pgrep mysql) have been closed.\nexit Update on 20200511 The LAMP server is finally set up on the remote ubuntu computer today. The overall process should not have been so challenging, because I could set it up quite easily on my personal ubuntu PC. However, the difficulty is that the remote computer had a different version of ubuntu installed, and the online tutorials did not help because of the recent updates on MySQL server that prohibits login using root unless the user is in the root mode\nInstruction-wise, follow this documentation to install lamp and phpmyadmin. I set up a database and password when installing phpmyadmin. Use that password and username phpmyadmin to log in either localhost/phpmyadmin or mysql -u phpmyadmin -p (in normal user). This should set up the server properly. If not, keep reading.\nSo I had a big trouble because I installed the whole LAMP under another user (the default root user) one year ago and I unknowingly installed another layer of LAMP under the current user (another normal user with sudo authority). The whole server was broken in at least two ways. First, it cannot render .php code. Second, log in to mysql is difficult (as explained before the updates today) and never really worked properly. It was resolved by\nstop the service. sudo kill $(pgrep mysql) purge the software. There are many solutions on various websites, and according to the comments and votes some worked and some did not. So I think the key here is really to follow the lessons below. Read each solution carefully, adapt the solutions if needed (e.g. to your specfic version) and always look at multiple solutions and comments before you decide which one to use. Always document. Resources at the bottom contain solutions that I have trialed and erorred but they may not work again as things are updated. One quick example on adaptation, say you want to uninstall php, sometimes you may have to try php, php7, php7.*. Things can get even more complicated for mysql since there are both server and client packages. delete the folders, according to an old, potentially outdated documentation (optional) adjust permission. It might only be an isolated problem but if there is any error similar to this appearing, try the soltuion. Overall, I think I have learned a few lessons from this whole experience.\nWhen looking at any existing solutions, 1. always check official documentation first 1. check that the problem is the same. 1. check that the version of software is the same. 1. learn the general principles, for example, usergroup and permission in this case, under all circumstances and understand specific code if possible. 1. know how to revert the action action befor eyou do it. Linux does not have a redo button and cannot easily remove packages with one uninstall button in Windows. 1. document. This cannot be stressed enough and there must be a better way than my current practice 1. check the results of the code run - always look for errors 1. most importantly, learn to live with bugs. There will still always be bugs even if you follow all the above steps, so you got to live with them and follow the above steps when trying to solve them so you do not create new bugs as a result.\nResources https://askubuntu.com/questions/172514/how-do-i-uninstall-mysql https://askubuntu.com/questions/50101/how-do-i-remove-the-lamp-stack-so-i-can-start-over https://askubuntu.com/questions/770726/unable-to-install-mariadb-on-16-04-unmet-dependency https://askubuntu.com/questions/643251/having-trouble-installing-and-removing-mysql-in-ubuntu Epilogue Apparently there are some issues now (20200511) with vscode. When I tried to install mysql plugin it first said it failed beacuse Permission denied. It could not load ~/.vscode/extensions/.obsolete. I suspect that could be a user permission issue and checked. I found that all files but two - a python exnteision that I installed just to check the permission, and failed and .obsolete files belong to root:root. So I use chown username:user_group file to change the permission. Now it can be installed successfuly but loading again is an issue. I suppose it is not really an urgent issue to be resolved now, but I will document it for future reference.\n","date":"4 May 2020","externalUrl":null,"permalink":"/post/set-up-server/","section":"Posts","summary":"","title":"Set up server","type":"post"},{"content":"","date":"4 May 2020","externalUrl":null,"permalink":"/tags/web-server/","section":"Tags","summary":"","title":"Web-Server","type":"tags"},{"content":"","date":"16 September 2019","externalUrl":null,"permalink":"/categories/bioinformatics/","section":"Categories","summary":"","title":"Bioinformatics","type":"categories"},{"content":" Recently I have been tidying up data for my research projects in NUS. This process of dealing with a few TBs of data in one day made me slightly paranoid of the integrity of the data: where should they be stored, which archiving + compresssion protocal should be used, which local/remote file transferring algorithms should be used and even what kind of media - should they be transferred via USB or ethernet. I believe maintaining a good practice to ensure data integrity is one of the few things that may be tedious at the start but beneficial in the long run (just like detailed documentations). Since bioinformatics is a data science, ensuring the integrity of the data is the first step towards reproducibility.\nThere are many ways whereby the data can be corrupted. Thus, it is best to check the data integrity (e.g. checksum) periodically and before and after transferring. But I have been thinking if it is ever possible to ensure the integrity before and after compression, since there is no way to compare the data after it has been transformed (as compared to just relocating them).\n","date":"16 September 2019","externalUrl":null,"permalink":"/post/bioinformtatics-data-integrity/","section":"Posts","summary":"","title":"Bioinformtatics data integrity","type":"post"},{"content":"","date":"16 September 2019","externalUrl":null,"permalink":"/tags/file-management/","section":"Tags","summary":"","title":"File Management","type":"tags"},{"content":"This is an opinionated post on my belief how the future of text editing should be.\nI have been editing my CV recently. The purpose of a CV is to illustrate a person\u0026rsquo;s relevant professional experience in a field and basically to sell someone out. Since it is about selling, then some customization is required for each post to achieve the best impression. The basic content across all documents is likely to be similar or the same, but the sequence may need to be rearranged to highlight different expertise for different audience.\nI believe this problem can be best solved with programming instead of a WYSIWYG software like Microsoft Word. The content should be left as plain text in separate chunks and settings can be made to determine what is the sequence of the chunks and whether some chunks should be replaced by others. When one needs to update their CV, all they need to do is to update the basic content and choose the category they want. This will save tons of effort to edit across different CVs and worry that some content may be missed out.\nYihui Xie has put some effort to produce a R package named pagedown and I look forward to its development. For any heavy user of docx, ppt and xls editors, it will be far better and efficient to learn to use programming alternatives (namely R) instead for its reproducibility.\n","date":"25 August 2019","externalUrl":null,"permalink":"/post/opinion-why-plain-text-files-shall-prevail/","section":"Posts","summary":"","title":"OPINION: Why plain text files shall prevail","type":"post"},{"content":"","date":"25 August 2019","externalUrl":null,"permalink":"/tags/text-editing/","section":"Tags","summary":"","title":"Text Editing","type":"tags"},{"content":" I am writing this post not as a guideline, but mainly for self-reference and hopefully a prompt for discussion.\nThe boom of bioinformatics in recent years is coupled with cheaper technologies and consequently the surge of the amount of data available. The rapid development of the field itself is an anti-estblishment movement - even the most experienced bioinformaticians must spend a significant amount of time getting updated with the resources and toolkits. When preparing my current manuscript, I started to explore more on bioinformatics database - NCBI, UCSC, ClinVar, DECIPHER, dbSNP - just to name a few. I found the amount of data is overwhelming at best and I think it is important to discuss a few of the hallmakrs of bioinformatics data in this post.\nThe first hallmark is the lack of comprehensive guidelines to mine from the data. The speed of its devleopment has arguably much outpace the writing of any up-to-date textbook. While general computing, biological and statistical knowledge can still be acquired from tutorials, most skillsets have to be equipped through frequent uses of online search engines.\nThe second hallmark is the lack of one single authoritative dataset. Arguably the most important data in the bioinformatics, human genome build, is itself a mess. I have to rely on Heng Li’s blog to decide which reference to use. The UCSC and NCBI builds are incompatible, with difference names for reference genomes. For SNPs, there are dbSNP and kaviar and argulably many more, and they all have their own versions. It is not just a free market, it is the wild west. So, as Heng Li’s post said, welcome to Bioinformatics.\nThe specific issue that I have encountered is the querying of SNP reference number for FMR1 gene’s CGG expansion. If one just takes a look at the genome browser at the bottom of the page for rs193922936, one can definitely notice that there are dozens of SNPs all within the expansion region. But my question is this, how can one differentiate even one from the other? Instead of giving each repeat size a SNP number, if that is even what it is intending doing, would it not be good to just give the whole microsatellite a SNP reference? The irony is, there is no SNP reference for the whole expansion. Just when I thought the condition was taken by NCBI as multiple types of indels instead of a microsatellite, I realised that the microsatellite actually has the ClinVar number. And perhaps one is not enough to show the condition’s importance (I am kidding here), there are multiple CLinVar entries to the same repeat region, including this one, which has a rs number itself, and the publication reference that this additional entry quotes is the original papers that discovered the microsatellite. If that is not confusing enough, you need to know that for other genes, the expansion can have a single rs number. So the confusing practice here is apparently not consistent (and I have no judgement on whether being more consistent is good).\nI have reported this issue and there are definitely many more to come in my future research. Frustated as it may be, I believe that by continuing contributing to our existing datasets as an end-user and with even more data that bolsters our understanding of the genetic features, we can achieve a more tidy bioinformatics dataset, just like the periodic table. There are perhaps also better ways to gather data than using a web browser, so learning more data-mining skills like SQL may be helpful.\n","date":"11 August 2019","externalUrl":null,"permalink":"/post/utilisation-of-bioinformatics-data/","section":"Posts","summary":"","title":"Utilisation of bioinformatics data","type":"post"},{"content":" This compiles my notes for conda and snakemake.\nconda command update conda environment from yaml source activate myenv conda env update --file environment.yaml snakemake notes Snakemake is a fantastic tool to keep the running environment constant, document data processing and reproduce the analysis when necessary. I think it currently lacks the functionality of recording down the thought process behind each data processing decision, but perhaps that can be left as comments in the file and finally documented somewhere else.\nuse directory as output directory(\"directory\")\nuse mutliple files as input Refer to here. Basically one needs to extend both the input and output file names for the function to work.\nno-rule error Sometimes no-rule error can be caused because a similar rule has been executed. Use -R rule_name to resolve this issue.\n","date":"28 July 2019","externalUrl":null,"permalink":"/post/conda-and-snakemake-for-reproducible-command-line/","section":"Posts","summary":"","title":"Conda and snakemake for reproducible command line","type":"post"},{"content":"","date":"12 July 2019","externalUrl":null,"permalink":"/tags/bash/","section":"Tags","summary":"","title":"Bash","type":"tags"},{"content":"","date":"12 July 2019","externalUrl":null,"permalink":"/categories/linux/","section":"Categories","summary":"","title":"Linux","type":"categories"},{"content":"","date":"12 July 2019","externalUrl":null,"permalink":"/tags/multi-thread/","section":"Tags","summary":"","title":"Multi-Thread","type":"tags"},{"content":" Compreesion tar cf - paths-to-archive | pigz -9 -p 32 \u0026gt; archive.tar.gz\n","date":"12 July 2019","externalUrl":null,"permalink":"/post/working-with-multi-thread-machine/","section":"Posts","summary":"","title":"Working with multi-thread machine","type":"post"},{"content":"I have created this package to create a blank Rmd file by saving a nearly blank Rmd template to the menu when you create Rmd files.\nI think it at least follows the first half of the UNIX orthodox: programs that do one thing and do it well.\n\u0026#x1f602;\nReflection: the main purpose for me to create this package, other than making life easier, is to practise how to publish a R package onto github and to install it from there. At least, now I can claim myself to be a published R package author (with some more unpublished R packages).\n","date":"27 June 2019","externalUrl":null,"permalink":"/post/a-r-package-that-creates-blank-rmd-files/","section":"Posts","summary":"","title":"A R package that creates blank Rmd files","type":"post"},{"content":"","date":"27 June 2019","externalUrl":null,"permalink":"/tags/rmd/","section":"Tags","summary":"","title":"Rmd","type":"tags"},{"content":"","date":"26 June 2019","externalUrl":null,"permalink":"/tags/server/","section":"Tags","summary":"","title":"Server","type":"tags"},{"content":" Here is a collection of commands relevant to using a remote server that I find helpful.\nEstablish connection ssh -X -p *port* user_name@server_ip ssh command establishes a ssh connection with the server. -X opens an X-server, which allows you to open GUI software (e.g. firefox) on the server and convey the display to your local computer -p selects the specific port the connection is going to be established. Not all ports of a computer are always open for security reasons. This along the user name and the server’s IP should be provided by the server admin.\nssh-copy-id -i ~/.ssh/id_rsa.pub {remote-host} can save the password to ssh agent to avoid keep typing the password.\nNote, it is important to understand the security of using keys and it is recommended not to use the same public-private key pair for all the usage. Read the documentation here for more details about copying ssh id.\nAlso, refer to here for details of setting up a config file for alias of ssh servers.\nTrasnfer files Assuming we are copying a file from a local machine to the server: scp -P *port* path/to/local/file username@ip:path/to/be/copied/to scp is the copy command to transfer files from server -P selects the port\nIf the files have already been copied but local files are a more updated version, then you can use rsync instead so that only the changes will be updated.\nWhen transferring a directory containg many small files, it is best to tar the file first before moving. Details are here and here. By doing so, the efficiency is improved as tarring and transferring can be done simultaneously.\nAn alternative to scp is sshf, which can be used to set up remote directory as a mounted local directory. The command is also easy to use, just create a new directory and sshfs user@server.com:/remote/dir /home/user/local/directory. Note that ssh alias will not work here. All other commands such as mv, cp, tar can be used just like local commands. The downside is perhaps that root authority is required for all write access unless additionally set up.\nUse tmux It is best to use tmux instead of directly working on the terminal. The benefits include continuous session even when the connection has stopped and multiple windows. Refer to here for a list of commands\nHowever, there are also some unintuitive parts such as the scrolling of the tmux terminal. Overall I think it still improves productivity.\nInstall software It is likely that you will not have the admin authority on your server. If you do, you can safely ignore this section and just work on the server as you do on your local machine. If you do not, there will be some detours you need to make to install the software because you may not be allowed to install software by using sudo.\nInstall with pip pip is a package management system used to install and manage software packages written in Python (from wikipedia pip page). Often Ubuntu’s default pip is when pip command is run is python2’s pip, unless you have set up a virtual environment for python3. pip3, the python3 version’s pip, may not always be installed. Since python2 will be deprecated in 2020, many software now requires installation to be done with pip3.\nTo install pip3 without sudo account, as of the time of writing, you can first download this file, then install pip by running python3 get-pip.py --user in the same directory as the directory of the downloaded file to install pip3.\nAfter pip3 is installed, follow the instruction of pip3 installation. An example usage for instaslling deepbinner is pip3 install ./Deepbinner --user. Note that you may need to add --user yourself to ensure the installation can proceed.\nUse software with source code and make A software can still be used even it is not available on PyPI. Simply download the source code and use make to compile the software. Optionally the source code direcetory (that contains the executable file) can be added to PATH so that it can be run in other directories as well.\nRefer to here for how to build software from sources.\nCommand to open GUI Provided that you have activated X-server, using these commands will open some of the useful GUI provided on a Ubuntu machine.\nFile management nautilus will open the file manager GUI. This can be a more convenient tool to look at the files than cd and ls repeatedly in terminal.\nSystem monitor gnome-system-monitor Command line alternatives are top and htop, which show usage of all individual users.\nUser management sudo su to enter root user su user_name to switch to any user\nWill be updated\n","date":"26 June 2019","externalUrl":null,"permalink":"/post/ubuntu-server-commands/","section":"Posts","summary":"","title":"Ubuntu server commands","type":"post"},{"content":" Here are some of the life savers that are not commonly introduced in standard bioinformatics curriculum. I think these toolkits encapsulate my understanding of the spirit of programming: there must be an easier way to do it.\nTo Compare directory and text files Although unfavorable, sometimes it happens that one project directory is duplicated and the progress of analysis differs between each other. The tools that I have found to be very helpful for comparing different directories and files so that you can merge the two directory into one and keep the most updated files from each folder is Meld. I used to use WinMerge on Windows computer, too. But since Meld is available on both Ubuntu and Windows, I guess we can stick with that.\nMeld is available on Ubuntu software\npdf To just compare the pdf files, which I often need to because I read and annotate pdf both on my mobile device and computer, I use DiffPDF. I am not sure if Meld can handle pdf, but so far DiffPDF’s ability to compare all anotations is just great.\nDiffPDF is available to download for Windows. Not sure about Ubuntu though, because I do not often use Ubuntu to read pdfs\nTo visualise fastq I do not know about you, but my brain is not powerful enough to automatically convert the fastq quality symbols to their ASCII number and calculate the quality score to provide me an overview of the base quality. Thus, I use fqless that converts the quality score to a colour, with intuitively green being good and red being bad, with different shades of orange in between.\nfqless is available on GitHub\nThis post will be updated as I discover more software so stay tuned!\n","date":"24 June 2019","externalUrl":null,"permalink":"/post/helpful-software-for-bioinformatics/","section":"Posts","summary":"","title":"Helpful software for bioinformatics","type":"post"},{"content":"","date":"24 June 2019","externalUrl":null,"permalink":"/tags/project-management/","section":"Tags","summary":"","title":"Project Management","type":"tags"},{"content":"","date":"24 June 2019","externalUrl":null,"permalink":"/tags/software/","section":"Tags","summary":"","title":"Software","type":"tags"},{"content":"","date":"17 June 2019","externalUrl":null,"permalink":"/tags/git/","section":"Tags","summary":"","title":"Git","type":"tags"},{"content":" This is a collection of common git commands that I use very often in my daily work. I have only touched on GitHub and find it fairly sufficient for my needs, and thus this post will base on GitHub as well.\nCase 1: start a new repository Let’s say we want to upload ~/analysis/ to GitHub\nOn GitHub: create a new repository The only things I will set here are the repository name and the choice whether it is public or private. I do not initialise the repository with a README if I have the files in a local folder (which is often the case because I get work done on my computer before sharing them on GitHub). Creating any files in GitHub repository will cause clashes (more below).\nOn Local machine: create a git repository and push change directory to the directory that will be uploaded. So in this case we need to cd ~/analysis\ngit init note create a .gitignore file now to exclude selected files from being uploaded (more below)\ngit add . will add all files under current directory except those in .gitignore. Alternatively, git add *files* can be used to add specific files\ngit commit -m \"some message\" to commit the current added changes to local repository\ngit push origin master to push the changes to online GitHub repository. origin master can be replaced by any other branch name\nWhen the online repository has been updated elsewhere, use git pull origin master to update the changes to local repository\nCase 2: download online repository Use git clone *url* command to sync the online repository to local repository. Downloading code as a zip file is not recommended because that will automatically set up the git repository that allows you to use git in the directory.\nCase 3: change online repository address Sometimes online repository address can be changed when you change https to ssh, or when you change your username or any other secnario. To update the online repository address in local repository, use git remote set-url origin *url*. If you just want to view the current url, use git remote get-url origin\nCase 4: branching and merging Branching is useful to maintain the original structure of the working software while working on new features on a separate copy of the software - the branch.\ngit checkout -b branch_name creates a new branch and switch to that branch. Remove -b if the branch already exists. git branch shows all branches and the one that I am currently on git branch -m old_name new_name renames the branch git push origin :old-name new-name delete the old branch in the remote repository git push origin -u new-name set the remote repository to be pushed to in the current local branch to be the new branch merge and merge conflicts First, before we resolve merge conflicts, it is best to understand what a merge conflict is in the first place. This page explains that.\nThis tutorial is technically still readable.\nHow to use meld Meld indicates to you where the changes are by highlighting them. Just follow them and click on the arrows/edit the scripts by hand.\nUse this to set up meld as the default merge tool. git checkout – .\noverwrite remote repository with local repository git push --force\nCase 5: delete a branch both locally and remotely $ git push --delete \u0026lt;remote_name\u0026gt; \u0026lt;branch_name\u0026gt; $ git branch -d \u0026lt;branch_name\u0026gt; Case 6: Go back to a previous commit REfer to the selected answer here\nCase 7: made changes but want to save the changes to another repository instead. Notes One-command push Sometimes it may be tedious to key in three commands to push just one change. In this case, you can create a function to complete all steps at once.\nfunction lazygit() { git add . git commit -a -m \u0026quot;$1\u0026quot; git push } .gitignore I often choose to ignore everything except the most often used ones.\n* !exception_files more on this\nResolve clashes The way to resolve the clash is to pull and merge the files in GitHub. I will update when the error appears again.\nconflicts between windows and unix Windows uses CRLF but UNIX uses LF as line endings. This may potentailly create merge conflict. To solve this, set the git config core.autocrlf input option and follow the advice on GitHub here.\nUse file file to indicate the file endings, as explained here\nRemove large files This is a modified instruction for bfg without needing to create a new git repo\nIn the desired directory\nfirst, run git gc run two command as instructed java -jar bfg.jar --strip-blobs-bigger-than 100M git reflog expire --expire=now --all \u0026amp;\u0026amp; git gc --prune=now --aggressive) if there are “dirty commits”, you can remove the files’ git history via git rm --cached file_name without removing the files commit then use the command again if there are no dirty commits, you can push it to your remote repo FAQ on Git what is origin origin is a local alias set as a key in place of the remote repository URL. It refers to the remote copy of the git repository. what does “Your branch is up-to-date with ‘origin/master’.” mean? The branch is up-to-date with the latest commit reference that was fetched last time with either git fetch or git merge. ","date":"17 June 2019","externalUrl":null,"permalink":"/post/git-commands/","section":"Posts","summary":"","title":"Git commands to live by","type":"post"},{"content":" System Choice I chose Ubuntu 18.04 LTS. Not any earlier version because to my knowledge most, if not all software for bioinformatics analysis will support 18.04. One exception to this is Nanopore’s Albacore base caller, but it is being replaced by Guppy anyways. 18.10 (the current highest version) was not chosen , because the improvements in features do not seem to justify an upgrade away from LTS.\nHardware GPU Ubuntu seems to dislike some high-spec GPUs. First, it will cause the installation to stuck. Even after successful installation, it often cannot boot into the system.\nTo resolve boot issue: highlight Ubuntu at the boot selection screen and press E, the type nomodeset at the end of the line starting with Linux. Then press F10 to boot.\nTo resolve the issue completely, GPU driver need to be installed. This tutorial is a good guide to install via command line. One caveat is that to install via sudo apt install nvidia-driver-410 instead of ... nvidia-410 according to this Stack Exchange post. Just now I also found this guide that seems to support GUI installation.\nHard disk To rename a hard disk on 18.04 LTS, follow the instructions here. The search engine results on AskUbuntu website may have been outdated.\nSoftware Browser My current default web browser across all platforms is Firefox for its privacy policy and plug-ins. This is also the default of Ubuntu so there is no need to install this. However, I do need to sign in my account and then sync my settings and plug-ins.\nIDEs I am currently using Pycharm Professional for python and RStudio for R. RStudio was downloaded from the web browser and Pycharm Professional was installed via the Ubuntu software manager - I found the installation via browser a bit troublesome because I had to input command to make it available across the system.\nPycharm When setting up Pycharm, I chose to omit Vi support but select .md and R support.\nRStudio Turn off save .RData when exit - all data should be able to be regenerated by a script for reproducibility install.packages(c(\"tidyverse\",\"rmarkdown\")) for data science install.packages(c(\"blogdown\", \"bookdown\", \"pagedown\")) for personal computer A common trick I have used when errors appear during installing R packages is to restart the R session. This makes sure that the packages are installed when R is fresh.\nText Editor Of course sometimes I do not need a full-fledged IDE for my tasks e.g. viewing a .txt file. My current text-editor in most machines is Atom. It is pretty awesome because of the number of packages available. However, one big short-coming of it is its start-up time. It took around 3 seconds whenever I want to open Atom from scratch (its Ubuntu version seems to be faster, though). Thus, I am also testing Sublime text to see if it fits my needs.\nGit, GitHub and SSH I recommend to use GitHub with ssh so that one does not have to key in their username and password every time when they try to access their repositories. The tutorial by Github is pretty awesome and can be followed by this first step and second step.\nTo set up the ubuntu machine itself as a server, follow the advice here.\nOffice Software It will be arguably easier for data analysis if office software is incorporated, IMVPO (in my very personal opinion). First of all, not all data you get will be the standard version like csv or text file, since excel files are still commonly used for small scaled data analysis. Thus, having a software that can open excel files definitely ease the process of getting the data out. This is especially so if the excel data is not in a tidy format (e.g. there are combined rows and columns). Rather than using a programming language to parse through such a file, it is so much easier to use excel’s native functions to turn combined cells into individual cells with repeated values.\nWord, PowerPoint and pdf software will also help to just view these formats for reference. It is certainly not necessary to install Microsoft (since there isn’t on Ubuntu) and there are many open-source or free office software available. So far I have been using WPS on my windows machine for more than one week and could not really find much difference between it and Microsoft.\nOther Software Remote Desktop I am using Anydesk currently because it supports both Windows and Ubuntu system. The server computer seems to be lagging after the connection has been cut but at least it does not randomly cut off my connection like Teamviewer does.\nProgramming Languages Python Anaconda is used to manage Python. It can be easily used to set up virtual environment on different versions of Python and install software. The installation instructions can be found here\nR R comes with the 18.04 LTS but is not updated. To update R, on terminal:\nsudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9. This includes the apt-key needed to download R from a server.\nsudo echo \"deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/\" \u0026gt;\u0026gt; /etc/apt/sources.list. Here we need to add the CRAN server to apt’s source list. The reference to 18.04 is bionic, and it can be trusty etc. for previous Ubuntu versions. If the above command does not work, use an editor such as nano to edit the source.listfile manually by adding deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ to the file on a new line\nsudo apt-get update to update changes made to the source.list file\nsudo apt-get install r-base r-base-dev to install/update R.\n","date":"17 June 2019","externalUrl":null,"permalink":"/post/set-up-ubuntu-machine/","section":"Posts","summary":"","title":"Set up a Ubuntu machine","type":"post"},{"content":"","date":"17 June 2019","externalUrl":null,"permalink":"/tags/ubuntu/","section":"Tags","summary":"","title":"Ubuntu","type":"tags"},{"content":"","date":"17 June 2019","externalUrl":null,"permalink":"/tags/vcs/","section":"Tags","summary":"","title":"Vcs","type":"tags"},{"content":" This post will cover how to\nstart running a programme in a terminal’s background\nmonitor the programme and\nstop the programme\nI decided to write this post beacuse I did not find any comprehensive tutorial to cover this aspect.\nstart running a programme in a terminal’s background To do so, simply add \u0026amp; at the end of the line. What occurs after the enter is hit is that the first line will be run at the background and the terminal will prompt you another line of input.\nmonitor the programme When the programme is run in the background, you can check its status by enter jobs. Usually it will show either Running, Stopped or Done. If there is no current jobs and the you have seen all the status of jobs that are done, jobs will give no output.\nstop the programme You will see a job ID when you run jobs. To kill that specific job (say its ID is 3), use kill %3\nAdditional tips:\nStandard stream: Even after you have directed the output of the programme using \u0026gt;, many programmes are designed to prompt you the error or just the progress of the programme using standard error. This may be distracting because even after you have run the programme in the background and continue to typing other commands, the standard errors will be printed to the screen, sometimes to the line where you are typing. To stop this and only view all the errors when you want to, use 2\u0026gt; to redirect the standard errors to a new file.\nServer If you are using a server, you can use nohup at the start of the command so that even if the connection between your local machine and the server breaks down, the programme will still be running.\nNot-so-pro Tip: to test on how to run a background task, you can install a programme called yes using sudo apt install yes. This is a programme that continously outputs y to your terminal and can be used to give confirmation to other programmes (e.g. when installing other software).\nbe cautious when you save the command (yes) output to a file. I tried to run it for around 20 seconds and the file size became 16GB…\n","date":"4 June 2019","externalUrl":null,"permalink":"/post/background-tasks/","section":"Posts","summary":"","title":"All about background tasks","type":"post"},{"content":"","date":"31 May 2019","externalUrl":null,"permalink":"/tags/bar-plot/","section":"Tags","summary":"","title":"Bar Plot","type":"tags"},{"content":" I had this quesition when preparing my manuscript and a quick search brings me to this stackoverflow question by Johanna. I find the answer by Henrick to be highly effective, but can be further elaborated so that readers can be clearer about the functions of each line. Thus, I will base my post largely on Henrick’s answer but at the same time add my explanation to the rationale behind the lines.\nAim: turn the following data’s plot into a bar chart with bars and labels between the tick marks.\nlibrary(ggplot2) ## Warning: package \u0026#39;ggplot2\u0026#39; was built under R version 4.0.5 library(reshape2) ## Warning: package \u0026#39;reshape2\u0026#39; was built under R version 4.0.5 data \u0026lt;- data.frame(name = c(\u0026quot;X\u0026quot;,\u0026quot;Y\u0026quot;,\u0026quot;Z\u0026quot;), A = c(2,4,6), B = c(1,3,4), C = c(3,4,5)) data \u0026lt;- melt(data, id = 1) print(data) ## name variable value ## 1 X A 2 ## 2 Y A 4 ## 3 Z A 6 ## 4 X B 1 ## 5 Y B 3 ## 6 Z B 4 ## 7 X C 3 ## 8 Y C 4 ## 9 Z C 5 ggplot(data, aes(name,value)) + geom_bar(aes(fill = variable), position = \u0026quot;dodge\u0026quot;, stat = \u0026quot;identity\u0026quot;) Here is Henrick’s working answer. I choose to focus on the second version, but the principle to plot the two graphs is the same. To convert to the first version the only thing that needs to be tweeked is the number of tick marks.\ndata$x \u0026lt;- as.integer(as.factor(data$name)) x_tick \u0026lt;- c(0, unique(data$x)) + 0.5 len \u0026lt;- length(x_tick) ggplot(data, aes(x = x, y = value, fill = variable)) + geom_col(position = \u0026quot;dodge\u0026quot;) + scale_x_continuous(breaks = c(sort(unique(data$x)), x_tick), labels = c(sort(unique(data$name)), rep(c(\u0026quot;\u0026quot;), len))) + theme(axis.ticks.x = element_line(color = c(rep(NA, len - 1), rep(\u0026quot;black\u0026quot;, len)))) Explanation Preliminary steps to prepare the data needed I have transferred some of Henrick’s code into tidyverse to make it self-explanatory. Some of the objects will be explained later.\ndata$x \u0026lt;- as.integer(as.factor(data$name)) as.factor() converts the name of the elements of x-axis into unique levels and as.ineger() converts them into numbers. Thus, data$x is the numerical representation of the elements of the x-axis. Basically it uses different numbers to represent the different values on the x-axis in place of the categorical names.\nx_tick \u0026lt;- c(0, unique(data$x)) + 0.5 len \u0026lt;- length(x_tick) x_tick is the sequence from 0.5 to 0.5 + the maximum value of data$x i.e. the number of labels along the x axis. If x-axis is the number line, the position where bars and labels are placed should be the integer values and the tick marks are placed at x.5.\nlen represents the number of tick marks.\nStep by step analysis of ggplot function # ggplot(data, aes(x = x, y = value, fill = variable)) + # geom_col(position = \u0026quot;dodge\u0026quot;) + # scale_x_continuous(breaks = c(sort(unique(data$x)), x_tick), # labels = c(sort(unique(data$name)), rep(c(\u0026quot;\u0026quot;), len))) + # theme(axis.ticks.x = element_line(color = c(rep(NA, len - 1), rep(\u0026quot;black\u0026quot;, len)))) The following part is self-explanatory and covered in standard textbook like R4DS.\nggplot(data, aes(x = x, y = value, fill = variable)) + geom_col(position = \u0026quot;dodge\u0026quot;) First part of scale_x_continuous code: # scale_x_continuous(breaks = c(sort(unique(data$x)), x_tick), ...) unique(data$x) sort(unique(data$x)) data$x has been explained above. unique() generates the unique values of data$x. sort() will sort the unique values in ascending order.\nc(sort(unique(data$x)), x_tick) What c() does here is just to combine the x_tick and sort(unique(data$x)). This creates the all the x-axis tick marks. However, not all tick marks will be shown because of the colour setting in theme() setting later.\nSecond part of scale_x_continuous code: # scale_x_continuous(..., # labels = c(sort(unique(data$name)), rep(c(\u0026quot;\u0026quot;), len))) Breakdown: data$name ## [1] \u0026quot;X\u0026quot; \u0026quot;Y\u0026quot; \u0026quot;Z\u0026quot; \u0026quot;X\u0026quot; \u0026quot;Y\u0026quot; \u0026quot;Z\u0026quot; \u0026quot;X\u0026quot; \u0026quot;Y\u0026quot; \u0026quot;Z\u0026quot; data$name are the labels that will be placed at the integer values of the number line.\nunique(data$name) as.character(unique(data$name)) sort(as.character(unique(data$name))) unique(data$name) will output the unique values (i.e. levels) of the labels. as.character() turns them from levels, whose types are integers, to characters. sort() will sort them in numerical order so that the labels corresponds to the breaks set in the previous line of the code. It does not produce any effect in this demo code because the charcaters are already sorted in alphabetical order.\nrep(c(\u0026quot;\u0026quot;), len) ## [1] \u0026quot;\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; len was created earlier to be the number of tick marks. We want the labels at the tick marks to be nothing so we use \"\". rep() creates the first argument (\"\") for len times.\nscale_x_continuous put together c(sort(unique(data$x)), x_tick) ## [1] 1.0 2.0 3.0 0.5 1.5 2.5 3.5 c(sort(as.character(unique(data$name))), rep(c(\u0026quot;\u0026quot;), len)) ## [1] \u0026quot;X\u0026quot; \u0026quot;Y\u0026quot; \u0026quot;Z\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; So these are the full set of x tick marks location and their corresponding x labels aligned vertically. We have the labels on the integer values of the number line and “” on the x.5 values of the number line. The graph we generate so far looks like this:\nggplot(data, aes(x = x, y = value, fill = variable)) + geom_col(position = \u0026quot;dodge\u0026quot;) + scale_x_continuous(breaks = c(sort(unique(data$x)), x_tick), labels = c(sort(as.character(unique(data$name))), rep(c(\u0026quot;\u0026quot;), len))) What we want to do now is just to remove the tick marks right above our labels. To do so, we will set the colour of those tick marks to be NA:\nRemove tick marks above our labels: # theme(axis.ticks.x = element_line(color = c(rep(NA, len - 1), rep(\u0026quot;black\u0026quot;, len)))) Breakdown: c(rep(NA, len - 1), rep(\u0026quot;black\u0026quot;, len)) ## [1] NA NA NA \u0026quot;black\u0026quot; \u0026quot;black\u0026quot; \u0026quot;black\u0026quot; \u0026quot;black\u0026quot; axis.ticks.x sets the options for x-axis tick marks. element_line is the only option for axis.ticks.x.\nThus, these are the three layers of the number line we have got:\n# the location on the number line c(sort(unique(data$x)), x_tick) ## [1] 1.0 2.0 3.0 0.5 1.5 2.5 3.5 # the label on the number line c(sort(as.character(unique(data$name))), rep(c(\u0026quot;\u0026quot;), len)) ## [1] \u0026quot;X\u0026quot; \u0026quot;Y\u0026quot; \u0026quot;Z\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; \u0026quot;\u0026quot; # the colour of the tick marks c(rep(NA, len - 1), rep(\u0026quot;black\u0026quot;, len)) ## [1] NA NA NA \u0026quot;black\u0026quot; \u0026quot;black\u0026quot; \u0026quot;black\u0026quot; \u0026quot;black\u0026quot; More discussions So let’s say now I only want to keep the labels on the odd-number labels on the number line. This may not be so applicable in this case but it can help to reduce the crowdedness of the labels on an x-axis with continuous numerical labels. How can I do that?\nThe only thing I need to do is to set “Y” (or rather, all the even-number labels) to be “” for the row of the label on the number line. I can use a for loop to do so. Certainly I can use a look-up table as vectorised computation to improve efficiency. But it seems to me that for the small number of elements in x-axis, the performance improvement is negligible.\n# first store what has been used as the x-labels in a new variable, labels label \u0026lt;- sort(as.character(unique(data$name))) even_num \u0026lt;- seq(2,length(label),2) for (i in even_num) { label[i] \u0026lt;- \u0026quot;\u0026quot; } label ## [1] \u0026quot;X\u0026quot; \u0026quot;\u0026quot; \u0026quot;Z\u0026quot; Now I will plot the graph again, with sort(as.character(unique(data$name))) substituted as label\nggplot(data, aes(x = x, y = value, fill = variable)) + geom_col(position = \u0026quot;dodge\u0026quot;) + scale_x_continuous(breaks = c(sort(unique(data$x)), x_tick), labels = c(label, rep(c(\u0026quot;\u0026quot;), len))) + theme(axis.ticks.x = element_line(color = c(rep(NA, len - 1), rep(\u0026quot;black\u0026quot;, len)))) Great. :smile:\nReflection: I think the most important lesson from this exercise is not how to plot a more customised bar plot, nor how to understand the different layers of ggplot. Rather, I appreciate this procedural approach that enable us to understand the functionalities of the code.\n","date":"31 May 2019","externalUrl":null,"permalink":"/post/bar-plot-with-bars-and-labels-between-tick-marks/","section":"Posts","summary":"","title":"How to plot a bar plot with bars and labels between tick marks","type":"post"},{"content":" TL;DR: $PATH will call the value stored in the environmental variable PATH as a command, but echo $PATH will print out the value stored in the variable PATH.\nHow I found out:\nRecently I have been trying to integrate WSL with RStudio.\nOne thing intrigues me is that the bash in Rmd has a different PATH with WSL. For example, one cannot run the software installed with conda directly from Rmd - the conda bin directory needs to be added into PATH (using export ...) for the subseuqent lines that call conda software to work. This prompts me to investigate how different they are.\nHowever, I made a mistake when I tried to see what are the directories under PATH: I used $PATH instead of echo $PATH. This runs into an error\n$PATH output error:\n/mnt/c/Users/PGDC-2/AppData/Local/Temp/RtmpMLmyMk/chunk-code-9cac2b41d4.txt: line 1: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/R/R-3.5.3/bin/x64:/mnt/c/Rtools/bin:/mnt/c/Program: No such file or directory At first I thought that the error could be because the space between Program and File prevents bash from properly reading “/mnt/c/Program File” as PATH. However, when I ran the same command on a Linux desktop with no PATH directory name containing a space, the same error occurs. Thus, I began to suspect that bash may actually run the variable stored in the function as a command. Thus, I did the following to confirm:\npwd CD=cd cd / pwd $CD pwd output:\n/mnt/c/Users/PGDC-2/OneDrive/liutiming/content/post / /home/pgdc This proves that cd was run in the third line when $CD was run on that line. By revealing the function of directly calling the environemntal variable, this experiment also differentiates the two commands from each other.\nNOTE: I tried to create the page in rmd with bash code chunk but there were errors when the page was rendered. Thus, I used markdown’s code chunk instead. Will investigate this issue on another day with a linux machine to localise the issue.\n","date":"30 May 2019","externalUrl":null,"permalink":"/post/var-path-vs-echo-path/","section":"Posts","summary":"","title":"The difference between `$PATH` and `echo $PATH` ","type":"post"},{"content":"Yes I have built this website.\nIt is definitely not an easy process though. I can confirm this because by the time this post is being written, the website itself has not been deployed yet. Well but I just want to briefly explain the reasons why I am putting this website up.\nThe most important reason is that I increasingly feel a need to host a place on the internet (not a typo) for me to outreach to other people. There are a few things that I would like to write a personal review for and of course share them with the online community. Basically, the internet hosts my information (perhaps too much of it) but in a very non-systematic manner. So this is the place where I would like to gather all the information and then share them with my readers. I also want a place that is truly my own to store my thoughts.\nFor technical information, this website is built with blogdown and Hugo, hosted on timingliu.com and deployed by netlify.\nI built this site largely according to the kind advice from Alison. The only degression is that when RStudio stuck at the stage of creating a Hugo site in a git repository, I decided to first create the website (locally) then init a git repository in the local directory. Also, I think Yihui\u0026rsquo;s blogdown book is really worth reading (it\u0026rsquo;s free!) for anyone who wants to have a smoother journey in building their website.\n","date":"28 May 2019","externalUrl":null,"permalink":"/post/hello-world/","section":"Posts","summary":"","title":"hello world","type":"post"},{"content":"I am a full-stack clinician, currently working as a resident doctor and engineer in London. I am passionate about improving front-end patient care through back-end biomedicine, data science, and tech. My interests span genetics and genomics, machine learning, and digital healthcare.\nView CV Education # Course Institution Year Bachelor of Medicine and Bachelor of Surgery (MB BChir) University of Cambridge, United Kingdom 2025 Professional Data Scientist Certification DataCamp, United Kingdom 2023 Information Engineering and Bioengineering (BA) University of Cambridge, United Kingdom 2022 Advanced Level National Junior College, Singapore 2018 Experience # Resident doctor — Chelsea and Westminster Hospital, London, with engineering (software and deep learning) side hustles NHS Clinical Entrepreneur — learning innovation pathways with the Clinical Entrepreneur Training Programme National Programme Director — MedTech Foundation Research across the \u0026ldquo;full-stack medicine\u0026rdquo; pathway: Wellcome Sanger Institute, Moorfields Eye Hospital, Cambridge Centre for AI in Medicine, NUS, Cambridge Clinical Trials Unit Contact # I\u0026rsquo;d love to hear from you — email me at timingliu@outlook.com, let me know if I can help you or vice versa, and I would love your thoughts and perspectives.\nSelf-analysis # Before we start # Here you will find a glimpse into how I perceive myself and my place in the world. Check out now, futures, and my CV for things that I am working on. This page is self-indulgent and personal by definition. However, if anything piques your interest, please don\u0026rsquo;t hesitate to reach out and start a conversation - I would love to hear your thoughts and perspectives.\nNow that we are friends # I am a learn-overt # This is a portmanteau of learning and intro/extrovert. Personality is helpful when it provides clues to the motives of a person\u0026rsquo;s actions. My actions are mostly motivated by the prospect of learning something new.\nLearning boosts my energy # I may appear as an introvert because it is efficient to learn through condensed materials (e.g. books), but I also enjoy acquiring undocumented knowledge, empathy, and communication skills through conversations with people. Unlike introverts, I do not feel drained after talking to multiple groups of people. However, if I am not learning, I can become easily tired whether I am alone or in a group.\nConversations # When having conversations, I enjoy discussing deep and abstract concepts rather than surface-level topics. It is understandable to start a conversation with small talk such as \u0026ldquo;what did you have for lunch\u0026rdquo; as it helps us understand the context and circumstances of the person we are talking to. However, it will be more interesting if we eventually move on to the importance of nutrition, rather than where to shop for groceries; if we discuss where to shop for groceries, it will be more engaging to discuss the market structure of supermarkets than to discuss the traffic of the store. Interesting discussions are not about where we start, but about the direction we take1. I believe the more abstract the concepts, the closer they are to a mental model, and therefore the more transferable it is. The world is vast and complex, with an overwhelming amount of information and knowledge. It can be compared to a sphere, where the number of facts and insights are represented by the surface area. By going deeper (reducing the sphere\u0026rsquo;s radius) and understanding the underlying mechanics of nature and society, we are able to focus on fewer but more relevant facts to gain a better understanding of the world.\nMeanwhile, I tend to avoid conversations that are impractical, like those that no one has any idea of or control over. Such topics are polluted with noise with little signals to act on.\nPersonal relationships # Being learning-driven means I usually benefit from my interactions with other people, which encourages me to give back and give forward. Even if there is no learning involved, I see it as my responsibility to help friends in need. I also allocate time to help proactively\nI advocate for radical honesty with emotional correctness # I believe that being truthful about our observations and thoughts helps us to get closer to reality. No one is always right. Instead of second-guessing and self-censoring, we should be open to being (nicely) corrected and correcting others\u0026rsquo; mistakes. I believe this is essential for building deep and mutually beneficial relationships.\nWe should aim to be emotionally correct instead of politically correct. We need to respect everyone\u0026rsquo;s well-being in society, but that does not mean we should bend our reality against evidence.\nExpand my life at the extremes # Similar to my desire to learn, I enjoy expanding my life and make discomfort zones feel like home. I may appear as a workaholic because my work is one of the easiest ways to live at intellectual extremes. That is a result of blessings in my life that allowed me to learn and work with world-class colleagues in cutting-edge research and innovation fields. However, I also love challenging myself with new experiences like gliding and skydiving. I have a wishlist of items from which I randomly pick one to complete every season.\nProgress over ideologies # I am a pragmatic person. For example, regardless whether it is a state-directed tree-planting program (left), or a tax reduction in green technology (right), I support policies that make progress.\nI understand progress can be dangerous and lead to unintended consequences. I recognize it can be much more rewarding to work on things that lead to progress than to work on regulations; people do not appreciate successful regulations (because their success lies in that nothing (bad) happened). Therefore, I actively seek rational pessimistic people to work with me.\nMany technological advancements may not be enjoyed by the mass in their infancy. Meanwhile, many frugal innovations bring already developed technologies to the mass. I believe both are important and we should not favor one over the other. It is too easy to criticize the former as an indulgence, but we need the early adopters\u0026rsquo; investment for these technologies to be possible.\nMy personality/team role assessments # Belbin team role # According to the assessments completed by myself and my colleagues, my top three roles are plant, resource investigator, and specialist.\nThis means that I am good at generating ideas (plant), gaining opportunities for ideas (resource investigator), and building challenging ideas (specialist). This result fits the profile of a technical entrepreneur, who can build and sell their ideas effectively. I have found that many entrepreneurs are also bloggers, probably because they are equally idea-driven.\nThis result also indicates areas that I should pay attention to. These roles are more idea-driven and this may make me appear self-focused. As a plant, I should communicate my ideas effectively with others. As a resource investigator, I should gain opportunities for the team, the collaborators, not just myself. As a specialist, I should bring the team together. I would love to work with colleagues who are more result-focused and people-focused, so that team can carry through the ideas and take care of everyone\u0026rsquo;s welfare at the same time.\nThese are just the top three results. None of the roles is ill-fitted, and I may adopt other roles when needed.\nMBTI test # I am not sure about the scientific validity of this test and my result shows around 60% inclination for any area (i.e. none of my inclinations are strong). My result was E/INTJ when I took it in 2015.\nOpen-mindedly skeptical # I suspect it is good to keep an open mind, learn everything from scratch, and continuously questioning assumptions and conventional wisdom.\nAlso see this\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","externalUrl":null,"permalink":"/about/","section":"Timing Liu","summary":"","title":"About","type":"page"},{"content":"I keep two versions of my CV, depending on what you\u0026rsquo;re looking for.\nSoftware engineering \u0026amp; AI # Full-stack and machine-learning work — co-founding Finomics, building epigenetic foundation models, personal projects, and 27 publications.\nDownload PDF View in browser Clinical \u0026amp; academic # Medicine and research — resident doctor at Chelsea \u0026amp; Westminster, Cambridge MB BChir, and the same publication record framed for a clinical audience.\nDownload PDF ","externalUrl":null,"permalink":"/cv/","section":"Timing Liu","summary":"","title":"CV","type":"page"},{"content":"Since my birthday in 2021, I have been actively seeking to know what I am in others\u0026rsquo; eyes, in particular my weaknesses. What do you think you would change about me if you were me?\nIt can be anything. You can tell me that I am a snob, or I am in a bad shape, or I have a bad accent. Your description does not have to be perfect (and it won\u0026rsquo;t be1), but it will point me to the right direction, especially when viewed together with others\u0026rsquo; criticisms.\nI enjoy radical honesty and I hope we can create this circle of frankness around us. So, let me know if I can help you do the same.\nsince none of us see the whole picture of anything\u0026#160;\u0026#x21a9;\u0026#xfe0e;\n","externalUrl":null,"permalink":"/feedback/","section":"Timing Liu","summary":"","title":"Help me know myself","type":"page"},{"content":"Wow, you actually visited this page. OK. I am touched. Thank you for being so kind.\nNo one is an island, and I would very appreciate if you could lend a hand for the following aspects of my life - whether you have any ideas, or connections, or some extra time - I would be very eager to hear from you. I can be reached at timingliu[at]outlook[dot]com with the subject [Website].\nFirst thing first # But first, let\u0026rsquo;s make sure you know how I can help you.\nPossible futures # These are the big pictures that I am working on and I welcome your ideas and/or collaboration proposals to push these forward.\nSpecifics # The following are areas that I have identified:\nHelp me know myself # Even if you are a total stranger, I would appreciate if you can let me know what is your impression of me through this website. If you are already a friend, great, I cannot wait to hear from you!\nTraining in the US # I am keen to undergo some form of medical training (elective/residency/fellowship) in the United States because I want to understand how the healthcare system works (and where it does not work). I also want to collaborate with the leading research and innovation teams across the pound. Therefore, I will appreciate any introductions to such opportunities.\nI am keeping options open regarding where to practice medicine (and I may be a nomad after all), but getting exposed to a different healthcare system will be exciting.\nExpand my life # Like Richard Feynman, I believe that the intellectual height that one can reach is not compromised by following one\u0026rsquo;s curiosity for experiences outside academia. Therefore, I am keen to travel and try out new things. The current wishlist includes African safari, Jerusalem, skydiving, gliding etc. Let me know if you have any recommendations for the list and/or want to explore these together.\nImprove my skills # I have identified following areas for continuous improvement. Looking for a coach or just a learning buddy :)\nDelegation # I wonder what is the best way to delegate work so that the receiver can handle the job well and grow from the experience. I am also keen to know your experience working with assistants for business or household work.\nRomantic relationship # I am going on dates now because it is exciting and fun. My thoughts about romantic relationships are here and I am happy to know more people and get introduced.\n","externalUrl":null,"permalink":"/help/","section":"Timing Liu","summary":"","title":"How you can help me","type":"page"},{"content":" First thing first # I do not think relationship discussions can reach a global optimum. Therefore, the following are my opinions that are probably not generalizable.\nWhat does liking somebody mean to me # The world is a puzzle. I want to know your answer and share mine with you.\nIt is a very irrational feeling because surely there are people who can better answer some of the questions better than the person next to you. But you feel so closely connected to the person that you believe even if their answer is imperfect, it is the one that you are looking for.\nLearning and expansion-oriented # I believe education is an intrinsic part of any relationship, romantic ones or just friendship. I am looking for someone who can offer and accept guidance in each other\u0026rsquo;s \u0026ldquo;blind zone\u0026rdquo; and \u0026ldquo;discomfort zone\u0026rdquo;. That is to say, someone who helps me understand my imperfections and correct them; someone who encourages me to expand my life; and someone that welcomes me to do the same.\nThis has some practical implications. I may not be looking for a \u0026ldquo;traditional\u0026rdquo; relationship that consummates in a daily routine where every family member comes home for dinner and (small) talk about what happened in the day. Although I believe family reunions are necessary and people should stick together when anyone needs support, gatherings should not be deemed compulsory if no one can benefit from the discussion, intellectually or emotionally. I think the hallmark of a close relationship is to pick up a conversation as before even though the two have not spoken for \u0026ldquo;ages\u0026rdquo;. This is not my expectation for a relationship, but a good stress test to prove that frequency of interaction is not necessary for the depth of the relationship.\nOf course, the sweet spot is that everyone in the family experiences rapid personal evolution and we gather more often to celebrate these growths. Even though it may be a bit idealised, we should work hard to make this happen and not be satisfied by mundane conversations. One way to make it sustainable is to actively explore together, so we are still expanding our life even without necessarily learning from each other in every interaction. Examples of exploration include travelling, picking up various hobbies, and gaining novel experiences together. We could also be comrade-in-arms in pursuing our dreams (here are mine).\nI see family as a harbour: to go far, we must accept the ships to not come back as often, but our compasses always know the harbour is there when we need a place to repair and rest.\nThe house analogy: realism and authenticity # We are all tenants in a relationship and the other person is like both a house and a landlord.\nThe \u0026ldquo;house\u0026rdquo; is the part that you interact with. It is the part that gives one security. It also seems to be the part that you have some control over - this is where people invest in a relationship. They help their romantic partner to become better and that also improves their quality of life while they live there. Yet, regardless of how many decorations you have, things fundamental about the house will not easily change - e.g. its locations - just like a person. Therefore, we should be realistic about how much we can change our incompatibility with others.\nThe \u0026ldquo;landlord\u0026rdquo; part is the person\u0026rsquo;s autonomy that we do not have control over. We may spend ages decorating a house, but the house still belongs to the landlord. This sends a difficult message because we should invest in each other when in a relationship, but we may not be the beneficiary of such investments. On the other hand, I am not preaching for signing a 60-page legal document before any serious relationship. I am, however, advocating for radical honesty, authentic communication, and realistic expectation for what we want from a relationship.\nEnjoy the present # I have been a future-oriented person. In the past, one reason why I wanted to be in a relationship was that even when I was \u0026ldquo;relaxing\u0026rdquo;, I am still building a relationship for my future. However, one thing I learned in Tango is that no matter how good one dance has been, there exists a possibility where you move on and dance with others. When someone leaves you as a romantic partner, it means they also open more space for you to explore other things life has to offer.\nAs in the house analogy, I no longer take the lasting prospect of relationships for granted. I will still work on long-term relationships with good people, friends or lovers, but \u0026ldquo;till death do us part\u0026rdquo; has been decoupled from any relationships in this ever-changing society, so I will not pursue relationships on the assumption that this is in the bundle. Rather, I will work on it as an empirical possibility. I believe this allows me to treat each person as an individual and respect their own agenda.\nRomance has no intrinsic values: love the person, not the concept # By denying intrinsic values of romance as a concept, I believe we can come back to the purest version of any romantic relationship: enjoying the other person\u0026rsquo;s presence.\nOne reason why some people (e.g. past me) are eager to get rid of singlehood is because of the values they attached to romance: companionship, marriage, children. However, in modern society, you can get all these without seeking a romantic relationship. Companionship can come from friends; marriage traditionally was for business alliance than for symbolisation of love; children can be adopted. What this implies is we should be clear about what we want. Attaching too much value to romance itself could mislead us to start/stay in a relationship for things other than the person themself.\nScientifically, the romantic feeling is partly due to dopamine release in anticipation of a reward. This makes it not much different from other \u0026ldquo;addictions\u0026rdquo; (without negative connotations), from gyming to substance abuse. Breaking this emotion down to its physiological mechanism allows me to be a bit realistic: there is nothing good or bad, but thinking makes it so. Having such feelings with someone who likes you back helps to form strong bonds, but it also causes suffering when it is unrequited.\nIn summary, romance is like spice. It does not have much nutrition on its own and can spoil some dishes. However, some dishes become tastier; that is why we search for them.\nClosing thoughts # I look forward to a relationship full of \u0026ldquo;learning, laughing and loving together\u0026rdquo;. Let me end with something less cerebral - a poem from Shel Silverstein - a poem that tells us how we have to be truthful to get what we want.\n\u0026ldquo;She had blue skin,\nAnd so did he.\nHe kept it hid\nAnd so did she.\nThey searched for blue\nTheir whole life through,\nThen passed right by-\nAnd never knew.”\n― Shel Silverstein, Every Thing on It\n","externalUrl":null,"permalink":"/relationships/","section":"Timing Liu","summary":"","title":"My views on romantic relationships","type":"page"},{"content":"Summary: I am currently working as a resident doctor at the Chelsea and Westerminster Hospital in London, with engineering (software and deep learning) side hustles.\nResearch # To pursue my dream of becoming a digital healthcare architect, I have worked with the following dream teams to explore various stages of the \u0026ldquo;full-stack medicine\u0026rdquo; pathway.\nData generation (third-generation sequencing) at the National University of Singapore (with Chong Group) Multi-omic data analysis (association, diagnosis, risk prediction) at the Wellcome Sanger Institute (with Martin Group). Clinical data analysis at the Moorfields Eye Hospital (with Reading Centre) Machine learning method development and application at the Cambridge Centre for AI in Medicine (with van der Schaar Group) Clinical trial design and deployment (app development) with the Cambridge University Hospital (with CCTU) Clinical AI regulation with STARD-AI and QUADAS-AI team A few traditional medical statistics projects involving survival analysis and hypothesis testing Implementation # I am learning the business side of medicine with Mansfield Advisors and innovation pathways as an NHS Clinical Entrepreneur. I was involved with the MedTech Foundation as its national program director.\nPersonal # Learn Tango Read about an hour a day Tinker with fun coding projects in areas like self-quantification and database management Last updated 2025-08-10.\nThe link here contains a list of projects in tabular form (work in progress).\nP.S. The reason to list my current projects down is to acknowledge my current collaborators\u0026rsquo; help in my learning and development, publicize their great work, and also to let the readers (you) know my current interest and how I may help you. Many projects do not require full-time commitment at the moment.\n","externalUrl":null,"permalink":"/now/","section":"Timing Liu","summary":"","title":"now","type":"page"}]