Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure if these are a case of over-engineering or not enough abstraction. The windows api is a prime example of this.</p> <p>Once upon a time I spent a good deal of time writing a print and preview engine. I had to decode the windows api calls needed to display things on the screen and output to a printer. In creating the api abstraction i tried to think in terms of what the developer is trying to accomplish ... for example: "I want to draw a 1point wide, red line from coordinates (1, 1) to (8, 1) - expressed in inches."</p> <p>the equivalent windows api for this involves many, many irritating lines of code ... create a brush, select it into a device context, set the starting point, handle conversions from inches to pixels, draw to an end-point, etc. my abstracted api is a single call: dpLine(documentHandle, x1, y1, x2, y2, width, color); // where x1, x2, y1, y2 are expressed in inches</p> <p>In this case, I think the windows gdi api is just too low level. I'm sure there's good reasons for the things they've done and just didn't have time/energy to make a proper interface for programmers that are likely to use it. The reason for the monstrosity is probably just time deadlines. The api is technically accurate; it allows a programmer to do what they need. That is good enough to ship it. But, it is so low level that 3rd party abstractions are necessary to make it usable. IMO, you can make an argument for an OS to provide a low-level, complicated api like this, but a 3rd party tool shouldn't be that complicated.</p> <p>-Don</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload