SetCaseSensitiveInfo

I use a 256 GB micro SD card as my main storage of schoolwork files. Today when I try to execute make at D:\...\p4, it fails because there are supposed to be two files with names Sym.java and sym.java. Windows file system by default is not case sensitive, so ‘make’-generated sym.java overwrites the original Sym.java, hence the problem.

I did some searching and found that you can enable case-sensitive for a folder with WSL installed. Just run the following script in powershell/cmd (admin mode):

fsutil file SetCaseSensitiveInfo <your-folder-name> enable

However, I cannot do it on my SD card, as it will always show Access Denied. Therefore I have no choice but to move my p4 to somewhere in drive C:.

Econ!

虽然Midterms考的不咋样,但我越来越喜欢经济学这个专业了。

3月18号我和advisor Alicia聊了整整一小时,她从这学期的课聊到选课,告诉我了很多资源,一直聊到找research,还祝我滑雪开心。

宏经教授Alder人很好,上课也很有意思,尤其是第一周推荐了Planet Money这个podcast。我现在出门路上就听这个。3月15号的这一期讲到了中国的打假,很有意思。

夏天上两门online的经济课,秋天2门cs两门econ加一节历史,期待。

BTW,Office系列的新logos很好看。

20th Birthday

March 20, 2019 is my 20th birthday. I woke up at 10:30 am (too tired after skiing yesterday), went to work and returned home at 4 pm. Had dinner with Wilson, Marvin, and Daniel at ICHIBAN. Had a nap until 11 pm (Spring Break is the best, yay). Some thoughts:

I just found that March 20, 2019 is the Spring Equinox this year (4:58 pm -0500UTC). So it turned out I was born at the beginning of Spring / end of Winter! Unfortunately here in Madison there isn’t much to enjoy in Spring/Fall (compared to my hometown Yancheng, China or Boston, MA).

My family need to fund me $45,000 (¥300,000) for the rest of 2019 on tuitions and living expenses. I can probably earn a total of $10,000 this year through my part-time job and summer research. I can’t thank my parents enough for their raising and support. But in the meantime both they and I feel pressured because my higher education is a huge investment! Fortunately I will graduate with no debts so that I can live a relatively relaxed life during prime years.

I’m a practical guy. I need the high wage and visa sponsorship of a major US company to pay back my parents and earn a self-accomplished life. I value certain things more than others, so my main everyday spending is just rent, meals, electronics, and that’s it. From my own opinion I don’t think I can take care of myself well in the near future, i.e. having a healthy, regular lifestyle, so no romantic relationship for me! Well that’s not all bad, as I grow up I realize my life philosophy is basically “seize the day while taking responsibility.” Actions bring consequences and being able to take responsibility for your own actions is cool and a sign of maturity. I regret some of my past actions and don’t want to add new regrets in the future. Quoting lyrics from Congratulations:

My mama called, seen you on TV, son
Said sh*t done changed ever since we was on
I dreamed it all ever since I was young
They said I wouldn’t be nothing
Now they always say congratulations
Worked so hard, forgot how to vacation
They ain’t never had the dedication
People hatin’, say we changed and look we made it
Yeah, we made it

My goals for my age of 20 are: a summer internship in 2020, a publication of my research work, an app of my own, good grades, good relationships with professors and classmates, good ranks at programming contests, and of course, a healthy body with good moods.

I shall fulfill my goals and chase my dreams. I may be tired but most happy. I shall not envy others for their accomplishments. I wish I could say “I made it” in the future.

mac-mini.local

操作系统选择 Mac还是Windows?双方都有各自的不可替代性。作为一个CS学生,平时和命令行(Command-line Interface)打交道比较多:Windows 10装有Windows Subsystem for Linux(WSL),输入bash即可切入Ubuntu,并且文件系统和Windows共享;而Mac附有原生Unix终端。

我全都要.jpg

于是,我的答案是:我全都要!

Mac独占Xcode? 这谁顶得住啊。有生之年我还是想学习一下iOS平台应用的开发 ,于是我搞了一台2018 Mac Mini (Model:MRTT2LL/A),连在房间的显示屏,全天候开机,当作一个本地服务器。

很多时候我不想坐在桌子前,于是我把Mac开启了网络共享。如此一来,我就能在我的Windows笔记本上写码了。

