一个 本科生 直面 PhD 的碰壁人生

自救乃第一天理 -《慈悲与玫瑰》熊培云

我是个普通人,普通到每天都在觉得自己各种无力,无论是自己的能力无法在合适的方向抒发,同时又困窘于自己的时间有限,在同时兼顾发paper,申请和考托考GRE当助教。都太难了!申请上的想法,和 Shu 聊过以后,了解到了国内读研的可能性,同时感觉到我作为本科生的无力。可是我却有拼一拼,没有博士,就工作的想法,因为我个人觉得国内三年的研究生设置过长,对于培养一个有给定问题解决一个问题能力的研究者太长,对于探索更大领域中 vision 的博士又太短。同时我觉得去美国的机会不太多,看了看 乔神/USTCqzy/caoshuxin 的处境,我觉得MSRA真的是本世纪最成功的留学机构。

有关方向

我的预判是 Computer System (with Arch) 是比较好的方向,无论是从现在的趋势,还是未来的 funding 。DBMS 一定是大热的方向(作为一个文件系统和软工搬砖者,还是夸一夸敌军),毕竟现在数据为王。和 Arch 相关的有最近出的 NVDimm, 有很多可拓展的方向。而 ML system 的大热注定了这个方向是一个泡沫。

GPA 拉胯

个人感觉从能力上和看问题的 vision 上我是属于比较有好的统括性能力的人,但缺乏马上复线的坚持能力。自从我对超算比赛魔改代码的兴趣有所丧失以后,对带同学和教他们改代码还是很有兴趣的。我个人有挺多高考遗留下来的后遗症,简单来说就是考试失能,实在不想在这种maybe “高分低能”的人堆当中卷致死了。

何为成才

和父母稍稍聊过,觉得我说服不了他们,他们也说服不了我,他们一直觉得我没什么用,从很多意义上来讲,长时间的生活费不足,直到最一年才稍稍变好。我的敢想,很大程度上来自我爸的自信,但又有点不同,我看到的,和身居高位的人看到的不太一样,而革命从来都是自下而上的。

为什么有些需要开源有些需要闭源

我认为一切的探索都是

暑研或许是 Ph.D. 的唯一机会

这个集散地 nsf fund 的工作只招美国居民或者绿卡。之前看到一亩三分地上有个关于为什么美国和中国同工不同酬,有个解释很有趣,visa 就好似一种半透膜,不是所有人都付得起硕士 OPT 的钱。不过这钱有点Overpay了。而码农这种工作确实吃青春饭,只有在学的最快的时候多学一点才有用。感觉只有加州、UIUC、剩下三大的暑研或者未来PhD 适合我去念。

General Requirement

  1. Online Application
  2. One-page Personal Statement: why this teacher? why this program
  3. Official Transcript
  4. Curriculum Vitae (CV)
  5. Your Top Faculty Choices - If no faculty matches your interest, please indicate your preferred. Preferably the professor with similar aim.
  6. professor whose research area best aligns with your interest. You can learn about each faculty member’s research area by referring to the Samueli School of Engineering website.
  7. Two References – Required email and the

UCI onsite ranking 1.30

  1. https://www.ics.uci.edu/~harris/
    1. Electronic Design Automation from Natural Language
    2. Embedded Systems
    3. Social Engineering Attack
    4. Functional Verification
  2. https://faculty.sites.uci.edu/zhouli/
    1. IoT
    2. Embedded System
  3. Fadi Kurdahi digital system
  4. mohammad AL Faruque
  5. https://www.ics.uci.edu/~mlevorat/
    1. Real-Time distributed computing in wireless systems
    2. Wireless systems for AI and AI for wireless systems
    3. IoT and Healthcare
  6. https://chenli.ics.uci.edu/research/
    1. database
  7. https://www.ics.uci.edu/~xhx/
    1. AI data mining
  • 最终选定 Zhou Li (张一帆在这)和 另两个 system 的。

UIUC Online ranking undecided

Caltech 2.22

Harvard undecided

CMU 2.2

  • Fuzzing & Arch & DBMS 啥都有,如果能去这的话 MCS 也可。 https://applygrad.cs.cmu.edu/apply/bio.php
  • Awaiting Recommendation
  • No reply
Screen Shot 2021-02-01 at 3.58.42 PM

WUSTL 2.17

  • https://sites.wustl.edu/csereu/apply/ HPC 写 CPP
  • Awaiting Recommendation
  • Rej

UCR

  • https://connect.ucr.edu/register/MSRIP Gu yan & Sun 并行算法
  • Posted
  • Rej

暑研

暑研面经

将会被UIUC接手。之后再补充面筋。主要是4月的时候看到招生群里有人贴出UIUC SE今年投递了200人最后只会有20人左右进,然后就投了,让我做了一个修复flaky test的小实验,说是实验其实就是个并发RAW bug没啥难度,然后就进了,7月开始work,跑OD Flaky test实验,有去年发的TACAS一篇。[2022.2]现在感觉Darko只给了平推或者黑推。因为开学以后搞超算,Wing也没什么时间知道,就丢给我一个Bramble访问者模式DTA插桩,主要之前对JVM不太熟,写Java还行,但maven阶段的debug 真的难顶,一开始赶ICST,但是北大的弟弟咕了我也咕咕了。

Darko Meeting 最喜欢躺着

暑研干了啥

和北大的同学修bug,darko会给很多修bug的建议,然后我们看是工具的锅/项目的锅还是java 1.8。刚开始做就是修修Flaky Test 的 bug, 最多的是类似hdfs和hbase数据库里的并发bug。

大四上学期

SC21

主要是在搞毕业论文和SC21. 从队长升级为学生教练的感觉挺不错,但是问题是在这方面发力对申请毫无作用,唯一的作用大概是让殷老师在申请的时候给我说好话。

当然从培养能力的角度来说,还是有领导力的培养的。至少NTU/THU有的造血pipeline(wiki/teaching/yole spirit)都有。也算是终于把进大学时候的梦想有一个阶段性的成果。我认为以后的几年,每次拿个前三不是问题。

从想认真搞毕业论文到最近的比较佛系

有关如何寻找一个方向的研究

跟AP做就不用担心没有idea,反倒是和Tenure需要考虑。我看很多人想不到新idea的时候就去大公司实习几个月,既可以合作带出一些项目、尤其是产业界的数据,像我CMU ECE套的那位。

更新进度条放上面,同时在 gradcafe 更新

Cornell 貌似马桶堵了,发现自己填了奇怪的by mail。Dec.1 CST 交完了。

UIUC/CMU/UW/MIT/UTAustin/NorthWest/UCSD/Purdue/UCLA/WISCONSIN/UMass/UTAustin/Purdue/GaTech/UCSC Dec.15 CST  交完了,静待面试。

12.22 某great chicago校私下面。

1.17 某chicago校套过的教授面,说了我的ps有问题,意思就是没戏。

1.19 GT meltdown 作者 Daniel Genkin 教授面,应该是过了教授法眼,面完感觉稳了。他有8位Ph.D,他完全不care防御,感觉eBPF对他没啥用(这句话在我看到PriSC开篇talk后觉得可以搞),他说最近有个browser RIDL的锅。但此人有数据造假和搞学生等问题。其实更想去做rudra的kim那。后来写了个邮件,给了个chat。

1.21 UCSC Rising Star 他说进去做hw/sw codesign,然后fpga virtualization,然后傲腾高性能系统。对每一个project都挺感兴趣的。至少connection他都在UMich.

1.25 CMU ECE某套过的教授约面。由于paper过于实验数据性不太想去她那,但有总比没好。面完就觉得挂了,问了下cache replacement和logistics。

2.3 收到UCSC offer,估计没其他地方了。

2.4 UW 拒

2.15 UMadison 拒

差不多完结了,大概知道自己什么水平和竞品差距了云云,在一个完全竞争的市场就是winner takes all,还是贴的buff越多越强手,我直接filter掉了泛华人民族主义老师,我在这论述中美差距想必不是个好劳动力。面我的都是强导师学校,其他应该都拒了,找个安稳的地方、nice的导师搞自己的研究就好。同时祝贺美女拿到UIUC offer,学长拿到ETHz offer,叶神UCB offer.

以下原回答

双非 GPA 3.01/4 65% / T103 / G不交了. 只申请美帝 System/Arch/SE Ph.D. (梦校UIUC,一个二流学生进,一流学生出的地方,梦想成为的人 Chris Lattner )抑或去工业界恰烂钱,Ph.D.毕业大概率恰几年软饭再创业,主页。

GPA低是因为知道自己不是考试的料,想早点学会SE,OS,PL,Arch,学了挺多代码量令人发指的课。同时,身体不太好,是个MtF,但申请表上写的是男。

大一打了点CTF和Hackathon,暑假跟学校安全实验室发了篇ISSTA,大二暑假Jump Trading Linux Team实习有return offer,学校某组干了半年的NVM 和 Compiler TA,超算带队2年,发了篇 critique,拿了个第二,大三 UIUC SE 暑研。

想去的 UIUC 组,距消息人士 ,不投今年大概率没坑位的组,可能被diversity。

  1. Ghose Memory
  2. Charitm Sec
  3. Lingming Zhang AI Fuzzing
  4. Jianhuang Memory
  5. Darko Marinov Flaky test

