|
Ender.uNF posted:The real horror is MAX_PATH, a gift that will keep on giving. You mean PATH_MAX?
|
# ? Aug 26, 2013 17:00 |
|
|
# ? Jun 8, 2024 05:09 |
|
For some serious coding horrors, think of how you'd use the win32 api hack/workaround for longer paths from a C# application. The horror at the time I had to do this was me. Edit: for a good discussion of why this is so horrific to do, see http://blogs.msdn.com/b/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx npe fucked around with this message at 17:10 on Aug 26, 2013 |
# ? Aug 26, 2013 17:08 |
|
The disease of MAX_PATH can even cross OS boundaries. The Team Foundation client plugin for Eclipse running on Mac OS X complains about MAX_PATH being hit at the 260 character limit.
|
# ? Aug 26, 2013 17:12 |
|
The real horror is seeing MAX_PATH used all over a project to statically size strings that aren't even paths.
|
# ? Aug 26, 2013 17:18 |
|
Ender.uNF posted:The real horror is MAX_PATH, a gift that will keep on giving. I had Visual Studio fail to build a project due to a source tree that had too deep a directory structure. It was fine for a long time until I added one more subfolder that broke its back and suddenly it was failing the build as "12 of 12 projects built successfully; build failed". There was no error message in the build output even after turning on maximum verbosity. Just "everything built successfully; build failed." After reorganizing the folders to be less nested everything magically worked again. This wasn't a Java project so I guess the horror was me.
|
# ? Aug 26, 2013 17:56 |
|
You're already at a disadvantage in Visual Studio if you let it set up your sources under your Documents and Settings hierarchy since that just tacks on a bunch of other stuff. But I suppose you can swing the whole mess the other way and make another horror by putting your sources under C:\s or something.
|
# ? Aug 26, 2013 18:50 |
|
That was more or less what happened. My svn repo was under AppData/Local because That's How You Do Things in the brave new world of UAC. Moving it up to C:\ temporarily fixed the problem (though the directory structure was a legit horror and I fixed that too). Another fun horror: if you run a local website under IIS and the folder is somewhere under your User directory instead of out in the wild of C:\ you end up with all kinds of weird static file handler permissions issues that are tricky to work around as you can't just slap an ACL on it and call it a day.
|
# ? Aug 26, 2013 18:52 |
|
npe posted:For some serious coding horrors, think of how you'd use the win32 api hack/workaround for longer paths from a C# application. The horror at the time I had to do this was me. How the gently caress do they figure that it's reasonable for a long file name to bypass every other file name restriction, too? I guess it'd take a bunch of disk IO to check a really stupidly deep folder structure, but that doesn't strike me as a good reason, just a dumb excuse.
|
# ? Aug 26, 2013 19:23 |
|
We are using a unit test to initialize the database. Except that the unit test does not actually check the configuration files, and thus attempts to initialize localhost:3306 and localhost:27017 regardless of where the rest of the build thinks the databases are located. I have no words.
|
# ? Aug 26, 2013 20:26 |
|
Windows path horrors? It makes me laugh to no end that poo poo like this still works:code:
|
# ? Aug 26, 2013 20:39 |
|
Everything that has ever worked will continue to work, forever.
|
# ? Aug 26, 2013 20:42 |
|
No Safe Word posted:Windows path horrors? It makes me laugh to no end that poo poo like this still works: That spreadsheet you created on Windows 3.11 and then updated once on Windows 95 before the Office 95 upgrade had better keep working, or else people will be pissed.
|
# ? Aug 26, 2013 20:44 |
|
I am guilty of using PROGRA~1 more than once. Escaping paths is E: This was on 32bit and for personal purposes only thankfully.
|
# ? Aug 26, 2013 20:51 |
|
pseudorandom name posted:That spreadsheet you created on Windows 3.11 and then updated once on Windows 95 before the Office 95 upgrade had better keep working, or else people will be pissed. No joke this accounts for a significant number of Windows horrors. Dominant market share is a double-edged sword.
|
# ? Aug 26, 2013 20:52 |
|
pseudorandom name posted:That spreadsheet you created on Windows 3.11 and then updated once on Windows 95 before the Office 95 upgrade had better keep working, or else people will be pissed. code:
|
# ? Aug 26, 2013 21:16 |
|
TechNet says it is per-volume now.
|
# ? Aug 26, 2013 21:20 |
|
qntm posted:See also: GNU make. Example: You can't build busybox in a directory where any component has a colon in it. Odd case, yes, but it really annoyed me. I think the problem is with the make language itself, rather than the GNU make implementation. I recall being told that make's awful syntax is from the fact that the designed didn't know how to properly use yacc, so the first implementation had a hacked together parser. He later learned how to do it properly, but by then he had a user, so couldn't fix it, and we've been paying for this ever since.
|
# ? Aug 26, 2013 21:58 |
|
Shinku ABOOKEN posted:I am guilty of using PROGRA~1 more than once. Escaping paths is mklink /d "c:\program files (x86)" c:\bin32 mklink /d "c:\program files" c:\bin
|
# ? Aug 26, 2013 22:12 |
|
Amarkov posted:We are using a unit test to initialize the database. You could always fix the test to read the config file.
|
# ? Aug 26, 2013 22:29 |
|
Volmarias posted:You could always fix the test to read the config file. Or I could do the sane thing and make it a separate part of the automated build process. Then again, all of the configuration files look auto-generated, so it's conceivable that nobody actually understood what Maven does.
|
# ? Aug 26, 2013 23:00 |
|
Amarkov posted:Or I could do the sane thing and make it a separate part of the automated build process. You mean aside from backing up the internet?
|
# ? Aug 26, 2013 23:31 |
|
Edison was a dick posted:Example: You can't build busybox in a directory where any component has Are you posting from emacs with auto-fill-mode or something?
|
# ? Aug 27, 2013 00:51 |
|
We follow PEP 8 around here.
|
# ? Aug 27, 2013 01:03 |
|
yaoi prophet posted:Are you posting from emacs with auto-fill-mode or something? Firefox with Vimperator plugin. I opened up vim with ^I to fix something since I find text boxes too constraining and habitually reformatted the text. I get called a nerd by professional software engineers for doing this.
|
# ? Aug 27, 2013 08:52 |
|
Gazpacho posted:The real horror is seeing MAX_PATH used all over a project to statically size strings that aren't even paths. The weird thing is that when i see MAX_PATH in the forum i hear a voice in my head saying something like "Max Path sat down at his desk, when there was a knock on his door. "Yep" he said as a gorgeous gal drifted in the opening door."
|
# ? Aug 27, 2013 09:19 |
|
Monkeyseesaw posted:I had Visual Studio fail to build a project due to a source tree that had too deep a directory structure. It was fine for a long time until I added one more subfolder that broke its back and suddenly it was failing the build as "12 of 12 projects built successfully; build failed". There was no error message in the build output even after turning on maximum verbosity. Just "everything built successfully; build failed." After reorganizing the folders to be less nested everything magically worked again.
|
# ? Aug 27, 2013 10:52 |
|
No Safe Word posted:Windows path horrors? It makes me laugh to no end that poo poo like this still works: http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/439261.aspx If you delete a file and create a new one with the same name it inherits the properties of the old one
|
# ? Aug 27, 2013 11:24 |
|
php:<? extract($vals); $ref = $referencenotes; if (!strstr ("XDXD", "$CUSTCODE$")) { $refnum = $vals["referencenotes2"]; $brk = "; "; if (strlen ($refnum)) $ref .= (strlen ($ref) ? "$brk" :"").$refnum; $refnum = $vals["referencenotes3"]; if (strlen ($refnum)) $ref .= (strlen ($ref) ? "$brk" :"").$refnum; $refnum = $vals["custponum"]; if (strlen ($refnum)) $ref .= (strlen ($ref) ? "$brk" :"").$refnum; $refnum = $vals["custinvnum"]; if (strlen ($refnum)) $ref .= (strlen ($ref) ? "$brk" :"").$refnum; $refnum = $vals["custdeptnum"]; if (strlen ($refnum)) $ref .= (strlen ($ref) ? "$brk" :"").$refnum; $refnum = $vals["department"]; if (strlen ($refnum)) $ref .= (strlen ($ref) ? "$brk" :"").$refnum; } ?>
|
# ? Aug 27, 2013 14:13 |
|
Vasja posted:
Also, extract() creates key/value pairs from an array. So, they could use $whatever instead of $vals['whatever'] after the extract.
|
# ? Aug 27, 2013 14:43 |
Vasja posted:
PHP code:
(I'm pretty sure one of the array_intersect family functions could avoid that loop and make it fewer lines, but they still seem really useless to me. All I ever want is to pull out the values from one array using another as the keys to pull out, and that's the one thing I can't find something for.)
|
|
# ? Aug 27, 2013 15:02 |
|
nielsm posted:What I do every day. PHP, uniting us through horrible code and worse coders. I just don't understand how people who have been using a language for upwards of a decade don't know about its most basic features or best practices. I end up saying things like "there are array functions now, and you probably shouldn't use globals and extract() everywhere" or "pg_result was deprecated in 2001 and removed from all available documentation in 2003, why is it still being added to our codebase in 2013?" way too often. IT BEGINS fucked around with this message at 15:22 on Aug 27, 2013 |
# ? Aug 27, 2013 15:17 |
|
GNU BC is a project so old its version control is a series of tarballs on ftp.gnu.org. This is a problem, since if you try to compile its latest release, which was made in 2000, trying to use its built-in math library causes it to segfault. A compiler optimisation added to modern gcc will optimise away calls to the function that allocates space for functions.
|
# ? Aug 27, 2013 18:42 |
|
Edison was a dick posted:GNU BC is a project so old its version control is a series of tarballs on ftp.gnu.org. ftp://alpha.gnu.org/pub/gnu/bc/ Last release was made in 2006.
|
# ? Aug 27, 2013 20:07 |
|
Suspicious Dish posted:ftp://alpha.gnu.org/pub/gnu/bc/ Alpha release, and 7 years is still too long. The tip-off is much appreciated though. I'll try it out; I much prefer using upstream sources to maintaining patches.
|
# ? Aug 27, 2013 21:49 |
|
alpha.gnu.org is just the name of the gnu project hosting site, it's not an alpha release. But yes, GNU bc has been without a maintainer for a long time now, and every distribution adds a patch to that release to fix an obvious crasher bug. It's an unfortunate state of affairs.
|
# ? Aug 27, 2013 22:33 |
|
Just use nickle instead, honestly.
|
# ? Aug 27, 2013 22:43 |
|
OK, so techically this isn't really a PHP horror since you could do this in any language. But I'm going to put it in the 'lol, PHP' category anyway.
|
# ? Aug 28, 2013 05:14 |
|
that link posted:Well I need to have users added to the operating system, and I'd like that to be through a web browser. (Again this is on a closed network). that link posted:I agree with you, and I'm aware of the security holes. But this isn't a publicly faced server, it's on a closed network. It has now become more frustrating as to why it doesn't work, I'm going to use a different method. that link posted:I mean it's on a closed network and just a few friends are using it so I agree with the one comment about this being awe inspiringly bad.
|
# ? Aug 28, 2013 06:23 |
|
Suspicious Dish posted:alpha.gnu.org is just the name of the gnu project hosting site, it's not an alpha release. alpha.gnu.org is listed on the bc project page under the test releases heading. I wouldn't be surprised if it was intended to be a stable release, but the maintainer forgot the credentials for ftp.gnu.org.
|
# ? Aug 28, 2013 08:10 |
|
|
# ? Jun 8, 2024 05:09 |
|
yaoi prophet posted:OK, so techically this isn't really a PHP horror since you could do this in any language. But I'm going to put it in the 'lol, PHP' category anyway. I don't know what's worse, the OP or all of the people who don't understand why this is bad.
|
# ? Aug 28, 2013 12:49 |