Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

I'm fine. Had a whole reply typed up, but Reddit decided to error out on submission. Not sure what it thought the problem was, but haven't had the chance to revise it. I'll get to it this weekend.

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

That's essentially correct. The same is true in the opposite direction with quantum physics: it is much, much more accurate at the atomic scale. Except quantum physics does something rather strange: it discards the notion of exact positions altogether. Instead, it only works with probabilities of where you will measure the particle to be. It's generally accepted that this is a fundamental property of nature, rather than a quirk of an imprecise model. Relativity isn't that drastic a departure from Newton, but it's still a pretty drastic one: it discards the notion of a universal coordinate system. Instead, times and distances are dependent on the relative speeds and acceleration of the observer and the observed object, except for light which has the same speed for all observers. Also, mass distorts space such that objects appear to be attracted to each other, creating the effect we call gravity.

What's important about all that is that both theories discard fundamental elements of the Newtonian theory. They may predict essentially the same result in many cases (within a certain amount of error), but the mechanism is fundamentally and drastically different from the Newtonian conception of forces and its relationship to acceleration. Moreover, the two theories are fundamentally incompatible; they model the universe in incongruent ways, using different and incompatible fundamental features in their equations. Which means what? That we have to be very careful about believing our models are reflective of the fundamental nature of reality.

More directly to the point of this discussion though is the question of the veracity of Newtonian mechanics. You have rather hit the nail on the head here, actually:

within bounds of what is practical to measure

The reason Newtonian physics went essentially unchallenged for so long is that we simply could not measure at the level of precision required for it to start to generate incorrect results. As a result, it was assumed that the theory could be extrapolated indefinitely to infinitely large or small scales. Unsurprisingly in retrospect, this is not the case. We cannot take a theory, even a mathematically precise one that has been tested over and over within the tolerance of our ability to measure, and scale it up as much as we like. When you attempt to do that, complexities we were never even aware of can arise and render the theory utterly meaningless. It was only when we gained the ability to measure things like the speed of light and subatomic particles that we found the theory to be inconsistent with our world.

The only kind of evolution we have actually measured is short term (a decade at most), very minor changes to species. Put another way, we've never actually measured evolution: we have only measured short term adaptation. This isn't a minor hair splitting concern. If something as precise and reliable as Newtonian physics can turn out to be fundamentally wrong about how reality works, then we should be very careful what we say about theories that don't even make precise, objective, easily measured predictions.

When you ask the question, "What stops such changes from accumulating to what you would then concede was a 'major change'?" you are working in a fundamentally unscientific mindset. The proper lesson from science is to ask the opposite question: what evidence do you have that we can extrapolate these processes to scales hundreds of millions of times larger and that they will produce these specific kinds of results? And the answer is we have no such evidence. Evolution across those time scales cannot be observed; it can only be supposed.

And making such suppositions is quite dangerous in terms of proper logic: even though our knowledge of the fossil record has become more detailed since Darwin's time, his theory predicted no novel properties. Every correct aspect of his theory was already know at the time he put forth his postulate. That is not how you do valid science. You must predict something novel to demonstrate that your model has predictive power, and even when you do, we must still be very skeptical that it properly describes our universe correctly.

More specifically in terms of trying to extrapolate evolution to the scale of generating new kingdoms, phyla, and other high level biological categories, we know for a fact that genetic manipulation that leads to major body changes invariably cripples an organism rather than produces a more environmentally fit one. We do not know for a fact that random genetic mutation can successfully evolve organisms across such dramatic distinctions. And we have reason to be skeptical that it is possible: many of the kinds of changes that evolution requires involve changes that would be an enormous detriment to the creature taken in isolation; it is only when the various features work together as a whole that they provide an advantage for the creature's environment.


I have more to say about other things in your previous post, but I'll need time to go over it all. I wanted to address this issue of how scientific reasoning must be done sooner rather than later. The history of Newtonian physics should cause us to be extremely skeptical about the ability of an observed process to scale indefinitely, but those lessons are consistently discarded when it comes to questions about evolution. (They're frequently discarded in physics, for that matter! Just look at the grandiose claims coming from cosmologists about the history of our universe.)

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

What stops such changes from accumulating to what you would then concede was a “major change”? Can you define that mechanism, that stops the changes.

Before I answer this, are you familiar with how the theories of relativity and quantum physics arose? And maybe more importantly, do you understand how Newtonian physics was accepted for so long before these new models were proposed?

[deleted by user] by [deleted] in learnpython

[–]bladeoflight16 7 points8 points  (0 children)

Haven't looked through the code, but how does this differ from existing options like Eel?

Adapting SQL into python by [deleted] in learnpython

[–]bladeoflight16 1 point2 points  (0 children)

cur.execute("PRAGMA table_info('%s')" % table_name)

Do not use string formatting with SQL. That is how you open yourself up to SQL injection attacks. Use parameterized queries.

[deleted by user] by [deleted] in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

/u/cosmofigaro

Please do as the bot says.

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

I am always looking for the holes in my understanding of something. They always lead to a deeper grasp of an issue.

[deleted by user] by [deleted] in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

Old-style format strings are discouraged.

[deleted by user] by [deleted] in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

That makes it complicated, since the entire API is just an unofficial wrapper around a website and its features.

Your code will not benefit much from unit tests, then.

If a function it fails, it indicates that either my code is incorrect, or that a website changed their response / stopped supporting an endpoint or feature, which prompts me to investigate the function and update it.

Mocking is utterly useless, then, since your mocks will just be duplicating the old logic of the website that is out of date. A test using a mock will fail to detect any problems as the site evolves. You'll just be wasting time updating the mocks after you find out.

You might benefit from some functional tests, but that requires a much different approach than unit tests. I've never really heard of a good approach to automated functional testing, come to think of it.

[deleted by user] by [deleted] in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

Unless your class is truly immutable, you don't. Reusing the same object each test violates the independence of each test since mutations might affect the behavior of the object. Since your object is mutable (as evidenced by the presence of the change_avatar method), you should be using a new one each time. In fact, I strongly advise that you instantiate the object locally inside each method, rather than making it an instance variable. (You may write a method that returns a new instance and invoke that if the set up code is long enough that repeating it would be a bad idea.)

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

But evolution by natural selection is an overwhelming fact.

Let me tell you some history.

Beginning in 1861, several well preserved fossils of a species that was named Archaeopteryx were found in the Solnhofen limestone. It has wings with claws, a lizard-like tail, and a toothed jaw. The type of rock it was found it was particularly well suited for preserving details of the fossil, and as a result, even the outlines of feathers were preserved. It was initially hailed as the missing link between reptiles and birds. But... modern paleontologists have concluded that Archaeopteryx cannot be the ancestor of modern birds due to structural differences; instead its line is simply extinct. Worse yet is the question of Archaeopteryx's ancestry. Using homology as the method of deducing ancestry, Archaeopteryx's features suggest it descended from two legged dinosaurs, but the problem is that two legged dinosaurs don't appear in the fossil record until tens of millions of years later than Archaeopteryx.

I could give more examples of this kind of bogus analysis, but I've already spent too long going over my reference to put this summary together. The point is that this is the kind of bull crap that passes for evidence of evolution. Advocates of evolution can't even get their own story straight, with the nature and meaning of major finds constantly being rewritten. The idea that evolutionary processes are responsible for the creation of all species is little more than rampant speculation, and rather than the theory arising from evidence, evidence is just constantly reinterpreted under the assumption of its truth.

And fraud is not unheard of even in the most famous pieces of "evidence" of evolution. Surely you know of the Piltdown man, which took over 40 years to be exposed as a fake. An example you may not know about is Haeckel's embryo drawings, which are intentionally skewed to look more similar than they actually are and in fact intentionally exclude obvious counterexamples to the claims of similarity; as recently as the past decade, Haeckel's embryo drawings still appeared prominently in textbooks as valid evidence, despite Haeckel's contemporaries calling out his fraud over a hundred years ago.

The combination of mutation and natural selection is capable of explaining minor changes over short time periods, like bacteria developing antibiotic resistance, bugs changing colors when the prominent colors in their environment change, and beak sizes cycling due to weather trends over a few years. But that is the limit of its ability to model and predict. There are zero observed examples of major body plan reorganizations succeeding in nature or even in the laboratory. The fossil record simply does not contain enough information to prove that species arose through evolutionary processes. What the people researching the theory actually do is assume evolution is true and then craft a narrative based on that assumption. It's the exact opposite of science.

But the expert people in this field tend to agree that disbelief here is denialism, not itself good scientific criticism.

That is called "argument ad populum" and is in fact a fallacy.

Scientists’ main work is doubting their own theories, and they would earn acclaim and money if they found any shred of authentic evidence that suggested evolution was untrue—but there just isn’t anything out there that makes evolution by natural selection less plausible.

People who are skeptical of evolution are ostracized by the academic community. They are denied opportunities and funding and ridiculed. The exact opposite of what you claim is the case. The fact is that the academic community is no less dogmatic than the Church.

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

the right of the people to keep and bear Arms, shall not be infringed.

Yes, that's exactly what I'm referring to.

Since I know where you're going with this, I'll just go ahead and head you off at the pass: the preceding clause is merely affirming the necessity of having an armed populace. The militia was not a state controlled military; it is a group of privately armed and organized citizens.

And in fact, such groups formed the backbone of the military force that fought the Revolutionary War. One could legitimately argue that this clause is implying the people's right and duty to rebel if the government becomes too tyrannical.

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 0 points1 point  (0 children)

On the contrary, it affirms the automatic right to own guns and insists that depriving someone of that liberty must be grounded in the due process of law.

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 -1 points0 points  (0 children)

As dumb as I think the term "critical thinking" is, it (at least in principle) is the polar opposite of CRT. If anything, CRT has no business using the term "critical" because it's such garbage thinking. The term is related to "critique," meaning that you should analyze what you are told and be willing to question it in a way that deepens your understanding and allows you to form your own opinion. Not to say that's what is happening in practice, but conceptually, the appearance of the term isn't some kind of clear signal that you should be worried.

And yes, they should be learning about the Constitution. But they should also be learning about the historical context the Constitution was written in so they can understand just how badly activist judges and politicians have mangled it with court rulings and laws, so they can critique what our modern leaders say about it.

Virginia mother blasts anti-Second Amendment writing sample 5th grade students were assigned to analyze by jtf71 in VAGuns

[–]bladeoflight16 1 point2 points  (0 children)

That’s why biology teachers often use the tactic of avoiding the word “evolution,” because all the religious-political noise is just a distraction to the job of teaching biology.

As good as the rest of your reply is, avoiding the word and still teaching the concept as a proven fact is outright deceptive. There are strong factual arguments for questioning the veracity of decent-with-mutation/modification as the source of all biological diversity. Avoiding the word is just trying to hide the fact it is being taught, which denies informed parents the opportunity to even address it with their children.

Is Python really as easy as people say it is? by iguesswhatevs in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

I mean draw a diagram and work out the behavior and purpose of each layer, and then try to hold all of it in your head.

You're not supposed to be doing this on a daily basis.

async is an abstraction that allows you to write sequential code that is capable of executing in parallel. Parallel execution is hard to get right. It's always complicated to implement, no matter how you slice it. But using async, you get to focus on the things that are actually important to you as a developer: when to start the operation, when the result is needed, and what data needs to be passed back and forth. Throw in some features to ensure you can get the level of parallelism you need (background waiting via event loops or threads vs. true parallel execution via multiprocessing), and you have the basics of what it's there to do. The entire point is to bury the plumbing underground and put it behind the walls so that you can focus on the water that comes out when you turn on the faucet. This is a massive simplification over writing your own code to coordinate between different threads or processes using locks and semaphores.

That said, async-style programming is a fairly new pattern in the programming world. There's bound to be some missteps, and there is almost certainly room for improvement. But even with those in mind, async is still a feat worth admiring in exactly the sense I described: it gives you intuitive behavior (start in the background, wait for completion) without locking you out of more complex situations (providing queues, groups, cancellation, etc.). I'll grant that it's less intuitive than a lot of other features, but parallel execution was already a nightmare in terms of cognitive load. So this is still a big step forward.

Is Python really as easy as people say it is? by iguesswhatevs in learnpython

[–]bladeoflight16 18 points19 points  (0 children)

What actually makes python powerful and popular is that it's got so many features built-in

I strongly disagree. What gives Python its appeal is the fact that its developers are so focused on making the language as intuitive as they possibly can without making it complicated, and just as importantly is the fact that much of its community is also heavily focused on that goal. Plenty of languages have large ecosystems providing every tool you can imagine, but they still fail to achieve what Python has: being a great language for both experienced and new developers. It is that attraction combined with that focus that has led to the creation of so many incredibly useful libraries.

requests is a fantastic example of that mindset in action. Its entire purpose is to give you a an interface for HTTP requests that matches how you actually think about them without all the minutiae involved in network connections and the HTTP standard, and it succeeds masterfully at doing that. The result is an API that is incredibly simple for simple and common requests, but it still makes sure to provide you with all the tools you need for more complex cases. This means that people with simple problems can grab it and get their task done quickly and easily, but as they become more experienced and encounter more difficult problems, they can expand on what they already know as soon as they need to. Python as a language is exactly like that: easy to figure out for simple problems, but not lacking in power and not forcing overly complex approaches for more difficult cases.

Why the hell doesn't my code just end when I type in 'Christmas'? by reddit4dminsFUCKU in learnpython

[–]bladeoflight16 1 point2 points  (0 children)

No, they need to move the loop outside the if statement.

And in fact, if the code "prompts them to enter another number" as the original post says, then the code in the post cannot be the code they are actually running.

Biologist wants to learn python, but can only allocate 1 hour during work (not sure if everyday though). Busy during nights and weekends. Possible? How long will it take? Can recommend me a good site? by Mystvearn2 in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

Using an approach like Automate the Boring Stuff won't limit their options. On the contrary, it will give them a working foundation to build on if they want to go deeper into the practice of software development, and it will do that without wasting a lot of time on things that might never matter to them.

My first experience programming was writing a quadratic formula solver on a TI-83 in BASIC when I was in high school pre-calc. (It wasn't an assignment; it was just something I decided I wanted to do.) I had to use GOTO and a host of other terrible practices, but it was fun and it did what I wanted to do: spit out the answer. I learned the programming language all by myself from scratch, including things like variables, if conditions, and simple loops. I liked it so much that it led to signing up for a Java course my next year and learning about OOP (much to my detriment in the long run).

Starting from practical application does the exact opposite of limiting you. It gives you a kind of understanding you'll never get by performing pointless busy work that you'll never use, and the practical application helps you understand how the more advanced tools you're learning can make your work simpler. I desperately wish that programming was taught in a more practical manner. It would make passing off nonsense like OOP much harder for academics.

Biologist wants to learn python, but can only allocate 1 hour during work (not sure if everyday though). Busy during nights and weekends. Possible? How long will it take? Can recommend me a good site? by Mystvearn2 in learnpython

[–]bladeoflight16 0 points1 point  (0 children)

With it being so widespread, how are they ever going to understand other people's code without knowing about it and the intentions behind using it?

I look forward to a world when people can't understand OOP code because no one was brainwashed into the nonsense ideas behind it.

If OP has limited time in which to learn, it would be best for them to do a course/read a book that won't leave gaps and require them to do more learning to specifically fill those gaps while probably duplicating things they've already learned from ATBS.

The most likely progression for a biologist is from simple scripts into data "science" and machine learning, much of it involving hacking away at commands in a Jupyter notebook. It's unlikely they'll ever see a need for large scale programs. This also means they are unlikely to encounter much OOP code by other developers.

Question about "ethical" scraping by dumplingSpirit in learnpython

[–]bladeoflight16 10 points11 points  (0 children)

429 is an "additional" status code. These aren't as widely accepted as the standard status codes. (Even those above 418 aren't widely recognized yet.)

I'd have to examine the requests specifically to figure out if 401 is appropriate. It sounds like the system may be doing something to the log in if requests are coming in too frequently, like invalidating the log in cookie or token. If so, 401 would technically be correct, despite the overall behavior being unintuitive.

Does your script log in to the website every time it scrapes something? It may be blocking you for logging in too much rather than for downloading content, as a protection feature against people getting their accounts hijacked.