Friday, July 27, 2007

VS2008 Beta2. Installed and working :)

Well the download took it's sweet time, but as I say... It;s working.
Yup VS2008 Beta2 Pro is installed and ready to cook.

Note: I have also installed the very latest builds of Coderush and RefactorPro and both are working fine. I will say that I am in fact working with a "Daily Build" of each (version 2.2.4 - dated 27th July 2007) so your mileage may vary.

Sub note: If you're a subscriber to either then you to can request a "Daily Build" from the support team. Although these may not be "stable" builds. :)

Anyway back to VS2008. As I said it installed very nicely and appears to function very nicely. Worth saying that, whilst it is a little slow in places, the general experience is not bad at all.

So far I have only had time to check out 'XML-Literals' and hunt around for the Multi-Targeting (hard to find it but it's on the "Compile" tab of the project properties and is triggered by the "Advance Compile Options" button.

If there's anyone out there who is on or knows someone on the VB.net team, can you ask them to either beat the C# team into submission or alternatively cave themselves so that we can have a little more consistency in the placement of such "Cross language" features.

Having said that much Kudos to said VB.net team. I love XML Literals. Now I just have to find out how to extract data from them as simply as declaring them.

I still haven't made up my mind (Yeah as if I could have done that about anything in so short a space of time.) about whether or not I like the hyper enthusiastic intellisense.
On the one hand it does help with things like XML-Literal syntax but then it is very hard to take when it blocks Coderush's 'ms' template. (and many more I suspect.)

Ok that's it for now. I'll let y'all know how I get on as and when I discover new and cool stuff.

Thursday, July 26, 2007

VS2008 Beta2

VS2008 Beta 2 is available. that's right it's here and this time I'm gonna install it.
Yup the Beta 1 only made it into a VM on my home box. This time I'm gonna just install it. Yeah I know I'm risking it all, but I heard good things about Beta 1 and I assume(yeah I know) that things have only got better. So here I go....

Thursday, May 10, 2007

Add Namespace

I just knocked up a new RefactorPro plugin which uses the refactoring menu to Add a Namespace around a Class, Module or other Namespace
Find it in this thread of the new Developer Express Forums.

Monday, April 23, 2007

I just snapped up Winsnap

In an effort to encourage myself to create some more useful Blog posts and Wiki entries, I have purchased a copy of WinSnap by Alexander Avdonin.I feel this has to be one of the best capture tools I have ever used. It's simple, effective, "does exactly what it says on the tin".

It captures... Screens, Applications, Windows, Regions, Objects and Menus.

It Rotates, Scales, Adds Watermarks and Inverts.

It even adds curved edges to your window shots and it even has a portable edition.

The only thing it doesn't seem able to do is take shots of itself.

It has so many super powers that it must surely be in league with the devil.

Actually some would say it is.... it may not slice or dice but that's because it can hand your little screenshot off to Microsoft's Paint.

I think you'll agree that this is one capable little program.

Oh yeah and it's < 500Kb to download. and the registered edition is only $19.95

Monday, March 12, 2007

Coderush Tip #1: Show References

In CodeRush 2.1.3, a feature called "Show References" was added.In CodeRush 2.1.3, a feature called "Show References" was added.

This feature allows one to 'Tab' through all references to a given variable/method. Simply locate your caret within the token of your choice and hit 'Tab'.
Your caret jumps to the next reference to that token in question.

Hit Shift-F12 (The default 'Show References' keycombo) and up pops the References Tool panel, to show you every reference to the given token in your entire solution.

Go on... Try it with int32 and see how quickly it works.

Now I couldn't leave well enough alone, and deciding that even this was too slow. (Sorry Mark :) ), I resolved to find a quicker way to access this functionality.

It was a very simple idea but one that seemed to gel better in my head.

Basically I changed the keystroke that fires this marvellous facility from [Shift-F12] to [Enter].

To paraphrase something that Mark Miller has said a few times.
Why make somebody push 2 keys when they can press 1?

So if you'd care to follow these few instructions, we'll see if we can't make life a little easier and reduce (by a very small measure) the chances of you suffering RSI.
(Note to reader: Actual chance of suffering RSI may increase as a result of taking this advice due to further addiction to CodeRush and hence coding)

1. First locate the 'DevExpress' menu in Visual Studio and select 'Options'
2. Next locate and select from the tree of options on the left, a branch entitled IDE\Shortcuts.
(Rather than remove the [Shift-F12] keystroke, we'll copy it.)

3. Locate the existing Shortcut in Navigation\References and right-click it.
4. Select 'Duplicate shortcut'
5. Select either the original or the duplicate and alter 'Key 1' so that it reads [Enter] (without brackets).
6. Change the context (the tree of checkboxes in the bottom right) to additionally check the 'System\In Nav Field' context.

7. Click 'Ok'

You're all done

Enjoy

Help your (VB6) Code Shine


One of the reasons that I haven't been posting of late, is down to one Warren Sirota. He is the developer behind CodeShine, a refactoring addin for VB6.

Yes that's right. I said VB6....
Codeshine does not attempt to compete on the same level as RefactorPro. Indeed it does not really compete at all, given that DevExpress have no interest in the VB6 space. (A fact I checked over with both Mark Miller and Ray Navasarkian) but it does manage to provide some of the fundamentals that are so hard to do without once you have been exposed to.

I'm talking about... 'Extract Method', 'Extract Function' and 'Introduce Explaining Variable'.

When I first approached Warren about his software I wanted to know if he had any plans to implement any form of 'Rename' (Local, Parameter, Field) or whether I would get any of the source to CodeShine with my purchase.

Although Warren does not generally share the source to his product, he indicated that we might be willing to collaborate somewhat in light of the fact that I was more that happy to contribute any changes back to the primary source for him to include.

And thus we find ourselves at a point at which I have managed (I think) to have produced a fairly workable 'Rename Var' refactoring which can be used to rename a private field, local variable or method parameter from either their declarations or indeed a reference to said variable.

We are undergoing a period of testing now and this refactoring may well make it into the commercial product. (US$74.95 at the time of this Blog post)

I am very excited to be able to help bring this sort of functionality to VB6.

So if you think this facility might be of use to you or you know someone else who might benefit, send them along to http://www.codeshine.com/CodeShine/default.htm and let's see if we can't help your code to shine that little bit more :)

Sunday, March 11, 2007

I've been gone, but I'm back now.

Ok I've not actually been away anywhere, but I haven't blogged properly this year and, without checking, I think it was at least November before that.

I can't believe I haven't blogged in so long. Well my apologies my dear reader (yes you know who you are :) ). I promise to be more forthcoming with the posts in future.

Look out for posts in the near future on....

CI Refactory: Damn this idea looks good. Jay, I'm downloading as I type this.

CodeShine: Best Refactoring program on the market for VB6 (Yes I said VB6)

CodeRush: The main reason I can't believe I haven't blogged in the last 3 months (That Joost post really doesn't count right?) it that I must have been all of the 5th person (outside of Devexpress ), to have used and loved the new additions to Coderush. (Refactor Pro still has a few rough edges but as always these are on the newer features which havn't had time to bed down yet.) Even though I'm the apparently the slowest person to have pointed out the latest CR goodness, I'm sure there are a few tips I can impart here and there that you might not have heard elsewhere.

So.... On with the Blog.......

Wednesday, February 21, 2007

Anyone out there Joost?

Has anyone gotta spare Joost invite that I could have ?

Thursday, December 14, 2006

Blogger in Beta

Just a quick note to let anyone who's interested know that I have moved my blog to the new "Blogger in Beta". This may have resulted in some strange side effects which I will try to correct as I find them.

Tuesday, November 14, 2006

NantShell

So following my last post I decided to get of my butt and see if I could make something to fill the need.


So....I've created this little program 'NantShell' which is basically a console app designed to evaluate commands entered and respond.

If the command entered is not recognised, then NantShell assumes that I am trying to specify a Nant 'Target' for it to run.

So it looks through it's list of directories and scripts to see if it has any target whose name matches the command entered (Note: command/target name match process is case sensitive.)

Well that was the start anyway. :)

Since then I have added a bunch of features to help make things easier.

1.> NantShell has it's own built-in help available by typing 'help' or '?'

2.> NantShell has commands for adding namespaces* (xml), scripts(*.build) and directories(with scripts in) to it's environment.

3.> NantShell has it's own config file (NantShell.config) (Crappy custom rubbish for now as I'm lazy. Yeah go figure :)) to list out namespaces*, directories and script-files which will be preloaded in to the environment at startup.

So basically the system understands that you want to run Nant targets but that you are way too lazy to want to create batch files or other launch mechanisms to trigger them.

Further, you might have these Targets spread over many files and have many Targets within each file.

So NantShell builds, what amounts to, a Path (or list) of (script) files which it is willing to search through each and every time you ask it, looking for the precious target you said it would find somewhere in there, and then it executes it for you.

Wow I'm sure there should have been more punctuation in there

*Note: Namespaces, in this context, are things which need to be removed from the DocumentElement of a XMLdocument before my XPath stuff would work :)

Yeah it's a hack because I am, for the moment at least, too lazy to work out why this doesn't work.

(Since I know next to nothing about xml namespaces, (and I was feeling impatient) I just thought
Screw It!... I'll just remove them.
and what do you know.... it worked :) )


So give me some feedback.

What do you think?

Oh yeah and does anyone know how I might embed this in a toolwindow for DevExpress's CodeRush?

