(Topic ID: 330971)

So you want to program pinball machines

By pinball_keefer

7 months ago


Topic Heartbeat

Topic Stats

You

Linked Games

No games have been linked to this topic.

    Topic Gallery

    View topic image gallery

    Performance (resized).png
    pasted_image (resized).png
    post (resized).png
    f558a5e7-e433-4618-9cae-b89fd70bdc57_text.gif
    EE352583-1300-491A-BE0C-454F9A4690E4.gif
    image (resized).jpg
    MV5BMTIxMTg4OTU0OF5BMl5BanBnXkFtZTYwMjUyMDE0._V1_ (resized).jpg
    pasted_image (resized).png
    DAE077A8-9B18-4E30-8051-6C2178BAC626 (resized).png
    what-year-is-it-robin-williams.gif
    Screenshot_20230211_203812_Reddit (resized).jpg
    04B6B8A8-DA01-4D90-A64D-F9DF14D00A7C (resized).jpeg

    There are 210 posts in this topic. You are on page 4 of 5.
    #151 7 months ago
    Quoted from DumbAss:

    So ... what's a DAG? More importantly, who cares?

    EE352583-1300-491A-BE0C-454F9A4690E4.gifEE352583-1300-491A-BE0C-454F9A4690E4.gif
    #152 7 months ago
    Quoted from dpadam450:

    Right but a raw linked list takes about 5 minutes to write. If you want to give an hour long timed programming test, I don't know what else you put on that test? Or just give no test? I'm still going to ask you what the difference between a linked list and vector is and the difference between them in person.

    And I would google it on my phone and answer:

    https://stackoverflow.com/questions/2209224/vector-vs-list-in-stl

    Do I get the job?

    Is knowing the difference important when you are looking at what data structure to use for what problem? Yes. Is it important that someone should be able to rattle off all the differences off the top of their head in an interview? Not really, at least not in my opinion.

    #153 7 months ago

    paul_8788

    No, because if you have to google the basics I can't expect you to program something as advanced as my minecraft example. People that work at SpaceX or Tesla designing autonomous vehicles and rockets that land vertical don't get to just google answers. They make the answers.

    All I can say is something like this: You have 93 engineering positions open. Do you want to interview 4,000 candidates or a simple way to vet if they could be hired to solve my minecraft example when hired? If you don't understand a linked-list and can't recreate it, it's a pretty simple way for this industry to vet people. For your own sake, I'd apply with your real resume or fake one and see what test you get back on any of those 93 software C++ jobs. Mind you everything I"m saying is strictly about real-time high performance C++.
    https://careers.blizzard.com/global/en/search-results?rk=l-engineering-technology&sortBy=Most%20relevant

    #154 7 months ago
    Quoted from dpadam450:

    I'm still going to ask you what the difference between a linked list and vector is and the difference between them in person.

    Overhead. Literally and technically the answer.

    #155 7 months ago
    Quoted from DumbAss:

    if (condition)
    {
    }

    It's this one. That's the answer.
    I could sooner forgive open-brace-on-same-line than no brace at all, though. I don't tolerate that.

    #156 7 months ago

    First off, it’s spaces

    In a previous life I used a brief ”questionnaire” when interviewing developers. they are told it has stuff we don’t expect them to know for the job, so don’t worry if you can’t answer some questions. It was then used to guide the conversation. I learned a lot about candidates and how they think as talking through their answers. I also learned some new ways of doing things. Some of our tech was not very common so it was about identifying candidates we felt would be able to pick it up quickly. Only once did I have someone start filling it out and then leave.

    #157 7 months ago
    Quoted from NightTrain:

    The job ad should say, “Must be able to start projects, but never complete them”.

    Hahahahahaha

    #158 7 months ago
    Quoted from TreyBo69:

    This thread inspired me to try this out
    [quoted image]

    The colors always look weird to me, as it was designed for the "green-scale" 4 color display of the original GameBoy. When it's put onto a GameBoyColor or something it ends up all purple and blue.

    The GameGear version (wiith a real color display) looked much better but actually played worse, because it had one less button, making the controls much more awkward.

    But thanks for trying it out, hope you had some fun with it...

    #159 7 months ago
    Quoted from dpadam450:

    For your own sake, I'd apply with your real resume or fake one and see what test you get back on any of those 93 software C++ jobs. Mind you everything I"m saying is strictly about real-time high performance C++.

    lol, thanks, but I don't need any help. (PS-> Saying things like "for your own sake" are what come off as condescending). Generous of you to think of me though.

    For me, when hiring, we would just send them a test, (think your Minecraft example), ask them to produce some reasonable code that solves the problem, with some parameters (could say don't use stl for example if that is your particular kink) and give them a couple of days. Didn't care if they had something memorized, the real question we wanted to answer is can they think through and solve a problem and write reasonable code?

    If the code looks reasonable, then interview them based on the code as to why they chose the things they did to understand and explain their choices and didn't just copy/paste something from somewhere. Also gives you a chance to verify if their brackets are same line, and that the use spaces instead of tabs, and that their code is not an unreadable mess.

    I will admit though, I never hired people for SpaceX or Tesla, nor have I had to send a person to the moon, so maybe my opinion is irrelevant. Wouldn't be the first time.

    #160 7 months ago

    paul_8788

    Well for the sake of letting this discussion go because I don't think it is progressing. One last attempt: You said my test about linking city data from some data file and finding the path was "weird and proves nothing". 10 some years ago a team was built to maintain google maps which includes topographic and street level views. This data is massive amounts of GB of data, reviews, personal pictures as well as the street data every 10 ft captured by vehicles. It needs to compute fastest paths between two cities, that path could be from Seattle to Orlando, has to send optimized data down to a user of graphical information as optimized as possible, who can zoom in and further request higher resolution data of any area on their path etc. Do you see how the test I posted might apply to hiring an engineer that has to build out a system since that is their job the day they walk in office next week? That maintains something as big and real-time used by the entire world every second of the day? If you have to google linked list vs vector then what are you going to do when day one your task is to build google maps from 0 lines of code to what it is today. Google the answer?

    #161 7 months ago
    Quoted from dpadam450:

    One last attempt: You said my test about linking city data from some data file and finding the path was "weird and proves nothing"

    That's not what I meant, sorry. To be clear, the "weird and proves nothing" part was referring to having to create a linked list implementation in a 2 hour time limit (when there are many implementations out there):

    Quoted from dpadam450:

    so important you get only 2 hours to write a linkedlist from scratch and solve the algorithm.

    As for this:

    Quoted from dpadam450:

    If you have to google linked list vs vector then what are you going to do when day one your task is to build google maps from 0 lines of code to what it is today. Google the answer?

    Heck yeah I would! There could already be a third party software package out there I can license that does 90% of the work. Or maybe do some research to determine what data structure would be best suited for the information, start with a great well supported open source implementation and take it from there.

    If I had a developer on my team who didn't take the basic first step of Googling to see if the problem had already been fully or partially solved and potentially save us time and money, and instead started re-creating the wheel, I would be questioning their sanity.

    You get information from everywhere. Peers, education, books, PHD papers, and yes, Google. Having something memorized to spew out in an interview is not a sign that a person is better suited for a job than any other factor.

    It is okay to agree to disagree on this. I am not asking you to find me a job, or help me land a C++ game programming career at your company, so you don't need to feel responsible to correct my wrongheaded opinions.

    #162 7 months ago

    After being actively involved in hiring since 2008, having done hundreds of interviews for engineering and management positions on the hiring side, I learned that it’s much better trying to get an idea about how a candidate thinks about a solution than test minute details (worse: under time pressure), especially if the technical field is vast. And what the candidate wants from the job. Motivation.

    What is considered technologically basic to you may be irrelevant to someone else. The field is simply too vast and I found it’s a waste to test for basics.

    My own SW background is from way back in the 1980s, started as a hobby spending countless hours writing assembly for 6502 and 68000, followed by a formal education (equivalent to a master, at an engineering university in Austria). I’m pretty sure I can trip up any applicant especially millennials and younger in an interview for a SW position, if I wanted to but what’s the point? Likewise I’d bomb some new modern SW engineering concept. Last time I gave in to that idea of interviewing was for a SW job for Symbian, which had really odd resource optimized driver concepts and it “weeded out” like 90% of applicants. It was pointless.

    I found it best to just head to the cafe with the applicant, chat about what’s going on around town to break the ice and then listen to what they worked on and how they solved problems. Then I explain a typical engineering problem at our company and ask what their approach for a solution would look like.

    #163 7 months ago
    Quoted from paul_8788:

    There could already be a third party software package out there I can license that does 90% of the work.

    You are the first person to build this tech whether you are google or the guy who worked at the company that did 90% of the work. You can't kick the can down the road that the problem is solved. People solve new problems all the time for things that don't already have a download button.

    #164 7 months ago
    Quoted from dpadam450:

    You are the first person to build this tech whether you are google or the guy who worked at the company that did 90% of the work. You can't kick the can down the road that the problem is solved. People solve new problems all the time for things that don't already have a download button.

    You are conflating two unrelated things:

    1) Having information memorized to regurgitate on command (build me a linked list! Now!).
    2) Problem solving (We have to build a system that hasn't been done before).

    I am saying they are two different things, your opinion seems to be both are required to be a good software dev. I disagree.

    If you want to continue, you can PM me. I am not going to respond, but if it makes you feel better, go for it.

    #165 7 months ago

    I keep coming back to this thread because I want to see what you guys are going to write next about linked lists.

    I'm waiting for you to start arguing about how to write a memcmp() function that is hardware attack resistant.

    Quoted from paul_8788:

    I never hired people for SpaceX or Tesla

    That is what I got asked when I went to interview at SpaceX years ago. Needless to say, I wasn't enough of a "rock star" to pass. I gave them an answer that worked but it wasn't the answer they were (specifically) looking for in the interview.

    #166 7 months ago
    Quoted from paul_8788:

    If you want to continue, you can PM me. I am not going to respond, but if it makes you feel better, go for it.

    f558a5e7-e433-4618-9cae-b89fd70bdc57_text.giff558a5e7-e433-4618-9cae-b89fd70bdc57_text.gif

    #167 7 months ago

    Is there anything more annoying than arguing engineers

    #168 7 months ago
    Quoted from galore2112:

    I found it best to just head to the cafe with the applicant, chat about what’s going on around town to break the ice and then listen to what they worked on and how they solved problems. Then I explain a typical engineering problem at our company and ask what their approach for a solution would look like.

    Finally. A proper interview style with no dick measuring. I've always found that problem solving skill and personality go much further in the workplace than having someone that can implement a memorized version of Dijkstra's algorithm.

    #169 7 months ago

    When I was hiring, I looked for:

    can I work with this person
    work ethic
    did they work on outside projects related to the field
    etc.

    I honestly didn't really care that much about the coding test or whatever other than just feeling them out for just basic understanding (which is usually easy to determine). You know why? Because you can have the smart programmer ever who can ace these quizzes, but then is a jerk to everyone he works with, and writes horrible unmaintainable code that works but is unreadable, and then causes problems in every meeting as only his solution can be the correct one.

    I was looking for the guy who did programming projects in his spare time, was working a job while going through college, and is humble and likeable. Because how can you be that bad of a programmer if you're able to do projects on your own outside of class/work? I'm sure it happens but I haven't ran across anyone who did that stuff who wasn't pretty competent.

    #170 7 months ago
    Quoted from taylor34:

    you can have the smart programmer ever who can ace these quizzes, but then is a jerk to everyone he works with, and writes horrible unmaintainable code that works but is unreadable, and then causes problems in every meeting as only his solution can be the correct one.

    I refer to them as black box programmers. No one wants to deal with them. You don't want them to talk to anyone since their interpersonal skills are garbage. Give them a task and they do it but bring them into a meeting and they'll start spouting off about linked lists, no matter how irrelevant it is. They also try to show off if included in a panel interview with their superiors.

    #171 7 months ago
    Quoted from taylor34:

    I was looking for the guy who did programming projects in his spare time.

    I have always answered a question asked of me on that subject with a "not very often" and lost out on jobs as a result and had no problems with that. Homeownership and growing, active, kids, aging parents that need support etc. takes the place of most of that outside time. I have more in common with those kinds of co-workers. Knowing how to compartmentalize and multi-task and still complete assignments in a timely manner are more important traits to me to find when I am interviewing someone, if that's even possible in a half hour interview. Someone who picks up new things quickly too. Also, as a job candidate I was making judgments about the interviewer as well and how well rounded they were and whether I could work with them. I have not had an interview in 15 years, but have interviewed all of the new people in our group when they applied over that time period. We have anniversaries of 15 years (me), 15 years (my boss), another 15 years, two 10s and 5 years for co-workers and our director is at 25 years next year. That's says a lot about who we are. 15 years ago I was a single guy, an apartment dweller.

    12
    #172 7 months ago
    Quoted from pinball_keefer:

    These chances don't come along very often, so take advantage of the opportunity and give it a shot!

    For all of the linked list talk, I don't think people are truly appreciating what an understatement this is. A lot of people talk about what THEY would do if THEY were making pinball machines, but then the jobs always get filled by people already or formerly in the industry so they never get a chance. Here's your chance.

    When some yahoo named Ted Estes emailed me a reply to an rgp post a million years ago and said I should interview at Williams/Bally I didn't hesitate. Well, I did hesitate, because I lived in rural Virginia and had no desire to double my cost of living by moving to the Chicago area. But then I realized I'd regret it if I didn't at least go investigate. The rest is history. (I came to Williams and then pinball shut down, so you can blame me for that bit of history!) But still, it's been quite the wild ride, and still going.

    #173 7 months ago
    Quoted from KozMckPinball:

    I have always answered a question asked of me on that subject with a "not very often" and lost out on jobs as a result and had no problems with that. Homeownership and growing, active, kids, aging parents that need support etc. takes the place of most of that outside time. I have more in common with those kinds of co-workers. Knowing how to compartmentalize and multi-task and still complete assignments in a timely manner are more important traits to me to find when I am interviewing someone, if that's even possible in a half hour interview. Someone who picks up new things quickly too. Also, as a job candidate I was making judgments about the interviewer as well and how well rounded they were and whether I could work with them. I have not had an interview in 15 years, but have interviewed all of the new people in our group when they applied over that time period. We have anniversaries of 15 years (me), 15 years (my boss), 10 and 5 years for co-workers and our director is at 25 years next year. That's says a lot about who we are. 15 years ago I was a single guy, an apartment dweller.

    Agreed. I pour all my efforts and creativity into my job. Last thing I want to do is side projects relating to the same kind of work. That’s what pinball is for!

    #174 7 months ago
    Quoted from jackd104:

    Agreed. I pour all my efforts and creativity into my job. Last thing I want to do is side projects relating to the same kind of work. That’s what pinball is for!

    Totally agree. That work/life balance is critical for long haul for me. I love software dev as a job, but when I go ‘home’ there is zero development going on. Everyone is totally different regarding that… but I would never gauge someone’s commitment based on how they spend off hours. That seems pretty crappy to me.

    #175 7 months ago
    Quoted from jackd104:

    Agreed. I pour all my efforts and creativity into my job. Last thing I want to do is side projects relating to the same kind of work. That’s what pinball is for!

    I grew up in the Springfield area, maybe it's geographical.

    #176 7 months ago

    "Is there anything more annoying than arguing engineers"

    Whose arguing? I enjoy talking about engineering which is why again I spent 15 years on gamedev.net talking about linked-lists and sharing that knowledge. I just don't even understand the core of the concept here. You went to college to learn something. To listen not speak. And we are testing what you know. I can't imagine asking an accountant applicant how to depreciate a small business vehicle for tax purposes and their answer is: "Well I can always google it." You can google and learn later? Why didn't you learn before? Everything is applicable, below the topic of data structures you are talking like what: making a bool/int variable and adding and subtracting them?

    #177 7 months ago
    Quoted from dpadam450:

    I can't imagine asking an accountant applicant how to depreciate a small business vehicle for tax purposes and their answer is:

    Is vehicle depreciation even a thing anymore? We bought a 2019 Honda Pilot NIB and we bought a used 2019 Honda Pilot, an identical car in all aspects, for the same price in 2021. That was a wake up message to me at the time. Never saw that before COVID/supply chain theories.

    #178 7 months ago

    "Is vehicle depreciation even a thing anymore?" You are talking about economics. I'm talking about accounting and reduces taxes paid to the government.

    #179 7 months ago

    I need to start limiting my work day posts to this thread, it might look like to Keith/JJP that I lack the proper work ethic.

    #180 7 months ago
    Quoted from skink91:

    Totally agree. That work/life balance is critical for long haul for me. I love software dev as a job, but when I go ‘home’ there is zero development going on. Everyone is totally different regarding that… but I would never gauge someone’s commitment based on how they spend off hours. That seems pretty crappy to me.

    A large portion of people here believe that pinball coders - who have the most awesome job ever - should be "banging out a couple mini wizard modes" on their free time. Ya know, cause it's pinball and pinball is fun and people should work for free cause it's pinball.

    Just check out the BKSOR owners thread if you want to see some of this lunacy.

    #181 7 months ago
    Quoted from CrazyLevi:

    A large portion of people here believe that pinball coders - who have the most awesome job ever - should be "banging out a couple mini wizard modes" on their free time. Ya know, cause it's pinball and pinball is fun and people should work for free cause it's pinball.
    Just check out the BKSOR owners thread if you want to see some of this lunacy.

    I suspect I may be very well suited for a job like this as well… though not from my own perspective. There’s no way I would personally want to turn this hobby into work, as it would ruin it for me.

    I would hope no other software people don’t understand this, at least none that haven’t already been doing this for decades.

    #182 7 months ago
    Quoted from KozMckPinball:

    I need to start limiting my work day posts to this thread, it might look like to Keith/JJP that I lack the proper work ethic.

    Why?
    Are you applying for the job?

    #183 7 months ago

    I keep wondering if this is one of those "hidden interviews" like what the halcyon days of Silicon Valley were known for: See a billboard with some weird gibberish.... Oh, you decoded it?! You're hired!

    Argue about linked lists all day long... good... good... oh, you won?! You're hired!

    #184 7 months ago
    Quoted from dpadam450:

    There is only one way to implement a linked-list anyway. Unless you are talking about managing the nodes via another memory management system without new/delete. I don't recall off the top of my head what STL does that is so much slower, but likely validating memory and by default uses new/delete. Not sure you can use placement new on the nodes or not.

    Only one way? What about the design choice of the sentinel value being nullptr or a dedicated end() node. A dedicated end() node require a little more overhead but allows for iterator and standard algorithm support. STL containers use std::allocator for memory by default, however you can provide your own allocator if needed including (gasp) a memory pool strategy. If you feel the need for placement new, look into emplace() methods. c++ has evolved quite a bit since the 89 standard...

    #185 7 months ago
    Quoted from DumbAss:

    I wouldn't ordinarily "jump in" (Xbox 360 reference) but lurking (reading) reminds me of the time honored C/C++ argument.
    Is it:
    if (condition) {
    }
    Or:
    if (condition)
    {
    }

    The correct answer is "Whatever is dictated by your organization's coding conventions." Bonus points if said conventions are enforced by automated tooling.

    #186 7 months ago

    Its a pinball community. I was intrigued to talk c++. My first comment was a simple comment to Vitty that said he has a hard time finding c++ people (which is 100% true right now). I told him to hit up the school I went to as they only teach c++ for 4 years. Someone actually disliked that. Before all this deeper talk. before I mentioned jobs or credentials. Literally told the dude "hey look here for recruiting c++ dudes" and someone found that needed a thumbs down .

    "Only one way?" In terms of the core algorithm, you swap a couple pointers. Still at the end of the day with 2 hours and googling, people do not pass a simple linked list test. I see applicants that have tests which they can even google or do whatever they want at home, and still cannot in person or in a test, explain to me a CS 101 concept (linked-lists). That's hard to really move forward if we have no common ground to talk about. Tough to assume you can come on board to manage a city that has 20,000 AI people walking around that you can slam into, shoot, run over etc (Grand theft auto).

    "including (gasp) a memory pool strategy." Every job I work at and will work at, calls new one time and allocates all 4 to 8GB of memory upfront. I don't understand the gasp. This isn't a concept from 1980. I'm only 36 and was trained in 2009 by the guys at Nintendo. It's 100% relevant. It's still taught today. DigiPen, MIT. Why would they teach those things if it's not relevant? Why are the top schools wasting time teaching memory allocators? Why are you throwing away such ideas? I'm baffled.

    "If you feel the need for placement new" Again see prior comment. You cannot ship a single xbox game since 2005 without managing your own memory. Nobody is calling new/delete/relying on stl. It's not an opinion or a position of ego. I'm merely telling you factual information. I honestly do not understand the positioning here. I get this may be becoming a lost cause, but man......I've worked in c++ since I was 16. Saying these things don't matter or don't happen when they happen every single job and I worry every day, every line of code I wrote for the fastest code, utilizing SIMD instructions when I can, it's like really hard to read the opinions here. If you got a single function that is called on 20,000 AI agents, 60 frames per second, this stuff matters deeply.

    For a single job at Amazon, they get up to 1,000 applicants. You can't take the first applicant nor all of them out to lunch. A simple test to prove you know law, computer science, nursing, medical, is to take a simple test. How do you guys vet 1,000 applicants? I really am baffled. I have 72 applicants from LinkedIn (100 total) for 1 single role out of a handful of others, and tons across the whole company. A test seems to be the simplest way to vet people to see if they understand memory allocators and real-time physics systems so that we at least share some common lingo and understanding.

    https://www.gdcvault.com/play/1022640/Custom-STL-Memory 2003 GDC talk, from Microsoft, a well-known company. This was just the first google on GDC talks about memory. 2003 isn't too long ago and is not the last time anyone ever brought up memory at GDC, Microsoft, Sony, Nintendo who all to this day have embedded C++ systems that run thousands of C++ games. At my job we still talk and look at disassembly every week.

    I posted references of factual information from sources. It's my opinion and the only logic way in my opinion to vet 100-1000 applicants is at least a simple test. Memory allocators are still used (take Microsoft's word on it if you don't take mine). Linked lists are in the wild as JJP guy said he uses them all the time. He also aligned with what I said, don't use STL.

    It was exhausting to continue this on but I typed this out of trying to spread factual knowledge for something I love doing since I was 16, which is C++. Maybe it will help someone. I can't continue saying memory allocators are useful and knowing deeply how data structures work, so much that you can create your own very complex ones, to hear back: "gasp, no, weird, doesnt happen, this isnt' 1980's".
    post (resized).pngpost (resized).png

    #187 7 months ago

    My alma mater just posted some stats from the CS class profile of 2022 (University of Waterloo). Here is the total compensation (TC) of new grads in $CDN so do 0.80x for USD. Most of these kids will be working in the US (brain drain -- but honestly the $$$ tells the story)

    pasted_image (resized).pngpasted_image (resized).png

    #188 7 months ago
    Quoted from dpadam450:

    I was intrigued to talk c++. My first comment was a simple comment

    I think the part that escapes you is the vast majority of people reading this thread stopped caring about you, your credentials, how other companies handle anything, or why you think that's important after the first paragraph or so.

    Your opinion is noted. Good day <your preferred pronoun>

    #189 7 months ago
    Quoted from YeOldPinPlayer:

    I think the part that escapes

    Maybe. But I don't think it's an ego, or a***** thing to spread life experiences or knowledge to other people.

    #190 7 months ago
    Quoted from dpadam450:

    How do you guys vet 1,000 applicants?

    Lol, that was never an issue, my old company paid so poorly that I was only hiring new college students 90% of the time. Even Amazon though must have been hard up because they were constantly pinging me the past couple years along with Facebook.

    #191 7 months ago
    Quoted from dpadam450:

    Maybe. But I don't think it's an ego, or a***** thing to spread life experiences or knowledge to other people.

    Quoted from dpadam450:

    Its a pinball community. I was intrigued to talk c++.

    I think that's the problem. Sometimes, it is important to know who your audience is. Pinball people are probably more interested in pinball than C/C++. Personally, I'm more interested in the code of the 6800 processors that Bally and Williams used in the 80s and 90s. I have seen and done enough C/C++ for a lifetime.

    Quoted from dpadam450:

    You cannot ship a single xbox game since 2005 without managing your own memory.

    Actually, it's even more complicated than that. You're referring to managing memory in a virtual address space. In these embedded systems, you sometimes have to manage physical memory when dealing with the GPU. You're looking at tiling if you live at this level in the programming stack.

    Quoted from dpadam450:

    utilizing SIMD instructions when I can

    Now there's something I haven't heard of in a long time. I think most regular software engineers have no clue what SIMD is. It doesn't matter to them.

    Quoted from dpadam450:

    If you got a single function that is called on 20,000 AI agents, 60 frames per second, this stuff matters deeply.

    This is performance and scaling. It's not something most people think about. I have a process in a system that utilizes 1% of the total available CPU. 1% is nothing. The CPU is idle 99% of the time. Now I want to scale the usage. I have 100 of the same process executing concurrently. Now all the available CPU is consumed.

    The most important thing I learned was that you need to measure to make appropriate decisions about performance. If you don't measure you don't know where the problem is and if you make a change, how the change affects the performance. I have some really good stories about measuring and how it helped determine where problems were and how it was used to solve them. Interviews I had in the past never touched on any of these topics. As I have previously posted, the interview screener wanted to know if I knew what a DAG is. The only experience I had with that word was https://en.wikipedia.org/wiki/Dag_(slang)

    Having spent some time in gaming systems, I can tell you obviously understand game software mentality and methodology. As I mentioned, it's mostly irrelevant to general purpose software engineers who don't care about those things. They only care about features and functionality. Rarely do they care about performance.

    #192 7 months ago

    One of the problems I have in interviews is that I'm just flat out terrible with vocab/tech talk. People would ask me about things I hadn't used in 20 years in interviews and I'd like freeze up like a deer in headlights, lol. It's not my strong point at all, and I'm sure I would fail most of your interviews because of it.

    But what I am good at is solving problems and I have a good work ethic. Doesn't matter if it's programming, financial, construction, coaching sports teams, etc. I believe I was in the top 10 of code produced out of 500+ programmers and 2nd in code reviews at my old company, but if I had been interviewed under their later process I probably would have never been hired, lol. The funny thing is, nobody at the company even knew those metrics except me as I'd worked with a couple people to get that information compiled. It amazes me to this day that I was the only one who cared at the company.

    Basically what I'm saying is, the interview process is a crapshoot and you never know exactly what you're getting until they've worked there for a couple years, no matter how rigid your process is. Cream of the crop people tend to leave faster if they're not tied down to an area or have other options, so even if you hire the best of the best, you might be rewarded with high turnover. Some of the brightest guys can also be extremely detailed oriented, so while what they produce is excellent, they may also be really slow.

    You were mentioning performance above, one of the embedded units I worked on was extremely cpu limited and had all of these tasks that were constantly being starved due to lower priority. I spent a lot of time eeking out performance improvements and profiling due to tasks getting starved and others overrunning. I'd fix it and then some other team would check in a change the next week and use up what I just saved.

    -1
    #193 7 months ago

    Appreciate the response DumbAss you are 100% dead on. There were absolute statements made like "never in the wild" "proves nothing" and so on. That's an extreme wall to put up and hard break down without at least stating who I was trained by and where I have worked. My professors who worked at Microsoft said the STL is no good. While the STL IS in fact useful to get something up and running fast for tons of applications, it's not widely used by tons of real-time simulated environments. You can ask "do people use it" "I've never seen it" but all I did was say, hey this isn't true for a lot of engineering that these statements aren't as absolute.

    "This is performance and scaling. It's not something most people think about." Right, its true. I'm just trying to expand the ideas that there are these problems out there and its something a lot of people do think about daily. My interview at the backend team at Amazon maintaining items and orders was another problem related to managing 16GB of data in C++, which is what they do. The guy asked me to regurgitate ideas for a reason.

    See this code below. Just calling a single function call without any STL emplace operations 4 billion times, its taken 30 seconds just to get to 8 million calls in debug. You do have to debug crashes in minecraft so it has to run in debug mode. I mentioned a Minecraft problem with 4 billion blocks on 4GB of RAM. Each block is one of 256 types of blocks (ground, rock etc). Each block can be destroyed in which the player receives one of 128 types of items (iron ore, wood, magnesium) to craft things like dynamite. Design a system to load as many as you can in RAM, design the best fit data structure you can that is fast. You can in fact make this run in under 100MB. We put 128 on there to recognize that 4 billion blocks, it would be worthwhile not to waste the last unneeded bit since it takes less than a byte to store the excavated item. You can save 500MB if you do so wisely. You got 30 minutes to give a good answer on this test. STL linked list adds a 64-bit pointer per block. You just added 8bytes*4billion blocks to your RAM requirements and now need 32 extra GB to perform this solution that needs to load in under 30 seconds or else Microsoft will fail you because your 8 year old audience is not interested to wait more than 30 seconds. Then you have to ship this thing on a mobile phone port with less contraints.

    Merely trying to expand brains. Google maps I think is another excellent example outside of just videogames where problems like these exist. Amazon teams, Grand Theft Auto Teams, my team, talking 200 engineers per company, some more, that's millions of guys that do think about these contraints. I'm replaceable. Most guys switch jobs ever 2-4 years and get filled up by another engineer. Cheers

    Performance (resized).pngPerformance (resized).png

    #194 7 months ago
    Quoted from taylor34:

    But what I am good at is solving problems and I have a good work ethic.

    These traits, along with being a positive person that I would want to work with every day, are the most important things a person can bring to an interview with me. I'll know within the first 5 minutes if you have been technical in the past and have some experience there, and not by asking you to write me a name parser or know why manhole covers are round. I really want to know if you are going to be a positive impact to our environment or a negative one.

    #195 7 months ago

    Ok. I'll bite (again). This thread should probably have a title change since it is no longer really a discussion about the actual job opening. Apologies to the OP and free bump.

    Three things to start off with before going into the "TL;DR" section.

    1. None of this is personally directed at any poster. It is supposed to be debate about posted issues.
    2. I have found that "if you think you know a lot about a topic then you are mistaken because there is always someone else who knows more than you". I have been on both sides of this - I know more than someone else and someone else knows more than me.
    3. More apologies as this is almost "flynnibus-esque".

    <TL;DR>

    Quoted from dpadam450:

    While the STL IS in fact useful to get something up and running fast for tons of applications, it's not widely used by tons of real-time simulated environments.

    Unless you have actually seen the source code for any software in question, you can't say this is a true statement. Most companies that produce a software product have closed source code so I doubt if there are any statistics to back up any claim - on either side. The way I see it is that it doesn't matter if you use STL or not. If it gets the job done (even in real-time simulated environments), it gets the job done. I try not to make anything more complicated than it needs to be.

    Quoted from dpadam450:

    I'm just trying to expand the ideas that there are these problems out there and its something a lot of people do think about daily.

    I have to disagree with this - as a generalization. Most software engineers care about getting their features implemented and working. Performance is after thought. It is only considered when the feature isn't working in a performant manner. Why waste development time on something that doesn't need attention? The only important area of design that I have encountered where after thought is an error is security. You need to design security into your system. You cannot "patch it in". The topic of security is a whole 'nother can of worms. These two areas (performance and security) are usually handled by specialists rather than generalists. Think "performance review" or "security review". These are done by (external) consultant teams. That has been my experience.

    Quoted from dpadam450:

    See this code below. Just calling a single function call without any STL emplace operations 4 billion times, its taken 30 seconds just to get to 8 million calls in debug.

    That's a contrived example and doesn't prove anything. A good optimizer will optimize that all away. The function foo() will be inlined and the function call overhead will be eliminated. I know the point you're trying to state. You're trying to state that function call overhead is wasted CPU execution cycles. STL overhead is wasted CPU execution cycles. In a real time environment, you want minimal wasted CPU execution cycles.

    The problem with this example is that you haven't MEASURED and just generated an example. If you measure and determine function call overhead is the cause then inline the function to remove the overhead. If you measure and determine that bulk of a more complicated foo() function is the problem then removing the function call overhead will make no difference (number of CPU execution cycles spent in the function is orders of magnitude more than the function call overhead).

    It always come back to measure. If someone uses STL in a function and it's not causing any significant wasted CPU execution cycles then why bother wasting time on it? It all sounds academic (religious - metaphorically speaking) rather than practical (real world).

    Use a profiler or some form of profiling. Just be aware that the profiler itself injects overhead into the system. A good profiler will amortize the overhead equally (evenly) across the execution. The overhead will also be minimal. The other issue with a profiler is that it changes execution timing and in a pre-emptive thread execution kernel this can change your execution flow. As a side effect, this may expose synchronization bugs in the code.

    Why stop there?

    • In a system where paging is implemented, you should allocate blocks of memory in physically resident pages (non-paged) to reduce page faults. Page faults are orders of magnitude more of wasted CPU execution cycles.
    • If you really care about performance then you need to investigate the processor cache line size to keep your data in the processor cache as much as possible.
    • Then there's TLB misses that can introduce overhead. Change your data structure layout to keep high frequency use data in a cache line and in the same page to reduce TLB misses. How low do you want to go?
    Quoted from dpadam450:

    You do have to debug crashes in minecraft so it has to run in debug mode.

    If you're debugging crashes in debug mode then you aren't debugging crashes in what your customers are using. The best debugging I ever did was in retail (release) mode. I once had a debug session that lasted days in a debugger that stopped execution at the crash. All I did was inspect memory and code. It took me days to figure out what happened. My experience is that most software engineers give up debugging failures far too quickly. It's reflected in the quality of software being released by software companies nowadays. That is my opinion - nobody else's.

    Quoted from taylor34:

    One of the problems I have in interviews is that I'm just flat out terrible with vocab/tech talk. People would ask me about things I hadn't used in 20 years in interviews and I'd like freeze up like a deer in headlights, lol. It's not my strong point at all, and I'm sure I would fail most of your interviews because of it.

    I am the same. My last company let me go and I tried interviewing around but failed all the interviews. If I interviewed with the company I worked for over the years today, I would fail.

    Quoted from taylor34:

    You were mentioning performance above, one of the embedded units I worked on was extremely cpu limited and had all of these tasks that were constantly being starved due to lower priority. I spent a lot of time eeking out performance improvements and profiling due to tasks getting starved and others overrunning.

    This kind of problem depends if you are running in a preemptive or cooperative threaded system. Cooperative threading requires cooperation. Duh. If you hog the CPU then you will starve others. Preemptive threading can still be abused by high priority threads that don't enter wait states. Good software will spend most of its time in a wait state, unless it's computationally intensive. If it's computationally intensive then it should probably be in a separate thread at a lower priority than system or user interaction threads.

    The one area where true cooperation is required is the ISR. Any ISR must be as efficient as possible and do the minimal amount of work handing off lower priority tasks to be executed outside the ISR. The ultimate ISR is a trap handler.

    Quoted from taylor34:

    I'd fix it and then some other team would check in a change the next week and use up what I just saved.

    Seen plenty of these over the years. In a relatively open system (like desktop computing) it doesn't really matter that much. In an embedded system it matters more. If it matters enough then add some code that enforces quotas or whatever to prevent it from happening. In debug builds for projects that I worked on in the past, I tracked all memory allocations and could tell at termination how much leaked and by whom (culprit code).

    </TL;DR>

    #196 7 months ago

    Sheezus, take it to PM already.

    #197 7 months ago
    Quoted from DumbAss:

    flynnibus-esque

    ...but much more interesting

    #198 7 months ago

    Where do you guys find the time to write epically long posts.

    #199 7 months ago
    Quoted from jackd104:

    Where do you guys find the time to write epically long posts.

    I try, but then a squirrel runs by and i'm done...

    #200 7 months ago
    Quoted from dpadam450:

    Can't tell you how many 4 year schools where people cannot explain or implement a linked list.

    Can I qualify? I haven't worked as a programmer, but when I use a dating app I make a linked list of all the hot girls on it.

    There are 210 posts in this topic. You are on page 4 of 5.

    Reply

    Wanna join the discussion? Please sign in to reply to this topic.

    Hey there! Welcome to Pinside!

    Donate to Pinside

    Great to see you're enjoying Pinside! Did you know Pinside is able to run without any 3rd-party banners or ads, thanks to the support from our visitors? Please consider a donation to Pinside and get anext to your username to show for it! Or better yet, subscribe to Pinside+!


    This page was printed from https://pinside.com/pinball/forum/topic/so-you-want-to-program-pinball-machines/page/4?hl=dpadam450 and we tried optimising it for printing. Some page elements may have been deliberately hidden.

    Scan the QR code on the left to jump to the URL this document was printed from.