Re: Are things getting difficult?



"Robert Billing" <unclebob@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:fvs560$hjn$1$8302bc10@xxxxxxxxxxxxxxxxxxx
Is it just me, or is programming getting more difficult?


I think you're being rhetorical but ...

I've just been catching up with "new" python stuff, things like properties,
descriptors, decorators, meta-classes, generator expressions, co-routines
and so on, so in my opinion yes programming is getting more difficult (or
moving too far away from the way I was taught Fortran - my first ever
lecture at University - I remember laughing at the lecturer's constant use
of "do loop" which sounded funny to me and the others around me).

I'm trying to write a little application (it'll probably be implemented
as a perl script) that catalogues files on memory cards. I'd like it to
be able to detect when a card is plugged in, scan it quickly to see if
any files have been added since we last saw that card, then do something
with the new files.

To do this I need to know when the cards are plugged in.

There used to be something called hotplug that got notifications from
the kernel. However dbus seems to be the flavour of the month, so I
started reading up on dbus.

Oh dear. All I want to do is find out about hotplug events.

I'm faced with a lot of documentation that waffles on endlessly about
objects and methods, but nothing that answers the real question, "How do
I get events when someone puts a card in a reader?" OK, I'll probably be
able to puzzle it out in a couple of days, but whatever happened to
making things simple and having the documentation useful?


I sometimes think that the developers write documentation without thinking
of the different classes of end users, but not all; there are some very good
examples out there.

It's not just dbus. I was trying to set up a network printer a couple of
days ago. Now CUPS demands a thing called a printer uri, which seems to
be:

ipp://(hostname)/printers/(name of printer)

That's simple enough, but why the seven bells doesn't the documentation
say so? Instead it talks about resources, but nowhere defines what a
resource is, or what the syntax is for describing one. The word "resource"
isn't in the glossary.


http://en.wikipedia.org/wiki/Uniform_Resource_Identifier, personally I tnink
a resource is anything a URI can point to but I guess your point is what is
a resource in the context of CUPS?

I'm beginning to wonder if the new "everything is an object" philosophy
isn't making programming needlessly obscure. The dbus documentation says
"If you use this low-level API directly, you're signing up for some
pain." To me that's an admission that the API is badly designed. A
well-designed API might well be complex, but it shouldn't be difficult to
use.


OO by its nature will tend to abstract things, that's its power; that way
the low level details can change without messing up the higher level API,
however a well designed API should lead you to doing relatively simple tasks
easily but not having looked into dbus in any depth I can't really comment.

The standard C runtime library can do a lot, and after more than 20 years
I still find bits that I didn't know about. Yet it's not painful to learn
or use. So why can't modern interfaces be as simple as open() select() and
read()?

Or is it just that I'm getting old?

I'm getting old too, it seems to get harder and harder to absorb these new
programming "paradigms".

--
Geoff


.



Relevant Pages

  • Re: Tired of 100s of stupid Getter/Setter methods
    ... seeing as you're now scratching for even more marginal cases to ... >>reading the documentation that the library developer wrote. ... > ability to become familiar with an API. ... >>been ignoring real bugs in favor of some syntactic sugar. ...
    (comp.lang.java.programmer)
  • Re: With a Little Help from my Friends
    ... On my Win98SE (ATI All-In-Wonder vid card), all four circles look the same. ... > StretchBlt API is not working as expected (although it works fine on my ... > WinXP machine it produces four different images but on ...
    (comp.lang.basic.visual.misc)
  • Re: Bluetooth application development
    ... It's a VERY complex API, maybe the most-complex that I've seen for Windows. ... Why MSDN is not providing enough documentation to develop application from ... I don't see any way to truely automate pairing; ... Here also i have to start the pairing process then Headset profile ...
    (microsoft.public.windowsce.app.development)
  • Re: [PATCH] Replace completions with semaphores
    ... The kcounter API I'm working on has something in common with this. ... Completions and semaphores have usage patterns where the resource is ... keeping N spindles busy ...
    (Linux-Kernel)
  • Re: Intel 6300ESB SATA and TIMEOUT - WRITE_DMA
    ... and sponsoring time to work on it is *the* way to get ATA ... I dont know the stand of the community on which SATA controller to focus developement on. ... there is no way around a 3ware card. ... I've been helping with the saa7135 but I have the same issue with chipset documentation... ...
    (freebsd-hackers)