q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Katherine Johnson — Mathematics to the Moon

Katherine Johnson’s mathematical calculations helped guide some of America’s most important early space missions while she confronted the racial and gender barriers faced by Black women in twentieth-century America.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Snake case

Piece of code from a module of the Linux kernel, which uses snake case for identifiers

Snake case (sometimes stylized autologically as snake_case) is the naming convention in which each space is replaced with an underscore (_) character, and words are written in all lower case. It is a commonly used naming convention in computing, for example for variable and subroutine names, and for filenames. One study has found that readers can recognize snake case values more quickly than camel case. However, "subjects were trained mainly in the underscore style", so the possibility of bias cannot be eliminated.[1]

A variation is screaming snake case, where words are written in all caps (stylized as SCREAMING_SNAKE_CASE).[2] This convention is used for constants in programming languages like C/C++, Python, Java, PHP, as well as for environment variables.

History

[edit]

The use of underscores as word separators dates back to the late 1960s. It is particularly associated with C, is found in The C Programming Language (1978), and contrasted with pascal case (a type of camel case). However, the convention traditionally had no specific name: the Python programming language style guide refers to it simply as "lower_case_with_underscores".[3]

Within Usenet the term snake_case was first seen in the Ruby community in 2004,[4] used by Gavin Kistner, writing:

BTW...what *do* you call that naming style? snake_case? That's what I'll call it until someone corrects me.

As of 2015, names for other delimiter-separated naming conventions for multiple-word identifiers have not been standardized, although some terms have increasing levels of usage, such as lisp-case, kebab-case, SCREAMING_SNAKE_CASE, and more.[5][6][7]

Examples

[edit]

The following programming languages use snake case by convention:

  • ABAP[8]
  • Ada, with initial letters also capitalized[9]
  • C++ Standard Library and Boost for symbols.[10] C++ does not have a widely agreed-upon naming convention for classes and functions by its wider community.
  • C, for some type names in the standard library, and since C11, in some function names.
  • Eiffel, for class and feature names[11]
  • Elixir, for atom, variable, and function names[12]
  • Erlang, for function names[13]
  • GDScript, for variable and function names[14]
  • Java uses SCREAMING_SNAKE_CASE for static final constants and enum values.[15]
  • Kotlin uses SCREAMING_SNAKE_CASE for constants and enum values[16]
  • Magik
  • OCaml, for value, type, and module names[17]
  • Perl, for lexical variables and subroutines[18]
  • Oracle SQL and PL/SQL,[19] for all unquoted identifiers (tables, columns, indexes, constraints, PL/SQL variables, constants, procedures/functions, triggers,...), although not official by Oracle itself, still recommended by the majority of known "influencers" and used throughout the official Oracle documentation
    • All unquoted snake_case identifiers are actually internally represented as SCREAMING_SNAKE_CASE identifiers.
  • Prolog, for both atoms (predicate names, function names, and constants) and variables[20]
  • Python, for variable names, function names, method names, and module or package (i.e. file) names[3]
  • PHP uses SCREAMING_SNAKE_CASE for class constants
  • PL/I[21]
  • R, for variable names, function names, and argument names, especially in the tidyverse style[22]
  • Ruby, for variable and method names[23]
  • Rust, for variable names, function names, method names, module names, and macros[24]
  • Tcl
  • Terraform (software), for resources and variables[25]
  • Zig, for variables[26]

See also

[edit]

References

[edit]
  1. ^ Sharif, Bonita; Maletic, Jonathan I. (2010). "An Eye Tracking Study on camelCase and under_score Identifier Styles". 2010 IEEE 18th International Conference on Program Comprehension (PDF). pp. 196–205. CiteSeerX 10.1.1.421.6137. doi:10.1109/ICPC.2010.41. ISBN 978-1-4244-7604-6. S2CID 14170019. {{cite book}}: Cite uses deprecated parameter |citeseerx= (help)
  2. ^ "Snake Case". Mozilla Developer Network. 8 September 2023. Retrieved November 10, 2023.
  3. ^ a b Guido van Rossum; Barry Warsaw; Nick Coghlan (2001-07-05). "PEP 0008 -- Style Guide for Python Code".
  4. ^ Gavin Kistner (2004-02-23). "Appropriate use of camelCase". Newsgroup: comp.lang.ruby. Usenet: HBn_b.379957$xy6.2073499@attbi_s02. Retrieved 2015-08-13.
  5. ^ "What's the name for snake_case with dashes?". Stack Overflow. Archived from the original on 2014-12-26. Retrieved 2016-07-25.
  6. ^ "Programmers – If this is camelCase what-is-this?". Archived from the original on 2016-08-07. Retrieved 2015-08-13.
  7. ^ "Camel_SNAKE-kebab". GitHub. 23 April 2020.
  8. ^ "Naming Conventions in ABAP Objects". help.sap.com. Retrieved 2020-07-28.
  9. ^ "Ada Programming Guidelines".
  10. ^ "Boost Library Requirements and Guidelines". Retrieved 2015-08-13.
  11. ^ "Eiffel Class and Feature Names". 28 December 2019.
  12. ^ "Elixir Style Guide". GitHub. May 2020.
  13. ^ "Programming Rules". Archived from the original on 2010-09-04. Retrieved 2017-08-11.
  14. ^ "GDScript Style Guide — Godot Engine (3.0) documentation in English". docs.godotengine.org.
  15. ^ "Code Conventions for the Java Programming Language – Naming Conventions". Oracle. Retrieved 2021-08-03.
  16. ^ "Coding Conventions". Retrieved 2023-02-03.
  17. ^ "Xen wiki". Retrieved 2017-03-15.
  18. ^ Damian Conway (2005). Perl Best Practices. O'Reilly Media Inc. p. 44. ISBN 978-0-596-00173-5.
  19. ^ "Quick Guide to Some Sources for Naming Conventions for Oracle Database Development". stevenfeuersteinonplsql.blogspot.com. Retrieved 2020-12-30.
  20. ^ Michael A. Covington; Roberto Bagnara; Richard A. O'Keefe; Jan Wielemaker; Simon Price (2009). "Coding Guidelines for Prolog (v.3)". p. 14. arXiv:0911.2899 [cs.PL].
  21. ^ IBM (July 1965). IBM Operating System/360 PL/I: Language Specifications (PDF). p. 16. Retrieved November 12, 2023.
  22. ^ Wickham, Hadley. The tidyverse style guide.
  23. ^ "Ruby Naming Conventions". GitHub. May 2020.
  24. ^ "Naming – Rust API Guidelines". Archived from the original on 2018-09-16. Retrieved 2019-10-27.
  25. ^ "Terraform Naming Conventions". Feb 2022.
  26. ^ "Documentation - The Zig Programming Language". Retrieved 2024-03-10.
[edit]

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

Wikipedia

Snake case

Snake case (sometimes stylized autologically as snake_case) is the naming convention in which each space is replaced with an underscore (_) character, and words are written in all lower case. It is a commonly used naming convention in computing, for example for variable and subroutine names, and for filenames. One study has found that readers can recognize snake case values more quickly than camel case. However, "subjects were trained mainly in the underscore style", so the possibility of bias cannot be eliminated. A variation is screaming snake case, where words are written in all caps (stylized as SCREAMING_SNAKE_CASE). This convention is used for constants in programming languages like C/C++, Python, Java, PHP, as well as for environment variables.

MORE →
No preview image
Wikipedia

Reentrancy (computing)

