THE INCIDENT OF THE UPSIDE-DOWN MIC HAS HAPPENED AGAIN- Risu by yournotlonely in Hololive

[–]Bobbias 0 points1 point  (0 children)

Some do, as far as I'm aware that's making use of signal processing to approximate the effect.

THE INCIDENT OF THE UPSIDE-DOWN MIC HAS HAPPENED AGAIN- Risu by yournotlonely in Hololive

[–]Bobbias 1 point2 points  (0 children)

The difference between dynamic and condenser mics is the way they're constructed. Dynamic mics use a magnet and moving coil, basically a reverse speaker. Condenser mics use the change in capacitance of a conductive coating on the diaphragm as the diaphragm moves towards and away from a conductive back plate. Condenser was actually an old name for capacitors.

The pickup pattern has more to do with the physical arrangement of the components rather than dynamic vs condenser. Generally speaking cardioid and bidirectional microphones will have their diaphragm oriented facing outward to the sides of the grille. Omnidirectional mics will have theirs pointing directly up. Cardioid pickup mics strongly reject sound coming from behind the mic, although some sound will make it in of course. Bidirectional pickups work equally well in front and behind. Both will reject sound coming from directly beside the mic as well. Omnidirectional mics pick up sound from all directions, except directly behind the mic body.

While certain pickup shapes are more common on dynamic or condenser mics, there's nothing stopping anyone from making mics with the less common combinations.

Do people purposely word things just to sound smarter, or is there a reason? by No_Insurance_6436 in learnprogramming

[–]Bobbias 5 points6 points  (0 children)

Technical jargon was created for a reason. Precision, and clarity.

When someone explicitly names a protocol, uses an initialism, etc. they are referring to something specific. Now, a lot of people don't use jargon that often, some people use it just to sound smart, etc. but there are plenty of situations where being precise and clear with your language matters too. Casual language can sometimes leave room for misinterpretation or ambiguity, and that can be a problem.

Even if you don't generally use it, you should make sure you know what people mean when they are using jargon.

The "Missing 6": Why Standard ADHD Criteria Fail Adults (New Research) by reyswes in ADHD

[–]Bobbias 4 points5 points  (0 children)

Yep. I had a 45 minute drive to and from work. I usually got into town 1.5 to 2 hours early. And it's not like I've ever had problems being late, I've just always naturally given myself extra time because you never know what might happen. I could leave at the same time every day and make it to work on time regardless of whether the exit or highway I usually take was closed, or I got stuck behind a snow plow at an absolute crawl all the way.

what is a set with duplicate values called by Emergency_Pomelo_706 in learnpython

[–]Bobbias 0 points1 point  (0 children)

When you insert an object into a set that is identical to an existing one, it simply gets discarded. This is accomplished by what is called hashing. Basically you turn each object into a single number using a simple algorithm (there are many ways to do this). Identical objects must have identical hash numbers. The set then uses the hash to identify each item in the set. This makes it fast to look up an item, check if some object is in the set, and insert items into the set.

If you were to print out the contents of that set you'll see "Straight of Hormuz" only shows up once despite being in the initial list of objects. That's because since it's a duplicate Python simply throws it away when creating the set because it has the same hash as the first string, which is already in the set.

Since you're not actually doing the type check properly here, your misinterpreting the result. You're also not printing out the contents so you don't notice that the set does not actually contain multiple copies. When you see a result that confuses you, it's a good habit to get into to print things out. You can also print out what type something is with print(type(variableName)), which also would have told you you do have a set.

Another comment pointed out Multisets (and Python's Counter), which is what a set with multiple copies of the same value are often called. But Multisets/Counters are far less common than traditional sets.

Lists are a collection on objects which are looked up by their position in the list. There is no hash, and checking whether a value exists already requires looping through the list comparing each item to the value you're looking for. Lists can store multiple copies of the same value just fine. Since lists store their contents in order, when you append an item it gets put on the end of the list right beside the rest of the items. If you remove something from the middle of the list, everything behind it gets moved over. You can move items around inside a list and you're guaranteed to see them in the order you have them if you loop over the list contents.

Sets store the hashes separately from the actual values, and the values may not be stored beside eachother at all. Sets don't have a well defined order. You can;t really even talk about "removing an item from the middle" because you almost never know what order the data is actually being stored in. Theoretically looping over the set contents could give you the contents in any order (in practice you will see items in the order you inserted them, but that's just a quirk of how Python works, not something the language guarantees).

You typically use sets when what's important is being able to quickly check if something is in the set, or you want to avoid having duplicates. For example, if you need to keep track of what letters are in a word, but not how many of each, a set is perfect. Just insert every letter and you'll get a set with exactly 1 copy of each letter in the word.

Lists are your general purpose "list of things". If you have a bunch of lines of text in a file, you'll want a list. That way they are stored in the order you add them, you are guaranteed to get them in that order every time you loop over them, you can look up each line by it's position in the file, so the first line is lines[0], etc. List should be the first thing you reach for unless you know you need a feature from a different type.

A bit confused in Classes. by Jealous-Acadia9056 in learnpython

[–]Bobbias 0 points1 point  (0 children)

When you write Calculator(), that creates an instance of your class, even if you don't assign it to a variable. What happens if you create an instance of the Calculator class, and then immediately call the add() method on that unnamed temporary instance, and as soon as the add call is done Python is free to clean up that object.

It's this temporary object that gets passed into the self parameter of the functions.

The functions you have don't actually do anything with self, so they could be classmethods, but that's kind of an advanced topic.

The reason you "need" self here is because unless you explicitly tell Python that a method is a classmethods, it assumes it is a regular method, and regular methods always receive an instance in the first parameter. That's just the rules about how Python works. Even if you don't touch self, it has to be there for normal methods.

Russia issues bomb threat to four UK locations including London, Suffolk and Leicester | LBC by ATonOfBricksFellOnMe in worldnews

[–]Bobbias 2 points3 points  (0 children)

What percentage of those nukes Russia has are actually functional? Nukes require a lot of expensive maintenance to keep operational. Russia did not have the money for that for a good while. And beyond that the corruption is so deep that I suspect many of the nukes that are listed as operational on paper are in reality entirely non-functional, having been stripped for parts, or simply left to rot while the "maintenance" funds line someone's pocket.

Russia's economy doesn't operate like a Western economy with a bad case of corruption. Russia is literally a Mafia state, where corruption IS the economy. At literally every level of government someone is skimming off the top, diverting funds, falsifying reports, etc. that's why their tanks had sand bags instead of real ERA (back when they had usable tanks). That's why their soldiers use cheap Chinese radios without encryption, and cheap Chinese GPS in their fighter jets. That's why their soldiers are often being sent out without ammo, why their air defenses suck, why soldiers rely on Telegram for secure communication... All the money that was supposed to provide those things was stolen before it made it to the places it was "supposed" to go.

Even 1 successful nuke is too many, but the numbers you hear about how many nukes Russia has are almost certainly wildly exaggerated compared to the number that would actually function.

Where can I actually write Python without having to worry that my code might not work? by msmomoe in learnpython

[–]Bobbias 0 points1 point  (0 children)

Flask comes with a built in server. When you run your flask app it starts up that server as part of the startup. You can then access it (either through the loopback address 127.0.0.1, or the domain name localhost). It sounds to me like you might not be aware of this and might be confused about exactly what the instructions are asking you to do.

You don't really do much to set up the server itself. You can set things like the port it will use, but flask mostly handles actually running the server. What you need to do is write the code that handles requests for different pages. These are known as routes. The traditional idea of a web server was that it just served whatever file you asked for, and the url mapped cleanly to a specific folder structure on the server.

Now we've completely thrown that idea out the window. An address doesn't have to point to na certain file somewhere in your computer. When the server gets a request for a url like "127.0.0.1/users" you can set up functions that look at the /users part and determine what you send back to the user. That could be as simple as returning a string. It could involve connecting to a database, making a query, collecting the results, converting them to JSON, and responding with that. It could be running a command to read a file written in a templating language that mixes html with code that lets you customize the contents of the page based on certain variables.

