Jul 20 23:16
"Obvious", "Self-evident" code has a future. "Gnarled" code is already 'terminal'...
Jul 20 23:12
Sure, things can be compressed and convoluted and MIGHT run 2% faster... If that's needed, then "over-clocking" would be a more beneficial pursuit than one instance of an un-parse-ible chunk of source code that no-one want to touch. KISS!
Jul 20 23:10
Salient point, "when certain patterns can be detected"... I've received review comments that boil-down to "don't try to be smarter than the compiler; you aren't!!". I'm not pretending that I know and could tell the difference between "pattern" and "mayhem". But, in these golden years, I've come to learn that "simplicity" is the better path.
Jul 20 22:59
On const/constexpr, I hardly ever use 'const' but I know that, apart from its API 'contract' meaning, I've been told the compiler can emit 'better' code, if that is the objective. (For me, I just like playing with algorithms from the past, or those I've only read about... My code hangs on my wall, not in a public gallery. That's good enough for me. :-)
Jul 20 22:56
I recommend leaving 'pride' outside the door, and seeking to grow and learn and change from any feedback. There are always alternative ways, and we all have our "favourite techniques", etc. Seek clarification if needed (feedback unclear to you), but see it for what it is: free advice from others who have different experience who are sharing that experience with you.
Jul 20 22:51
You've posted this code that performs a function and received some feedback. Forgive me for going off topic, but you've shown a tendency to "push back" against some of that feedback... We are ALL proud of our handiwork, and our pride suffers a scrape when it's subjected to (constructive!) criticism...
Jul 20 22:48
From reading many SO and SE/CR posts I've 'picked-up' that modern compilers and processors perform many "black magic" tricks to speed-up execution (branch prediction is one example), but these are designed by the wizards with 3 PhDs to engage when certain patterns can be detected in source or machine code.
Jul 20 22:45
@bruno When I write a self-contained program (for my own use, and tends to always be C), I'm casual and rarely add qualifiers (e.g. static, const). And, I'm not fussed with shaving mS off execution time.
Jul 19 20:57
(PS: My first "Hello World\n" ran in Sept, 1978 on Unix System V on a PDP 11/34 with a 80x24 VDT that weighed 500Kg. Used "ed" to write code... "vi" sucked up ALL the processor cycles... Those were the days! :-) (And I had hair back then, too!)
Jul 19 20:55
Since "preprocessor" has been brought up in this answer, I'll add this here... Of the 3 compile line defines (-Dfoobar), 2 really want to be CLI parameters to the program. 'Draw' and 'Count' are user runtime options, not different binaries... I've not gone deep enough to determine if board dimension(s) might also be better as a CLI runtime parameter... Perhaps ALL parameters should be in some text file (JSON-like??)... Just a thought.
 
Jul 5 00:29
@DarkCygnus Top voted answer: "Get help. Don't bark up wrong trees. Don't show lack of confidence." I can't see any OP stressed to the point of posting what has been posted find any value in those three responses... Superficial... Like biting into a profiterole: insubstantial.
Jul 5 00:29
@DarkCygnus "currently -7, that surely tells you something right?" No... Not really... What do you think that -7 means? The currently +18 answer comes from a ~25K rep pt user who didn't know what CM meant, and, apparently, was helpless to figure out how to answer his/her own question... Seriously, what does any of this mean?
Jul 5 00:29
@Job_September_2020 No question should go unanswered. From Google: " Community Management Department (sometimes referred to as the Community Team or CMs) are employees of Stack Exchange the company."
Jul 5 00:29
@DarkCygnus I don't get to drive the boat, so this is just FYI... The 'chatroom' discussion linked from below my answer bears the original title, not the revised one. Further, by altering the words, future SE searches may not find all possibly relevant Q&A in the repository... Finally, recall that "fight or flight" situations are not met with a great deal of time and clear thinking. Pausing to think of synonyms or euphemisms may not be a high priority to one who is feeling stress.
Jul 5 00:29
@DarkCygnus Just my opinion: Sanitising the OP's question to avoid 'triggering' people may be the worst thing to have done. People want to be heard, not "made palatable". Even Trump dropped an F-bomb on camera just outside the White House when talking about the leaders of two countries...
 
Jul 1 06:39
How many readers, to this point, understand, or have asked Google to explain, the metaphor of Sarah's lyrics, "Winter in July"... It applies to the northern hemisphere. Here in Oz, there's nothing metaphorical about it... :-)
Jul 1 06:21
Again, my answer seems to be at odds with the opinion of some members of this community. Life's a bitch... for the community. I cannot walk past this OP, maybe tossing a buck into their cup to assuage MY conscience, and carry on with my day.
Jul 1 06:18
Generic responses: "Seek help", "Be confident", "Are you trying hard enough?", "Are you knocking on the right doors?", "VTC - not in scope", are all self-evident, and unhelpful, practically speaking, even to the individual who has reached out here for suggestions.
Jul 1 06:09
Even oxygen is toxic high concentrations, but 'something must be done', and this OP would one-way-or-the-other benefit from "getting out of themself for a few hours of positive interaction, no matter how superficial, with real people around them.
Jul 1 06:06
From Lived Experience, I can state that "obvious solutions" like "seek help" and "have you checked if the Car Wash is hiring?" are not novel ideas to the sufferer. In my experience, useful advice is 'forgotten' ways to stoke ones' own self-esteem, confidence and connection to other people. The 'shutting-in' self-protection reflex has gone into overdrive causing an extreme narrowing of focus and filtration of senses that has become unhealthy.
Jul 1 05:56
You've had legal experience. I've had experiences being in very dark places while under stress from external factors.
Jul 1 05:53
It's impossible to properly and correctly assess the gravity of the OP's distress, mentally or financially.
Jul 1 05:51
@TheDemonLord The 'S word' is not a toy to be played with, and in cyberspace we must be careful to credit that its reference is genuine... I've been in situations that required forethought and delicacy. Simple example: walking slowly toward, talking gently to a young child who is too close to a busy road. Too sudden a disturbance may cause the worst result.
Jun 30 19:44
Success is whatever you think it is.
Jun 30 19:43
Even without billions of dollars in the bank, I'm not loathed by others as those persons are.
Jun 30 19:42
End of Tommy (incl. credit roll) To my way of thinking, one should try to milk inspiration from wherever one finds inspiration. Shooting at pixels in a video game for valueless 'virtual points' does not seem to me to be life affirming. Laughing at ourselves over coffee with a friend or neighbour just feels good, and makes the afternoon's chores less of a problem, and more of a meditation; a reflection on how Life's been good to me...
Jun 30 18:51
The DVs don't really bother me. If anything in this answer is wrong or even "rings false or un-doable" I'd welcome constructive criticism. If it's just "Nah.." followed by a DV, then so be it... The world is made up of lots of different kinds of people...
Jun 30 18:48
One more thing about "what/where is real?" Are you old enough to remember 'Dear Abbey' or sister 'Ann Landers'... Many/most of us need a boost in life from time to time, but shy away from 'showing weakness' to those we interact with in real life. Anonymity is comforting, especially when feeling down or desperate... And, imho, what one is looking for while anonymous is "How can I get started fixing things?"
Jun 30 18:40
In 2025, neighbours in cyberspace are more REAL than the bags of protoplasm a few metres away...
Jun 30 18:39
I'm well aware that any talk of "the big sleep" is consequential and needs delicacy in any response.
Jun 30 18:38
Hi... I cannot call the OP's fire department. All I could do is tell the OP to run back into their burning house and call the fire dept. themself... Whoda thot?
Jun 30 18:36
@Anketam I don't mean to rubbish, in any way, that other answer. However, from experience, that answer merely states what the OP likely already knows: 1) get help, 2) question if you're barking up the wrong tree, 3) "don't come across as desperate" which answers the OP's "how to not appear desperate?" with "don't!"... Great answer, eh?
Jun 30 18:36
@Anketam I'm looking for your DV and feedback comment to the answer provided by #job_sept_2020 that, although true, rings hollow to my ears. Having been in approximately the same headspace as the OP (each of us is unique!) I feel well equipped to provide some advice/perspective that may lead the OP to seeing they can bring themself to understand that they may turn things around or that they could find help to do so... It's a slippery slope, and sterile advice is available on the sides of passing buses. Fixing on a role model (Hawking, Nash, Mandela) may be the impetus and fuel to fix things.
Jun 30 18:36
@Anketam "crazy", alone, returns 805 Q&A current entries in the repository... I have no interest in pursuing that line of research any deeper. Over to you...
Jun 30 18:36
@Anketam "Lawyers..." Many of those answers start off with IANAL, then go on to give an opinion or an assessment or an alternative perspective... It may be shaky ground to criticise based on precedents... Because so many contradictory examples can/could be found, such 'precedents' may not hold up in court.
Jun 30 18:36
@Anketam "Community"... If my neighbour bangs on my door shouting their house is on fire, I don't tell them I'll be over on the weekend, as usual, to use the smouldering ruin for our frequent bar-b-que get-togethers, then close my front door in their face. Crediting that this OP feels any degree of the implicit/explicit distress, "dress smart and sit up straight" isn't gonna help. "Show them your strengths, not your weaknesses." Applies to interviews and to Life. OP can practice this with any/every encounter in the lead-up to any interviews booked.
Jun 30 18:36
@Anketam So, what you're saying is that any "SE Community" is and has always been a misrepresentation, a marketing ploy. Thank you for the clarification...
Jun 30 18:36
Jeepers! I sure wish whomever in this community clicks DV would come forward to express the 'whys and wherefores' triggering their displeasure... They don't have to; that's how SE works... However, the 'anonymous & truncated' feedback of a casual dismissal serves little purpose, in my opinion. "Say it to my face."--Kamala Harris My door's always open...
 
Jul 1 06:36
@TooTea FWIW: "Agencies" instead of "Principles" advertising vacancies has been a plague on the job market here in The Sun Burnt Land for over 30 years. Often less-than-competent middlemen have successfully inserted themselves between 'woo-ers' and 'woo-ees', like madams at bordellos or another allegory even less flattering. It's evolution, and the old nugget applies, "Adapt or perish". Individually, one must play the game their way or leave the game. Just to say, McDonalds outlets usually have high rates of staff attrition. Ascending is pretty much guaranteed.
Jul 1 06:36
@HappyIdiot Thanks. Following your proposal of a "computer matching bureau", the 'sarcasm' of "if only the really quailified..." and "Right?" went over my head. Mom always harped at me to "stop slouching and sit up straight". :-) Besides, concentrating control over any process will lead to corruption and abuse. Especially if it's run by any humans.
Jul 1 06:36
@HappyIdiot Careful. The Third Reich sought to implement a eugenics breeding program to "protect and purify the blood of the race..." Only the best would be allowed to mate with one-another. These things tend to be frowned upon in our societies... (I don't know when the concept of 'Hybrid Vigour' was conceived.) "The best laid plans of mice and men, aft gan aglee." --Robbie Burns
Jul 1 06:36
@HappyIdiot A tale -just some ancient lore- passed down from my distant ancestors tells of overhearing one of the members of a school of salmon lamenting as the school swam toward the mouth of a river, "Wouldn't it be nice if we didn't have to struggle back UPSTREAM through all those rapids and falls to breed. A lot of us won't make it, and we shouldn't we be thinking of our brothers and sisters. Oh! Look! That eagle extending its gripper-things. Think I'm gonna accept his offer of a free ride. See y'all up in the ponds at the top." Moral: "Fools rush in where wise men fear to tread."
 
Jul 1 06:34
@Questor "It is StackExchange... I'm pretty sure most of the people here got here from StackExchange" Thank you for making my point for me. "Attention to detail (for IT)" This is only a social media comment dialogue, and I'm fairly confident you meant "StackOverflow" at the end of that, AND that we all are human and prone to air... I mean heir... Oh, sh*t!! ERR! dammit! :-) To your point, again IT relevant, any presumptions made will each add 10-20% to costs (time) of any project. We cannot presume the OP's field.
Jul 1 06:34
@Aubreal There's a strong IT aroma to this Q&A. Might not be the OP's realm of interest. If it is, well... What sets an excellent coder above a merely good one is, "Attention to details, even if not relevant at this juncture." Winnowing and whittling down to have more focus is important, of course, but "overlooking a nugget when panning for gold, washing it out of the pan back into the river" means going hungry because of your own haste... Quality work takes time. Give it all the time it needs or it's no longer 'Quality work'.
 
Jun 10 12:46
@WasabiThumbs I'm burying this in the comments, rather than another 'edit' that tends to draw attention... In light of all of your response some hours ago ("Genius! ...") there should be a frequently used section to most of these Q&A... RTFM!! Don't sweat it. We're ALL subject to brain-farts (more frequently as the years, then months, and more recently DAYS go by... sigh...) Thanks for providing fodder for the mill... Cheers!
Jun 10 12:46
@PeterCordes It's nice to "be around" really smart people who also have (and aren't afraid to show) a GREAT sense of humour... Just a bit of appreciation... :-)
Jun 10 12:46
@CiaPan As I noted in a comment above, 'T' was intended as no more than a "wild card" for the appropriate data type. Having 'scolded' the OP about void *, I should have gone with unsigned char * to replace that 'T'... Sorry to cause a fuss... In fact, I'd prefer uint8_t *, but that would open another kettle of fish outside the scope of the question. Hopefully, ChatGPT will develop heartburn if/when it swallows these 4 lines of code... :-) Cheers!
Jun 10 12:46
@PeterCordes You're supposed to reply, "Meep-meep", just like the Road Runner in those cartoons! :-)
Jun 10 12:46
@PeterCordes I feel like I'm putting-along in my ancient Volkswagon beetle looking up at the vapor trail overhead behind an A380 that's headed to the same destination... Wow!! Glad that you've added that answer for all to learn from! Now, back to worrying if I'm about to run out of gas down here... :-) (putt-putt-putt...)
Jun 10 12:46
@WasabiThumbs The best part about being a genius is its concommitant accuracy... You rarely miss when you shoot yourself in the foot... :-)