SShortSingh.
Back to feed

Operant Conditioning Explained: How Rewards and Punishments Shape Behavior

0
·1 views

Operant conditioning is a learning process in which voluntary behaviors are shaped by their consequences, including reinforcements that increase a behavior and punishments that decrease it. Psychologist B.F. Skinner demonstrated this through experiments with rats, showing that animals reliably learn actions when rewarded with food. Different reinforcement schedules produce distinct behavioral patterns — variable ratio rewards, as seen in slot machines, generate the most persistent responses and underlie addictive behaviors. The principles apply broadly to parenting, workplace management, and addiction, where immediate and unpredictable rewards tend to have the strongest influence on behavior. Research consistently shows that reinforcement is more effective than punishment for building lasting behavioral change, as punishment suppresses actions without teaching alternatives.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Go 1.26 Introduces 'go fix' Tool to Automate Codebase Modernization

Go 1.26 introduces a built-in 'go fix' tool that automates the process of updating codebases to use newer language features and standard library APIs. The tool is version-aware, respecting the Go version declared in a project's go.mod file to prevent incompatible changes. Developers can run a dry-run mode to preview suggested changes before applying them, and a two-pass approach is recommended to catch additional modernization opportunities. The tool integrates with CI/CD pipelines and supports custom analyzers, though misconfigured rules can introduce false positives and unnecessary code changes. Unlike tools such as staticcheck, 'go fix' goes beyond identifying issues by automating the refactoring itself, reducing manual effort and technical debt.

0
ProgrammingDEV Community ·

How the GS1 Mod-10 Algorithm Determines Your Barcode's Check Digit

Every GTIN barcode — including UPC-A, EAN-13, and GTIN-14 — ends with a check digit calculated using the GS1 Mod-10 algorithm, not assigned randomly. The algorithm multiplies each digit by alternating weights of 3 and 1 from right to left, sums the products, and derives the check digit as the value needed to reach the next multiple of 10. An incorrect check digit is the most common reason product listings get rejected on platforms like Amazon, Google Merchant Center, and Shopify. A frequent source of errors is Excel automatically stripping leading zeros from barcodes, which changes the digit count and invalidates the code. Developers can implement the validation in a few lines of Python, and bulk feed validation is also possible via deterministic JSON APIs.

0
ProgrammingDEV Community ·

SproutRAG Uses Binary Chunk Trees to Improve RAG Efficiency by 6%

Researchers have introduced SproutRAG, a retrieval-augmented generation system that organizes document chunks into binary trees to improve information retrieval. The approach boosts information efficiency by 6.1 percent on average over the strongest baseline across four benchmarks, without requiring additional LLM calls at retrieval time. SproutRAG learns which attention heads and layers best capture document structure, enabling multi-granularity retrieval while maintaining relevance comparable to standard flat vector-store RAG pipelines. The system also reduces retrieval latency, though specific speedup figures were not detailed in the paper's abstract. Limitations remain, as the study does not address indexing costs or performance on very large corpora, leaving scalability questions open for future research.

0
ProgrammingDEV Community ·

New HTTP QUERY Method (RFC 10008) Offers Cacheable Requests With a Body

The IETF formally introduced the HTTP QUERY method in RFC 10008, published in June 2026, filling a long-standing gap between GET and POST for complex read operations. QUERY is safe, idempotent, and cacheable like GET, but also supports a request body, making it suitable for search, filter, and graph queries that exceed URL length limits. A key implementation challenge is caching: RFC 10008 requires the request body to be included in the cache key, since multiple different bodies can target the same URL, and a cache keyed only on method and URL risks serving one client's response to another. Correct body-based cache keying also demands careful normalization, where semantically identical JSON payloads must map to the same key while genuinely different payloads must not collide. A small open-source library called http-queryable has been released to handle this correctly for Node.js frameworks including Express, Fastify, and raw HTTP, and requires Node 22 or later.