views:

345

answers:

10

I'm a java programmer, and if I see something that:

  • I don't know about
  • or just want to find a method description without opening an ide
  • or am on support

I type java [classname] into google, and there it is. If I try this crazy stunt for C# I'll come up with a whole heap of tutorials (how do I use it etc).

If I manage to get to MSDN, I have to wade through a page describing every .net technology to see how their syntax references the same object, and then I have to find the appropriate page from there ([class name] Constructor) for example.

This is even more pronounced, because I don't have Visual Studio, so I've got nothing to make it easier.

There must be something I'm missing or don't know...

  • how does this situation work for Microsoft developers?
  • how can I make my life easier/searches better?
    • are there techniques that work no matter what computer I'm on (e.g. require no computer setup/downloads)

Notes

It could be thought that java is just "java", but it's just that the java apis are only referenced/defined in the core language. For all the other languages on the JVM, it's assumed that you will just learn the correct syntax to use the java apis.

I presume that .Net only lists a whole heap of languages as the api classes are actually different and have different interfaces capabilities (or some approximation of this presumption).

Edit

While searching msdn works... in the java space I can type 'java [anyclass]' and it will generally be found... whether it's a java core api or a third party library

+3  A: 

Just type in the class name to Google or Live Search (no C# qualifier). That gets me to the type definition page at least 9 out of 10 times

JaredPar
And I was down voted because ...
JaredPar
Considering the multitude of languages and class libraries out there (esp. Java) that may share the same class name with .NET, this usually doesn't work well for me.
Svend
@Svend, I can count on one hand the number of times I've googled for a C# API and hit a Java one in the last 2 years.
JaredPar
I never have that issue either. But then, if the name is pretty common (string) I use the fully qualified name (System.String)
Will
Are you counting on your fingers in binary? :-) Because I don't have enough (unary) fingers for just the searches I did today that show Java results first, if I'd omitted "C#".
Ken
@Ken, Perhaps it's just luck but I don't have much of an issue and trust me I would complain if i did. Complaining is fun
JaredPar
Either way adding "msdn" is sufficient if you do get a collision with something else.
ShuggyCoUk
+3  A: 

Most .NET developers have a copy of the MSDN library offline, which comes with visual studio and is indexed and searchable (and integrates with Visual Studio, so you can press F1 on a method or type name and get the documentation immediately.)

It usually has the documentation and code samples in both C# and VB.Net.

It comes with Visual Studio. Sorry! This is how most people go, though.

