Mimicking Immutability in Python with Type Hints

Immutable variables are supported by many languages, with some going even further by having immutability by default. Python is unfortunately not one of those languages. Still yet, we can leverage type hints and mypy to gain some of the benefits of immutability! Why do we even want immutability? First off, why do we even want to have immutability? Especially in a language like Python where achieving an acceptable level of immutability is nontrivial?

Consider Python's NewType instead of an Alias

Note: While the examples in this post are in Python, the information should be relevant to any languages with the NewType construct. Python’s typing module, introduced in version 3.5, allows developers to specify type hints for their methods and variables. These type hints can then be statically checked for correctness via a program like mypy. When used throughout your program and checked with mypy, they allow you to catch whole classes of bugs without ever running your program.

Linking Tourists to Local Cabin Owners

I believe there is potential in creating a central website that will showcase locally-owned cabins in the Red River Gorge area in Kentucky. The Red River Gorge area is a fairly popular tourist destination in southeastern Kentucky. It features hiking, camping, and world-class rock climbing, bringing thousands of people into the area every year. Tourists stay in a number of cabins in the area, providing a much-needed economic boost to the struggling communities.

How Computer Science and Philosophy Complement Each Other

When people first hear about my double major, they are usually surprised as computer science and philosophy seem like two completely different fields. While they have many differences, they both share many similarities, and I have found that they complement each other tremendously. First, a crucial aspect of both domains is taking a big problem or topic (like designing an application or arguing in support of utilitarianism) and breaking it down into small, manageable parts.

The FCC Must Uphold Net Neutrality Protections

Policy around Internet Service Providers (ISPs) has been in the public eye recently with the recent Internet Day of Protest in support of Net Neutrality. Net Neutrality is the position that ISPs have to treat all internet traffic the same regardless of the traffic. This is similar to how we expect the power company to treat “electrical traffic” (It would seem outrageous if the power company charged different rates for the electricity used by a TV opposed to electricity used by a refrigerator).

Why I Use Fedora Linux

My journey with Linux began around my freshman year of high school. I managed to stumble into some pretty bad malware, which left my (Windows Vista) laptop unusable. After desperately trying to fix it (to no avail), I finally went to my parents defeated. We ended up going to Best Buy to see what they could do. After a quick glance, they decided the only way to fix it would be to reinstall Windows, and this would cost us ~$200.

Microsoft TEALS - My Personal Experience and Its Lasting Impact

Technology Education And Literacy in Schools (TEALS) is a program started by a Microsoft employee to address the lack of computer science courses in high schools. The program matches software engineers in the industry to high schools without CS courses. The engineers teach the courses (Intro to Computer Science or AP Computer Science) at first, then the local classroom teacher gradually takes over. The goal is for the school to have a self-perpetuating computer science program within two or three years.

HiDPI Scaling with Spotify and Flatpak on Fedora Linux

I found some trouble getting my spotify client to scale correctly to my HiDPI screen after installing it. Hopefully this tutorial will help someone having the same problem. Install spotify via flatpak using the instructions and package provided by this Github repo. You can force spotify to scale to your display using the --force-device-scale-factor=X command line option. I find X=1.6 works the best for me, but this will change depending on your setup.

Ruci and My First Experiences with Rust

I recently finished CIS 198, a minicourse at Penn on the Rust programming language. Rust is a language that “runs blazingly fast, prevents segfaults, and guarantees thread safety.” It provides functional programming features while also giving you low-level control when needed. The feature that initially caught my interest is that Rust is memory safe without the need of a garbage collector. I never knew how much I would appreciate memory safety until I spent many late nights tracking down memory bugs in our operating systems project written in C.