Monthly Archives: July 2011

Today’s note to Speaker Boehner. Raise the debt ceiling. Raise my taxes. Reduce spending. In that order.


(I sent essentially the same points to our Senators and Representative Lee too.)

Speaker Boehner,
Budgets, a borrowing limit and taxes are the topic du jur. Here are my priorities:

#1 Raise the debt ceiling. The Tea Party wackos can say anything they want, but they don’t have a majority in the congress to override the veto of the Adult in Chief, nor do they run the Senate. You’re playing “dog in the manger” and it belittles you, your party and our country. You’ve stated your opinion. The nation does not agree. Time to do the people’s business, without gimmicks or gotchas.

#2 Raise my taxes. We’re well off. Really. If we’re paying 17%, of our income in taxes, as Turbotax tells me, then it should probably be 18% or 19%. Thousands more, per year. Giving rich people tax breaks and living on the credit card is crazy. Time to stop. Paying down the accumulated debt would be good too.

#3 Cut spending. Start with all the things people say they now get that they don’t need. Not what other people get, what they benefit from themselves. Don’t cut something that benefits Paula to make Peter happy. People willing to give their own money, in the form of higher taxes, or forgo benefits they enjoy, lower payments, have something to say. People who want to cut other people’s benefits or get a net reduction in what they pay and have someone else fix the problem aren’t worth your time. That would include the majority of the Republican Party and pretty much all of the Tea Party.

Stand tall. Show some leadership. Propose an unconditional rise in the debt ceiling, at this late hour, and see who the real patriots are. Stanley Crouch once observed that not getting what you want is a democratic act. Perhaps the fundamental one. Kings and dictators and juntas rule by inspiration and conviction. Democracies are ruled by compromise.

Cutting billions of dollars in spending at the last minute under intense pressure, while the tinfoil hat brigade just want to wreck everything they don’t understand, isn’t any way for our great nation to be governed. You’ve had months to prepare for this business. Tossing out plans the CPO hasn’t scored yet isn’t doing what I pay you for. Your district elected you, but having asked to be Speaker, you work for me too. You’re doing a terrible job. Come to your senses.

Raise the debt limit. Raise my taxes, and your own. Cut spending on what we can’t afford. Or step aside and let an adult take the job.

Best regards,
Bill Abbott

abbott.bill@gmail.com

Advertisements

Escape (‘\’) your “\” (backslash) characters when Python writes paths for Windows…


When using Python to prepare strings For Windows, always escape ‘\’ your “\” (backslash) characters in a path name. So ‘\\’ everywhere. It looks like a double ‘\’ but the first one is really “escape” and the second character is interpreted as a literal, not, in this case, as ‘escape’…

What am I talking about??

If your Python program will create file path names for Windows computers, you need to be extra thoughtful as you enter string constants for them.

For example, consider the string "blather\pather\gather"
Give that to the Python Interpreter, and it will show you how it is understood by Python:

>>>
>>> "blather\pather\gather"
'blather\\pather\\gather'
>>>

See what happedened to “blather\pather\gather”?
Python put an escape back slash before each of the (presumably) literal back slashes. Its easy to see if you line them up:

"blather\pather\gather"
'blather\\pather\\gather'

The string delimiters have changed too- python gives ‘ and ” the same meaning, defaults to ‘ and requires them to be used in pairs. ” is an empty string, “” is an empty string, ‘” opens a quoted string inside a quoted string. Better not close it backwards: “”” is an empty string. “‘”‘ is missing a close “.

So far, so good. You might think Python will understand back slashes in things you identify as strings and respect them. That’s nice.

Change the string to
"blather\rather\ather"
>>>"blather\rather\x07ther"

What’s that?? Turns out that Python recognizes “\r” as (carriage return), “\n” a newline and “\t” as a tab. And \a as (control)a, with is slightly startling. But not \G or \g as “bell”…

So they’re compound characters, and they get issued without escapes being added. Why? I don’t know. But I do know that putting an excape backslash before the delimiter backslash results in the text being left alone, and written out exactly the same. And when it goes to Windows, Windows strips off the first backslash and correctly interprets the second one.

Here’s an advantage for Python, as my friend James points out. You can just look at what it does and how it sees things. The realization I’m reporting started wth a Python script trying to call a Windows .bat script… it worked well for some .bat scripts and didn’t work for others. ?!?!?!

Searching for apples and oranges, using grep.


Not using grep? Its a step up from sorting and cutting and pasting in spreadsheets. You will feel, briefly, omniscient, when you use it to solve some problem that’s been bugging you. Here’s my latest:

You care about two keywords in a file- apples and oranges, and you also care about about their relative positions, for whatever reason. So grepping for each, separately, is nice, but you’d really like to grep for one OR the other.

Did I mention this was grep?

grep -i ‘apple\|orange’ *filename.ext*

The -i makes it case-insensitive, just like you’d want on a first pass. The “|” vertical bar is a familiar OR operator, and the only tricky parts are to a) put the whole thing in a single set of single quotes- the two words and the operator are a single syntactic unit, and b) use a back-slash to mark the vertical bar as an operator and not just a literal vertical bar.

I used apple and orange in the title because they are canonically “unrelated” things, but where this technique is really useful is when the unrelated things are in orthagonal kinds: fruits and deserts. If you’ve got your recipes filed or a cookbook on line, grep -i ‘pie\|apple’ will produce all the refernces to either. Pies involving apples will be found where ‘apple’ has ‘pie’ both above and below… As a human, you have a right to do that last bit in your head, the sorting out that we gatherer-hunters are bred for.

Lego Album Cover Art: More questions than answers!


First, have a look. If you are in the cultural group that recognizes these symbols, you may get a giggle:

href=”http://blog.flickr.net/en/2011/07/02/lego-album-covers/

Second, remember (or remember hearing about) all the tiresome discussions of

whether song lyrics were poetry, or could be;

whether album covers were art, or could be;

whether representations of real things were art, or could be;

whether non-representational collections of colors, textures, objects and lighting effects were art, or could be?

blah blah, blah blah blah, (Don’t forget gender, gender-role, ethnicity, class and other forms of differentiation…)

Well, faghedaboutit, ok? This is fun, not work!

And my hearty thanks to the makers of this work. And what it represents, imperfectly.

Cheers!
Bill