Download It Now! Exec Inline: A VS2003 add-in that lets you run a chunk of code

Execute Selected Code item on edit menu

A couple of months ago I showed a short demonstration of an addin i use called Exec Inline -- well here's the installer code for Visual Studio 2003

Download the Code for ExecInline Download the code for 'ExecInline'

How to install the add-in:

Just download the ".msi" file and run it. Follow the prompts, etc.

Now when you load Visual Studio 2003, you should find a new option in the Edit menu, called 'Execute Selected Code'

Add it to the toolbar in Visual Studio 2003

Add the command to the toolbar

Right click on the toolbar and select 'customize'. Then go to the 'commands' tab, select the 'Addins' category, and find the command called 'Execute Selected Code'. Drag the little icon (with the lightbulb) to a handy place in the toolbar.

How to use the add-in

  1. Highlight the code you wish to run.
  2. Press the 'Execute Selected Code' item in the Edit menu (or the lightbulb if you've added it to the toolbar).
  3. The code is compiled and immediately executed in its own little assembly

Sorry it's not Visual Studio 2005 friendly!

When I have a chance I'll create a Visual Studio 2005 version and release that too.

Sorry no code!

If I get the time, I'll perform a few urgently needed improvements to the code and then release that for ya. I'm really not trying to keep it to myself -- it's just hard to find the time.

When I've moved the project to Visual Studio 2005 then I'll possibly release the source code on CodePlex -- then additions and modifications can be sent in easily. It's a fun little tool, but far too limited in its current state.

All Credit Belongs to...

As I've said before, all credit for this invention goes to these four places:

Code compilation retyped from jconwell's Dot Net Script Project at CodeProject.

Wrapper around compilation via dstang2000's DynamicCompileAndRun project.

Help with writing a VS Add-in: Scott Swigart, PasteAs Visual Basic Add-in

And help with getting the currently selected text from the IDE, via Kevin McFarlane's VS Csharp Macros page.

CodeProject and MSDN, what brilliant resources! No credit goes to me -- jconwell, dstang2000 and Scott Swigart, they did all the tricky bits.

Also, the idea was partially inspired by Don Syme's F# interactive which I first saw mentioned on John Lam's website -- but mostly inspired by Ctrl-E from SQL Query Analyzer. In fact the more I look into this little side project the less credit I deserve. I am a flea on the back of bigger fleas, ad infinitum.

Feedback welcome!!

Thanks to the people who volunteered to beta test this previously. Sorry I didn't incorporate your feedback into this edition, but the words "no, still broken" weren't actually all that helpful ;-) Just kiddin, I appreciate your help. All ideas, complaints will be read thoroughly prior to deletion.

 

Three Laws of Software Development

Inspired by Mitch Denny -- and based upon asimov's laws of robotics.

  1. A developer must write code that creates value.
  2. A developer must expend effort making their code easy to maintain, except where such expenditure will conflict with the first law.
  3. A developer must reduce their code to the smallest size possible, as long as such reduction does not conflict with the first two laws.

Everytime you break one of these laws, Bill Gates kills a puppy.

 

Anxiety is a good thing.

I'm an anxious person -- always have been. And this doesn't have to hold me back, nor should it always hold you back.

Anxiety can mean that you spin your wheels when you feel you should be moving forward. Anxiety can mean you worry about things that never happen. There can be a lot of negative aspects of anxiety -- and an anxious person will be quick to point out all the negative consequences of their anxiety.

But come on, Anxiety is more good than bad. I'm always anxious to get things done. I'm anxious to please people. I'm anxious to do things well. Anxious means "eagerly desirous". I'm filled with desire -- I wake up bursting with ideas, I see something happen and I anxiously consider a hundred possible consequences. An anxious life has given me a fast brain, and the endless benefits that this concurs.

Sure, anxiety can be labelled as a mental disorder, with all the social baggage that this carries. And people can use their anxiety as a label or an excuse. But don't let the label overwrite the entire syndrome. Like anything there is more to it than just the negative connotations.

If you harness your anxiety, you'll reap tremendous benefits.

Life without anxiety -- no thanks.

 

Predictions for 2007

Dynamic.Net... Link aggregators... DRM... myspace... a review of last year's guesses

Dynamic.Net

Microsoft will leak news of a new, truly dynamic, general-purpose 'ruby-killer' language, built on a forthcoming .net framework. John Lam will be part of it. F# will have helped paved the way (through the CLR) for it.

It's gonna be really nice. And by the time you can play with it, ruby will already have been "killed" by something else altogether, and Microsoft will be scrabbling to work out how to kill that.

Which isn't to say that it's a futile race. All of this effort is not for nothing. The languages and tools will continue to improve, as a side-effect of this otherwise insane competitiveness.

A true category killer to supplant Digg, Reddit, del.icio.us

Remember what searching was like, in the days before google? No search engine was quite good enough, so we jumped around: trying one, then another. There was even, for a short while, a thriving niche of meta-search-engines (dogpile i remember best) -- sites that brought back results from multiple search engines.

Google perfected their ranking algorithm, and shot to such a clear lead that for years now you've only needed that one general search engine.

I think the market for these link-aggregator-sites (digg, reddit, del.icio.us and friends) is in a similar position to search engines in the pre-google days. They're great... but not great enough. As a result you get sites like reddiggulo.us that aggregate amongst all of them.

The killer in this category will:

  1. do a perfect job of ranking and presenting the information it is given
  2. make a lot more money than google

The inner workings of such a site will require people with real smarts, not just typical startup hacks or VC savvy.

DRM to get worse before it gets better

Because content producers don't need big media companies as they once did, the big media companies are screwed and they know it: but it could take decades for them to lose all their momentum.

In the meantime, it's a fight to the death. (Death and killing are getting lots of inkage in this column -- it's just metaphoric). As well funded as they are, and with the law cautiously leaning in their favour, they'll cause a lot of collateral damage to the ability of everyone else to share content. It will keep getting worse for years: it will be a topic we're so damn sick of. I'm sick of it already, but that's nothing to how boring it's gonna get.

Safe, Cheap Nuclear Fusion On Every Street Corner

Not likely, but it's an interesting thought game.

War in the middle east, and some peace too

Why not place at least one safe bet?

Death To My Space!

Like some ugly girl you snogged in a drunken teenage riot, the kids will wake up, shake their heads in embarrassment and move on.

Probably to something uglier.

How did last year's prediction work out?

I struck out, big time. The only real prediction I remember making was this one:

"steve ballmer to go insane and crush bill gates to death in his giant grip, then eat him"

If it did happen then they've been keeping it pretty quiet.

 

Thanks for a genuine belly chuckle, Joel

The Blogging Medium -- R.I.P.

Nothing to see here.

Ok ok, an article about the laptop fiasco continues here. I couldn't help it.

You now i love joel spolsky... but you can drive a truck through two bloopers in his latest piece, talking about microsoft sending complimentary laptops to bloggers.

in particular he says:

"...even though the blogger has fully disclosed what happened, their message is corrupting the medium." {emphasis mine}

Corrupting the medium?? What happened to the real Joel? Did alien bugs eat your brain? How on earth could the medium of blogging, in general, be corrupted any further by this particular incident?

Is Joel's universe the same blogging universe that brought us (warning -- totally not safe for work) (i mean it, you have been warned) (i shouldn't even link to this trash, for fear of being bumped from google's index) (in fact i'll link to a google search that will take you there indirectly) this repugnant blog of a canadian man, working in children's television who pretends to be a beautiful nak*d tongan woman?? (the only reason i know about that site, by the way, is thanks to hugh mac-stupid-cartoon-business-cards-leod.)

The Blogging Medium -- R.I.P.

Anyway.

One other thing that bewilders me is when he says:

"...Joel on Software is really a non-profit, advertising-free site..." {emphasis mine, again}

I'm agog right there. I've been a fan for years (and will continue to read Joel on software for years to come, no doubt), but as far back as I remember there were:

  • Mentions of Fog Creek software
  • Amazon affiliate links
  • Mentions of his own book(s)

...or was I hallucinating all those things?

And there seems to be a lot of this chest-beating and pontificating going on in the blogosphere as people shout their indignance at the very thought that other people should be receiving gifts.

(Something that annoys me most is people who say "unsubscribed!" as if they'll never read another post by the author in question. Come on. It's like a train wreck. You just can't look away.)

Well, aside from that, I should probably have an actual opinion on the subject at hand. My opinion is:

it's up to the blogger what they blog, and it's up to the reader what they read.

Revolutionary stuff?

Beyond that, my personal preference is that you should disclose everything you receive. There will be cases when you should out-right reject a gratuity in advance, though there are no hard and fast rules (i don't think it's as simple as rejecting hardware and accepting software, for example). In the case of the current laptops scandal, i'd say:

  • should you accept it? if you can give it a thorough review, yes.
  • should you disclose it? all cases, yes
  • should you look hard for flaws? in all cases, yes plus!
  • should you give it away when you're done? in almost all cases, yes

Sure, it's good when a site has an up-front policy, such as that provided by the Daily Grind -- but i'd only consider this to be necessary for a site that, like the Daily Grind, purports to be objective. In a case like that I'd say the author has clearly exceeded the usual definition of a blog.

But all in all i guess it's just another storm in a tea cup, best summed up by a comment from Mike Torres left at Brandon le Blanc's site:

"Bloggers tend to make things into a bigger deal than they need to be."

Yeh, I'll stop now.

 

(image generated with the tombstone generator)

 

New Year's Resolution: Build Your Own Micro ISV!

Is this the year when you'll launch a Micro ISV?

Every time a New Year rolls around I make a solid resolution that this is the year, finally, when i'll start my own little software company. And every year I fail.

But in 2006, as you know, I finally got there with TimeSnapper, in conjunction with Atli Björgvin Oddsson. And it actually wasn't all that easy. I can see now why it took so long, and why it's something that most people procrastinate about, and other people write books about.

Coming up with an idea was easy. Writing a free product was not too hard (particularly in my case, since Atli did all the work at that point). But moving from free to professional: that was a killer. Every step along the way was a potential for delays and confusion. The sheer number of steps was daunting.

What about you? Are you planning to start a software company some day? Have you let another year slip away?

There are pitfalls at every step.

If this is going to be the year for you, then maybe I can help. Do you need ideas? Encouragement? Practical advice? Serious help? (We all need serious help).

I've got a 25-point plan written out, of the steps we took to turn TimeSnapper from a give-away to a money making venture.

I've planned (but not yet written) a serious of blog posts about each one of these steps.

It's worked okay for me and Atli. We're not retired yet, but we've done a little better than we expected. And with sufficient feedback from the clever people who read this blog, this plan could be a useful one for others to read and learn from.

So stay tuned for the 25 steps to turn amateur software into professional software.

My new year's resolution is to work on sharing those 25 points.

The outline will be delivered soon. I'm looking at it now... nodding my head, hesitating and saying, yeh, i'll post this soon.

[Update -- see 25 steps to launching a Micro-ISV]

 

What are the coolest XML projects? Really?

Oleg Tkachenko ran a competition, to give away a copy of Visual Studio Team System to whoever had the Coolest XML Project.

He just announced the winners, and a guy called Dave Pawson won, with a project for converting XML to braille. Good stuff Dave. But here's the weird part: I also won, thanks to a description of the next version of the World's Simplest Code Generator -- and also for leaking some details of a pet project of mine entitled, 'Forgiveness -- the easy way for humans to write xsl'

Here's a description of Dave's ubraille project...

"XML input. Sax parser, Java braille translator,
output in either XML (print braille format as
being developed by www.daisy.org) or ready for
the printer (embosser). Just reaching Alpha stage
and needs a port to C#."

If you have any interest or expertise in this area (including just skills porting Java to C#) I assume Dave would appreciate the support. There's a mailing list.

For my part, details of what i've promised to work on are as follows...

  • WSCG version 4

    desktop version of 'the worlds simplest code generator' -- the WSCG works by converting csv data into xml, and simple code snippets into xsl, then transforming one with the other and giving you the output.

  • 'Forgiveness'

    an abbreviated (and flexible) very terse language which gets expanded into xsl. so you write a short document in 'forgiveness', and this is expanded into an xsl document. its aim is to be easier for humans to read and write than xsl, but to also act as a stepping stone into the use of xsl, as it gives you access to the xsl it generates.

Wscg version 4 will probably include free and professional versions. Forgiveness will be a free tool.

 

Download NextAction: Updated

Hello. You might remember a little utility I put out a few months ago called 'NextAction' -- it's purpose is to help you manage the tasks that are on the top of your mind.

Download NextAction Download NextAction! (updated)

I'm still using this tool every day, so i've tracked down and fixed some shortcomings in the product. They probably don't affect all users: only users with multiple monitors, and people who resize their screens or keep their task bars in strange locations.

The new features are:

  • Press use [Control] + [Up Arrow] to move the current paragraph to the top of the document.

    This essentially marks a task as the 'Next Action'

  • Press [Control] + [Down Arrow] to move the current paragraph to the bottom of the document

    This essentially marks a task as 'done'.

Next Action is just a multiline textbox that is always on top and always out of the way. It is semi transparent, except when it has focus. There is no configuration, no other features to tinker with: saving and loading happen automatically.

I'll probably add a context menu to it someday, from which other features will be available. If you've got ideas for new features that would suit this little application, please write to me, or leave a comment.

Some other features that were added between the initial release and now:

  • Global Hot Key: Windows key + N
  • Now floats above the taskbar
  • Ctrl+A -- select all
  • Triple Click to select a paragraph

I'm still considering renaming it to something completely different. I don't want Dave Allen to sue me. Actually, bring it on Dave. I can do with the publicity.

(not yet vista friendly i reckon)