What Resharper features should be highlighted? - resharper

On next week I will be talking in front of my colleagues about Resharper as a tool which improves developers' performance. Because time for this talk is limited the question is - what resharper features are worth to be spoken about more then the others?
At the moment I can think of:
code analisys/highlight
unittest runner
refactoring features (rename, extract methods, ...?)

Other than the ones already stated, I would like to add this ones:
Code verification and highlight the code that does not compile on the fly;
Ctrl + Click goes to definition;
Code suggestion/improvements (null reference exception, convert to, etc.);
Find references is way more powerful (with go to definition and go to implementation).
I agree that a demo is probably the best, and configure the infos/errors/warnings beforehand, some of them are overkill/unused.

Demo (live on the beamer) what it can do: analysis, refactoring, unit test... Don't go into details as it pretty much explains itself.
Then focus on important things that they might not discover themselves: How to configure the warnings, code formatting, keyboard shortcuts. (I really love the context sensitive Ctrl-Shift-R / Alt-Enter)

The most important thing: R# lets you write clean, concise and mostly error-free code (at least when it comes to syntactical errors) and greatly lifts up a developer's productivity.
Things that seem most attractive to me:
The many context sensitive Refactoring options (rename, move to another namespace, extract etc...)..
The environment and context sensitive Live templates.
All these options are accessible via shortcuts (which are well worth to learn...)!
If you are doing Test-driven development, you might also find the Unit test integration noteworthy...
Thomas

File Structur window.
Without that defining regions would not be so useful.

Search patterns that can be shown as errors or warnings are also pretty cool.
Navigation (Ctrl + T, F12, Alt + Home, Alt + End,...)

This is one of the coolest features in R# 5.

Go to type (Ctrl+T).
I use it in combination with "Locate in Solution Explorer" (Shift+Alt+L).

(Ctrl + Shift + T) to find/search or open file

This may sound sarcastic, but it's not: The ability to disable resharper, from Tools -> Options -> Resharper ->General -> Suspend. While resharper is awesome, it is sometimes soooooo slow. We have many different solutions, some of which are huge, and it can literally add 5 to 10 minutes to the time it takes to open and/or build our larger solutions. I love that I can suspend resharper when I don't need it and when working on the larger solutions, and then just re-enable it again on the days that I do need it and when I'm working in smaller solutions.
The actual features that I use most are:
Ctrl+Shift+T to find files (works better than the VS native Ctrl+,).
Alt+Enter for code improvements.
The code suggestions given with blue/red squiggles.
The little glyph it puts beside unit tests, so you can easily run a single test.
Go To Implementation is great when working with projects using IoC.

Related

unwanted: APL keyboard overlay enabled?

I've been trying out APL. I'm running Windows 10 and I've installed Dyalog 18.0, and the APL Language and APL Backtick Symbols extentions for VS Code.
But even though I'm not running any of these programs, sometimes suddenly my keyboard is hyjacked! All my ctrl commands are replaced by APL symbols.
E.g. ctrl-Z (undo) becomes ⊂ and ctrl-A (select all) becomes ⍺. I have no idea why and how to disable this again. This makes it very hard to do my work!!!
I've been googling for this, but haven't found an answer so far. I've looked at the Windows keyboard settings, but it looks normal. The locale settings are also correct.
I'm now just de-installing everything, but that way I need to reinstall every time I want to try out APL.
Can somebody tell me what is happening and how to fix it? (And tell me who to complain to that this is a very hostile feature)
I am sorry that our Unicode IME is causing you confusion.
I do like using it, but there are some Windows settings which I set to make things easier.
Start button->Settings
In the "Find a setting" edit field, type Advanced keyboard settings
Click on the icon with that text on it
Under Switching input methods:
Tick the “Let me set a different input method for each app window”
Tick the "Use the desktop language bar when it's available". This option will show the orange D icon when our Dyalog Unicode IME is active.
On this same dialog, there is a Input language hot keys.
I find it convenient to select a hot key combination to activate our Unicode IME, and another one to go back to the default Windows keyboard layout.
Close this dialog with the X button in the top right.
If you have further problems or questions, you can always ask us at support#dyalog.com
By the way, we put links to advice pages about keyboards on our website under Resources->Fonts and Keyboards.
Regards,
Vince
When installing the standard Dyalog IME, there is a new keyboard input method on Windows. Have you checked WinKey+Space? This should cycle through available keyboard layouts and you should find your previous/default layout available there.
I personally agree that this is not a good way to handle keyboarding and causes many issues for newcomers to APL. Dyalog is aware and are looking into alternatives that can be comfortable for both new and existing users.
You can uninstall the standard IME without uninstalling the entire interpreter by running the Dyalog uninstaller (search "uninstall Dyalog" in your start menu) and selecting just the IME.
For now, I recommend the APL Wiki article on Typing Glyphs for some ideas for alternatives to the standard IME: https://aplwiki.com/wiki/Typing_glyphs#Windows
I personally use the abrudz keyboard with Alt Gr as the switching key.
I just wanted to add that your complaint has reached the people who need to be complained to. This is a difficult problem space, between changing technologies, multiple platforms, new or casual users of APL and the folks who use APL all the time and want to type APL symbols into e-mail messages, etc. It is most definitely time for an overhaul of the keyboard technologies that we use and this will be on the to do list for the next development cycle. Until then, I hope you manage to get by with the advice that has been offered so far!
Thanks for the shout,
Morten Kromberg, CTO, Dyalog

Android Studio using Kotlin - is there a way to automatically fold multiline comments?

Been getting into Android Studio (and Android development in general) lately, mostly a personal challenge to make a modern version of an app my mum loves but hasn't been updated in ages. But my life story isn't the point, and that's not just because it's not that interesting.
The actual question:
Is there a way to make Android Studio do automatic folding for block comments (i.e. /* to */) in Kotlin files? In Settings > Editor > Code Folding there's options for documentation (in general) and multiline comments for C or Java, but no settings specific to Kotlin, and just one for Android in general (which has nothing to do with comments).
The reasoning: Because I'm still pretty new at this, there's a lot of things I've tried but haven't worked, and comment out instead of deleting because I still might be able to learn something from them later. There's also some big blocks of logging code for debugging that are great when I'm trying to debug but in the way (given I usually write them in the middle of classes or methods) when I'm not, so I comment them out. It's just annoying having to fold several sections of comments whenever I open a file.
The "well duh" solution?: I could set them as documentation comments, which would hopefully get automatically folded, but if I start writing documentation (like I really should get around to) they'll get mixed in and that would be annoying.
What I've tried so far: Going through all the settings with a fine tooth comb (and I'll freely admit I could have gone over something obvious) and searched for plugins for code folding, about the only one I could find is https://plugins.jetbrains.com/plugin/12007-foldingplus which doesn't seem to do anything about this particular problem.
Can anyone help me out here, other than maybe "be less of a newbie in general"?
With Android Studio Arctic Fox I found that if you highlight a region that has the comments in question, you can right-click on it and one of the options will be Folding. From the expanded options select Fold Selection / Remove Region and the selected comments will fold.

Code-oriented editor : Must-have features?

I hope this question doesn't fall into the "subjective question" case, but here's what :
I've been coding for almost 18 years, and having migrated to Macs for the last year or so, it was inevitable to start thinking about writing a code editor from scratch - probably, just to try this thing out, or to make something that perfectly suits my needs. And I was wondering :
What are the absolute MUST-HAVEs of a good code editor*? (by order of priority, if possible)
If we're talking about a not-so-conventional feature, could you give me an example of actual implementation of that particular feature? ("xxxxx" like in Notepad++ on Windows).
Looking forward to see your answers...
*Well, there is sometimes a thin line between what could be considered as an "Editor" and an "IDE", but let's just not exclude more... IDE-oriented ones...
Syntax highlighting with error checking.
"Go to Definition"/"Go to Declaration". Other types of quick "Go To"s.
As many kinds of autocompletion as you can possibly imagine.
Vim mode or being a Vim clone (command/edit mode dichotomy).
There's a lot of other nice-to-have features like automatic refactoring but the above I believe are definitive traits of a source code editor.

VIM: More precise C/C++ code parsing solutions?

Pre:
I've been working in VIM for like a year already. Lots of great things: combinations, scripts. Whenever I'm editing something in a different editor, I feel sluggish/uncomfortable without VIM's navigation.
The problem:
The thing that really bothers me most of all is source code navigation using existing tools (ctags, cscope). Often, ctags can't find the declaration of a variable, cscope as opposed to ctags finds all definitions with the same variable name. Same craziness with call tree navigation, finding forward declarations along with a single class definition etc.
Compared to MS Intellisense, Visual Assist or even source code navigation in Eclipse, Exuberant Tags/cscope seems to be deprecated for at least 10 years.
I know there are tools like ViEMU, but they don't really solve the problem, since you lose lots of VIM's functionality.
The question:
I was wondering if there is a tool that does the source parsing better, or there is some way to integrate source parsing engines like Intellisense into VIM ?
Maybe there are commercial solutions or there are people who are ready to implement one ?
All the benefits of VIM seem to save less time than is being wasted while navigating to class definition, compared to Visual Assist, where it's done by a single Alt-G shortcut.
Search and Call tree
You could try eclim, which is a way to use some Eclipse features in Vim.
For C/C++, it provides :
Context sensitive completion (although it is disabled on Windows because it is buggy)
Context sensitive search in Project files (through :CSearchContext)
Call tree for functions/methods (:CCallHierarchy)
Code Validation (:Validate)
It is not great, but it can help in some cases.
Code Completion
Regarding automatic code completion, I primarily use OmniCppComplete, which is using tags to provide Context aware code completion. It is not that bad.
As advised by Luc Hermitte, you can also use clang_complete which does not need ctags, but needs clang installed.
Unfortunatelly, it is a real problem. ctags or cscope can hardly compete with Visual Studio code browsing - it actually uses a C++ compiler front-end to parse the code for the editor.

What are the best keyboard macros for programming in windows?

I like putting shortcuts of the form "g - google.lnk" in my start menu so google is two keystrokes away. Win, g.
My eight or so most frequent applications go there.
I also make links to my solution files I am always opening "x - Popular Project.lnk"
Are there any better ways to automate opening frequently used applications?
AutoHotkey is a reasonably good program for implementing windows key shortcuts. You might instead define WIN + G to be "open browser to google" which gives you a better response time (don't have to wait for start menu to popup, etc)
There are macro programs that change the macros used based on the window that's in focus. I've never needed that much control, but you might want to look into that.
-Adam
Get a keyboard launcher program like Launchy
For shortcuts I use Launchy
For macros I use AutoHotKey
Others will suggest SlickRun for shortcuts also.
I use a lot the "intellisense" snippets in Visual Studio. You can include your own snippets and press double tab when they appear in the list. That's definitely a time saver.
I use QuickMacros and love it.
so much so, that I did some extensive training articles on it here.
The holy grail-
Ctrl-C, Ctrl-V
I kid, I kid! Try the veal!

Resources