Friday, July 30, 2010

Useful Extension Method: SplitNoEmpty

I ran into a situation where there were some extra spaces in some splits I was doing. I was unaware there was an option StringSplitOptions.RemoveEmptyEntries, which would fix my problem. But to cut down on text in the code since I have splits all over the place, I created the following extension class.
public static class StringSplitExtension
{
public static string[] SplitNoEmpty(this string val, string delim)
{
return val.Split ( delim.ToCharArray (), StringSplitOptions.RemoveEmptyEntries );
}
}

So now, I just change my splits from-

mystring.split(' ');
to-
mystring.SplitNoEmpty(" ");




Thursday, July 29, 2010

Web Server 2008 R2 Anti Virus

Well, I started playing around with Web Server 2008 R2 on a box that I have laying around. I found out three things about anti-virus software for servers last night.

  1. Apparently calling something a server gives you a license to steal ($300+ for AV software because it is a "server", come on).
  2. Most free anti virus software that is out there is purposely engineered to not run on servers, there are hacks, but they are a pain and software makers close these holes fairly quickly.
  3. The best thing I learned: PC Tools makes a free AV program that works with Windows 2008 R2 64 bit without a problem. Don't know how good it is, but at least of got something.
Just shar'en the wealth.

Monday, July 26, 2010

8 Bit True Color Cycling in Javascript

Remember that retro 256k Ultima 4 esque bit animation? Well, it is back, and in the browser with out a plugin.

Direct link here-


Discussion here-


Worth the look. I can easily see how to use this in games.

Thursday, July 22, 2010



Well, I could have kind of guessed this. Men play more online, but women spend more cash when they do play.

gamasutra gaming article

I'd expect this to be (my guess, not anything proven) due to men, especially younger men, wanting the full triple AAA 3D immerse experience, while I would take a guess that many women play the more casual "spamware" Farmville type games. Interesting, I will post links like this here when I stumble on them. Don't get me wrong, I'm not trying to be a MCP or anything, just my past gaming experience and the little bit of research I've seen but don't have handy would indicate this.

The question is, how to get more women playing games and different type of games if they really are mostly still playing casual games, and how to get men to drop more cash online, or better yet, hook them on casual games that tend to suck money out of wallets. That is if you are a game developer wanting to work through Facebook to have wheel barrels full of money delivered to your door step each month. People are doing it all the time, many of the "spamware" games on social networking sites aren't even that good, but they have the psychology of the spontaneous buy down.

It would be nice to get a slice of that casual gaming pie huh? Not that money is everything, but I wouldn't mind trading in my set of problems for a rich person's set of problems for a while (yeah they have plenty of problems too), if for nothing else just a change of pace. Then I can go back to being broke :)

Tuesday, July 20, 2010

Using SQL Hints

I can get around SQL Server fairly well, but I'm not a guru. One trick I was shown today was the use of SQL Hints. Here is a real world scenario where they really help out.

I had a query that was taking about 44 seconds in enterprise manager. My boss came over and showed that the main drag was nested queries (by viewing the execution plan in the query analyzer).

So we added the following hint.

Select blah blah

from blah blah

where blah blah

option ( hash join )


Wow, 44 seconds to less then 1 second. Also option ( merge join ) dropped the query execution time down to less then a second as well.

Is it then or than? Oh well. Public school system

Friday, July 02, 2010

YouTube - Augmented (hyper)Reality: Domestic Robocop

View the future-

OpenPyro.org

Flash, Flex, Actionscript...

I've seen a lot of cool things done with the above, very cool in fact. But it seems like you have to be some kind of guru that started with Flash 4 or 5 to really wrap your brain around Flash's interface. Maybe Flex is better.

Anyway, with Apple not supporting Flash on the iPhone, some are heralding Flash as being dead. Could be, but I'm not so sure, as HTML 5 can't do the things that Flash does, JavaFX is kind of an unknown, and I'm not sure how Silverlight will be accepted long term outside of Microsoft developer shops.

So with that in mind, I think it is too early to write Flash off. If you don't have the cash to outlay for Flash or Flex, check out this open source alternative called Open Pyro. I haven't played with it, but it looks interesting

OpenPyro.org

Free Alternatives to Photoshop

Garmahis has a blog with a great list of free Photoshop alternatives here-


Free Photoshop Alternatives