21

I am using this SDK and I came across a property "Orientation" of type int.

Why int? Is it an enum or something? Let's have a look into the online documentation...

"Gets or sets the orientation."
😣

Yeah, thanks. Very useful.
It's again that kind of documentation which simply restates the property name or method name. Who needs this?

So I tried to set the Orientation property to 1 to see what happens.

A runtime exception then told me that the only valid values are 0, 90, 180 and 270.

Well, this is kind of stupid but ok, I can live with that.
But ffs, put that info into the documentation, where it belongs!

Comments
  • 3
    It is like that working with Camera API in Android, orientation can only be an int and has only four supported values (or three don't really remember)

    But that documentation should have at least included supported values
  • 1
    That's how it's stored in the file metadata, but it should anyway be documented.

    In photo EXIF, orientation is an enum of 8 values to allow mirror images. (I did little research for this so feel free to correct me)
  • 0
    @vlatkozelka Yup, worked with it couple of times and hated my life a lot. especially v2, its a bit more complex
  • 1
    @vlatkozelka

    Thats because so many fucking companies start their implementation work BEFORE being authorized. And only when they have a 'working'* product (*for some values of 'working'), do they present it to the platform license owners, who only hand out proprietary information on how to handle something if they think your product is 'viable' and by that they mean 'a working prototype or LOTS AND LOTS OF FUCKING MONEY UP FRONT'

    Same problem developers had breaking into the console market before the advent of indie marketplaces on things like PS and XBOX.

    And at that point, the developers have to adapt their rattrap shovelware dirty fucking shitapple implementation to the existing standard they now have, because prior to that it was the company's "super duper trade secret NDA-protected rape-anyone-in-the-ass-in-court-if-they-publish-it documentation."

    And thats the story of how android was made in the early cthuluian hellscape days of blackberry and nonexistent standards.
Add Comment