• theneverfox
    link
    fedilink
    English
    arrow-up
    17
    ·
    7 months ago

    Semaphores. It was obviously C++ code with a bunch of threads, but as it was a standalone C++ program it wasn’t really clear why it was lol

    • jaybone@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      7 months ago

      By low level guys, you mean he knew about circuits and EE? But he got stuck teaching a C++ class but he couldn’t code?

      • theneverfox
        link
        fedilink
        English
        arrow-up
        11
        ·
        7 months ago

        By low level, I mean like kernel work. I’m told he worked on one of the 'nixes way back when.

        It was a data structures class, we did Java or Python in the into classes, php & js for Web + db basics and C++ for theory classes. Then you pick your path

        Anyways, the guy taught OS, language design, and data structures. He could code fine, he was just a terrible lecturer - extremely disorganized, no lesson plans. He only wasted the one full class forgetting why we were there, but reading his code (labeled by week) then scribbling on the whiteboard was his lecture

        I guess I ended up understanding data structures and I never fell asleep, so maybe he wasn’t a bad teacher. It was just mostly just assignments, he didn’t really do quizzes and the final wasn’t much of the grade

        • MystikIncarnate@lemmy.ca
          link
          fedilink
          English
          arrow-up
          1
          ·
          7 months ago

          I was thinking that you meant like, machine code, by “low level” and yeah. C wouldn’t make a lot of sense to someone who handles machine code.

          • theneverfox
            link
            fedilink
            English
            arrow-up
            2
            ·
            7 months ago

            I’d call that hardware - if you’re code enough to the metal to be writing machine code (or even assembly), the physical architecture of the hardware is part of your code

            Low level generally is one step up - manual access to memory, compiling to an architecture rather than a virtualization layer, etc

            Strangely, the guy that taught OO theory did our hardware class, we built bit shifters and wrote programs in risc assembly… And ONE program in machine code with the promise we’d never have to do it again

            I could understand someone who writes in assembly, but machine code is a nightmare…I think I got it without any mistakes, but my butthole was clenched for 4 hours, terrified I’d have to debug it

            • MystikIncarnate@lemmy.ca
              link
              fedilink
              English
              arrow-up
              2
              ·
              7 months ago

              Right. That’s my bad. I’m not a programmer or developer, so I conflate machine code and assembly far too frequently.

              • theneverfox
                link
                fedilink
                English
                arrow-up
                3
                ·
                7 months ago

                Nah, you’ve got the concepts down, I always try to drip feed this kind of information to people when it comes up.

                It’s a lot - it takes years to absorb all of it even with a degree in it, and new concepts are always spreading. Gently correcting and being corrected is the only way

                It’s part of the methodology my brother passed to me when I was learning - using the same terms as everyone else is critical, because if you can describe it correctly you can search it

                And if your understandings don’t line up, you have to iron out the differences or you’ll waste time talking past each other

                Knowing there is a difference between assembly and machine code isn’t something most people know, are you technical or interested in programming?

                • MystikIncarnate@lemmy.ca
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  7 months ago

                  I work in IT. I don’t have much use for knowing the difference, but as a point of principle for me, I want to be correct, so if I’m not correct, I’d rather be corrected.

                  So I appreciate it.

                  Also the fact that there’s a lot to know, phew, you said it brother (or sister? Idk, doesn’t matter). IT is a minefield of information on all kinds of things. I used to get overwhelmed by spec sheets, now I look at them and think “there isn’t enough information here”.

                  How the turn tables.

                  • theneverfox
                    link
                    fedilink
                    English
                    arrow-up
                    2
                    ·
                    7 months ago

                    as a point of principle for me, I want to be correct, so if I’m not correct, I’d rather be corrected.

                    Couldn’t have said it better myself. It stings at first to be wrong, but once you get used to it all that remains is the joy of learning something

                    It is pretty wild how quickly endless hieroglyphs turn into barely hints.

                    My sorta boss and I started building this accounting system for our customer a few months out. We knew nothing about accounting. What’s the difference between a sales receipt and an invoice or payment? What’s the difference between the identical objects, customers and vendors? Wtf is a class… It was just a flag you can put on things. What’s the difference between a chart of accounts, journal entry, and a ledger?

                    I still don’t half understand the why (half of these things are combined versions of other things), but 3 months in I suddenly understood what double entry accounting was, I had heard of it in an anime but had no idea how you would do it. 6 months in and we’re brainstorming if we want to drop journal entries and just do in chart of accounts

                    I have zero interest in accounting (it literally gave me headaches for the first few weeks), my dad likes doing that sort of thing. I found myself explaining accounting to him the other day

                    How the turn tables indeed… It just creeps up on you one day

        • uis@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          7 months ago

          Why data structures weren’t in C/C++? It would make sense to care about structures, cache locality, SoA/AoS, indirections and stuff in some language that compiles in native code.

          • theneverfox
            link
            fedilink
            English
            arrow-up
            3
            ·
            7 months ago

            Ah, I phrased that ambiguously - it was in C++, all of our computing theory type classes were.

            I just got distracted realizing I graduated proficient in 9 languages and reasonably comfortable in another 3. 2 were from internships, but the rest were all from coursework. The last couple years, I was juggling 2-4 at all times, plus the odd scripts

            I always thought I was really good at picking up and switching languages, but I just realized my program was designed that way.

            That feels like a lot, do other colleges do something similar?

            (I guess you could knock off 3 because we ended up switching every semester in software engineering because cross platform apps were pretty bad at the time)

            • jaybone@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              7 months ago

              Once you are in the industry long enough, you won’t even remember how many different languages you have worked with.

              A good education and experience should get you to the point where you are comfortable picking up and using any language, even if it is new to you.

            • marcos@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              7 months ago

              My undergrad officially required Pascal, C, C++, Java, PHP, Prolog, Lisp, x86 and MIPS assembly. You couldn’t work around those. There was also Tiger, VHDL, and Bash that were required, but you would probably not count as languages. (I’m certainly forgetting some stuff too.)

              There was a virtual certainty you’d need some more languages, but not everybody would need the same ones.

              • theneverfox
                link
                fedilink
                English
                arrow-up
                1
                ·
                7 months ago

                Damn… That list sounds terrifying. I’m working on a legacy code base in VB (although I finally have time to try out this c# converter to start the slow march out of depreciation), and 8 months later I still feel gross with VB. I’m pretty sure VB is uniquely horrible because of the inconsistency. .

                I’ve heard good things about pascal and lisp… But lisp syntax also makes me irrationally uncomfortable

                I did prolog as well in an elective, that was a weird and interesting language. It’s not very practical, but it was fun. Plus graph theory is one of the weird maths that pops up everywhere, maybe one day I’ll find an excuse to try to use it for something

                So it sounds like you had even more than me, I’m now wondering why even my relatively young co-workers all seemed to specialize so hard straight out of school

                What did you end up working in? Did you specialize, or keep up with the language juggling?

                • marcos@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  7 months ago

                  Picking up languages is quite easy, you just have to learn it. Turns out nowadays I mostly work with SQL (it’s on the required list too, I just forgot about it) and C#. Learning new paradigms is harder, but there aren’t that many of those.

                  I’m now wondering why even my relatively young co-workers all seemed to specialize so hard straight out of school

                  That’s imposed by the job market, not natural thing to exist. In fact, it’s very much unnatural.

                  • theneverfox
                    link
                    fedilink
                    English
                    arrow-up
                    1
                    ·
                    7 months ago

                    That’s imposed by the job market, not natural thing to exist. In fact, it’s very much unnatural.

                    I mean, maybe my first job was an outlier, but I literally mean chose to specialize. Out of the people who graduated within 5 years of me, two got into Python because of the project, and just stayed there like you said… One of them could only never have run his code before pushing commits, the other one was middle of the road.

                    Another went strict UI - he wasn’t unable to do other things, he got hired after a couple years and said this is what he wanted to do.

                    Two more started in Python, then decided they wanted to do exploit stuff, the guy ended up going back to programming after he was let go for non-work reasons, and I don’t know where he ended up… He worked for Amazon for a while.

                    I guess a good chunk did keep using what they’re using and happen to specialize like you say, but I saw a lot of people choose something intentionally, a few years after doing something different too. Most of the team looked for something using their existing languages or even stack when we all moved on, regardless if they picked it or fell into it

                    I don’t think it’s difficulty - like you say, if you’ve learned a couple high level languages, jumping to a new one is mostly syntax

                    Maybe it’s a comfort/effort thing? A lot of the people who chose to specialize left their work at work. Only one person I worked with was like me - several would adapt to whatever was practical without difficulty, but without a clear best opinion I always pick something new, because it makes things more fun… He was fun to work with, because the client loved him and he pitched the weirdest and most fun features

                    Maybe it’s just personality thing… I’m now convinced my school probably wasn’t an outlier though

    • uis@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      Oh no, synchronization primitives!

      Well, you can end up implementing synchronization primitive if you are writing game. Sometimes game engine is kernel in userspace.

      • theneverfox
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 months ago

        I’ve done it in a Python system at work before. We used a mutex?(The int, not the lockout) to track worker threads

        It’s a hell of a lot easier these days… It’s amazing how quickly programming advances when you look back

        I’m interested in how this came up in a game engine though, and how recent it was