Jakew
Consulting, hacking, and motorcycles

What's up w/ Twitter?

Friday, 28 December 2007 15:25 by jakew

I can't get to twitter.  is Verizon mad at them or something?

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Logo ordered

Friday, 28 December 2007 15:24 by jakew

This should be interesting.  I just ordered a logo for Engine of Progress.  I would think the name should be fun to work with, I can't wait to see what they come up with.  Hope my customers like it too.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

VS Templates – getting hands on

Thursday, 27 December 2007 17:42 by jakew

So early today I dug in to the T4 template engine. Now I’m digging in to Visual Studio’s templates. These are a whole lot easier to deal with – or at least I found the docs quicker.

Making a VS template is very easy. Just open a project and go to File and click Export template. By this point that should be well known and old hat. But that is just the beginning. VS templates allow you to extend them by adding a wizard.

To add a wizard first create an class library with a class that implements the IWizard interface. Stub out all of the methods expect RunStarted. You can use the other methods, but RunStarted is the first thing VS runs when it finds a wizard in a template.

You can do pretty much anything you want inside your wizard. In this case I add a single replacement value to the replacementDictionary ($message$). You could do other things though. For instance – the automationObject is actually a EnvDTE object so you can reach in to VisualStudio and take control of the whole environment.

My plan is to combine VS Templates and the T4 engine so I can do some big automation for myself. The biggest challenge I can see right now is that the output from the T4 engine has to go in to a value in the replacementDictionary.

Again – the trashcode project is here for your viewing pleasure. You’ll have to change the public key token in the template file to make it work.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Why do my pictures keep coming out so blurry?

Thursday, 27 December 2007 15:32 by jakew

I'm trying to make things look nice so I grab screen shots of VS and use them in my posts.  But for some reason they look blurred by the time they get to the web.  Maybe I'm not holding the mouse still while I take the picture.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Getting hands on with T4

Thursday, 27 December 2007 15:30 by jakew

Microsoft has a template engine bundled in with its DSL tools and with GAT (Guidance Automation Toolkit). Unfortunately it is a small pain to find out how to use it in your own code. Learning to write templates isn’t a big deal – there are tons of samples included with GAT.

The good news here is once you figure it out this thing is a piece of cake. Basically the secret is that you have to reference two things:

· Microsoft.VisualStudio.TextTemplating

· Microsoft.Practices.RecipeFramework.VisualStudio.Library

The first assembly is the T4 engine itself. But in order for the engine to run it needs a template host. Unless you want to write your own (not necessarily a bad idea) you will need to provide one. As it happens GAT provides you one free of charge.

So here is what the code looks like:

clip_image002

The basic outline of this code comes from – “Testing T4 templates using the GAX host” written by Jose Esrich. Now to put T4 to work for my own stuff.

Oh – you can grab my trashcode sample here. It’s hardly rocket science but no reason to retype it.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

It's not a business until you sell something

Thursday, 20 December 2007 11:03 by jakew

Guess I have a business.

Just spoke to my favorite client and they are signing up for more work.  Right now I want to do the snoopy dance around my office.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Lessons in Marketing

Thursday, 20 December 2007 09:42 by jakew

Things are really weird for me at the moment because I’m at one of those transitional phases in life. Lots of opportunity, lots of new things to learn, and way too many decisions to make in too little time.

There is a curse and a blessing that goes something like “may you live in interesting times”. Yeah, well…..

Anyway, I’m a total geek. I program, I work on cars, and general build stuff. It’s a lot of fun. But with my recent decision to fully embrace entrepreneurship I have to learn new stuff. The cool thing is that I’m just building something and I know how to do that. The trick is that some of the content isn’t native to me. Marketing for instance.

Spend some time in the land of IT cubicles and ask people about marketing and you’ll get a sense that it is a mystery to most technical people. Same with sales. It’s mushy stuff that you can’t attach a debugger to. I can’t look at a marketing plan and know for absolute certain that it is going to work. Somewhere I read that after reading a business plan or a marketing plan I should be able to walk out of my office and point at the customers for that business or marketing plan. Seems like magic to me.

Luckily it is not magic, or at least that is what I’m being told, it is just a set of processes that you have to execute.

My goal here is to provide a bunch of links to resources I’m using to educate myself. Maybe it’ll help you find your way through this stuff too.

Guerilla Marketing

by Jay Levinson

Naturally this book belongs on the list. Where would a GuerillaProgrammer be without Guerilla Marketing? Based on the author’s comments this book was controversial when it came out because it turned a lot of old marketing concepts on their head. At times it is a little rah-rah, but I suppose you should be enthusiastic about your marketing. Easy read and I think well worth the time.

Money for Nothing

By Seth Godin

Free e-book from Seth. It’s a quick read and makes several really good points about how to get traffic to your site/blog/squidoo lense/or whatever. I recommend reading anything by Seth. He tends to be very practical about marketing.

TrumpU

Yup – it’s bad hair cut time. You might not be wild about Mr. Trump’s persona but you gotta admit he gets attention. Turns out this web-site has a lot of great information about how to get your own business going. Right now I’m finish up a course on how to write a business plan. It’s actually pretty good (the course).

The Shane & Peter Inc. Blog

I’ve emailed back and forth with these guys a bit and read most of their posts. They’ve been running their own business for a bit and have experienced the heart burn and are sharing the experience. Spend some time in their archives. Some specific posts:

5 Steps for Simple and Effective Marketing

Freelancer’s Guide to Sales: You’ve Got the Cookie

10 Steps to Generating New Business

Breaking Free

Brian has a nice little ebook he sells. It’s worth reading. Again, it’s a pretty quick read and I think it’s worth the small amount he charges. He also provides a video presentation that is worth watching where he demonstrates how quickly you can setup a business online.

Strategies by Design

Julie is a friend of mine and just happens to be a marketing guru. Take some of her classes. Again, well worth the time. My only wish is that she would turn her recording in to podcasts so they can be downloaded.

There are a lot more resources on the net for marketing. This little list barely scratches the surface. The message from all of them though is that you need to get out and market. Market your product or service early and often. Keep doing it and after a while it will start to make returns for you. Luckily most of the stuff you can do is free or very cheap so you are mostly going to invest time.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Resources 3 ways

Thursday, 20 December 2007 08:05 by jakew

I'm building some server controls for a client. My controls are going to need to emit java script as part of their output. I've got a few choices available to do accomplish this:

  1. Just put the java script inline with my C#. (i.e. have a string build concatenate the strings together)
  2. Keep the java script in its own file on the server
  3. Embed the java script as a resource

I don't like the first option. If I need to change any of the code I have to deal with rebuilding the string. Plus I think it makes the code ugly and less maintainable. The second option is pretty good because we keep the java script separate, if I need to change it I just open the JS file and make the change. However this means that I have trust that the DLL with the server control and its related JS files stay together. Also somebody could come along and jack with my code in ways I didn’t really intend.

So embedding the JS file as a resource seems like a good compromise. I only have to deploy one file, the JS is kept separate and my code stays maintainable.

The only reason I'm bothering to write this is because I forgot how to deal with embedded resources. What I hate about that is it is a reoccurring pattern for me. But when I take the time to write something like this I tend to not forget.

The first two ways to deal with resources involves using RESX files. In visual studio, once you have created a project add a resource file to it. In the resource file add string1 and give it a value. How do you get that value back. There are two ways. The first way is to use a ResourceManager like so:

ResourceManager

The first like news up a ResourceManager instance by passing in the name of the resource we want to deal with. In this case I named my RESX file ResourceTable and the namespace for the project is ResourceApp - so "ResourceApp.ResourceTable". If you have trouble finding the right name use Reflector to find it.

The second way, and easier, is to use the designer that VS gives you free of charge. In this case it's just one line:

ResourceDesigner

To see what is going on expand the RESX file and look at the designer.cs file hidden underneath. Of course this feature is only available if you are using VisualStudio 2005 or newer.

The next way to deal with resources is to embedded them in the assembly. In this case I added a text file to my project. In the file's properties I set the build action to "Embedded Resource". To get at the contents of the file you have to use the Assembly object and pull out the resource stream. Like so:

ResourceStream

You could compress the code down to three lines, but that makes it less readable.

Using this approach you can embedded nearly anything you want and be able to access it at run time.

The normal use for this stuff is to deal with localization. Instead of hard coding your strings you put them in a resource file at set its locale. If you need to run in a new locale you just need to provide a new set of resources for it. But since I don't usually do that stuff I don't need to talk about it.

The project, such as it is, is available here.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

New blogger response

Monday, 17 December 2007 08:10 by jakew

I guess I need to learn some humility: http://www.wired.com/culture/lifestyle/news/2007/12/blog_advice

From Glenn - http://instapundit.com/archives2/013009.php

I love it when grey beards (in this case literally) give advice. In this case the entire claim to fame is having arrived at the party early and giving it a name, and from what I can tell from Wikipedia that seems to be about it.

The problem with the advice from my point of view is – if everybody actually took it what exactly would be linking too? At the end of the day there are a lot of different types of bloggers. Some are content producers, others act like guides, and still others fall somewhere in between. Take my favorite blogger – Glenn Reynolds (aka http://www.instapundit.com). He rarely posts without a link to somewhere else but he also contributes a fair amount of content on top of his link.

If as Mr. Barger suggests, that a blog should be primarily a list of links, then why bother? It also seems like he doesn’t like the idea of people producing original content – ie learn some humility. So who exactly is qualified to produce original content?

He’s the thing – my blog is primarily for me. I’m transitioning over to where it will also be a marketing tool, but in general nothing will change. It will still be me. I’ve always avoided talking politics, sex, and religion. I however do express opinions on occasion (like this). My primary focuses are on technology and motorsports.

Unlike people tech journalists (I can think of a few/most), I actually do this stuff to earn a living. If I bother to write an article about something it is because I just did it. As such I don’t usually have much to link to.

All that said – my success comes from flexibility. I don’t attract much traffic today. Unless you happen to search on a few specific things this blog won’t be found. As mentioned earlier I want this to be a marketing tool to help support my business. So perhaps linking more might help attract more traffic. But this will still primarily be a content site.

 

Sorry Jorn.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Setting up for next year

Sunday, 16 December 2007 18:31 by jakew

Spent today redoing my site.  My initial plan was to redo everything from the ground up.  Luckily sanity set in and I stepped back to figure out how to make CS do what I wanted.  So now Guerillaprogrammer.com is closer to what I want.

I killed several features in CS for my site and added a few new sections.  Specifically - no more forums.  I don't see that they contribute anything and I'm not planning on building a community site here anyway (never mind that I'm using CS).  I also killed the photo gallery.  I use Flickr for my pictures and it works great.  I did add three other areas though:

1) Portfolio

I'm going to build a portfolio of things I have done.  Or more accurately: work samples.  I cant actually post previous work because my old clients might not like it.  But I can demonstrate my own stuff.  I'll be providing a number of articles, code sample or working prototypes and a few video presentations.

2) Hire Me

Next year I'm jumping the rest of the way off the cliff and going entirely freelance.  I have my own corporation (Engine of Progress, Inc.) and I'm getting insurance setup.  Ideally I'd like to do most work remotely, but realistically I'm going to be getting my executive platinum back because I'll spend plenty of time in airports again.  The upside is that I'm going to be doing some really cool projects.

3) Contact information

just that - how best to reach me (email).

 

Doing this was pretty easy.  A quick google search on "Community Server Add a page" will get you what you want.  But to save time:

1) login as admin

2) go to the control panel/Administration/system tools/"manage/create articles"

3)create a new article - the name you type will become the name of the web-page (for example: portfolio becomes portfolio.aspx)

4)edit siteUrls.config -

find the navigation section and add your menu choice.  For example:

<link name="portfolio" navigateUrl="guerillaprogrammer.com/content/portfolio.aspx" roles="Everyone" text="Portfolio" />

5) save siteUrls.config

 

Wait a few minutes because it take a little while before your new stuff will show up.

Based on this little trick I think I need to spend a bit more time understanding how siteUrls works.  From examination of the file it really looks like 80% of CS's functionality comes from this little trick.  There isn't actually a portfolio.aspx page anywhere on the file system.  There is a row in the database though.  Using siteUrls asp.net redirects the request to a different page that does the actual processing.  So if you want to build your own custom plugin for CS you need to understand what is going on in here.

Categories:  
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed