Be-aware of productivity tools

No comments

Monday, June 24, 2013

In his post Beware of Productivity Tools Mark Seemann explains why he shun from using so called “productivity tools” – tools like Resharper, CodeRush, JustCode or any other tool that is runs on top of Visual Studio in order to enhance development.

While I don’t know Mark personally, I’m in the middle of his book on Dependency injection and I enjoy reading his posts – which I find well written and enlightening.

Unfortunately this time I think he missed the point…

It’s not about productivity tools

I find it difficult to discuss “productivity tools” since the term productivity is misleading. Instead let’s put things on the table – I’m a  Resharper user, in the past I’ve used CodeRush and in the distant past (and probably near future) used Visual Assist. All this tools were not used for productivity sake – I’ve used them to perform two things – navigate my code and  refactor my code. Some of the tools performed additional tasks for me - i.e. run unit tests, background compilation but most of the time I find myself returning to this two features.

So instead of calling them productivity tools – a category in which my alarm clock belong to – let’s discuss the merits of the tool instead of the abstract term of “productivity”.

It’s about getting the job done

There is two points in the post that I agree with:

  1. It’s difficult to measure if a developer is “more productive”
  2. Developer doing more than just writing code.

When I do use Visual Studio without any tool enabled I find myself  looking for files, classes and methods while using my mouse to traverse the solution tree. Instead of thinking of the problem I’m trying to solve I play hide and seek with my files. I have Resharper installed on my machine and I use it when writing C++ code just because I can still use it to locate files without my hands leaving the keyboard.

As for refactoring these tools functionality exceeds the built in refactors and the find-replace dialog which leave you depending on compilation or (god forbid) runtime errors.

I can perform these tasks quickly and with precision, which means I have more time and focus to do the more “interesting” tasks – solving actual business problems.

It’s about writing better code

But there is more than that – more often than not I’ve seen developers shy from a certain refactor just because it’s difficult to execute by hand without fault.

The tools above can do amazing things from encapsulating code in a new method to renaming method/variable across multiple files and technologies (fore example code and XAML).

My boss and/or client would probably care less about how I call methods or if my code is readable if each time I change a method name it takes 1 more hour of testing to make sure I didn’t break anything.

I’m sure that a good developer would refactor his code to perfection (or he just wrote it perfectly) but lack of proper tooling (I’m looking at you VS) cause the average developer to refactor less and write less readable code.

Without proper navigation you get a certain solution organization “method” – when it’s hard to find specific classes developers tend to write all of the at the same file where a simple “find” command would suffice.

A word about zealous users

Some people love a certain tool and take it to the extreme. If a member of the audience complain that Mark has failed to use Resharper during his talk at NDC – I just feel sorry for him.

I use Resharper at work not at my talks!

Showing code during a session is difficult task to begin with – it’s hard to teach code in a limited time frame with a large audience – if I start to jump around with my “keyboard tricks” I would probably loose most of the listeners.

Conclusion

I don’t think that tools create dumb, lazy developers. I think that the lack of tools create frustrated one.

I think mark got it right when  he wrote:

I'm writing because I think you need to be aware of the issues presented here. It might make you a better developer if I can get you to actively and consciously consider a choice you may have taken for granted.

And I couldn’t agree more – don’t use Resharper just because some Guru told you so – do it if it helps you.

The opposite is also true – some developers prefer not to install additional tooling on top of Visual Studio due to many reasons from performance considerations to plain “I’m just using official MS products” – please don’t do that, try them before you decide - it might make your work easier.

Why I like C++ 11 – auto & nullptr

No comments

Saturday, June 22, 2013

I’ve been away from C++ for the last three years, this is the longest we’ve been apart.
Luckily I’ve been given a chance to sharpen my skills and in the last few weeks I’ve been working exclusively in C++.
During our time apart C++ has grown, and changed – this is not your father’s C++ it’s the new and improved C++ 11!
In fact C++ 11 seems like a completely different language – and I’m not the only one that think that:
C++11 feels like a new language: The pieces just fit together better than they used to and I find a higher-level style of programming more natural than before and as efficient as ever.
Bjarne Stroustrup from C++ 11 FAQ
So I invite you to join me as I re-discover C++. Today I’ll discuss two new keywords in C++ 11 – auto and nullptr:

auto

auto enable us to write code that looks like this:
auto i = 5;    // I'm an integer
auto s = "text";    // I'm a char*
auto vec = new vector<double>(); // and I'm vector<double>*

Did C++ just became dynamic? Of course not!
Auto is similar to C#’s var keyword – it tells the compiler to go ahead and figure out what type I want you to use – because the compiler works for us and not the other way around.
Although I’ve seen auto (and var) abused if used correctly – this simple trick can save you some time  especially when using with lambdas (new feature) or just plain Iterator<x<y<z … which happen from time to time.

nullptr

No much to tell about this – but I’ll try: nullptr replace NULL when comparing or setting pointer values. The big difference is that NULL of old was plain ‘0’ (zero) in disguise causing funny (not “ha-ha” funny)  behavior from 0 == NULL to accidently calling the wrong overload of a method – func(int) vs. func(MyClass*).
Using nullptr (of type std::nullptr_t) – if you want more details have a look at this StackOverflow question.

So far so good

Is this all – not by a long shot. C++11 have many other goodies – which I plan to write about in future blog posts.


Happy coding…

Tip: Using Notepad++ to read log files

4 comments

Monday, June 10, 2013

I had to read a log file containing a few hundred lines today at work.

My first instinct was to open it using my trusty Notepad++. While the file was not huge it was still difficult to traverse it and my eyes kept jumping between lines. Finding the  errors and warning was proving to be a hard task.

Since each line started with the severity of the message (trace/debug/info/warning/error) all I was missing was basic text highlighting – now where can I find such a tool :)

image

 

I’ve set out for work - the only question being – how hard would it be (spoiler: easy).

 

Step 1 – under Language choose Define your language

image

 

A new dialog will be opened. If you prefer you can dock it to the screen.

Choose Keywords tab

image

 

Define new keywords for Error, Warning  and any other severity you wish to highlight.

Choose the Styler button and set custom background (or foreground) for each severity.

image

 

And finally use Save as and name your new “language” – and a new language is born.

image

 

This is what the log looks like now – easy to read and spot the errors. I only wish I could have marked the whole line but at least now I can tell where the errors are.

image

 

Not too bad for less than one minute of work.

In search of a Better Place

No comments

Tuesday, June 04, 2013

Leave by inf3ktion, on FlickrLast week the company I was employed at went bankrupt. It was the end of a long process which started about a year ago. It was a sad experiencer - I believed in the company and its goals. I hoped that the company’s amazing vision would become reality - and it did for a while.

Don’t feel too sorry for me - the truth is that I was looking for the next challenge for some time now, and I had problems deciding what to do next.

During my career I’ve worked for both big corporates and small start-ups. I’ve developed all sorts of applications and enjoyed it.

It took me a few job interviews to find a place I’d like to work for. Then I did a few more job interviews just to make sure that this is what I want…

 

During the time I’ve worked of my last employer things have changed. C++ 11, .NET 4.5 (soon to be 5) and windows without a start button (to be returned) – I felt left out, I wanted to use all those cool new technologies. And so I’ve looked for a place of work where I will learn the latest & greatest always on the bleeding edge of technology while keeping my old skills in practice.

In short after looking at a few options I’ve decided that it’s time to give advices professionally, in short - I’m a consultant!

I’ve signed up with CodeValue, and I’m happy to offer my services.

 

So if you need someone to help you add unit testing to your project – let’s talk. In case you what to learn more about the topics covered in this blog – I do training as well.

But enough marketing – I’ll keep updating this blog for time to time with my new job experience.

Happy coding…

Related Posts Plugin for WordPress, Blogger...