33

I've been programming both in Unix and Windows environments. Mostly I've worked in Unix, where I've learned Unix Philosophy, which can be summarized as

  • Write programs that do one thing and do it well.
  • Write programs to work together.
  • Write programs to handle text streams, because that is a universal interface.

There seems to be a clear difference in programming cultures between Unix and Windows worlds, for example:

  • GUI vs CLI
  • Registry vs config files
  • Lots of tools specializing for any given need vs group of generic orthogonal tools which can combined

Is there equivalent of "Unix philosophy" in Windows world? What Unix-programmer can learn from Windows or should be aware of when moving to programming in Windows?

I would like answers to focus on the best practices of Windows programming (and not a fight between Windows and Unix).

Maglob
  • 3,849

7 Answers7

29

There is actually something like "Windows philosophy". Mostly it is about the composition concept and the user interface part - design programs for users not for other programmers.

That means:

  • Simple and intuitive user interfaces
  • Natural workflow
  • Should work out of the box
  • No technical knowledge required there where it is not required

Here is a good read:

Biculturalism

With the proliferation of Windows the hacker approach to coding started to become unfavored. First it was writing C/C++ programs in the most complex and obfuscated manner, so that only the hardest brains could understand them, as a sort of a rite of passage. Under Windows things started to change and that "code style" is now highly unfavored. Not sure if its direct Windows influence or rather the new level of understanding of the code quality, but at least timely they coincide.

8

I think the differences you alude to in your question are more about the users of these systems than the programming styles of their developers. For a long time, *nix has been the field of either the programmer or the computing enthusiast. There was very little in the way of "casual" use. Where as Windows has [home] user numbers orders of magnitude greater.

Casual users don't want to remember a dozen different command line flags to run a program. They want to click on a button.

Casual users don't want to worry about their systems configuration files, or how Fluffy Kitties remembers their favourite breed of feline.

Casual users will generally use something as long as it does what they want, even if there are "better" products available.

I think my main point here is... Windows is very much about creating for the user, rather than the creator. Don't go against the long-standing paradigms that exist in Windows development. Don't pollute the users My Documents with crap, or insert yourself into their startup for no reason.

Maybe of a similar importance: write user documentation.

TZHX
  • 5,072
8

Raymond Chen's blog, The Old New Thing, and his book with the same name is a great insight into the philosophy, history, and best practices of native Windows programming.

4

Compromise & Customize

It isn't the best at anything, but if you are willing to put in the time and make some unpalatable decisions in some places there is little you cannot make it do. If you do not like what it is currently doing you can probably change it. There are few places where there is only one way or even a way that is always best.

Good enough for the user to start

Very few things are phenomenal out of the box, but most things are usable. Unix tends to go the direction where nothing works until you configure it and Apple makes everything pretty polished, but at the cost of some configurability / flexibility.

Expect a log support tail

Windows users do not upgrade just because there is a newer version. They don't even always upgrade because of a vulnerability or bugfix. Windows users often need to be forced to upgrade, but if you force them to upgrade quickly they will seek alternative products

Users have a vast range of skill levels

Unix has a high perceived barrier to entry from a technical level from the point of view of a casual home user. Apple had a very low perceived required skill level, but does not encourage the casual user to do much in the way of customizing their OS. Windows is in between. It is only slightly harder to begin using than Apple products, yet there is a lot of simple information available, sometimes right in the install itself, on how to go about changing some pretty in-depth system configuration. This leads to a rather random skill level in the middle tier of users because if they are confident enough to try something there is a good chance they can figure out how to do it. It also leaves the more timid users without any experience in some cases because they are wary of the warnings that things my go wrong.

Bill
  • 8,380
3

Windows was built with explicit support for IBM's Common User Access (CUA) standard to guide application development.

Which, of course, was an attempt to create a Mac-like experience for the user.

1

UNIX long ago was for programmers and people like that and windows always was for users who don't know how to write bash scripts.

Therefore, in Windows you should care about users, that means make one tool for all task, so that the user does not need to worry how to configure programs to work together.

lennon310
  • 3,242
Dainius
  • 340
0

I'm not sure if it's a philosophy, but IMHO there's a sort of density of thought that goes with Windows programming. There's also a sense of surprise at how things work sometimes.

I'd recommend patience if you're embracing Windows development, and taking a bit more care about your assumptions.