• 0 Posts
  • 22 Comments
Joined 4 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 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)
    
    







  • The frustrating thing working in a big company is wanting to pay for something that costs 0.0000001% of the company’s annual revenue, but not being able to because big companies are always divided up in hundreds of small teams with their own budgets, and your boss is already over-budget for the quarter because the team’s cloud bill was 20% higher than predicted.

    This is, of course, working exactly as designed.


  • skisnow@lemmy.catoProgrammer Humor@programming.devDream job!
    link
    fedilink
    English
    arrow-up
    6
    ·
    3 months ago

    It’s definitely a joke or some sort of weird art statement, the only thing that bothers me is that I once got my decade-old account banned from LinkedIn for posting a job that they decided was discriminatory because it had a language requirement, and yet somehow this has passed their filters?


  • If you think that replacing a person with an object cannot be an artistic choice

    Literally nobody is saying or thinking that. What we are saying is that there is absolutely no way that OP’s prompt contained “…and make the optimist BE the glass itself…”.

    The irony is that you’re giving OP way more benefit of the doubt in your reading of what they produced than you’ve given me, and instead argued against a complete strawman.