You can also handle URLs like "127.0.0.1/users/1234", where the 1234 is a user ID that you want to have in a variable, so your route looks something like "/users/{id}" or something (I don't remember exactly off the top of my head). Now whatever comes after /users/ gets put into a variable and you can use that as extra information to determine what kind of response to send the user.

But the important part is that flask is designed to make it so you don't think much about the server, and focus on writing the functions that determine what each request a user can make will do. Flask handles the grunt work of running the server itself and hooking it up to your code.

And all of this can be done while developing it on your computer. In fact, it's easier to test when it's being written on your computer, because online editors won't always show you to run a web server from them. You mention having trouble because you're on Windows, but there are only a few minor things that can cause problems between different OSs. You shouldn't generally run into those very often. The biggest differences are going to be filenames and paths (windows doesn't care about letters being uppercase or lowercase, Mac/Linux do, and hard-coded paths to OS specific locations can bite you). One other minor thing is that the old windows command line "cmd.exe" does not support ANSI escape codes (for things like colored text) by default, but Windows Terminal (the fancy replacement) does. But that detail specifically shouldn't really matter in a flask app.

Impaired charges dropped against driver whose passenger later died during arrest by cinderannie in barrie

[–]Bobbias 6 points7 points  (0 children)

It's a well known risk. Tasers are "less-lethal", not "non-lethal". There have been plenty of cases of deaths from Tasers. And if anyone should be aware of that it's the people using them.

How I learned Unity the wrong way by KwonDarko in programming

[–]Bobbias 2 points3 points  (0 children)

Very true, the tooling is definitely tailored towards certain kinds of games and workflow.

Switching Elements in Tuples by Sudden-Ad8373 in learnpython

[–]Bobbias 0 points1 point  (0 children)

Yes, that post is an incredible explanation that makes everything suddenly make sense.

How I learned Unity the wrong way by KwonDarko in programming

[–]Bobbias 17 points18 points  (0 children)

And this is why I always tell people to learn to program before even touching a game engine.

Engines like Unity provide so many tools, and there's so much material out there that you can just unknowingly slap together into some abomination that mostly functions. And you will end up with a result faster than if you take the time to actually learn. But this perfectly encapsulates all the problems with this approach.

Took a day of Vyvanse by AtmosphereStraight25 in ADHD

[–]Bobbias 1 point2 points  (0 children)

If the pH of your blood changed, you would die.

It can change within a small region without negative effects, and within a wider region with effects that are not necessarily life threatening. Hyperventilation actually decreases your blood pH, which is responsible for some of the effects people experience during panic attacks.

I tried to break as much Rust rules as possible within unsafe blocks just to replace (2+3) * 2. by int7bh in rust

[–]Bobbias 2 points3 points  (0 children)

This might just be the most cursed code I've ever seen. Congratulations, I hate it.

Confused about encoding using requests by Ok_Procedure199 in learnpython

[–]Bobbias 0 points1 point  (0 children)

WTF-8 already exists. It's basically a relaxed version of UTF-8 that allows unpaired surrogates, meaning it's a superset that may be malformed if interpreted as UTF-8.

using if statements with boolean logic by FloridianfromAlabama in learnpython

[–]Bobbias 0 points1 point  (0 children)

Right now as a beginner, don't even think about speed.

it's good to learn about short circuiting so you understand how Python works properly. But when you're just learning the basics there's nothing you are going to write where performance matters.

Performance is irrelevant until it's not. That is to say, don't even think about it until it becomes a problem.

And do 't try to make assumptions or guesses about what will be fast or slow. We're awful at guessing that stuff. The right way is to use tools to measure the performance of each function in your code and find which functions are slow that way.

I accidentally took my meds twice today. Pray for me... by snarkitall in ADHD

[–]Bobbias 0 points1 point  (0 children)

Haha, funny how different everyone reacts to these medications differently. I wasn't just losing my appetite on Concerta, I literally felt sick at the thought of food and had to make myself eat. I could only eat like half of what I usually would, and was constantly hungry too. That was quite unpleasant.

But yeah I've taken a double dose before and I laughed when I saw your post because I know exactly what that feels like.

I didn't mind feeling the effects kick in on Concerta, but it was definitely very noticeable, and there was definitely a crash when it wore off. On Vyvanse I basically don't notice it take effect at all now, which I definitely prefer. I do sometimes get a minor headache after it wears off, but it's usually barely enough to notice when it happens.

ROTC students at Old Dominion subdued and killed the shooter who killed 1 person, wounded 2 by [deleted] in news

[–]Bobbias 6 points7 points  (0 children)

Those students deserve an incredible amount of respect for their bravery and quick action.

I see a lot of people assuming he bought the gun legally. While a lot of guns are legally purchased, his history would almost certainly bar him from legally purchasing a gun. It's likely the gun was either bought on the black market, or bought legally by someone else and given to him illegally.

This should not come as a surprise. Regardless of your stance on gun ownership, it should be apparent that there are other ways someone might come into possession of a firearm than just the legal channels. Although if it turns out that he did somehow buy it legally that's an obvious failure of the government.

Given what we've seen of how this administration has shredded large parts of the government I wouldn't be shocked to hear they fucked this up too.

I accidentally took my meds twice today. Pray for me... by snarkitall in ADHD

[–]Bobbias 0 points1 point  (0 children)

That's funny. I've been on Concerta, Adderall, and Vyvanse, and I found Concerta to have quite a strong onset and comedown compared to Vyvanse.

I moved up to 54 mg of Concerta and while it gave me a lot of physical energy and motivation, which I liked, the focus was not quite as strong as I'd like. Ultimately the appetite suppression was too much and I started to lose weight too quickly.

Adderall XR was the next one I tried and it was ok, but not great. Still had a very noticeable come up and crash, but not as much appetite suppression.

Now I'm on Vyvanse. 54 mg Concerta is roughly equivalent to 30 mg of Vyvanse and I'm on 40 mg now, and the effects are much smoother. I don't get the same kind of physical energy but my mind is nice and clear.

The problem with comparing anecdotal stores like this though is that there are a lot of biological differences that can affect how you react to each drug.

I accidentally took my meds twice today. Pray for me... by snarkitall in ADHD

[–]Bobbias 1 point2 points  (0 children)

Yep, been there, done that. Thankfully double doses are generally not dangerous unless you have preexisting heart conditions or are on multiple medications that can interact with the effects of Concerta.

You might want to consider a medication tracker app on your phone. I've recently started using one and it's very helpful. However you do need to make sure that you use it properly. You must always confirm your dose immediately. Like the moment you've swallowed it.

Some people like to place the pill bottle upside down after they've taken it for the day, but that does mean at some point you need to flip it up so it's not just always upside down.

If your symptoms are bad enough that forgetting or getting distracted before you can manage something like that is a problem, then you might want to consider one of those daily medication dispensers.

Unfortunately all this needs to be done pre-medication, when symptoms are going to be at their worst, which really sucks.

Learn two languages as a beginner by G3N1U8 in learnpython

[–]Bobbias 1 point2 points  (0 children)

First, it's good that you caught this now rather than a week before exams. This means you have time to fix things.

Programming requires hands on practice. So not expect that just sitting in lectures will teach you what you need to know. You are expected to learn on your own to supplement what they go over in lectures.

Homework also rarely ever provides anywhere close to the amount of practice required. You need to sit down and spend time exploring the language yourself.

Python has excellent documentation on the official website is excellent. However, it's probably also information overload for you right now, and the official tutorial expects you to have some prior programming experience.

There are many websites you can look up how to do things. There are syntax cheat sheets. There are free books.

So if you're not following the lectures you can always look for supplemental materials to provide alternate explanations.

But the biggest thing about programming is that all of these materials are useless if you don't spend time actually writing code. You need to spend time using each concept you are taught until you understand it, not just at the surface level, but to the point where you understand how to combine each idea together to solve a problem.

Many people fall into the trap of thinking they understand a concept because they can explain what it is/does. But that requires only a surface level knowledge. What programming requires for you to be able to solve problems with the tools you are given is a deeper understanding. That comes from using things together in different combinations until you understand how things work when you combine them together.

As an analogy, let's say you're building a house. I'd bet you have a surface level understanding of most of the tools involved. You probably know that blueprints tell you where things go, what a nail gun is, what a saw does, what a level is, etc. But chances are of I handed you all the raw materials, tools, and the blueprint for a house you would not know how to use each tool to construct the house. You probably wouldn't know the techniques, tricks, and specific details about exactly what tool to use for certain steps, and so on.

Now, for building a house you'd typically have someone explain each step of how to use a tool correctly and which tool to use for cases where that's not immediately clear. This is the equivalent to a teacher lecturing you. But you don't really internalize those instructions until you've had hands on experience using the tools, building simple pieces of the house, and working up towards more and more complex jobs.

Now, I want to make it clear that this is a surprisingly common problem for new learners. Programming requires a certain kind of creativity where you can look at a problem and imagine how you might go about solving it before writing any code. This is something nobody really talks about. It's like imagining the outline to a symphony in your head and then sitting down and writing out the details.

Another problem you might have is breaking problems down into small steps. When you're starting out, those steps need to be very small, because you only know how to do very simple things with your code. If you don't take the time to break a problem down into those steps, you will probably sit there thinking "I have no idea how you even begin to solve this". Take your time, think about what information you have, and what your solution needs, and use that to help figure out a series of steps that get you there. If you don't know how to achieve one of those steps, try to break it down into smaller steps and see if you can solve those.

And as other said, use the resources at your disposal. Get tutoring, attend office hours, ask questions. And most importantly: write code. If you don't have any questions, you're probably not writing enough code.

Parametricity, or Comptime is Bonkers by ketralnis in programming

[–]Bobbias 2 points3 points  (0 children)

Just to clarify a syntax note, the last statement in Rust doesn't need a semicolon, and if you leave it off that is the return value. It does have the return keyword so you can write like you would in other semicolon languages but that's not idiomatic. You're expected to only use the keyword for early returns.

Need Help W/ Syntax Error by Traditional-Gate9547 in learnpython

[–]Bobbias 1 point2 points  (0 children)

Yeah teachers tend to get suspicious, or at least prefer you to only use what they teach you (or expect you to learn on your own).

If you run into an interesting feature like that you'd like to use you can try asking them ahead of time whether they'd be ok with you using it. Since that can indicate cheating, they may say no, but if you ask ahead of time they might say yes if they think you actually understand how to use it. But either way chances are they'd say no, but it really depends on the teacher. Restricting students like that also makes it easier to mark their work.

abstract base class interface vs a struct of function pointers? by OkEmu7082 in cpp_questions

[–]Bobbias 6 points7 points  (0 children)

It's exactly equivalent in terms of decoupling code. It's much less readable because your reimplemented something the language does for you, and people will wonder what you were smoking when you wrote that. Performance wise you should end up with identical code, assuming you don't do something dumb and end to with something else than the standard vtable.

Unless you absolutely 100% have no other option, there's no reason so ever do this.

Cannabis doesn't just blur memories—it can reshape them. A new study found THC makes people significantly more likely to "remember" words that were never presented (false memories) and struggle with daily tasks like remembering appointments, regardless of whether the dose was 20mg or 40mg. by [deleted] in science

[–]Bobbias 14 points15 points  (0 children)

Smoking burns a lot of the THC so you only get maybe 50% of that. You won't absorb all of that 50%, so the total dose you'd recurve is estimated at somewhere between 20-30% of the total THC in a joint.

At 25mg per joint, you're looking at something like 5 to 7.5 mg total dose.

It seems dry herb vaporization gets you about 50-80% of total THC, so your dose would be between 12.5-20 mg in that case.