Thread: Windows Versus Linux : Whats the "Reality"

  1. #1
    Registered User
    Join Date
    Aug 2015
    Posts
    9

    Windows Versus Linux : Whats the "Reality"

    Question 1 :Why do people always advise to learn Linux and not windows.

    Questions 2 : Why people always advise budding programmers to learn and deep dive in Linux kernel source code. Windows programmers do equally fine without windows source code.



    Some facts as I understand :
    • Linux is open source and code is available for better understanding
    • Linux is secure and used on most of the servers
    • Flexible and can be customized/configured as per the needs


    However, desktop space is ruled by "Windows".
    • 92% users use windows on desktop.
    • Virus/ malware are made primarily to target windows
    • corporates have windows on desktops and servers too
    • Most of the software gaints hire "more" people with windows background because thats where the money is.
    • All the programmers who make open source applications for Linux eventually end up porting the application to windows as well...perhaps for monetary benefits.


    One might argue that Windows sales have stagnated and mobile / tabs are picking up but that another Argument

    All views would be welcome !

  2. #2
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Quote Originally Posted by TheGuy Nextdoor View Post
    Why do people always advise to learn Linux and not windows.
    On one hand, relying on a single provider is risky -- you have to accept what Microsoft or Apple decides, whereas you can choose between multiple Linux distributions and providers, or even roll your own, depending on your needs.
    On the other hand, the Linux kernel provides a POSIX-like interface, as does the GNU tools and libraries; this means you can easily learn to develop for all POSIX-like systems, not just Linux, if you start with Linux. The Linux man-pages project is a good example: it includes a pretty complete description of the C library interface, but always mentions which standard or specification the feature is defined in, and notes any known Linux issues or linux-isms. It does not try to keep you within the "linux ecosystem" (vendor lock-in), unlike many other documentation sites I've seen; it just tries to describe the system interfaces as precisely as it can.

    Personally, I recommend using Linux, because it does not force any specific workflow for you; you can (and often have to) customize it to fit your own needs, and adjust it as your needs change. There is no single way to do stuff. For those who don't want to take the effort, there are some pretty good distributions that don't need much tweaking to get a reasonable workflow, and the package management from repositories -- just open up the package manager, and pick what software you want -- makes it easy for casual users to maintain their own machines. They're not as polished as the commercial ones, but they provide a full set of tools from the get go.

    As to programming, I do not recommend learning the Linux-specific stuff; I warmly recommend learning the latest widely-available POSIX interfaces instead. That way the code is not locked to Linux, but is (or will be) portable to at least the *BSD systems, too.

    Quote Originally Posted by TheGuy Nextdoor View Post
    Why people always advise budding programmers to learn and deep dive in Linux kernel source code.
    I don't. It is a good example if you want to see how to write the lowest level C code (kernel code) across a very wide variety of hardware -- don't forget that all Android devices run on top of a Linux kernel -- but I definitely do not recommend it for budding programmers. It is as hard to grok as C code ever gets, outside of deliberately obfuscated code.

    I'd point budding C programmers towards POSIX I/O (almost the same as standard C I/O, but with additional functions like getline(), regcomp()/regexec(), nftw(), localization, iconv(), and so on) and for graphical user interfaces, GTK+.

    Quote Originally Posted by TheGuy Nextdoor View Post
    Windows programmers do equally fine without windows source code.
    Well, actually, they don't. If Microsoft sees you as a competitor to their software products, they are known to pull the rug from under you, by modifying their interfaces in obscure and weird ways. Just look at what happened to WordPerfect. Office developers et al. Microsoft software projects do have access to the internals, usually so that they can workaround old bugs, and utilize better interfaces not publicly available.

    Because the sources to those products are not available for other programmers, creating equally performant software, or fully implementing Microsoft specs like OOXML is sometimes either impossible, or requires analysing/reverse-engineering old software behaviour ("borders are calculated like Word 6" and so on).

    Note that this is an universal problem. Even in Linux, if you have proprietary drivers installed (namely, NVIDIA or AMD closed-source drivers), it is usually impossible to determine where and how a kernel-level bug occurs, unless the bug can be reproduced without the closed-source drivers too.

  3. #3
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Question 1 :Why do people always advise to learn Linux and not windows.
    I've actually never seen this O_o

    If anything, I think it's easier to program in Linux than in Windows. In Linux, you can just go full command line and call your compiler directly. In Windows, they're like, "Bro, are you sure you want to be coding?"


    Questions 2 : Why people always advise budding programmers to learn and deep dive in Linux kernel source code. Windows programmers do equally fine without windows source code.
    Again, never seen this either. This would only be useful advice if you want to know how a kernel actually works.

  4. #4
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Why people always advise budding programmers to learn and deep dive in Linux kernel source code.
    O_o

    Do you also think people always advise beginning a fitness regimen by starting with a billion squats?

    Soma
    “Salem Was Wrong!” -- Pedant Necromancer
    “Four isn't random!” -- Gibbering Mouther

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by MutantJohn View Post
    I've actually never seen this O_o

    If anything, I think it's easier to program in Linux than in Windows. In Linux, you can just go full command line and call your compiler directly. In Windows, they're like, "Bro, are you sure you want to be coding?"
    I don't see why you'd want to call the compiler directly anyway. But regardless, it's equally easy in windows as it is in linux.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User Alpo's Avatar
    Join Date
    Apr 2014
    Posts
    877
    As someone who just recently started using Linux a lot, I'm surprised how few people mention the huge software repository you get with Linux (Maybe it's only on certain distributions?). That is the main advantage that has drawn me to use Linux, besides the easier command line interface.

    Edit:

    He said, having missed the part where Nominal Animal talked about the repositories. Still they are pretty awsome, at the very least you can get the packages without a huge feeling of dread of viruses. (Just a dread of unmet dependencies sometimes lol).
    Last edited by Alpo; 08-15-2015 at 09:36 PM.
    WndProc = (2[b] || !(2[b])) ? SufferNobly : TakeArms;

  7. #7
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by Elysia View Post
    I don't see why you'd want to call the compiler directly anyway. But regardless, it's equally easy in windows as it is in linux.
    I actually call the compiler directly when I'm trying to help posters on this board. More often than not, the things I write can all be put in one file so it's easier to just call
    Code:
    g++ ...
    on a file I made using Gedit or some other lightweight, fast IDE.

    I recently installed Sublime Text though and don't know how to make it build projects. I remember when I was using a fork of Eclipse that the people who made it had a utility to auto-generate Makefiles. I really wish Sublime Text had that.

  8. #8
    Guest
    Guest
    I know we're veering off topic, but I too like having a quick editor handy. I have two functions in my .bashrc file that I just call from the terminal; the first goes to my "testing" directory that already contains a main.cpp and a makefile and opens the former in a text editor window, the second compiles (anything in ./src) and runs the executable right away.
    Code:
    function bjarne
    {
        cd ~/coding/cpp/testing/;
        mousepad src/main.cpp &
    }
    function run
    {
        make &&
        find -type f -executable -exec '{}' \;
    }
    It seems to me that unless you go the Visual Studio route, Windows is not very programmer friendly. Likewise, open source library developers have a tendency to neglect it, making building from source potentially challenging.
    Last edited by Guest; 08-16-2015 at 03:55 PM.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Guest View Post
    I know we're veering off topic, but I too like having a quick editor handy. I have two functions in my .bashrc file that I just call from the terminal; the first goes to my "testing" directory that already contains a main.cpp and a makefile and opens the former in a text editor window, the second compiles (anything in ./src) and runs the executable right away.
    I don't see why you'd want to use that instead of an IDE that makes it magically work in the first place with the same amount of effort but without having to take the effort to "create" the scripts first.

    It seems to me that unless you go the Visual Studio route, Windows is not very programmer friendly.
    Why?

    Likewise, open source library developers have a tendency to neglect it, making building from source potentially challenging.
    True, but that's mostly the linux aspect of them talking. If they would just take time to use cmake and stay away from using OS APIs instead of the standard C/C++ standard library functions, portability would be much less of a problem.
    Then there's cygwin, msys and babun to compile those pesky libraries that still rely on linux make files.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Guest
    Guest
    Quote Originally Posted by Elysia View Post
    I don't see why you'd want to use that instead of an IDE that makes it magically work in the first place with the same amount of effort but without having to take the effort to "create" the scripts first.
    Yeah ok, you could have a test project ready in you IDE for those cases, fair enough.

    It seems to me that unless you go the Visual Studio route, Windows is not very programmer friendly.
    Why?
    Using MinGW I always felt like a second class citizen. Hardly anyone seems to use it, projects don't see any reason to support it and it feels like a hack because the toolchain is not at home in Windows (often simple things like choking on spaces in directory names). I reckon 90%+ Windows programmers just start with the VS environment and stick to that forever.

    True, but that's mostly the linux aspect of them talking. If they would just take time to use cmake and stay away from using OS APIs instead of the standard C/C++ standard library functions, portability would be much less of a problem.
    Then there's cygwin, msys and babun to compile those pesky libraries that still rely on linux make files.
    Yeah, of those I only used msys, with mixed success. I hope CMake finds more adoption, it could save users a lot of headaches. I've started using it (to learn), even though I only code for myself. For better or worse, Linux feels very much like a programmer's OS to me and I really enjoy that, even though I'm still a layman. When reading about hobbyist and academic coding projects, I now feel catered to, like my environment is the assumed default. Anyway, I don't want this to turn into an OS war, it's clear why Windows and MacOS are usually preferred on the Desktop.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Guest View Post
    Using MinGW I always felt like a second class citizen. Hardly anyone seems to use it, projects don't see any reason to support it and it feels like a hack because the toolchain is not at home in Windows (often simple things like choking on spaces in directory names). I reckon 90%+ Windows programmers just start with the VS environment and stick to that forever.
    That doesn't really seem to me like windows is not programmer friendly, though. Most linux software have problems with spaces in names, but since most things in linux don't use spaces in names, that usually isn't a problem. Whereas in windows, spaces in paths are very common, so it quickly becomes a problem. But using VS solves that problem.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by Guest View Post
    It seems to me that unless you go the Visual Studio route, Windows is not very programmer friendly.
    Mostly agree. But I would say that Eclipse is much nice than Visual Studio (for C++), and it works on Linux too.


    Quote Originally Posted by Elysia View Post
    That doesn't really seem to me like windows is not programmer friendly, though.
    Programmer-friendly, possibly. However Windows is very much not power-user friendly. And it will remain that way until I can do the equivalent to "sudo pacman update" or "ack leFunction /usr/include" with ease, which will likely never happen.



    Quote Originally Posted by Elysia View Post
    Most linux software have problems with spaces in names, but since most things in linux don't use spaces in names, that usually isn't a problem. Whereas in windows, spaces in paths are very common, so it quickly becomes a problem. But using VS solves that problem.
    Mountain out of a molehill if I ever saw it. Spaces are quite common in everyday Linux, underscores are preferred only for historical reasons and convenient handling in the most primitive shells.

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Yarin View Post
    And it will remain that way until I can do the equivalent to "sudo pacman update"
    Already in the works.
    See chocolatey.org.
    Also in the works for universal apps (for good or bad).

    or "ack leFunction /usr/include" with ease, which will likely never happen.
    Not sure what this command is supposed to do, though.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User
    Join Date
    Aug 2015
    Posts
    6
    Coming back to the main question - There is no doubt about the facilities,benefits and learning opportunities that Linux extends. But having searched & surfed many job sites I think "Windows" offers better hiring opportunities for programmers than Linux (we all need to pay bills too :-)) and also to someone who wants to make software products especially "software security products".

    I have seen people using Linux for their learning needs but switch to windows for things as small as making a resume.

    As an academic exercise Linux is great...I use Fedora too but "windows" is the ultimate $$ money churner.

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,404
    Quote Originally Posted by mohitvarma
    Coming back to the main question - There is no doubt about the facilities,benefits and learning opportunities that Linux extends. But having searched & surfed many job sites I think "Windows" offers better hiring opportunities for programmers than Linux (we all need to pay bills too :-))
    It depends on where you are and what kind of job you want. If you're into all that entrepreneurial/startup hype (or even if you're not), you may find that you would fare better with a background in Linux than one in Windows, partly because of (sometimes irrational) social scorn heaped on "Microsoft" and "enterprise", and partly (and more importantly) because in a practical sense you would more likely be writing software for Linux servers, and if not servers, then it would be web and mobile rather than something platform specific for desktop. Consequently, your claim that '"windows" is the ultimate $$ money churner' does not always hold true... though early stage startups typically can hardly pay the bills, whether yours or their own.

    Quote Originally Posted by mohitvarma
    and also to someone who wants to make software products especially "software security products".
    Yeah, for such products aimed at the end user Windows would be the best choice.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 12-08-2014, 08:12 PM
  2. Replies: 10
    Last Post: 08-09-2012, 12:48 PM
  3. I am confused by "Linux thread" and "NPTL"
    By meili100 in forum Linux Programming
    Replies: 6
    Last Post: 03-27-2008, 12:14 PM
  4. "itoa"-"_itoa" , "inp"-"_inp", Why some functions have "
    By L.O.K. in forum Windows Programming
    Replies: 5
    Last Post: 12-08-2002, 08:25 AM
  5. "CWnd"-"HWnd","CBitmap"-"HBitmap"...., What is mean by "
    By L.O.K. in forum Windows Programming
    Replies: 2
    Last Post: 12-04-2002, 07:59 AM

Tags for this Thread