套完了,感觉收益很低,有回复就报的学校。回复率8/17,套的现在一个都没捞我,看来我太没有竞争力了。

  1. Emmett Witchel UT Austin Serverless 强 committee replied 据消息人士,Austin人都去恰烂钱了 已回
  2. Michael Swift Madison NVM 强 committee relied 老板人很nice 已回
  3. Jishen Zhao UCSD ML/NVM 貌似ML化了 强导师 未回
  4. Brandon Lucia CMU ECE NVM 强导师 未回
  5. Dimitrios Skarlatos CMU ECE NVM 强导师 未回
  6. Barisk Umich NVM FPGA密院大本营 强导师 未回 但和 jiachen和ian都聊过。只招收合作过的学生,据说学长面还给个小project试试水平。
  7. Xinyu Xing NW AI kernel Sec强导师 已回
  8. Changhee Jung Purdue NVM 强committee 套了 已回欢迎
  9. Mengjia MIT NVM Sec强committee 已回欢迎
  10. Moin Gatech Memory 强导师 未回
  11. Dkohlbre UW Riscv TEE 强 Committee 已回欢迎
  12. Christina Delimitrou Cornell Serverless 强committee 已回欢迎
  13. Andrew R. Quinn FPGA OS ucsc 无回信
  14. J. ELIOT B. MOSS UMass Database/Parallel Algorithm 强committee 无回信
  15. Harry Xu's Homepage UCLA Data-race related java SE/Formal/NVM 强committee 无回信
  16. Akshitha Sriraman CMU Low latency HPC Metrics Cache replacement 强导师 twitter上套
  17. Alexandros GaTech HPC Network 强导师 无回信

UMich SoP

For pure motivation, I need a Ph.D. for investigating a direction that is worth my life fighting for and the society's values. With the rapid growth of the Chinese economy followed by huge research investment, at least for the past three years in ShanghaiTech, I witnessed extraordinary scientific progress in all disciplines. China has also provided huge markets to fast deploy the research results and companies start to be willing to devote higher salaries and equipment for new grads to dig into their research fields. However, most professor in our school only takes care of short-term profits and put many efforts into applications of established ideas, which things solely get one direction worse in other institutes. Plus, no profitable company is founded on tech infrastructure as Nvidia, Intel and Xilinx do but exploiting the unsophisticated public's time like Tencent and ByteDance. That accounts for the U.S.A. is still the origin of innovation today. In China, the general public's pure pursuit for better technology downturns to self-imposed comfort based on the current circumstance. But, I'm not and from the bottom of my heart, want to use technology to change.

I recently published a paper on the adversarial sample in AI security scenario on ISSTA21 as the fourth author under the supervision of Prof. Fu Song. I helped the first author Ph.D. candidate Zhe Zhao run most experiments during my Freshman summer. It innovatively utilized the fact label change rate through model mutation testing to distinguish adversarial examples and put them on defend the data that use this technique, which we called Attack as Defense. I got to know how software engineering testing works on artificial intelligence and could apply to any other places like language spec on smart contracts, operating system‘s concurrency, and computer architecture's semantics. That's my two other Work-In-Progress work mainly focus on, to use Z3 solver on verifying the possible timestamp attack and arithmetic overflow on Diem move language. During my weekly seminar at System and Software Security Lab for two years, I grabbed ideas like Decision Procedures, basically, the originality/application of SMT solver as the combination of logic and program, fuzzing techniques, and Capture The Flags Surroundings - a security competition.

From my Sophomore year on, my main focus turns into industrial needs practice. GeekPie_HPC is a place I devote time to. We just obtain second place at SC21-SCC. I would say I put the obscure system knowledge into production on high-performance heterogeneous systems. For example, I got how the Linux system called flock work in class, but not until I found it messy once linking on GPFS with un-updated data drag me into this semantic deeper, I resolved it by fsync to manually force synchronize. I knew Cuda only as a library importer using Pytorch auto-gradient that for sure run on GPU, not until I compare different compiler hint with different HPC algorithm and MPI scatter/reduce and alltoallv takes me to figure out how data transmit on GPU. My school establishes a long-term connection to Jump Trading by us winning the super clustering competition that the recruiter gets to know that our students are unique to problem-solving with the right tools. My experience at Jump Trading in sophomore summer let me dig into the more cutting-edge technology eBPF and Intel Mesh Micro Architecture. However, the main focus of industrial is quite different. I mostly applied for the kernel dynamic inspection work on the distributed filesystem in terms of different lease users and apply the core affinity strategy considering core to NUMA, DDR, NIC, and GPU latency. From my perception through my ex-colleague, more production level engineers usually have Bachelor Degree only and are cultivated by the company like my mentor, but the real secret big thing is usually brought by Ph.D. like the author of eBPF or reverse-engineering work on intel processors.

For this summer, I remotely joined Darko Marinov's as REU(research experience for undergrads) and worked with a Peking University classmate Ruidong Zhu for testing order-dependent tests. I started a brand-new direction as pure software testing on order-dependent JUnit tests. Flakiness means tests may fail or pass for different rounds. This could be triggered by some order-dependent values which could be identified on Darko's iDFlaky tool automatically run on Azure. For testing, their previous work explains the cleaner, polluters, and victims of specific variables on specific values. Their latest work submitted for ICSE21 is to introduce Non-idempotent tests that could be identified by running methods one after one in isolated methods/class/entire suite to see whether they may be flaky. We run a dynamic taint analysis tool called PraDet on all the runnable tests on three of their latest test suites and report. We are currently modifying a more advanced tool based on these limitations. During the process. I'm intrigued by the passion of my mentor Wing Lam and Darko's energy in thoughts in contrast to his lazy lying posture.

For choosing UMich, I'm captivated by a school that chose potential people that are intrinsically apt with engineering problem-solving skills and cultivate them into world-class researchers like Baris Kasikci. The recently published paper "Rethinking File Mapping for Persistent Memory" on FAST21 is really amazing. The authors propose to use hash for File Mapping. an example is given in the text, PMem is divided into a file data region and metadata region, if the logical address to be mapped is <inum=1, iblk=21>, the offset of this logical block in the hash is i, then the physical block address corresponding to this logical block is ( file data region start address + i*4KB). There is 5+ paper every year from Baris. For these world-class research opportunities, the CS department of UMich is especially attractive to me. It would be a privilege to study under the guidance of its remarkable faculty during "A New Golden Age for Computer Architecture".

I have enjoyed being able to apply what I learned in classes such as computer architecture and the principle of the compiler to my research. On the other hand, I have also cultivated a broad interest in other areas, such as Reinforce Learning, as a source of inspiration. I seek different kinds of creativity in engineering and in the beauty of itself when it was realized. It is this creative will that I wish to pursue in UMich's Ph.D. program and afterward as a researcher in the industry. My learning experience under the guidance of my advisor convinced me not only of the potential of research but also of the value of teaching. I have also enjoyed working as an undergraduate teaching assistant for the compiler. Through my course studies, I expect to become and will work hard to be a productive researcher and teacher.

UCSD PS

First of all, my previous experience makes me an open-minded person with high motivation that does not take the current circumstances for granted. I think that kind of momentum and curiosity is cultivated through my travel and experience. As for the social practices, for the summer of Sophomore, 20 other students and I come to PingTang, the place installed with a Five-hundred-meter Aperture Spherical Telescope. We investigated how this externality affects the locals' tourism from the first year's pouring of capital to the second year's over-saturated and how it changed with the downturn of the Chinese economy. China's investment of Infrastructure is fundamental to every public in the rural area, and socialism is taking effect with the targeted poverty alleviation in this Xi's time. 800 RMB per year per family is the definition of the poor and until 2020 if he's still under this line, he has disabled member or unwillingness to labor. However, criticism is cast on the push of every man to engage in the smallholder economy like strawberries that do not match the local environment. I solo visit HK during the protest, Singapore, Malaysia, Thailand, India, and Nepal within 12 days. I witnessed the big countries' hegemony and small country esteem. I witnessed the deep inequality of poverty in this world and the importance of establishing the network/highway infrastructure.

The open mind takes me naturally into a diverse environment. My previous employer, Jump Trading is a place that embraces diversity. I first come to realize that in a tiny office, there exists multiple races, LGBTQ+, multiple languages as a native language, and multiple religions. For communicating more fluently without barriers, all we did is to respect with no discrimination. The colleague who worked with me is an MtF(Male to Female), besides calling 'her', talking off sex mutual stuff and no man's joke. My mentor is born in Malaysia and his mother is from England and his father is from Hong Kong. So he's quite familiar with Cantonese words. From a technical perspective, the people who graduated from French Schools focus more on mathematical proof as well as intuition while those from American Schools care more about implementation and effectiveness. We are valuing every people from different backgrounds which I'm tuned a while for it since I'm situated in a single race country with a single religion. Every year, there are 3 top-tier competitions for super-cluster competition and I'm the lead for the team to compete with prestigious universities like UCSD, UIUC, and Gatech. Our team GeekPie_HPC has recruited 2 females out of 6 for daily training and eventual competition. We highly recommend female computer science students to join in such a low female density department.

My research taste and delight come from the demand of my curiosity. Many dummy things happen when choosing the courses and taking exams, I get accustomed to getting the hardest course that gives me the challenge of pressure. Once I'm determined to do something, I would focus on the point until it's figuring out or give up it because I knew the stuff does not fit me. The overall process of college for me is a time of testing failures. The projects and exams are similar to a I knew that I have many shortages, but it didn't bother my desperation to solve hardest open questions.

Jung making-connection Letter

I’m CS Undergrad from ShanghaiTech specializing in general systems. I grabbed most of my practical skills by attending GeekPie HPC. I spent some time working on eBPF and intel processor micro arch at Jump Trading Shanghai (which has proven to be engineers' efforts talking with other guys but get me into the micro arch world). During summer 2022, I worked on Java Flaky Testing with Darko Marinov from UIUC. During my time at Chundong's lab, we discussed a lot on your paper of study on failure tolerance, memory order bugs, and performance on Optane persistent memory. I referred to your paper for grabbing a general knowledge of how to tune performance on Optane Memory. I think I could put energy into them if I had the opportunity to join your team. Sincerely, would you recruit Ph.D. or masters this year?

Best Yiwei

  1. 南科大飞跃手册@wjc‘s recommendation
  2. 孙明瑞@n+e’s recommendation
  3. James.Qiu@Zhihuihu

组里的几个邀请

上周、上上上周和上上上上周,我们迎来了组里的讲座,一个是新加坡国立做Software Analysis的Prof Visit。一个是用DTMC来解释音频的项目。The author XIAONING DU is now in Sydney Tech。另一个是在交大读的研究生,NTU 读的两面本和博。 The author Hongxu Chen

我对前者的直观感受就是,可能这个方向的博士不是很难拿吧,但deepstellar当时还是热点,现在有点凉,但证明能干一些事情了,她趁火拿了好几篇adv和benign。我对后者的感受,很强,我到博士不一定有其水平的一半。

RNN to DTMC


就是一坨统计堆出来的可解释性。
进一步抽象


这里用的公式\(\operatorname{Dist}\left(\hat{s}, \hat{s}^{\prime}\right)=\Sigma_{d=1}^{k}\left|I^{d}(\hat{s})-I^{d}\left(\hat{s}^{\prime}\right)\right|\)

最终的结果

最后用统计做了一堆相似性的bound “证明”,就说RNN聚类抽象出来的state 和DTMC 一一对应。想法很新颖,但其实回头想没什么内涵。

MUZZ

这里 Thread-aware 就很厉害。

相当于独自开个领域


可我事后问了他scalable的问题,他的回答:

go channel不行 java lock 有几个坑 lock threading 不能很准 java分析 fuzzing oracle 异常 jlang 方舟编译器。 scala native不靠谱 动态 gc llvm 不会做 jvm 抽象等级 z一致性 印度 chenhao 学术界。llvm uiuc 
爷 工业界 fuzzing ok2。

他还有几篇

坚定了我去美国找个工位的目标,加油~

How to make a good perfing of pcie latency

The module is uploaded to the .ko

The script is

rmmod pcie-lat
ruby measure.rb -p 02:00.0 -l 10000 -b 0 -o 0x0
ruby measure.rb -p 02:00.0 -l 100000 -b 0 -o 0x0
ruby measure.rb -p 02:00.0 -l 1000000 -b 0 -o 0x0
insmod ./pcie-lat.ko ids=8086:1533
rmmod pcie-lat
echo 0000:02:00.0 > /sys/bus/pci/devices/0000:02:00.0/driver/unbind
ruby -v
ruby
lspci -nn -s 2:00.0
insmod ./pcie-lat.ko ids=8086
lspci|grep Eth
./measure.rb
make
ls
cd pcie-lat/
git clone https://github.com/andre-richter/pcie-lat

The result is

writing 3σ values (in ns) to file...
root@s3l-thinkstation ~/pcie-lat (master)# ruby measure.rb -p 02:00.0 -l 10000 -b 0 -o 0x0�����������������������������������������������������������������������������������������������������(base) TSC freq:     2294609000.0 Hz
TSC overhead: 28 cycles
Device:       02:00.0
BAR:          0
Offset:       0x0
Loops:        10000

       | Results (10000 samples)
------------------------------------------------------
Mean   |   3764.24 cycles |   1640.47 ns
Stdd   |    314.56 cycles |    137.08 ns


       | 3σ Results (9995 samples, 0.001% discarded)
------------------------------------------------------
Mean   |   3759.46 cycles |   1638.39 ns
Stdd   |     64.10 cycles |     27.93 ns

如何在Python logging.Formatter 格式化

我目前正在尝试居中与👉Python记录器中的日志记录级别字段,输出如下:

[    test_log    ][    DEBUG]  test (color_logger.py:66)
[    test_log    ][     INFO]  test (color_logger.py:67)
[    test_log    ][  WARNING]  test (color_logger.py:68)
[    test_log    ][    ERROR]  test (color_logger.py:69)
[    test_log    ][ CRITICAL]  test (color_logger.py:70)

但看起来像:

[__main__][DEBUG]  test (color_logger.py:67)
[__main__][INFO]  test (color_logger.py:68)
[__main__][WARNING]  test (color_logger.py:69)
[__main__][ERROR]  test (color_logger.py:70)
[__main__][CRITICAL]  test (color_logger.py:71)

有两个问题,

  • funcName 而不是 name

  • 得考虑右对齐和居中

解决方法

import logging

BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)

#The background is set with 40 plus the number of the color, and the foreground with 30
#These are the sequences need to get colored ouput
RESET_SEQ = "\033[0m"
COLOR_SEQ = "\033[1;%dm"
BOLD_SEQ = "\033[1m"

def formatter_message(message, use_color = True):
    if use_color:
        message = message.replace("$RESET", RESET_SEQ).replace("$BOLD", BOLD_SEQ)
    else:
        message = message.replace("$RESET", "").replace("$BOLD", "")
    return message

COLORS = {
    'WARNING': YELLOW,
    'INFO': WHITE,
    'DEBUG': BLUE,
    'CRITICAL': YELLOW,
    'ERROR': RED
}

class ColoredFormatter(logging.Formatter):
    def __init__(self, msg, use_color = True):
        logging.Formatter.__init__(self, msg)
        self.use_color = use_color

    def format(self, record):
        levelname = record.levelname
        if self.use_color and levelname in COLORS:
            levelname_color = COLOR_SEQ % (30 + COLORS[levelname]) + levelname + RESET_SEQ
            record.levelname = levelname_color
        return logging.Formatter.format(self, record)



# Custom logger class with multiple destinations
class ColoredLogger(logging.Logger):
    FORMAT = "[$BOLD" + "%(funcName)s".center(20," ")+"$RESET]["+ "%(levelname)20s" +"]  %(message)s ($BOLD%(filename)s$RESET:%(lineno)d)"
    COLOR_FORMAT = formatter_message(FORMAT, True)
    def __init__(self, name):
        logging.Logger.__init__(self, name, logging.DEBUG)                

        color_formatter = ColoredFormatter(self.COLOR_FORMAT)

        console = logging.StreamHandler()
        console.setFormatter(color_formatter)

        self.addHandler(console)
        return

有关在公司建立的友谊。

我感觉我很垃圾。

自从进了我司之后,我感觉从各方面能力都在肉眼可见的提升,问题是如何在未来的每一天都保有这个向上的圆通之气。

我大概学会了交友,从世纪佳缘找到的友谊不算友谊,在高考以前得到的友谊也不算友谊。真正的友谊是建立在利益之上的共同体。如果一个人能力很强同时又在你最需要的时候帮了你这即友谊。

自我推翻自我重建,我觉得是活着的人该做的事情。
一个人要是对这个世界失去好奇心,失去求知欲,这个人已经是死的了。

Edward Elric

We live in a twilight world, and there are no friends at dusk.

Walt Whitman

关于这个世界上的 idea 是否都被 Berkeley 垄断了

听同事在讨论这个牛逼的数据库哪家强的问题。我稍稍搜了下放在内存上的实现。不过感觉受限于内存在46bit的机器VM上最多1T的内存。群里有人说PM是内核4以后的最多内存计算方式。甚至intel发了ddr4接口的 nvdimm 。我上次知道这个东西还是在王春东的课上。所以王老师是个好老师。

这是一个用 nvram 做储存设备的数据库,0202年 Amp lab 年度项目 Redis over nvram. 还有pmdk 这种开箱即用的 API。总之 intel 是下了大功夫的。

相当于重写一遍pmem的底层库,让上层建筑能很好的看不到底下的婆罗门。 pmemkv 有直接 key value 操作的 remove()/get()/remove()

话说我是怎么知道这些东西的。因为王老师讲过,殷老师在做。大概在CA问问题的时候问到了,然后我的boss也同时对这个有需求,我就拿过来用了。

libpmem2写的是真的好, memmove 重写了,甚至用到了avx512的寄存器(其实挺多的,有xmm ymm zmm 16*512*3,其实就是non temperal store,intel在fpu和单核的最大带宽上还是下了很大的功夫。)。加之现在tiiger lake据说在这个带宽下并不降频,这可以说很优秀了。

顺便之前在睡觉前当助眠曲的东西,一个b站牛逼的c++ up🐖, 我加了他的群以后,很快就有会cpp的人回答我相关问题,比stackoverflow好很多。

感觉中文搜很多东西,会有一个人讲的很优秀。相比来说,英文内容更实际一点,但测试案例这种东西还是比较需要思考的,至少需要看会源码,会动静结合调试代码。如果能从github上搜到就不要自己调,如果搜不到就赶紧自己写一个然后开源。(虽然如果work for companies 还是不要,但还是能以博客的形式发出来,或者以论坛的模式。)

若未来去美国读 nvram 相关的 PhD 也未尝不可。

关于std::sort函数 开源可见的版本是否是跑的最快的版本。

https://godbolt.org/z/jxoYx7

我们可以很清楚的看到都是call 函数。我看到的源码有用intro sort 实现的gnu libcxx 也有分桶排序 的llvm 的版本,可是linux distro都是出厂自带,且每个公司都会对自己的代码进行魔改。今天被dhz的问题问到了,我还是cpp学艺不精。

zlw 曾经问过我一个问题。是std::sort 非常快,且看不到源码,这和我看到的好像不太一致,我从来没调试过glibc 和libcxx.so 源码和自带的不一样,谁知道呢?

如果glibc可以插一些奇怪的东西,那就太棒了。

linux team's motto: make our guest quicker

德扑总结

赌博的艺术

作为一个还没学会概率论的妓院学生,我可能是找死军团。孙老板和Toby 都是Jane Street 大师培训过的任务,就有点瑟瑟发抖的感觉。

还好之前看过GTO的实现,并抄写了一遍强化学习德州Agent,DeepStack: Expert-level artificial intelligence in heads-up no-limitpoker, by Moravcik et al, Science, 2017 。 主体都是先博弈论盲猜一波,再MCTS。

再稍稍学了下后就开始跟各位大脑决战了。 下午5点开始,大概过了半点之后就大概知道各位是什么套路了。卢老板很会bluff,但总会盲猜胜利。雷(然苒)挺女生学霸范的,确实牛逼.

我在明知道赔率大很多的情况下还是输给了邓hz 100 一盘。

什么是无所匹敌的牛逼

终于在朋友圈里能找到几个数学竞赛的一等奖了。一个是2016 福建省集训队的,还有一个是高考上的北大数院。可是quick math 不是很好,现在屈居做了一个optiver 的quant intern。 我感觉在这里的所有知识都是为了更好的赚钱而不是为了世界产生更好的影响做的。但如果无路可走,一定要在这个领域深耕也不是不行。只是感觉未来某一天就就被科技超越。不过如果市场还在,这种职业就不会

之前的比赛让我对高频交易有了比较naive的了解,无论是看book pressure 还是market making。 可以说是有一套没有成为显学的技术在。孙老板就是那种学这个学了数年的经验老狗,可是如果有实践经验的话,也确实感觉孙老板挺有前途的。孙老板是个挺会做人的人,确实是我人生失败的部分。

交友篇

女生的评价体系

对于我最近碰到的四个女生,可以很清晰的看出哪些是乖乖女与世无争感觉的,哪些是有强烈个人意志的。或许是英美基因当中那种冲劲和国内的风气不太一样吧。这和当年的“上海学生圈“很不一样。她们都是有权有势的人,而她们确实是靠自己的聪明才智。至少都能混上北大,牛津,复旦。芒果虽然号称富婆,可是生活脾性感觉不像大富大贵,可至少看上去大家闺秀,还是杭州的,确实不错。如果找不到好男人,没有想法在quant 继续,我觉得很难在上海买房。事实就是这么残酷。

女生在申请上有很大的优势,尤其是那种娇小的女生,可能迎合美国身份政治的想法,我觉得无可厚非,谁不想组里面有个漂亮的,每天认真打扮的,可是要看做什么了,我感觉她们事业线拉不长。

就申请来说,复旦的管院女生就是比清华数学系申请的MFE好很多,一个是UCB的Hauss,还有是哥大的,高下立判,可是卢老板确实看上去很强。就我在B站关注的扁脸猫与午后红茶withLaura. 大概就是两校所在地区的区别。

男士能有多强

虽然quant 给的多,但我觉得给的还不算多,而且确实竞争挺大的,一个数学竞赛金牌进jump这种公司多学个几年,做个好QR不是问题。但他们的薪水能否支持他们在上海买房,大概需要十到二十年吧。人也不傻,为什么不出国混呢。

在一个人所擅长的地方和一个人喜欢的地方努力是有意义的,可是也容易被蒙蔽,为何我爸当时的大学同学打工的现在基本比不过他的原因也在此。

对我的兴趣

我挺菜的,在别人的饭局上都属于最菜的,鄙视链的最底端,被大多数人当成无关紧要的人,我现在在做的事大概就是为这个学校争点名气,可是被又龙哥当成”对自己无用的事“了。大家都不想浪费青春好好学习的时间。确实,我有的时候挺自卑的,也很久没有和女生说话超过十句话,但这种也不算是宅。就是一种对自己菜的表现,我需要认证对我的技术护城河拥有数10w小时的刻意训练。

可是感觉现在的女生眼界都有点高,也许是我表现的不太明显,确实脑残。不过我带的女生第二天就被偷师被三个男的约去cj了,牛逼。有的时候我确实不太近人情吧,不过我已经确定要一生努力奋斗了,不然也不会像小扎一样更新博客了。

work work study study life balance

作为一个超级对学习有持续激情的人,想搞点事情,不满于现状,你也可以说是革命。至少若无return,还是在HPC和sybolic execution 上深耕下去。

不知道在国外的人在show什么

看到之前国外的人show 自己的见闻还是有点小羡慕的,毕竟我已经20年在这个破城市了。我内心还是有想在新地方多走走的想法,可是能力不足以我这么干。

可是疫情开始后的show 就有点作秀了,口罩不带,还在封城的阶段,知道你又要送钱,又要付出生命代价了。

