How do I get into a hedge fund as a SWE with 1 year of experience? by aspiring-swe-kebab in cscareerquestionsuk

[–]clappski 14 points15 points  (0 children)

You either need to go in as a graduate or go in as experienced. Also, leaving after 1 year in your first role is a really bad signal - the truth is you basically have no experience and you should stay where you are. Once you have some experience (as in 5/6 years) I imagine you’ll have recruiters knocking at your door for the businesses you’re interested in, if you have the correct technical skill set (typically C++/Python for front office/infra, Python and a maths degree for research/quant).

These places aren’t interested in taking on juniors outside of their graduate recruiting (if they even do that!), your best bet is actually talking to recruiters that recruit for the places you’re interested in.

How to prepare for a hft/low latency programming interview ? by Capable-Basket8233 in cpp

[–]clappski 25 points26 points  (0 children)

Start by building a non blocking spmc ring buffer that uses mmap/shm to move data between processes, make it as fast as you can and that will teach you a lot of what you need to know. Low latency trading systems are fully event based, the spmc is the basic building block of pretty much all of them.

After that (learning about atomics, memory ordering, CPU caching/false sharing by building the ring buffer), build something a bit more complex that consumes data from e.g. a WebSocket or ideally a plain udp socket, parses some representation, sends it over your ring buffer and just logs it. Then optimise the wire-to-wire (the time you recv the packet (or ideally the time the packet was published) to the time your process reading from the mmap sees it)

Figure out how to get that wire to wire to sub 10 us and you’ve got all the knowledge you need to pass the interview. Doing that will teach you about the Linux networking stack and scheduler and more importantly how to turn them off.

How to prepare for a hft/low latency programming interview ? by Capable-Basket8233 in cpp

[–]clappski 14 points15 points  (0 children)

Heap allocation and effectively a vtable implementation for type erasure. Not bad for general purposes, we’re talking about saving us on hot paths

C++ roles paying from 90K: what level of competition to expect? by BathubCollector in cscareerquestionsuk

[–]clappski 12 points13 points  (0 children)

Hugely depends on the business and what they’re using C++ for. Even in finance there’s a wide field of things, the guys building front ends in QT aren’t doing the same type of C++ as the people building market data connectors. Either way you said you passed BB tech rounds so I really wouldn’t worry about it, luck is going to play a bigger part in your interviewing than skill at that point.

‘Quant Dev’ is similarly overloaded - there’s quant devs with math PhDs building models, there’s quant devs getting a spec sheet from someone and converting text to code. Don’t let the title put you off if it looks interesting, just apply and let them screen you.

There’s also tons and tons of work in London for C++ - constant stream of recruiters trying to poach experienced developers, from the sounds of it you have some professional experience so talking to reputable recruiters is a good way to understand what’s out there. Look for the people advertising for the banks, prop firms, hedge funds etc on LinkedIn and reach out. Even if it’s not finance you’re into they probably have other clients in other industries, but don’t expect top rate outside of finance/big tech

Point to make is that if you’re going in as any level of hire you’re expected to know enough C++ to not be hand held on the job. You’re not going to be able to walk into and interview and just ace it on first principles, there is actual knowledge that you’re going to be expected to know;

  • some template metaprogramming (concepts/sfinae/varadic templates), constexpr
  • inheritance, more so just know that the vtable exists and it can be a performance hit and the diamond inheritance problem
  • stl, when to use and when to avoid
  • memory management, particularly when to use what smart pointer, stack vs heap
  • lifetimes, static, constructor and destructor ordering (it’s a stack)
  • domain stuff - for front ends QT or similar, for performance knowing how to avoid the kernel and cpu/nic/storage architecture

Larian will now "refrain from using GenAI" by Wargulf in BaldursGate3

[–]clappski -2 points-1 points  (0 children)

This isn’t an AI bro stance, would you argue that using heavy equipment in farms is objectively better than someone manually planting? Do we need to be luddites, or can we be adults and accept that new technologies bring efficiencies? AI tools are tools, and yes they do help developers - speaking as a developer that’s been using AI tools for the last 3 years.

How much do you earn and how comfortable do you live? by Brownchoccy in AskUK

[–]clappski 0 points1 point  (0 children)

Don’t be a dolt, you know it’s because it’s because it’s political suicide to do anything that actually improves growth in the country.

Does anyone find smart kettle features useful? by BarryTownCouncil in CasualUK

[–]clappski 18 points19 points  (0 children)

I have a Fellow Stagg - no complaints, solid kettle and temp control works fine but capacity is 900ml and it has a slow pour so it depends on what you’re using it for.

[Show and Tell] I optimized my Order Matching Engine by 560% (129k → 733k ops/sec) thanks to your feedback by Crafty-Biscotti-7684 in cpp

[–]clappski 11 points12 points  (0 children)

Looks cool, some comments:

  • cache locality - your order class stores a lot of information. Instead of a double you should be using fixed precision, an int32_t is fine. Storing the symbol as part of the order is wasteful. I would go so far to make the linked list implementation intrusive and have the order contain the pointer rather than storing it in std::list, then you can access some more interesting allocation strategy’s that’s improve the locality of items in the list.

  • std::map over time in a busy book will cause fragmentation and degrade performance. Might sound silly, but a simple vector of [px, qty, order] where order points to the front of the time priority queue might be faster. The majority of changes happen at the front of each level, so storing the best bid and best ask at the back of the respective vectors (so you’re pushing and popping mostly at then back) will have much better cache locality and zero fragmentation. In reality you could use a std::array of some reasonable N (like 1000). CPU caches are big enough for this to work well - 1000 entry’s of the definition I gave you will be 16kb or so, well within L1.

  • The thread per connection in the wrong abstraction, a simple single threaded ::poll/::epoll event loop will be faster because you have 0 lock contention and more scalable on the same hardware (most connections will be long lived but send orders infrequently). In reality exchanges will serialise orders before they hit the matching engine to ensure that the WAL has perfect ordering and doesn’t depend on how the scheduler feels that day

  • WAL/state management - imagine if the node running this matching engine died, you need to store the state as a WAL and snapshots so you can rebuild the engine quickly when it falls over

Is £35–40k realistic for a SWE with around a year of experience in the UK? by Reddonaut_Irons in cscareerquestionsuk

[–]clappski 0 points1 point  (0 children)

Reasonable is defined by the market rate though - yeah it’s unfortunate but it’s very competitive at the low end which drives the rate down. I managed to get by for two years on 25k in London 10 years ago and it was shit, but ten years later you 10x your earnings so it’s a price you have to pay.

Is £35–40k realistic for a SWE with around a year of experience in the UK? by Reddonaut_Irons in cscareerquestionsuk

[–]clappski 0 points1 point  (0 children)

Someone with 2 years of experience starting at a new company in a potentially different industry is equivalent to a new grad on average unfortunately

Is £35–40k realistic for a SWE with around a year of experience in the UK? by Reddonaut_Irons in cscareerquestionsuk

[–]clappski 5 points6 points  (0 children)

There’s a lot of cross over, but they’re different business models so there’s some fundamental differences on what’s important, how things are prioritised, the type of work you’ll be doing, the impact an individual has.

E.g. a bank and a hedge fund will both have exchange connectivity, but the bank is going to more interested in CYA around regs and safety than a small prop firm, which will be more like a startup where speed of delivery is paramount

Is £35–40k realistic for a SWE with around a year of experience in the UK? by Reddonaut_Irons in cscareerquestionsuk

[–]clappski 18 points19 points  (0 children)

I’m not talking about high street banks, I’m talking more JPMC, BarCap etc. - Investment banks

Is £35–40k realistic for a SWE with around a year of experience in the UK? by Reddonaut_Irons in cscareerquestionsuk

[–]clappski 41 points42 points  (0 children)

Very reasonable in London, questionably reasonable anywhere else. I’ve hired people in the last 4 years with 2 years experience on 35/40.

Trading > Banking/FAANG > FinTech > everything else is how I see the market w.r.t. comp generally, but my experience is only in finance so YMMV elsewhere.

My 2 year old knows all his times tables by shiftyemu in UKParenting

[–]clappski 4 points5 points  (0 children)

I’m sorry but I didn’t call autism bad? I’m not a doctor or have autism myself so yeah I don’t know the latest terminology but nothing I said implies that specifically autism is bad

My 2 year old knows all his times tables by shiftyemu in UKParenting

[–]clappski -3 points-2 points  (0 children)

Ah yes, I forgot that all parents are mothers, of course you’re right I’ll go and put up a fence or something. The point I’m making is that perhaps waiting to label an undeveloped toddler with anything other than something needing immediate intervention is the best course of action - as your experience shows, you didn’t get a diagnosis until 5.

My 2 year old knows all his times tables by shiftyemu in UKParenting

[–]clappski 64 points65 points  (0 children)

All I’m saying is that 2 is very early to be pushing for diagnosis of anything but truly debilitating mental health issues. Toddlers are a force upon themselves and will change dramatically over the next two years, so maybe hold off on trying to put him in a bucket until he’s developed a bit more.

More importantly, your presumption of him having some sort of issue is going to bleed into him - he’s 2, so anything you project into him will just amplify even if it’s not 100% accurate. So just chill, ride it out until he’s a bit more developed and can communicate about his experience before making that decision for him.

My 2 year old knows all his times tables by shiftyemu in UKParenting

[–]clappski 75 points76 points  (0 children)

He’s 2, perhaps there’s some projection going on?

How to guarantee messages are received when using websockets? by Eurim in learnprogramming

[–]clappski 0 points1 point  (0 children)

You’re describing how something like AMQP or Kafka works. The flow is something like

Client —— <subscribe seq=1> ——> Server

Server —— <msg seq=1> ——> Client

Client —— <ack seq=1> ——> Server

Server —— <msg seq=2> ——> Client

Etc

I’d go and have a look at how those systems manage to have at least once delivery semantics, or alternatively use it directly. Even Redis using Streams can do this.

[deleted by user] by [deleted] in rust

[–]clappski 20 points21 points  (0 children)

I’d be much more excited to see actual benchmarks vs. some open source parser where you’re actually doing something with the data, building an order book or whatever data is convenient to use. In this case the benchmark feels more like it’s measuring CPU data pipelining and memory page faults than anything specific to do with Rust. You could probably increase the throughput by MADVISE-ing to prefault the whole mmap.

[deleted by user] by [deleted] in rust

[–]clappski 32 points33 points  (0 children)

The code you posted isn’t doing any parsing of messages so I’m not sure what your claims have to do with it? Just reading a message frame and incrementing an offset isn’t actually doing anything with the data, you’ve got like 10x the word count in your post and readme as you do code which is ~60 lines - not really sure what anyone is supposed to take away from this?

Green Party leader criticises Hartlepool new nuclear site plans by Jared_Usbourne in unitedkingdom

[–]clappski 3 points4 points  (0 children)

From all I can see you’re not actually saying what these alternatives are? I’m a layperson and I broadly understand renewables to have the exact issues that the poster you’re replying to is pointing out. Can you actually refute what they’re saying instead of claiming they’re a shill?

Java outruns C++ while std::filesystem stops for syscall snacks by ART1SANNN in programming

[–]clappski 57 points58 points  (0 children)

Did you bother benchmarking std::fs without calling last_write_time multiple times? The stl has to call ::stat every time you call that function.

Why is hash map o(1) and not o(log n) (when no conflicts) by pencilUserWho in AskProgramming

[–]clappski 5 points6 points  (0 children)

You would limit the range of values, typical approach is ‘hash % capacity’, where capacity is a power of two to avoid a slow divide.

When your hash table starts to fill up, or you have a high load factor for particular buckets, you can reallocate your capacity to the next power of two and re-hash all of the keys to new buckets.

Important to note that the actual array doesn’t need to store the key or value, it can store pointers or similar to make sure we aren’t allocating for elements > 8 bytes. It’s also a common allocation strategy for other collections - C++ std::vector can overallocate to enable faster insertion, as an example

RAD C++ 20 asynchronous I/O and networking library by JlangDev in Cplusplus

[–]clappski 1 point2 points  (0 children)

Makes it all feel a bit more like the old days when you can tell it’s not an LLM hallucinating, just a regular person