u/Choice_Bid1691

The doctor worship in society is insane. They don't save lives, the scientific and engineering infrastructure does. And the arrogance it creates is unbearable.

I know this will trigger people, but I need to say it.

Every time someone says "doctors save lives" I cringe. No, they don't. The medical field of science and engineering saves lives. A doctor applies tools they didn't create. Without the engineers who designed the MRI machines, the ventilators, the surgical robots, the software incorporated on all these medical devices, modern medicine would be a dude with clean hands guessing. But doctors are put on this bizarre social pedestal while the engineers who literally make 80% of medicine possible are invisible. Nobody claps for the biomedical engineer. Nobody lets them skip traffic tickets.
This percieved social status creates insufferable arrogance. My brother is a doctor. He's not even in a specialization program yet, but he's treated like a demigod. He once swerved across four lanes of traffic just to flex, got pulled over by a cop 20 meters away and was let go the moment he told them he was a doctor. That's the reward he gets for doing stupid shit. Zeroconsequences for being reckless because society has decided his profession makes him morally untouchable.
Meanwhile, I'm an engineer. When I visit family, I get sent to dig canals in the backyard because "if you didn't want to do manual labor, you should have gone to uni", as if my engineering job doesn't prove enough.
Heres what i believe to be to root of the issue. engineering has a "humbling wall". You learn your limits fast. You may create a very useful piece of software and think you're the best programmer that has ever lived. Then you try to read a piece of linux kernel code and you get humbled fast. In medicine, it looks to me like you only move up in the specialisation ladder. You don't look laterally at other fields while studying yours, so you just assumeyou know everything every field. So you get people who never hit the "humbling wall" who overestimate their competence in fields they never specialized in. Im could be completely wrong though.
I don't think engineers deserve a pedestal either btw. I'm not taking credit for the amazing people who build medical devices for example. I'm saying the whole concept of collectively praising a profession is broken. A lot of people enter medicine for the salary and status. That's okay, I entered engineering for the salary too. But I don't pretend I'm saving the world, and society doesn't treat me like I am. "Doctors deal with a lot of stress!" They say. I deal with crap from other people in my own field. I'm okay with it because i make good money for it. But then doctors get paid AND get praised? That is unfair and makes zero sense

reddit.com
u/Choice_Bid1691 — 5 days ago
▲ 4 r/LLVM+1 crossposts

I've been recently slowly building a static analysis tool that's supposed to check if two functions touch the same data. It's supposed to collect function definition cursors that match the names of the specified function(s), then it's supposed to visit that function definition and search for cursors of kind DeclRefExpr. The problem with this approach is that this DeclRefExpr's direct parent is not guaranteed to be of kind BinaryOpeator with some kind of assignment operation ('=', '+=', '-=' etc.). So i thought it would be a good idea to write a function that would find the DeclRefExpr cursor's closest ancestor that is a BinaryOperator with an assignment operation, and check if the DeclRefExpr cursor is in the lhs or rhs branch of this cursor. I've written a function for this but for some reason it always returns a null cursor. Can anyone help diagnose why this doesn't work, or maybe help write something that does work?

static CXCursor get_ancestor_of_kind(CXCursor cursor, enum CXCursorKind kind) 
{
  CXCursor super_parent = clang_getCursorSemanticParent(cursor);
  while (clang_getCursorKind(super_parent) != kind) {
    if (clang_Cursor_isNull(super_parent))
      return super_parent;
    super_parent = clang_getCursorSemanticParent(super_parent);
  }
  return super_parent;
}
reddit.com
u/Choice_Bid1691 — 8 days ago