Archive for the ‘creative’ Category

McCain a Panamanian Sleeper Agent?

John Noriega McCain is foreign-born! What if Panama considers him a citizen? His loyalties could be dangerously divided! How can we trust this man to not be a Panamanian sleeper agent? Look at him, proudly embracing the costume of his true homeland:

John McCain, in the costume of his native land

Maybe all of these zealots who are swayed by his fancy speeches and claims of patriotism are willing to elect this dangerous man to be our commander in chief, but I am not! Spread the word…

Diagnosis of Inferior Social Proclivity Disorder in Young Adult Patients: A Case Study

Rodgers N. Hart, F. Sinatra, and E. Fitzgerald, Lorenz Institute for the Advancement of Clinical Psychology

Note: This paper has also been accepted for publication in the Annals of reformat_songs.

Introduction

Inferior social proclivity disorder, or “trampiness”, is commonly mistaken for adjustment disorder not otherwise specified. However, this condition is surprisingly common in early post-adolescent patients, especially females. We examine the diagnosis and treatment of one patient, who we shall refer to as Lady. Lady, when she began treatment, was a 24-year-old who referred herself to our private practice. She had become increasingly concerned over her difficulty in forming social relationships at her place of employment, a finishing school.

(more…)

Introduction to Unit Testing

Notes for a lecture given to Brandeis University’s COSI 22a.

What Is Unit Testing, and Why Should I Care?

Unit testing is the process of writing tests for individual bits of your program, in isolation. A “bit” is a small piece of functionality. We’ll discuss how small later. How can you know whether or not your program works if you don’t test it? If you’ve ever lost points on a programming assignment because something didn’t work right, you could’ve saved yourself from that by testing your program.

If you go on to take COSI 31a, you will do better on the programming assignments if you write tests! More importantly, it’s a good habit to get into as a programmer. Having tests for your code turns programming from an art — “gee, it looks right and seems to work, I think I’m done” — to a science —; “this is the evidence I have to support the claim that my program is behaving correctly.”

Unit testing is one of the easier ways to get into all the nooks and crannies of your code and make sure it’s doing the right thing. The act of writing tests often helps reveal areas where it isn’t clear what it means to do “the right thing.”

(more…)

The Design of Laptop “fn” Keys

On every PC laptop made in the past 5+ (10+ ?) years, many of the “F1” (F2, F3, …) keys, and sometimes some of the other keys (the arrow keys in particular) serve two purposes. When pressed normally, they act as their respective key — F1 acts as F1, etc. However, when pressed in conjunction with the “Fn” key, they perform a special function indicated by an icon on the key. Usually both the icon and the label on the Fn key will be blue (whereas the other key labels are white.) For instance:

Demonstration of Fn-modifiable keycaps

Today, one of my professors tried to hook up his laptop to the projector and was befuddled when it didn’t work. As soon as I saw him struggling, I knew that the problem was that he had to turn on the external video out. PC laptops typically have three display output modes: internal LCD only, external (VGA, or sometimes DVI these days) connector only, or both internal and external simultaneously. In order to change the mode, one typically has to either use the Fn function of one of the F keys (typically F5, F6, or F7.) Sometimes it can also be done through some buried option in the Display control panel.

The reason I knew that this was a problem is because almost every single professor who I’ve seen hook a laptop up to a projector has had to do this and had no idea what they had to do or how they were supposed to do it. The notion of hitting Fn in conjunction with some other key didn’t even seem to occur to them. Here’s something that’s a common thing to need to do, and laptop designers have tried to come up with a design that affords doing it (Fn is always next to Ctrl, so it should be natural to interpret it as a modifier key, and the color labels reinforce hitting Fn in conjunction with specific keys), but their design has failed, even after it’s been around for so many years and people have had a chance to get accustomed to it. Why doesn’t their design work? (And why do they keep using it?) (more…)

Enhancing Machine Translation via Frame-Semantic Data

I’ve just finished my final assignment for the semester, a paper for LING 190. Click the title for the full text of the paper, read the abstract below, and see the cut at the bottom of this entry for a layperson’s explanation of the technical bits.

Enhancing Machine Translation via Frame-Semantic Data

Abstract

Frame semantics is an approach to examining meaning in natural language by considering clusters of related concepts. For instance, in the “commercial transaction” frame, there is a buyer, a seller, goods, and money; different predicates in this frame will place these agents in different syntactic roles, so, in English, the buyer will be the subject of buy while the seller will be the subject of sell.

Frame semantics presents a powerful aide to machine translation. Frame-semantic knowledge of an input phrase facilitates more precise word-sense disambiguation and allows greater flexibility in deciding which of multiple valid word orderings to emit in the target language. I have demonstrated this by creating a rudimentary system for translating from Spanish to English which can optionally take advantage of frame-annotated input, and then testing this system on a small corpus of phrases in the commercial transaction frame. (more…)