May 27, 2004

Game

Go play this.

Posted by naginata at 09:38 AM | Comments (2)

May 26, 2004

Havana Night

In 1940, some Cuban tobacco was shipped to London, and placed underground for storage. Unfortunately, in the chaos of WWII, the tobacco was forgotten about, and ultimately lost.

In 2000, the tobacco was found again. A lot of ot was bought by the Ghurka family, and rolled into cigars. The cigar store managed to get a box of them, and last night I had one of them.

Lessons learned: 18 people smoking at once is too much for the cigar store. Everyone looked like they were crying... but we weren't about to stop.

Port is good. $50/bottle port is that expensive for a reason.

60 year old tobacco can taste good. It can also taste like mud (As one of my fellow smokers found out). Fortunately, we had some "spares".

Posted by naginata at 10:18 AM | Comments (3)

May 25, 2004

What the F*#&?

From bryguy:

PARENTAL
ADVISORY
NAGINATA CONTAINS
EXPLICIT LYRICS

Username:
From Go-Quiz.com
Posted by naginata at 08:24 AM | Comments (2)

May 20, 2004

clay+sand+straw

So, I mentioned before about how I have, you know, more jobs than most people who have a job do. Well, today it seems I'm doomed to spend a lot of my time doing content management and updates. See, everyone knows that the old intranet guy left, and has been saving their updates until now, but now, I've got like 3 requests for changes right now, and I think the word is getting out that we're open for business again.

Not that 3 updates is a lot, it's pretty simple little changes, but come on, I'm not a content management guy, I'm a programmer. I'm only mildly offended, and will remain so as long as the time I spend doing content/intranet crap is less than 20% or so of my total work time. Once it gets higher than that, the rage kicks in, and I start remembering that one day, before my job was to make pdfs, I was sort of a badass in the land of code.

Anyway, here's the gripe of the day (do I post nothing but gripes?!) - Adobe Acrobat. I installed it and it puts a nice little icon in word "make pdf now". It also puts a "pdfwriter" printer in there. If I use the button, Document X comes out as an 89k pdf. That seems large... so I ran it through the printer and now it's 8k.

Seriously Adobe, wtf? The output is IDENTICAL.

Posted by naginata at 12:07 PM | Comments (6)

May 19, 2004

He Forked.

And now, from the "why the hell won't you compile??!?!!1one" department: a salute to Gabe's upcoming litter.

babygame.jpg

I call it "how Gabe views fatherhood: part 1".

Posted by naginata at 04:02 PM | Comments (4)

More On Gentle

First, there's this:

public enum Operator
{
Equals, NotEquals, [Obsolete] Unlike, Like, NotLike, LessThan, LessThanOrEquals, GreaterThan, GreaterThanOrEquals, In, NotIn
};

Then, there's this:

switch( op )
{
case Operator.Equals: return isValueNull ? "is" : "=";
case Operator.NotEquals: return isValueNull ? "is not" : "!=";
case Operator.GreaterThan: return ">";
case Operator.GreaterThanOrEquals: return ">=";
case Operator.LessThan: return "<";
case Operator.LessThanOrEquals: return "<=";
case Operator.Like: return "like";
case Operator.NotLike:
case Operator.Unlike: return "not like";
case Operator.In: return "in (";
case Operator.NotIn: return "not in (";
default:
Check.Fail( Error.InvalidRequest, "Unable to format query string for unknown operator." );
return null;
}

I don't know whether to be pissed off that the code in a freshly-downloaded state throws warnings on compile, or to be impressed that the c# enum system makes it that easy to deprecate things.

I guess both, probably.

Also, .net developers - go download FxCop, and use it ALL THE TIME.

Posted by naginata at 11:13 AM | Comments (0)

Strong Names

Ok, so, in .netland, there's these things called "Strong Names". When you generate an assembly (java people, think "jar". win32 people think "dll" or "exe"), you can sign it. This process if VERY easy. In fact, it's so easy, I'm going to tell you how to do it:

First, generate a keypair. The simplest way to do this is the cmd prompt.

