Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
That Turkey Story
Mar 30, 2003

Plorkyeran posted:

The problem with logging frameworks is that they always seem like such complete overkill at the beginning of a project when you can do everything you need in ten lines of code... and then a year later you're up to a few thousand lines of code that reinvents badly 90% of a good logging library.

This is true of just about every library, not just logging libraries.

Adbot
ADBOT LOVES YOU

That Turkey Story
Mar 30, 2003

Plorkyeran posted:

Eh, it's only really true of large libraries that solve problems that on the surface seem like they should be small problems.

I guess, but on the other hand, when a library is small I often hear a similar but opposite rationale to avoid it, perhaps especially if the problem is seemingly simple:

Why would I use <some small library>? It's simple enough that I can replicate its capabilities with a handful of functions without pulling in a dependency.

Really, in my experience it's just difficult to get people to use a library period. I spend a lot of time bug-fixing or rewriting functions of freely available libraries for projects because people don't want to use them, even if the quality is high and licensing is free of restrictions. The size of a library is often referenced whether large or small.

That Turkey Story
Mar 30, 2003

911.php was an inside job.

That Turkey Story
Mar 30, 2003

astr0man posted:

As someone who used to do RE for a living, I can say with a certainty that it is easier to reverse C code than it is C++.

Yeah. If all C++ had over C was the addition of function overloading it would make things easier, but there's just so much complexity in C++ that in general I can't imagine it's easier overall.

That Turkey Story
Mar 30, 2003

Zhentar posted:

And that's even before the crazy compilers go mucking things up.

GCC apparently has some optimization for std::basic_string where it will pass around a pointer to the char buffer, rather than the start of the object; accessing the other member variables ends up being a negative offset rather than positive, as you'd expect. This lets it pass the string to functions taking a char* without any math.

libstdc++ used copy-on-write, but now it's pretty much universally accepted that the small string optimization is best in the general case.

That Turkey Story
Mar 30, 2003

Suspicious Dish posted:

How is StopIteration an exceptional circumstance?

I really, really, really, hate this. I don't know why they use exceptions for this kind of stuff. Exceptions make sense for functions that can't reach their post-conditions and not much else. It's embarassing that so many languages and libraries use exceptions for basic control flow.

That Turkey Story
Mar 30, 2003

Suspicious Dish posted:

Dear people who care about open-source: please do not submit issues containing the pettiest garbage I've ever seen.

It's not petty and these are valid criticisms/bugs. Sorry you like encouraging poor code.

Adbot
ADBOT LOVES YOU

That Turkey Story
Mar 30, 2003

Jewel posted:

I forgot we talked about this DON'T START ANYTHING we've done it before see this post if you want to see the discussion on it. Move along :allears:

I was just about to link that.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply