How to write a ReSharper plugin

January 17, 2010 22:34

In the previous post your humble correspondent introduced Riant plugin which allows you to specify restricted internal access for types and methods. (You say "method Foo should be accessible only within My.Name.Space" - and lo and behold, R# screams bloody murder if Foo is called outside that namespace.)

This post will shed some light on how to write such a plugin. Take it with a fine grain of salt - I'm not working for JetBrains and everything I know comes from Resharper community,
other open source plugins, and protracted hours with Reflector.
More...


Fine-grained visibility for 'internal' members

January 10, 2010 22:33

In C#, internal means that something is visible within the whole assembly but not outside.

Sometimes that forces developers to isolate components/APIs by marking them
internal and putting them in separate VS projects within a single solution. Such undoubtedly creative approach has its benefits but also has obvious drawbacks: increased compile time, complicated deployment, etc.

Of course, there are other reasons for splitting code over several assemblies, but if your reason is stated above, a small ReSharper plugin that can help.

Head over to better life with fewer assemblies!

More...


Better formatting for collection initializers with Resharper

January 3, 2010 21:42

By default, formatting for collection initializers doesn't look really neat with Resharper.

Just type some initializers or paste them from another place
or reformat existing code - and here's something you will probably get:

var hmm = new NewYearHangover
            {
                Year = 2010,
                Place = new Place
                        {
                            Latitude = "40º 55' N",
                            Longitude = "21º 00' E"
                        },
                Memories = new Memories
                           {
                               Conversations = new[]
                                               {
                                                   "Philosophy", "Aviation", "Children"
                                               },
                               Fun = true
                           }
            };


However, you can easily make it less space-consuming. How about this:

More...


NDepending Resharper

November 29, 2009 19:58

Doesn't it look like Christmas has already started? Recently I had the pleasure of being contacted by Santa Claus Patrick Smacchia, lead developer of NDepend, who offered me a free Pro license.

(In case you don't know: NDepend is an awesome static code analysis tool to measure quality of .NET apps in a bunch of ways, including code metrics and bewilderingly abstruse, yet
amazing, visualization approach.)

Woo-hoo! I remember playing with a trial version last year, which was kind of nice, but a free Pro is a free Pro. The offer didn't require a blog post in return, but very soon I realized that I cannot but post... because I'd picked up Resharper as a guinea pig.
More...


Whysharper

August 30, 2009 20:06
Recently I was playing with Resharper and suddenly got an idea that agitated me so much that I sat down and implemented it as an open source project.


More...

Resharper presentation

July 25, 2009 17:00
The other day your humble correspondent conducted a two hours training: Resharper 4.5 overview[1].



Here's nice a part of it. It captures 3 routine tasks we developers do extremely often:
  • Code completion
  • Minor refactorings
  • Moving code
More...

Why learn Resharper

June 14, 2009 20:05

The ability to use tools is innate to humans, but not only to them.

Sea otters use stones to open recalcitrant mussels (and could keep a favorite stone tucked under the armpit, for the next use). Monkeys use sticks to dig holes. Herons use twigs as bait to catch fish and dogs use ticket stampers to validate tickets in trams.
More...


Productivity Tips & Tricks

October 26, 2008 18:05
By and large, software development is about making people more productive. Take away all this red tape stuff, all paperwork, improve communication, automate everything that can be automated, accelerate everything that can be accelerated and ameliorate everything that can be ameliorated.

And developers are they guys doing all that.

So what?

The cobbler's children go barefoot!

Obviously it's not like developers don't have productivity tools - there are plenty. The home truth is that only a fraction of people use them, and even those who use do not utilize  all the horsepower. So below are some well-known ideas, along with the ones your humble correspondent considers as a cream of day-to-day productivity tricks.
More...


One Annotations Way, Resharper

September 21, 2008 21:33

     

 


Do you remember that final episode from the fourth season of a great movie "Lost", where Jack, Desmond, Kate with Claire's infant baby, Sawyer, Sayid, Hurley and Frank Lapidus were in a helicopter on their way back to the island? All of a sudden, Ben moved the island to another place.

Jeez. It was a disaster: tranquil waterscape at the very place of a firm land.

In software development, we call this NullReferenceException. Lash of all developers, the high price we pay for not initializing variables and using null as a "sign of unassigned".

More...