Blog Articles 111–115

Simplifying US Visas

H1B’s. U-visas. J1’s, F1’s, guest worker permits, green cards, tourist visas.

There are too many types of visas. And they’re too temporary, too revokable, too dependent on the whims of a ‘sponsor’.

How about simplifying to just three groups of people:

  • Citizens. Born or naturalized.
  • Residents. Persons residing long-term or permanently in the country. They are entitled to all the rights and privileges of citizenry except voting, holding elected office, and possibly armed service. They can work, go to school, or whatever. Since continued residency is not required to maintain resident status, international commuters can classify as residents. Residents are eligible for citizenship after a reasonable waiting period (say 5 years, spending 54 of the last 60 months in the country), a civics test, and maybe an English proficiency test.
  • Visitors. Persons in the country temporarily. They only reason this category exists is to let people into the country for business or pleasure without setting up a taxpayer number for them. The ‘temporary’ is not enforced. Visitors probably don’t qualify for many social services, except for health care (if/when we get public health care). If a visitor wants to stay long-term, they can go to their local immigration office, fill out a bit of paperwork, and get their taxpayer number.

I See Scared People

“If you see something, say something!”

I see it at the airport, at the bus terminal, at the train station. It is painted on the bus (yes, I’ve seen a full-wrap bus ad for it). The DHS tweets it.

Only you can prevent terror attacks!

My fundamental problem with this campaign is that it encourages us to be suspicious of our neighbors. Even if the authors intend them to simply encourage alertness, these messages prime us to view the world through the lens of suspicion.

Big-O meets the world

Daniel Lemire wrote a good article on how big-O notation is a great teaching tool but not the end of the story.

One example from a previous project I worked on: bubble sort. Bubble sort is conceptually simple but analytically troublesome. It is O(n^2); its analysis, while not difficult, is not as straightforward other sorts; and worst for practice, its worst-case scenarios are are common (unlike quicksort).

It does, however, have excellent constants (due to its simplicity), great cache locality (in part due to being in-place), and near-linear runtime on almost-sorted data.

I was working on a 3D graphics project and, to render alpha-blending, I needed to draw my faces in sorted order by depth. I started using the STL’s generic sorting algorithm (a hybrid merge/insertion sort), but my redraw was slow. However, as the user rotated and moved the object, the faces wouldn’t get very far out of sort from frame to frame.