This paper examines the prevalence of Cantonese-English code-mixing in Hong Kong through an under-researched digital medium. Prior research on this code-alternation practice has often been limited to exploring either the social or linguistic constraints of code-switching in spoken or written communication. Our study takes a holistic approach to analyzing code-switching in a hybrid medium that exhibits features of both spoken and written discourse. We specifically analyze the code-switching patterns of 24 undergraduates from a Hong Kong university on WhatsApp and examine how both social and linguistic factors potentially constrain these patterns. Utilizing a self-compiled sociolinguistic corpus as well as survey data, we discovered that those who identified as male, studied English, and had an English medium-of-instruction (EMI) background tended to avoid intra-clausal code-switching between Cantonese and English. Responses to the open-ended questions revealed that many of our participants used code-switching as a means to fill conceptual gaps, engage in socialization (e.g., to strengthen solidarity or make their speech sound more casual and natural), and construct bilingual and Hongkonger identities. Our findings shed some light on at least some of the locally embedded social meaning(s) of this linguistic practice in a digital context.