Jan 21

And so it begins.  Barack Obama was of course sworn in to the Presidency yesterday, and the world was on stage to watch:

President Barack Obama's Inaugural Address

I must admit that I’m excited as heck for this.  After the last 8 years of policy, President Obama should bring an interesting change to Washington.  Already, he’s moving to make the Whitehouse more answerable to the people of this country, which is a great thing.  He’s introduced limits to pay rates of his administration, and has told his staff to err on the side of publicity, rather than secrecy, when it comes to the dealings of the government.  You can read an Associated Press article on this here.

However, as excited as I am about the future of this country under President Obama, I’m not without reservations.  Presidents and politicians have told us numerous times in the past that they were for one thing, or were going to fight for something, and then didn’t.  Obama is well on his way to being a fantastic president, but only time will tell if he can deliver, or make great strides in delivering, those items that he’s talked about on the campaign trail.  We all know that some things take time, so as long as I see work toward his goals, if not achievement, then I’ll be happy with him, and be willing to give him another term come 2012.

Tags:
Jan 20

So I just installed the Windows Live Writer, which allows you to create and publish blog postings from the program.  What makes it much nicer than doing it on the actual site is that the application supports plug-ins.

For instance, the one that I really wanted that started me down this path was the Syntax Highlighter plug-in, which takes source code that you paste in to it, and formats it nicely for the blog.  Here’s a simple Hello World example to show off what it can do:

#region Using Directives
using System;
#endregion

namespace TestApp
{
	public static class App
	{
		[STAThread]
		public static void Main()
		{
			Console.WriteLine("Hello World!");
		}
	}
}

I intend to spend some time learning what Live Writer can do for me, as well as what Windows Live has to offer.  So far, I’m impressed.  I’ll record my learning here.

Tags:
Jan 20

A collegue of mine at work needed to find the next available ID for a non-identity column in a table.  For instance, if the rows in the table have 1, 2, 3, 6, and 10 in the table, then the query would return 4.  I found the following code snippet (modified for testing) by Steve Baldwin at this location:

Declare @Test Table
(
    ID int
    ,[Description] varchar(50)
);

Insert Into @Test Values (1, 'Row 1');
Insert Into @Test Values (2, 'Row 2');
Insert Into @Test Values (3, 'Row 3');
Insert Into @Test Values (4, 'Row 4');
Insert Into @Test Values (8, 'Row 8');
Insert Into @Test Values (9, 'Row 9');
Insert Into @Test Values (11, 'Row 11');
Insert Into @Test Values (12, 'Row 12');
Insert Into @Test Values (13, 'Row 13');
Insert Into @Test Values (14, 'Row 14');

Select
    Min(ID) + 1
From
    @Test a
Where
    Not Exists (
        Select
            0
        From
            @Test b
        Where
            b.ID = a.ID + 1
    ) 
Tags:
Jan 19

OK, I think I've finally settled on the theme that I really like.  It's called iTheme, and as of today, is the theme shown on the site.  I want to make it a bit wider, and will most likely be uploading a new version in the next couple days, but for now, I really like how it looks.  I also intend to get some monkey images up at some point as well.  Why?  Well, think about the name of the site...

In other news, I've managed to find 3 pretty substantial bugs in a version 6 production application that we use at work.  Apparently, some people have never heard of Q & A.  Sad, really.  It took me all of 2 seconds to fix each, once I'd found the cause (in an application that has an ASP file, a JS file, a VBI file, and possibly and XML file to edit to correct one stupid thing, they take a while to find).  Why anybody would continue to release NEW products in ASP is beyond me.  Microsoft is getting ready to soon relase .NET 4.0.  Come on, guys!  Get on the friggen ASP.NET bandwagon already...  Yell

Tags:
Jan 15

In creating a custom NAnt task for a deployment project I've written at work, I needed to gain access to our deployment web server to reset the default web site.  The sample I had that worked was a .vbs file, and I wanted to convert it to C#.  True, I could have worked with System.DirectoryServices and System.Management, and gone through WMI, but I couldn't quite get the security to work (I'm somewhat of a virgin on those 2 namespaces, so I'm sure it could've been done, but being on a timeline, and having a working example, I went with the .vbs code).

So the question, then, was "Is there a C# alternative to GetObject"?  Could I have imported Microsoft.VisualBasic?  Of course.  But I really wanted to find the C# equivelant, for future reference if nothing else.  Enter .NET Reflector.  2 minutes inside the application, and I found the answer.  Marshal.BindToMoniker.  It's called like so:

  • object w3svc = Marshal.BindToMoniker(String.Format("IIS://{0}/w3svc", _Server));
Enjoy the result of my labor.
Tags: | | |
Jan 15

The company I work for recently purchased an application that we lowly developers are of course required to support.  The problem lies in the fact that it's implemented in Classic ASP.  In and of itself, this isn't a bad thing.  A little archaic with it's wonderful jumble of spaghetti code (dammit, now I want spaghetti), but certainly maintainable.  No, this particular product doesn't stop there.  Almost all of it's configuration is in large XML files, all of which have to be cached when the web application first loads.  After a 5 minute wait, you're up and running.  If the session didn't time out first, of course. If you make a small change to a javascript file, you get to wait another 5 minutes to reload it in to the cache.

Adding controls to a form is fun.  You have to change the database to store the new value(s), alter about 5 different settings in a designer that takes at least 30 seconds to change each setting, then publish, which takes another 5 minutes.  So, to add a control to a form, you're looking at a good half hour of work.  Minimum.  For one field.  Another half hour for the 2nd field, and so forth.  Undecided

Ah, the wonderful life of a developer.

Tags:
Jan 13
I'm looking forward to this Mac...

Apple Introduces Revolutionary New Laptop With No Keyboard
Tags:
Jan 12
I'm currently playing around with a bunch of various themes on my local dev box, hoping to find that one that jumps out at me as "Cool!".  In the mean time, I'll stick with this one, as I like how it separates the categories from the rest of the post.  Whatever theme I use permanently will do the same.  I've got a couple that I'm converting to BlogEngine.NET themes as I find time.  We'll see how it goes, but they look nice!
Tags:
Jan 09

Hi there, and welcome to Feral Code Monkies! This will be my place on the web to talk, rant, compliment, rave, and generally get my thoughts off my chest for the whole world to ponder on.  As of now (the 9th of January), I'm just getting the site running, so I don't have a lot of content, but for anyone who knows me... just give me time, baby!

My eventual goal is to make this site a place of learning, as well as thinking, and most definitely, of humor.  For starters, check out this little tidbit from one of my favorited sites, icanhascheezburger.com by clicking here

Tags:
Jun 28

If you see this post it means that BlogEngine.NET 1.4.5 is running and the hard part of creating your own blog is done. There is only a few things left to do.

Write Permissions

To be able to log in to the blog and writing posts, you need to enable write permissions on the App_Data folder. If you’re blog is hosted at a hosting provider, you can either log into your account’s admin page or call the support. You need write permissions on the App_Data folder because all posts, comments, and blog attachments are saved as XML files and placed in the App_Data folder. 

If you wish to use a database to to store your blog data, we still encourage you to enable this write access for an images you may wish to store for your blog posts.  If you are interested in using Microsoft SQL Server, MySQL, VistaDB, or other databases, please see the BlogEngine wiki to get started.

Security

When you've got write permissions to the App_Data folder, you need to change the username and password. Find the sign-in link located either at the bottom or top of the page depending on your current theme and click it. Now enter "admin" in both the username and password fields and click the button. You will now see an admin menu appear. It has a link to the "Users" admin page. From there you can change the username and password.  Passwords are hashed by default so if you lose your password, please see the BlogEngine wiki for information on recovery.

Configuration and Profile

Now that you have your blog secured, take a look through the settings and give your new blog a title.  BlogEngine.NET 1.4 is set up to take full advantage of of many semantic formats and technologies such as FOAF, SIOC and APML. It means that the content stored in your BlogEngine.NET installation will be fully portable and auto-discoverable.  Be sure to fill in your author profile to take better advantage of this.

Themes and Widgets

One last thing to consider is customizing the look of your blog.  We have a few themes available right out of the box including two fully setup to use our new widget framework.  The widget framework allows drop and drag placement on your side bar as well as editing and configuration right in the widget while you are logged in.  Be sure to check out our home page for more theme choices and downloadable widgets to add to your blog.

On the web

You can find BlogEngine.NET on the official website. Here you'll find tutorials, documentation, tips and tricks and much more. The ongoing development of BlogEngine.NET can be followed at CodePlex where the daily builds will be published for anyone to download.

Good luck and happy writing.

The BlogEngine.NET team

Tags: |