Mr. Satan
- 1 Post
- 6 Comments
Mr. Satan@lemmy.zipto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
14·8 months agoSo this is not as bad as some of the other stories I’ve seen, but I’ll bite.
It was an old .NET Framework MVC app. Some internal product management system or something. There was a need to do a PDF export in one of the use cases, so someone implemented it. It wasn’t a good implementation: one big controller, mixing UI and business logic, etc. However, it basically came down to a single private method in a specific controller for a page.
Now time passes and lo and behold, we need a PDF export in another page for a different use case. “No problem,” - same dev, probably - “I already solved this problem. I’ll just reuse the PDF generation logic.”
Now, any sane person would probably try to refactor the code responsible for PDF stuff into a separate service (class) and reuse it. A less sane, but somewhat, acceptable approach would have been to just copy paste the thing into another controller and call it a day.Ha! No no no no no no… Copy pasting is bad, code should be reused…
The end solution: REFLECTION. So the dev decided that the easiest way to make it work was to: 1) use reflection to inject one controller into another; 2) then use reflection again to get access and call that private method for PDF rendering into a stream.
Fortunately I didn’t have to fix that fragile mess. But I did my fair share of DevExpress corpse hacking and horrible angular “server side rendering” workarounds.
Mr. Satan@lemmy.zipto
Programmer Humor@programming.dev•What are some of the worst code you have seen in a production environment?
4·8 months agoOf course he had no answer for this except “just in case…”
Never in my career have I seen this argument come to fruition as valid.
Mr. Satan@lemmy.zipto
Programmer Humor@programming.dev•Apple forgot to disable production source maps on the App Store web app
0·9 months agoSecurity through obscurity is not security. I see no reason why source maps should be unavailable.
I’ve taken to say Fucking Teams™. Our company has Slack and our client uses Fucking Teams™ and it’s a constant meme of audio not working, sharing not working, notifications not working, etc.
I just hate the thing. It’s inferior in every way except that it’s dirt cheap for the client and it’s already there with office suite.
Office suite is another pet peeve of mine when it comes to sharing information. Just make a PDF! Do not share your .docx file. Half of my team don’t even have an office suite installed. So we get 3 or 4 different renditions of the same document depending on where we open it in (Libre, Word regular, Word web, Google docs). Just make a god damn PDF!
I second this, although I’m mostly alone with git extensions in my workplace.
I migrated to from sourcetree some years ago. At the time we had some big generated API client classes (imagine ~60k lines of code). They needed to be regenerated whenever we made changes and the diff on sourcetree was shitting the bed every time I needed to stage the damn files. It was just way too lagy, so I got fed up and moved.
On my personal machine I prefer lazygit or just plain CLI.



You should take your own advice.
That’s only one part to meaning and it’s the only one LLMs have. It’s facinating what this one part can do, but we don’t operate this way. LLM have no world model, no logic model to associate a word to. It doesn’t think, it’s still just and input - output machine.
I’m sorry, how is this not statistics?
The training is by it’s very nature statistical. We give millions of text inputs with expected outputs and tune the model until they match. How is this anything but statistics??
Yes and no? Yes - it’s not storing a copy of the training data in the text form. No - it most definetly can “memorize” text, if that’s not a copy I don’t know what is.
I could memorize foreign script text without understanding it and then I could recreate it. Did I make a copy? no. Can I make a copy? yes.