本地网页服务器
VS Code,启动!

除此之外,我还可以将一些要跑一段时间的任务放在Mac上运行(比如下载电影、训练模型……),只需要一句简单的:

ssh kesong@mac-mini.local

Miata🚗, Marvin🐎, 老羊🐏

昨天(3月18号 周一),上午9点我去上班,12点下班陪Marvin (马文,🐎)去驾考,第四次他终于过了。Wilson也一起去了,午饭吃了Chick-fil-A,顺便去了趟亚超。天气很好,蓝天白云,从Gordon旁往北看,能一直看到蓝色的(Mendota)湖面和湖对面的白色灯塔(?)。午觉睡到晚上7点,和🐎去吃了Dragon-I,随后开始第三次给我的车(1995 Mazda MX-5 Miata)换悬挂的尝试。

🐎&🚗

车是去年11月🐎推(怂)荐(勇)我买的,3月份我去修车店大修了power steering,花了2000刀…… 这次晚上一直从8点修到今天凌晨12点半,不仅没修好,还装不回去了…… 有一种挫败感。不过这辆车也算承载一段回忆/青春了,还是挺值的。但愿夏天前能修好。

老羊🐏和🐎都住在Vantage Point,我们经常称号为羊圈。老羊玩游戏非常厉害,大一时候我们经常打麻将/乒乓球/Switch聚会。还记得大一我有时候周末会在当时他和Kyle湖区的宿舍房间过夜。Kyle和我由于众所周知的原因现在关系很僵硬,于是我也不怎么去VP找🐏和🐎玩了。

最近我加入了🐏玩起了雀魂。希望过一段时间能打败🐏桑~

Spring Break Day 1

早上睡到10点多,本来打算去图书馆写作业的,计划失败_(:з)∠)_

下午在家学Angular,由于上班用的是AngularJS (1.x),基本没有什么困难。一直坐在房间的电竞椅子上,挺累人的。晚上实在没动力做事,和Wilson要去看《惊奇队长》。下周二会和马文、Wilson一起去滑雪,期待。

Pi Day 2019

还记得两年前的π day,我被MIT拒了。收到麦屯的offer好像是四月,那天中午放学回家我特别开心。同样特别开心的时候还有16年10月SAT出成绩的晚上,放学下着雨,我没穿雨披蹬着自行车狂欢。

两年后的今天,我有4节课,一门考试。昨晚刚考完CS 577,前天考的CS 564成绩已经出来了,很差,比平均分高一点点。似乎心态能够放平了,不会过于悲伤;同样的,特别开心的时候也变少了。开心的回忆似乎总会在未来某个时候带来不那么开心的感慨,所以我变得有那么一丝害怕开心,不愿拥有情绪。

考试前后和别人聊天似乎很开心……考试前大概是因为死猪不怕开水烫,考试后(出成绩前)大概是因为吐槽考试能减压?

BTW,学习(摸鱼)的时候听爵士乐似乎挺让人放松的……

CS 577 Midterm 1 Prep / Complexity of Some Algorithms

During the preparation for the CS 577 Midterm, I find that it may be helpful if I list the complexity of some algorithms.

  • Dijkstra – \(O((n+m)\log n)\) (using adjacency lists and priority queues)
  • Topological Sort – \(O(n)\)

Also, solution to Question 7 in the practice problems (see also this file, and this better one, also a better problem statement by Jeff Erickson).

Solution in part (a) of Question 9 turns out to be essentially finding median of an array in linear time. See this amazing blog post (and this, too).

C++ Online Judge Tips

I am not new to online judges (OJ), but I am still kind of a newbie. Part of the reason I set up this blog is to keep track of my progress at many things, including solving algorithm programming problems. In particular, this semester I am taking CS 577 taught by Dieter , a great professor and the ACM-ICPC coach of our university (UW-Madison). Dieter is utilizing problems on spoj.com as optional programming problems of the assignments. (See the leaderboard.) In this post I am going to present some nice tricks/tips I use.

A C++ Template

#include <bits/stdc++.h>

using namespace std;

const int MAX_N = 1000000 + 10;
const int INF = 0x3f3f3f3f;

inline int iread() {
  int f = 1, x = 0;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar()) f = ch == '-' ? -1 : 1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return f * x;
}

int main() {
  // your code
  return 0;
}