Tuesday, 7 October 2014

How to improve your ReSharper proficiency

Many developers that start working with ReSharper realize that the learning curve is steep. There are many hidden features, many shortcuts that need to be memorized, there are many tricks that one can do in order to improve his/her productivity. So here is what I did to help my colleagues to help them learn ReSharper.

I created a REST API that returns random ReSharper tips or trick. Its source code is available on github:

https://github.com/borismod/ReSharperTnT

I used AppHarbor for continuous integration and cloud hosting. So at the end, the REST API is available at the following URL:

http://resharpertnt.apphb.com/api/tipsandtricks/

It returns random ReSharper tip or trick in JSON format:









Then I incorporated the above REST API in our command-line build process:







So every time we build, we see random ReSharper tip or trick.

Enjoy coding!

How to write to console from Windows Application



When creating a Windows Applicaiton, either WinForms or WPF it does not have console. Converting the application to Console Application seems to solve the problem. If we execute our application from a console, it will be able to print to console and everything seems to be fine. But when we run it not from a console  a new console window will appear in addition to the existing Form or WPF Window. So what we can do?



AttachToConsole will actually attach to the parent console from which the Windows Application was executed. Unfortunately, it does not move the cursor to the next line. Thus the next line is required Console.Writeline.



Sunday, 24 August 2014

Must have tools for Windows

Each one of us uses some tools that makes his/her life easier. In this post I would like to share a list of very essential tools save a lot of time and let us focus on what is really important to us. The tools have a common denominator: they help to get things or get things done. Please note the difference in terminology. Sometimes in the past there was File Manager and we had the feeling that we "manage" files. When the amount of files increased it was replaced by Windows Explorer. So we had the feeling or exploring things. Then a Search button was added that should have help us to find thing. Unfortunately it was pretty slow, so we still go lost among the files. Nowadays in the 2014 we want to "get" instead of search, manage or explore. So the tools you'll see here focus on getting programs from the internet, getting files on your computer, getting programs on your computer, getting you passwords etc.

So here they are:

1. chocolatey.org - is the ultimate installer for every program for Windows. It has an enormous catalog of pro grams for download with a one line command line. So it is the new way to "get" programs to your computer.

2. Everything -  is the fastest and most effective way to "get" files on local computer. Unlike built-in Windows Search, it is extremely fast, it does not interfere with other programs, such as anti-virus software or files written by compilers or test runners. And it can be invoked with a shortcut. I prefer WinKey-N, for the similarity for the ReSharper and IntelliJ Ctrl-N, but it is completely your choice.

3. Launchy - is the fastest and most elegant way to execute eny program on your computer. It can be invoked with a shortcut (I use Alt-Space) and with typing a few characters it finds any program you need. Launchy has also some useful pluigns like: Killy, Tasky

4. Console2 - command-line console has been for many years the way we like to execute things. But the built-in console is poor and lacks of many features. Console2 is the new and must-have console application. Among its features: multiple tabs, copy-paste with keyboard shortcuts, resize. After installing Console2, follow step described by Scot Hanselman here.

5. Dropbox - needless to say how it is important to keep all your files synced between different machines. Dropbox is one of the popular and  convenient ways to do it.

6. Lightshot- this small and non-intrusive application helps to take screenshot. It allows cropping your screen while taking the snapshot, then editing it on the spot and then copying to clipboard or saving to file. By copying to clipboard and then pasting to the desired application (even to Gmail) you can save a lot of time.

7. Keepass - we need to keep track of our passwords and there are plenty of them. Every website, every application require its own authentication. Keepass allows storing all your passwords in a single encrypted file. The file can be protected by master password, external file, Windows User account or any combination of those methods. I suggest saving the Keepass file in Dropbox folder for easy access from different machines.

All the tools listed above are free.

Sunday, 3 August 2014

TeamCityZen - TeamCity communication and socializing extension

Every organization that uses Continuous Integration can admit, that the continuous integration server became much more than just build-machine. It functions as company's central monitor for the healthiness and readiness of the software being developed. It answers many questions raised by developers, analysts, product managers, development managers, operations etc. But more than this, it became the center of communication for those team members. You can often hear conversations like those:

- I am waiting for you to finish this feature, can you let me know when you're done?
- I will commit the interface of service, so you could consume it. I'll send you an email when I do.

Those conversation led me to writing a TeamCity extension named TeamCityZen, since we are sort of citizens of the city named TeamCity. The extension enables mentioning somebody's username in commit comments. User who was mentioned in the comments will be notified by email. Support any kind of Source Control: Git, TFS, Subversion, etc.

Screenshot from TFS:






Feel free to download, use and extend.

More details: https://github.com/borismod/TeamCityZen


Clean Code Alliance second meeting summary

If you are a constant reader of this blog, you must noticed that my friend Itzik Saban and I organized a meetup group: Clean Code Alliance. Recently its second meeting took place at Kenshoo offices. We were really excited to see the growing interest to clean code in general and to our group in particular. Except of the sessions itself there is vital networking that takes place between the sessions.

On group's second meeting there were two sessions, which can be watched on group's YouTube channel:
https://www.youtube.com/user/CleanCodeAlliance



Clean Code Principles - part II by Itzik Saban


Continuous Delivery in Practice by Tzach Zohar

In order to keep in touch between the meetings, feel free to follow the group on twitter: @CleanCodeAll
and join discussions on LinkedIn group:  http://www.linkedin.com/groups/Clean-Code-Alliance-8104602

See you on the coming meetup!