Archive for August, 2005

Some Useful SQL Functions

August 30, 2005 in Transact-SQL | Comments (0)

I’m not sure why it is, but Transact-SQL seems to be shy a few important functions that are useful for parsing irregular data. Sure, they include the isNull function to let you substitute something useful for a NULL value, but they don’t provide good negation functions for the opposite case (at least not that I could find). I’ve invented a few new ones that provide some useful functionality and extend your ability to query against irregular data.

Here they are:

  • IsEmpty(@argument) – Takes a string value and tests to see if it is null or contains an empty string. If it is not empty, it returns the argument, otherwise it returns NULL. Use this inside an ifNull() test on fields that may contain nulls or empty strings.
  • IfEmpty(@argument, @default) – Similar to IsEmpty(), this one lets you pass in a default value to use if the argument is empty. It’s basically the same as IsNull(), except that it works with NULL and empty strings.
  • NotEmpty(@argument, @default) – This is the negation case that I found missing. It returns the default value if the tested value contains something, otherwise an empty string. Great for things like zip-plus 4 on zip codes, allowing you to print the dash only if the plus 4 field has a value in it.

Limitations:

These functions were designed mainly for returning formatted text for reporting or rendering into HTML or XSLT stylesheets, so they assume string arguments. You will have to coerce your values into strings to use them, or write similar functions for other data types.

The source:

CREATE FUNCTION IsEmpty
(
 @argument AS varchar(8000)
)
RETURNS varchar(8000)
BEGIN
 if @argument is null return null
 if len(@argument) = 0
 begin
  set @argument=null
 end
 return @argument
END

CREATE FUNCTION IfEmpty
(
 @argument AS varchar(8000),
 @default as varchar(8000)
)
RETURNS varchar(8000)
BEGIN
 if dbo.isEmpty(@argument) is null
 begin
  return @default
 end
 return @argument
END

CREATE FUNCTION NotEmpty
(
 @argument AS varchar(800),
 @default as varchar(800)
)
RETURNS varchar(8000)
BEGIN
 if dbo.isEmpty(@argument) is not null
 begin
  return @default
 end
 return ''
END


City of Heroes Registry Updates

August 29, 2005 in City of Heroes | Comments (0)

The City of Heroes Registry continues to improve over at MMO-Town. We’ve enhanced the way that filtering works, and updated it to post leveling announcements at both MMO-Town and So There. The posts now include links that will bring you to the hero record in the registry, plus additional information about the hero (power sets, etc.).

We plan to set it up where you can have it post into any forum you would like (vBulletin and phpBB boards).


Custom Fabrication

August 25, 2005 in General | Comments (0)

Read an article at Wired about custom fabrication (you know, tell the computer what you want and it spits it out) at eMachineShop. It all sounded very cool. The guy in the article had a custom Lucite guitar body and aluminum faceplate cut there. I was thinking all you serious game geeks might draw up real EQ chastity belts and stuff to have fabbed up for the next convention. The age of custom manufacturing is upon us.

Discussion goes here…


City of Heroes Registry Updates

August 22, 2005 in General | Comments (0)

I have finally gotten around to updating the City of Heroes Registry with new capabilities for filtering the list to more easily locate other heroes to team with. You can filter by origin, archetype, server, super group, and level range.

We’ve also opened a new Support Thread where you can post any issues or errors you find on the City of Heroes Registry pages.


Free Memberships at MMO-Town Forum

August 5, 2005 in General | Comments (0)

Doesn’t cost anything to sign up, but most forums don’t anyway. MMO-Town is a fledgling forum, purportedly for talking about MMO games, but you can really talk about anything you want. We’re looking for silly individuals to contribute to the chaos.


Give the Shuttle Guys a Break

August 2, 2005 in General | Comments (0)

I heard the guys on a local radio station (in Orlando) going on about the shuttle this morning, about how they have to take an unprecedented spacewalk to the bottom of the vehicle to repair the sheilding. They think it’s amazing that they use glue to hold the flame retardent material between the tiles (they think that you should use rivets to hold down this material, despite the amount of friction that this would cause), and that NASA is at fault because the mission is not proceeding as “perfectly” as it should.

Now, I’m no rocket scientist, but I find it amazing that the shuttles have gone up and and come down as often as they have, and their safety record has been nothing short of astounding. Do you really believe that no other shuttle has flown that did not have some bits of loose material dangling after a launch? Do you really believe that no pieces of foam had ever fallen during launch and caused damage to the tiles prior to the Columbia? Sure, that one went seriously wrong and cost some lives, but to hyperfocus on that from now on will serve only to distract the astronauts and ground crew from what they’re really up to. We’re a bunch of earth bound assholes who think we’re experts now because we saw some shit on TV and read about it on the web. Let’s see you get through one “perfect” day without fucking anything up before you start criticizing the job these people are doing. I am completely and utterly astounded by the technology, foresight, and planning that goes into these missions, and the sheer courageousness of the people who fly in those vehicles. They know when they climb in that they may never climb out again, that’s what makes it [i]exciting[/i]. They probably wish that we would all STFU and let them go to outer space without us kibitzing from our armchairs.

If you had expended the time and effort to qualify as a shuttle astronaut, you would really hate to find yourself grounded because some bunch of bleeding heart landlubbers had decided it’s too dangerous. My heart goes out to the friends and family of those who were lost in previous missions, but those people died living their dreams. Are you living yours?

To comment, follow the link to the story on the MMO-Town Forum


Atkins Nutritionals files Chapter 11

August 1, 2005 in General | Comments (0)

As expected, the Atkins diet truly qualifies as a fad. Its waning popularity is driving Atkins Nutrionals out of business. Your best bet is still to eat right and exercise. You need to stop thinking you can get fit by reading a book and learn that you get fit by pushing yourself away from the table and getting on down to the gym.


Regen Scrapper: Handling Nasty Carnie Bosses

in City of Heroes | Comments (0)

Carnies used to be a big problem for Yuda, at least bosses. Most of the Carnie minions are pushovers for a regen scrapper, although Air Superiority has turned out to be a great boon since so many of them are endurance sappers. Air Superiority knocks them down long enough that you can get in a few good swipes before they get up and sap more of your energy. Strongmen are only a hassle if too many of them gang up on you at once. The bosses (Master Illusionists, Ring Mistresses, and any named bosses) are problematic, though, because they do incredible amounts of damage, or summon an incredible number of pets, and phase half the time so you’re wasting your attacks. Here is the technique I have developed for handling these bosses.

By the time you deal with Carnies, you have your full contingent of twenty inspiration slots. You know you’re eventually coming up against a Carnie boss, so you have to start managing your inspirations in order to be ready. My goal is to have inspirations lined up like this:

D D D D D
D D D D D
H H H H B
H H H H R

D = Defense
H = Heal
B = Breakfree
R = Revive

The key here is the number of defensive inspirations. You’re going to eat a bunch of these before tangling with the boss. The heals are for the few hits that still get through, and the Break Free is just in case your toggles drop and you get held. The Revive is just in case my advice is horribly bad. Before each battle, pop a couple of inspirations that don’t fit this pattern to free up the slots. Every time you get an inspiration drop, arrange it into this pattern, keeping the largest ones of each type. Once the pattern is fulfilled, stop using inspirations, period, until you get to the boss.

The strategy is really pretty simple. Before you aggro the boss, drop at least 4 of the defensive inspirations, fire up Conserve Power or any other toggles you have that will help you get through the long fight, and wade in. With 4 inspirations in you it’s very hard for them to hit you (depending on your mix of other defensive powers). If there are any minions or lieutenants around the boss, ignore them until she phases, then dole out a few punches to them until she comes back into phase. Watch your buff status closely. These phasing bosses will outlast your inspirations, and if you don’t drop 4 more defense buffs before or shortly after the first ones wear off, you may find yourself sniffing turf.

Naturally, your mileage may vary, and it may all change after the I5 nerfs (I doubt it, though… you’ll just save Instant Healing until right before the boss and then do it the same way). I’m not sure how a similar tactic works with other AT’s, especially the squishier ones. All I know is that I used to avoid Carnie missions because the bosses quite often stomped on me, but this strategy has made me able to take them without trepidation.

The same stratagem works well in Rularuu missions that have mezzing bosses. Noble Brutes are usually pretty easy to take down (they don’t mezz, but I still drop a couple of defense buffs because they really hit hard), but Wisp Opressors are every bit as bad as Carnie bosses and require the same technique. They don’t phase, but they have one power that will keep you from attacking for several seconds, which is every bit as bad. Overseers are the bigger problem. They’re not hard to go toe to toe with, but when you get them on the ropes they will summon up 4 or 5 Watchers to help them out. That many Watchers can lay even a Regen to waste, so when it squeezes them out, I hit the Super Speed and run down the hall. The Overseer will pursue first, so once there is some distance between him and his spawn, close with him and finish the job.