I’ll give an example. At my previous company there was a program where you basically select a start date, select an end date, select the system and press a button and it reaches out to a database and pulls all the data following that matches those parameters. The horrors of this were 1. The queries were hard coded.

  1. They were stored in a configuration file, in xml format.

  2. The queries were not 1 entry. It was 4, a start, the part between start date and end date, the part between end date and system and then the end part. All of these were then concatenated in the program intermixed with variables.

  3. This was then sent to the server as pure sql, no orm.

  4. Here’s my favorite part. You obviously don’t want anyone modifying the configuration file so they encrypted it. Now I know what you’re thinking at some point you probably will need to modify or add to the configuration so you store an unencrypted version in a secure location. Nope! The program had the ability to encrypt and decrypt but there were no visible buttons to access those functions. The program was written in winforms. You had to open the program in visual studio, manually expand the size of the window(locked size in regular use) and that shows the buttons. Now run the program in debug. Press the decrypt button. DO NOT EXIT THE PROGRAM! Edit the file in a text editor. Save file. Press the encrypt button. Copy the encrypted file to any other location on your computer. Close the program. Manually email the encrypted file to anybody using the file.

  • FigMcLargeHuge@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    65
    ·
    1 month ago

    Long time ago, but by far the worst for me was when I inherited some code that a previous programmer had done. Every variable was a breakfast item. So if biscuit>bacon then scrambledeggs=10. Shit like that. It was a nightmare and luckily I only had to deal with it infrequently.

    • CaptDust@sh.itjust.works
      link
      fedilink
      arrow-up
      36
      ·
      1 month ago

      Why do people do stuff like this, is the logic not difficult enough to follow on it’s own without a secondary definition table to consult!? Fucking hell.

    • vrek@programming.devOP
      link
      fedilink
      English
      arrow-up
      23
      arrow-down
      1
      ·
      1 month ago

      I don’t know what’s worse… That program or that you put biscuits greater than bacon…

      Actually I think the greater crime is biscuits being greater than bacon

    • hddsx@lemmy.ca
      link
      fedilink
      arrow-up
      15
      arrow-down
      1
      ·
      1 month ago

      I don’t know how old you are but when I was in school, this was just going out of style. They saw this as job security. If you’re the only one who can work on the code, then they won’t fire you

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    52
    ·
    1 month ago

    One time, I had to request firewall access for a machine we were deploying to, and they had an Excel sheet to fill in your request. Not great, I figured, but whatever.

    Then I asked who to send the Excel file to and they told me to open a pull request against a Git repo.
    And then, with full pride, the guy tells me that they have an Ansible script, which reads the Excel files during deployment and rolls out the firewall rules as specified.

    In effect, this meant:

    1. Of course, I had specified the values in the wrong format. It was just plaintext fields in that Excel, with no hint as to how to format them.
    2. We did have to go back and forth a few times, because their deployment would fail from the wrong format.
    3. Every time I changed something, they had to check that I’m not giving myself overly broad access. And because it’s an Excel, they can’t really look at the diff. Every time, they have to open it and then maybe use the Excel version history to know what changed? I have no idea how they actually made that workable.

    Yeah, the whole time I was thinking, please just let me edit an Ansible inventory file instead. I get that they have non-technical users, but believe it or not, it does not actually make it simpler, if you expose the same technical fields in a spreadsheet and then still use a pull request workflow and everything…

    • vrek@programming.devOP
      link
      fedilink
      English
      arrow-up
      19
      ·
      1 month ago

      The corporate world runs on excel, never the best option, but everyone knows it so…

        • inzen@lemmy.world
          link
          fedilink
          arrow-up
          16
          ·
          1 month ago

          Try a few Gigabytes. I worked on site IT support for a year, we had to max out memory on a workstation because the company database was a, about 3GB, Excel file. It took minutes to open and barely worked, crashing frequently.

      • I_am_10_squirrels@beehaw.org
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        When I was interning in a cellular biology lab, I took their chemical inventory and converted it from excel to access. Complete with forms and reports. Spent some time training the permanent staff how to use it, explained how it was much more efficient than excel.

        I don’t think they bought into it, but I tried.

  • i_stole_ur_taco@lemmy.ca
    link
    fedilink
    arrow-up
    45
    ·
    1 month ago

    I found code that calculated a single column in an HTML table. It was “last record created on”.

    The algorithm was basically:

    foreach account group
      foreach account in each account group
        foreach record in account.records
          if record.date > maxdate
            max = maxdate
    

    It basically loaded every database record (the basic unit of record in this DATA COLLECTION SYSTEM) to find the newest one.

    Customers couldn’t understand why the page took a minute to load.

    It was easily replaced with a SQL query to get the max and it dropped down to a few ms.

    The code was so hilariously stupid I left it commented out in the code so future developers could understand who built what they are maintaining.

  • CaptDust@sh.itjust.works
    link
    fedilink
    arrow-up
    41
    arrow-down
    1
    ·
    edit-2
    1 month ago

    I’ve had legacy systems that would encrypt user passwords, but also save the password confirmation field in plain text. There was a multitenent application that would allow front end clients to query across any table for any tenant, if you knew how to change a header. Oh and an API I discovered that would validate using “contains” for a pre-shared secret key. Basically if the secret key was “azh+37ukg”, you could send any single individual character like “z” and it would accept the request.

    Shits focked out here, mate.

    • vrek@programming.devOP
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 month ago

      I have to ask, if it’s only contains wouldn’t you get a ton of collisions?

      Expecting an apartment manager to know what a api header was nevermind how to change it is probably not likely. Security hole to be sure though.

      • CaptDust@sh.itjust.works
        link
        fedilink
        arrow-up
        8
        ·
        1 month ago

        The secrets themselves were basically guids, they had quite a lot of characters. If sent MORE than 1 character, pretty low chance they would clash. But those long guids also covered a lot of letters and number - it wasn’t terribly difficult to find one single character that cleared authorization reliably.

        And maybe you’re joking lol, but multitenant meaning multiple businesses/customers using the same application stored in the same database. If Bob’s construction wanted to spy on Jim’s contracting, they’d just need to know the right header to send and could get whatever they wanted from the other customer partitions. User access should of course be limited to their own assigned partitions.

        • vrek@programming.devOP
          link
          fedilink
          English
          arrow-up
          4
          ·
          1 month ago

          Oh, ok I interpreted multitenant wrong. I was thinking it was like a apartment complex so you have like a manager and a sales person with access and that’s it. Still a valid security risk but not as severe as what you are saying now.

          Sorry for confusion

    • Hasherm0n@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 month ago

      I once saw an application that would encrypt (not hash, encrypt) passwords but then when a user was logging in, they’d encrypt the password candidate and then compare the cipher texts to see if they were the same. This was using 3des, so no IV.

  • TootSweet@lemmy.world
    link
    fedilink
    English
    arrow-up
    28
    ·
    1 month ago

    Java webapp. Customer facing. E-commerce application, so in PCI scope and dealt with credit card info and such.

    There was one specific cookie that stored some site-wide preference for the customer. (Why not just put that preference in the database associated with the user? Because that would make too much sense is why.)

    But the way they encoded the data to go into the cookie? Take the data, use the Java serialization framework (which is like Python’s “Pickle” or Go’s “Gob”) to turn that into a string. But that string has binary data in it and raw binary data is kindof weird to put in a cookie, so you base64 encode the result. (The base64 encoding was the only sane step in the whole process.) Then you do the reverse when you receive the cookie back from the browser. (And no, there was no signature check or anything.)

    The thing about the Java serialization framework, though is that decoding back into Java objects runs arbitrary object constructors and such. As in, arbitrary code execution. And there’s no checking in the deserialization part of the Java serialization framework until your code tries to cast the object to whatever type you’re expecting. And by that point, the arbitrary code execution has already happened. In short, this left a gaping vulnerability that could easily have been used to extremely ill effect, like a payment information breach or some such.

    So all a malicious user had to do to run arbitrary code on our application server was serialize something, base64 encode it, and then send it to our servers as a cookie value. (Insert nail biting here.)

    When we found out that there was a severe vulnerability, I got the task of closing the hole. But the existing cookies had to continue to be honored. The boss wasn’t ok with just not honoring the old cookies and developing a new cookie format that didn’t involve the Java serialization framework.

    So I went and learned enough about the internal workings of how the Java serialization framework turned a Java value into a binary blob to write custom code that worked for only the subset of the Java serialization format that we absolutely needed for this use case and no more. And my custom code did not allow for arbitrary code execution. It was weird and gross and I made sure to leave a great big comment talking about why we’d do such a thing. But it closed the vulnerability while still honoring all the existing cookies, making it so that customers didn’t lose the preference they’d set. I was proud of it, even though it was weird and gross.

    The value that was serialized to put into the cookie? A single Java int. Not a big POJO of any sort. Just a single solitary integer. They could just as well have “serialized” it using base-10 rather than using the Java serialization framework plus base64.

    • mcmodknower@programming.dev
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 month ago

      Some minecraft mods had/have a similar problem. They use javas serialization stuff for sending stuff between client and server. There is mod that partially fixes this by only allowing whitelisted classes to be deserialized.

    • vrek@programming.devOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 month ago

      Wow… If you can answer was this like a single company or were you selling the service to other companies?

      If selling to multiple companies did you offer a “new” version and a “security patch” for the old or just made everyone use your implementation?

      • TootSweet@lemmy.world
        link
        fedilink
        English
        arrow-up
        14
        ·
        1 month ago

        This was a developed-in-house e-commerce web application at a major e-retailer. So fortunately that monstrosity of a cookie-handling mess was only ever used by one company.

        You know what, though? Talking about this reminds me of another story about the same e-commerce application.

        After a customer placed an order on this e-commerce site, the company’s fraud department had to evaluate the order to make sure it wasn’t fraudulently placed. (As in, with a credit card not owned or authorized for use by the purchaser.) Once that was done, the order had to be communicated to a worker at the warehouse so they could pack the right items into a box, put on a shipping label, and set the box aside to be picked up by the UPS truck which would come once a day near the end of the day.

        The application used by the fraud department and the application that displayed new orders to warehouse workers was one and the same application. Whether a user had fraud-evaluating powers or pack-items-in-boxes powers just depended on what permissions their particular user had. (That may have been decided by LDAP groups. I don’t remember for sure.)

        Meanwhile, the e-commerce site offered gift cards for sale online. The gift card would be shipped to the customer. And there was a box where you could write a message associated with the gift card. So, for instance, someone could buy a gift card to be sent to their nephew’s address or whatever and include a little note like “Happy Birthday. Don’t spend it all at once.” or whatever. And the fraud/pick-and-pack application would display all details of the order including any messages associated with the gift cards.

        Well, I found a stored cross-site scripting vulnerability where if you put <script>...</script> tags with some JavaScript in the gift card message box and completed the order, the JavaScript would execute any time someone viewed the details page for the order in the fraud/pick-and-pack application. And of course, the JavaScript could do within that application just about anything the user could do with their given permissions.

        The main danger was that a malicious actor with sufficient knowledge of how our fraud application worked could place an order fraudulently with someone else’s credit card and include in the order a gift card with a malicious JavaScript payload in the message box, and then that malicious JavaScript could automatically mark the order “a-ok, no fraud here” when a fraud department worker loaded the order details page, letting the order be fulfilled without any actual fraud review.

        The fix was pretty simple. Just stick a <c:out>...</c:out> in the appropriate place in the fraud/pick-and-pack application code. But it was an interesting example of a vulnerability in a not-customer-facing application that could none-the-less be exploited by any public customer/user without any particular special access.

        If you’re interested in one more interesting story about the same e-commerce application, see this comment I made a while ago.

        • vrek@programming.devOP
          link
          fedilink
          English
          arrow-up
          5
          ·
          1 month ago

          That is interesting, I dealt with purely internal software so never considered that.

  • Phoenixz@lemmy.ca
    link
    fedilink
    arrow-up
    28
    ·
    1 month ago

    A program that HR had built so that all employees could they their payment receipts online

    The username was the companies’ email address, the password was a government personal id code that you can lookup online, a don’t change, and you can’t update the password to something else.

    So I told the director of HR this was a bad idea. She told me I was overreacting until I showed her her own receipt, then she finally understood that this is a really fucking bad idea.

    Okay, so now she out me in charge of debugging that program.

    So I setup a meeting with the director of the company they hired, he came by with the developer: a 21 yo girl who I think hadn’t finished college yet. Great start! Apparently it was her idea to do the authentication like that so that explains a few things.

    So we dive in to the code.

    First of all, the “passwords” were stored in blank, no hashing, no encryption, nothing. That wasn’t the worst.

    For the authentication she made a single query to check if the user email existed. Of that was true, then step two was a second query to see if the password existed. If that were true, the email had been authenticated.

    So let’s say, hypothetically, that they had actual passwords that people could change… I could still login with the email from anyone, and then use MY OWN password to authenticate.

    This just blew my mind so hard that I don’t think I ever fully recovered, I still need treatment. The stupidity hurts

  • softkitteh@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    27
    ·
    1 month ago

    Oh boy, this one was a doozy…

    Was working at a very big company named after a rainforest on smart home products with integrations for a certain home assistant…

    New feature was being built that integrates the aforementioned home assistant with customer’s printers so they can ask the assistant to print stuff for them.

    The initial design lands from our partner team with a Java backend service fairly nicely integrated with some CUPS libraries for generating the final document to be sent to the customer’s printer. All good.

    They are about to launch when… uh oh… the legal team notices an AGPL licensed package in one of the CUPS library’s dependencies that was absolutely required for the document format needed by the project and the launch is cancelled.

    So the team goes off in a panic looking for alternatives to this library and can’t find any replacements. After a month or two they come back with their solution…

    Instead of converting the document directly in the backend service with the linked CUPS library (as AGPL is a “forbidden license” at this company) the backend uploads the initial document to an S3 bucket, then builds a CUPS document conversion bash shell script using some random Java library, the shell script is then sent (raw) to a random blank AWS host that comes prepackaged with CUPS binaries installed (these hosts were not automated with CI/CD / auto updates as was usually mandated by company practice because updating them might remove the CUPS binaries, so they required a ton of manual maintenance over the service’s lifetime…), the bash shell script is then executed on that “clean” host, downloading the document from S3, converting it via the CUPS command line binary, then reuploading it to another S3 bucket where the Java backend picks it up and continues the process of working the document through the whole backend pipeline of various services until it got to the customer’s printer.

    This seemed to satisfy the legal team at the very least, and I have no doubt is probably still in production today…

    The kicker though? After all those months of dev work from a whole team (likely all on 6 figure salaries), and all the time spent by various engineers including myself on maintenance and upkeep on that solution after it was transferred to us?

    An alternative, completely unrestricted corporate license was available for the package in question for about $100 per year so long as you negotiated it with the maintainers.

    But that was a completely unacceptable and avoidable cost according to upper management…

    • vrek@programming.devOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 month ago

      Wait 100 per year total or 100 per seat per year? If it’s per seat I can understand, if it’s total wtf…

      • softkitteh@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        16
        ·
        1 month ago

        $100 total, per year… as a FOSS enthusiast, it made me very angry that such a rich company was so petty over such a small cost for a product that raked in multiple millions of dollars per year 😾

        • vrek@programming.devOP
          link
          fedilink
          English
          arrow-up
          10
          ·
          1 month ago

          Yeah that’s fucked up. From two perspectives 1. Who ever wrote that library needs money to survive. 2. From the company point of view they wasted WAY more money on the development then the license. Hell if 1 developer spent a day to do it, they paid more than they would for the license

  • jjjalljs@ttrpg.network
    link
    fedilink
    arrow-up
    26
    ·
    1 month ago

    There was a website where users could request something or other, like a PDF report. Users had a limited number of tokens per month.

    The client would make a call to the backend and say how many tokens it was spending. The backend would then update their total, make the PDF, and send it.

    Except this is stupid. First of all, if you told it you were spending -1 tokens, it would happily accept this and give you a free token along with your report.

    Second of all, why is the client sending that at all? The client should just ask and the backend should figure out if they have enough credit or not.

    • vrek@programming.devOP
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 month ago

      I agree but I would say if there are variable token costs depending on report it would be nice if client sent request to server, server calculates x tokens to be used, sends x to client, client confirms that’s acceptable, server does work.

      Like if I expected a report to be 2 tokens but because of some quirk or a typo or something it cost 200 tokens I would like a chance to cancel it if it’s not worth it.

  • halloween_spookster@lemmy.world
    link
    fedilink
    English
    arrow-up
    24
    ·
    1 month ago

    Our CFO’s social security number, contact info, and just about everything you’d need to impersonate them inside a random shell script that was being passed around like drugs at a party for anyone to use. Oh and it had an API key to our payments processor hard coded into it.

    That was the tip of the iceberg of how bad the systems were at the company. All of these are from the same company:

    • A fintech based company with no billing team
    • An event system that didn’t event
    • A permissions system that didn’t administer permissions
    • A local cache for authentication sessions. Which means that requests would intermittently fail auth because the session was only on one replica. If you hit any of the other ones, you’d get an unauthenticated error
    • A metrics collection system that silently lost 90% of it’s data
    • Constant outages due to poorly designed and implemented systems (and lack of metrics… hmmm)
    • Everything when I joined was a single gigantic monolith that was so poorly implemented they had to run at least 3 different versions of it in different modes to serve different use cases (why the fuck did you make it a monolith then?!)
    • The subscriptions system was something like 20 or 30 database tables. And they were polymorphic. No one could touch the system without it breaking or that person declaring failure, which leads me to …
    • A database schema with over 350 tables, many of which were join tables that should have been on the original table (fuck you scala/java for the limitations to the number of fields you can have in a case class). Yes you read that right. Table A joined to table B just to fill in some extra data that was 1:1 with table A. Repeat that a few dozen times
    • History tables. Not separate from the original table, but a table that contained the entire history of a given piece of data. The worst example was with those extraneous join tables I just mentioned. If you went and changed a toggle from true to false to true to false, you’d have 4 records in the same table. One for each of those small changes. You’d have to constantly try to figure out what the ‘latest’ version of the data was. Now try joining 5 tables together, all of them in this pattern.
    • Scala… I could go on a tirade about how bad scala is but needless to say, how many different error handling mechanisms are there? Scala decided to mix all of them together in a blender and use them all together. Scala is just two white paper languages in a trenchcoat. Never use it in a production system
    • A dashboard for “specialists” that was so easy to overwhelm that you could do it by breathing on it due to the LACK of events that it needed
    • Passwords stored in plain text (admittedly this was in the systems of the company we acquired while I was there). Doesn’t matter if they were actually <insert algorithm here>, they were visible in a dashboard accessible by employees. Might as well have been plain text
    • A payments system that leaked it’s state into a huge part of the rest of the system. The system ended up being bifurcated across two systems, I was brought in to try to clean up some of the mess after only a couple of months. I desperately tried to get some help because I couldn’t do it solo. They ended up giving me the worst engineer I’ve ever worked with in my 15 year career, and I’ve seen some bad engineers. Looking back, I’m reasonably confident he was shoving our codebase into an AI system (before it was approved/secured, so who knows who had access) and not capable of making changes himself. I could make several posts about this system on its own
    • I could go on but I’ll cut it off there
  • i_dont_want_to@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    24
    ·
    1 month ago

    I was told about a bug in a specific tool. It was being used in production. Apparently we’ve gotten a lot of complaints about it over the years, and they would complain if the site was actively used it always failed.

    I couldn’t find it in the development branch in source control.

    I asked if this tool was purchased from a third party. My boss, who was not a developer, said no. And he was very sure of that. But he didn’t know where the code was.

    I was the developer with the most seniority, and I was there for less than a year at this point.

    I looked again. I finally found it… In an unapproved pull request from a few years prior.

    The meat of this tool basically took information to make an order and create an order in the system.

    Any time we needed to insert a record, it would find the highest Id in the table, increment 1, and insert the new record, id and all. It did this for every entity that needed to be inserted. Address, customer… Everything.

    Worse, very little validation was done. Want to order something but it’s out of stock? No problem, this tool just pushed it right through.

    Want to ship something using a shipping method that doesn’t exist? You got it.

    Want to ship something to an address that doesn’t exist? Sounds like the warehouse’s problem.

    Knowing about the level of knowledge here, you know that there were no transactions. All sorts of unused records were left in the database when there was an error. The users would get a generic error and try again several times, too.

    The worst part was, we have an already existing function that would take order information and try to make an order. And it would give you actionable errors!

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 month ago

      This reminds me of a time at work when we got sued. The company was allegedly using (or had copies) of some tool we couldn’t have anymore. Annoying, but fine. However, to check this, they scanned all of our computers for the name of that company. They told us all to delete our entire local Maven repository. Someone who worked there was on the commiter list for a couple of open source projects. I just manually deleted those files because I knew for a fact that our central Maven repository didn’t have some of the versions of our own code on it and I wasn’t confident we wouldn’t need them again. Turns out I was right and needed to grab one later on to upload. Because I manually deleted the files with the company’s name instead of just deleting everything, the scanner thing they were running didn’t detect offending files. (Not that a file listing someone’s email address as a commiter to an open source project should be offending, but still.)

  • quinkin@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    1 month ago

    XML-DOM page templates stored in a database, line by line.

    So rendering a page started with:

    select * from pages

    where page_id = ‘index’

    order by line_number asc;

    Each line of XML from each record was appended into a single string. This string was then XSLT transformed to HTML, for every page load.

    • dejected_warp_core@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      1 month ago

      This has to be one of the worst ways to reinvent a filesystem that I’ve ever heard. At the very least, storing static data in an relational database at this scale should be a slappable offense.

      • quinkin@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        1 month ago

        The session data, that would have been fantastic to have in a relational, queryable, reliable and trustable format was stored as a single giant string of PHP pickled data structure in a session file associated with the users cookie id.

  • Valmond@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    1 month ago

    The architect sending a pointer over an API, in hexadecimal string format. char *c = “71E4F33B” just cast it on the right structure bro.

    Just to add, we only did C/C++, on windows mfc, in a monolithic software.

    I spent quite some time assuring myself that I was not the insane person before bringing it up with him.

  • tatterdemalion@programming.dev
    link
    fedilink
    arrow-up
    17
    ·
    1 month ago

    I’ll consider myself lucky that the worst I’ve had to deal with was a 8K LOC C file that implemented image processing for a cancer detection algorithm. Nothing terribly tricky but just poorly organized. Almost no documentation at all. The only test was running this code against a data set of patient images and eyeballing the output. No version control other than cloning the project onto their NAS and naming it “v2” etc.

    Research code can be really scary.

  • RagingRobot@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    1 month ago

    We had some super old code in our company monorepo that was written by someone who became the CTO, there was a comment forbidding people from writing private methods in the code base because “we aren’t babies”. It explained so much about the awful code and why everything was crazy.

    • expr@programming.dev
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      1 month ago

      Access modifiers are definitely something I despise about OOP languages, though I understand that OOP’s nature makes them necessary.

      • KubeRoot@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 month ago

        I don’t think OOP’s nature makes them necessary, so much so as it enables them and popular programming principles encourage them. I think they’re a good thing, especially if there’s a way around them in case you can’t get the public interface changed and it doesn’t work for you, especially for performance reasons, but that should be done with care.

        Funny story, when modding Unity games using external modloaders you’re writing C# code that references the game’s assemblies. And with modding you often need to access something that the developers made private/protected/internal. Now, you can use reflection for that, but a different trick you can use is to publicize the game’s assemblies for referencing in your code, and add an attribute to your assembly that tells the runtime to just… Let you ignore the access checks. And then you can just access everything as public.

  • halloween_spookster@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 month ago

    A data ingestion service that was processing ~15 billion logs each day that was duplicating each of those logs 2-4 times in memory as a part of the filtering logic. No particular reason nor need to do it. When I profiled the system it was BY FAR the largest hog of CPU and memory.

    The engineer who wrote it once argued with me about writing comparisons a == b vs b == a because one was technically more efficient … in a language we weren’t using.