|
I see your huge files, and raise you 12300 lines of C code for PNG libary validation[^]. This is just the program that runs the tests. It is full of "interesting" things like parameters named "this" and "that":
static void
image_transform_png_set_palette_to_rgb_set(const image_transform *this,
transform_display *that, png_structp pp, png_infop pi)
{
png_set_palette_to_rgb(pp);
this->next->set(this->next, that, pp, pi);
} Also structure members called "new":
char wname[FILE_NAME_SIZE];
png_store_buffer new;
store_pool write_memory_pool;
For good measure, you should know that:
#define FILE_NAME_SIZE 64
If you are wondering how this can work, check this out:
#ifdef __cplusplus
# define this not_the_cpp_this
# define new not_the_cpp_new Next time you hear the BS about "given enough eyeballs...", show them this crap open-source code.
Mircea
|
|
|
|
|
So in that first method, there is:
const image_transform *this
That's a const image_transform pointer named this!?!
Oy!
|
|
|
|
|
raddevus wrote: That's a const image_transform pointer named this!?! Indeed! But if you look at the #define I mentioned, it turns into:
const image_transform *not_the_cpp_this
And there are many, many functions that all use the this and that parameters. I swear, the guy who wrote this code (John Cunningham Bowler according to copyright notice), had the worst naming system I've ever seen.
Also, if you think this is code from the '80-es or'90-es, you are wrong again, at least according to copyright notice:
* Copyright (c) 2021 Cosmin Truta
* Copyright (c) 2014-2017 John Cunningham Bowler
And this is the code used to validate libpng, one of the most popular pieces of open-source software.
Mircea
|
|
|
|
|
change “this” to “thiz”?
I use “this” and “that” a lot for things like assignment operators, but with the implicit “this”.
|
|
|
|
|
"Take *this job and shove it...
|
|
|
|
|
Maximilien wrote: There's another file in our solution with 46,000 lines !!!
But think how convenient this is since you don't have to go searching in numerous files.
Whoever did that is definitely the square root of genius.
|
|
|
|
|
I have programs, that will concatenate text files; just so I can browse "the whole thing".
I may "globally" change the whole thing; then split it back into its components; particularly when I'm doing a conversion of sorts.
I'm inserting meta data as I'm doing this; so that everything that follows becomes trivial.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
20 years ago...
The C++ class had at least 100,000 lines of code. I say at least because besides the include file there were three different code files (which is possible in C++). It is possible there were others.
There were at least 200 class attributes and at least 200 methods. Obviously the methods were not small.
Design patterns because a thing after that and soon after that one saw "AntiPatterns" (the book by that name.)
And so I learned what a God Object is.
|
|
|
|
|
I get C# code
In my C++ program
My language problems
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
That's why I _typescript_s to _go_ for the _perl_s and not to _rust_ that _swift_
|
|
|
|
|
Quite a few years ago, one of the recognized gurus remarked about Fortran that "I am not sure whether it it part of the problem set or the solution set".
I must admit that I sometimes have similar thoughts about C (++).
|
|
|
|
|
I used to feel that way about C++, until it seduced me with template and constexpr and now I can't seem to extricate myself from the dark side.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
found a bug in my code . somehow it went away by itself . hopefully it won't return .
Bugy-Code.jpg[^]
|
|
|
|
|
haha... I wonder if the hard-coded path to a file in a specific user account on your C: drive will become a future bug?
|
|
|
|
|
it is not hard coded . it is merely an expansion of the C++ __FILE__ macro .
|
|
|
|
|
Is it a bug or a feature*
*Whether its time for disinfecting the office.
|
|
|
|
|
BernardIE5317 wrote: somehow it went away by itself . hopefully it won't return . recompile just in case...
and if it comes back... try to fix it, not to hit it. I am not sure if your monitor or your keyboard would like it.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
You're not the first : World’s First Computer Bug
"A little song, a little dance, a little seltzer down your pants"
Chuckles the clown
|
|
|
|
|
You need a dark mode because light attract bugs....
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
I've been on this site for nigh 2 decades. The honesty has always been concerning, refreshing and challenging. Many of us have been here so long, we are either reaching or have reached the end of our "careers" - whatever the hell that means. For me, my career has been running out of mouths to feed before running out of money. Setting humor aside... I'm 64. Here comes the question...
How are you sleeping?
I tend to crash around 10 or 11. But if I've been thinking about something, within a few hours I am wide awake. It's a little after 3am EST. Is this an age thing? Don't go medical on me - I'm just looking for general thoughts. I have a bottle of melatonin - meh. I tried a bottle of sleep aid from Costco (never again). This is border line (to be honest, probably well past) sleep disorder which is weird for me. Meanwhile, I hate my wife She's snoring within 5 minutes and has an internal alarm clock for 5am...
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
My wife and I have it the other way around.
|
|
|
|
|
Too much information!
|
|
|
|
|
Quote: I tend to crash around 10 or 11 Me too. But then I sleep deeply, until the alarm clock rings (at 6am).
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
yeah, that sometimes happens for me. If I set the alarm for whatever reason, I'll wake up 2 hours before, 1 hour before, 30 minutes before, elephant this. It's now 340AM EST and screw it, I'm starting work
I suspect I need a lot more exercise/physical labor. Covid - the social phenomena - was not kind to me.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|