In programming, reentrancy is the property of a function or subroutine which can be interrupted and then resumed before it finishes executing. This means that the function can be called again before it completes its previous execution. Reentrant code is designed to be safe and predictable when multiple instances of the same function are called simultaneously or in quick succession. A computer program or subroutine is called reentrant if multiple invocations can safely run concurrently on multiple processors, or if on a single-processor system its execution can be interrupted and a new execution of it can be safely started (it can be "re-entered"). The interruption could be caused by an internal action such as a jump or call (which might be a recursive call; reentering a function is a generalization of recursion), or by an external action such as an interrupt or signal. This definition originates from multiprogramming environments, where multiple processes may be active concurrently and where the flow of control could be interrupted by an interrupt and transferred to an interrupt service routine (ISR) or "handler" subroutine. Any subroutine used by the handler that could potentially have been executing when the interrupt was triggered should be reentrant. Similarly, code shared by two processors accessing shared data should be reentrant. Often, subroutines accessible via the operating system kernel are not reentrant. Hence, interrupt service routines are limited in the actions they can perform; for instance, they are usually restricted from accessing the file system and sometimes even from allocating memory. Reentrancy is neither necessary nor sufficient for thread-safety in multi-threaded environments. In other words, a reentrant subroutine can be thread-safe, but is not guaranteed to be. Conversely, thread-safe code need not be reentrant (see below for examples). Other terms used for reentrant programs include "sharable code". Reentrant subroutines are sometimes marked in reference material as being "signal safe". Reentrant programs are often "pure procedures". Reentrancy should not be confused with idempotence, in which the function may be called more than once yet generate exactly the same output as if it had only been called once.

MORE →
No preview image
Wikipedia

Link register

A link register (LR for short) is a register which holds the address to return to when a subroutine call completes. This is more efficient than the more traditional scheme of storing return addresses on a call stack, sometimes called a machine stack. The link register does not require the writes and reads of the memory containing the stack which can save a considerable percentage of execution time with repeated calls of small subroutines. The IBM POWER architecture, and its PowerPC and Power ISA successors, have a special-purpose link register, into which subroutine call instructions put the return address. In some other instruction sets, such as the ARM architectures, SPARC, and OpenRISC, subroutine call instructions put the return address into a specific general-purpose register, so that register is designated by the instruction set architecture as the link register. The ARMv7 architecture uses general-purpose register R14 as the link register, OpenRISC uses register r9, and SPARC uses "output register 7" or o7. In some others, such as PA-RISC, RISC-V, and the IBM System/360 and its successors, including z/Architecture, the subroutine call instruction can store the return address in any general-purpose register; a particular register is usually chosen, by convention, to be used as the link register. Some architectures have two link registers: a standard "branch link register" for most subroutine calls, and a special "interrupt link register" for interrupts. One of these is ARCv2 (ARC processors using version 2 of the ARCompact architecture), which uses general-purpose-registers r29 for the interrupt link register and r31 for the branch link register. References to "the link register" on such platforms will be referring to the branch link register. Earlier ARC processors based on the ARCompact and ARCtangent architectures had three link registers: two interrupt link registers (ILINK) and one branch link register (BLINK). The two interrupt link registers were ILINK1 (for level 1 (low priority) maskable interrupts), and ILINK2 (for level 2 (mid priority) maskable interrupts). In these architectures, r29 was used as the level 1 interrupt link register, r30 as the level 2 interrupt link register, and r31 as the branch link register. ILINK1 and ILINK2 were not accessible in user mode on the ARC 700 processors. The use of a link register, regardless of whether it is a dedicated register or a general-purpose register, allows for faster calls to leaf subroutines. When the subroutine is non-leaf, passing the return address in a register can still result in generation of more efficient code for thunks, e.g. for a subroutine whose sole purpose is to call another subroutine with arguments rearranged in some way. Other subroutines can benefit from the use of the link register because it can be saved in a batch with other callee-used registers—e.g. an ARM subroutine pushes registers 4-7 along with the link register, LR, by the single instruction STMDB SP!, {R4-R7, LR} pipelining all memory writes required.

MORE →
No preview image
Wikipedia

Thunk

In computer programming, a thunk is a subroutine used to inject a calculation into another subroutine. Thunks are primarily used to delay a calculation until its result is needed, or to insert operations at the beginning or end of the other subroutine. They have many other applications in compiler code generation and modular programming. The term originated as a whimsical irregular form of the verb think. It refers to the original use of thunks in ALGOL 60 compilers, which required special analysis (thought) to determine what type of routine to generate.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

What prosperous Tulsa district became widely known as “Black Wall Street”?

The Greenwood District.