Sunday, December 19, 2010

Today, +/- n days

Searching on google and stackoverflow wasn't much help; also, "man date", "man cal", "man calendar", "man time", etc are limited in there accuracy; so here:

What is today's date plus n days, let's say 61 days*?:
date -v+61d
Answer:
2011-02-18
Calendar marked.

*: This is the question that came into my head after reading this.

While I applaud them for making a testable claim, I doubt this. The stone age didn't end because we ran out of stones. But who knows, this time may different. Maybe some of us will have to start carrying around unmemorizable IPv6 addresses. Maybe we'll find a way to memorize them. Maybe IPv4 really was a gross underestimation of our capacity for connectedness (and maybe IPv6 isn't). We shall see; and thankfully soon.

Monday, December 6, 2010

Sex, not gender

Continued from here (where I seem to have reached the thread's size limit), regarding Disapora's choice to use a text field for Gender instead of a drop down for Sex:

I agree that sex is not a simple binary, although the vast majority of the human population is not hermaphrodite or neutered. But let's consider that n%, as I'm sure you'll agree it is the rights of the minority that are the most important when considering how to design a new society like Diaspora.

Are anyone's rights being infringed up by having a drop down for Sex (options being Male, Female, Other, ..) instead of a text box for Gender? You say such an approach would implicitly treat them as freaks- funny your usage of "implicitly" here, as though I am implying anything. I am not. If such a conclusion is reached, it is by inference, i.e., someone else is inferring it. In other words, it is their problem that they would think I am calling them a freak, not mine. Sorry to get tautological here, but if they are not male or female then they are not male or female, and as such should be given an option for neither. This says nothing about whether or not they are freaks. Any reading into it as such is just bringing one's own prejudices where they are not justified.

As far as denying their existence by giving them this option- um, no? Isn't giving them the option in fact recognizing their existence? Wouldn't it be a denial of their existence if the option wasn't given?

Think of it another way: gender is subjective. What is masculine in one culture may be feminine in another. What makes me manly in my eyes could make me womanly in yours. Sex on the other hand is objective. I either have a penis or vagina or neither or both. I may feel manly today and womanly tomorrow, but the sexual organs I have do not change on a daily basis. Male in Italy and Australia and 13th century France is male in America, today, yesterday, and tomorrow.

I want my user profile to reflect the fixed status of this aspect of my objective self. It seems other people want to have a non-fixed reflection of a subjective aspect of their self. Fine. How about this for a compromise: give users both the free-form text field for Gender and the drop down for Sex. This solution recognizes the validity of both our points, as I believe there both are. As it is right now, Diaspora is limiting its appeal by excluding people with preferences like mine, and I'm sure you'll agree that maximizing its appeal would be good for Diaspora.

Thursday, December 2, 2010

Friend looking for employment

Anybody need pet-or-house sitting or house cleaning services? I have a friend who is in desperate need of funds. She has references and experience in these things.

Monday, October 18, 2010

testing 1

this is one of many test posts i'll be making today; these posts are only tests meant to debug an external system; had this been an actual post, you would not be encouraged to ignore this. this is only a test.

Friday, May 28, 2010

Why is my ASP:Image not accessible from the vb?

I just figured this out. Figured it might bite someone else someday.

Given this code in an aspx file:

<table width="100%">
<tr>
<td class="normaltxt10" colSpan="50">
<!--
<asp:DataGrid id="dgImage" runat="server" ShowHeader="False"
AutoGenerateColumns="False" TabIndex="5">
<Columns>
<asp:BoundColumn Visible="False" DataField="file"></asp:BoundColumn>
<asp:TemplateColumn>
<ItemTemplate>
-->
<asp:Image ID="screenShotImage" Runat="server"></asp:Image>
<!--
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
-->
</td>
</tr>
</table>


Why would screenShotImage be not accessible in the vb code behind?

Answer: because it's in the commented out DataGrid, and in my case, dgImage wasn't referenced at all in the vb.
Removing the commented out DataGrid will fix this.
Like so:

<table width="100%">
<tr>
<td class="normaltxt10" colSpan="50">
<asp:Image ID="screenShotImage" Runat="server"></asp:Image>
</td>
</tr>
</table>

This is stupid in my opinion, but whatever. Now we know.

Monday, April 12, 2010

Far as a rental car can go

Gosh, I love driving the hell out of a rental car. I mean, it's not mine, and so long as I don't total it or get caught, no repercussions for me, right? I won't have to live with this car for very long, don't have to worry about any long term maintenance of it, so I can use it and abuse it with reckless abandon. The sheer acceleration that I'd never do in my car, knowing that it's all consequence-free because it's not my property that I'm fooling around with, there's simply No Comparison to that kind of thrill, is there?
If only I could live, constantly and henceforth, with the joy of non-ownership of that which I have: a house that I don't have to clean, friends that I don't have to be nice to, a body I can just totally let go of- that would be awesome. And if everybody else could do the same, surely that would be heaven.

Thursday, April 8, 2010

Output from a friend's cool applet



From here to here.

Must come back later and fool around with this some more.
I think my nephew (who has shown interest in animation) would really enjoy this.

Sunday, April 4, 2010

Heh

Working with XSL right now:

<xsl:choose>
<xsl:when test="1=1">
1=1
</xsl:when>
<xsl:otherwise>
1=2
</xsl:otherwise>
</xsl:choose>

prints out 1=1.
But

<xsl:choose>
<xsl:when test="a=a">
a=a
</xsl:when>
<xsl:otherwise>
a=b
</xsl:otherwise>
</xsl:choose>

prints out a=b.

So, a does not equal a, eh?

Friday, March 26, 2010

Perhaps someone can explain this to me

Let's start with this:
http://factcheck.org/2010/03/a-final-weekend-of-whoppers/

I'm glad to see a low-bias, honest presentation of the facts. One fact, though, that I don't see emphasized enough (here and in a lot of other places) is this: "mandating that individuals buy coverage". Why is this okay? Why would this not be seen as an outrageous affront to my personal liberty?

I've heard that if one does not accept the mandate, one must pay a fine, a non-insurance fee. The rest of this rant is based on the quite possibly false assumption that this is true.

Consider this. Let's say I give you the following choice: either you
1- chop off one of your feet and I give you a magical golden blanket that keeps you from getting sick (maybe); or
2- chop off one of your toes. You get nothing in return and your toe goes into a pot to help pay for other people's magical golden blankets.

Now, nevermind which option you choose- you can decide on your own time and keep that to yourself. What I want to know is:
Is it a good thing that you are being forced to make this choice? Hypothetically, am I a good person for forcing this choice upon you?

I'm sure I'm missing something here and I'd greatly appreciate someone telling me what it is, please. I'm honestly curious. If I'm not missing something, then I'm just baffled.

Wednesday, March 17, 2010

Set with Select

Today's forehard slap is brought to you by the following:

This is a perfectly valid syntax for setting a local variable using SET which gets its value from a SELECT:
set @VAR1 = (select var1 from table1 (nolock) where var2 = @var2 and var3 = @var3)

This will bring your company to a grinding halt and leave everyone breathing down your neck till you fix it:
set @VAR1 = select var1 from table1 (nolock) where var2 = @var2 and var3 = @var3

Be careful to note and recall the difference.

Thursday, March 11, 2010

Today I learned a little about robocopy and exit codes

So, not satisfied with the old DOS command "copy", I decided to step it up a notch and start using robocopy. This way, instead of overwriting the same files every time I rebuilt my solution in VisualStudio, I could skip over those and only update the files that had changed. And there was much rejoicing.

But lo, this tale would have ended much too soon and boringly if that was all there was to it. No, unlike copy, robocopy has the added bonus of exitting with a non-zero value when actually copying a file (and when not copying a file: either returning zero or not returning anything at all- it looks the same to me). VisualStudio interprets any non-zero exit code as "FAIL!". So, digging around, I found the way around this: in the bat file with all the robocopy calls, make the last line something other than a robocopy call, like: echo "Done."

Done. Yay!

Sunday, February 28, 2010

Code Coach

Regarding the state of the economy- a lot of what sucks about it right now is the bursting of the housing bubble, which has resulted in housing construction to dry up. What could really help get things moving again would be if someone were to make a program that was a graphical user interface for the housing code, something that translates from architectural regulation language to layman talk.

Oh look, a friend of mine did just that:
http://www.codecoachresidential.com

Definitely worth checking out if you're considering making some home improvements anytime soon.

Friday, February 12, 2010

British libel reform petition

(a) British libel laws have been condemned by the UN Human Rights Committee.

(b) These laws gag scientists, bloggers and journalists who want to discuss matters of genuine public interest (and public health!).

(c) These laws give rise to libel tourism, whereby the rich and the powerful (Saudi billionaires, Russian oligarchs and overseas corporations) come to London to sue writers because British libel laws are so hostile to responsible journalism. (In fact, it is exactly because British libel laws have this global impact that we welcome signatories to the petition from around the world.)

(d) Vested interests can use their resources to bully and intimidate those who seek to question them. The cost of a libel trial in England is 100 times more expensive than the European average and typically runs to over £1 million.

(e) Three separate ongoing libel cases involve Simon Singh and two medical researchers raising concerns about three medical treatments. They face losing £1 million each. In future, why would anyone else raise similar concerns? If these health matters are not reported, then the public is put at risk.

Sign the petition

Sunday, February 7, 2010

A little story about MetroPCS

So, last year from about February till around September I was on MetroPCS. I was content with their mediocre reception, but was always irked that while on the 45 $/month plan, I was actually paying around 52$ and change with taxes and fees. Then I saw that Boost's 50 $/month included taxes and fees. So I gave Boost a try and was again sufficiently satisfied.

Then this past week I notice that MetroPCS is advertising a plan 40$/month, taxes and fees included, with everything I want. Be still my beating heart, they know how to win me back. So Saturday, I return to MetroPCS. (The lovely sales rep who helped me get reconnected was very pleasant, by the way.) Then this morning, today, Sunday, I wake, try to make a call and get a "You have insufficient funds" message. How odd.

I take my phone back to the store with my receipt and am told that while I ordered and paid for the 40$ plan, the system actually has me on the 45$ plan, which is really weird because I was able to make and receive calls yesterday no problem. The guy who is helping me now asks his neighbor coworker who did this. His neighbor tells him who and wonders aloud why she did that. I notice him, the guy who's helping me murmur "I know why..." One mississippi. Two mississippi. Three mississippi. Ok, the suspense is killing me: "Why was that done?" I ask.

I won't forget what he said. Clearly I remember him saying "It's a confidential company policy."

Excuse me?! You mean there was a reason why I was overcharged? This was done intentionally, causing me miss calls for half a day, and making wait in line in this cramped crummy store for half an hour for this terse explanation? Whatever could this secret policy be? It couldn't be that there is a plan to get customers back in a store in the hope that they might buy some more stuff, could it? I try to get some clarification, but of course, it being confidential, get nothing. Just a "Okay, you're all set. Have a nice day."

Oh, MetroPCS. Alas, this rekindling of our love was so brief. Back to Boost I go.