不知道我的知识有多封闭

我之前对欧美文学的观察太少了,连漫威这种描绘美国历史的剧本都没好好看,认真看解读,我觉得是我太闭塞了,还有孟德斯鸠,哈耶克,犹太共产党人的一系列东西,我觉着是自己太傻逼。有点自以为是了。

Approaching GRE

我好像一点都不紧张。

for 芒果

如果还有缘分,我会追上的,可是我还没有钱和资本,也不知道他看不看得上我。也许是我想要有艺术气息,顾家,且被富养的人吧,真没觉得他对我这种中产有什么压力,可是我确实感受到了向上的动力,让身边的人变得更精致,这大概就是我家国情怀的体现。

在我心里有一个更大的picture,只是现在尚不明朗,”待到山花烂漫时,她在丛中笑。“

for 学神

她和我专业有点相近,她有点母胎单身,但却想奋斗的感觉,有点过于激进的表达自己的想法,却总是有点不成熟,这种小局carry不来,可能是年纪比较小吧。

我倒觉得家常便饭,只是有个人在说话的时候我只会在一旁,觉得dhz说的很多时候有点太没有大脑思考了,感觉有点思考的东西,其实是看别人的想法,其实孙老板也是。可能人缘好的人都有这种想法。

所有的关系不过就是利益交换

我还是少参加点这种sb聚会了,浅尝辄止。现在还不是显形的时候,还没有任意增长完我呢。

如果人生也是德扑,需要基本面判断,需要博弈论,需要赌博。我还没有到翻盘的瞬间。如果脑袋好使,比较鸡贼,运气比较好,拿到的再差的牌也能多拿很多钱。

Some invitation with ICE Zhang @Pennstate

Good to see that the emerging youngsters of Generation Z in China. When it comes to the Zhihu Question "What are 00s anxious about?" ICE Zhang points out a variety of great people. My answer was OIer, IMOer and those who have a lot of time digging one single target without any interference will temporarily take up the "bill board". But with time, people will get to realize this world need hero, a person who can see through the greatest evolution of the world and provide surging advise.

Zhang maybe that kind of person. I would say it's really hard to invite such a guy to Shanghai. But hopefully, he has a great amount of Gay Joy in Shanghai, mostly PingCap employees and his friends and his friends's friends in minority. I would say, before my internship, I never jump into the networking with strangers. But I found it funny. I dived into Persistent Memory stuff which is ideal for me. One man does not build the Rome. I need others' info and their progress to push myself. Only through others' progress can see my limit and inability and lack of determination.

I'm informed that the gay with ICE yesterday was even not enter her adulthood. The Turing Award Winner compose his poem at early 20s. I would say, I start late and I don't think I could dig as far as her. I'm a poor Math guy, even may fail at Daniel's Abstract Mathematic. I could have been captivated by Group, Ring and Field. I could have made systematic view of analysis and geometry. I could have write more elegant code to let other people endorse type theory. I can not because I've got only one body and one stream of mind.

I'm in favor of pursuing my own heart more. I find myself limited time in this place. I have to make all the stuff come true!

工作以后的作为

打了一个量化交易的比赛,说实话感受到了自己的无能,虽然写代码的能力不错,可是数学比别人上学太多了。果然一个不是拿IMO的物竞大佬不是一个好程序员,可能是最近厉害的人见的太多了。

量化交易比赛

是个对Future Bund 的仿真程序,有点我自己想写的高频模拟市场的味道,可是就是没时间。一开始我们着重于做alpha,主要就是对有的几个feature做Linear regression。也许是那个写的人非常刚愎自用,其实我没有写很多代码,我就帮忙弄弄环境,跑跑back testing, 优化优化速度,还有重构代码。那几天和龙哥闹矛盾,导致我没睡好,所以写出来的代码挺多bug。

两天后交了Alpha,被牛津大佬 Michael Ng 草虐,我们的研判是速度太慢,于是就只搞Market Making。后来又被Quickie的IOC 搞了。咳咳,我们又拿了他们的代码修理了一番,最后拿了个第三。

据许return 说,Alpha is the most important。是我们太菜了。

CPU Affinity

无事发生,就是做做kernel conf 的自动化,写个算法就行。

和其他学校同学的比较。

《夜航船记》说的好,在赴京赶考的路上,总是一个慢慢发现自己牛逼的过程。我觉得我们学校以及我过去十余年最好的培养就是实践。也是jump招我的原因吧。可是我从别人身上学到了很多,至少说的话都很精确,不会产生明显的谬误,且挺实干的,可是有努力的也有天赋型的,有狂野的denghz和东方也有稳重的Polytechinique 的yiran。

我有优点也有缺点吧。只是有的时候有点锉。

有关未来的出路

如果return 我绝壁三年提前毕业。如果没的话,好好考博士。

其yu就靠共勉。