Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Image rotation with GD: counter or clockwise?

by Discipulus (Canon)
on Feb 23, 2021 at 21:18 UTC ( [id://11128720]=note: print w/replies, xml ) Need Help??


in reply to Re: Image rotation with GD: counter or clockwise?
in thread Image rotation with GD: counter or clockwise?

Hello karlgoethebier and LanX too,

This is not the point.

defined or // is available iirc since 5.14 and ok it is old. I needed something working and I wanted to add a quick way to pass the angle. Ok it fails for the, in this case, edge case of 0 degrees but with 0 degrees no rotation is even needed so it will be stupid to pass 0 to my SSCE. Too much Short to be a SCE? :)

My program is already more than 450 lines and I still use Getopt::Long and Tk to set some options. I'm aware of // too; thanks. :)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^3: Image rotation with GD: counter or clockwise? (updated)
by LanX (Saint) on Feb 23, 2021 at 21:31 UTC
    > so it will be stupid to pass 0

    It's better not to expect software (or users) to be smart, even in a draft.°

    > to my SSCE

    why does an SSCCE even need defaults?

    > // is available iirc since 5.14

    defined or $#ARGV are older.*

    FWIW: I don't support KGB's tone here, I'm just saying playing safe is easy here.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    °) I have similar discussion regularly with my clients:

    • "Who would ever do this?"
    • "Sigh ... Wait and see!"
    Half a year later

    • "Who could have ever expected this?"
    • "Sigh ... No one! (and thanks for the salary)"
    updates

    *) BTW 5.10.0 https://perldoc.pl/perl5100delta#Defined-or-operator

Re^3: Image rotation with GD: counter or clockwise?
by Aldebaran (Curate) on Feb 24, 2021 at 06:25 UTC
    I needed something working and I wanted to add a quick way to pass the angle. Ok it fails for the, in this case, edge case of 0 degrees but with 0 degrees no rotation is even needed so it will be stupid to pass 0 to my SSCE. Too much Short to be a SCE? :)

    I had a recent thread about processing image files, and the expectation of respondents that I should have shown up with an Short, Self-Contained, Correct Example ground it to a halt. Sure, first, to insulate myself from criticism, I got a shorter, more concise version of what I was doing, but I left off that because those don't end up as images on the net, which is the proof in the pudding. The equating of image files and lists of strings works in some places and straight-up ludicrous in others. Then the SSCCE couldn't keep up with changes I was making on the fly, so it turned out to be a great irrelevance. Meanwhile, I flubbed integration and will have to re-do anything I "accomplished." I didn't even do the write-up.

    My program is already more than 450 lines

    That's not a lot between readmore tags. Don't we encourage people to show their source around here?

      How is any of this relevant to anything that has been posted in this thread? An SSCCE example was provided, these comments are regarding something unrelated to the GD issue in question. The expectation that you should be able to provide a short example that illustrates what you're having problems with is reasonable.

      "Don't we encourage people to show their source around here?"

      You have just complained about being asked to provide your source code for something you're having problems with. If providing this and example source data (regardless of data type, e.g. a URL for an example image) is something you consider not worth writing up that's more of an issue for you, perhaps you don't fully understand the reasons why SSCCEs are preferable and more likely to get the help you are looking for.

      Update: Fixed typo.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-23 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found