FileCopyPolicyIsRemote method kinda shows the whole pattern

bool FileCopyPolicyIsRemote( Host h, string filename )
{
string host = h.Name;
/*string[] splits = filename.Split(new char[] {‘/’,’\\’} );// slash or backslash
string basename = splits[splits.Length-1];*/
string basename = Path.GetFileName(filename);
Match m;

if ( FileCopyPolicy==”overwrite” )
return true;
else if ( FileCopyPolicy==”rotate” )
return true;
else if ( FileCopyPolicy==”uselocal” )
return false;
else if ( ( null != (m = Regex.Match(FileCopyPolicy, @”uselocal-(\d+)day” ))) && m.Success )
{
short days = Convert.ToInt16(m.Groups[1].Value);
string returnfile = LocalCacheDirectory + host + Path.DirectorySeparatorChar + basename;
if ( File.Exists(returnfile) &&
( File.GetLastWriteTime(returnfile).AddDays(days) > DateTime.Now ) &&
( new FileInfo(returnfile).Length != 0 )
)
return false;
else
return true;
}
else
return false;//unknown policy

}

Free Opera

Whoo hoo!!!

I’m very happy to lose that 20 pixel ad bar at the top of my Opera browser.

Thanks to Chris Sellers for sending me the link http://my.opera.com/community/party/ so I can get a free registration code in celebration of Opera’s 10 year aniversary.

Opera 8 is really the first release that I’ve used which feels on par with Firefox and IE in terms of web standards and rendering pages. Previously it always seemed to lack just one or two things on my requirement list. Opera 8 is so good and fast that it beast Firefox and IE in speed IMO. It just /feels/ fast.

Thanks Opera people.

Stupid code – aka gnome-session phantoms

This could be some of the worse code I’ve ever seen:

snipit from
the cvs

static char* address = NULL;

if (! address)
{
g_warning ("Host name lookup failure on localhost.");

address = g_new (char, 10);
srand (time (NULL) + (getpid () < <16)); g_snprintf (address, 10, "0%.8x", rand()); };

I discovered it because my gnome login takes about 5 minutes and the message:


(gnome-session:15027): WARNING **: Host name lookup failure on localhost

is the last thing in my .xsession-errors file.

Well, if you know almost any programming language you can read the above C and understand that this error message will always be displayed.

It is not a big deal, now I have to go down another path to solve my problem, but my point is that I shouldn’t have to. It is discouraging. It is what drives people to the “format and reinstall” mentality of Windows users of the past. I moved to Linux because I did not like the “format and reinstall” menatlity. Now, it seems like the tinkerers in Linux land format and reinstall more often than the workers of Windows. Windows 2000 was good, and Windows XP is excellent(except for the horrible fragmentation habits of NTFS). I’m glad that Linux sparked the competition needed to get Windows more stable and usable, but now lets do it again with Linux. Lets clean up these crazy bugs, incorrect and unhelpful log messages, and make Linux just a little better.

I hope the above is not counter productive. I still find the $199 and $299 Full version prices of XP Home and XP Pro completely unacceptable. I will not steal software. Linux is the best alternative. Ubuntu is doing an excellent job. I’m sure much of my problem stems from my installation being a 4.10->5.04->dev branch installation. The reason I run the dev branch is to come across these types of issues and try to help solve the problem. I’m just trying to do my small, tiny, miniscule part.

Things I didn’t know I hate about MS SQL Server 2000

Things I didn’t know I hate about MS SQL Server 2000

No Except operator (aka Oracle Minus). Its called a Relational Database Management System because the databases are supposed to be telational. I suppose I expect too much because I can think in Tuple Relational Calculus and Relational Algebra. Not being able to do simple set arithmetic is quite pathetic. I realize tha SQL Server 2000 is now nearly 6 years old, but please, I’m pretty damn sure PostgreSQL had Except back in 2000. This limitation leaves me feeling like I’m using MySQL.

User defined Functions aren’t allowed to reference or use TEMP tables??? Huh? What kind of restraint is this? In every other RDBMS I’ve used, (very little Oracle and PostgreSQL. MySQL does not count) the difference between Functions and Stored Procedures is almost none. Shouldn’t a Stored Procedure be just like a function which returns no value? Surely I’m missing something on this point. I’m no DBA. Reasons aside, this is a painful restriction.

The combination of the above two restricts me further. I would use the later to work around the former, but alas. I cannot.

RE: Childhood’s End

This is one of the most enlightened and enlightening posts I’ve read in a while. I liked it up to the mention of OpenSource, and luckily, it did not stay on OpenSource too long. I would love a less than 45hr work week.

We’re in the process of getting only three children off to college this month. (Our household style and usage guide requires the use of the modifier only in any phrase that enumerates children.) Consequently, the “growing up” meme has been circulating vigorously. Into that ferment, the monthly insurance statement arrived. ( It’s a statement because the premium is transferred automatically from the checking account. ) Gina opened it. She noticed that males under 25 and unmarried females under 25 pay higher rates. And it was the inclusion of the word unmarried that sparked the train of thought which followed.

Why unmarried? ventured Gina. Because the most likely reason a woman would be married under the age of 25 is that she had kids. And, if she had kids, she would be responsible enough to drive safely. So it makes perfect sense. Except that people and organizations (other than insurance companies) increasingly discourage women from having children under the age of 25.

The effect of this discouragement is part of a broader pattern of extending childhood. Not so long ago, people at 16 years of age were considered adults — now that age is closer to 26. This continuing infantilization of young adults is having a corrosive effect on our society. (Listen, if you were raising only seven children, you’d be looking at process re-engineering, too).

And this is where the discourse turned into a rave. Gina began raving. (Our household style and usage guide requires that an animated soliloquy by r0ml is ranting, but the same for Gina is raving. We are very particular about usage. )

<rave> And why is it that women are discouraged from having children under the age of 25? Because they need to finish school and start their careers before they think about children. It is physiologically and psychologically better for both the children and the mother for the childbearing years to be earlier. Yet, we encourage the delay. Why not have the children first, and then go to school? Because after the children, the mother may need to get a job, and then there wouldn’t be time for school. Or child-rearing. And why is that? Because we insist on doing school full time, then work full time, where full time is defined as five days a week. Whereas if the work week were three or four days long, then there would be time for work and school, and we wouldn’t need to defer child-bearing.
</rave>

There is only one effective counteragent to a raving Gina. And that, of course, is a ranting r0ml. It was at that moment that I jumped in with: “It’s the same with open source software.” which is always good for a quizzical look and a brief pause while trying to puzzle out the connection — all the opening I need to seize the initiative and launch a rant.

<rant>
Open Source projects have a long tradition of volunteerism — people contributing programming (or other) efforts in their spare time. Women, in fact, responsible as they are for child-rearing, don’t have that spare time; hence the limited involvement of women in the open source movement. But even beyond that — it has become clear that the fruits of this “volunteer” labor are positive net contributions to the entire software economy. Hundreds of companies are being formed to capitalize on these contributions. Yet, there is limited time to work on these projects — the work week for a full time job being so long and all. Why, if the work week were shorter (three or four days), then there would be much more time to create economic value through the open source community. Think of the increased productivity!

&lt/rant>

The forty hour week, after all, is not divinely inspired. God rested on the seventh day only. I am old enough to remember the six day work week. I remember as a young man reading want ads in the Estado de São Paulo — the great benefit for programming jobs was that it was only a 48-hour work week — because programmers worked 8-hour days (as opposed to most jobs that were 10-hour days / 60 hour weeks). The Federal government (with some encouragement from the Labor movement) gave us the 40-hour work week fairly recently (well, for most people). But 40 is not a divinely inspired number either. More enlightened places in the world have a 35-hour work week. And it could be 34. Or 32.

In fact, if we think about a 35 year timeline that involves 7 years of college, followed by a 28 year career, we could structure our society to either do them “full-time” in sequence (as we do), or, alternatively, “part-time” in parallel. Coincidentally, that would mean working four days a week and schooling one. Lifelong learning without losing a day of productivity.

Google has a policy of allowing workers to spend twenty percent of their time (one day a week) working on projects of their own devising. Sort of on the theory that if people work four days a week, the fruits of their labor “in their spare time” will pay off.

Yes, indeed. More open source. More women bearing children under the age of 25. A more mature society. Lifelong learning. The problems are related. The solution is the same.

Shorter work week.

[Via r0ml.net]

Q&D IQ

everyone else was doing it…

Your IQ Is 110

Your Logical Intelligence is Above Average
Your Verbal Intelligence is Exceptional
Your Mathematical Intelligence is Above Average
Your General Knowledge is Exceptional

Only 1 try, but I did actually stop and think about some of the answers. Entire test in well under 5 min. But man, Quick and Dirty should be replaced with “NOT AT ALL” 🙂

Linux is awesome.

I like Windows too, but for some things, Linux is just WAY better.

Linux bridge through my desktop for wifi access.. linksys wap11 to desktop to ethernet… no biggie. I have been doing this for months.

I setup ebtables for logging and coupled with TC for traffic control. Anyone but me gets 33Kbit speeds on my free wifi & they get logged.

I have MRTG setup so I can graphically see their usage 🙂

Windows could probably do it, but it would involve some nasty custom code.

I did all this with a few (less than 100) lines of shell script to call various commands.

I’d like to setup a catchall webpage/redirect or whatever that gives them a disclaimer and makes them click a “accept” button. But I haven’t gotten to it yet.

RE: To Janise and Peter Arena I am writing(…)

My wife is a bridesmaid in a friends wedding. She has been having some problems with her dress and the place is completely unresponsive. If you life in the SEMI (South Eastern Michigan), we do not recommend you give them your business. They even messed up some of the brides stuff.

To Janise and Peter Arena;
I am writing this letter concerning the dress that I received from Arena
Bridal Salon on Saturday, August 6th, as well as the situation surrounding the
ordering of this dress and response that I received from your staff. I am a
member of Genevieve Crawford’s wedding to be held on the 25th of September in
2005 and ordered the Bill Levkoff style 354 in Euro Navy.
I arrived in your salon on April 30, 2005 to be fitted for the dress, as well
as to put down a payment. I was measured by a member of your staff directly in
the lobby while still fully clothed in a sweater and jeans. After having worked
with various wedding salons due to the three previous weddings in which I stood
as well as my own wedding, I felt that this was rather inappropriate and would
skew my measurements. I should have been taken into a dressing room and
measured without my clothing to ensure the proper size dress would be ordered.
When I expressed my concerns about this, I was assured by the saleswoman that
the measurements would be adjusted for my clothing. However, she never told me
what the measurements taken were and what size she would be ordering. I
explained that in every other bridesmaid dress by various designers I have
worn, I have always ordered a size six. Unfortunately, I felt as if this
explanation was brushed aside when the saleswoman informed me that every
designer has different size charts and my dress would be ordered based on that.
I was not fully reassured by this explanation, and so asked to try on the
dress. The only available model dress in this style was a size 10, which
promptly fell off without manually holding it up. The dress was obviously at
least two sizes too large, and the saleswoman agreed that a size 10 would be
wholly inappropriate and that I should have a size 6 ordered. I finally felt
that the dress would be correctly ordered and so paid for it in full.
Unfortunately, this was not the case. When a different saleswomen than the
one I worked with previously brought out the dress marked as mine, I
immediately knew just by looking at it that it was too large. I was extemely
upset by this as I felt that the matter was fully settled when I paid for the
dress: that a size 6 would be ordered and not the size 10 that was being given
to me. After expressing my concerns about this, I was finally told the
measurements that were written down for me; the saleswoman did not compensate
for taking my measurements when I was fully clothed and so only the measurement
taken for the bust was correct, both the waist and the hips were three inches
too large! The saleswoman did not respond to my concerns and so I asked to put
on the dress in the hopes of showing her that the dress was incorrect and so
being able to come to a solution as to what should be done concerning your
salon’s error. Upon trying on the dress, I encountered the same difficulties
as with the model tried on in April: the top of the dress fell down below my
bra unless I held it up with both hands. At this point, my husband, who had
accompanied me, also became very upset that I even appeared out in the lobby
while wearing this dress.
Unfortunately, we seemed to be the only people that were upset by this
situation as I was offered absolutely no apology or solutions to this problem
other than a list of seamstresses in the area. As I live south of Ann Arbor, I
was offered no help and was told to find a seammstress myself and get the dress
taken down two sizes. I felt as if the saleswoman’s error during my fitting
was being pushed off on me as my problem. I was so upset by this utter
disregard to customer service, that I left so as not to cause a scene in front
of your other customers.
I have since been unable to find a seamstress in my town that is able to
basically remake the entire dress, I feel that help should have been offered in
this regard. I am also a graduate student at the University of Michigan and am
living on very limited funds from which I budgeted purchasing the dress and
paying for it to be hemmed up; I cannot afford to purchase a new dress or to
pay for the major alterations it will take to repair the error, nor do I feel
as if I should when the error was not mine. I feel that the size 10 should be
exchanged for the appropriate size 6, the size I was assured I would receive.
If this is not possible as the dress is needed for September 25, I feel that
Arena Bridal should take over the responsibility of altering the dress down to
a size 6. I have quite a few friends and family members that will be looking
for bridal salons for themselves in the near future and I would really like to
be able to tell them that despite my initial difficulties, Arena Bridal would
be a good choice for them. I would also really like to solve this problem
ourselves,
rather than having to make a formal complaint against your business. I
appreciate a timely response to this matter so that we can solve the problem as
soon as possible. I can be reached between the hours of 8 am and 6pm weekdays,
as well as Saturdays in my laboratory at XXX-XXX-XXXX, and after hours on my
cell phone at XXX-XXX-XXXX.

Thank you for your time and I look forward to putting this issue to rest,

Re: Monies…

In response to a money question

I’m only 1/2 kidding here, but…

Fuck tax defered retirement plans. 401k and IRA are better than nothing, true. BUT… You get anally raped if you need to withdrawl that money before the age of retirement. Where do you think the age of retirement will be when you decided to retire? Right now it is 59 1/2. That can easily be changed by future legislation. I won’t be 60 for over 30 years still. I expect that 59.5 age will raise to closer to 70.

Fuck that. I want to retire when I’m 40. I don’t want to pay taxes and a 10% penalty for early withdrawl. (yes, on Roth, you DO pay taxes on interest earnings if you withdrawl early)

What is even worse, lets say the retirement age stays the same. After a certain age you are FORCED to withdrawl. That means you could still be working a full time job, probably making the best money of your life (older people tend to make high salary due to their experience and/or many years with a company). And you would be FORCED to withdrawl from your retirement account and pay taxes on those withdrawls.(cept for maybe Roth IRA – although the fine print may say something about maximum earnings for an individual, and roth withdrawls may effect your income level, so even though the Roth income isn’t taxed, it puts all your other income in a higher tax braket)

The point is, forced withdrawl means you loose the power of compound interest. Your money can’t grow like it was, because you are forced to shrink that pool of funds.

So if you REALLY want your money to work for you, just keep it to yourself.

12% is cute and all, but I can get 10% just via Dividends by owning a premier UK power company, United Utilities (UU). Those dividends are paid anually (not quarterly like US stocks), but if DRIPed, then they can easily average over a 12% anual return over a period of 7+ years. Suddenly 12% doesn’t seem so high.

Finally, the other advantage to keeping all your money to yourself and out of IRA/ERISA programs is that you will have lots of cash on hand to buy houses. Slumlords do get rich. Trade in 4 houses and buy a hotel, just like monopoly. Hell, you could buy the Ramanda. I hear Mike Higgins’s health is not good.

Yes, I’ve read too much Robert Kiyosaki.

Denyhosts is a must have if you run secure shell

If you run secure shell you absolutely must run DenyHosts along with it. Secure Shell has been under security attack recently by random username/password probe attempts. Hopefully your secure shell server is good enough to leave entries such as


Aug 7 20:30:12 little sshd[1574]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=zorch.cc.gt.atl.ga.us user=root
Aug 7 20:30:14 little sshd[1574]: Failed password for root from 199.77.128.210
port 32824 ssh2

(from debian unstable, completely updated as of now)
or

Aug 8 10:01:08 localhost sshd[8569]: Invalid user 1 from 61.55.139.3
Aug 8 10:01:14 localhost sshd[8571]: Invalid user a from 61.55.139.3
Aug 8 10:01:20 localhost sshd[8573]: Invalid user a from 61.55.139.3
Aug 8 10:01:25 localhost sshd[8575]: Invalid user abuse from 61.55.139.3
Aug 8 10:01:30 localhost sshd[8577]: Invalid user abuse from 61.55.139.3
Aug 8 10:01:39 localhost sshd[8579]: Invalid user abuse from 61.55.139.3
Aug 8 10:01:44 localhost sshd[8581]: Invalid user academia from 61.55.139.3
Aug 8 10:01:54 localhost sshd[8583]: Invalid user academia from 61.55.139.3

(from Ubuntu breezy, completely updated as of now)

if you have these log entries, DenyHosts can parse your log and add them to your hosts.deny list. It is very easy to download and configure. It runs via cron as often as you configure it.

It would be great if we had a centralized “bad guys” list of hosts doing these evil scans ala d-shield or rbls.

I’m making mine available. You can watch it grow.

My hosts.deny

I can also compare lists between two systems with a simple command:

computer1$ grep -v "^#" /etc/hosts.deny | sort -n >/tmp/a ; ssh Computer2 grep -v "^#" /etc/hosts.deny | sort -n | diff -u /tmp/a -

Now to automate merging the differences.