Wildcard!
CS Trivia
Language Quirks
Modern CS
About the Club
100

What is, objectively, the worst text editor?

Emacs

100

Why do we use binary format in computers?

A circuit can be either off or on. (0 or 1)

100

In Java, what determines the sign of the output in a "%" operation?

The left hand value. (dividend)


100

What is Go?

This programming language, created in 2009 at Google, is famous for its concurrency model and mascot gopher.

100
Thomas, Susan, Chinmay, and Eric are examples of...?

Past club officers

200

What is, without any bias whatsoever, the best text editor?

Literally anything that isn't Emacs.
200

What language is used to interact with databases?

SQL

200

Assuming set_a and set_b are Python variables of type set(), what will happen if I attempt to set a new variable to "set_a | set_b"?

The new variable will be the union of both the sets.
200

Why is Rust suddenly so popular?

It is a low-level, memory safer alternative to C/C++.
200

What is the club website?

bettercs.club

300

What program is most commonly used for version control?

Git

300

Metal, GLSL, and CUDA are examples of what?

GPU Programming Lanugages

300

Python.

def f(x = []): x.append(1); return x

I run f(); f(); f(); f().

What will be returned when I run f() again?

[1, 1, 1, 1, 1]. Default arguments are evaluated once, not per call.

300

What is a fundamental reason as to why quantum computing is so much more powerful than classical computing?

Qubits, or quantum bits, can represent multiple states (like 0 and 1) simultaneously through leveraging principles of quantum mechanics such as superposition and entanglement.

300

When is the next club meeting?

October 22nd, 2025

400

Java slice

Integer a = 127, b = 127;

a == b;   // true

Integer x = 128, y = 128;

x == y;   // false

//Why is a==b true, but x == y false?

For Integer values [-128,127], java will place these values in the same location of memory within the Integer cache.

The "==" operator is comparing locations in memory, not values. Since a and b are within [-128,127], they share a location in memory while x and y do not.

400

Which language is infamous for syntax that can vary wildly between CPU architectures?

Assembly.

400

One leading underscore in a python module name signifies that the module is...?
(e.g. csv vs _csv)

An internal module. Such modules, as in the case of csv, may be more performant than the public module due to it being written in C (or C++).

400

Why did the US Government strongly encourage developers to move away from languages like C and C++ to languages like Rust, Python, Go, and C#?

The government wants developers to move to memory-safe languages in order to increase code security.

400

T/F: Previous members of this club that were very involved have gone to MIT, CMU, and Caltech



False. Members have gone to MIT & CMU, but we don't have any alumni that have gone/are going to Caltech (maybe you?).

500

int i;                                                               

     int nThrows = 0;                                             

     int nSuccess = 0;                                            

                                    

     double x, y;                                                 

                                    

     for (i = 0; i < 1000000 ; i++)                         

     {                                                            

        x = Math.random();             

        y = Math.random();                                                            

        nThrows++;                                                                              

        if ( x*x + y*y <= 1 )             

           nSuccess++;                                               

     }                                                            

System.out.println(((double)nSuccess) / ((double)nThrows))

//Approximate the code slice above.

Pi/4

500
Prior to automated computers, the term "computers" used to refer to what?

People who performed calculations.

500

Assume that Obj() is a memory-safe constructor. Which one of these C++ slices is memory safe, and why?

A. Obj hi = Obj(stuff)
    hi = Obj(newStuff)


B. Obj* hi = new Obj(stuff)
    hi = new Obj(newStuff)

A is memory safe.
This code slice assigns a value, then overwrites that value. 


B, on the other hand, allocates memory and returns a pointer to that memory. Overwriting that pointer with another pointer does not de-allocate this memory and loses access to this memory block in the process.

500

Which CPU architecture have specific devices -primarily handhelds and some server sets- begun to move to, and why?

ARM64.

Arm CPUs are well known for their low power consumption. Power consumption is an extremely important factor in handheld devices as power is limited by batteries, which can get heavy and unwieldy when needing large amounts of power. Additionally, servers rely on GPU for most computational loads; ARM64 consumes less power than other architectures and has a high enough level of performance for servers.

500

What is the genus of the club's unofficial mascot?

Hydrochoerus: genus of the capybara