comments edit

Now I’m every bit as much the bleeding heart liberal as the guy to my left, but I have to say that I believe the outcry against offshoring and outsourcing is purely a reactionary response to the current bad economy. I don’t believe that opposition to outsourcing is not based in sound economic principal nor is good for the country in the long run.

This coming from a software developer who makes his livelihood on custom software development. However, as jobs start to get created again (they will) I think the furor will die down a bit because everyone will be too busy working.

In the meanwhile, read this article I found from my economist friend Michael Krimm’s favorite magazine. He will be quite proud of me.

comments edit

Adam Kinney posts about finding Google phrases that return your site at #1 with more than 100 results.

Because we geeks have nothing better to do and have a deep seated need for the validation that only Google can provide, I checked my referrer logs and came up with the following three phrases.

Also, before you mistakenly read the third option, it’s spelled with an “A” not an “E”. It’s a skit on Dave Chappelle’s (a hilarious comedian) show about a white “Harriet and Ozzie” family in the 50s with an unfortunate last name.

Google ego boosting challenge #2, find a search phrase on images.google.com that brings up your picture. A bit tougher…

comments edit

Spam For the past few months I’ve been teaching myself Longhorn programming via the PDC bits by building a better Spam filter. Some of the best filters will typically use an approach based on Bayesian probability modeling. For example, in this article Paul Graham discusses an improved algorithm for filtering spam

Although I am currently a software engineer (and manager) by trade, my background is in Mathematics and I’m not entirely satisfied with the current crop of spam filters. I realized that mathematical analysis alone isn’t enough. There has to be an “intelligence” factor.

The app I’m working on takes the Bayesian approach, but integrates that with intelligent filtering by taking advantage of the cheap cost of outsourcing and the proliferation of peer-to-peer software (made easier by Indigo I might add). You can see my new spam filter here.

comments edit

I’m looking to host my site and I’m ready to pay money!!! Does anyone have any recommendations? Right now, my top choices are WebHost4Life which has unlimited bandwidth, $9.95 a month, 150 MB disk space and 150 MB SQL Server space, with a $19.95 setup fee.

A cheaper option is hostdepartment.com with no setup fee, $9.95 a month, and 500 MB disk space, but only 10GB of monthly transfer. I think 10GB should be more than enough, but I’ve never heard of this company before.

comments edit

GAKEvery time someone tells me to register a component in the GAC, I think of GAK. Do you remember GAK? It was this Are you sure an alien didn’t sneeze this up? brightly colored gooey junk made by Nickelodeon. You can still buy the stuff!.

But what’s better than buying stuff? Making it! I found this little article online on how to make GAK. Your assignment, make tons and tons of this stuff! It never lived up to its potential to take over the world.

comments edit

I’ve been on a real Anthony Pappa kick lately. Right now I’m listening to Resolution CD 2 Track 12, “Solstice” at home and am blown away at how rich and full it sounds on my piddly Altec Lansing computer speakers. I spend way too much listening to my music turned down real low at work that I don’t appreciate how good this stuff can sound in the a half way decent environment.

Of course, I’d love to hear this in a PROPER environment. I need to look into getting a real sound system. My father-in-law is a Sony manager/engineer in Japan who is really into his sound equipment. He custom built his current speakers and they deliver a very smooth crisp sound. Hopefully I’ll be able to enlist his help one day in building a hi-fidelity system. He’s turned me onto Bossa Nova and Samba music.

comments edit

Poker ChipsRory at Neopoleon.com has an interesting proposition for would-be Computer Science mentors. Basically, he’s willing to pay for one-on-one tutoring in CS concepts over the web.

It’s an interesting idea if it works. In fact, it inspires me because I could use some tutoring myself, though my goal is not as lofty. Are there any experts out there at Poker, specifically Texas Hold’em?

I lost a wee bit o’ money this weekend and could use a refresher on how to play well. ;)

comments edit

I just realized that I haven’t been to Google.com in a very long time. Maybe months. Oh, don’t get me wrong, I’ve used Google plenty, but now with the IE Google bar and the Desktop Google bar, I have very few reasons to actually go to the Google front page. My view of Google lately has been search results.

