|
Not having -Wall be the default is also a horror. Well, maybe "horror" is a little strong, so how about "questionable."
|
# ? Feb 8, 2010 02:18 |
|
|
# ? May 15, 2024 12:27 |
|
Where I work, none of the builds use -Wall because "it prints too much noise". Then they go and do stupid poo poo like (guess what happens when input is "-10"): code:
|
# ? Feb 8, 2010 04:19 |
|
Janin posted:Where I work, none of the builds use -Wall because "it prints too much noise". -Wall -Wextra -Wfloat-equal -Wshadow -Wunsafe-loop-optimizations -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Winline -pedantic If you want really noisy output try the ICC compiler, warnings 981 "operands are evaluated in unspecified order" and 2259 "non-pointer conversion from "*" to "*" may lose significant bits" are crazy.
|
# ? Feb 8, 2010 04:38 |
|
insure++ warns (warned?) about not saving the return value from printf
|
# ? Feb 8, 2010 04:58 |
|
fritz posted:insure++ warns (warned?) about not saving the return value from printf That's where you end up with all the lazy developers doing inane hacks like void casting returns: code:
|
# ? Feb 8, 2010 05:23 |
|
Janin posted:Where I work, none of the builds use -Wall because "it prints too much noise".
|
# ? Feb 8, 2010 15:00 |
|
BigRedDot posted:This is true for most of our code as well. By the way we write software for submarines. Get a Buildbot and a person who hates the color orange and gradually add -Whatever options to the Buildbot.
|
# ? Feb 8, 2010 15:01 |
|
Avenging Dentist posted:Get a Buildbot and a person who hates the color orange and gradually add -Whatever options to the Buildbot. Or simply automate a process to collect the warnings, svn blame to get the developer from the file and line number and email them the relevant lines from the error log. Bonus points for one email per line with a warning.
|
# ? Feb 8, 2010 15:48 |
|
Avenging Dentist posted:Get a Buildbot and a person who hates the color orange and gradually add -Whatever options to the Buildbot. Edit: zombywuf I want to hug you
|
# ? Feb 8, 2010 15:52 |
|
There is literally no reason you can't use Buildbot, since fundamentally, it just runs shell commands.
|
# ? Feb 8, 2010 15:57 |
|
Avenging Dentist posted:There is literally no reason you can't use Buildbot, since fundamentally, it just runs shell commands. You'd be amazed how unmanageably complicated people can make build systems. There is a tendency to reduce the build process to a single command which either returns yes or no, and then unwind that whole process to get at error messages while keeping it exactly the same.
|
# ? Feb 8, 2010 16:18 |
|
BigRedDot posted:This is true for most of our code as well. By the way we write software for submarines. High-five "terrible standards for important software" buddy! I always find it amusing that open-source developers have long arguments about whether to use -Werror or not, when companies with millions of dollars to lose are like "gently caress it, if it doesn't crash more than once an hour or so, ship!". Zombywuf posted:Or simply automate a process to collect the warnings, svn blame to get the developer from the file and line number and email them the relevant lines from the error log. Hah, I wish we were using anything as sane as Subversion. Our VCS has no CLI; its only interface is graphical, written in Java Swing, and uses over 200 MiB RAM (from a 1 GiB VM) when idle. The VM is another funny thing. Everything we do -- editors, builds, the final product -- runs on Linux. But IT wants to keep Windows on the computers. So every developer has installed Linux in a VM and usually just keeps it full-screen all day. Zombywuf posted:Bonus points for one email per line with a warning. *does this* *gets fired for crashing the email server*
|
# ? Feb 8, 2010 16:48 |
|
Sooooo anyone ever use Xilinx ISE?
|
# ? Feb 8, 2010 17:05 |
|
Janin posted:Hah, I wish we were using anything as sane as Subversion. Our VCS has no CLI; its only interface is graphical, written in Java Swing, and uses over 200 MiB RAM (from a 1 GiB VM) when idle. What is the name of this horror? It sounds unbelievable. Stories like these make me glad to be in academia. Do people set up incredibly awful things? Sure, but they normally can't force you to do the same.
|
# ? Feb 8, 2010 17:07 |
|
Janin posted:Hah, I wish we were using anything as sane as Subversion. Our VCS has no CLI; its only interface is graphical, written in Java Swing, and uses over 200 MiB RAM (from a 1 GiB VM) when idle. All Java programs do this.
|
# ? Feb 8, 2010 17:20 |
|
Athas posted:What is the name of this horror? It sounds unbelievable. I don't want to name it 'cause it might show up in Google; not many companies use it, obviously. It's owned by IBM, isn't ClearCase, and has a Wikipedia page.
|
# ? Feb 8, 2010 17:30 |
|
Zombywuf posted:Or simply automate a process to collect the warnings, svn blame to get the developer from the file and line number and email them the relevant lines from the error log. I work with BigRedDot, and I have emailed people about warnings and bugs before. Never has an email I sent out about a bug or warning resulted in the bug or warning being fixed. And every time I've fixed a bug or warning in a library I didn't initially write, it's caused my boss to respond with, "you shouldn't be wasting your time with that. Don't compile with -Wall. If the warning isn't on by default then just ignore it." My boss is the guy who created our build system. Features of our build system:
|
# ? Feb 8, 2010 17:31 |
|
Lexical Unit posted:Features of our build system: Could be worse. You could be using autotools.
|
# ? Feb 8, 2010 18:17 |
|
Zombywuf posted:All Java programs do this. Swing apps do, ours start at 24 megs (that's a lot too, agreed) and never pass 300 megs. Then again, our Java apps don't plain suck as apparently a lot of others' do...
|
# ? Feb 8, 2010 18:42 |
|
Avenging Dentist posted:Could be worse. You could be using autotools. BigRedDot fucked around with this message at 19:41 on Feb 8, 2010 |
# ? Feb 8, 2010 19:35 |
|
Parantumaton posted:Swing apps do, ours start at 24 megs (that's a lot too, agreed) and never pass 300 megs. Then again, our Java apps don't plain suck as apparently a lot of others' do... 24 megs is nothing, 300 megs could be a problem on a low-end machine.
|
# ? Feb 9, 2010 07:52 |
|
Wheany posted:24 megs is nothing, 300 megs could be a problem on a low-end machine. Depends if all the programs on your system think 24MB is nothing.
|
# ? Feb 9, 2010 13:31 |
|
Zombywuf posted:Depends if all the programs on your system think 24MB is nothing. Well, if every background process and service running on this machine would take 24MB, I would be at about 1,5 GB. It would not be pleasant, since this machine only has a gig of RAM. Then again, computers with 2 GB RAM is not exactly rare these days.
|
# ? Feb 9, 2010 14:27 |
|
Edit: Replied to Zombywuf without realising.
|
# ? Feb 9, 2010 14:28 |
|
Wheany posted:Well, if every background process and service running on this machine would take 24MB, I would be at about 1,5 GB. It would not be pleasant, since this machine only has a gig of RAM. If only there were some way to temporarily store the contents of RAM on your hard drive while they weren't being used!
|
# ? Feb 9, 2010 17:09 |
|
markerstore posted:If only there were some way to temporarily store the contents of RAM on your hard drive while they weren't being used! But there is, and you know there is
|
# ? Feb 9, 2010 17:13 |
|
Pardot posted:But there is, and you know there is Hey some of us don't have your crazy GIGABYTE drives installed. I'm working on a machine with 4GB RAM and only 640MB disk drive.
|
# ? Feb 9, 2010 17:22 |
|
markerstore posted:If only there were some way to temporarily store the contents of RAM on your hard drive while they weren't being used! Like I said: "It would not be pleasant, since this machine only has a gig of RAM." And besides, I was the one arguing that 24MB is nothing.
|
# ? Feb 9, 2010 17:29 |
|
markerstore posted:If only there were some way to temporarily store the contents of RAM on your hard drive while they weren't being used! I think there is a way of doing that, I believe the mechanism is called thrashing.
|
# ? Feb 9, 2010 17:38 |
|
Wheany posted:24 megs is nothing, 300 megs could be a problem on a low-end machine. Our software supports millions of users per day and are generally run on clustered servers (mostly because clients demand it) so 300 megs is nothing to us.
|
# ? Feb 9, 2010 18:22 |
|
Parantumaton posted:Our software supports millions of users per day and are generally run on clustered servers (mostly because clients demand it) so 300 megs is nothing to us. I just took a look at a price watch site and listed their computers by price. The cheapest computers were nettops that had 1 GB of memory. There was one thin client that had 512MB, and a bunch of "media" computers that also had 1 GB. Pretty much any "real" desktops these days come with 2GB, often 3 or 4 gigs. I'd say memory usage on software designed for a desktop computer (or higher) is not that big of a worry these days. Memory leaks are of course a different matter. e: (I'm not disagreeing with you.)
|
# ? Feb 9, 2010 20:37 |
|
Probably already been seen, but at work I ran into: true = 1; false = 2; admittedly it was to be able to use matrix math, and the labels didn't mean anything. But in matlab they're keywords.
|
# ? Feb 10, 2010 07:46 |
|
The Coverity guys have seen more bad code than anyonequote:Upon seeing an error report saying the following loop body was dead code quote:a buffer overflow checker flagged a bunch of errors of the form quote:the following in the X Window System:
|
# ? Feb 10, 2010 10:34 |
|
Bozart posted:Probably already been seen, but at work I ran into: I was working with an annoying C library a while back that defined its own FALSE and TRUE constants. I wanted to use those names on my own, so I ended up with code:
That one took me a while to find, let me tell you.
|
# ? Feb 10, 2010 10:39 |
|
Bozart posted:Probably already been seen, but at work I ran into: In visual basic, true = -1 and false = 0
|
# ? Feb 10, 2010 12:32 |
|
tef posted:In visual basic, true = -1 and false = 0 A lot of Forths are the same way.
|
# ? Feb 10, 2010 12:47 |
|
tef posted:In visual basic, true = -1 and false = 0 #define TRUE ~0
|
# ? Feb 10, 2010 13:52 |
|
ZorbaTHut posted:I was working with an annoying C library a while back that defined its own FALSE and TRUE constants. I wanted to use those names on my own, so I ended up with quote:Another technique is to make TRUE and FALSE have the same value, though most would consider that out and out cheating. Using values 1 and 2 or -1 and 0 is a more subtle way to trip people up and still look respectable.
|
# ? Feb 10, 2010 14:46 |
|
Honestly modern languages are pretty wasteful defining FALSE as 0 and TRUE as 1. The smallest addressable unit you have to work with is a byte, so you've got at least seven other bits just sitting there, empty and wasted. You could do the ol' FALSE = 0 and TRUE = ~0 trick, but then if your Boolean values aren't evenly distributed, your computer's memory runs the risk of being way too light or way too heavy, and that's not good for the hardware. Or for anybody. So really the best way is to define FALSE=0xAAAAAAAA and TRUE=0x55555555 (adjusted to the natural word length of the processor, of course). Then FALSE = ~TRUE still holds, but more importantly your Boolean values are nicely balanced with an equal number of set and clear bits. It's the yin and the yang, man. Groovy.
|
# ? Feb 10, 2010 16:34 |
|
|
# ? May 15, 2024 12:27 |
|
code:
|
# ? Feb 10, 2010 19:23 |