mquander
MSDN offline is essentially the same as MSDN online. And I'd wager that 50% of the offline users are just browsing msdn.com via the document explorer due to it being configured to check online first...
Will
dexplore (the browser for msdn locally is also crap. And getting worse...
ShuggyCoUk
I could install visual studio, but I'm not really going to use it. And after my third involuntary-vista-won't-start-and-no-recovery-will-work reinstall, I've decided to cut back on what I install so that my $2000 laptop isn't reduced to $500. Trialling linux - just can't seem to make it go slow...
Stephen
I'm with @ShuggyCoUk. Mostly I get tired of it and just google it. I don't find a problem finding what I need with google.
kenny
+5  A: 

Use google to narrow down the search to MSDN

site:http://msdn.microsoft.com/en-us/library/ "search terms"

Also, you can just enter the fully qualified name if you happen to know it. For example, I want to learn about the ConfigurationManager class in the System.Configuration namespace. Dont forget to tack the ".aspx" onto the end

http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx

Ben Robbins
+8  A: 

If all you want is the microsoft class library/API description for .NET, just go to http://msdn.microsoft.com/en-us/library/ms229335.aspx

It's organized by namespace and should have the bulk of what you care about.

As to

I presume that .Net only lists a whole heap of languages as the api classes are actually different and have different interfaces capabilities (or some approximation of this presumption).

Nope. All the .NET languages use the same libraries and APIs(minus language-specific extensions, and there are fewer of those than you might think) .

MNGwinn
+1  A: 

http://www.google.com/search?q=SHGetKnownFilePath+site:msdn.microsoft.com

It really isn't that hard. I mean, I know what you're getting at, but it really isn't so deplorable that it's going to stop me from finding the information I need.

EDIT:

To clarify, the URL embedded in that full Google search URL is preceded by "site:" which tells Google to only return hits that match that domain/path. The Google query I entered looked like this: "SHGetKnownFilePath site:msdn.microsoft.com"

Hope that helps!

JMD
make the search term a string instead of a url, and you'll be accepted...
Stephen
no it's not that hard, but the java apis must be very crawlable, where the msdn stuff isn't. It's more about knowing to put the site there, which is not something I'm accustomed to having to do (due to my first sentence).
Stephen
I meant more like "http://www.google.com..?q=..or 'site:msdn.microsoft.com SHGetKnownFilePath'"so it's at the top and "accessible" rather than an "edit", but hey - the information's there...
Stephen
... \n or \n ...
Stephen
A: 

http://msdn.microsoft.com

chock full of info, my only gripe being that its search feature sucks. Google does a better job searching MSDN than MSDN does

Neil N
+2  A: 

Once you get to one of the MSDN pages there is a Language Filter at the top of the page. Click on it and deselect all check boxes except for C#, then only the C# (well almost only) information will be visible.

James Keesey
+3  A: 

Adding to what JaredPar said,

Googling

"[ClassName] members"

is nearly always effective for me.

Google search always wins over MS search.

rp
If you integrate the "C# [class] class" (see question comment thread) with this answer, I'll accept it (instead of the current selection). Even better would be to include the site:msdn method...
Stephen
A: 

MSDN search is utterly useless, and no Windows programmer ever uses it. There may be things it's able to find reliably, but Windows API documentation isn't among them.

Use Google. For .NET classes, just typing the class name usually gets you the right result at the top. For the WIN32 api, things can be a bit more sketchy.

When the basic search doesn't give you the result you need, limit your search by adding "site: msdn.microsoft.com"

And no, the .NET classes are the same for any .NET language. The only difference is in the syntax for using them. The documentation for every class generally shows usage examples in both C++, C# and Visual Basic.

Here's an example: http://msdn.microsoft.com/en-us/library/system.datetime.aspx (found just by typing "DateTime" in Google)

You can also download the MSDN library (free download, if you can find it (again, use Google)) for offline viewing (and slightly better search capabilities, if only because it doesn't show everything else from the MSDN website, but only API documentation).

But Google is generally the most convenient.

jalf
Have you tried the MSDN search in the past year? It's powered by Bing and it works rather well. The blanket statement of "no Windows programmer ever uses it" is just plain false.
Matt Olenik
@Matt: Gosh, is it really? I thought it was fairly obvious that I was exaggerating. I haven't actually consulted with each and every Windows programmer in the world, no. You may also have noticed that you're commenting on an answer that is over a year old, so no, when I wrote this, I did not know how MSDN search has worked in the past year.
jalf
Of course it's an exaggeration, it's a bad one. My mistake for not noticing the date, but even a year ago, it wasn't true.
Matt Olenik
+1  A: 

Ok - since nobody is listening to my comments on their answers, I'm going to do the roundup... (e.g. there were many good answers, but none to be complete...)

Here's what works:

  1. "site:msdn.microsoft.com [class name]" - gets you to the class description
  2. "[class name] members" - gets you to the class members/definition
  3. "c# [class name] class - returns a variety of pages - depends on class.

What I'd do:

  • I'd use 2 as a default, since it may turn up MS and external classes (I'm hoping that third party .net APIs document the same way as MSDN somewhat so the same searching will work - like Java's Javadocs)
  • 1 is for MS classes - but I'd still use members first, and then go up if I needed some more background for the class
  • 3 (and variations - .e.g c# or .net) - seems to be a less specific search that still turns up api information.

All the above worked with "string" (to prove it will find MS stuff first, not java), and NHibernate's "DriverConnectionProvider" - random selection from a project that I know of

Stephen