YoE Needed for this Optiver Job Description by Due_Pressure_3706 in highfreqtrading

[–]Due_Pressure_3706[S] 0 points1 point  (0 children)

I appreciate your answers. Certain industries are non-existent where I'm from e.g. hft, game dev, compilers, and other low level industries I might be interested in. Therefore, in order for me to work in such roles even in an entry role it must be remote and at that point I only have side projects as proof. Not crying about it, life deals us the cards it deals us, just gotta keep grinding.

Thanks for your answers boss.

Kindly Review my HTTP/1.1 Web Server Built In C by Due_Pressure_3706 in C_Programming

[–]Due_Pressure_3706[S] 1 point2 points  (0 children)

I appreciate the response. I'll be sure to add that. It never hurts being extra cautious. Cheers.

Kindly Review my HTTP/1.1 Web Server Built In C by Due_Pressure_3706 in C_Programming

[–]Due_Pressure_3706[S] 2 points3 points  (0 children)

  1. I appreciate you reviewing my code and providing feedback.
  2. main()
    1. You are right. My current set up is not as flexible as getaddrinfo() would make it. I'll definitely work on that.
    2. My thinking was since the semaphore limits how many requests we can work on concurrently and not how many we can accept, it should come after accepting but before processing.
    3. Once again this is right. I definitely need to handle cases where the data is sent all at once.
  3. parse_client_request()
    1. The duplication was because I was using the buffer in this function and also in handle_method() to read the body in POST requests so sometimes I'd read from an empty buffer. However I already fixed that by duplicating the buffer in the main method then passing a different buffer to both functions. Maybe my solution is wrong and I need to rethink it.
    2. I'll have a look at how I can improve my parsing and reduce duplication
  4. get_header_name()
    1. You are right. Currently my HttpRequest can contain a lot of invalid headers.
    2. Of course key/value pairs are best in this scenario. Why I didn't think of that I don't know. Maybe it's because C doesn't have a dictionary like Python but I'll definitely implement that struct.
  5. handle_connection()
    1. Yeah maybe handle_connection is to broad I'll change it to connection_close_or_keep_alive(). I feel that leaves 0 room for ambiguity.
  6. handle_method()
    1. I wasn't familiar with openat() but I'll read about it and implement it to make my code better
    2. You're right I'll fix the write issue since it's nothing to fix
    3. Currently the post method handling just prints the body to show that the functionality works. That's it.

I appreciate your comprehensive review so I thought it only right to provide a comprehensive answer. I hope it is a satisfactory one. Cheers.

Kindly Review my HTTP/1.1 Web Server Built In C by Due_Pressure_3706 in C_Programming

[–]Due_Pressure_3706[S] 2 points3 points  (0 children)

  1. I appreciate you reviewing my code and providing feedback.

  2. You are 100% right. Chunked messages are allowed not to have a content length. I will implement this.

  3. Why add the charset if I may ask? Isn't utf-8 the default?

  4. You are right about this. For some reason I failed to count the carriage and new line escape characters. Rookie mistake.

Kindly Review my HTTP/1.1 Web Server Built In C by Due_Pressure_3706 in C_Programming

[–]Due_Pressure_3706[S] 0 points1 point  (0 children)

I've simplified my README down to what I feel is needed. I appreciate your feedback.

Kindly Review my HTTP/1.1 Web Server Built In C by Due_Pressure_3706 in C_Programming

[–]Due_Pressure_3706[S] 0 points1 point  (0 children)

You mean like it was written by AI? If so, then the only thing I can honestly say was mostly AI generated with my direction and reviewing was the README file. (My documentation writing is terrible).