Thursday, November 09, 2006

Nant Runner/Console

I seem to be accumulating a lot of NAnt files which require arbitrary periodic running...
I was thinking the other night about how many NAnt files I seem to have with targets which do highly useful things when run without requiring any params.

RestoreDemoDatabase
RegenerateNantXSD
GoMakeMeACoffee <-- yeah I wish

It occurred to me that it would be really good if I had a sort of dos-box *interactive* nant console application.

This app would be launched with an optional list of build files.

I could interactively ask it to load further build files and then I could execute targets by name.


So I could just Type the name of a target and it would run.

Sounds like something PowerShell could do.

or perhaps just a simple .net console app.

I've never made an interactive console app before (I guess you might call this a shell of sorts)

Can someone point me in the direction of a small example?

What do ya'll think of this as an idea anyway?

NantShell.... yeah I like the sound of that



The Nant .XSD ( schema)

Jay Flowers sent me an email this morning, to remind me that you can recreate the NAnt XSD(Schema) at any time by running the 'nantschema' task.....Jay Flowers reminded me of nant's very clever built in 'nantschema' task which will create an xsd (named however you like) containing the schema for the entire suite of NAnt tasks present your copy.

This means that if you have downloaded NantContrib or have created your own tasks, then the 'nantschema' task will reflect over these and include them in the xsd it creates.

As Jay says you can have visual studio give you this information back as intellisense by setting the default namespace of your build file to the generated xsd.

Jay also gave a link to a good 'HowTo' which covers pretty much all you need to know

Thanks for the mail Jay

:)

Nant Task - Call2

Is anyone else sick of being unable to pass parameters to a Nant 'Call' task?


I am thinking about writing a new "Call2" Nant task. It would work like 'Call' but treat all extra attributes as properties to create or overwrite prior to execution of the referenced task.

It would effectively allow me the following shortcut:

Instead of....
-------------------------------------------------------------



-------------------------------------------------------------

...I would be able to type ...

-------------------------------------------------------------

-------------------------------------------------------------

For me at least this will be quite the time saver.

Is this a waste of time?

Has someone else already done this?

Is it already in NAnt somewhere under a different name?

I'd be glad to hear anyone's opinion on the subject.

If you're interested in this task, drop me a line at my GMail address or post in the comments.


Templates in the Template editor (revisited)

So after a bit of thought (and some help from the relevant forum) I've come up with a way to use templates in the Coderush Template Editor.
You'll recall my post some several minutes ago where I declared that it would be really useful to be able to execute a template whilst editing another template.

You'll also recall (because it really wasn't so very long ago) that CodeRush, at the time of writing, does not support this.

