See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Orbiter and .NET  (Read 4764 times)

0 Members and 1 Guest are viewing this topic.

Offline ar81

  • Hero Member
  • *****
  • Posts: 561
  • Karma: 0
05 December 2007, 18:13:02
Is Orbiter going to move to .NET?

Read this article of Alan Cooper, one of the creators of Visual Basic and defender of software usability.
http://www.ftponline.com/conferences/cooperu/future_interview.asp

Here is a quote from the article
"The transition from VB to. NET is going to seem tiny compared to the transition programmers are going to go through
when they discover they can´t call their own shots. That´s going to be a big shock for a lot of people in the
programming profession."

"We started out discussing the .NET platform. Let´s get back to that. What do you think about the .NOT movement
among VB6ers?
I´ve been buying books on C# and .NET for the past few weeks. .NET is without a doubt extremely complex and
extremely difficult. Then again, what programmers do is extremely complex and extremely difficult. I agree with Grady
Booch when he says programming is hard and intellectually demanding and always will be and always was. A lot of
people got sucked into the programming world during the .COM boom. Now they´re discovering it´s not easy. I think
that as we build bigger and more complex software systems we´re going to find that the tools are going to give us
more power and reach but they´ll never make things easier."

And going a bit off topic, I found this quote on course correction in software.

""Programming is an iterative process," the XP/Agile folks say. I say the act of delivering an appropriate solution to
the user is iterative but if you do that in code it´s far more expensive than if you do that at the design stage, where
it´s far cheaper, far more efficient. You should iterate, yes, but five times, not a thousand times. Virtue lies not in the
iteration but in the successful course correction."

Opinions?  Comments?


Offline computerex

  • Full Member
  • ***
  • Posts: 104
  • Karma: 0
Reply #1 - 06 December 2007, 00:52:03
Quote
ar81 wrote:
Is Orbiter going to move to .NET?

No, but Face and Reverend have created a .NET interface for Orbiter.


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #2 - 06 December 2007, 04:50:40
I'm not sure about net but I see a clear intention from MS to go one level up in abstract layer, instead of
programming using a language that is "close" to low level code as C++, you use one more level that use "high
level" code that will use itself low level code.

It's as a painter that don't want to play anymore with colors but just give general idea of the painting. You don't
control anymore the small details.

The XML is part of this "good/bad" idea, at high level it's ***maybe*** more simple but behind the scene it's
completely unefficient and a big waste of processor cycle.  All those things are for peoples that don't really like
computer coding and knowing what is behind the scene, as a painter that would not like paint-colors.

The result is FsX and Vista. Slow and unoptimised. They programmed them using high level abstact. More simple
perhaps to manage for them but you have to buy a new machine to make all the wasted cycle run.

I'll stick to C++ for how much time as I can. I'ts enough high level and you still have close control.

Dan



Message modifié ( 06-12-2007 05:39 )


Offline ar81

  • Hero Member
  • *****
  • Posts: 561
  • Karma: 0
Reply #3 - 12 December 2007, 00:57:34
I recall the times when home computers had 64Kb RAM.
What consumed resources was when you defined arrays.

Wang PC in 1986 had 1Mb of hard disk and you wondered "what in the world could fill 1Mb".

GWBASIC language was a file that was about 80kb big.

I recall a 3D game for DOS called Carrier Command, which is abandonware if I am correct.
It was about 100Kb.

I recall the time of Windows 3.1.
I made a floppy version that was very basic, to run an earlier version of MicrograFX Designer.
MicrograFX had very nice user interfaces, and indeed the way you handle objects in Powerpoint was first used in
Designer.
So running a portable ersion of Designer and Windows 3.1 took 2 floppies.

Then I recall a Star Wars chess for Windows 3.1 by Lucasarts that used 40Mb.  At this time it was just huge.

Between 2000 and 2003 I recall I discovered that Excel had a 3D game hidden inside of it.  Now I knew why it was so
big.

I can understand that lots of space is taken by sound and graphics, but I do not understand why code should code
take that much.  You may exchange hard disk space for performance or viceversa, so I am amazed on how Microsoft
eat both.

Microsoft Image Composer takes as much as Photoshop to load and it does not have even half the features of an unprofessional software like Picture Publisher.



Post Edited ( 12-12-07 00:58 )


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #4 - 12 December 2007, 01:21:05
Orbiter take 20 lines of ASM code to get the altitude why a popular microsoft simulator
take about 200 lines.

Dan



Message modifié ( 13-12-2007 04:20 )


Offline Pirx

  • Full Member
  • ***
  • Posts: 114
  • Karma: 0
Reply #5 - 12 December 2007, 07:03:05
This comparison is flawed! The FSX code is probably only 7 times longer, not 10 :)



Post Edited ( 12-12-07 07:04 )


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #6 - 12 December 2007, 10:25:43
Sure ;)

Dan



Message modifié ( 13-12-2007 04:20 )


Offline sunshine135

  • Hero Member
  • *****
  • Posts: 547
  • Country: United States us
  • Karma: 3
  • I fly by the seat of my pants!
Reply #7 - 12 December 2007, 14:38:18
Cripes! Interestingly enough, this goes along with what I was reading in PC World yesterday. From the January 2008
addition pg.18

Speaking about Apple:

The company's iPod and iPhone remain strong, but its notebook and desktop sales recently reached an all-time quarterly
high-even before Mac OS X 10.5, or "Leopard," hit store shelves.


The article basically goes on to bash the weaknesses of Vista which through word of mouth are having a very real impact on
the sales of PCs. THIS IS FROM A PC-BASED MAGAZINE!!! That really speaks volumes.

What I am hearing from you programmer types is that the .NET framework is just as bloated as the Operating System it runs on,
and I find that personally frightening. No doubt that Microsoft is going to "feel the burn:, and I already regret purchasing
my newest Dell laptop ( I had to have the motherboard replaced 3 days after receiving it, and still have overheating issues!!)

Hopefully, the next version of WINE that comes out allows me to use Orbiter, then I can ditch Microsoft for good! My next
computer will be an Apple, and I will be using Bootcamp (which is now supported under Leopard).

Cheers,


"Sun Dog"

Offline ar81

  • Hero Member
  • *****
  • Posts: 561
  • Karma: 0
Reply #8 - 12 December 2007, 18:26:40
The first website I made in 1999 was made in Word.
It was a simple doc with text only, as a test.
It was as heavy to load with my modem as if it had a very big flash animation.

Then I discovered Dreamweaver.
I cleaned up Word tags using a special function it had and after that it loaded in split seconds.

I came to think that MS people code to make their lives easier, not user lives easier.

Right now you have a career called "usability engineering", you may find about it in Wikipedia.
It is about how to make things more usable.

I heard that VB is about 280 times slower than C++ for math ops.
This is why OMW19b is so slow.



Post Edited ( 12-12-07 18:29 )


Offline ar81

  • Hero Member
  • *****
  • Posts: 561
  • Karma: 0
Reply #9 - 13 December 2007, 00:26:35
I was told by a developer that there are several explanations for the difference in size for that code.

Quote
- The Microsoft code has to perform more bounds checking. The Orbiter code is written to assume the bounds
have already been checked in another bit of code.
- The Microsoft code calculates the value from a number of inputs. The Orbiter code has pre-calculated the value in
another bit of code.
- The Microsoft code includes data caching or logging functionality. The Orbiter code does not.
- The Microsoft code is threadsafe for a multi-threaded environment and therefore includes locking mechanisms. The
Orbiter code is single-threaded.
- The Microsoft code was compiled with different compiler options that provide safety checks for API calls. The Orbiter
code is either not accessible through an API, or it is accessible and makes no checks, or it has a wrapper function
elsewhere to handle this.

I have no idea whether any of these are true or whether they are all true, but simply counting the number of instructions and saying that the longer code is the reason why a piece of software needs more powerful hardware to run it is pretty meaningless. It needs more powerful hardware because it does more. The length of the code is just the intermediary between the cause and the effect.


What can I reply to him?



Post Edited ( 12-13-07 00:50 )


Offline DanSteph

  • Administrator
  • Legend
  • *****
  • Posts: 15407
  • Karma: 256
  • Hein, quoi !?
    • FsPassengers
Reply #10 - 13 December 2007, 04:19:34
Quote
ar81 a écrit:
What can I reply to him?

That he's probably not a programmer, or probably only a excell VB script programmer, or that he is a MS programmer
that fight for his food.

About thread safe: just pass the pointer then use structure offset.

Anyway there is absolutely no justifications possible for a API call of 200 lines just to get a value that was already
calculated a start of frame and is available in memory, that's basic "optimisation" wich should be teached probably the
2nd day of programmers school.

Could he explain what a GetAltitude function 10 time longer than in any other simulator would add to the stunning
graphic or why it should be protected as a bank account's password  ?

Poor code design & bad programming.

Dan



Message modifié ( 13-12-2007 04:21 )


Offline computerex

  • Full Member
  • ***
  • Posts: 104
  • Karma: 0
Reply #11 - 13 December 2007, 13:31:07
BTW, AFAIK, Orbiter is multi-threaded.


Offline Doug Beachy

  • Jr. Member
  • **
  • Posts: 75
  • Karma: 0
Reply #12 - 13 December 2007, 20:53:58
Actually Orbiter is a single-threaded application -- the state of each ship, module, and MFD in the simulation is
updated sequentially in a single thread.  This is also why the higher the framerate the more accurate the simulation
is.  So in a nutshell, you do not have to worry about writing thread-safe functions when writing Orbiter code.


Offline computerex

  • Full Member
  • ***
  • Posts: 104
  • Karma: 0
Reply #13 - 14 December 2007, 00:06:28
Quote
Doug Beachy wrote:
Actually Orbiter is a single-threaded application -- the state of each ship, module, and MFD in the simulation is
updated sequentially in a single thread.  This is also why the higher the framerate the more accurate the simulation
is.  So in a nutshell, you do not have to worry about writing thread-safe functions when writing Orbiter code.

Learn something new everyday. :beer:


Offline Face

  • Jr. Member
  • **
  • Posts: 40
  • Country: Austria at
  • Karma: 9
Reply #14 - 14 December 2007, 09:48:17
Quote
Doug Beachy wrote:
So in a nutshell, you do not have to worry about writing thread-safe functions when writing Orbiter code.
Unless you write multithreaded Orbiter code, that is.


Was FSX really written with CLR? Now then it's no wonder it is so slow.


But on the topic, I think programming in managed environments will be the way of the future. If its .NET, Java, or something
else, I don't know, but it will certainly not last too long until C++ is considered as "lowlevel" as assembler is today.
Of course, certain specialists will stay with their preferred tool, but there will be few of them, and they will be alone (in
the sense of cooperative programming).

IMHO, every (professional) programmer should at least take a look at Java or .NET (preferable both) and try to develope
software with it.
There's nothing wrong with broading one's horizon...

just my 2 cents,
Face



Post Edited ( 12-14-07 10:34 )


Offline ar81

  • Hero Member
  • *****
  • Posts: 561
  • Karma: 0
Reply #15 - 14 December 2007, 15:46:56
I tried to make a simple program in VB.NET to test what I would need to remake my tools in .NET
It seems to be slower.

Also some capabilities from VB5 were removed.  It is longer and harder to code in VB.NET
And all of the code syntax was changed.
I stay with VB5.


Offline Face

  • Jr. Member
  • **
  • Posts: 40
  • Country: Austria at
  • Karma: 9
Reply #16 - 14 December 2007, 17:51:03
Quote
ar81 wrote:
I tried to make a simple program in VB.NET to test what I would need to remake my tools in .NET
It seems to be slower.

Also some capabilities from VB5 were removed.  It is longer and harder to code in VB.NET
And all of the code syntax was changed.
I stay with VB5.

Can you elaborate on these two topics (simple program is slower / capabilities were removed)?

regards,
Face

« Last Edit: 14 December 2007, 18:46:50 by Face »

Offline ar81

  • Hero Member
  • *****
  • Posts: 561
  • Karma: 0
Reply #17 - 14 December 2007, 18:46:50
Ooops, I think I forgot to compile... that made it slower...
I tested math capability by creating a bulk calculation that could take seconds to do some benchmarking.
It was just a preliminary test.
I will try to make a more elaborate test.



Post Edited ( 12-14-07 18:51 )

« Last Edit: 14 December 2007, 18:46:50 by ar81 »