Microsoft GUIs (was: The end to all language wars and the great unity API to come!) (OT)

Dan Stromberg drsalists at gmail.com
Wed Jul 6 01:03:04 EDT 2011


On Tue, Jul 5, 2011 at 9:13 PM, Andrew Berg <bahamutzero8825 at gmail.com>wrote:

> On 2011.07.05 09:31 PM, Chris Angelico wrote:
> > I've said for a while that Microsoft could do far worse than to turn
> > Windows into a GUI that sits on top of a Unix-derived kernel. They
> > won't do it, though, because it would be tantamount to admitting both
> > that Unix is superior to Windows, AND that Apple got it right.
>

Supposedly when Microsoft sold Xenix to SCO, Microsoft signed a legal
document that barred them from competing in the *ix space.  I do not know if
it remains in effect now or not.


> In my experience, it's been the GUIs that are awful and the backend
> stuff that's been good in Windows.


I disagree.  The stuff endusers tend to use is polished to some extent, but
the backend is verging on hideous.  If a developer complains about the ugly
internal structure "yeah, but you say that just because you're a computer
person / geek."


> Yes, the NT kernel still has some
> long standing bugs, but MS has done well with things that matter to
> sysadmins. chkdsk, for example, has been around for ages, but I still
> don't know of anything that really beats it.


How about FreeBSD's ability to check a filesystem while it's in use?


> I've only had a small
> amount of experience with it so far, but Powershell seems to be an
> excellent tool for admin scripting since it interfaces with WMI so well.
>

I worked with PowerShell for about a year (after an acquisition by
Microsoft), before eagerly diving back to Python.  Here are some of my notes
about the problems in PowerShell:

1) If you have a script that expects an array, and you don’t declare it as
an array (type declarations are generally optional in PS), things will work
fine until you get an array of length 1.  Then your code breaks.
1.5) If you have a function that returns an array, you must return it with
,@{$a} to make it always be an array in the caller - it's ostensibly novice
friendly, but it seems both novice and sophisticate hostile.
2) Options can be abbreviated, which may cause problems for what-was-working
code on PowerShell upgrades, when something that was unique becomes
ambiguous due to the addition of a new option having a common prefix with
another option.
3) You can throw a string exception in PowerShell; this is disallowed in C#
because it’s considered a poor practice.  They’re deprecated in Python 2.x
too - not sure if they were removed in Python 3.
4) Empty strings and nulls are kind of conflated, which is perhaps simpler
in a way in native powershell stuff, but when you call something like a COM
method that expects the two to be different, you run into problems that
appear to require C# to get around.
5) If you try to invoke an external command having an option with double
quotes and blanks in it, the single option will be converted into n+1
options, where n is the number of blanks inside double quotes.  Granted,
this is probably a problem that PowerShell inherited from one of its
dependencies
6) no generators.  C#, a supposedly lower-level language, has generators,
but generators are a really nice high-level construct
7) Not a big deal, but what's up with the not operator?  You Always seem to
have to parenthesize, whether using ! or -not
8) If you pass an array of arrays, for EG 2x10, from one host to another
using invoke-command, you actually end up with a single 20 element array
9) If you foreach ($foo in $bar), and $bar is empty, you still enter the
script block once for $null
10) Sometimes you need comma separated parameters in parens.  Sometimes you
can't have them.  When you can't have them and you're passing to a function
that accepts multiple arguments, you end up with the 1st having an array of
your arguments, and the 2..nth having $null.  That's pretty far from the
principle of least surprise
11) To pipe a 2-d array, you need to first convert it to a 3-d array, where
the outermost array-ing is a single element - using the comma operator out
front.  Then send it into the pipeline as a 2-d array
12) DarkYellow is white and DarkMagenta is dark bluish.  "It’s a feature.
The default colours used by PowerShell are not in the standard console
palette. To get the desired colours, we redefine DarkYellow and DarkMagenta
and use them instead."
13) “continue” is not really supported for a Foreach-Object loop, but at
least return does what you'd expect continue to do
14) “break” doesn’t do what it looks like it does in a foreach-object.  It’s
ending the script like “continue”.
15) Sometimes foreach is foreach.  Sometimes it's foreach-object.
16) break inside a foreach inside a pipeline breaks the whole pipeline



> When it comes to things that interface with your average idiot, however,
> MS consistently drops the ball. The new interface design they've imposed
> on their office suite and Explorer is not only just plain bad, but it's
> infectious (and it's the reason the Firefox and Thunderbird default GUI
> configurations look horrendous).


Hmmmm.  Wonder why that is?


> Another area MS fails it is sensible
> defaults. They put tons of effort into increasing security in the
> kernel, but don't use the security features (I'll try to come up with
> more detail on this later).


The newer security features in Windows are extremely baroque.  Communication
about them is lacking, even inside the company.

I literally think it's more secure to use traditional *ix permissions
despite the obvious effort Microsoft has put in on security - *ix
permissions aren't as comprehensive, but they're also a simple model that
works better.

Sometime when you're in a puckish mood, ask a Microsoft expert how many
different kinds of "delegation" Windows has, and what they're each good
for.  It's kind of like asking a *ix expert how many IOCTL's there are, and
what they are each for.

(Linux has moved away from IOCTL quite a bit because there were far too many
in *ix historically).


> Explorer /still/ hides known extensions by
> default, which /still/ makes it easier for bad people to get their
> victims to execute malware. What I think is that MS should focus on the
> kernel and encourage others to do their GUIs.<http://mail.python.org/mailman/listinfo/python-list>


Oh my.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110705/6b1ac147/attachment.html>


More information about the Python-list mailing list