Is there a shortcut in Coderush to generate code for an ICollection?
CodeRush can certainly help with all sorts of code generation.
If you could be a little more specific with your question, I will refine this answer and show you what you need.
Which version of Studio (and hence .Net) are you using?
What sort of code ywould you like to see generated?
I ask because ICollection implies an interface but not what processes should back it. there are many ways in which you might choose to do this.
CodeRush cannot guess but if you have some more clues I might be able to help
Related
I am using the Haxe multi-platform programming tool (http://haxe.org) which, among other things, can generate JavaScript output. I would like to know if anyone has already done a "wrapper" library to interface Haxe with SlickGrid.
Doesn't look like one exists yet... sorry!
Unless someone has made one but just not shared it. Could be worth asking on the haxe mailing list / google group? You'll get a wider audience than on stack overflow.
If it looks like no one has done it, you can write your own... it's probably quite do-able. And not too hard either. I'd be happy to help you figure it out as you go... cause I might want to use it one day too :)
If you do decide to take that route I think the best option is to post on the mailing list, and we can help you out from there. There's also a document on the wiki with some instructions:
http://haxe.org/doc/js/extern_libraries
This stuff is always a bit daunting when you first get started, but don't be afraid to ask for help and hopefully you'll be up and running in no time.
I have an excel sheet which has many functions split across many modules and classes. I would like to know which functions / subroutines are actually being used and which I can actually eliminate. Is there any way I can produce some sort of log which would tell me this ? (I was told MZ tools may be able to provide this but was unable to find it). Thanks.
Not sure if this is an answer, but have you looked at
http://www.mztools.com/index.aspx
Make sure you download the right version, though.
By the way, I've been using MZtools (free) for a while, and I can guarantee that it's a very good piece of software for that price.
I am using fxCop and NDepend a lot at the moment, and I keep seeing the items their reports generate which are "wrong"1 and wondering to myself, why can't these tools just go and make those fixes they are suggesting?
I get some are very hard to work out, but something like the fields should be marked readonly can very easily be applied with the information the tool has. However for me it means going to the tool, finding the item then placing the code in etc... Takes considerable time even for the smallest items.
I would even be happy if I had to confirm each change, in a similar to how CodeRush Xpress does with some it's refactorings.
So is there a reason why these tools do not do this?
1 Wrong is relative here, since something like the 1700 class of fxCop errors which are all about naming aren't bad code, but do make it harder for new developers to grapple the code.
Possibly because there isn't always -- or even most of the time -- a single, correct choice of refactoring to make. There usually are dozens of ways to refactor code so, that the amount of warnings will be reduced, but the one that is actually right for the project is something a developer should decide.
Rob, this is something we (the NDepend Team) are thinking for the long term. But touching code is a domain much more sensitive than just analyzing it. And as said Rytmis, often there is not only one single choice for refactoring.
Certainly the best option will be to let NDepend send its refactoring commands to a solid existing refactorer such as R#. But this is pure supposition at the moment.
Lately I'm hearing much about COM at my work. I also learnt that COM is old. COM is deprecated. There is no future for COM. Are these true too?
I want to learn COM because I want to know what is the big fuss about it, but I'm unable to convince myself that this is a solid reason for spending so much time and learning it.
So, Can any one tell me:
Why should I learn COM?
Once I learn COM what can I do using it? I mean its applications.
I just don't see COM going away any time soon. If you want to be a windows expert, you must understand how it works.
Learning COM (or at least being au fait with its concepts) means you can integrate with thousands of existing components, including Microsoft Word and Excel.
I work largely in the Java domain, but having a little knowledge of COM means I can interface effectively to Word and Excel (in particular) to programatically create/read documents. I don't have an in depth knowledge, but I have a little, and having that increases my productivity substantially.
You should learn enough about COM to know that you don't want to learn any more.
The details of COM - particularly from a multithreaded or C++ application - are excruciatingly irritating, and I would not wish them on anyone (I don't know them myself, but I know enough to know this).
Therefore if you do need to call a COM library, you should learn enough COM to be able to do so, then stop. Ideally, use a language such as C# or Delphi where some (or hopefully most) of the details are handled for you relatively transparently.
There are a lot of COM libraries around, but if you feel you want to use one, you should look at its specific documentation for how to do this - it probably has a reasonable example that you can simply adapt for your own use without too much effort. If it does not, then it clearly isn't very good and shouldn't be used.
COM is definitely worth learning to at least some level if you are a Windows developer. Another common case for its use, in addition to the others already mentioned, is in the implementation of binary behaviors and BHOs for Internet Explorer. They are both implemented using COM interfaces between IE and your code.
I'd also like to recommend a couple of resources for learning about COM:
Don Box's Essential COM. It is an excellent description of why COM is the way it is and really helps you get a deeper understanding of what is going on. If you take the time to read this book, then you will have a fundamental understanding of COM internals that will serve you very well.
These two articles: { 1, 2 } ...are a very good discussion of the particular subject of COM apartments, alluded to as "excruciatingly irritating" (unfairly, imho) in MarkR's answer.
I am interested in writing static code analyzer for vb.net to see if it conforms to my company standard coding guidelines. Please advise from where i have to start.
Rather than write your own static code analyzer, I recommend you use FxCop: and instead, write custom FxCop rules for your needs. It'll save you a lot of time.
http://www.binarycoder.net/fxcop/
I would suggest you use Mono's Gendarme. It's a very nice tool, with plenty of built in rules. It also generates nice HTML reports.
if you need mroe architectural insight use NDepend. This tool does not stop to amaze me. It can do soo much more than FxCop. It's commercial though, but has a free trial version
FXCop is a good start for coding problems/mistakes, StyleCop is good for coding style (obviously), but if neither of those two work then you then you can either write a parser yourself or use the VBCodeProvider class in the .Net Framework
Start with FxCop. If you can't do what you're trying there, try something like NStatic or NDepend.
The best options are to use FxCop or StyleCop and write custom rules if necessary.
Use FxCop, this isn't a project you want to undertake personally. The parsing/lexical rules involved and the possible catches would be insane. The only way I could imagine doing it while retaining a modicum of sanity would be to use Lisp thanks to the extreme amount of expressiveness, but again, best to use FxCop.
If you must write a custom in-house tool for some (dogmatic?) reason, I'd recommend writing a Lisp program that does only basic rules-checking. Don't try to make it comprehensive, we're talking the kind of frontier that AI researchers are dealing with in terms of the parsing capabilities of a piece of software.
Just use Lisp to find the possible obvious offenders, or just at catching whatever it ends up being good at catching in terms of non-compliant code, then subject it to a brief human eye scan. I highly recommend abusing macros if you do use Lisp to write the parser.
I agree with one of the posters that it would be a quite difficult taks, but rather than with Lisp I'd start with F#, just like Microsoft did for their 3rd party windows drivers analysis tool:
http://arstechnica.com/journals/microsoft.ars/2005/11/10/1796
F# shares Lisp's expressiveness (ok, almost) and works on CLR just like VB.NET, which would make the whole thing easier.