Author: Lisa
Equations: The Card Game
We came up with a new card game today — something to practice adding and subtracting (and mathematical thinking). Deal x cards (we’ve had five and seven to start). The remaining cards are the ‘draw’ pile. Flip one card over. Try to come up with an equation using the cards in your hand that combine with the flipped card to make an equation. Aces are 1, jacks are 11, queens are 12, and kings are 13.
There’s a King up — you’ve got 2, 5, 8, 9, and Q. 12(Q) + 9 – 8 = 13(K). You select one of the cards in your equation to place on the top of the face-up pile. The next person then tries to create an equation using the card you laid down.
Zero is a little special — there’s a some card up, x. If you have two cards of the same value, y. X plus Y minus Y equals X … and you can discard one of the cards you used in your equation.
If you cannot form an equation, you draw a card. The game ends when the face-down pile is exhausted. Add the values of the cards in your hand, and the person with the lowest value hand wins. This means you probably want to discard the highest value card in your equation (unless there’s a strategy to having the card — if I have an equation with 5 and 10, but have another 10 in my hand … I might want to hold on to the ten because the two tens are a 0 and are a guaranteed play).
Listing Column Names For Oracle Table Without Describe
This approach can use “where COLUMN_NAME like ‘Something%’ too:
select COLUMN_NAME from ALL_TAB_COLUMNS where TABLE_NAME = 'TableName'
Excel – Setting a Cell Value Based on Background Color
I need to programmatically parse an Excel file where items are grouped with arbitrary group sizes. We don’t want the person filling out the spreadsheet to need to fill in a group # column … so I’m exploring ways to read cell formatting so something like color can be used to show the groups. Reading the formatting isn’t a straight-forward process, so I wondered if Excel could populate a group number cell based on the cell’s attributes.
While it is possible, it’s not a viable solution. The mechanism to access data about a cell cannot be accessed directly and, unfortunately, requires a macro-enabled workbook. The mechanism also requires the user to remember to update the spreadsheet calculations when they have finished colorizing the rows. While I won’t be using this approach in my current project … I thought I’d record what I did for future reference.
We need to define a ‘name’ for the function. On the “Formulas” tab, select “Name Manager”.

Select ‘New’

Provide a name – I am using getBackgroundColor – and put the following in the “refers to” section: =GET.CELL(63,INDIRECT(“rc”,FALSE))

Now we can use this name within the cell formula:

Select the rows for your first group and change the “fill color” of the row.

Repeat this process to colorize all of your groups – you can re-use a color as long as adjacent groups have different colors. Notice that the “ColorGroup” values do not change when you colorize your groups.

On the “Forumlas” tab, select “Calculate Now”

Now the colorized cells will have a non-zero value.

Insurance, pt 2
We finally got around to calling Progressive about the difference in my quoted price v/s their renewal price … ugh! The first person we spoke to started out with ‘just cancel the old policy & open the new one’. Which, great — except it’s a pain. And we lose the ‘perks’ that come with being a long time customer. Including some 250$ off the deductible. Start a new policy, have the bad luck to get in an accident, and saving 150$ just cost me 250$. Not a great deal, that. Plus our home insurance is tied in with the car insurance. And the only reason I didn’t just buy insurance from GEICO (who had the lowest quoted price) is that I didn’t want to screw with the home insurance right now.
Luckily, she transferred us to an insurance agent for help. He checked and there was no way they could price the policy we had at the price quoted under my name. He was able to move the reduced deductible over to the new policy (although it’s still a pain that they have no provision for just swapping the names … and it’s even more of a pain that the person listed first makes such a difference in pricing!). Final price was 164$ for more coverage than the policy they wanted 321$ !?!?! Only took an hour and a half to get there! And I’ve got a really bad feeling the same thing can be done with the homeowners insurance. 🙁
How much fabric *do* you need for a peppermint swirl dress?
I love the Peppermint Swirl Dress, and I’ve made a few of them for Anya. The 5-year-old size easily fit within four yards of fabric — two yards of each colour. The 8-year-old size fit easily in six yards of fabric — three yards of each color (and about a half-yard of one color was left over, the half-yard from the other was used for the top of the dress). I think the 10-year-old size will be tight with six yards of fabric … but it’ll be a few years before I know for certain 🙂
Fixing Scott’s Audio
For some reason, the audio on Scott’s Fedora laptop falls over (maybe when coming out of sleep?) The playback device gets set to some ‘dummy’ device and he’s got no sound. Solution — from his user account, run:
systemctl --user restart pulseaudio.service
Building Latest flite
I’m writing this down mostly to remember that I have built the latest flite instead of using the version from the Fedora repository.
git clone https://github.com/festvox/flite.git cd flite ./configure make
Voila, the compiled binaries for flite are in ./bi
Disbarment and Judicial Estoppel
As the impeachment not-quite-a-trial wraps up, I am left wondering if normal processes are applied to Senate impeachment hearings. Can, for instance, a lawyer get disbarred for standing before the Senate and making false claims? Does judicial estoppel apply when a defendant is simultaneously asserting X and NOT X in the impeachment and another legal proceeding?
Parade of Horribles
A parade of horribles is not always a fallacy . Yes, the rhetorical device is often used in inappropriate manners; but the fact it can be misused does not invalidate the technique in toto. The parade of horribles which stems from accepting the parade of horribles as a valid reasoning tool do not render the rhetorical device a logical fallacy. When someone marches out this particular class of argument, the validity of the argument needs to be determined in its specific instance. Horrors which will occur either way do not make a persuasive argument. Horrors which are very likely to occur and are actually horrible compared to any benefit from the argument? The parade is a legitimate argument.
I find myself thinking a lot about these parades while watching the Senate Impeachment trial. There are horrifying consequences to accepting some of the Defense’s positions. Dershowitz proclaims that “Every public official that I know believes that his election is in the public interest; and, if a president does something which he believes will help him get elected in the public interest, that cannot be the kind of quid pro quo that results in impeachment.” How is that a reasonable position? Not holding the next election is “in the public interest” … but quite clearly an offense against the core tenants of this country.
Their argument fell apart a bit because it essentially exonerates Nixon — he wanted to get re-elected “in the public interest”, had people break into the Watergate to increase his re-election chances … and saying that Nixon is different because he destroyed evidence is a laughable contortion. Didn’t he destroy evidence in the nation’s best interest too?