Variables

Scala

Scala - Variables (val vs var)

• Scala enforces immutability by default through val, which creates read-only references that cannot be reassigned after initialization, leading to safer concurrent code and easier reasoning about…

Read more →
Scala

Scala - Environment Variables

• Scala provides multiple approaches to access environment variables through sys.env, System.getenv(), and property files, each with distinct trade-offs for type safety and error handling

Read more →
Python

PySpark - RDD Broadcast Variables

Broadcast variables provide an efficient mechanism for sharing read-only data across all nodes in a Spark cluster. Without broadcasting, Spark serializes and sends data with each task, creating…

Read more →