• 0 Posts
  • 60 Comments
Joined 3 months ago
cake
Cake day: March 22nd, 2025

help-circle
  • Yeah, some of the bandwagonny replies I’m seeing in this thread do not make their posters sound like someone you’d want to spend your working life sat next to.

    You don’t have to show interest in the company to help the CEO get richer, but you should probably show an interest in the company because it’s where you’re going to be spending 1/3rd of your entire waking hours from now on, and you’re going to have a fucking miserable time of it if you’ve already decided to mentally check out before you’ve even got to the interview. Have some self-respect.






  • The image of China as an uncreative, uneducated backwards nation of drones good only for assembling phones, hasn’t been the reality for at least a decade.

    A lot of people in the West don’t realize this because to this day there’s a vicious cycle of people only import cheap Chinese crap because China has a reputation for only making cheap crap because people only import the cheap crap. They don’t realize that China is also making top tier products, because nobody’s trying to import top tier Chinese products.












  • The code is a set of preprocessor macros to stuff loads of booleans into one int (or similar), in this case named ‘myFlags’. The preprocessor is a simple (some argue too simple) step at the start of compilation that modifies the source code on its way to the real compiler by substituting #defines, prepending #include’d files, etc.

    If myFlags is equal to, e.g. 67, that’s 01000011, meaning that BV00, BV01, and BV07 are all TRUE and the others are FALSE.

    The first part is just for convenience and readability. BV00 represents the 0th bit, BV01 is the first etc. (1 << 3) means 00000001, bit shifted left three times so it becomes 00001000 (aka 8).

    The middle chunk defines macros to make bit operations more human-readable.

    SET_BIT(myFlags, MY_FIRST_BOOLEAN) gets turned into ((myFlags) |= ((1 << 0))) , which could be simplified as myFlags = myFlags | 00000001 . (Ignore the flood of parentheses, they’re there for safety due to the loaded shotgun nature of the preprocessor.)


  • Back in the day when it mattered, we did it like

    #define BV00		(1 <<  0)
    #define BV01		(1 <<  1)
    #define BV02		(1 <<  2)
    #define BV03		(1 <<  3)
    ...etc
    
    #define IS_SET(flag, bit)	((flag) & (bit))
    #define SET_BIT(var, bit)	((var) |= (bit))
    #define REMOVE_BIT(var, bit)	((var) &= ~(bit))
    #define TOGGLE_BIT(var, bit)	((var) ^= (bit))
    
    ....then...
    #define MY_FIRST_BOOLEAN BV00
    SET_BIT(myFlags, MY_FIRST_BOOLEAN)
    
    

  • Yes. This is basically the core of why capitalism eats itself.

    You don’t have to be evil or short-sighted to be a CEO, but if you don’t do evil and short-sighted shit to pump the share price there’s a high probability the board will replace you with someone who will.

    This is why I believe the government should hold stock and sit on the boards of any company that gets publicly listed. Much easier than tying yourself in knots with an adversarial system of complex regulations.