Programming FlashCards

Explore our curated collection of programming flashcards. Each card contains practical examples and code snippets to help you master programming concepts quickly.

Filter by Technology

Ruby Safe Navigation programming concept visualization
Ruby

Ruby Safe Navigation

Prevent NoMethodError by safely calling methods on potentially nil objects using the &. operator, which returns nil instead of raising an exception.

Ruby Dup Method programming concept visualization
Ruby

Ruby Dup Method

Creates a shallow copy of an object, allowing modifications without affecting the original object's state.

Ruby Enumerable Select programming concept visualization
Ruby

Ruby Enumerable Select

Filter collections by returning a new array with elements that match a given condition using a block predicate

Ruby Enumerable Lazy programming concept visualization
Ruby

Ruby Enumerable Lazy

Lazy evaluation in Ruby allows for efficient processing of potentially infinite sequences by deferring computation until results are actually needed.

Hash Transform Keys programming concept visualization
Ruby

Hash Transform Keys

Modify hash keys by applying a transformation block, allowing easy key renaming or conversion

Ruby Compact Method programming concept visualization
Ruby

Ruby Compact Method

Removes nil values from an array, returning a new array with only non-nil elements, helping to clean up and filter arrays efficiently.

Ruby Singleton Pattern programming concept visualization
Ruby

Ruby Singleton Pattern

Ensures a class has only one instance and provides a global point of access to it, implemented using the Singleton module in Ruby's standard library.

Ruby Object Freezing programming concept visualization
Ruby

Ruby Object Freezing

Prevent modification of objects by making them immutable, protecting data integrity and avoiding unintended changes.

Ruby Eigenclass programming concept visualization
Ruby

Ruby Eigenclass

A singleton class unique to a single object, allowing you to define methods specific to that individual object instance.

Ruby Prepend Mixin programming concept visualization
Ruby

Ruby Prepend Mixin

A module inclusion method that inserts methods at the beginning of the method lookup chain, allowing method prepending and overriding with super

Ruby Tap Method programming concept visualization
Ruby

Ruby Tap Method

A utility method that allows you to perform operations on an object within a block while returning the original object

Ruby Flip-Flop Operator programming concept visualization
Ruby

Ruby Flip-Flop Operator

A rarely used conditional range operator that changes state between two conditions, primarily used in conditional expressions within ranges.

Ruby Refinements programming concept visualization
Ruby

Ruby Refinements

A way to locally modify classes without affecting global scope, allowing safe, scoped monkey-patching of existing classes and modules

Ruby Keyword Arguments programming concept visualization
Ruby

Ruby Keyword Arguments

Keyword arguments allow more flexible and readable method definitions by using named parameters with optional default values.

Ruby Yield Keyword programming concept visualization
Ruby

Ruby Yield Keyword

A powerful Ruby method control flow mechanism that allows a method to receive and execute a block of code passed to it, enabling flexible and dynamic method behavior.

Ruby Splat Operator programming concept visualization
Ruby

Ruby Splat Operator

The * (splat) operator allows flexible argument passing, unpacking arrays, and converting between arrays and argument lists in Ruby methods.

Ruby Dynamic Methods programming concept visualization
Ruby

Ruby Dynamic Methods

Create methods dynamically at runtime using define_method, allowing flexible and programmatic method generation based on runtime conditions.

Ruby Method_missing programming concept visualization
Ruby

Ruby Method_missing

Explore Ruby's dynamic method_missing feature, which allows capturing and handling calls to undefined methods, enabling powerful metaprogramming techniques.

Ruby Proc programming concept visualization
Ruby

Ruby Proc

Procs are first-class objects in Ruby that encapsulate blocks of code, allowing dynamic method creation and functional programming techniques

Ruby Array Shuffle programming concept visualization
Ruby

Ruby Array Shuffle

Randomly reorder elements in an array using the .shuffle method, which returns a new randomized array without modifying the original

Ruby Blocks programming concept visualization
Ruby

Ruby Blocks

Blocks are anonymous functions passed to methods, enabling powerful iteration and functional programming patterns in Ruby.

Ruby Enumerable Each programming concept visualization
Ruby

Ruby Enumerable Each

Iterate through collections using .each method, which allows performing an action on every element without creating a new array

Ruby Enumerable Inject programming concept visualization
Ruby

Ruby Enumerable Inject

A powerful method for reducing an array to a single value by applying a cumulative operation across all elements.

Ruby Enumerable programming concept visualization
Ruby

Ruby Enumerable

Explore the powerful Enumerable module in Ruby that provides collection traversal and searching methods like map, select, and reduce.

Ruby Method Chaining programming concept visualization
Ruby

Ruby Method Chaining

Demonstrate Ruby's powerful method chaining with enumerable methods to transform and filter collections efficiently

Ruby Symbol to Proc programming concept visualization
Ruby

Ruby Symbol to Proc

A concise way to convert a method into a proc, allowing compact method calls on collections using the &: shorthand.

Ruby Symbol programming concept visualization
Ruby

Ruby Symbol

Symbols are immutable, memory-efficient identifiers in Ruby, often used as hash keys and method names with low memory overhead

Ruby Variable Swap programming concept visualization
Ruby

Ruby Variable Swap

Ruby allows elegant, one-line variable swapping without using a temporary variable, demonstrating the language's concise syntax.

Previous Page 1 of 1 Next