Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 My rant on "cross platform"
Index -> General Discussion
Goto page 1, 2, 3, 4, 5  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mirhagk




PostPosted: Sun Nov 28, 2010 10:58 pm   Post subject: My rant on "cross platform"

I hear stuff like "I don't want to use the WIn API, or Direct X, or C# because it's windows - specific, I'd rather use a cross platform option". Here's the problem, some "cross platform" libraries are indeed cross platform, but most just mean "cross-linux". For instance using pthread rather than windows' built in threading. PThread technically works on windows, but it's a very pooly documented, not ever worked on port, rather than actually including it with the code. Rather than using something that works on linux, and then building a windows port, why don't we do the opposite. 99% of people have windows, and almost nooone who doesn't understand programming uses linux. So rather than sticking these people with the task of trying to search through undocumented sites trying to find and install undocumented code (very little of which is compiled, most are source code, which is useless to the average user), why don't we give that task to those tech-savvy enough to run linux?

And then there's the whole quality vs cross platform. Take for instance OpenGL vs DirectX. OpenGL is cross platfom, DirectX is powerful. But really OpenGL still doesn't reach all customers, you still need a computer good enough to run the program, so for a good graphics application, the amount of people your cutting off because they don't have windows is tiny compared to the number of people you're cutting off because their computer isnt good enough, so who cares, go with power.

Plus your really not cutting anyone off. Wine and Bootcamp means that windows applications run on anything. Whereas Mac and Linux applications don't usually run on windows, and are never easy to use.

Plus, if you're tech-savvy enough to use linux, you know how to dual-boot, it's honestly not that hard, and if your computer is good enough to run good programs, its good enough that dual booting won't do anything bad to it. (ie probably has more than enough hard drive space)
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sun Nov 28, 2010 11:06 pm   Post subject: RE:My rant on "cross platform"

A lot of people want to develop on cross-platform languages because they are developing on Linux. Installing Windows just to use C# is not in the interest of much of the programming community.

A lot of games that run on DirectX also have the option to run on openGL. While that takes a lot of effort (as far as I know) it allows easy porting to other platforms.

Wine is not reliable for many modern applications- anything running on DX9+ is unlikely to work in my experience, and having a Windows partition just sucks.

You are right though. If you're developing to an audience, it's best to cater to the majority, which in 99% of cases is Windows users.
DtY




PostPosted: Mon Nov 29, 2010 12:13 am   Post subject: Re: RE:My rant on "cross platform"

Insectoid @ Sun Nov 28, 2010 11:06 pm wrote:
A lot of people want to develop on cross-platform languages because they are developing on Linux. Installing Windows just to use C# is not in the interest of much of the programming community.
Yes. I am not going to install Windows just because everyone else likes it. I don't.
TheGuardian001




PostPosted: Mon Nov 29, 2010 12:43 am   Post subject: Re: My rant on "cross platform"

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:

And then there's the whole quality vs cross platform. Take for instance OpenGL vs DirectX. OpenGL is cross platfom, DirectX is powerful. But really OpenGL still doesn't reach all customers, you still need a computer good enough to run the program, so for a good graphics application, the amount of people your cutting off because they don't have windows is tiny compared to the number of people you're cutting off because their computer isnt good enough, so who cares, go with power.

I demand you give me a graphics card made since the early 90s that doesn't support OpenGL. And I demand to know where you got the idea that DirectX was more powerful? Even on Windows, OpenGL is more efficient and more powerful (here's a presentation by NVidea to prove that, if you like.) In fact, the number one thing Microsoft is selling DirectX 11 on (new tesselation technology) has been available for over 3 years.

Another fun fact for you: If you use DirectX 10 or 11, your programs won't work on windows XP. Hows that for cutting of your market? Over half of PC gamers still use XP.

I'm fine for you being pro single-platform, but I won't have you sit there and be stupid and make assumptions. I'm also not fine using a horrible language like C#, but really that's your choice.
rdrake




PostPosted: Mon Nov 29, 2010 1:08 am   Post subject: Re: My rant on "cross platform"

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
I hear stuff like "I don't want to use the WIn API, or Direct X, or C# because it's windows - specific, I'd rather use a cross platform option". Here's the problem, some "cross platform" libraries are indeed cross platform, but most just mean "cross-linux".
I'm not sure I follow. In your example you cite pthread, but nowhere on their site does it mention Windows.

The actual pthreads site wrote:
For UNIX systems, a standardized C language threads programming interface has been specified by the IEEE POSIX 1003.1c standard. Implementations that adhere to this standard are referred to as POSIX threads, or Pthreads.
Windows does not quality under UNIX. I understand there is a pthreads port to Windows, but nowhere do they claim to officially support Windows.

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
99% of people have windows, and almost nooone who doesn't understand programming uses linux.
I'm sorry, but are you saying all Linux users are programmers? I think it would be more fair to say programmers are more likely to use Linux than non-programmers.

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
Rather than using something that works on linux, and then building a windows port, why don't we do the opposite.
Like... GIMP? A lot of these programs come from the need for that kind of application on Linux. Why add to the neverending pile of crapware on Windows? If the application is good enough, people will port it over to Windows.

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
And then there's the whole quality vs cross platform. Take for instance OpenGL vs DirectX. OpenGL is cross platfom, DirectX is powerful.
OpenGL has its issues, but I wouldn't say it lacks in the power department.

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
But really OpenGL still doesn't reach all customers, you still need a computer good enough to run the program, so for a good graphics application, the amount of people your cutting off because they don't have windows is tiny compared to the number of people you're cutting off because their computer isnt good enough, so who cares, go with power.
Dude, my netbook runs OpenGL. My 10 year old XP machine ran OpenGL. What are you talking about? If anything you're cutting users off by using DirectX.

As was also mentioned many games use a standard engine which has both DirectX and OpenGL backends. This means you can switch to whichever backend is available and/or provides the best performance in your situation.

mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
Plus your really not cutting anyone off. Wine and Bootcamp means that windows applications run on anything. Whereas Mac and Linux applications don't usually run on windows, and are never easy to use.

Plus, if you're tech-savvy enough to use linux, you know how to dual-boot, it's honestly not that hard, and if your computer is good enough to run good programs, its good enough that dual booting won't do anything bad to it. (ie probably has more than enough hard drive space)
Protip: Nobody ever likes dual booting, WINE, or Bootcamp. These are necessary evils if you wish to play the vast majority PC games, or the odd application which lacks any reasonable replacement.

Overall I give you F for fact checking and general knowledge, B+ for trollbait. You average out to a pass.
DemonWasp




PostPosted: Mon Nov 29, 2010 3:42 am   Post subject: RE:My rant on "cross platform"

The biggest problem I have with single-platform development is that sometimes I develop on my Windows 7 desktop at home, sometimes I develop on my Ubuntu laptop while travelling, and sometimes I want my programs to run on my friends' Windows XP boxes.

The tools I prefer (Java, OpenGL/OpenAL, JMonkeyEngine) let me do that effortlessly. Were I to use the single-platform equivalents (C#, DirectX), I couldn't develop while sitting in a car or bus for 5 hours in a row. I couldn't rely on my friends having DX11 (most don't).

Dual-booting is a joke. Most of the time, I just don't turn the computer off if I can help it (driver crashes aside...stupid Win7). Even when I do turn the system off, it's never to switch OS. I've tried this a few times and uniformly it's been a waste of time setting everything up twice on the same computer. WINE is hit-and-miss and doesn't perform as well as native Windows -- when it works (in fairness, Windows 7 just plain sucks at playing some games too).

Rest assured though, I will never let myself get suckered into a world where I can't choose my platform. If I program in C#, Microsoft gets to decide that I'm using (and targeting) Windows, that I'm using DirectX, and so forth. If I program in Java (C, C++, Python, whatever else), I get to decide which system I'm targeting, which I'm working on, which graphics library I use, and so on.

You should probably also know that the numbers are shifting in favour of Linux and OSX. Most of the research I've seen is that Linux is <1% market share, Apple is ~5-10% and Windows is the remaining 89-94%, but that gap is decreasing.
rdrake




PostPosted: Mon Nov 29, 2010 4:42 am   Post subject: Re: My rant on "cross platform"

I feel obligated to enlighten some people here. C# is a cross-platform (via Mono and DotGNU) and standardized (by the ISO and EMCA) language, .NET is the proprietary Microsoft platform (including all BCL such as WinForms and the like). Common mistake, no need to be embarrassed.

The correct terminology to use when referring to the proprietary Microsoft implementation is the .NET Platform.
wtd




PostPosted: Mon Nov 29, 2010 8:22 pm   Post subject: RE:My rant on "cross platform"

Here's the trick to cross-platform development:

separate your app out into UI and underlying logic. IN many cases, the underlying logic can be fairly easily developed in a cross platform manner. You then create native UIs for each platform.

Or... employ the ultimate cross-platform development environment: the internet.
Sponsor
Sponsor
Sponsor
sponsor
mirhagk




PostPosted: Mon Nov 29, 2010 9:55 pm   Post subject: Re: RE:My rant on "cross platform"

wtd @ Mon Nov 29, 2010 8:22 pm wrote:
Here's the trick to cross-platform development:

separate your app out into UI and underlying logic. IN many cases, the underlying logic can be fairly easily developed in a cross platform manner. You then create native UIs for each platform.

Or... employ the ultimate cross-platform development environment: the internet.


thank you, someone who makes sense. However the problem is that most linux programs only work on the backend. Yes there are front ends made by other people, but a CLEAN object oriented back-to-front end system rarely is the case (where it pretty much always should be).

Really the answer to all cross-platform-ness is object oriented design. Instead of hardcoding in something to handle multi-threads or functions, have the main function simply delegate the work to something else, something that can easily be replaced.

Oh and just to clarify, I meant that while OpenGL itself can reach everyone, a game with good graphics does not. Most modern video games can only play on a small percentage of computers. So using DirectX to cut an extra (tops 10%) of people from the already slim 30% (just a guess, probably pretty conservative)

Oh and I have no beef with stuff like Java and OpenGL, they are just as good, I don't like when people say you have to use them, because they are cross-platform.

and @rdrake, my point exactly. People use stuff like that because "it's cross platform" but it's not. Yes a port exists, but it's not meant for that.

C# and the .NET framework may have flaws, but they are clean, and personally I think clean code makes it a lot more available to others, developing extensions and changing code is a lot simpler.



SO here's my ultimate point. Rather than using libraries that have ports for everything, simply make your code clean, and object oriented. Use proper programming practice, and people will have no problem cutting out your needed libraries and subsituting their own.

(you could also compile your code into their own objects, and have the main simply provide the link between them, then make your code closed source, while the main and external interface code open sourced. Very easy to adapt to new systems, and still closed source)
rdrake




PostPosted: Tue Nov 30, 2010 1:47 am   Post subject: Re: RE:My rant on "cross platform"

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
However the problem is that most linux programs only work on the backend. Yes there are front ends made by other people, but a CLEAN object oriented back-to-front end system rarely is the case (where it pretty much always should be).

Really the answer to all cross-platform-ness is object oriented design. Instead of hardcoding in something to handle multi-threads or functions, have the main function simply delegate the work to something else, something that can easily be replaced.
What do you mean by "on the backend?" Are you referring to command line programs? If so, you are wrong. CLI programs do have an interface, it's called the command line.

In addition, the real solution is this, not OOP.

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
Oh and just to clarify, I meant that while OpenGL itself can reach everyone, a game with good graphics does not. Most modern video games can only play on a small percentage of computers. So using DirectX to cut an extra (tops 10%) of people from the already slim 30% (just a guess, probably pretty conservative)
Sounds to me like you're now arguing using DirectX will cut off from your already slim market. Either way this further clarification does nothing to improve your argument, it just weakens it further.

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
Oh and I have no beef with stuff like Java ... they are just as good...
You take that back.

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
...I don't like when people say you have to use them, because they are cross-platform.
Fair enough.

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
and @rdrake, my point exactly. People use stuff like that because "it's cross platform" but it's not. Yes a port exists, but it's not meant for that.
I'm really not sure anybody on Linux really cares if their stuff works on Windows or not. Also, my point was nowhere does your particular example even claim to be cross-platform aside from different flavours of *nix.

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
... and people will have no problem cutting out your needed libraries and subsituting their own.
Somebody else explain why this won't realistically work.

mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
(you could also compile your code into their own objects, and have the main simply provide the link between them, then make your code closed source, while the main and external interface code open sourced. Very easy to adapt to new systems, and still closed source)
You mean like a dynamic library? The interface doesn't even need to be open sourced, just documented. Be careful, though, as linking to GPL code is usually not a good idea for closed-source programs (unless it's the LGPL).

While I agree nobody should choose something simply because it's cross-platform (unless that's a primary goal), I disagree strongly with your weakly argued points and incorrect assumptions.
wtd




PostPosted: Tue Nov 30, 2010 2:29 am   Post subject: Re: RE:My rant on "cross platform"

mirhagk @ Tue Nov 30, 2010 10:55 am wrote:
Really the answer to all cross-platform-ness is object oriented design.


Very close to right.

Very close.

So close you're almost there.

But... completely and utterly wrong.

What you're describing is modular design. Object-oriented programming is one way to kind of sort of accomplish this, but is not the be-all or end-all of modular design.
DtY




PostPosted: Tue Nov 30, 2010 8:20 pm   Post subject: Re: RE:My rant on "cross platform"

wtd @ Mon Nov 29, 2010 8:22 pm wrote:
Or... employ the ultimate cross-platform development environment: the internet.
That's why I love web development. You aren't attached to your web browser like you are an operating system. Sure, it sucks if you have to switch browsers to go to some site (assuming that the needed browser is available for your setup), but you can easily run two browsers at the same time. And in very few cases will a javascript program not just work between browsers anymore (barring IE and interfaces that aren't standardized yet).
Insectoid




PostPosted: Tue Nov 30, 2010 11:41 pm   Post subject: Re: My rant on "cross platform"

[quote="rdrake" @ several posts above]
mirhagk @ Sun Nov 28, 2010 10:58 pm wrote:
99% of people have windows, and almost nooone who doesn't understand programming uses linux.
I'm sorry, but are you saying all Linux users are programmers? I think it would be more fair to say programmers are more likely to use Linux than non-programmers.[/quote]

I wouldn't say he's saying ALL Linux users are programmers- rather, the vast majority of Linux users are familiar with programming, much more so than the average Windows user.
DIIST




PostPosted: Wed Dec 01, 2010 12:33 pm   Post subject: Re: My rant on "cross platform"

Generally a good design and abstraction can withstand the issues of cross platform compatibility. Keep your core logic away from your model and presentation. Theres nothing wrong with using Direct X, or Win API. There are also a slew of cross platform tools that you could use like QT to make your life easier.
mirhagk




PostPosted: Wed Dec 01, 2010 12:56 pm   Post subject: Re: RE:My rant on "cross platform"

rdrake @ Tue Nov 30, 2010 1:47 am wrote:
mirhagk @ Mon Nov 29, 2010 9:55 pm wrote:
However the problem is that most linux programs only work on the backend. Yes there are front ends made by other people, but a CLEAN object oriented back-to-front end system rarely is the case (where it pretty much always should be).

Really the answer to all cross-platform-ness is object oriented design. Instead of hardcoding in something to handle multi-threads or functions, have the main function simply delegate the work to something else, something that can easily be replaced.
What do you mean by "on the backend?" Are you referring to command line programs? If so, you are wrong. CLI programs do have an interface, it's called the command line.


In a way I am. Command line programs are okay if they have a
code:

option1
option2
option3
choose an option

interface rather than just runniing the program with command line parameters. Yes they do work, but it's far too confusing, and it's not much harder to implement a menu-like system like above. You shouldn't need to read documentation to use a program, it should explain itself, that's just my personal belief, and command line parameter programs need documentation (sometimes built in with -h, but that's usually even worse than an external .txt describing how to use it).

I'm not saying you need GUI (although GUI makes most programs easier to use), but you need UI, not just command line parameters.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 5  [ 62 Posts ]
Goto page 1, 2, 3, 4, 5  Next
Jump to:   


Style:  
Search: