 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> If you're
> trying to invoke a method of the current class, no matter what you do it
> won't populate the list.
I dunno. Just tried it, and "this." brought up the list of methods.
> "please use the currently selected alternative to complete what I'm
> typing",
Tab. Just like every other auto-complete system in existence.
> (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.)
Edit->Advanced->Reformat entire document
Dude, maybe rather than bitching that IDEs suck, you should give it a rest
until you've tried one written this millenium.
>> 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! ;-)
You know, that works pretty poorly if you have anything other than code
involved. If you're doing a video game and you need to import the audio,
graphics, models, and animations, once command line is unlikely to do it.
OK, so you have your development environment, non-integrated. So? What's
your point?
>> 6) "Template" projects for a Windows app
>
> What does that do?
Try it! Or at least google it. :-)
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> button1.Click += new System.EventHandler(MyMethod);
Actually, button1.Click += MyMethod;
works too, because one of the compiler passes sees this and fixes it for you.
> Well there's a "Form designer" file that holds any GUI elements you add,
It also sets up all the other stuff you need in a real commercial project,
like initializing the version number, adding a copyright to the executable's
properties box, etc.
A lot of what it does assumes you're writing a real program that more than
one person might some day use.
>> 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.
Plus, it initializes it with a bunch of namespaces you're likely to need in
that kind of class.
> 8) Right click and "Go to definition" on a method. And of course the
> View -> Navigate Back button afterwards :-)
Control minus gets you back, also, if you want the keyboard shortcut.
You can also find all references to that method or class or variable
(excluding references to other variables with the same name).
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> 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.)
Of course. Search for NotYetImplemented.
(I'm kind of surprised there's no comment reading
// TODO: Implement this
to make it show up in your to-do list.)
> OK, fair enough. I don't know about C#, but an empty class file in Java
> is 2 lines.
It is in C# too, as long as you don't want to import any namespaces or have
a constructor or anything.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> 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.
Same in C#. Actually, you don't have to write any code at all. The
boilerplate is created for you. What do you think Glade is doing, if not
generating boilerplate.
When you want to (for example) code a Windows service, or a plug-in for a
web browser, or a custom type for a SQL server, you're going to have more
boilerplate to hook those two together.
A sufficiently advanced language can turn any "boilerplate" into "library
code", but that's generally done by having the compiler running library code
at compile time. Hence, LISP macros, FORTH dictionaries, etc. An IDE does
that for languages where the syntax doesn't include running arbitrary code
at compile time.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> That said, you're aware that Java sucks in this regard, right? :-)
...there's a regard in which Java does *not* suck?
(Actually, yeah, there is: The idea. It was a good idea. Unfortunately
they did it wrong...)
>> Oh, and do NOT try to delete or rename classes. VS apparently doesn't
>> like this at all.
>
> You have to do it right.
Right. Well let's not like anybody shows us how to use VS or anything.
They just acted like it was "obvious" or something.
>> And trying to figure out where VS stores them is nontrivial,
>
> Does "nontrivial" mean "I had
> to actually go take a look or read some documentation"?
If you're doing this stuff yourself by hand, you have a folder full of
*.java files. When you compile them, it creates *.class files. Oh, and
you have to have subfolders to patch the package structure, but that's
about it.
Create a VS project and you've got source files, project metadata,
several different compiled versions of the stuff, resource files,
packaged-up deployment files, JavaDoc files... It's not like you need to
be Leroy Gibbs to figure it out, but it's certainly not trivial.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Invisible wrote:
>> 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.
>
> Same in C#. Actually, you don't have to write any code at all. The
> boilerplate is created for you. What do you think Glade is doing, if not
> generating boilerplate.
Actually it saves the GUI description as an XML file, which your program
then loads and parses at runtime.
> When you want to (for example) code a Windows service, or a plug-in for
> a web browser, or a custom type for a SQL server, you're going to have
> more boilerplate to hook those two together.
Now, see, to me these kinds of tasks all belong to the set of things
which are "impossible" in the first place, so I guess I don't tend to
think about it. You can't write web browser plugins unless you're a C
programmer, unfortunately.
> A sufficiently advanced language can turn any "boilerplate" into
> "library code", but that's generally done by having the compiler running
> library code at compile time. Hence, LISP macros, FORTH dictionaries,
> etc. An IDE does that for languages where the syntax doesn't include
> running arbitrary code at compile time.
Heh, maybe.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> "please use the currently selected alternative to complete what I'm
>> typing",
>
> Tab. Just like every other auto-complete system in existence.
Hmm, I never thought of that. (This is before I encountered Unix.)
>> (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.)
>
> Edit->Advanced->Reformat entire document
Wouldn't that just apply the incorrect formatting to the whole document?
> Dude, maybe rather than bitching that IDEs suck, you should give it a
> rest until you've tried one written this millenium.
I didn't say IDEs suck, I said autocomplete sucks. ;-) Or at least, the
two implementations of it I tried sucked...
>>> 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! ;-)
>
> You know, that works pretty poorly if you have anything other than code
> involved. If you're doing a video game and you need to import the audio,
> graphics, models, and animations, once command line is unlikely to do it.
...which is why people write batch files. ;-)
> OK, so you have your development environment, non-integrated. So? What's
> your point?
No "point" as such, I'm just trying to get a handle on what the
perceived advantages of IDEs are, since it's apparently not possible to
live without one.
>>> 6) "Template" projects for a Windows app
>>
>> What does that do?
>
> Try it! Or at least google it. :-)
A human being is far more likely to give a useful overview. (Let's face
it, if I try it, I'll just spend an hour not being able to figure out
what it's supposed to be for.)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> Right. Well let's not like anybody shows us how to use VS or anything.
> They just acted like it was "obvious" or something.
Well, by "doign it right", it means anwering the right answer on the menu
that pops up, that says "Hey, you renamed a class, do you want me to rename
the references?" Or "You renamed a file, do you want me to rename the class?"
> If you're doing this stuff yourself by hand, you have a folder full of
> *.java files. When you compile them, it creates *.class files. Oh, and
> you have to have subfolders to patch the package structure, but that's
> about it.
Yep. Now go add some native code, the icon that Windows should use for the
application, the icon it should use for documents, the files that translate
your UI into other languages, the prerequisites that have to be installed
(like other JAR files or the JVM runtime of the right version), the sample
data, the documentation, and the installer.
> Create a VS project and you've got source files, project metadata,
> several different compiled versions of the stuff, resource files,
> packaged-up deployment files, JavaDoc files... It's not like you need to
> be Leroy Gibbs to figure it out, but it's certainly not trivial.
It's trivial to figure out where the compiler-generated files are. They're
in the subdirectory obj if they're intermediate object files, or bin if
they're executable binary files to be distributed. Since the idea of "obj"
vs "bin" has been around since roughly 1970, those terms shouldn't be a
suprise to any programmer.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
> Actually it saves the GUI description as an XML file, which your program
> then loads and parses at runtime.
Yes. As does Visual Studio. And what do you think the boilerplate does there
beside "load and parse at runtime" that XML? :-)
> Now, see, to me these kinds of tasks all belong to the set of things
> which are "impossible" in the first place, so I guess I don't tend to
> think about it. You can't write web browser plugins unless you're a C
> programmer, unfortunately.
Of course you can.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v8 wrote:
>> Edit->Advanced->Reformat entire document
> Wouldn't that just apply the incorrect formatting to the whole document?
It applies the formatting rules you asked it to apply. If you tell it to use
the "wrong" formatting rules, you'll get consistent but "wrongly" formatted
code. Which would be "the" incorrect formatting?
>> You know, that works pretty poorly if you have anything other than
>> code involved. If you're doing a video game and you need to import the
>> audio, graphics, models, and animations, once command line is unlikely
>> to do it.
>
> ...which is why people write batch files. ;-)
So you're going to maintain a batch file that first compiles the code needed
to parse the video game animations, then the code that writes them out, then
runs the animations through that, then put them in the right place?
Why in the world would you do that when it has already been written for you?
And again, yes, people write batch files because they're unfamiliar with
IDEs. You realize that's not a *good* thing, right?
> No "point" as such, I'm just trying to get a handle on what the
> perceived advantages of IDEs are, since it's apparently not possible to
> live without one.
It is if you're doing something small enough. But then, you can live without
batch files too if you never type the same command more than twice.
The advantages of an IDE over a DE is that it's integrated.
>>>> 6) "Template" projects for a Windows app
>>>
>>> What does that do?
>>
>> Try it! Or at least google it. :-)
>
> A human being is far more likely to give a useful overview.
You know what a template is in documents, right? Corporate report template?
Vacation time reporting template? Request for purchase of networking
equipment template?
Same thing, for code.
I want to write a game. I want to write a windows service. I want to write a
new type for a SQL database engine. I want to build a web application.
> I'll just spend an hour not being able to figure out what it's supposed
to be for.
That's because you never practice the skill, so you never improve at it.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Make a system which automatically builds a "makefile" behind the scenes
> and keeps it up-to-date as the source code changes (ie. by updating all
> the dependencies between files), and you have gone a long way towards an
> IDE.
I use the CMake build system, where you just write this:
add_executable(myraytracer main.cpp spheres.cpp lights.cpp)
...and it handles the dependency mess for you. You don't need an IDE for
that.
I also use the KDevelop IDE, which does not ever edit the makefile (or
CMakeLists) for you.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
> I use the CMake build system, where you just write this:
Or QMake. By the time you need this sort of stuff, your program has grown
wildly out of the norm tho. :-)
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez <nic### [at] gmail com> wrote:
> I use the CMake build system, where you just write this:
> add_executable(myraytracer main.cpp spheres.cpp lights.cpp)
> ...and it handles the dependency mess for you. You don't need an IDE for
> that.
I said that automatic dependency resolving goes a long way towards an IDE,
I didn't say it's sufficient. I also nowhere said that "you need an IDE if
you want to resolve dependencies automatically".
(Besides, what is *your* definition of "IDE", if CMake isn't one?)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> (Besides, what is *your* definition of "IDE", if CMake isn't one?)
CMake is just a new version of make, or a makefile generator, I forget
which. It's not integrated, and it's not an environment, any more than make
itself is.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > (Besides, what is *your* definition of "IDE", if CMake isn't one?)
> CMake is just a new version of make, or a makefile generator, I forget
> which. It's not integrated, and it's not an environment, any more than make
> itself is.
You said what CMake is/isn't, not what an "IDE" is...
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Darren New <dne### [at] san rr com> wrote:
>> Warp wrote:
>>> (Besides, what is *your* definition of "IDE", if CMake isn't one?)
>
>> CMake is just a new version of make, or a makefile generator, I forget
>> which. It's not integrated, and it's not an environment, any more than make
>> itself is.
>
> You said what CMake is/isn't, not what an "IDE" is...
You weren't talking to me. :-) I wasn't sure you knew what cmake was, so I
was clarifying that it wasn't an IDE. :-)
I don't consider cmake a development environment. It's one tool that's part
of some development environments.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp <war### [at] tag povray org> wrote:
> Darren New <dne### [at] san rr com> wrote:
> > Warp wrote:
> > > (Besides, what is *your* definition of "IDE", if CMake isn't one?)
>
> > CMake is just a new version of make, or a makefile generator, I forget
> > which. It's not integrated, and it's not an environment, any more than make
> > itself is.
>
> You said what CMake is/isn't, not what an "IDE" is...
bash is a pretty good IDE to me. It integrates/glues all other dev tools
needed. :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Actually it saves the GUI description as an XML file, which your
>> program then loads and parses at runtime.
>
> Yes. As does Visual Studio. And what do you think the boilerplate does
> there beside "load and parse at runtime" that XML? :-)
Surely it's just 1 line of code? (Unless you want to do something
special to determine where to find the XML file...)
>> Now, see, to me these kinds of tasks all belong to the set of things
>> which are "impossible" in the first place, so I guess I don't tend to
>> think about it. You can't write web browser plugins unless you're a C
>> programmer, unfortunately.
>
> Of course you can.
Oh, yeah, I forgot. You could be a C++ programmer. ;-)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>>> Edit->Advanced->Reformat entire document
>> Wouldn't that just apply the incorrect formatting to the whole document?
>
> It applies the formatting rules you asked it to apply.
Or rather, it applies the default formatting rules, whatever they happen
to be for the IDE in question.
> Which would be "the" incorrect formatting?
For example, both JBuilder and VS put the opening bracket of a function
on the same line as the function declaration, rather than on the next
line where it belongs. They also indent everything by 8 spaces rather
than the usual 2. And so on. (I'm not even sure *what* formatting rule
they apply to if-statements...)
> So you're going to maintain a batch file that first compiles the code
> needed to parse the video game animations, then the code that writes
> them out, then runs the animations through that, then put them in the
> right place?
>
> Why in the world would you do that when it has already been written for
> you?
Yeah, if your application was actually that complex, you'd probably use
make or similar.
> It is if you're doing something small enough. But then, you can live
> without batch files too if you never type the same command more than twice.
>
> The advantages of an IDE over a DE is that it's integrated.
OK, fair enough.
Large numbers of people apparently think that it's just infeasible to
write any code of any kind unless you have an IDE specifically targetted
at the programming language you're using. But to me, it looks like an
IDE is only really beneficial if you're actually doing something
complex. (And, further more, it looks to me that the tipping point is
when you start writing something more complex than any program I've ever
attempted in my entire life - so an IDE is probably of little to no use
to me...)
>>>>> 6) "Template" projects for a Windows app
>>>>
>>>> What does that do?
>>>
>>> Try it! Or at least google it. :-)
>>
>> A human being is far more likely to give a useful overview.
>
> You know what a template is in documents, right? Corporate report
> template? Vacation time reporting template? Request for purchase of
> networking equipment template?
>
> Same thing, for code.
Sure. But "Windows app" template? What could possibly be in it?
It's like, you have a template for a purchase request. Or a template for
a procedure document. But you know what you *don't* have a template for?
A document. Because, let's face it, what would a template for "a
document" actually contain?
Similarly, "a Windows application" could be absolutely anything. How do
you template that?
> I want to write a game. I want to write a windows service. I want to
> write a new type for a SQL database engine. I want to build a web
> application.
Maybe it's because I've never written any of these things, but I can't
imagine what (for example) two games would have in common. (And hence,
what you'd put into a template.)
>> I'll just spend an hour not being able to figure out what it's
>> supposed to be for.
>
> That's because you never practice the skill, so you never improve at it.
This statement is not falsifiable.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I want to write a game.
Actually if you install XNA with VC# then you can go File -> New -> Windows
Game and then press F5 and you will have running a game skeleton program
which is very easy to add stuff too. In fact you can also choose
"Platformer Starter Kit" as a new project and have a playable platform game
as a template! Then go Build -> Publish... and it creates a standalone
installer to distribute, it doesn't get any easier than this to code games
on Windows/XBOX!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> For example, both JBuilder and VS put the opening bracket of a function on
> the same line as the function declaration, rather than on the next line
> where it belongs.
In VS Express (the free one):
Options -> Text Editor -> (Language) -> Formatting -> New Lines -> "Place
open brace on new line for xxxx" where (xxx) is a number of different
options. Feel free to tick all these (actually they seem to all be ticked
by default, it's the style I prefer too).
> They also indent everything by 8 spaces rather than the usual 2. And so
> on. (I'm not even sure *what* formatting rule they apply to
> if-statements...)
Options -> Text Editor -> (Language) -> Tabs -> "Tab Size" or "Indent size"
Why don't you just spend 5 minutes setting the options to your preference?
> Maybe it's because I've never written any of these things, but I can't
> imagine what (for example) two games would have in common. (And hence,
> what you'd put into a template.)
Err, the headers and namespaces for graphics, audio and input libraries,
build processors set up for graphics files, meshes, sound files etc, a game
loop with empty functions for you to add your game logic and graphics code,
pre-existing code for initialising the graphics API and painting the updates
into the window each frame, a framework for adding "components" to your game
that can be easily enabled/disabled and automatically called/rendered, etc.
Just download VC# and XNA and ask it to make a new "Game" project - there's
a lot of useful common stuff in there that makes your job way easier.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> For example, both JBuilder and VS put the opening bracket of a
>> function on the same line as the function declaration, rather than on
>> the next line where it belongs.
>
> In VS Express (the free one):
>
> Options -> Text Editor -> (Language) -> Formatting -> New Lines ->
> "Place open brace on new line for xxxx" where (xxx) is a number of
> different options. Feel free to tick all these (actually they seem to
> all be ticked by default, it's the style I prefer too).
When I looked at this stuff, there were 3 different options you could
select. I tried all three, and none of them did what I want. (Curiosly,
there didn't seem to be an option for "disable all autoformatting and
just let me do it by hand".)
> Why don't you just spend 5 minutes setting the options to your preference?
As I say, when I tried it there wasn't much you could adjust.
>> Maybe it's because I've never written any of these things, but I can't
>> imagine what (for example) two games would have in common. (And hence,
>> what you'd put into a template.)
>
> Err, the headers and namespaces for graphics, audio and input libraries,
> build processors set up for graphics files, meshes, sound files etc, a
> game loop with empty functions for you to add your game logic and
> graphics code, pre-existing code for initialising the graphics API and
> painting the updates into the window each frame, a framework for adding
> "components" to your game that can be easily enabled/disabled and
> automatically called/rendered, etc.
Now, to me, that sounds like it's just going to build a bunch of
boilerplate code for how the designers invesage a game would be
structured, and if you want your game structured a different way you're
going to have to waste time deleting the template stuff and rewritting
it the way you want it.
Similarly, I obviously haven't written many games (currently at zero and
counting), but I would have hoped that "initialising the system" would
already be a fairly painless task. (Isn't this what we have libraries for?)
I'm not quite sure what "build processors set up for graphics files,
mashes, sound files etc" is supposed to mean.
> Just download VC# and XNA and ask it to make a new "Game" project -
> there's a lot of useful common stuff in there that makes your job way
> easier.
Well, yeah, there is always that. (Although not understanding C#,
presumably none of it will make sense anyway...)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Now, to me, that sounds like it's just going to build a bunch of
> boilerplate code for how the designers invesage a game would be
> structured, and if you want your game structured a different way you're
> going to have to waste time deleting the template stuff and rewritting it
> the way you want it.
Sorry but I never heard of anyone making a game that didn't have a "game
loop" and methods for rendering and methods for the game logic. Obviously
you are free to delete those and make your own, or just start from scratch.
They are just providing the most common structure, as most people will want
that anyway.
> Similarly, I obviously haven't written many games (currently at zero and
> counting), but I would have hoped that "initialising the system" would
> already be a fairly painless task. (Isn't this what we have libraries
> for?)
Sure, it's just the odd line here and there for creating a
GraphicsDeviceManager, a content loader object, a sprite/texture manager
object, method calls to clear and redraw the frame, that sort of thing. No
more than a handful of lines of code, but it's easier to have it done for
you in a nice structure than to have to start from scratch each time.
> I'm not quite sure what "build processors set up for graphics files,
> mashes, sound files etc" is supposed to mean.
So that you can go "Add to project..." and include a JPEG, PNG, WAV, MP3,
BMP, X (3D mesh) or whatever and at the build stage it will convert your
file into a format suitable/optimised for the game (eg mipmaps for the
textures). It saves you have to export all your data files in some specific
format just to get them to work with your API, the build processor just does
it seemlessly (obviously it detects if there has been an update or not).
> Well, yeah, there is always that. (Although not understanding C#,
> presumably none of it will make sense anyway...)
FYI here's the raw template code it gives you when you create a new game (it
looks better in the IDE than in plain text): Now maybe it's just me, but I
quite like it doing that automatically for me rather than having to
remember/type that all each time I want to mess about quickly with a little
graphics demo or whatever.
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
namespace WindowsGame3
{
/// <summary>
/// This is the main type for your game
/// </summary>
public class Game1 : Microsoft.Xna.Framework.Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
public Game1()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
}
/// <summary>
/// Allows the game to perform any initialization it needs to before
starting to run.
/// This is where it can query for any required services and load
any non-graphic
/// related content. Calling base.Initialize will enumerate through
any components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
// TODO: Add your initialization logic here
base.Initialize();
}
/// <summary>
/// LoadContent will be called once per game and is the place to
load
/// all of your content.
/// </summary>
protected override void LoadContent()
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
}
/// <summary>
/// UnloadContent will be called once per game and is the place to
unload
/// all content.
/// </summary>
protected override void UnloadContent()
{
// TODO: Unload any non ContentManager content here
}
/// <summary>
/// Allows the game to run logic such as updating the world,
/// checking for collisions, gathering input, and playing audio.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing
values.</param>
protected override void Update(GameTime gameTime)
{
// Allows the game to exit
if (GamePad.GetState(PlayerIndex.One).Buttons.Back ==
ButtonState.Pressed)
this.Exit();
// TODO: Add your update logic here
base.Update(gameTime);
}
/// <summary>
/// This is called when the game should draw itself.
/// </summary>
/// <param name="gameTime">Provides a snapshot of timing
values.</param>
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
base.Draw(gameTime);
}
}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
>> I'm not quite sure what "build processors set up for graphics files,
>> mashes, sound files etc" is supposed to mean.
>
> So that you can go "Add to project..." and include a JPEG, PNG, WAV,
> MP3, BMP, X (3D mesh) or whatever and at the build stage it will convert
> your file into a format suitable/optimised for the game (eg mipmaps for
> the textures).
Oh, OK. I didn't realise there was a conversion step there.
>> Well, yeah, there is always that. (Although not understanding C#,
>> presumably none of it will make sense anyway...)
>
> FYI here's the raw template code it gives you when you create a new game
> (it looks better in the IDE than in plain text):
That's actually not too bad...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> Surely it's just 1 line of code? (Unless you want to do something
> special to determine where to find the XML file...)
That. Each of the 20 different things you want to do is a line or two of
code. And that's the boilerplate.
Zll the stuff that the XML references has to be included in the program. If
you define a new type of widget and you want to reference that code in the
XML, you need at least some line somewhere saying where to get that widget.
>>> Now, see, to me these kinds of tasks all belong to the set of things
>>> which are "impossible" in the first place, so I guess I don't tend to
>>> think about it. You can't write web browser plugins unless you're a C
>>> programmer, unfortunately.
>>
>> Of course you can.
>
> Oh, yeah, I forgot. You could be a C++ programmer. ;-)
Uh, no. There are lots of languages for writing web browser plugins,
including javascript, C#, and probably others I don't know of offhand. I
wouldn't be surprised if anything capable of doing COM could act as a web
browser plug-in on Windows. That's kind of the point of COM.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
> Uh, no. There are lots of languages for writing web browser plugins,
> including javascript, C#, and probably others I don't know of offhand. I
> wouldn't be surprised if anything capable of doing COM could act as a
> web browser plug-in on Windows. That's kind of the point of COM.
JavaScript is the only language I know which might conceivably be able
to do COM stuff. (If it can, I don't know how yet.)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> Or rather, it applies the default formatting rules, whatever they happen
> to be for the IDE in question.
Unless you adjust the defaults.
> For example, both JBuilder and VS put the opening bracket of a function
> on the same line as the function declaration, rather than on the next
> line where it belongs. They also indent everything by 8 spaces rather
> than the usual 2. And so on. (I'm not even sure *what* formatting rule
> they apply to if-statements...)
So you go into the properties sheet for the formatter and change the indents
and where the braces go. It's pretty straightforward.
> Large numbers of people apparently think that it's just infeasible to
> write any code of any kind unless you have an IDE specifically targetted
> at the programming language you're using.
That's because they're bad programmers.
> But to me, it looks like an
> IDE is only really beneficial if you're actually doing something
> complex.
Yes, or if the IDE is really good, or if the language is designed primarily
for use with an IDE. (For example, you *can* edit by hand all the XML files
that drive the compilation and linking in .NET. But why would you, when the
IDE that puts a nice graphical interface on the front is free?)
> (And, further more, it looks to me that the tipping point is
> when you start writing something more complex than any program I've ever
> attempted in my entire life - so an IDE is probably of little to no use
> to me...)
Well, you also use a powerful high-level language, which makes an IDE less
useful. You also use a DE that isn't I, and you can go a long way before you
actually get noticeably slowed down by that.
Ask yourself how easy it would be to build guis without Glade.
> Sure. But "Windows app" template? What could possibly be in it?
http://msdn.microsoft.com/en-us/library/0fyc0azh.aspx
Try "I'm feeling lucky" on "Windows Application Template".
Sheesh.
> A document. Because, let's face it, what would a template for "a
> document" actually contain?
Fonts. Header styles. Information that titles are centered. Code for
formatting the table of contents if you add one. Information about what
spell checker to use.
> Similarly, "a Windows application" could be absolutely anything. How do
> you template that?
You don't.
> Maybe it's because I've never written any of these things, but I can't
> imagine what (for example) two games would have in common. (And hence,
> what you'd put into a template.)
Well, for example, you have the code that instantiates and starts the game.
Each game inherits from the "Game" class. The constructor, by default, grabs
you references to the graphics device manager and instantiates a couple of
tools you almost always use that take up resources on the card so you don't
want to instantiate them in loops, like the object you use to draw text on
the screen. It also creates a ComponentManager, which you can put all the
bits of your game into to control them in the loop (i.e., the same way you'd
have all the buttons inside a window refresh when the window refreshes). It
also creates a service manager, which lets any components get to any data
they need without making explicit links; e.g., every component that draws on
the screen needs to know where the camera is, so you make the cameraand the
screen services so anyone who needs them to draw can find them.
The methods it creates include "Initialize" which gets called once before
the window opens so you can set up the window; "LoadContent" that gets
called once each time the window changes properties like size or color
depth; "UnloadContent" which gets called before you exit or before you call
LoadContent again; "Update" that gets called regularly based on clock ticks,
and "Draw" that gets called each time you get a vertical sync.
You don't think all games are going to have these kinds of things in common?
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> all be ticked by default, it's the style I prefer too).
I don't like that style, but they're all ticked by default and people are
pretty insane about such trivial things, so I leave them how they are. :-)
> build processors set up for graphics files, meshes, sound files etc,
Yeah, I didn't even touch what was in the project besides the direct game code.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
scott wrote:
> Sorry but I never heard of anyone making a game that didn't have a "game
> loop" and methods for rendering and methods for the game logic.
Indeed, almost every game has input, and draws on the screen. Most even have
sound output. Whodathunk?? ;-)
> the textures). It saves you have to export all your data files in some
> specific format just to get them to work with your API, the build
> processor just does it seemlessly (obviously it detects if there has
> been an update or not).
Plus, you can add your own processors so if you want to (say) import POV SDL
code into your game project, you can just write a parser and use it like any
other model. (Note: Easier said than done, in this case.)
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> JavaScript is the only language I know which might conceivably be able
> to do COM stuff. (If it can, I don't know how yet.)
Out of curiousity, what languages *do* you know? I thought you'd worked in
Tcl before.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
nemesis <nam### [at] gmail com> wrote:
> [-- text/plain, encoding 8bit, charset: iso-8859-1, 16 lines --]
> Warp <war### [at] tag povray org> wrote:
> > Darren New <dne### [at] san rr com> wrote:
> > > Warp wrote:
> > > > (Besides, what is *your* definition of "IDE", if CMake isn't one?)
> >
> > > CMake is just a new version of make, or a makefile generator, I forget
> > > which. It's not integrated, and it's not an environment, any more than make
> > > itself is.
> >
> > You said what CMake is/isn't, not what an "IDE" is...
> bash is a pretty good IDE to me. It integrates/glues all other dev tools
> needed. :)
I wouldn't call that integration. It just launches the independent apps.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> bash is a pretty good IDE to me. It integrates/glues all other dev tools
>> needed. :)
>
> I wouldn't call that integration. It just launches the independent apps.
I think to be integrated, the tools actually have to talk to each other
while running. :-)
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Darren New wrote:
>>> bash is a pretty good IDE to me. It integrates/glues all other dev
>>> tools needed. :)
>>
>> I wouldn't call that integration. It just launches the independent
>> apps.
>
> I think to be integrated, the tools actually have to talk to each other
> while running. :-)
There are pipes :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez <nic### [at] gmail com> wrote:
> Darren New wrote:
> >>> bash is a pretty good IDE to me. It integrates/glues all other dev
> >>> tools needed. :)
> >>
> >> I wouldn't call that integration. It just launches the independent
> >> apps.
> >
> > I think to be integrated, the tools actually have to talk to each other
> > while running. :-)
>
> There are pipes :)
Excellent punchline! :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> JavaScript is the only language I know which might conceivably be able
>> to do COM stuff. (If it can, I don't know how yet.)
>
> Out of curiousity, what languages *do* you know? I thought you'd worked
> in Tcl before.
Yeah, I've done some stuff with Tcl. But I didn't see anything in the
documentation about COM. (I gather you can add extension to Tcl to do
just about anything - but I'm not sure exactly how you link the
necessary C code into the interpretter...)
I have written some trivial VB code before now, but it's so absurdly
difficult to find out how to do stuff with VB. Anyway, I'm sure VB has
ways to do stuff with COM.
And I've written a tiny amount of C++ code. (More than VB, but still not
much.) C++ surely has a way to do this. Whether you'll survive to live
to tell the tale is another matter.
Also, I can probably do IA32 assembly.
(But The Real WTF is that there's a Haskell package for doing COM stuff,
and - get this - it doesn't compile on Windows...)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
>>> JavaScript is the only language I know which might conceivably be
>>> able to do COM stuff. (If it can, I don't know how yet.)
>>
>> Out of curiousity, what languages *do* you know? I thought you'd
>> worked in Tcl before.
>
> Yeah, I've done some stuff with Tcl. But I didn't see anything in the
> documentation about COM.
It's an extension called tcom.
http://www.vex.net/~cthuang/tcom/
I'll grant you it took two googlings to find it. ;-)
> (I gather you can add extension to Tcl to do
> just about anything - but I'm not sure exactly how you link the
> necessary C code into the interpretter...)
You say "package require tcom"
> (But The Real WTF is that there's a Haskell package for doing COM stuff,
> and - get this - it doesn't compile on Windows...)
Heh.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
>> Yeah, I've done some stuff with Tcl. But I didn't see anything in the
>> documentation about COM.
>
> It's an extension called tcom.
>
> http://www.vex.net/~cthuang/tcom/
>
> I'll grant you it took two googlings to find it. ;-)
If I can't figure out how to add extensions, knowing which extension it
is doesn't help. So why bother looking it up?
>> (I gather you can add extension to Tcl to do just about anything - but
>> I'm not sure exactly how you link the necessary C code into the
>> interpretter...)
>
> You say "package require tcom"
That's very nice, but how do I get freewrap.exe to recognise this?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> That's very nice, but how do I get freewrap.exe to recognise this?
You find the package path out of freewrap, then put the package there. In
other words, you read the instructions on how Tcl finds packages.
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Invisible wrote:
> That's very nice, but how do I get freewrap.exe to recognise this?
FWIW, I'll be happy to answer "I tried this and that, and couldn't figure
out this other". The "I haven't even tried to answer my own question that's
well-documented in the obvious places" kinds of questions tho... :-)
--
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
A new kind of IDE interface:
http://www.youtube.com/watch?v=PsPX0nElJ0k
--
FE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |