allyourcode
not enough meta
Saturday, May 1, 2010
Arizona Goes Bonkers Over Immigration
Anyway, that's the basic argument against the law, which to me is obvious and uninteresting. The actual reason I started writing this was to respond to a caller on the Diane Rehm Show who probably represents a large (mis-informed) segment of the American population. The point he was trying to make was that Arizona is trying to enforce existing immigration law, and should not be vilified for it. Nobody is arguing that the Arizona is doing something wrong by trying to enforce existing laws. In fact, opponents (such as myself) are arguing that this law breaks other laws, and that it violates our values with respect to the Fourth Amendment. Basically, the police cannot stop someone based solely on the interest of stopping crime; they have to have good reason to suspect that someone is engaged in illegal activity. For example, let's say you're driving down the freeway without exhibiting any kind of illegal or even unusual behavior. If the police stop you, your rights have been violated. Unless the they give you a particularly bad time, you're probably better off just letting it go as a honest to goodness one-off mistake. The problem with this law is that it implicitly sanctions this kind of behavior a large scale. People's rights will be violated on a consistent and systematic basis.
The people I'm talking about here are those who "look like" illegal aliens (whatever that means), but who are actually here legally. Again, there's no way tell an illegal alien apart from anyone else as long as he or she is just going about his own business. White folks probably don't have much to worry in terms of the police bothering them about their residency status. On the other hand, anyone with brown skin, speaks Spanish, or speaks English with a Spanish accent will feel that they are under a higher level of suspicion, and they would probably be right. If this isn't a clear case of discrimination, I don't know what is.
Saturday, April 17, 2010
The Wrong Reason to like git
An example of a feature that I actually care about is being able commit without a network connection. Of course, sharing your work with your team requires you get on the network at some point, but at least you can create a local checkpoint for yourself until the network becomes available again.
On the other hand, if all you care about is being able to create little checkpoints that you don't have to share with everyone else, you could just use Eclipse, which maintains a local history for you
Monday, March 15, 2010
R.S.V.P.
I completely understand where Rand is coming from. I noticed something similar when I was the president of the CSUA. Between our weekly meetings, I used email to communicate about what we were doing. I hardly
My theory is that it's become socially acceptable to not respond to emails. Many of us receive tons of emails every day. If we had to spend the time to respond to each one, we'd never have time for anything else. I'm not saying that
To me, this is a symptom of an even deeper problem not having to do with people becoming more rude over time: email is cheap. By this I don't mean that technology has made it inexpensive to send letters to one another, although technology has something to do with it. What I'm more concerned about is how people regard email, and the effect this has on society.
Part of this has to do with how easy it is to send an email to multiple recipients. Many of us know someone who blindly forward pictures of cute kittens to everyone on their contact list without regard to whether people are actually interested in receiving such emails. This contributes to the phenomenon of overstuffed inboxes, which leads to the habit of ignoring emails. Once we realize that we just don't care about some emails, we begin to ignore them. Over time, this practice extends to other sorts of emails, such as those about social engagements, or running a club.
"Email is cheap" also means that we're not willing to spend much time on them. Some people seem to undergo grammar lobotomies prior to writing emails, because they don't don't even sound like themselves when they talk to you in person. In the extreme case, I've found people who distill their messages down to keywords until it reads like a PowerPoint presentation.
The "PowerPoint syndrome" isn't restricted to text-aholic teenagers. In fact, I've found it to be more of a problem with adults who seem to think it makes them sound more business-like. If that's the case, then it really says something about communication in corporate culture. Spending the time to write a thoughtful email somehow seems to be considered "inefficient". Again, this sort of thinking almost makes sense when we consider the fact that we receive too many emails per day, and that email is cheap. In an office setting, it's much less acceptable for emails to go unanswered, yet our work inboxes probably receive more email than our personal ones. The natural way of coping is to skimp on the contents of our emails.
Another problem is that its much to easy to blame missed emails on technological problems. Even if an email is successfully delivered, that doesn't mean that spam filters won't prevent the person from actually receiving it. Overstuffed inboxes also contribute to "missed" emails, whether they be honestly overlooked, or ignored under the cover of having been missed because of some technical mishap.
Unfortunately, I don't see these social changes in the way we communicate changing any time soon, unless we start to see them as pathologies, and not as "modern progress". I can easily imagine people reading Rand's piece and thinking, "This guy needs to keep up with the times. He's just too old fashioned!". That's almost certainly what the recipients of his last email were thinking, especially those who never ended up responding. It's almost paradoxical how technological advancement has lead to declines in our collective communication skills, but that seems to be what's happening.
Sunday, February 7, 2010
Finite Regular Languages
http://groups.google.com/group/comp.lang.python/msg/dcb5c509954d187e
I wrote a response, but decided not to send it to the list. Instead, I am posting it here:
Just because a problem P reduces to the Halting Problem doesn't mean that P is not computable. It's the other direction that gives you problems: if the Halting Problem reduces to P, then P is not computable. In particular, a regular expression halts on any input.
As for whether the language of a regular expression is finite, I don't imagine it would be that difficult. All you need to do is check whether the * operator is used. This follows from the following lemma:
Let e = e1 (concat|union) e2. L(e) finite iff L(e1) and L(e2) finite.
On the other hand, I would imagine that there's no good way of calculating |L(e)| in o(L(e)) time. My intuition is based on the difficulty you'd run into when counting L(e1 union e2). I just can't imagine how you'd avoid trying to figure out where L(e1) and L(e2) overlap without enumerating both :/
Monday, January 18, 2010
PHP, why no try/finally?
This is in response to a rejected feature request in PHP: Request 'finally' support for exceptions. What I didn't realize was that PHP doesn't allow you to comment on closed bugs. I thought it'd be a shame to have spent the time and effort writing up a response only to have it go to waste. Here's what I had to say, before the PHP bug system tried to silence me:
I believe try/finally is supposed to make the following pattern cleaner:
try {
danger_will_robinson();
} catch (RobotException, $exc) {
clean_up();
throw $exc; // let the exception bubble up so that the caller can take appropriate action
}
clean_up(); // make sure this happens even when there was no exception
try/finally provides two significant benefits here:
- you don't have to re-throw
- you don't have to copy cleanup code that's supposed to run regardless of whether an exception occurred
Here's what the above example would look like with try/finally
try {
danger_will_robinson();
} finally {
clean_up(); // one copy of your unconditional clean up code
}
I don't think there's anything wrong with this solution. To the contrary, it seems quite natural to me, and I believe others would find it fairly intuitive as well.
As far as why Java has this feature, I don't think it's because they needed a work-around for some other Java-specific oddity. It just makes sense whenever your language has exceptions.
Friday, December 18, 2009
Survial of Senate Health Reform Bill Uncertain
Friday, December 4, 2009
Glassdoor.com, please improve your reviews
Salary data is nice, but they also have employee-written reviews. Of course, you're not likely to find reviews on small companies, but it seems that any large company is going to have a healthy set of reviews. The problem is that most of the reviews are very shallow. I think this is because of the format they have chosen to use, which consists of three sections: pros, cons, and advice to senior management. I think the last section adds an interesting twist (although I find that most reviewers do not know what to do with it), but all three sections encourage people to just list bullet points, instead of providing thoughtful reviews.
An example of the "bullet point" style that I really hate is when someone says he or she really hates (or in the rare case loves) the corporate culture. This really doesn't help the reader figure out whether he or she would enjoy working there, because a culture that suits the reviewer very well might be a reader's worst nightmare. One thing that would really help clarify these points would be examples of actions or behaviors that the reviewer has observed that demonstrate exactly what kind of culture exists within a company. Perhaps, the three-section format makes it easier to write a review by providing a framework for people to work with, but I think it has an overall negative effect on the quality of the reviews that users submit. Even if you want to write a detailed review, it just doesn't feel like you have space to do it in.
The other thing I don't like about their reviews is that you cannot sort them by helpfulness. Basically what they have is a mini-form where you can give a review a thumbs up or down on whether you found it helpful. This feature is of very little value, because if 10 people write low-quality reviews the day after you write an extremely luminary one, yours will get pushed down the display order. I can see why it would make sense to sort by date, but what I really want is to be able to sort by helpfulness. This should not be difficult to implement, since they already the up or down vote feature.