Why so little software for OS X vs Windows (& Programming)

Discussion in 'macOS' started by 22Hertz, Jul 23, 2009.

  1. 22Hertz macrumors regular

    Oct 20, 2007
    I was talking with some Mac haters yesterday about Mac vs PC. This was between to electrical engineers and myself, a student of electrical engineering.

    The question came up about programming for OS X.

    I don't know anything about it, but they both do some very low level programming producing test application software for hardware our company sells. I test the hardware using software made by the engineer that also designed the electronic devices, and we use networking a lot as we deal with many PCs at a time.
    There is no software that would do what we would need at work and according to these two engineers the Mac OS is closed so none can be developed easily like you can on Windows

    So, is the mac platform (OS X) closed...
    (meaning no access to low level programming)

    If not, why is there so little software to do things the Mac is clearly capable of and possible better suited?

    How would one get started learning programming for OS X?
  2. Consultant macrumors G5


    Jun 27, 2007
    You do know those who know how to utilize the OSX platform make tons of money, for example many of the iPhone programmers.

    OSX is UNIX, not closed. Too bad some people are not smart enough to figure it out.

    There are plenty of software for OSX. Quality, not quantity.
  3. mslide macrumors 6502a

    Sep 17, 2007
    I'm not sure why the engineers would say OSX is closed. A Mac in general may be more closed in the sense that one cannot just open it up and replace the video card (except in a mac pro), however, as far as software is concerned, I wouldn't say it's closed. If anything, I'd say that OSX is more open than Windows because parts of OSX are open source and it is a unix operating system... not to mention all of the tools required to write Mac software are freely available from Apple.

    At the company I work for, we have lots of different engineering applications that test and control all sorts of embedded products. They were all written in C++ using the Qt toolkit and are thus platform independent. They all run, and work, on Windows, Linux and a Mac. I was actually very pleasantly surprised when I first tried to compile the software on my Mac, and they worked (edit: and they looked like a native OSX program). One difference here may be that we communicate to these products over a network, so we don't have to worry about device drivers and whatnot.

    Not to bash your coworkers, but I think they are just being closed minded and writing off a Mac because they know nothing about it and don't know how to write platform independent software. If it's, say, a USB device that is directly connected to your computer, then I can see them not wanting you to do your testing on a Mac because they don't want to (or know how to) write an OSX device driver for it, but they could if they really wanted to.

    edit: we also develop the software that runs on those embedded products on all platforms, including a mac, using the GNU toolchain and cross-compilers.
  4. boast macrumors 65816


    Nov 12, 2007
    I've recently start learning how to write C++ using the qt4 framework. I think its great, you should give it a try. And since it was just released under the LGPL as well, I hope it starts getting used more.

    And if Mac OS is "closed," then windows is completely hidden! lol.
  5. Cinder6 macrumors 6502


    Jul 9, 2009
    I don't think you guys are understanding his usage of the word "closed", here. He doesn't mean closed vs. open source, but rather closed access to low-level stuff.

    But, either way, it's not closed, no.
  6. MisterMe macrumors G4


    Jul 17, 2002
    You have a complete misunderstanding of the term closed. Your issue has to do with a type of developer software known as a cross-compliler. A cross-compiler allows the programmer for one type of processor to developer software on another. This is particularly useful for embedded applications such as digital toys, entertainment systems, scientific instruments, military weapons, etc. A cross-development environment often includes a target simulator for application testing. Whether or not a cross-compiler for a particular OS is available is at the discretion of the target environment's developer. Xcode is a very convenient platform on which to base a cross-compiler.

    Xcode is included with every Mac. It is based on the opensource gcc compiler suite, which is also included with every Mac. gcc is available on all UNIX/Unix/Linux systems free of charge. You can't get any more open than that. To the develop for Windows, one must purchase a development system. You can't any more closed than that.

    Caveat: gcc is available for Windows, but it is not the development environment of choice for that OS.
  7. 22Hertz thread starter macrumors regular

    Oct 20, 2007
    Thank you,
    All very informative answers!

    So if Im understanding it all
    -The Mac platform is open for low-level hardware manipulation (USB, COM port emulation etc...)
    -Anything written in C++ can be compiled for multiple platform OSs including OS X (how about C)
    -Xcode is? Ill have to look into it

    Anything that can run in Linux can be compiled to work in OS X?

    Please tell me it keeps getting better:D
  8. Cinder6 macrumors 6502


    Jul 9, 2009
    So as not to confuse others (such as the TC):

    While you can get Xcode on every Mac, note that you have to go and download it; developer tools aren't included by default.

    1. Yes. And you shouldn't say "open"; maybe a better phrase would be "provides access to". If you say "open", you'll get a lot of people thinking you mean open source.

    2. Yes, provided it doesn't use proprietary, system-specific, or otherwise unavailable functions/libraries. Note that this isn't one-way: I can write something that will only work on Unix, and I can write something that will only work on Windows. C++ is pretty much a superset of C, so C is the same way. (Actually, most programming languages will work on both platforms; you just need the proper compiler and/or virtual machine.)

    3. Xcode is an IDE. It's not a compiler, but provides easy access to compiler functions. Basically, it lets you easily manage projects of various sizes.

    4. Most things that can run in Linux will run on OS X, provided you recompile. There can sometimes be things that behave differently (library/API differences), but the changes will almost always be minimal.
  9. scaredpoet macrumors 604


    Apr 6, 2007
    Just out of curiosity, what environment are the two mac haters programming in?

    It's very likely they have tunnel vision of sorts, and if they don't have tools for the specific language or environment they're using, then that translates to "there's no software and mac sucks." That said, if we know what's being used here, such tools might well be out there and they simply haven't been motivated to look.

    They may not have even looked at a Mac since OS 9....

    Anyway, considering that you can boot a VM of Windows in Mac OS X and give Windows access to the USB and other ports, it's a little silly to assert that access to such things is "closed."
  10. mslide macrumors 6502a

    Sep 17, 2007
    Yes you can get access to those things.

    It's not that simple. C++ is just a programming language. By itself, it doesn't give you access to things like networking or graphical user interfaces. For those things, you need to use libraries and toolkits. Every operating system will provide a set of interfaces to allow you to do those things. If you use your operative system's native APIs to do those things, then it will not compile on another operating system. If, however, you use a cross-platform toolkit, like Qt, it will most likely compile on any platform that Qt supports (which includes, among others, Windows, Linux and OSX). Using Qt is certainly not the only way to write cross-platform software, but it is one good way.

    How portable an application is depends on the developer.

    XCode is something you download from Apple. XCode itself is an IDE that is popular amongst Mac developers. When you download XCode it include a suite of GNU developer tools. It comes with all the typical GNU tools that a Unix/Linux developer would except. Things like gcc, g++, gdb, make, etc. Basically, if you want to write software on a Mac, XCode is the first thing you should download and install.

    It's not that simple. While OSX and Linux seem very similar on the command line, they are two different operating systems. It depends on the application and who wrote it as to how hard/easy it would be to port to OSX. Sometimes, it will compile without any changes. Other times, it could be a lot of work. I will say though that it would probably be a heck of a lot easier to get a linux program to compile and run on OSX than it would be to do the same thing with a Windows program.

    It's not surprising that your coworkers feel the way they do. Many engineers/programmers grew up in a Windows bubble. They were taught using MS Visual Studio and using things like .NET. Programming in a Unix environment and writing a program that would run on other platforms is a concept that may seem completely foreign to them. They might not even realize that OSX is a Unix operating system and that you can use all of the tools that one would use if programming on something like Linux.
  11. 22Hertz thread starter macrumors regular

    Oct 20, 2007
    Thats very interesting.

    What advice would you give to get started in learning OS X?
    Do you know of any really good books dealing with C++ for a beginner, or beginner books on UNIX.

    I will be taking a class this semester on Java HTML and C++, but I doubt it will get too deep. I would like to get ready by reading up and learning the basics.

    I would be really interested in one book with a "have to have" recommendation (of each category if you know of one)
    or any good website.
  12. tom.96 Suspended

    Jun 13, 2003
    Just my thoughts, maybe useful. I like playing with programming stuff, there is lots out there for the Mac. My favourites are:

    Xcode - already mentioned. A great book is Cocoa Programming for Mac OS X by Aaron Hillegass but it does assume some knowledge of C.
    Komodo - excellent editor for lots of things
    Chipmunk Basic - if you ever want to work in BASIC, Chipmunk is brilliant
    Open Office - it has an option to start a new HTML document - great for editing HTML.
    BB Edit - really first class editor

    My programming skills are by no means advanced but as an aspiring amateur the above are user friendly and there are plenty of tutorials online.
  13. miles01110 macrumors Core


    Jul 24, 2006
    The Ivory Tower (I'm not coming down)
    Er- I think there's a question still unanswered re: "low-level programming"

    C++ isn't a low-level language, and doesn't really address that particular issue at all.
  14. Wowzera macrumors 6502a

    Oct 14, 2008
    language and programming are two very different things...
  15. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Err the complete opposite is true.

    The core of Mac OS X is open source. You can download the source code for the Kernel and the other parts of core operating system here. Try doing that with Windows.

    As for the rest it sounds like there is some fundamental misunderstanding of computers in general going on here.

    A language can be used on any platform that has an appropriate compiler or interpretor for it. There is nothing closed about Mac OS X, quite the contrary. In fact I have found Apples developer documentation to be light years ahead of Microsoft's which is an annoying mess of documents which are poorly organised. What is worse is the fact that they do not provide any PDF versions of them.
  16. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Assembly, while somewhat undocumented on Mac OS X is still viable once you have learnt the ins and outs of your chosen assembler.

    Embedded programming is also fine, I had a play around with an Atmel Butterfly. Admittedly it was a pain to setup but I think that was partly due to the fact that I had got it in a funny state and it stopped working properly.

    I seriously think that those comments were from people who didn't know what they were talking about.
  17. old-wiz macrumors G3

    Mar 26, 2008
    West Suburban Boston Ma
    At the very bottom of the system, you sometimes find assembly language; sometimes it's done to maximize performance, sometimes do deal with hardware specific oddities that aren't worth teaching compilers about. When I was workin I had to deal with these low level routines, and we had to be able to open the hardware reference manuals and study the odd little details of the instruction set. One piece of hardware might say something like "bit 7 is undefined", so you had to make sure your code wouldn't pay attention to it.

    One reason you find more windows systems doing the low level stuff it the huge variety of boards that can be connected to the system. This is great for hardware makers, but a pain in the a** for software people.

Share This Page