j4 c#: brief review

See post on j4 stick2c++: Score big{losing@quant/c#

This review is mostly for future planning, not nostalgia

  • — Q: what were the motivation/j4
  • c# was #1 on front end in banks + some buy-side… Now it is losing mind share to web GUI. Very little heard on WPF
  • c# was challenging java in a small number of banks … Now it has taken too long to mount that challenge
  • After “conquering java, I felt (and still feel) c# is closer to Java.
  • I witnessed a few systems with java back-end and c# front-end and a demand for versatile developers….Now there are very few.
  • On Wall St I saw more c# than c++ jobs… Now I still think so.
  • Q: why I stopped pushing on the c# front?
  • I don’t like the Windows platform. My focus has shifted away. No single big reason.
  • — Q: how was my planning and execution? I feel 80% successful. I feel in my c# first 12M I gained more confidence (5/10) than my java first 12M
  • attend interviews remotely… Worked
  • take on a wide range of c# tasks … worked, including WCF, Excel, WindowsService, vbscript integration, …
  • chip away at the biggest rock — MSVS .. worked. Now more confidence
Advertisements

most specializations(bets)turn out non-strategic

Look at my past vindicative specializations vs 

The Singapore government make technology bets. Venture capitalist make bets. Many organizations also make technology bets.. Every technology bet can lose or win.

In this post, I’m not advocating trySomethingNew. I am advocating specialization, which often requires accumulation and sticking to something not so new, like FIX.

If you play safe and stay within the comfort zone of java/SQL/Perl, then don’t under-estimate the negative consequences :

  • reactive
  • doldrums — see post on “y re-enter c++”
  • no deepening your understanding — a zbs
  • remain afraid and /uninitiated/ with the lower-level details below JVM

blockingMutex implementation ] kernel

Background — Linux kernel provides two types of locks — spinlock and blocking mutex, as in https://www.kernel.org/doc/htmldocs/kernel-locking/locks.html . Here I focus on the mutex. I think this is far more useful to userland applications.

https://lwn.net/Articles/575460/ has good pointers:

  • I believe context switch is expensive since CPU cache has to be replaced. Therefore, optimistic spin is beneficial.

https://github.com/torvalds/linux/blob/master/kernel/locking/mutex.c shows

  • a blocking mutex used in kernel, perhaps not directly used by userland apps
  • implemented using spin lock + some wait_lock
  • maintains a wait_list. Not visible to any userland app.

 

c++^java..how relevant ] 20Y@@

See [17] j^c++^c# churn/stability…

C++ has survived more than one wave of technology churn. It has lost market share time and time again, but hasn’t /bowed out/. I feel SQL, Unix and shell-scripting are similar survivors.

C++ is by far the most difficult languages to use and learn. (You can learn it in 6 months but likely very superficial.) Yet many companies still pick it instead of java, python, ruby — sign of strength.

C is low-level. C++ usage can be equally low-level, but c++ is more complicated than C.

given value X,get neighboring nodes in treeMap

Basically, find the left/right neighbor nodes.

! Don’t use upper_bound since lower_bound is enough.

  • If perfect match, then lower_bound return value is all you need. No need for 2 nodes:)
  • If no perfect match, then lower_bound() and prev(lower_bound)
  • if X too low, then lower_bound() alone is all we can get
  • if X too high then prev(end()) alone is all we can get

See https://github.com/tiger40490/repo1/blob/cpp1/cpp1/miscIVQ/curveInterpolation_CVA.cpp

lower_bound() means touchUpperBound

  • std::upper_bound() should be named strictUpperBound()
  • std::lower_bound() should be named touchUpperBound() since it can return an element touching the target value

If no perfect hit, then both returns the same node — lowest node above the target

  • if target is too high, both return end(), which is a fake element
  • if target is too low, both return begin(), which is a real element

Q:Can this array be preorder-BST#hackerrank

This was asked in a 2018 hacker rank interview, not as important as an on-site coding question. However, I see this question as a classic.

https://www.geeksforgeeks.org/check-if-a-given-array-can-represent-preorder-traversal-of-binary-search-tree/ has a tested solution but it’s too cryptic. I added instrumentation to help myself understand it. See my github code.

My analysis — After we have seen N (say 7) nodes, there’s exactly one possible BST we could construct, so let’s construct it. The next node would have only one place to go, and we can check if it obeys pre-order. https://github.com/tiger40490/repo1/blob/py1/py/tree/canBePreOrderBST.py is my tested code, probably less elegant than the above, but I’m still proud of it.

I don’t think any solution is actually O(N). My solution is not inferior. It has a readability advantage. It’s longer but not necessarily slower.

 

## execution algo + other domains / skills

OMS — is probably a core module in execution system. Equity and FX systems tend to need OMS but many trading desks presumably need no OMS, very simple OMS or off-the-shelf OMS. A buy-side trading desk may simply use the OMS of the broker. The same could be said of “execution systems” like VWAP algos.

Therefore, I feel the importance of OMS/EMS is over-stated.

SOR — is more niche, less “generic” a skill, but as a module is more visible to the business.

FIX connectivity — is a more generic tech skill and shows resilience to churn.

mkt data — is more “separate” from the other skills.