So today, I decided to visit the Google front page for old time sakes now that they’ve totally revamped their look. Ok, so it’s about as noticeable as the difference between Old Coke and New Coke, but it is noticeable. I like it.

comments edit

I tried a new drink this weekend. It’s called an Irish Car Bomb. It’s a half glass of Guiness with a shot of Baileys and Irish Whiskey in a shot glass on the side. You take the shot glass, drop it in the Guinness, and then quickly down the whole concoction before it coagulates.

It almost has slight chocolatey taste and is very creamy and smooth. It was a nice alcoholic explosion before seeing Margaret Cho in concert.

comments edit

According to this article, Steven Hawking’s wife has been questioned by British detectives over claims that she has been assaulting the brainy cosmologist (no, a cosmologist is not someone who writes for Cosmo).

If she is guilty, Boo hiss hiss! This is no way to treat the most famous physicist since Einstein!

In support and honor of Mr. Hawking, I will bring back a long lost site from the archive and link you to MC Hawking’s Crib where you can hear him bust a rap in a imploding quasar’s ass.

code comments edit

Found this interesting post via Eric Gunnerson’s blog (PM for the C# compliler team) blog.

using (TimedLock.Lock(obj)) {
  // Do stuf within the lock
}

It’s an interesting approach to get a lock statement with a time out. It would be nice to perhaps add a timeout syntax to the lock statement in C#. Maybe it would look like this:

object obj = new object();
int milliseconds = 10000;
try
{
    lock(obj, milliseconds)
    {
    	//Do something with obj
    }
}
catch(LockTimeOutException exception)
{
  //Handle exception
}

One thought I had, and let me know if I’m off base, but it seems we could add debug code to Ian Griffith’s TimedLock class to “register” locks on an object. This would only happen if you conditionally compiled with #DEBUG, but the idea is that when a class gets a TimedLock on an object, TimedLock would add information (such as the call stack and thread id) to a hashtable with the object as a key. Thus, if another class attempts to get a lock on the object and times out, the exception could have information about who had a lock on the object. May be useful for debugging deadlock situations.

Ian Griffiths comes up with an interesting way to use IDisposable and the “using“ statement to get a very of lock with timeout.

I like the approach, but there are two ways to improve it:

​1) Define TimedLock as a struct instead of a class, so that there’s no heap allocation involved.

​2) Implement Dispose() with a public implementation rather than a private one. If that’s the case, the compiler will call Dispose() directly, otherwise it will box to the IDisposable interface before calling Dispose().

UPDATE: I implemented the stack traces retrieval. Check out my TimedLock repository for the code and history of this class.

comments edit

Don’t you hate it when you momentarily lose all control and pig out like a death row inmate on his last meal? I need to exhibit more self control during those “all you can eat” moments, because I am so uncomfortable right now.

This must be how it feels to be a 10 ton elephant trying to sit comfortably in an oh-so-NOT-ergonomic chair. I hear elephants complain about that all the time.

I know you want to hear all about my troubles, but I just needed to vent.

personal comments edit

How quickly would the pledge be altered if it ended “one nation under Allah” or “one nation under Buddah”?

AP - Not long after the Supreme Court came to order Wednesday with the invocation, “God save the United States and this honorable court,” the justices were deep in a wrenching argument over whether millions of public schoolchildren may continue pledging allegiance to one nation “under God.”

[Via Yahoo! News - Top Stories]

personal comments edit

Snowboarding A group of us went snowboarding at Mammoth mountain this past weekend to celebrate Judy’s (Dan’s wife) birthday. I won’t be so uncouth to tell you how old she turned. We stayed in a nice little condo with the 7 of us.

On the slopes for the first day, the weather was brilliant! It was very bright, sunny and hot, probably around 65 degrees or so. Hot enough for girls in bikini tops to snowboard around, while I was stupid enough to be wearing a long sleeve shirt and my jacket, completely burning up.

This was a good trip for me as I improved alot. After tackling a few blue-black diamond (advanced-intermediate) slopes, I was cocky enough to tell my wife that I’ll soon be as good as she is. So she promptly took me up to the summit so we could try the Cornice Bowl, a black diamond.

