chris carter's web log

 

Ugh...I Hate Cleaning

May 14, 2008 6:40 PM

Lasagna

My brother Tim went to college and at some point worked at an Italian restaurant.  While there, not only was he taught how to cook some dishes, he was also taught how to cook.  The golden rule that he was taught was that a great chef never makes a mess.  Tim taught me how to make one of the few "dishes" I can make today, lasagna.  He taught me that after using an ingredient, you put it away.  If you notice some bits of stuff lying around, like cheese or noodle bits or anything considered garbage, scoop them up as soon as you notice to stay ahead of the mess.  Finished with a bowl? either clean it or put it in the dishwasher.  Simple.  When it's time to put the lasagna in the oven to cook, there is no mess to clean up.

Scrambled Eggs

My wife Anja and I are different breeds when it comes to cooking, nothing elaborate, just stuff like fixing scrambled eggs or whatever.  Anja makes scrambled eggs by basically taking out all ingredients, mixing everything up, and leaving all of the dishes and ingredients out.  The benefit? We eat maybe a little sooner than later, BUT when we're done eating, there's a big ass mess to clean up, and did i mention that I hate cleaning?

I make scrambled eggs similar to how I make lasagna, only a little more OCD-ish.  Basically, when I'm done making the scrambled eggs, there isn't anything to clean except for the pan and spatula used to cook the eggs.  I didn't make a mess(not much anyway), and when I'm done? There's pretty much nothing to clean up, it's already done.

OK, Great, Now What About Software???

My philosophy on software development goes something like this, if you don't make a mess, you won't end up with a mess.  A similar belief of mine that usually evokes the response of laughter goes something like this, if you don't create bugs in your code, you won't end up with bugs in your code.

So, do I make messes and bugs in my software? YES.  It happens, for one reason or another it happens, BUT, and this is a big BUT, I'm capable of looking back and identifying what led to the mess and/or bug, and attempt to learn why it happened and figure out a better solution for the next time around.  As I get better at identifying things that caused previous messes and bugs, I get better at starting off on the right foot, not recreating the same stupid bugs over and over.

Bugs Are Not Respected Enuff To Get Postponed!

Bugs are like the little things that accumulate while cooking, ingredients, dirty bowls, all they do is contribute to a big pile of shit that you'll be responsible for cleaning up when the project's done.  It's not fun, I'm pretty sure if you ask any developer creating new code today if they would prefer fixing bugs over creating new cool ass code, the answer will not be fixing bugs.

So if there are known bugs, fucking fix them NOW, not later, cuz waiting is just going to make that pile of shit that needs to be fixed a little bit bigger and you as the developer a little more depressed.

Comments [0]

 

Slayer Lives

May 08, 2008 7:14 PM

OK.  Slayer is up.  It's running 64 bit Ubuntu 8.04, Hardy Heron.  I'm using my old machine, a dual core AMD 4200.

I am a linux NOOB big time.  I have been for years and always go in spurts of Linux here and there but this is cool.  With hardware so cheap and Linux getting so much better(for the windows dorks like me), I'm starting to really have fun with this stuff.  I'm writing this blog post from the new linux install too.  Need to verify how this post looks in IE from Linux? Check it out, vmware player, running 64 bit windows server 2003 and IE 7 on Ubuntu.

One cool thing is that the vmware image i'm running is a 30 gig file running on Deathangel, I set up a share, believe it or not(I almost know what I'm doing on Linux), using Samba, and vmware player had no issues about loading up the image from across the network.

Comments [1]

 

Damn You Newegg!!

April 30, 2008 10:22 AM
Comments [1]

 

The Ultimate Regular Expression Tutorial

April 30, 2008 8:17 AM

Step one.  Admit to yourself that you know nothing about regular expressions, and that it's more of a black art than anything.

Step two.  google.com.  How to split a single pascal cased word into multiple words.

Step three. Let the cursing begin.

Step four.  Write your own regex to solve your problem, it's just a tool, right?

Step five: More cursing.

Step six: Note the time, several hours have passed and nothing.  This is the f*ck it stage.

Step seven:  Write plain ol' C# in 10 minutes using SnippetCompiler to get the job done.

Step eight: When it comes to work that has to get done for $$, always skip to step seven.

The Super Duper PascalCased Word Splitter

	public static IEnumerable<string> SplitPascal(string pascalCasedWord){
		if (String.IsNullOrEmpty(pascalCasedWord))
			yield return null;
		
		List<char> buffer = new List<char>();
		for(int i=0;i<pascalCasedWord.Length;i++){
			char c = pascalCasedWord[i];
			if (Char.IsUpper(c)){
				if(buffer.Count > 0 && i > 0 && !Char.IsUpper(buffer[buffer.Count-1])){
					yield return new String(buffer.ToArray());
					buffer.Clear();
				}
			}
			buffer.Add(c);
		}
		if(buffer.Count > 0)
			yield return new String(buffer.ToArray());
	}

Usage:

List<string> words = new List<string>(SplitPascal("AgencySystemComponent"));
Debug.Assert(words.Count == 3, "should have 3 words but had " + words.Count);
Debug.Assert(words[0] == "Agency", "first word should be Agency but was " + words[0]);
Debug.Assert(words[1] == "System", "second word should be System but was " + words[1]);
Debug.Assert(words[2] == "Component", "third word should be Component but as " + words[2]);

Any regular expression advice is appreciated.

Comments [1]

 

Cool Tool: QueryExpress

April 28, 2008 1:12 PM

I haven't finished installing everything on the new rig, and I needed to run some sql queries.  I didn't feel like installing Sql Server client tools, so I dug up QueryExpress.  I love it when there's no installer! 124K executable.  Here's a screenshot from the site, click the image or this link to go to the site to download.

QueryExpress

Comments [1]