Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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).

share|improve this question
14  
Should be aware of? "Things will suck, suck bad." –  Orbling Feb 7 '11 at 8:23
3  
Only one philosophy that, there is no philosophy. ;) –  Mudassir Feb 7 '11 at 9:47
6  
Actually Powershell has brought some of the Unix philosophy into Windows, particularly writing small programs (actually cmdlets in Powershell) that only do one thing, and combining them with other cmdlets that do other things. Of course, most casual users still don't know how to use Powershell, but that kind of depends on what kind of software you're writing. –  JohnL Feb 7 '11 at 10:27
4  
We will get it right the third time. –  aufather Feb 7 '11 at 14:50
5  
The philosophy of Windows is to bring revenue to Microsoft. –  dan04 Feb 8 '11 at 14:15

7 Answers 7

up vote 23 down vote accepted

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.

share|improve this answer
4  
I don't think any of those bullet points apply particularly well to Windows. –  Tom Hawtin - tackline Feb 7 '11 at 13:10
4  
@Tom: It's a philosophy; it need not apply to anything. Nevertheless, I believe it applies very well to most things in the Windows world. –  Allon Guralnek Feb 7 '11 at 13:21
    
@Tom I agree with @Allon more because to me it seems like the OP's question is more Console vs GUI programming. –  gideon Feb 7 '11 at 13:26
4  
What?!? Take a look at good old BSD and AT&T sources. Clean, simple, elegant. And I've never seen anything more obfuscated than a typical bloated MFC code. –  SK-logic Feb 7 '11 at 17:39
    
Even tough there is no single correct answer, I liked this one best. Joel's blog post was great. –  Maglob Feb 8 '11 at 9:59

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.

share|improve this answer

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.

share|improve this answer
6  
User documentation? Users of successful programs won't ever have to touch any documentation. –  user8685 Feb 7 '11 at 8:49
    
@Developer Art - this is true to a point, but when you're writing software for say, particle physics that has to be understood by people of various nationalities, the ability to say "click here for description of what we do with your data here" if easier than writing a telepathic computer that will be able to extract the users expectation from their mind. –  TZHX Feb 7 '11 at 8:54
2  
"Don't pollute the user with crap." - fairly ironic. –  Slomojo Feb 7 '11 at 9:08
1  
how so, Slomojo? –  TZHX Feb 7 '11 at 9:11
    
+1 for "casual users". –  Larry Coleman Feb 7 '11 at 14:32

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.

share|improve this answer

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. Therefor in windows you should care about users, that means make one tool for all task that user don't need to worry who to configure few programs to work together.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.