POV-Ray : Newsgroups : povray.off-topic : What's in an IDE? Server Time
4 Sep 2024 21:18:11 EDT (-0400)
  What's in an IDE? (Message 17 to 26 of 66)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: scott
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 02:57:25
Message: <4b8b7365$1@news.povray.org>
> Microsoft VisualStudio.

Even the free version of VS has a GUI for setting up and accessing local and 
remote databases from your code (Data -> Add New Data Source gets you 
started).  It also writes the GUI code based on what you design in the Form 
Designer GUI.  It also will create distribution packages for you with 
installers etc automatically.  I think you need the paid version to get all 
the version control stuff, but I could be wrong (never looked into that 
myself).

This sounds familiar to your argument that 3D Studio Max is rubbish because 
you only figured out how to work 1 feature of it (out of 10000) :-)


Post a reply to this message

From: Invisible
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 04:18:57
Message: <4b8b8681$1@news.povray.org>
scott wrote:

> TBH syntax highlighting is one of the least useful features of an IDE 
> for me.
> 
> Things I find most useful:
> 
> 1) Auto-complete with popup help.

I found this to be possibly the most irritating feature of IDEs. It 
*sounds* like it should be useful, but it isn't.

The whole UI slows down while it opens and populates the list of 
options. Sometimes it doesn't show up when you want it to. If you're 
trying to invoke a method of the current class, no matter what you do it 
won't populate the list. (Even once the source is compiled. Even though 
you can *see* the damned property pane right next to the code window, 
showing all the class properties. It still won't offer to autocomplete 
them.) And even when it *does* work, there is apparently no way to say 
"please use the currently selected alternative to complete what I'm 
typing", other than by using the mouse. If you press enter, it inserts 
the selection AND A NEWLINE. This is extremely annoying.

(And then there's the fact that every IDE I've seen refuses to let you 
indent your code correctly... but that's nothing to do with 
auto-complete as such.)

> 2) The debugger.

That's useful.

> 3) The GUI Form designer.

After the horror of building a GUI the hard way, I always use a GUI 
designer if I have a choice. (Like I've said, you don't need an IDE for 
that necessarily.)

> 4) The red underlining of compiler errors as you're typing (in MS C# IDE)

That's useful IF IT WORKS CORRECTLY, which it doesn't always do IME.

> 5) Auto compile/link/run with one keypress

I usually leave a CLI window open. To compile, just press the up arrow 
and enter. But sure, I'm certainly not *against* such a feature! ;-)

> 6) "Template" projects for a Windows app

What does that do?


Post a reply to this message

From: Invisible
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 04:33:17
Message: <4b8b89dd$1@news.povray.org>
scott wrote:
>> Microsoft VisualStudio.
> 
> Even the free version of VS has a GUI for setting up and accessing local 
> and remote databases from your code

Even the Java version from 10 years ago?

> It also writes the GUI code based on what you design in 
> the Form Designer GUI.

I saw that you can select "Java Applet" or something like that, and it 
generates a class with 200 miles of boilerplate that you will never ever 
need or want, which you then have to manually delete. Alternatively, 
"blank Java project" generates a class file with much less boilerplate 
in it to delete. (Mostly just verbose comments.)

I didn't try using the UI painter, so I couldn't say whether they 
implemented it for Java, whether it was any good, or whether it writes 
code for you.

> It also will create distribution packages for 
> you with installers etc automatically.

Yes, I recall there were a whole bunch of options for how to package up 
your project when you're done. (This was in the early days of Java. I 
believe you could compile it down to a Windows executable, or just a 
normal Jar file.)

> I think you need the paid 
> version to get all the version control stuff, but I could be wrong 
> (never looked into that myself).

I haven't looked either. Presumably you need a 3rd-party VC system 
before this will work? (I.e., there isn't VC capability build into VS 
itself.)

> This sounds familiar to your argument that 3D Studio Max is rubbish 
> because you only figured out how to work 1 feature of it (out of 10000) :-)

Well, it was an old version of Max. But, as far as I could tell, it only 
renders triangles. (There's probably a way to move the points around; I 
didn't look too hard for it.) The texturing options seemed pretty 
extensive though...

As for VS, it was a struggle to figure out how to make it compile Hello 
World and run it. You would have expected this to be the most trivial 
thing, but no... Given the difficulty of doing this, I didn't exactly 
hunt around for the button that embeds SkyNet into your program.


Post a reply to this message

From: scott
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 04:46:50
Message: <4b8b8d0a$1@news.povray.org>
>> 1) Auto-complete with popup help.
>
> I found this to be possibly the most irritating feature of IDEs. It 
> *sounds* like it should be useful, but it isn't.
>
> The whole UI slows down while it opens and populates the list of options.

Not here.

> Sometimes it doesn't show up when you want it to.

Not here, unless you made a typo (it's actually a good indicator to know 
you've typed something wrong if the pop-up list doesn't appear).

> If you're trying to invoke a method of the current class, no matter what 
> you do it won't populate the list.

Seems to work fine here...

> (Even once the source is compiled.

...even without the source compiled.

> "please use the currently selected alternative to complete what I'm 
> typing", other than by using the mouse. If you press enter, it inserts the 
> selection AND A NEWLINE. This is extremely annoying.

Not here it doesn't.

BTW this is with VS C# express edition (it's free), your experience with 
other IDEs may vary :-)

> After the horror of building a GUI the hard way, I always use a GUI 
> designer if I have a choice. (Like I've said, you don't need an IDE for 
> that necessarily.)

It's helpful that it's integrated though, apart from the obvious reasons of 
not having to load and switch programs and save etc, it means if you for 
example rename one of the icons or something it can update the references to 
it in all your other code files.  Also when you add an event handler the IDE 
can automatically auto-insert the method skeleton into your code and 
register it to be called for that event, so all you need to type is actually 
what you want to be done for that event.

>> 4) The red underlining of compiler errors as you're typing (in MS C# IDE)
>
> That's useful IF IT WORKS CORRECTLY, which it doesn't always do IME.

Which IDE? in VS C# Express it works flawlessly IME.

>> 6) "Template" projects for a Windows app
>
> What does that do?

You can go "File -> New -> Windows App" and it generates all the necessary 
code and resource files for a ready-to-compile form application.  You then 
simply add in whatever extra bits you need.  I guess you could do the same 
by creating all the files by hand first, and then copying&pasting in 
explorer and renaming everything everytime you wanted to start a new 
project.

I remembered another one:

7) Code refactoring.  Like if a function is getting a bit long, you can 
select a block of code and say "extract this to another function".  All 
parameters and return values will be handled automatically.  Or if you type 
a function name that doesn't exist yet, you can click and say "generate the 
boilerplate code for this function".  Or you can go to "Insert -> New Class" 
and it will create a new file with the new class template in it.  Or rename 
a variable and get the option to rename all instances of it in all files.

Sure, each of the above are fairly small things, but in total it makes 
programming way faster.


Post a reply to this message

From: scott
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 04:55:06
Message: <4b8b8efa$1@news.povray.org>
>> Even the free version of VS has a GUI for setting up and accessing local 
>> and remote databases from your code
>
> Even the Java version from 10 years ago?

Dunno, I'm using the ones you can download from here:

http://www.microsoft.com/express/Windows/

> Well, it was an old version of Max. But, as far as I could tell, it only 
> renders triangles. (There's probably a way to move the points around; I 
> didn't look too hard for it.) The texturing options seemed pretty 
> extensive though...
>
> As for VS, it was a struggle to figure out how to make it compile Hello 
> World and run it. You would have expected this to be the most trivial 
> thing, but no... Given the difficulty of doing this, I didn't exactly hunt 
> around for the button that embeds SkyNet into your program.

In VS C# I can just go to "File -> New Project -> Console Application", up 
pops a "Program.cs" source code file with about 10 lines of code, a class 
containing an empty "Main" method.  I write "Console.WriteLine("Hello 
World!");" and press F5.  Job done.

Note that as I typed Con the autocomplete list popped up and Console was 
highlighted so I just pressed enter, then when I pressed "." the next list 
popped up of methods/properties of "Console", after I typed "W" it 
highlighted "Write", but then I saw that "WriteLine" was below so I pressed 
down arrow and enter again, then I typed "(" and I was given a list of 
overloaded methods I could call, I just ignored that and entered my string, 
assuming there would be one that took a string.  Also if I made any mistake 
(or paused for too long typing before completeing the statement) it got 
underlined in red...


Post a reply to this message

From: Invisible
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 05:16:48
Message: <4b8b9410$1@news.povray.org>
>> As for VS, it was a struggle to figure out how to make it compile 
>> Hello World and run it. You would have expected this to be the most 
>> trivial thing, but no... Given the difficulty of doing this, I didn't 
>> exactly hunt around for the button that embeds SkyNet into your program.
> 
> In VS C# I can just go to "File -> New Project -> Console Application", 
> up pops a "Program.cs" source code file with about 10 lines of code, a 
> class containing an empty "Main" method.  I write 
> "Console.WriteLine("Hello World!");" and press F5.  Job done.

As I recall, with VS J++, if you do "console application", it generates 
a Java class file with about 30 lines of JavaDoc comment stubs, argument 
parsing and exception handling, and so on. (E.g., main() parses the 
argument list, and if it sees "--help", it calls a stub method named 
help() which you're supposed to fill in.)

Now you could sit there and delete all this crap, or you could select 
"empty project". That way, you get to decide what to name your class, 
and you can write Hello World quite easily. You then have to configure 
VS to know which class is the "main" that you want it to run. (And 
whether you want it to run in normal mode or debug mode, and a whole 
bunch of other stuff.) And THEN you can actually run it.

Seemed like a whole lot of work, but once you've spent an hour puzzling 
out how to do it, it's reasonably easy the next time around.

Oh, and do NOT try to delete or rename classes. VS apparently doesn't 
like this at all.

All of this happened a while ago, but my recollection is that when you 
remove or rename a source file, the compiled class files hang around, 
littering up the place. And trying to figure out where VS stores them is 
nontrivial, given that there are normal and debug versions of them. In 
the end, I decided that the easiest way to refactor was to create a 
brand new, empty project, and import the files from the old project one 
at a time. It was just the least painful way to get the job done.

(Again, this seems like a lot of work just to keep VS happy. If I were 
just using Notepad and javac, I wouldn't have to do it.)

> Note that as I typed Con the autocomplete list popped up and Console was 
> highlighted so I just pressed enter, then when I pressed "." the next 
> list popped up of methods/properties of "Console", after I typed "W" it 
> highlighted "Write", but then I saw that "WriteLine" was below so I 
> pressed down arrow and enter again, then I typed "(" and I was given a 
> list of overloaded methods I could call, I just ignored that and entered 
> my string, assuming there would be one that took a string.  Also if I 
> made any mistake (or paused for too long typing before completeing the 
> statement) it got underlined in red...

That sounds about right - except, as I say, whenever I pressed enter, it 
would move to the next line as well as entering the selected text, so 
I'd have to hit backspace to get back to where I was.


Post a reply to this message

From: Invisible
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 05:29:06
Message: <4b8b96f2$1@news.povray.org>
scott wrote:

> BTW this is with VS C# express edition (it's free), your experience with 
> other IDEs may vary :-)

Well, maybe they've fixed it since I used VS J++ a few years ago. Who knows?

(Some to think of it, I don't recall VS attempting to do any 
autocomplete when I did that C++ stuff last year... Maybe it did and I 
just don't remember. Hmm.)

>> After the horror of building a GUI the hard way, I always use a GUI 
>> designer if I have a choice. (Like I've said, you don't need an IDE 
>> for that necessarily.)
> 
> It's helpful that it's integrated though, apart from the obvious reasons 
> of not having to load and switch programs and save etc, it means if you 
> for example rename one of the icons or something it can update the 
> references to it in all your other code files.

Now that actually sounds useful.

> Also when you add an 
> event handler the IDE can automatically auto-insert the method skeleton 
> into your code and register it to be called for that event, so all you 
> need to type is actually what you want to be done for that event.

As does that, assuming it does it properly. (IME, VS usually prefers to 
have all autogenerated code perform its function in the most 
over-complicated way feasible.)

>>> 4) The red underlining of compiler errors as you're typing (in MS C# 
>>> IDE)
>>
>> That's useful IF IT WORKS CORRECTLY, which it doesn't always do IME.
> 
> Which IDE? in VS C# Express it works flawlessly IME.

Maybe the parsing rules for C# are simpler than Java or something? Or 
maybe they've just ironed out the bugs now... As I recall, it *usually* 
worked OK, but not always.

>>> 6) "Template" projects for a Windows app
>>
>> What does that do?
> 
> You can go "File -> New -> Windows App" and it generates all the 
> necessary code and resource files for a ready-to-compile form 
> application.  You then simply add in whatever extra bits you need.  I 
> guess you could do the same by creating all the files by hand first, and 
> then copying&pasting in explorer and renaming everything everytime you 
> wanted to start a new project.

I think this is perhaps part of the reason for the "you only need an IDE 
if your language sucks" argument.

When you say it "generates all the necessary code and resource files", 
what do you mean exactly? How much stuff do you need to make a form 
application that opens one blank form? I would have thought you only 
need to write a handful of lines of code - in which case, having it 
autogenerated isn't saving you much effort.

In Haskell, I can fire up Glade, paint my UI, save it, and then write 
maybe 6 lines of code in Haskell, hit compile, and I've got a GUI 
application.

(Unfortunately if you want the application to *do* something, you start 
having to write boilerplate code. For each button, you write one line of 
code that says what function to run if somebody clicks it. That's pretty 
much as minimal as boilerplate can *get*, but it's still tedious for a 
complex UI.)

In something like Java, you end up writing miles and miles of 
housekeeping boilerplate code just to get the thing to work. And that's 
probably why people see an IDE as "necessary" when writing Java code. 
The language itself is so unhelpful that you need an IDE to make the 
task tractable.

I'm not saying IDEs are unecessary. I'm saying this is probably where 
the "only pathetic languages need an IDE" argument comes from.

> I remembered another one:
> 
> 7) Code refactoring.

Now that does sound potentially useful.

> Like if a function is getting a bit long, you can 
> select a block of code and say "extract this to another function".  All 
> parameters and return values will be handled automatically.

So, what, it passes everything in scope as parameters? Or just 
everything referenced?

> Or if you 
> type a function name that doesn't exist yet, you can click and say 
> "generate the boilerplate code for this function".

What's to generate? I'm presuming it just makes a one-line function 
stub... unless you mean it does something more complex than that?

> Or you can go to 
> "Insert -> New Class" and it will create a new file with the new class 
> template in it.

Again, shouldn't an empty class be trivial to write in the first place?

> Or rename a variable and get the option to rename all 
> instances of it in all files.

OK, now does it blindly rename it *everywhere*? Like just a find & 
replace? Or does it actually apply scoping rules so that it knows it's 
renaming "the same" variable throughout?

Smalltalk VisualWorks had a feature to rename a method, but 
unfortunately it was a blind find & replace. If you wrote a class and 
discovered that one of your method names as the same as some other 
random class and you wanted to make it different, *all* the method calls 
would get renamed. (Then again, Smalltalk doesn't have static class 
information, so it's hard to do any better than that. Something 
statically typed should be able to do this right.)

> Sure, each of the above are fairly small things, but in total it makes 
> programming way faster.

I can see how that might work...

It's also quite nice having the property pane that tells you what's in 
your source file at a glance. (Especially if you're working with 
something like JavaDoc that forces you to put unrelated junk in amoungst 
the working code.)


Post a reply to this message

From: scott
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 06:16:36
Message: <4b8ba214$1@news.povray.org>
>> BTW this is with VS C# express edition (it's free), your experience with 
>> other IDEs may vary :-)
>
> Well, maybe they've fixed it since I used VS J++ a few years ago. Who 
> knows?

Most likely it's been improved a lot.

> As does that, assuming it does it properly. (IME, VS usually prefers to 
> have all autogenerated code perform its function in the most 
> over-complicated way feasible.)

In C# to handle events you register the method you want called with the 
event, it's 1 line:

button1.Click += new System.EventHandler(MyMethod);

The GUI automatically adds this line to the Form Design source file when you 
tell it to (usually you don't need to open this file, it is just called from 
the main source file).  But of course you can write that line yourself 
anywhere to add/remove event handlers at runtime.

> When you say it "generates all the necessary code and resource files", 
> what do you mean exactly? How much stuff do you need to make a form 
> application that opens one blank form?

Well there's a "Form designer" file that holds any GUI elements you add, 
that starts life as a pretty empty class definition (it just sets the class 
name, Form title text and so on).  The main code file is again just an empty 
class definition with an initialisor method that calls the form definition 
file (about 10 lines total).  It also adds references to the project for the 
assemblies you are likely to need (System.Windows.Forms, System.Drawing 
etc), and a few settings for Windows forms.

> I would have thought you only need to write a handful of lines of code - 
> in which case, having it autogenerated isn't saving you much effort.

You're right it doesn't save that much effort, but it's certainly easier to 
start with that nice organised template rather than starting from scratch 
each time.

>> Like if a function is getting a bit long, you can select a block of code 
>> and say "extract this to another function".  All parameters and return 
>> values will be handled automatically.
>
> So, what, it passes everything in scope as parameters? Or just everything 
> referenced?

Everything that is used/needed by the code you selected that isn't 
accessible from outside the original function is passed as parameters.  It 
"just works" if you click it and then compile.

>> Or if you type a function name that doesn't exist yet, you can click and 
>> say "generate the boilerplate code for this function".
>
> What's to generate? I'm presuming it just makes a one-line function 
> stub... unless you mean it does something more complex than that?

eg if I type in "bool result = NewFunction(width,height);" and tell it to 
make the stub, it will insert this immediately below the existing function:

private bool NewFunction(double width, double height)
{
 throw new NotImplementedException();
}

Again, not a huge timesaver, but it's so easy to use and it comes up so 
often it's worthwhile.

>> Or you can go to "Insert -> New Class" and it will create a new file with 
>> the new class template in it.
>
> Again, shouldn't an empty class be trivial to write in the first place?

Sure, but it's something so common to do that even saving 30 seconds is a 
benefit, especially if you want it in a new file, and that file to be saved, 
added to the current project and opened in the IDE.

> OK, now does it blindly rename it *everywhere*? Like just a find & 
> replace? Or does it actually apply scoping rules so that it knows it's 
> renaming "the same" variable throughout?

Of course it applies scoping rules, it would be a bit useless if it didn't.

> Smalltalk VisualWorks had a feature to rename a method, but unfortunately 
> it was a blind find & replace. If you wrote a class and discovered that 
> one of your method names as the same as some other random class and you 
> wanted to make it different, *all* the method calls would get renamed.

That wouldn't really work in .net, as the same common variable names and 
methods are used repeatedly in a huge number of classes (eg the "Value" or 
"Text" property, or the ToString() method).  Of course people continue these 
same conventions in their own code.

> It's also quite nice having the property pane that tells you what's in 
> your source file at a glance. (Especially if you're working with something 
> like JavaDoc that forces you to put unrelated junk in amoungst the working 
> code.)

Oh one more:

8) Right click and "Go to definition" on a method.  And of course the 
View -> Navigate Back button afterwards :-)


Post a reply to this message

From: Invisible
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 06:31:01
Message: <4b8ba575$1@news.povray.org>
>>> Or if you type a function name that doesn't exist yet, you can click 
>>> and say "generate the boilerplate code for this function".
>>
>> What's to generate? I'm presuming it just makes a one-line function 
>> stub... unless you mean it does something more complex than that?
> 
> eg if I type in "bool result = NewFunction(width,height);" and tell it 
> to make the stub, it will insert this immediately below the existing 
> function:
> 
> private bool NewFunction(double width, double height)
> {
> throw new NotImplementedException();
> }
> 
> Again, not a huge timesaver, but it's so easy to use and it comes up so 
> often it's worthwhile.

It actually throws an exception to remind you that you need to implement 
it, rather than just silently doing nothing? Oh, that's nice...

Is there some way to quickly find all the stubs you haven't filled out 
yet? (Other than just running the program and hoping it throws an 
exception so you can see the stack trace.)

>>> Or you can go to "Insert -> New Class" and it will create a new file 
>>> with the new class template in it.
>>
>> Again, shouldn't an empty class be trivial to write in the first place?
> 
> Sure, but it's something so common to do that even saving 30 seconds is 
> a benefit, especially if you want it in a new file, and that file to be 
> saved, added to the current project and opened in the IDE.

OK, fair enough. I don't know about C#, but an empty class file in Java 
is 2 lines. You tell VS what the class name is, and (hence the file name 
MUST match the class name) it automatically saves it in the right place 
with the right name. But sure, why not have it type the class 
declaration as well? I guess it all helps. (Just so long as it doesn't 
try to "help" by writing the entire application for you...)

>> OK, now does it blindly rename it *everywhere*? Like just a find & 
>> replace? Or does it actually apply scoping rules so that it knows it's 
>> renaming "the same" variable throughout?
> 
> Of course it applies scoping rules, it would be a bit useless if it didn't.

OK, good.

>> Smalltalk VisualWorks had a feature to rename a method, but 
>> unfortunately it was a blind find & replace. If you wrote a class and 
>> discovered that one of your method names as the same as some other 
>> random class and you wanted to make it different, *all* the method 
>> calls would get renamed.
> 
> That wouldn't really work in .net, as the same common variable names and 
> methods are used repeatedly in a huge number of classes.

Yah, that's kind of the problem. ;-)

As I say, in Smalltalk, you can't tell which class a given variable is, 
so you can't tell if you're calling #reset on a network socket or a 
customer object. Which means if you want to rename the customer class's 
#reset method... yeah, good luck with that.

With a statically typed language, an IDE ought to be able to do better. 
(And from the sound of it, VS does.)

> Oh one more:
> 
> 8) Right click and "Go to definition" on a method.  And of course the 
> View -> Navigate Back button afterwards :-)

So it's not just me who occasionally forgets where the **** I actually 
defined the matrix inversion method? :-D


Post a reply to this message

From: Darren New
Subject: Re: What's in an IDE?
Date: 1 Mar 2010 12:15:22
Message: <4b8bf62a$1@news.povray.org>
Invisible wrote:
> a Java class file with about 30 lines of JavaDoc comment stubs, argument 
> parsing and exception handling, and so on. (E.g., main() parses the 
> argument list, and if it sees "--help", it calls a stub method named 
> help() which you're supposed to fill in.)

Right. Because most people actually want that when writing code complicated 
enough to need an IDE.

That said, you're aware that Java sucks in this regard, right? :-)

> Oh, and do NOT try to delete or rename classes. VS apparently doesn't 
> like this at all.

You have to do it right. In my versions, renaming the file also renames the 
class and all references to it.

> And trying to figure out where VS stores them is 
> nontrivial, 

Everything generated is in obj or bin, depending on whether it's 
intermediate files or final executables. Does "nontrivial" mean "I had to 
actually go take a look or read some documentation"?

-- 
Darren New, San Diego CA, USA (PST)
   The question in today's corporate environment is not
   so much "what color is your parachute?" as it is
   "what color is your nose?"


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.