At the top, a friendly sign forewarned “Black Diamond runs are for EXPERTS only”. At the lip of the bowl, I looked down, and I mean STRAIGHT DOWN, and felt a rising wave of unadulterated, first time watching Nightmare on Elm Street, fear. Needless to say, my wife smoothly made her turns down the slope while I can’t really do justice to what I did. I started off toe-side, trying to plow my way down a bit. Perfecting my deer-in-headlights impression, I was paralyzed for a moment. Standing nearly straight up on my toe-side, yet able to reach straight out and touch the slope (I ride goofy foot), I realized this was steep.

I was not willing to point my board down the slope in order to make a turn. After snowplowing down a bit, I gained some courage and tried a turn, only to be rewarded with a mouth full of snow and a Pete Rose slide for 30 yards. I think I have a long ways before I can mouth off to my wife about how I’m approaching her ability. :)

humor comments edit

Found this on another website. Sorta ties into my earlier rant about Bush’s stance on the whole gay marriage issue:

Lawmakers who use the Bible to justify their opposition to gay marriage ought to be consistent. Here are some other Biblical rules to add to the Bill of Rights :

Marriage shall not impede a man’s right to take concubines in addition to his wife or wives. (II Sam 5:13; I Kings 11:3; II Chron 11:21)

A marriage shall be considered valid only if the wife is a virgin. If the wife is not a virgin, she shall be executed. (Deut 22:13-21)

In lieu of marriage, if there are no acceptable men in your town, it is required that you get your dad drunk and have sex with him (even if he had previously offered you up as a sex toy to men young and old), tag-teaming with any sisters you may have. Of course, this rule applies only if you are female. (Gen 19:31-36)

Link

[Via Boing Boing]

humor comments edit

Austin would be so pround. I wonder what the Queen thinks of all this wanton shagging going on? And I thought the British were such a reserved people. Apparently so if we’re talking about reserving a spot in the park for a romp.

A new sex fad called ‘dogging’ is sweeping Britain, and it’s all thanks to the wonders of technology. By Leander Kahney.

[Via Wired News]

My favorite quip from this article:

Dogging is so prevalent, 60 percent of U.K. country parks are affected by it, Byrne’s report estimated.

code, sql comments edit

In general, cursors suck ass! Ok, that’s a bit extreme, but I have a long and ugly history with cursors. Let me diverge here and tell you a true story.

A while ago, a friend of mine recommended me to a company in serious need of senior developers for full-time or contract work. After talking to the dev manager over the phone, he felt my rate was too high, but wanted me to come in anyways. He set his top three developers in the room with me and left as they began to drill me with technical questions.

Now, I don’t mind being asked difficult technical questions in an interview. In fact, I think it’s a necessary part of an interview. But it was clear from the outset that these three hadn’t set their egos aside and they were quite antagonistic. One of them asked me the following question.

Suppose you have a table named tblUser with column named FirstName. On the whiteboard, construct a query that will select all the first names into a single varchar with commas. I asked if I may assume that the list of names will fit in a VARCHAR 8000, to which they replied yes. So I promptly wrote the following on the board.

DECLARE @FirstNames VARCHAR(8000)
SET @FirstNames = '' 
SELECT @FirstNames = FirstNames + ',' + @FirstNames
FROM tblUser

With disdain on their faces, they shook their heads and said no. No! Well of course they did, they were looking for a cursor answer. They wanted to know if I could write a cursor. Needless to say, I didn’t get the job, but after the fact, I couldn’t help sending the manager an email informing him that not only was my answer correct, but it was 1000 times faster than the answer they wrote on the board. Yes, I’m still bitter. ;)

Which brings me back to the point of this post. If you can avoid a cursor solution, by all means do. The following article describes a technique for performing row by row operations without using a cursor. It makes several assumptions about your table, but for the most part, this is very useful.

personal comments edit

Being of mixed heritageI have both bases covered. For now, I can claim my caucasian-ness and reap all the benefits of being the dominant sub-culture. But once minorities surpass caucasians, I can switch to

“You’ve oppressed us too long whitey! It’s your turn!” and claim my asian heritage.

Model Minority my ass! It’s Model Majority now punk!” I just love playing it both ways. ;)

AP - For as long as there has been an America, whites have made up a clear majority. But that will change by 2050 when minority groups will be 49.9 percent of the population, the Census Bureau says.

[Via Yahoo! News - Top Stories]