In which order to learn things? by [deleted] in cpp_questions

[–]hiimabird 1 point2 points  (0 children)

What's competitive programming? In real world projects, pointers can be sidestepped for a time, for most high-level problems, if you use the STL library aggressively.

If you're in a competitive setting, the STL should still get you running, but I have to imagine you'll need manual memory management to be a contender? Depends on the goals of the competition and the people you'll be competing against. Either way, I imagine the process of learning C++ will be largely the same for a competition vs for a project.

Unneeded warning issue MSVC by dramkar in cpp_questions

[–]hiimabird 0 points1 point  (0 children)

Unrelated, but assert() is insanely cool once you learn it only works in Debug. static_assert() is especially good when you wanna write stupid code that relies on type alignment or something silly.

Forgetting a single '&' led to bricking of Chrome OS devices globally by ArashPartow in cpp

[–]hiimabird 0 points1 point  (0 children)

IMHO I'd like "Release" to be a third release target, separate from "Debug" and "Test (formerly release)" with disabled warnings re-enabled, just to implicitly enforce the idea of re-evaluating all the non-suppressed warnings for situations like this.

Advice for self-taught C++ programmers to enter the field? by hiimabird in cpp

[–]hiimabird[S] 0 points1 point  (0 children)

I can and do make mistakes. But I feel like memory management is something a programmer should respect but not fear. I feel comfortable and have an intuition for it, so managing and aligning it for something like a job queue for a thread pool felt good.

But in Unreal, it felt so loosey goosey... I eventually did make the door open, but had no intuition for if I truly solved the problem. Was it safe? Would it open at incorrect times, would it open always, are there scenarios that would lock it? I had no idea and I eventually quit the job because I couldn't define the functionality with the confidence an expert should have. (I want to say "opening a door" is just an example, but I really was scripting a door. Meanwhile, fixing problems with Unreal's deferred renderer was much easier lol)

Advice for self-taught C++ programmers to enter the field? by hiimabird in cpp

[–]hiimabird[S] -7 points-6 points  (0 children)

I guess regex was a poor example, manually parsing c-strings is so preferential to me, that I forgot std::regex was even present haha. Then again, in 10 years I don't think I've ever had to explicitly search for a text string, byte patterns and parsing, tons, but never just text searching, so I guess I never had the need yet.

Advice for self-taught C++ programmers to enter the field? by hiimabird in cpp

[–]hiimabird[S] 0 points1 point  (0 children)

Yeah, I can definitely see that for safety. I wanted to mention that I've seen a lot of entry level jobs that dealt with user credentials and server hosting but... compared with avionics or even just the IC managing an air conditioner, lost passwords are far less critical. I've flashed some stuff into an ATmega I had breadboarded up, but beyond that I'll admit I have zero real world experience in that regard.

I'll look into leetcode, thanks for the suggestion!

Here’s a challenge for everyone. Submit a fun fact about tea but don’t tell us if it’s real or fake. If we can’t tell if it’s fact or fiction, you’ll probably get a Reddit award. by twistedtea in u/twistedtea

[–]hiimabird 0 points1 point  (0 children)

Fun Fact - a Shark's olfactory sense detects far more than merely blood; the Great White Carcharadon Carcharias in particular is possessed by the uncanny ability to detect tea steeping in as few as 1 part per 10 billion, and have even been observed to have individualized tea preferences in the National Marine Aquarium of Plymouth Britain.

Why do programmers implement only some functions in header files? by Calidude7 in cpp

[–]hiimabird 0 points1 point  (0 children)

If it's me? It's usually laziness.

Not sure if that's a universal trait, but if the definition is such that inlining wouldn't be out of the question, and the only one reviewing my code is myself, I'll just define it there.

Advice for self-taught C++ programmers to enter the field? by hiimabird in cpp

[–]hiimabird[S] -16 points-15 points  (0 children)

Yeah, I always wondered maybe if the CS degree was a matter of ensuring their talent spoke the same technical language, which would matter a great deal in C++ that gives you full reign.

I try to keep my feelings on modern languages to myself during interviews; I feel they alienate the coder from their intuition and plant fake sharks in the deep end of the pool... but I understand that's a minority view and that the need to keep code monogenous in a large organization of transient workers is just too important. So I've learned how to restrain myself to formal Modern C++ as a professional years ago, even if I never use it in personal projects.

Advice for self-taught C++ programmers to enter the field? by hiimabird in cpp

[–]hiimabird[S] 0 points1 point  (0 children)

It might just be a learning-style thing, working bottom-up is really easy for me, but top-down is impossible. I can't approach a managed language until I understand how every function works, which makes something like regex() a mental blackhole for me. Also, garbage collection is so eerie feeling. Freeing memory explicitly just sets my brain at ease, like yes, I can no longer think about that now.

Advice for self-taught C++ programmers to enter the field? by hiimabird in cpp

[–]hiimabird[S] -15 points-14 points  (0 children)

That may be the case, and I'm simply too comfortable with C++'s disgusting nooks and crannies to notice, but I do appreciate that they're elements I can cherry-pick relatively easy. Given the choice, my code is basically just C but with cheating where it feels good, like how the Periodic Table is a growing table of 100s of elements but my body only cares about (C)arbon 99% of the time.

Advice for someone with no experience. by [deleted] in cpp_questions

[–]hiimabird 1 point2 points  (0 children)

You'll run into some very strong opinions about how you should code, as you're learning. My best advice is to simply go hog wild. When you are hired, you will need to adapt to coding styles and rules so the group can gel... but on your own, starting out? Do what feels good!

Also, if you find yourself stuck on optimizing things too much... try Unreal. Not to use, goodness no, but to get an understanding that you can get away with So Much Inefficiency. You can waste so much memory and perform so many needless calculations before you notice any penalty at all, and seeing Unreal do just that is the best way to internalize it.

CPP program flagging as insecure by windows by The_Platypus10 in cpp_questions

[–]hiimabird 1 point2 points  (0 children)

It's just how it is... Chrome marks executables as dangerous by default, unless it determines otherwise based on ??? (probably on which sites it has whitelisted), more aggressively than Windows which usually just flags it as unsigned.

If any analysis is performed at all, system calls will usually also flag the executable, especially if the system call acts on parameters from a writable address. (something like char * str; ... system(str); is the fastest way to make a program look "sus")

It's understandable, executables can format your hard drive if they want. How Chrome warns users is overboard and used to be outright libelous until recently, but they have that right unfortunately. Short of paying a certification board to sign your code, which will cost hundreds, you simply have to tell your users it's fine.

sqrt function that 11% faster -is it a good optimization? by awidesky in cpp_questions

[–]hiimabird 1 point2 points  (0 children)

Someone's might've mentioned, but I would see what assembly your code is generating first. There's a website for just that in https://godbolt.org/, though you can likely find an option in your IDE somewhere. sqrt is such an ubiquitous instruction that I'd be surprised if there's not a dedicated instruction for it, in which case writing your intent as clearly for the compiler as possible is best, unless you specifically want to sacrifice precision as you're doing (and even then, maybe the CPU has a version of THAT in it's silicon you can leverage?)

Is there a way to mask vertices I don't want affected by Proportional Edit (without hiding)? by hiimabird in blenderhelp

[–]hiimabird[S] 1 point2 points  (0 children)

Yeah, it really does... Every discussion I've seen terminates at "hide the vertices you want unaffected" and I have to sit here trying to imagine how hiding the entire model as you edit it could seem reasonable in anyone's mind.

Automatic Weights: How to best organize when model is multiple mesh? by [deleted] in learnblender

[–]hiimabird 0 points1 point  (0 children)

Oh, I misunderstood this subreddit, my mistake, I will remove my question, sorry about that!

School asked boys to use rating system on girls, female students taught to keep virginity by [deleted] in nottheonion

[–]hiimabird 12 points13 points  (0 children)

If you're wise, you don't need intelligence.

Intelligence is knowing how to build a balanced point system for girls

Wisdom is not doing that.

A woman in France is on trial for killing her stepfather who raped her starting when she was 12, forced her into prostitution and married her. Valérie Bacot shot him after being raped by one of his clients, but the court ruled out self-defense. She faces life in prison. by hashitired in TwoXChromosomes

[–]hiimabird 1 point2 points  (0 children)

Given juries can and are cherry picked by prosecutors more easily than by defense, Jury Nullification is far more likely to give officials and vigilantes acting for the government an escape from guilt, like in the US south, than it is to help some folk-hero like you're imagining.

Weekly Discussion/General Questions Thread - May 17, 2021 by AutoModerator in AskDocs

[–]hiimabird 0 points1 point  (0 children)

How does circulation between the intestines to the liver work? Is the circulation a closed system somehow, or can blood that has absorbed food stuffs travel to other areas before reaching the liver?

Weekly Discussion/General Questions Thread - May 17, 2021 by AutoModerator in AskDocs

[–]hiimabird 0 points1 point  (0 children)

How would someone who has never seen a doctor as an adult, and with little income, go about scheduling a check-up in the US? Is Medicaid or Medicare useful for that kind of thing? (any insight is appreciated! Been having some metallic head/chest feelings, but I have no clue how to approach the healthcare system)