Oh, by the way, add these keys to your registry:
HKEY_CLASSES_ROOT -> Directory -> shell -> x -> y
where "x" is something like "CmdHere" and y is something like "command".
Set the default data for xto something like "Shell" and the default data for y to exactly "c:\Windows\System32\cmd.exe /k cd "%1"" (without the outer level of quotes).

There, everyone here? Great. Now get yourself a command prompt pointed to Visual Studio Projects\MyProject. Generate a keypair with "sn -k MyKeys.snk". Once that's done, open up the AssemblyInfo.cs file for your project and add the attribute "[assembly: AssemblyKeyFile("..\\..\\MyKey.snk")]"

Now when Visual Studio compiles your project, it will sign your assemblies with some keys. If you're not using Visual Studio, you're probably smart enough to figure out how to change those rules to fit your environment.

Now, if you want to be REALLY cool, compile that and then go into the debug\bin directory and run this - "secutil -hex -s MyAssembly.dll >> foo.txt" Open that up, and add an assembly attribute that looks like this:
[assembly:StrongNameIdentityPermission(SecurityAction.RequestMinimum, PublicKey = "0xDEADBEEF")] where DEADBEEF is the big long hex string you can find in foo.txt. Now, I'm not convinced that this circumstance actually makes your program harder to compromise, persay, but it makes me feel better. What this does is make sure that the private key your assembly is signed with matches the public key in that attribute.

So, I just do it, and trust the magic.

Now, if you're into abusing yourself, there's a whole mess of attributes you should be adding. And here they are:

[assembly: ComVisible(false)]
[assembly:CLSCompliant(true)]
[assembly:EnvironmentPermission(SecurityAction.RequestRefuse)]
[assembly:FileDialogPermission(SecurityAction.RequestRefuse)]
[assembly:FileIOPermission(SecurityAction.RequestRefuse)]
[assembly:IsolatedStorageFilePermission(SecurityAction.RequestRefuse)]
[assembly:PublisherIdentityPermission(SecurityAction.RequestRefuse)]
[assembly:ReflectionPermission(SecurityAction.RequestRefuse)]
[assembly:RegistryPermission(SecurityAction.RequestRefuse)]
[assembly:SiteIdentityPermission(SecurityAction.RequestRefuse)]
[assembly:StrongNameIdentityPermission(SecurityAction.RequestMinimum,
PublicKey="0xDEADBEEF")]
[assembly:UIPermission(SecurityAction.RequestRefuse)]
[assembly:UrlIdentityPermission(SecurityAction.RequestRefuse)]
[assembly:ZoneIdentityPermission(SecurityAction.RequestRefuse)]

Anyway, now that THAT's done, let's get to the point:

There's a persistence framework called Gentle.net that I think I want to use. First of all, it's GPL, so I can get in there and screw with things if I have to - and since I tend to do things in a strange way, that's probably going to happen. Second of all, the price is right. Lastly, I just like that the syntax for using Gentle.net is similar to the ideal syntax for xml serialization. This is soothing to me.

Now, how do I relate strong name signing and Gentle? I don't, and neither do the people that work on the Gentle project. There is no strong name signing, and I want to know why. Even if they distributed their strong name file, the situation would be no worse than it is now. Heck, if they set up their source tree so that everything drew from one key file, and let me people know that they should replace that keyfile and recompile, that would be good. Everyone wins - people who just wanted the binary get a strong name signed binary. People who want the source don't have to go in and add attributes to all the info files just so they can use Gentle from their signed projects.

Someone present a valid argument as to why Gentle shouldn't sign their assemblies, and we'll talk, otherwise I'm going to just be mildly frustrated, and go back to doing it for them.

Update: Mono comes with a whole mess of libraries that it uses, all but one of them is strong named sign. Props to the people responsible for ByteFX.Data, ICSharpCode.SharpZipLib, log4net, Npgsql and nunit.framework. Mono.Data.SqliteClient, you're on my list.

Posted by naginata at 10:42 AM | Comments (0)

The Dept. of Homeland Twister

threat.jpg

Side note: you can see how crappy these images are every time I post them... someone throw me photoshop~

Posted by naginata at 09:45 AM | Comments (0)

May 18, 2004

Stop me

Can't... stop... posting.

I guess going without a blog for a while made me build up some postage or something.

Also, the glorious dave has moved hosting to www.notblog.com now, so update your links.

Here's something from This Person who I don't know, but her livejournal is deadly to the pants. It's some sort of meme-fest, but it's highly addictive, and Shai-Hulud commands you to visit at least once. Anyway, I cut out the chick-specific ones, because... you know, me not being a chick and all. Sorry to dissapoint you who assume that a name ending with "a" = chick.

If she turns up here to comment, maybe she'll even get a spot on the blogroll.

EXOTIC FOREIGNER ALIAS: (Favorite Spice + Last Foreign Vacation Spot)
Garlic Kanazawa

SOCIALITE ALIAS: (Silliest Childhood Nickname + Town Where You First Partied)
Weasel Springboro

BARFLY ALIAS: (Last Snack Food You Ate + Your Favorite Drink)
Pop-Tart Sake

SOAP OPERA ALIAS: (Middle Name + Street Where You First Lived)
(Or Middle Name + Elementary School)
Ha! くろしお なぎなた has no middle name!

PORN STAR ALIAS: (First Pet's Name + Street You Grew Up On)
Harley Walnut?

Posted by naginata at 11:09 AM | Comments (2)

It's worth it.


Quiz by buntz

Posted by naginata at 10:55 AM | Comments (1)

Irraqis

A beginning is a very delicate time. Know then, it is the year One Thousand Nine-Hundred Ninety One. The Universe is ruled by the UN Emperor Shaddam IV. In this time, the most precious substance in the Universe is the crude oil. The oil extends roadtrips, the oil expands economies, the oil is vital to travel. The OPEC and its Directors, who the oil has enriched over one hundred years, use the oil markets, which give them the ability to control prices. Oh yes, I forgot to tell you, the oil exists in only one country in the entire universe, a desolate, dry country with vast deserts. Hidden away within the rocks of these deserts are a people known as the Kurdmen, who have long held a prophecy, .. that a man would come, a messiah, who would lead them to true freedom. The planet is Irraqis,... also known as .. Dune.

Ok, bear with me, this analogy struck me last night, and I find that it's fairly apt.

First, the cast of characters (and I didn't pick the sides just because I like my country... you'll see that they're apt in a minute):
Duke Leto Atreides - George Bush
Paul Atreides - George W Bush
Baron Vladimir Harkonnen - Saddam Hussein
Feyd Rautha-Harkonnen - France
Beast Rabban - Assorted Baathist Generals
Emperor Shaddam IV - The UN
Stilgar - Tony Blair
St. Alia of the Knife - Condoleeza Rice (of "Con'Dib no longer needs the weirding module!" fame)
Thufir Hawat - Colin Powell maybe? I think I could make the case.

Ok, so the situation is thus - The Baron Vladimir Hussein over-reaches his holdings on Irraqis a little much (invading Kuait), and the Emperor UN decides to allow Duke George HW Atreides to go in and take control of spice production. With the help of his trusted Mentat Aide, Colin Powell, he all but routs the Baron's forces. Then, the UN turns on the Duke, putting the Baron back in to power (or in the case of the real Iraq, letting him remain in power without letting the coalition forces into Baghdad).

Years pass, and Baron Hussein squeezes Iraq for its oil via its Baathist generals. Of course, ultimately this benefits France and the Emperor via the Oil for Food program. While all this is going on, the son of the Duke has assumed power on his own, thanks in large part to the strange powers of his family. With help from his sister, and the Fremen Naib Tony Blair, he goes back into the capital of Irraqis, flaunting his powers in front of the Emperor. France Rautha-Harkonnen makes one final attempt to embarass the young Duke, but Paul W Bush's powers are too great for even one as trained in the arts of dirty combat as France.

Oh, and something about unleashing a Jihad, but that might be where the analogy breaks down...

Also, who is Gurney Halleck?
Maybe Shai-Hulud is the WMDs? I'm reaching, I know.

Posted by naginata at 10:23 AM | Comments (3)

On being competent

So, I was informed/realized yesterday that my job right now, at least, the way which it seems to be the best for the company, is to be only moderately competent.

That is to say, it's "natural" for you to be as lazy as possible from time to time - to be just competent enough to escape notice, but that's not what I'm talking about right now. My job is to convince a certain special someone that I'm (A) very, very good at my job, but (B) too busy to take on any additional work. In fact, that I need more people to handle all my work. Now, both of those things are true, but I'm one of those "oh, a challenge. Let me get some coke and we'll get started" people. Basically, I'm practicing looking exasperated.

Wouldn't it be nice if you could go to Boss[0] and Boss[1] and say "Look, I'm very good at my job, but I need both of you to hire an additional person, and here's 2 resumes, now fight over them", and have them at least consider? Instead I have to slip some deadlines on purpose, but not enough to be fired.

Posted by naginata at 09:02 AM | Comments (2)

May 17, 2004

Who is Mr. Pac?

(< * * * * * * * * * $ $ $

Posted by naginata at 05:34 PM | Comments (4)

May 14, 2004

Another one bites the dust

So, another coworker is off the island, this time having voted himself off. First of all, I support that coworker's decisions, I think his reasons were sound, and I wish him the best of luck at his new jorb.

Second of all, seriously, wtf? Age-wise, I've gone from being the median to being the lowest in the office. At least this leaving hasn't dumped a bunch more work in my lap, that would have been difficult to bear. Hopefully now they hire someone else to come in and take some of the load. And when I say that, it's with the understanding that they've already hired someone. Someone who's job description has ZERO overlap with the 2 fellows that have left.

It's going to be an interesting month or two.

Posted by naginata at 10:42 AM | Comments (0)

May 13, 2004

Nine. Nine Fat Powers.

So, I was talking to bourbon Joel today, and we came up with a new idea for a power set in City of Heroes

The Soviet Power Set. Endows your character with all the powers of the mighty Soviet Union.

Powers:
Hammer and Sickle - You whip out a hammer and sickle with which to smite your foes.
Red Scare - foes close to you will flee in terror.
Iron Curtain - creates a wall in front of your character that your enemies cannot pass through. Without proper ID. And bribes.
Gulag - Like a mez, it relegates your enemies to obscurity, until they die. Minor cold-based DoT.
Stolichnaya - slows and confuses your opponents for a while.
Warsaw Pact - Links your life with that of your teammates, so you all draw HP from a common pool for a period of time.
Perestroika - Resurrect a fallen comrade.
Glasnost - convince one of your foes to join your team.
Will of Rasputin - substantially increases your HP and resistance to various effects.

Posted by naginata at 02:48 PM | Comments (0)

May 12, 2004

Somebody needs a mint!

freshmaker1.jpg

Posted by naginata at 11:18 PM | Comments (4)

The Video

I don't know if I should file this under "rants" or "politics" or "religion".

In the interests of free sharing of information, here's the video. I do NOT suggest you watch it. I know that will entice some of you, but I'm serious, you do NOT want to watch this video. I watched it, and had to turn away for about 15 seconds of it.

Posted by naginata at 04:52 PM | Comments (4)

Those Kooky Arabs

First of all, I wrote a very long, well-thought out post about the recent prison photo scandal and some other things, and MT ate it. So you get my best-approximation reconstruction, which will be VASTLY inferior to the original, because once my brain has finished putting something out, it moves on.

Let's start with these prison photos. Yeah, they're pretty terrible. To a culture that values pride and honor, in its own twisted way, they're particularly disturbing. There's no excuses, and I hope that whatever investigations are launched find out where the buck should stop.

Now, let me parrot the extreme-right crowd: "Where's the arab outrage at the way our personel are treated, at the mutilated bodies being dragged through the streets? Where's the arab outrage over the torture and beheadings of americans?"

There, now I got that out of my system, and I can move on. Let me say this and be absolutely clear: I don't care if the arabs are outraged or not. There is no moral equivalency - we are moral, and they are not. Period. That means that when we do wrong, we recognize it. When they do wrong, they do not recognize it.

The world isn't black and white like that, but humor me. Let's say the whole world is on a greyscale, and splits right at the middle. In this case, most of the arab media? black. Some of the American media? black. US Senators? Yeah, there's a few black ones. The French government? black. The CAIR? triple black.

That being said, I discount most of what they say as propaganda. Yes, I realize that a lot of what the white side puts out is also propaganda, but there's a difference. The white side is accountable. The white side holds themselves to a high standard, and is held to a high standard by the black side. The black side has no such standards. They are not moral, and recognize no morals.

So the photos. I expect a full army investigation, I expect bush to apologize on arab media, I expect bush to consider firing pentagon don (though I hope he doesn't), and I hope that we raze the prison.

And the video. I haven't watched it yet, I'm still debating that one, but I've heard what's in it. Apparently you can hear Nick screaming, until they cut his windpipe. Any group of people that sees sawing an innocent - someone who went to iraq because he thought he could help rebuild the national communications network - head off and distributing a video of it around the world as an appropriate retaliation to ANYTHING, deserves annihilation. When they do something like this, I expect a lot of things from us too. I expect us to level a few city blocks.

In both cases, we act. We screw up, we act. They screw up, we act. The black side cannot and does not police its own - you need morals for that.

Posted by naginata at 12:16 PM | Comments (8)

May 11, 2004

Games Bloggers Play

There's no distinction in the programming language between aggregation and acquaintance. Design Patterns: Elements of Reusable Object-Oriented Software Gamma, Helm, Johnson and Vlissides

Instructions:

1. Grab the nearest book.
2. Open the book to page 23.
3. Find the fifth sentence.
4. Post the text of the sentence in your blog along with these instructions.

Posted by naginata at 11:22 AM | Comments (1)

May 07, 2004

Blogpost

So, I'm moving from doing ~1-2 weeks of c# development, to doing some more delphi crap, which I hate. Short story: I'm having very real problems changing gears right now.

So I'm here.

Now I'm going to talk about Warcraft 3. I know you're all expecting political posts, considering, you know, all that stuff going on in iraq and washington right now... but let's be honest - It's not like I'm a "political blogger" anymore. Anyway, I've been playing a lot of WC3 lately. My record is HORRID, something like 8W-28L. I'm clearly not very good at the game. Also, this is critical - I always play Humon (on USEast, my name is "mediocretes").

There are a few situations in which I shine, and hopefully those situations are expanding. Last night I played possibly the best game I've ever played. My strategy for winning was a simple, 3 part plan.
1) Survive the first 10 minutes.
2) Control what information the enemy has.
3) Ensure that every time you encounter the enemy, he burns more money than you do.

Sounds simple, right? There's a few ways in which I accomplished these goals. Let's just do it by the numbers:

Survive the first 10 minutes


Build order is critical. Let's face it, build order is a matter of experimentation and memorization. Here's what I've been favoring lately:

  1. Build hero building
  2. 4 peasants to the goldmine
  3. Queue 3 peasants
  4. When a peasant is available, build a farm right next to the miners
  5. When a peasant is available, build a barracks
  6. When a peasant is available, build a farm on the opposite side of the mine line
  7. The next peasant that finishes building something, put them on lumber harvesting
  8. The next peasant that's finished, either put on lumber, or have build a lumber mill near the wood, depending on base layout
  9. When the hero building is finished, queue a bloodmage or paladin, depending on mood/map
  10. When the barracks is finished, queue 4 footmen
  11. use the "floating peasant" to build 1 tower. Upgrade that to an arcane tower, then get him doing farms, and eventually a blacksmith.

That usually leaves me in a condition that I can barely survive most rushes. Some people roll over me, but if I live, then I'm in good shape to build very quickly. Last nights game was against an orc, with the usual farseer/wolf rush early on. It was turned back without any trouble by my paladin and the tower.

Control information


This is strong. Especially situations like last night in 1v1 on smallish maps (plunder isle in this case), if you can control information, it's like playing rock-paper-scissors and convincing your opponent that HE knows what YOU'RE going to throw ahead of time.

Case in point - I take the 3 remaining of those 4 initial footmen, and set them on the various passes across the base. Now I know when he's sending scouts toward me, and in this case, my opponent liked to scout. Good when you're playing idiots, bad when you're playing me. Mid-game, I saw a scout coming down, and made a quick decision. I split my army into 2 groups. The Hero, my very few spellbreakers, priests, and sorceresses, I kept in my base. It's a plausible looking army. My 8-10 riflemen, I sent away into a corner where he wouldn't see them.

So Mr. Orc decides that a fleet of batriders is the way to go. Batriders come in, start working over my base, and then the riflemen come in behind them. Or the time when I let him kill off most of my casters before bringing in the riflemen to kill off his grunt army. He figures "ok, he's playing caster heavy, it'll be a few minutes before he rebuilds". 1 Paladin rez later, I'm knocking on the gates of his expansion base. The key to that one is to make sure he doesn't SEE you use paladin rez - make him think he's got time.

Take his money


This is important, especially in 1v1. On plunder isle, a map with 6 mines, make sure you have uncontested control of 3 of them. Challenge him on the fourth. The fifth, let him have, but make sure you know when he takes it. In last night's case, we both expanded late, but it worked out - my army of doom crushed his expansion right after he finished investing in it, but before it had paid for itself.

As often as possible, make sure you throw scissors when he throws paper. Even better is making sure he throws paper at your scissors. In a 1v1 small map game, use units that you can keep alive, and KEEP THEM ALIVE. I know this is obvious, but every gold you don't have to spend rebuilding is an advantage. Attrition can be your friend. Every time you take an action, it should have a purpose in your overall strategy. Harassment for harassment's sake is one thing - harassment to misdirect or mislead your opponent is better.

Ultimately, victory last night came from my opponent splitting his force before I split mine, and me having the upper hand in information. I took his expansion with a combined caster/rifle/breaker force. He immediately threw all his grunts at my expansion, and destroyed it. This was good on his part - there's no way he could have had any hope without destroying it. But sending fewer grunts would have been ok, he didn't need to crush it immediately, just halt gold production. Knowing he'd go for my expansion, I sent my army into his base, and as soon as I'd taken his defenses and remaining force out, sent my main force back to my base to stop his grunts, and left the riflemen there to clean up his base.

Conclusion: Letting your enemy see what you want him to is much better than letting him see nothing.

Posted by naginata at 03:00 PM | Comments (1)

May 04, 2004

立てジャポネスガー!!

So that trip to japan thing? Probably not going to happen. The head of engineering has decided that sending more than one person is probably a waste. Once he's put his foot down, that's pretty much it, so I've decided that I'd rather not go to japan, and have a chance at getting some respect down there, than the other way around.

Here's the thing - we're very weak internationally. The deals we have and could have with <Japanese Company> are really needed if we want to grow out of the US/Canadian market. I think if we want them to take us seriously, we need to send over a few people - 1 design engineer, one person who knows our production process at the management level, and me. Yes, I put myself on there because I want to go to japan, but look at the situation - I'm smart, I know the culture and language better than anyone else in the company, and I have my finger in pretty much every department's datapie.

Instead, we're going to send 1 engineer again, and nothing will get done, and as soon as one of our competitors shows them that they're more serious than us, we lose that potential business, and probably that whole market.

Wheee!

Posted by naginata at 04:06 PM | Comments (9)

May 03, 2004

Litany against Buffalo Chicken

I must not eat buffalo chicken.
Buffalo chicken is the tract-killer.
Buffalo chicken is the bathroom-death that brings total obliteration.
I will eat my buffalo chicken.
I will permit it to pass over me and through me.
And when it has gone past I will turn the inner eye to see its path.
When the buffalo chicken has gone there will be nothing.
Only I will remain.

Posted by naginata at 02:16 PM | Comments (5)