Monthly Archiv: April, 2020

PHP 7.4.5 Released

The PHP development team announces the immediate availability of PHP 7.4.5. This is a security release which also contains several bug fixes.All PHP 7.4 users are encouraged to upgrade to this version.For source downloads of PHP 7.4.5 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

PHP 7.3.17 Released

The PHP development team announces the immediate availability of PHP 7.3.17 This is a security release which also contains several bug fixes.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.17 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

PHP Covid Relief Checks Calculator

Package:
PHP Covid Relief Checks Calculator
Summary:
Calculate the amount of a check as Covid-19 relief
Groups:
Algorithms, Finances, PHP 5
Author:
Adeola Odusola
Description:
This class can be used to calculate the amount of a check as Covid-19 relief...

Read more at https://www.phpclasses.org/package/11613-PHP-Calculate-the-amount-of-a-check-as-Covid-19-relief.html#2020-04-15-13:57:30

When I Get out of Here: The Grumpy Designer’s Post-Quarantine Bucket List

Quarantine is like jail. Well, sort of. Even if being homebound isn’t quite the same as an episode of “Orange is the New Black” or “Oz”, there are definite parallels between the two predicaments. For one, nobody goes to either place happily.

This may sound a bit overdramatic – especially considering I’ve worked at home most of my adult life. But that was by choice. I chose to avoid in-person meetings. I chose a 10-second commute up the stairs each day, as opposed to sitting in traffic. See? There’s a difference.

I doubt it’s just me, though. Freelancers and remote workers around the world are stuck inside (and hopefully safer for it). Quarantine has robbed us of many things, freedom of choice among the most important.

The day the cloud of this pandemic lifts, though, watch out. Oh yes, there will be celebrations aplenty. The earth may even vibrate due to all the dancing. As for me, I have my own little list of things I’d like to do…

Work from a Coffee Shop (Just Once)

This is one of the biggest stereotypes of freelancers. We go out and have a cup of coffee, while staring intently at our laptops for hours.

It’s also something I never really cared to do. Being particular about my work environment, I can’t fathom the distraction of being in a place filled with strangers, trying to get things done. How can I concentrate on buggy code when some fool spills half and half on my shoe?

Yet, I also long for the freedom to have dairy products poured upon me (accidentally, of course). Just maybe, when things improve, I’ll head to Starbucks and pay homage to this act others assume all web designers do.

People in a coffee shop.

Introduce Myself to Someone at a Design Conference

With so many events having been cancelled or moved online, the industry is just teeming with loneliness. I’m right there with you, as I had a speaking gig snatched away due to quarantine.

And, while I do feel a sense of camaraderie at conferences, I am a bit of an introvert. As such, I generally don’t approach people and strike up conversations. If someone approaches me, however, I’ll ramble on for what seems like too long. Maybe it sounds weird, but that’s me.

Regardless, I always tell myself that I’ll be more open at these things – someday. Well, what better time than when we’re all free to go to conferences again?

I don’t think I’ll turn into the life of the party. But, just maybe, I can say “Hi” without too much trouble. However, I still may have to opt for the elbow-bump over a handshake.

Person holding a sticker that reads "Hello!".

Make the Weekend a “Work Free” Zone

One side effect of working at home during a quarantine is that you really have no excuse for not working. Even before all of this craziness came upon us, the temptation to head over to the desk during off hours was strong. Now? It’s overwhelming.

On weekends, I’ve found myself with nothing to do (or, nothing I want to do) and nowhere to go. The boredom makes it just too easy to sit down and start working. Before I know it, a few minutes turns into an hour.

The upside is that some items get knocked off of my to-do list. No complaints there. But, feeling compelled to work isn’t all that healthy. Over time, that can add up to being stressed out on what are supposed to be days off.

Eventually, there will be other things to do – even some places to go. But even if that place is just my couch, it will be nice to get away from the office for a few days. And, please pass me a beer.

A home office.

Look Back with Gratitude

During a time when so much of the world has been shut down, it would be easy to harbor some bad feelings. That would be a natural reaction, I think, as I doubt anyone is really enjoying this historic moment. It’s been tragic for so many, and draining for all.

That being said, it would be nice to find some silver linings. Coming out of this healthy, for one, would be a great start. But there are other things to be grateful for.

Personally, I’m hoping that breaking out of quarantine will result in my being more outwardly grateful. There are so many things I’ve taken for granted.

Family, my business, the ability to work from home – they are at the top of the list. This pandemic has shown that none of these things are a given. They can be taken away without a moment’s notice.

Sure, I’ll still be grumpy after all is said and done. But I can mix in a little gratitude every now and then.

