AOA AOA AOA Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA > Software > Programming and Assembly Language
Register FAQ Members List Calendar Arcade Search Today's Posts Mark Forums Read

Programming and Assembly Language Please read this Topic's rules!!


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 7th January, 2007, 02:54 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

Which C platform is better for programming?

I was discussing with gizmo at MSN about Visual C++ vs C#.
Well I started programming the OcBible using Borland C++ Builder (2003) and at May of 2005 I moved to C#.
The heart of the program could be written in ANSI C but I want to share something well looking.
__________________
GRAB overclocking -->OcBible v1.55 Guidemania v1.21
CARDGAMES-->Jack v1.16 Deck v1.12 Preference v1.19
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 7th January, 2007, 03:28 PM
Allan's Avatar
Member/Contributer
 
Join Date: September 2001
Location: Denmark
Posts: 7,855

Tricky question, it isn't a matter of the one being better than the other, since they both have their pros and cons.

With C#, you can so easily make a program with a lot of fancy GUI and stuff. However, it will run slower than a similar program in C++, and the user must have the .NET framework installed. On the other hand, while C++ is faster at run time, it takes more time to make the same program, and you have a lot of things to worry about (who said pointers?).

For quick programming I'd go with C# anytime. You can use platform invocation (Pinvoke) to access non-C# stuff.

But what do I know, I'm mainly programming in C for embedded devices...
__________________
AOA Team fah

Last edited by Allan : 7th January, 2007 at 03:37 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 7th January, 2007, 03:53 PM
Gizmo's Avatar
Chief BBS Administrator
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 13,949
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

That pretty much summarizes my opinion on the issue as well Alan. But then again, I tend to like getting into the dirty stuff anyway.
__________________
Avatar and sig graphic by Pitch. Subscribers!
Ask about a custom graphic or avatar today!
 
Later,
Gizmo
Thermal Diode Mod and Direct-Die Water Block
8-Cheetah 18GiB U-2 SCSI
MegaRAID Enterprise 1500/128MiB
Samsung SyncMaster 955DF
TTGI/Superflower TTS-520 PSU
 

 
AOA Team filesAOA Team wcgAOA Team fah

Last edited by Gizmo : 7th January, 2007 at 03:54 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 7th January, 2007, 03:59 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

Quote:
Originally Posted by Allan
With C#, you can so easily make a program with a lot of fancy GUI and stuff
This was my first ideas when I stopped programming in Borland.
Both Visual C++ and C# are Microsoft products but C# is easier.
Of course I do not care for code executation time cos OcBible performs simple instructions.
Only some *.dlls are hungry for CPU performance.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 7th January, 2007, 04:01 PM
Gizmo's Avatar
Chief BBS Administrator
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 13,949
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

And this is the heart of good programming; pick the right tool for the job.

A programming language is nothing more than a tool.
__________________
Avatar and sig graphic by Pitch. Subscribers!
Ask about a custom graphic or avatar today!
 
Later,
Gizmo
Thermal Diode Mod and Direct-Die Water Block
8-Cheetah 18GiB U-2 SCSI
MegaRAID Enterprise 1500/128MiB
Samsung SyncMaster 955DF
TTGI/Superflower TTS-520 PSU
 

 
AOA Team filesAOA Team wcgAOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 7th January, 2007, 04:53 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

I agree gizmo.
For example the OcBible could written in MSDOS enviroment but this is boring for user.
I forgot anything about Pascal that's why I did not program in Delphi although it is a popular tool.
On the other hand as we chatted in MSN Visual C++ allows you assembly programming and Win32 API calls.
Two necessary issues for next OcBible editions.
Hopefully Visual C++ routines run OK under C#.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 7th January, 2007, 05:10 PM
Gizmo's Avatar
Chief BBS Administrator
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 13,949
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

Quote:
Originally Posted by MrSeanKon
Hopefully Visual C++ routines run OK under C#.
They do. I've actually written some C++ dlls in the past that were called from C#. The easiest way to do it, though, is to make the C++ code a COM object, and then the C# application can just import the COM object and use it like anything else.
__________________
Avatar and sig graphic by Pitch. Subscribers!
Ask about a custom graphic or avatar today!
 
Later,
Gizmo
Thermal Diode Mod and Direct-Die Water Block
8-Cheetah 18GiB U-2 SCSI
MegaRAID Enterprise 1500/128MiB
Samsung SyncMaster 955DF
TTGI/Superflower TTS-520 PSU
 

 
AOA Team filesAOA Team wcgAOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 7th January, 2007, 05:20 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

Thanks gizmo.
BTW have you ever used an alternate graphical C enviroment?
__________________
GRAB overclocking -->OcBible v1.55 Guidemania v1.21
CARDGAMES-->Jack v1.16 Deck v1.12 Preference v1.19
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 7th January, 2007, 05:27 PM
Gizmo's Avatar
Chief BBS Administrator
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 13,949
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

I used Borland Turbo C many years ago with the Object Windows Libraries (OWL)
__________________
Avatar and sig graphic by Pitch. Subscribers!
Ask about a custom graphic or avatar today!
 
Later,
Gizmo
Thermal Diode Mod and Direct-Die Water Block
8-Cheetah 18GiB U-2 SCSI
MegaRAID Enterprise 1500/128MiB
Samsung SyncMaster 955DF
TTGI/Superflower TTS-520 PSU
 

 
AOA Team filesAOA Team wcgAOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 7th January, 2007, 06:06 PM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

This was the previous enviroment version before *.NET.
BTW I do not know any other C Windows platform except of Borland and Microsoft.
If someone knows anything else let me know....
__________________

Last edited by MrSeanKon : 15th January, 2007 at 03:42 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 9th January, 2007, 03:27 AM
chrisbard's Avatar
Benchmarker
 
Join Date: March 2003
Location: I turn ;)
Posts: 5,972
Send a message via MSN to chrisbard Send a message via Yahoo to chrisbard

While @ it don't forget your Vitamin C dose
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 15th January, 2007, 03:41 AM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

What do you mean?
__________________
GRAB overclocking -->OcBible v1.55 Guidemania v1.21
CARDGAMES-->Jack v1.16 Deck v1.12 Preference v1.19
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 17th January, 2007, 01:57 AM
chrisbard's Avatar
Benchmarker
 
Join Date: March 2003
Location: I turn ;)
Posts: 5,972
Send a message via MSN to chrisbard Send a message via Yahoo to chrisbard

Nevermind, just a poor joke
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 17th January, 2007, 08:55 AM
Daniel ~'s Avatar
Chief BBS Administrator
 
Join Date: September 2001
Location: Seattle Wa.
Posts: 37,187

No sweat Chris, poor jokes are the only one I can afford to get! ":O}
__________________
"Though all men live in ignorance before mystery,
they need not live in darkness...
Justice is foundation and ETERNAL
."
DKE

"All that we do is touched by Ocean
Yet we remain on the shore of what we know."
Richard Wilbur


Subscribers! Ask Pitch about a Custom Sig Graphic

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 26th January, 2007, 02:49 AM
MrSeanKon's Avatar
OcBible Creator
 
Join Date: June 2005
Location: Where the streets have no name
Posts: 744

Quote:
Originally Posted by chrisbard
Nevermind, just a poor joke
No more http://www.geocities.com/seankoniari...s/offtopic.gif
Continued....
gizmo I would like your opinion about Visual C++ vs. C#
The first platform is more complex IMHO but offers more capabilities e.g. Win32 API access.
For example which source code runs faster?
WMI commands using C# or Visual C++ and Win32 API?
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 26th January, 2007, 06:35 AM
MONKEYMAN's Avatar
Member
 
Join Date: January 2005
Location: DORSET, UK
Posts: 2,164

Chill out, thats what Chrisbard is here for
__________________
Dell Inspiron 6000
1.73GHz Intel "Sonoma"
1GB DDR2 533
ATI X300

Join our F@H team today.. http://www.team45.info/
Are you a subscriber? No? well then, why not....
Subscribe to AOA for a better experience and faster downloads!
How to unlock and overclock your Nvidia 6800
BIOS Volt-mod your 7800gt

AOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 26th January, 2007, 10:59 AM
Gizmo's Avatar
Chief BBS Administrator
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 13,949
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

Quote:
Originally Posted by MrSeanKon
No more http://www.geocities.com/seankoniari...s/offtopic.gif
Continued....
gizmo I would like your opinion about Visual C++ vs. C#
The first platform is more complex IMHO but offers more capabilities e.g. Win32 API access.
For example which source code runs faster?
WMI commands using C# or Visual C++ and Win32 API?
Actually, there are 4 options here:
C++ and Win32
C# and Win32
C++ and WMI
C# and WMI

The performance penalties associated with C# and WMI can be pretty severe. C# itself introduces roughly a 15% performance hit, in my experience. WMI can be accessed through a COM interface which is normally fairly efficient, but when coupled with C#'s marshalling code you take another 10%-15% performance hit.

C# to Win32 is even worse, because you have to write custom marshaling code or use the Microsoft.Interop stuff, or use PInvoke to access it. In my experience, there is typically about a 25% overhead in doing any of that.

C++ to WMI is pretty efficient.

C++ to Win32 will be probably 5%-10% more efficient than WMI, but brings with it a lot of baggage. WMI aggregates a lot of interfaces and information that are scattered throughout the Win32 API (and even some protected CPU instructions), and which also vary across operating system versions from Win95 to Win98 to WinMe to WinNT to Win2K to WinXP to Vista, into a single easy-to-use API.

To be fair, there are some variations of the WMI implementation across the various OSen, but those issues are documented. In addition, WMI isn't installed on 9x or WindowsNT 4, but you can download it from MS and install it on those machines.
__________________
Avatar and sig graphic by Pitch. Subscribers!
Ask about a custom graphic or avatar today!
 
Later,
Gizmo
Thermal Diode Mod and Direct-Die Water Block
8-Cheetah 18GiB U-2 SCSI
MegaRAID Enterprise 1500/128MiB
Samsung SyncMaster 955DF
TTGI/Superflower TTS-520 PSU
 

 
AOA Team filesAOA Team wcgAOA Team fah
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote