Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Re: Re: Changing owner of files: Windows vs Linux (or Why I hate Windows)

by ton (Friar)
on Apr 07, 2001 at 03:28 UTC ( #70647=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Changing owner of files: Windows vs Linux (or Why I hate Windows)
in thread Changing owner of files: Windows vs Linux (or Why I hate Windows)

As I stated at the bottom of my original post, I needed code that could access NTFS file permissions, and decided to bundle owner and group in the resulting package. Owner, group, and dacls are all stored in the Security Descriptor for a resource, so extending my DACL code to Owner and Group was a natural next step. As NTFS is a Windows specific file system, I don't need to worry about portability. I do wish I had found that program before, as it lays down the process that I ended up illustrating in my code. Oh well.

Programming isn't supposed to require 50+ lines to perform one simple operation. This is one of the matras of Perl: keep simple things simple. It's not like I'm trying to render an object in 3D; I am changing one piece of data (the owner SID) for a file.

Incedentally, complexity in programming arises because of the multiplicity of intent. A person creating a wizard has to specify (I imagine) a huge number of options before a program can take over: what size should the dialog box be, what color, should it return 'OK' when a user presses enter, etc. And that's just the UI!

Conversely, changing the owner of a file is a pretty unambiguous process. There is little room for misinterpretation, so the resulting code _should_ be simple. Face it: changing the owner of a file and implementing a graph algorithm for creating wizards are not even in the same league.

My whole point is this: unambiguous commands should be simple to write. If the API authors forget to make something easy doable in one line, that is understandable... but it certainly shouldn't take fifty lines.

That being said, I'm completely clueless as to what your beef is. Programming should be hard? If that's the case, you should code in assembly. Some tools are better for some things? Of course they are... but when we're dealing with an OS, then only one tool is available: that OS's API. Switching tools is not an option. High level tasks (implement graph algorithms for creating wizards) are tough? Well, duh. This isn't something an OS API should be dealing with anyway.

I would appreciate it if you would summerize your argument in a couple points (as I have been trying to do), so I can better understand what you are arguing...

-Ton

  • Comment on Re: Re: Re: Re: Changing owner of files: Windows vs Linux (or Why I hate Windows)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://70647]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2020-02-25 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (113 votes). Check out past polls.

    Notices?