The post When I Get out of Here: The Grumpy Designer’s Post-Quarantine Bucket List appeared first on Speckyboy Design Magazine.

A generic middleware pattern in Typescript

I just realized this is the third time I’m writing async middleware invoker, I thought I would share the generic pattern for the benefit of others.

I’m not sure if this is interesting enough for a NPM package, so I’ll leave it here for inspiration.

The specific middleware pattern I am implementing, is similar to Express, Koa or Curveball.

We’re working off a context, and we are running a chain of middlewares in order with this context as an argument.

We’re also passing an next function. If this next function is called, the next middleware in the list will be called. If not, the chain will be broken.

Furthermore, (unlike Express, but like Koa) middlewares can be async function or return a promise. If it is, we want to await it.

The setup

Lets start with the setup, describing the middleware:

/**
 * 'next' function, passed to a middleware
 */
type Next = () => void | Promise<void>;

/**
 * A middleware
 */
type Middleware<T> =
  (context: T, next: Next) => Promise<void> | void;

Middleware is the actual async/non-async middleware function. I made a type for Next so I don’t need to write it out more than once.

How we want to use it

This would be the ‘getting started’ section of the documentation.

The idea here is that we have an ‘app’, a set of middlewares and a context we want to operate on.

The following code would be written by the user of this framework:

/**
 * The context type of the application.
 *
 * In 'koa' this object would hold a reference to the 'request' and 'response'
 * But our context just has a single property.
 */
type MyContext = {
  a: number;
}

/**
 * Creating the application object
 */
const app = new MwDispatcher<MyContext>();

/**
 * A middleware
 */
app.use((context: MyContext, next: Next) => {

  context.a += 1;
  return next();

});

/**
 * An async middleware
 */
app.use(async (context: MyContext, next: Next) => 

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

Early release of the Advanced Web Application Architecture book

In the Epilogue of the Object Design Style Guide, I started happily outlining some of the architectural patterns I've been using for several years now. I wanted to give some kind of an overview of how the overall design of your application would improve if you apply the object-design rules in that book. I soon realized that an Epilogue was not enough to cover all the details, or to communicate the ideas in such a way that they would be applicable in everyday projects. And so a new book project began...

I started working on it exactly a year ago, in April 2019. The initial excitement kept me going for the first 100 hours or so, after which other projects came up (like the re-release of the style guide with Manning, lots of programming projects and trainings). Finally there was some time to finish the work, but then the Corona crisis kicked in.

Even though it's a strange time to be releasing a new book, I think it's ready to be read by you. I'm very happy to be using the Leanpub platform again. My experience with Manning was great, but I wanted to be completely independent again, so I could experiment with several new forms of publishing. A book alone is nice, but I wanted to offer a more elaborate learning experience this time, which is why I'm offering several things at the same time:

Get a new chapter every two weeks

Book cover

I'm releasing the book while I'm still working on it. Right now an early release is available for $15,-. It contains the preface, an overview of the contents, the introduction chapter which introduces the concept of infrastructure code, and the first chapter of the first part of the book. The first part is called "Decoupling from infrastructure". The first chapter is about designing the domain model in a decoupled way.

During the following months I'll be publishing one new chapter at least every two weeks, and every time this happens, the minimum price will go up with 2 dollars. Note that if you get your copy now, you will be entitled to all future updates.

Gain access to a new platform: "Read with the author"

Read with the author

There's a special package available on Leanpub which gives you access to the new "Read with the author" platform. If you buy that package, you can join a regularly scheduled video chat, where we go over a new chapter every two weeks. You will be able to use these sessions to deepen your understanding of the topic, and learn about related topics that didn't make it into the book. You can ask questions too, so you'll be prepared in the best possible way when you start applying the ideas from the book to your own projects.

Inspect a showcase project that illustrates the book's concepts

Showcase project

The book itself contains many architectural principles and design patterns, illustrated with code samples and diagrams. However, not all the relevant details fit on a page. And sometimes things are a bit different in a real-world project than they are in idealized code sample scenarios. In fact, the real-world project that I offer alongside the book is the "Read with the author" platform which I've just described. Its code base follows the concepts explained in the book and shows how the different objects work together to provide a working application that is not another Todo app, but a normal application, with everyday use cases we can all relate to. Reading through the code and the tests will provide you with many implementation ideas for your own projects.

Access to the showcase project is kindly supported by Gitstore.

Conclusion

I hope that all of this adds up to a nice reading experience, and that you'll have fun with the book, and any combination of related products. Get it now, while it's hot, and join other readers in their adventure!

And as always: thank you very much for your ongoing support and interest.

P.S. If you want to buy this book for your team, or for multiple teams: check out the Team and Enterprise licenses.

Community News: Latest PECL Releases (04.14.2020)

Latest PECL Releases:

  • mongodb 1.8.0beta1
    ** New Feature

    • [PHPC-1483] - MONGODB-AWS Support
    • [PHPC-1484] - Support for allowDiskUse on find operations
    • [PHPC-1494] - Add client metadata support for wrapping libraries

    ** Task

    • [PHPC-1060] - Automate Atlas connectivity tests
    • [PHPC-1401] - Add mongodb+srv URIs to Atlas Connectivity tests
    • [PHPC-1440] - Bump wire protocol version for 4.4
    • [PHPC-1442] - Remove support for PHP 5.6
    • [PHPC-1478] - Support shorter SCRAM conversation
    • [PHPC-1510] - Expand use of error labels for RetryableWrites
    • [PHPC-1525] - Deprecate oplogReplay find command option from CRUD spec

    ** Improvement

    • [PHPC-1530] - Make ExceededTimeLimit retryable writes error
    • [PHPC-1561] - Allow hinting the delete command
  • xlswriter 1.3.4.1
    - Windows full function support.
  • xhprof 2.2.0
    - Modify hash code calculation, get from zend_string
  • taint 2.1.0
    - Fixed conflicts with Xdebug
  • request 2.0.0
    First 2.0 release, updated for PHP 7.3, 7.4, 8.0, and later.

What To Do With All Those Spare Creative Ideas

We all get tons of new ideas constantly as designers. Which is awesome – don’t get me wrong – but sometimes we get way more ideas than we can actually get to in one sitting. Or even in one lifetime.

Often, designers simply jot down those excess ideas in a notebook and file them away somewhere, but that’s boring and unhelpful.

The truth is, there are far better ways to deal with your spare ideas. Here are some suggestions on what to do with them.

Give Yourself A Deadline

If you really want to finish something, force yourself to make time for it. We often have more time than we think we do, so if an idea is really burning a hole in your desk drawer or hard drive, it’s time to pull it out and make time to finish it. This may require reorganizing your to-do list, and letting go of other items that are less important.

Ultimately, it’s up to you to decide whether this project is really worth the sacrifices you’ll need to make in order to finish it.

Sometimes it is and sometimes it isn’t, but you’ll never know for sure unless you actually schedule time to analyze your priorities.

tired designer working

Combine Them With Other Ideas

If you’re anything like me, you come up with approximately a million and one ideas every single day. Over the course of several years this can add up to… well, a lot of ideas.

Often, these ideas might be compatible with one another, in ways that you might not expect. You can always combine ideas if you don’t have time to do each one. Sometimes this results in an even better idea.

Combining ideas is actually a well-known brainstorming technique, in fact, because the juxtapositions can open up new creative pathways in your brain and put you on the path to your best idea yet. Or at least something that you will actually want to finish.

Give Them To A Friend

Ideas are free; you can’t legally copyright an idea. But you can still give away some of your extra ideas that you know you’re not going to get to anytime soon to someone else who might use them in the near future. They might know exactly what to do with the idea, and will be grateful that you’ve helped them develop their creativity a bit more.

By the way, if you’re worried about having your idea ripped off or stolen, don’t be. Your friend won’t implement the idea the exact same way you would, so there’s nothing to worry about.

Also, consider this: if an idea isn’t good enough to be stolen, it’s probably not worth doing in the first place.

Drop Them

Sometimes it’s better to just admit that you’ll never use an idea and move on. Holding on to old ideas can actually hold you back creatively. You want to be fostering the development of new ideas, not hanging on to old junk that’s never going to be realized. You might be surprised to discover, after a few years have gone by and you’ve managed to drop an idea, that it wasn’t even that good of an idea in the first place.

This has happened to me many times, and I consider it a good sign. As your taste develops, you learn to detect bad ideas more easily, and you’ll no longer be stifled by those ideas you’re not completely sold on.

Logo Explorations by Eddie Lobanovskiy
Logo Explorations by Eddie Lobanovskiy

Whatever You Do, Take Action

Ideas are useless unless you act on them. Don’t forget to check your backlog of ideas often to make sure you’re not simply stockpiling them for a “rainy day.”

Whether you combine them, power through them, give them away, or drop them, always make sure you’re keeping things rotating in your creative process. Shaking things up, shuffling ideas around, arranging ideas like pieces of a jigsaw puzzle is a great way to get your creative juices flowing, even if you never end up doing anything with the idea.

The post What To Do With All Those Spare Creative Ideas appeared first on Speckyboy Design Magazine.

Powered by Gewgley