Well I've found a solution. It's not perfect by any means but it does help quite significantly. It turns out that AutoHotKey mentioned in a previous post is nearly perfect for the job.

It cannot do 'Selection Embedding', but it can do simple text replacement based on HotStrings.

A HotString is like the key sequence that might trigger a CodeRush Template.

In this case, the simple scripts of...
-------------------------------------------------------------
:*?:<<::«
:*?:>>::»
::field::«Field»
::fieldstart::«FieldStart»
::fieldend::«FieldEnd»
-------------------------------------------------------------
... create 5 HotStrings which expand suitably from one form to another.

Thus << becomes «
and >> becomes »

The difference is that these templates are system-wide and will work in any textbox or word processor.

However there is much that these Templates cannot do.

There is no Linked Identifiers, No simple «Field» switching and I don't appear to be able to set a location for the caret to finish up at.

So while these HotStrings are very useful for setting up «cursor»_«BlockQuote» and «FieldStart»-«FieldEnd» combos, they are entirely incapable of replacing them.

Still they are useful.

Some CodeRush Template Editor Ideas

As my last post indicated, I've been playing around a lot more with CodeRush's 'Template' facility.
In my recent attempts to create all kinds of CodeRush templates, I have come across a few... items which could stand a little improvement in the template editor.

1.> «Cursor» and «BlockQuote» have little icons to represent them but «FieldStart» and «FieldEnd» do not.
I'm finding that I am using these 2 little gems more and more all the time and it's getting quite annoying to have to reach for the mouse in order to select these.

2.> My next thought was simple (like so many of them). I could create a template to create the phrases and so ease my task.
except that the template editor does not consider itself part of the IDE and as such cannot run templates within itself.

3.> One common situation is one where you have a prospective template in which you hope to embed several 'fields'. These should have temporary wording in place of each with a «FieldStart»-«FieldEnd» pair around each. Further, the first of these should have a «Cursor»-«BlockQuote» pair around the outside of it so that it becomes the initially selected field.

This leads us to a situation where one would like to do either of the following:

a.> Highlight some text and use a 'Selection Embedding' to wrap the text in a «FieldStart»-«FieldEnd» or a «Cursor»-«BlockQuote» combination or perhaps even both.

Or

b.> Click «Cursor», Select «FieldStart»,Type Some Text, Select «FieldEnd» and Click «BlockQuote»

The first case is simply not supported. I have raised it as a suggestion and am waiting to hear an answer from the support center

The second case works (Sort of). What I mean is that currently there is a bug (in my opinion) wherein after one selects an item from the dropdown list of commands, the cursor in placed to the left of the inserted command (rather than to the right).

Thus the insertion of further commands without first manually reseating the cursor, result in the commands being chosen in the order 1, 2, 3 and yet appearing in text as 3, 2, 1.

Initially it is hard to observe this behaviour because although the caret's virtual position appears to be to the left, the caret itself is not visible because the focus is on the command dropdown.

I believe that this bug is responsible for people creating templates like:

-------------------------------------------------------------
SomeText«Cursor»«FieldStart»Field«BlockQuote»«FieldEnd»EndText
-------------------------------------------------------------

...when they meant to create...

-------------------------------------------------------------
SomeText«Cursor»«FieldStart»Field«FieldEnd»«BlockQuote»EndText
-------------------------------------------------------------

Then (without noticing that something is amiss) they wonder why (and in some cases ask tech-support/newsgroup residents why) their template doesn't work.

This is a minor bug but I felt that since they seem so few and far between, I should mention it to prove that I am unbiased in things DXCore based :)


Wednesday, November 08, 2006

Nant Templates

Some Nant CodeRush Templates I've created. Available to all.
I've been doing a lot of work with Nant recently and quite frankly there is nothing quite so annoying as having to type all those angle brackets. I just don't know how a c# guy puts up with having to do that sort of thing all the time :P

Thankfully CodeRush makes this a lot easier. Within seconds I had created several useful templates which, as usual, I have chosen to share with the rest of you.

Aren't you all so very lucky :P

The file is available here


Update(09 Nov 2006) Jay Flowers points out that I have made no mention of just what templates I created (DOH!)

So.....
FYI: Templates include:- Property, Target, Copy, Delete, Exec, mkdir as well as a few aliases to help with some default uses. These should import into a Template folder of Custom\NAnt.

Also included is my most used template $ which expands to ${} with the caret in the brackets.

On closer inspection I don't seem to have included a 'Project' Template which would be good. I'll have a look at adding that.


Friday, November 03, 2006

Bugzilla?!?! You gotta be Sh*tting me

It's been suggested that I look into BugZilla..
Ok.. So I've just been to look at...

http://www.bugzilla.org/docs/win32install.html

Holy crap but that's complicated.

That's just the sort of time I don't have.

The reason I mentioned FogBugz is that although it costs money (and yeah I already approached Joel for a freebie Single-User Support-the-Open-Source-Movement edition. But that wasn't going to happen.), It is very simple to setup and it is very intuitive to use.

How do I know this? Well my company (erm well ... the one I work for) bought a copy of FogBugz a few months back for our own use and I have to say it's wonderful. Not perfect (what is?) but really very good.

But hey, asking people for donations is still a bit lame I know. So I tripped out to the Bugzilla site and well how should I put this....?

I tend to judge the maintainability/security(and in fairness flexibility) of something by how many parts it is made up of and how long those parts take to setup initially.

Shall we say that Bugzilla was clearly developed with the *nix style user/developer in mind.


I couldn't in clear conscience install that software on any machine which wasn't mine unless I was spending all day every day learning about just how it worked so that I could be sure it didn't have any gapping security holes in it.

It might very well have none. I freely admit that it probably doesn't.

But I'd much rather stick to something based on MS SQL server and IIS.
(Probably because I know a little about how they work)

Oh and if I didn't mention it already, My company had already volunteered to host this little project for me (back when I asked Joel for a copy) as long as I could give them reasonable assurances as to the security, Lack of conflicts and generally not mashing up their machine for them.

With Bugzilla I'd have to spend far too long trying understand enough to appease my conscience.

Any other ideas?


Bug Reports (and Donations :P)

With work on my plugins being so sporadic, it's sometimes difficult to keep track of what I should be working on next....
Yup its my own fault really. I asked people to contact me anyway and anyhow but in truth the best way to submit bugs and feature requests is simple.

Just send them to my Gmail address RoryBecker[At]Gmail[Dot]Com
I will then file them and deal with them as well as I can in order.

Of course if anyone wants to fund me a copy of FogBugz ( which would solve all of these issues) then feel free to donate some money:













(I believe FB costs around $120 total :P )

But for now, my GMail address is probably best for reports.


Visual Studio hotfixes available without contacting support!!

From the DailyGrid 1005 - Mike Gunderloy (my delayed congratulations by the way Mike), News that the VS.Net team are making VS.net hotfixes available for download without having to go through product support.

Thursday, November 02, 2006

DX_ContextContrib now available

My first Context-Providing plugin created to fill a need first suggested by Dan Avni in the DevExpress's Coderush newsgroup

In response to a post by Dan Avni in DevExpress's CodeRush newsgroup, I've created a new but very simple plugin which provides the developer with 3 new contexts.

Editor\Clipboard\IsMultiLine
Editor\Clipboard\Contains Literal
Editor\Clipboard\Contains RegEx

Dan's post required the first of these and I just decided to add the others for the fun of it :)

The addition of IsMultiLine allows us to create a duplicate of the 're' Template and change it so that it detects that the Clipboard string is Multi-line and therefore place this string, not in the region name, but as the region body.

The template...
--------------------------
#Region "«Caret»"
«Paste»
#End Region
--------------------------
.... seems to work great :)

Assuming of course that you tick the right contexts

Duplicate the original template (and name it 're' also) then change the body of the duplicate to the above code and add the (Clipboard)isMultiline context. Further you can either assign a negative isMultiline requirement to the original or alternatively move the priority of the new template above the old one.

Questions... comments

Again I hope this helps someone :)