3 ms·
Worth linking for a hotter take: https://thedailywtf.com/articles/A_Case_of_the_MUMPS https://thedailywtf.com/articles/A_Case_of_the_MUMPS
by EvanAnderson 1y ago
Worth linking for a hotter take: https://thedailywtf.com/articles/A_Case_of_the_MUMPS https://thedailywtf.com/articles/A_Case_of_the_MUMPS
- BeFlatXIII 1y agoS Y=$C(34),X="W ""S Y=$C(34),X=""_Y X ""F %=1:1:6 W $P(X,Y,%),Y,Y"" W Y,"" X X""" X X
- roywiggins 1y agoI ran across SHA1 implemented in MUMPS once. And handwritten bitwise operations, since MUMPS doesn't have those as operators.
- timschmidt 1y agoOof. Unrelated to MUMPS, but the worst I've ever run into was a reimplementation of PHP's register_globals 20 years after it'd been patched out as a security nightmare, because the developer enjoyed the convenience.
- roywiggins 1y agoOne fun thing about MUMPS is that if you don't use the newfangled "new" keyword when declaring them, variables iirc are all global to the file. Or record, or whatever not-quite-a-file entity contains source code in MUMPS systems (8 character hard limit on filenames) And of course some code ends up relying on ambient global state to function properly, so the codebase is strewn with "environment setting" methods that set up the required globals before you call the functions that rely on them. The other fun one iirc is that calling a function inside the "true" branch of an IF can clobber the global TEST flag and cause the "false" branch to execute as well, since the "else" keyword relies on $TEST to decide what to do. The fix is to end it with a noop "if true" to unclobber $TEST. The other worst MUMPS code was MUMPS code that used string concatenation to generate more MUMPS code from the worst DSL you've ever seen, MUMPS code that seemed to partially implement a MUMPS interpreter...
- Forge36 1y agoA statement that writes itself? Neat!
- dang 1y agoA Case of the MUMPS (2007) - https://news.ycombinator.com/item?id=36268931 https://news.ycombinator.com/item?id=36268931 - June 2023 (109 comments)
- tkclough 1y agoI work in MUMPS daily and this is such an odd take to me. It's entirely possible to write very readable and maintainable MUMPS, and I find it fairly pleasant to write. There's lots of poorly written code, sure, but you can write bad software in any language.
- surgical_fire 1y agoClassic. Probably one of their best articles.