Jonathan Lam

Core Developer @ Hudson River Trading


Blog

Brain dump 5: post college chapter 2

On 7/1/2023, 3:51:58 PM

Return to blog


N.B. The apparent significance of each brain dump thought here is exponentially weighted by the time elapsed since the conception of the thought. I.e.,:

\[D_i(t)\propto S_ik^t\] where \(D_i\) is is the apparent significance of thought \(i\) (e.g., given by the amount of detail used to describe the thought), \(S_i\) is the actual significance of thought \(i\), \(t\) is elapsed time, and \(0\lt k \lt1\) is some exponential decay factor. 1. My main motivation here was to record some thoughts from the past month before July 4th celebrations erases them from my head.


Back in the city

The most eventful news was the smoke that came from Canada's wildfires. It came in two waves, one ending around today. The first time, the sky was very orange for an hour or two, and then it was very hazy and smelled of smoke for another few days.

A lot of old friends live around the city, which has made my weekends very eventful. Almost too eventful.

I went to the National Museum of Math (MoMath) with C, one of my best friends from K-12, who had a company pass. We saw our friend F's projects from a hackathon still on display on one of the exhibits, which was pretty cool to see2.

I passed by my coworker J walking down Bowery today. It's even more coincidental that he just started at HRT this week, so I wouldn't have known him a week ago.


Back to work

There's a lot that could be said here, so I'll just report the top-of-mind.

I didn't really have proper onboarding. I didn't join with the new-grad class due to the off-timing of the layoffs. About a week in I was put on production projects, with little to no previous knowledge of finance.

I feel very lost, often -- but I believe that this is the normal function of being new to the industry, company, and codebase. Whether I may have felt less lost (or whether the integral of the difference will be positive or negative) had I joined with the new grad class is something I will never know the answer to. Perhaps I'm truly learning faster and feeling less confused overall than they because I was learning hands-on right away; or perhaps I am more confused because of the lack of high-level trainings about company culture and an overview of the tech stack.

One of the common sentiments is waves of understanding. There are cycles of being assigned a new task, being utterly lost as I try to understand the task description and swim through unknown lakes in the codebase. Then I ask my mentor or manager or some other point of contact for a meeting with some basic questions, and viola! I feel enlightened after the meeting, because I was explained a lot more context than I could ever have figured out by myself.

It comes into play with a larger theme of "the right time/place/way to ask questions." Most people will say it's better to overask than underask -- but I understand that there's also a point when you've over-overasked. At that point, perhaps there's some mild effect of looking stupid, but more importantly, you haven't taken some time to figure out things on your own. And the problem with underasking is that even if you try to understand everything by yourself, e.g., by reading through the codebase and all the other materials the internal search engine has to offer, there's a lot of knowledge scattered throughout the brains of relevant people, and are not condensed into any pleasantly consumable for the self-learner. It's a balance of knowing which knowledge is better to self-consume, and which to ask people about. A simple distinction for me is the line between finance and tech knowledge -- it's usually much easier for me to ask about the former and read the codebase for the latter, but there's certainly some times when this isn't exactly the case.

Playing along the above theme is the feeling that sometimes I don't know the right questions to ask. This makes it difficult even with the most knowledgeable people surrounding you who are able to answer any question you had -- if only you had any! Sometimes I feel that the only question I can ask is "Can you explain this task/code/problem/concept to me?" which is okay for smaller things but I worry about wasting the askee's time if it feels like something large and basic. I think it's easier to get past this as I'm getting more accustomed to things at HRT and my questions feel less trivial.

Alternatively, rather than asking about every little detail to make sure everything is correct, I also let myself be corrected much of the time. On code reviews, I will leave plenty of questions in the TODO's questioning my own design decisions. This is "asking questions by demonstration" and "learning by correction" -- because it is often more difficult to learn what is right by hypotheticals than to learn what is wrong by concrete example. Again, it's a learning process to know what is better to be asked upfront.

I was expressing to my friend M that my experience at work has felt much like being in a huge adult playground full of shiny cool tools. It's really cool when I do understand a new tool, but I feel alone a lot of the time. I can usually ask someone for help on a part of the course, but sometimes I don't even know what the obstacle is called so it's difficult to ask. Since things move so quickly here, I feel that I have to do the assigned "ropes courses" in a reasonable time, and it means getting bruised up as I try to figure it out myself.

The culture at HRT is work-hard, play-hard. My team has a very large wine and dinner culture, which is very different than what I'm used to. My manager is also very much in the mindset that your work style is up to you.

A lot of the work that I'm doing so far has been somewhat low-priority maintenance work on the codebase, which is a good way of learning the codebase. It's different from the primarily R&D work that I've been put on previously at Google and past internships, but not unwelcome -- I have wanted to get more on the production development side of things, at least for a little while.

A lot of the work I've done is writing code to connect to different markets (market drivers) by reading and implementing their protocols. This may seem like mundane work (eww -- reading spec/data sheets) but I had the gratifying realization that this was not unlike "the nice days of minix-1.1, when men were men and wrote their own device drivers."3


Hey, biking is fun

Strava is pretty cool too. Fixies/single-speeds seem exceedingly common in NYC due to being cheap and useful, but I still love my Miyata 710. It's super reliable (especially considering its age), strong (steel > aluminum), and has more to work off of (e.g., it's probably a pain to install gears on a singlespeed -- they don't need the cable routing or dropouts you might need).

I biked a marathon-length trip today along the Hudson river, and across the GW Bridge. Nice experience, especially with enough sunscreen and water.

A few weeks ago, I went to volunteer for a triathlon in the Palisades and then went to bike in Rockaway. We saw dolphins4 at the beach there -- my first time seeing them in the wild. I'm glad there are a lot of bike-friendly routes in NYC, but there's also a lot of bike-unfriendly routes. Google Maps is pretty good.

I went biking with a wobbly friend T in Central Park on the Citibikes, which made me realize how much more I love my bike.


GNUUUUU

I had a lot of fun setting up my work setup. For the most part it's the same as I had with Google -- Emacs5 + GNU screen for multiplexing. The difference is that the codebase here is small enough to use the standard clang LSP server 6, and I have a ton of git worktrees open to work on multiple tasks concurrently.

I only set up lsp-mode recently -- for much of the first month I was only using a modified grep alias. I also realized how much faster ag was than grep. I think I need to do the transition from grep to ag/rg, from GNU screen to tmux, and from bash to something more modern like zsh/fish, but my fondness for old-school GNU foolery is holding me back.

Similar to the aforementioned realization that I was becoming a driver writer like in the olden golden times, I felt similar when I started using the terminal bell character (^G; this can be inputted using C-v C-g or tput bel). I used this to be notified of the termination of long-running scripts by adding ; tput bel at the end of the command. GNU screen displays tabs that have an outstanding bell differently, so I get a visual indication if I miss the audible beep.

C++ wise, I've been greatly enlightened about many existing C++ language rules and new (mostly C++20 features). In particular, there's a lot of template work going on in our codebase at work7; two-phase name lookup probably bit me the most at the beginning. I really enjoy C++20 features: std::span nicely encapsulates lightweight slice constructs similar to Golang's slices or std::string_view. The ranges library generalizes this further, giving us lightweight slices onto non-array-like iterables8. C++20 concepts and the requires expression give you Haskell-typeclass-like behavior -- you can perform static checks on types using static_assert() or for template parameters (but before template instantiation; which greatly improves error readability). These features are making C++ really feel like a modern language.

I'm in the early stages of the OS project and working on the nand2tetris course with a friend. Both have been very fun but very slow given the limited time dedication. For the OS project, I've been reading the LDD3 chapters on memory management (8, 15), and hope to write my own Linux-inspired memory management subsystem soon.


Conversations

Being on the other side of a mock interview is an interesting and educational experience. I believe it's in many ways like being a teacher -- an interviewer wants to assess the "code signal" that the candidate gives off. The mock interviewer, additionally, wants to provide some feedback to the interviewee, perhaps involving more directed practice questions or reading materials. It requires preparation and experience to be a good (mock) interviewer, which is something I also feel about teaching. One of the most important things is to know the question well; not necessarily knowing all the feasible ways it may be solved, but to understand all the quirks and interesting points and general directions that someone may approach it.

One of the more interesting conversations I had was with a friend who said that he doesn't know the feeling that others may call "worry." This was certainly a strange afflictment, and I imagine some qualifiers are needed if you really wanted to argue the point. But it shows in his personality, and helps me realize that there are so many other ways that people understand and experience the world. It also made me try to think about how I interpret stressful scenarios, which led me to theorize that I distinguish between stress that stems from worry and that which stems from tiredness9. It also makes me think about a recent talk at HRT by Jinyi Shao, writer and director of Chang Can Dunk, in which he described life as being experienced through the stories we tell ourselves. To me this underscores the importance of metacognition and reflection.

Every long conversation devolves into a discussion of the post-COVID world, the effect of ChatGPT on ourselves and on the school-age generation, and how to be satisfied as an adult when work takes up so much time and energy10. This happens regardless of whether it's catching up with an old friend or chatting with someone after only a short while. It's a bit harrowing; or perhaps it's just that I'm a lousy conversationalist.


Footnotes

1. And then slap on an arbitrary additive fudge factor \(\zeta_i\) due to the fact that I didn't put much thought into writing this post or coming up with this formula -- this is a brain dump post, after all. I need to put a time limit on these brain dump posts so I that they can be more frequent and candid.

2. The closest I've gotten to the "they don't know" meme in real life.

3. Linus Torvalds.

4. "How do you know they weren't porpoises?" my coworker C asks at lunch. "Porpoises are one of the most misunderstood animal."

5. I recently learned about two very exciting commands in Emacs -- vc-annotate and exchange-point-and-mark (C-x C-x).

6. Just slap a ccls file in the basedir and let lsp-mode take care of the rest. At Google, you would need to use their custom LSP solution because there is no way you're indexing any reasonable subtree of the codebase.

7. This made pre-LSP life pretty hellish, but now it's really not too bad.

8. I haven't seen much use of this however, as we like our contiguous memory arrays in HPC.

9. I.e., the former is usually stress from unknown, unusual, or unfriendly environments, such as social anxiety. The latter is the stress inherent in most school and work due to a large workload and tight deadlines. I believe that this distinction may help me understand myself better, but I'm not sure at the moment where this theory leads.

10. Regarding the last point, that's why biking and my OS project have become so important to me as of late.


© Copyright 2023 Jonathan Lam