|
ugh ok I know this is an old codebase written by scientists but how bad could it bC code:
|
# ? Jun 18, 2015 17:49 |
|
|
# ? Jun 8, 2024 08:24 |
|
GrumpyDoctor posted:ugh ok I know this is an old codebase written by scientists but how bad could it b What, you'd rather they all be in the same file?
|
# ? Jun 18, 2015 18:43 |
|
GrumpyDoctor posted:ugh ok I know this is an old codebase written by scientists but how bad could it b Sweet jesus. fritz posted:What, you'd rather they all be in the same file? Those aren't header files.
|
# ? Jun 18, 2015 18:52 |
|
Hughlander posted:How were the sysadmins in the story well informed? I think he meant the programmer who wanted me to read a big rear end book. I don't doubt that he knew more about Git than I do, but he did a terrible job of convincing me or anybody else on the team that we should give a poo poo.
|
# ? Jun 18, 2015 18:56 |
|
LeftistMuslimObama posted:They have a specific "curriculum" for employees who want to transfer to software development and won't pay for classes outside that. They also won't approve you to leave work to attend classes not on that curriculum. I don't believe they consulted anyone from the University when designing this curriculum, and the CEO has a Master's in math and is nearly 80 so I think she just has no clue that people can get into/enjoy programming without being huge math geniuses. Looking forward to the coming MUMPS horrors you'll be posting
|
# ? Jun 18, 2015 19:36 |
|
quote:The owner of the [Git] repo wants everyone committed into master, and then he merges/branches from there. I just had to explain that the repo owner wants a centralized version control system. When I talk about Git cargo-culting, this is exactly what I mean. People switch to Git without actually understanding what it is, how to use it, or whether it will help them.
|
# ? Jun 18, 2015 20:26 |
|
ratbert90 posted:Those aren't header files. Yeah, I noticed. In a more perfect world, they'd be in different translation units and compiled separately, etcetcetc, but good luck getting there from here.
|
# ? Jun 18, 2015 21:32 |
|
fritz posted:Yeah, I noticed. In a more perfect world, they'd be in different translation units and compiled separately, etcetcetc, but good luck getting there from here. or you compile them using a makefile? There is absolutely no reason to include other C files.
|
# ? Jun 18, 2015 21:40 |
|
Pfft, makefile. You know that project was built with a shell script. And instead of using gcc -o, they used a mv command to rename a.out.
|
# ? Jun 18, 2015 21:46 |
|
ChickenWing posted:variable goes on the left aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Something like this is legal in C code:
|
# ? Jun 18, 2015 21:47 |
|
xzzy posted:Pfft, makefile. You know that project was built with a shell script. Which in itself is a coding horror. My friends coding professor didn't know about -o either.
|
# ? Jun 18, 2015 21:48 |
|
Zopotantor posted:Something like this is legal in C What's happening there?
|
# ? Jun 18, 2015 21:58 |
|
HardDisk posted:
Declaring an int array of size 42, then assigning 'butt' to the 23rd element I think. IIRC, array elements can be pointed to in reverse, so 23[fart] and fart[23] are the same memory location.
|
# ? Jun 18, 2015 22:03 |
|
HardDisk posted:
C array notation is mostly syntactic sugar. The following two expressions are defined to have identical meanings: code:
|
# ? Jun 18, 2015 22:03 |
|
K&R outright states t's possible, but says it's dumb to do for readability reasons.
|
# ? Jun 18, 2015 22:46 |
|
I've donecode:
|
# ? Jun 19, 2015 00:01 |
|
Zopotantor posted:Something like this is legal in C Not a coding horror really, but this reminded me of the 500byte rouge like code. Here's the compressed version which I guess you could say is a coding/reading horror. He only uses variables with one letter to save bytes lol. code:
|
# ? Jun 19, 2015 01:33 |
|
I'm going to blow your mind, Nude: http://codegolf.stackexchange.com
|
# ? Jun 19, 2015 03:25 |
|
GrumpyDoctor posted:ugh ok I know this is an old codebase written by scientists but how bad could it b Is that from an embedded compiler that can't handle linking?
|
# ? Jun 19, 2015 04:01 |
|
Or a poor compiler's whole program optimization.
|
# ? Jun 19, 2015 04:13 |
|
Monkey Fury posted:Looking forward to the coming MUMPS horrors you'll be posting All the good stuff is way too hard to anonymize, sadly. I can say that we have a 20 year old function with 4 lines of code, and nobody knows what it does, but we can't get rid of it because it assumes about 20 variables ad sets about 20 more that are assumed elsewhere, and there's not a great way to trace what it's breaking since it was written before MUMPS had parameters for subroutines or explicit declaration of variables.
|
# ? Jun 19, 2015 04:45 |
|
No, I didn't change this at all.code:
|
# ? Jun 19, 2015 05:40 |
|
xzzy posted:Pfft, makefile. You know that project was built with a shell script. It actually uses pretty normal-looking makefiles! Zemyla posted:Is that from an embedded compiler that can't handle linking? That invoke gcc! I don't know what brought about these particular includes. This codebase also has the extremely rare quintuple pointer: C code:
|
# ? Jun 19, 2015 06:05 |
|
GrumpyDoctor posted:This codebase also has the extremely rare quintuple pointer:
|
# ? Jun 19, 2015 06:09 |
|
To be fair, have you ever actually seen the direct_sun? gently caress it's bright, I'm going back into my basement.
|
# ? Jun 19, 2015 06:27 |
|
GrumpyDoctor posted:It actually uses pretty normal-looking makefiles!
|
# ? Jun 19, 2015 06:37 |
|
Slash posted:No one thought this. Quote from a newspaper Computers, advancing their clocks into the double-zero abyss of the new millennium, will plunge us into chaos. Power grids will fail, elevators will crash and pacemakers will stop midbeat.
|
# ? Jun 19, 2015 06:47 |
|
GrumpyDoctor posted:This codebase also has the extremely rare quintuple pointer: Actually, ***** is quite indirect
|
# ? Jun 19, 2015 07:52 |
|
ratbert90 posted:or you compile them using a makefile? There is absolutely no reason to include other C files. Old MS driver development kits require that all files for a projects are in the same directory. Good luck if you want to share sources between projects, make a static lib or die!
|
# ? Jun 19, 2015 08:41 |
|
GrumpyDoctor posted:This codebase also has the extremely rare quintuple pointer: I ag'ed all of our repos and I'm happy to say I got no hits on this "beauty". Someone seems to be dynamically allocating 3-dimensional arrays, though.
|
# ? Jun 19, 2015 08:47 |
Skuto posted:Someone seems to be dynamically allocating 3-dimensional arrays, though. Apologies in advance, I'm still getting to grips with non-GC'd languages - isn't dynamically allocating a large structure like a 3-dim array the right way to do things?
|
|
# ? Jun 19, 2015 08:51 |
|
omeg posted:Old MS driver development kits require that all files for a projects are in the same directory. Good luck if you want to share sources between projects, make a static lib or die! Of course this would only be a problem on Windows anyway, due to the lack of symlinks.
|
# ? Jun 19, 2015 10:05 |
|
o.m. 94 posted:Apologies in advance, I'm still getting to grips with non-GC'd languages - isn't dynamically allocating a large structure like a 3-dim array the right way to do things? Yes...and no. Because of how C works, allocating multidimensional arrays dynamically quickly leads to the ****p thing. However, note that your computer doesn't *actually* have multidimensional memory. If the subarrays aren't changing in size during the lifetime of the array, then you can just as well allocate a regular array and do the indexing yourself. If some of the last dimensions are small, there's significant benefits to doing so.
|
# ? Jun 19, 2015 11:44 |
TheresaJayne posted:Quote from a newspaper Specifically, an article talking about how people are overplaying the "myth" of a Y2K apocalypse http://www.newsweek.com/why-do-we-buy-myth-y2k-166590
|
|
# ? Jun 19, 2015 11:46 |
|
TheresaJayne posted:Quote from a newspaper Which has gently caress all to say about "Thinking they hadn't been invented", which was your original point.
|
# ? Jun 19, 2015 12:29 |
|
Zopotantor posted:C array notation is mostly syntactic sugar. The following two expressions are defined to have identical meanings: It's cool that it works, but drat, it's ugly.
|
# ? Jun 19, 2015 13:50 |
GrumpyDoctor posted:This codebase also has the extremely rare quintuple pointer: Well it's just best practice. You should never point directly at the sun.
|
|
# ? Jun 19, 2015 15:36 |
|
omeg posted:Old MS driver development kits require that all files for a projects are in the same directory. Good luck if you want to share sources between projects, make a static lib or die! No symlinks no problems.
|
# ? Jun 19, 2015 17:14 |
|
Internet Janitor posted:I'm going to blow your mind, Nude: Thanks for showing me this, very cool stuff.
|
# ? Jun 19, 2015 17:32 |
|
|
# ? Jun 8, 2024 08:24 |
|
Soricidus posted:Of course this would only be a problem on Windows anyway, due to the lack of symlinks. ratbert90 posted:No symlinks no problems. NTFS supports symlinks and hardlinks
|
# ? Jun 19, 2015 20:37 |