Tag Info

Hot answers tagged

36

The tools are there in the IDEs for a reason. As Sean pointed out languages (especially .NET ones) come with extensive class libraries that you cannot hope to remember (despite what interviewers would want you to believe). Would you expect a word processor to come without a spell checker? With auto-complete you are more productive as you can find the list ...


23

The practices of adding meaningful prefixes to symbols, such as the well-publicized Hungarian Notation, date back to the times when IDEs did not exist or were too primitive. Today, when finding a point of declaration is a mouse click away, there is no point in spoiling the most precious part of the name, its first few letters, by assigning a common prefix.


12

I don't think it's frowned on. These days most languages come with a large expansive class library (or two!) and having to commit the exact name, and sometimes casing, isn't always necessary. Plus, multiple overloads on a method make this even more cumbersome. At the end of the day you've got to understand what you're calling/doing. Auto-complete won't help ...


10

A few years ago I had to let a programmer on my team go because he insisted on using a text editor rather than the .NET IDE. To be fair, the real reason was that he was slower getting his tasks done and his code was poorer quality and caused integration problems. It's possible that some programmer-savant could have done a better job with just a plain text ...


7

As you suspect, it is to avoid name collisions between the parameter name and either member or local variable names. Member variables are sometimes given a prefix for the same reason (e.g., m_result). Personally, I prefer to just use the this prefix for member variables if there's a name collision. It's built in to the language and everyone already knows ...


6

In general, it's done: By pre-compiling (or interpreting, depending on the language) the source code in background. Starting to compiling the code may result in errors which are then shown through the IDE interface back to the developer who can immediately fix them without compiling the app manually. You may also be interested in the beginning of the MSDN ...


4

I only use a parameter prefix when the parameter is intended to be assigned to a member variable, such as a constructor or a setter. Paint (newColor) { color = newColor; } For me, I find that using a different variable name is more blindingly obvious than using the "this" prefix. For other situations, I avoid using a parameter that could be easily ...


4

The IDE builds a semantic model of the program. Which is essentially the same thing a compiler does, minus the actual code generation part. In many modern language implementations, the same code is reused for both tasks, this makes it easier to keep IDE features in sync with language features. For example, the Scala compiler is specifically designed in such ...


3

JSONP is not technically a thing, it's actually just Javascript. So it's not JSON but Javascript object initializers. If you notice, Google's response does not run as Javascript code nor is it valid JSON. So it doesn't do anything if a 3rd party site includes it as a script. Those are not 2 JSON objects for sure because the keys are not quoted. They are ...


3

Interesting question. As a developer it's natural to want to draw the lines of responsibility in a logical and efficient way based on who implemented the functionality. Sadly, users care very little who is responsible for a program not working the way the they want it to. And the users are the source of your compensation, so as a practical matter if ...


3

School is different from the real world. I would only use it at school if it was going to be available during your examinations. In the real world, there's really no reason not to. It's like relying on GPS when you move to a new city. It takes you longer to learn how to get around without it, but you still do eventually, and you get lost a lot less in ...


3

I absolutely wouldn't be without Eclipse's fantastic autocomplete. It helps you navigate your way round obscure APIs (Is it .put(), .add(), or .addElement() to add an item to an ArrayList? What's the order of the parameters to System.arrayCopy() again? Either navigate to the appropriate documentation page, or press Ctrl-Space to view a quick list of all ...


3

When talking about IDE software or about what a programming language allows to do or not at source level, I often use the word IntelliSense, which has a precise meaning in Microsoft world, but is inappropriate when talking to people who don't have to be familiar with Visual Studio. In this case, what is the appropriate term to use? There isn't one. ...


2

See this article, where it starts off referring to IntelliSense as an "implementation of autocompletion". I'm afraid you will have to be more descriptive when speaking with someone about IntelliSense that is not familiar with it or Visual Studio.


2

PHP has token_get_all to parse a file and generate the list of tokens you can use to work with code, like doing static analysis, checking the style or implementing an auto-complete feature. Python has Abstract Syntax Trees (AST), which seems even more helpful, and has also some neat features like the compile function which compiles the tree itself. In ...


2

As for the correctness of your feature, it simply is not. In fact, it cannot be. Trivial counter-example: Someone creates the label "Do not enter E-mail or ISBN here, but your name:" The problem is that you should not have to guess which textfield is for which purpose, but the text-field itself should contain this information for various reasons. For ...


2

To offer what seems to be a contrarian view: Remembering: A language library that is sufficiently "random" that you need auto-complete to help remember which method to choose (e.g. is it size or length?), is broken. Would be better to fix it, than to band-aid it. If you can't fix it, wrap it. (If you don't know what it means to wrap it, learn that.) ...


1

(Short answer – it depends: there are a gazillion different IDEs and editors which might all handle such cases slightly differently, so there is no single user interface which everyone uses) The problem is much larger than just languages where the method comes before the invocant. What horror must it be to program in languages that don't even support OOP, ...


1

Autocomplete is good - if you know what you're doing. Points in favor: No need to memorize the whole of various libraries. Easy to see what's available (I use this in Python a lot after importing something, to remind myself what's in the module, if I'm looking for something and uncertain how to use it) Points against: You have no need to memorize ...


1

I see it frowned upon a lot by folks who code in dynamic languages or languages without a sophisticated IDE available. Java or .NET programmers love it. Even for APIs that I'm familiar with, it saves a ton of time so I don't have to remember spelling or argument lists for thousands of methods or keep the javadocs open all day. I've been doing some Python ...


1

Remember that a language and a framework are two different things. None of the languages that I can think of have so many syntactic forms that a programmer with a bit of experience should have trouble remembering them. Modern application frameworks, on the other hand, tend to have dozens or hundreds of classes and thousands of methods. You might be able to ...



Only top voted, non community-wiki answers of a minimum length are eligible