Monthly Archiv: June, 2020

Site News: Blast from the Past – One Year Ago in PHP (06.25.2020)

Here's what was popular in the PHP community one year ago today:

PHP Internals News: Episode 59: Named Arguments

PHP Internals News: Episode 59: Named Arguments

In this episode of "PHP Internals News" I chat with Nikita Popov (Twitter, GitHub, Website) about his Named Parameter RFC.

The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news

Transcript

Derick Rethans 0:18

Hi, I'm Derick, and this is PHP internals news, a weekly podcast dedicated to demystifying the development of the PHP language. This is Episode 59. Today I'm talking with Nikita Popov about a few RFCs that he's produced. Hello Nikita, how are you this morning?

Nikita Popov 0:35

Hey Derick, I'm great. How are you?

Derick Rethans 0:38

Not too bad, not too bad today. I think I made a decision to stop asking you to introduce yourself because we've done this so many times now. We have quite a few things to go through today. So let's start with the bigger one, which is the named arguments RFC. We have in PHP eight already seen quite a few changes to how PHP deals with set up and things like that we have had an argument promotion in constructors, we have the mixed type, we have union types, and now named arguments, I suppose built on top of that, again, so what are named arguments?

Nikita Popov 1:07

Currently, if you're calling a function or a method you have to pass the arguments in a certain order. So in the same order in which they were declared in the function, or method declaration. And what named arguments or parameters allows you to do is to instead specify the argument names, when doing the call. Just taking the first example from the RFC, we have the array_fill function, and the array_fill function accepts three arguments. So you can call like array_fill( 0, 100, 50 ). Now, like what what does that actually mean? This function signature is not really great because you can't really tell what the meaning of this parameter is and, in which order you should be passing them. So with named parameters, the same call would be is something like: array_fill, where the start index is zero, the number is 100, and the value is 50. And that should immediately make this call, like much more understandable, because you know what the arguments mean. And this is really one of the main like motivations or benefits of having named parameters.

Derick Rethans 2:20

Of course developers that use an IDE already have this information available through an IDE. But of course named arguments will also start working for people that don't have, or don't want to use an IDE at that moment.

Nikita Popov 2:31

At least in PhpStorm, there is a feature where you can enable these argument labels for constants typically only. This would basically move this particular information into the language, but I should say that of course this is not the only advantage of having named parameters. So making code more self documenting is one aspect, but there are a couple couple more of them. I think one important one is that you can skip default values. So if you have a function that has many optional arguments, and you only want to say change the last one, then right now you actually have to pass all the arguments before the last one as well and you have to know: Well, what is the correct default value to pass there, even though you don't really care about it.

Derick Rethans 3:19

If I remember correctly, there are a few functions in PHP's standard library, where you cannot actually replicate the default value with specifying an argument value, because they have this really complex and weird kind

Truncated by Planet PHP, read more at the original (another 22256 bytes)

PHP Myers Cyclomatic Complexity Inspector

Package:
PHP Myers Cyclomatic Complexity Inspector
Summary:
Evaluate PHP code complexity using Myers extension
Groups:
Parsers, PHP 7, Utilities and Tools
Author:
DeGraciaMathieu
Description:
This package can evaluate PHP code complexity using Myers extension...

Read more at https://www.phpclasses.org/package/11694-PHP-Evaluate-PHP-code-complexity-using-Myers-extension.html#2020-06-24-22:47:17

PHP 8.0.0 Alpha 1 available for testing

The PHP team is pleased to announce the first testing release of PHP 8.0.0, Alpha 1. This starts the PHP 8.0 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.0.0 Alpha 1 please visit the download page.Please carefully test this version and report any issues found in the bug reporting system.Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be Alpha 2, planned for 9 Jul 2020.The signatures for the release can be found in the manifest or on the QA site.Thank you for helping us make PHP better.

PHP Barcode and QRCode Reader and Generator

Package:
PHP Barcode and QRCode Reader and Generator
Summary:
Generate barcodes and qrcodes for printing
Groups:
Graphics, PHP 5, Printing
Author:
Uldis Nelsons
Description:
This package can be used to generate barcodes and qrcodes for printing...

Read more at https://www.phpclasses.org/package/11692-PHP-Generate-barcodes-and-qrcodes-for-printing.html#2020-06-23-17:35:00

Educating Clients About the True Value of Your Services as a Designer

Okay, freelance designers. Stop me if you’ve heard this one: you’re working on a project for a client, and all of a sudden there’s a discrepancy with your payment. Perhaps it’s because of scope creep, or maybe the client just went over budget for some reason.

Either way, you’ve been informed that you will not be getting the full amount agreed upon in your contract, and the client is asking you to be “flexible” on the exact amount they initially agreed to. You’re already several dozen hours into the project – to back out now would cost you more than it would to simply accept the lesser amount being offered.

What do you do? Do you simply agree to take what you are offered? Do you keep this client as a repeat client in hopes that things will improve with the next project?

Why do clients think they can rack up charges with designers and attempt to weasel their way out of paying the full amount? More importantly, why do designers let them? Even more importantly, how do you, as a designer, identify trends common to this type of client behavior, so that you can avoid them completely in the future?

Culture of Service

The key to avoiding situations where you might be called upon to be “flexible” with your fees is educating your clients about the true value of your services as a designer.

If your client falls asleep in a taxi and the taxi driver drives past their house and up the street for five more miles, he’s going to charge your client for those five miles, despite the fact that he or she didn’t “mean” to fall asleep. And your client would expect to pay it, as well.

Design is a service, just like being shuttled about in a taxi cab is a service. I’m always surprised – not at the number of clients who don’t understand this, but at the number of designers who also fail to make this connection.

You aren’t creating some esoteric work of art that is completely subjective in value and which your clients should feel apprehensive about paying you for. You are providing a service that will help them improve the functionality of their brand, whether that’s through a website, an identity system, a brochure, poster, CD cover, flyer, or anything else you design.

Yes, it’s creative work, but ‘creative’ doesn’t equal ‘exempt from standard pay agreements.’ The only way clients will get this thought out of their heads is if designers get it out of their heads first.

No With the Flow

This is going to come off sounding a bit like a rant, but the frequency with which clients avoid paying designers the fees they initially agreed upon is very unsettling to me. Some people simply “go with the flow,” accepting that some clients are going to be unreasonable about things and that there’s nothing you, as a designer, can do about it.

But why is that? Why should designers simply be expected to be ‘flexible’ when it comes to payment? I’m just going to come out and say it: there’s something really wrong with the nature of this industry that people can get away with thinking this kind of thing is normal. It’s not normal; in any other industry, it would be called theft, and making a fuss about it could be construed as attempted extortion, if you mess with the wrong kind of litigious service provider. You get a service, you pay your money.

If a client is unhappy with the service you’ve provided, that’s another issue. Designers should always be willing to work with a client if something isn’t right and do their best to make the client happy. But clients trying to get out of paying altogether, or trying to sweep hours, days, weeks, months of work under the rug with some absurd plea about ‘flexibility’ is just wrong, and it has got to stop.

The only way freelance designers are ever going to earn any kind of respect for themselves in the industry at large is if they collectively start educating clients about the true value of their services.

When All Else Fails, Become a Psychic

So, after saying all this, you might be wondering whether I’m to going answer my own question. Should you, in fact, stand your ground when re-negotiating the terms of your prior agreement with a client?

It’s easy to stand back from a distance and proclaim “of course you should! It’s only right, after all.” But the reality of the situation is not always so simple. Perhaps it’s a huge client who’s causing you trouble – the biggest client of your career so far. Is it worth it to argue and possibly get yourself blacklisted by other clients in the same industry?

Ideally, you’d be armed with an iron-clad contract and a lawyer at all times, but we all know that sometimes things are less than ideal. Sometimes your client will force you to reword your contract before they agree to work with you, and you have no choice but to comply if you wish to get paid at all. And well, lawyers can get expensive.

So what do you do? I won’t pretend that I know the answer to this very old, very persistent problem. What I will say is that it’s entirely possible to drastically reduce your likelihood of finding yourself in these types of situations in the future, by positioning yourself in a more high-level position within your niche industry.

Knowing what makes your clients tick, and how best to serve the markets they serve will make you a much more highly valued service provider, which in turn will drastically reduce your chances of being taken advantage of.

There’s something very strange that happens when people are confronted with a designer who can seemingly read their minds – they show you a level of respect and trust that you would have thought they’d have shown only to their spouses, friends, or cat. It’s a very fascinating thing to watch.

Designers aren’t too keen on most clients assuming that they’re mind-readers, but if you make it part of your job to study the habits of your client base, as well as your clients’ customers, users, audience, or other markets, you can arm yourself with this near-psychic ability relatively easily.

The post Educating Clients About the True Value of Your Services as a Designer appeared first on Speckyboy Design Magazine.

Powered by Gewgley