10 Tips for Javascript Debugging Like a PRO with Console

console.log isn't the only command that can help you debug JS. Yotam Kadis, Editor of AppsFlyer, shares 10 more ways.

For the past decade, one of my passions is front-end development (especially javascript). As a craftsman, I love learning new tools of the trade. In this story, I’m going to give you some awesome tips for debugging like a pro, using the good old console.

https://medium.com/appsflyer/10-tips-for-javascript-debugging-like-a-pro-with-console-7140027eb5f6

Read more

7 Practical Tips for Cheating at Design

On their mutual Medium blog, Adam Wathan & Steve Schoger published an excellent post that offers 7 actionable tips to make your stuff look better.

It’s easy to throw your hands up and say, “I’ll never be able to make this look good, I’m not an artist!” but it turns out there are a ton of tricks you can use to level up your work that don’t require a background in graphic design. Here are seven simple ideas you can use to improve your designs today.

https://medium.com/refactoring-ui/7-practical-tips-for-cheating-at-design-40c736799886

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Take the power back

iA writer is a great app to write text without any distractions (I'm not paid to say this ?). On their website the developers wrote an inspirational article that urges you to not only consume content, but also to create it.

You may have heard that the best way to deal with the “information overload” is to switch off your devices. To take a break from the Internet. Go for a run. Roll out the Yoga mat. Read a book. Talk to your friends. Switching off is good advice. But eventually, you’ll be back. How about changing? Changing from passive, to active. From scroll to search, from react to rethink, from like and retweet to write and link.

https://ia.net/topics/take-the-power-back/

Read more

Build a newsletter chatbot in PHP

On his blog Christoph Rumpel explains how you, using BotMan, can create a bot where users can subscribe to content updates.

Email has been a great channel for staying in touch with your audience for years. But times are changing and messengers are taking over communication. Let's see how I used Facebook Messenger to build a little newsletter bot for my upcoming book "Build Chatbots with PHP".

https://christoph-rumpel.com/2018/02/build-a-newsletter-chatbot-in-php-part-1

Pretty cool! I might add a bot to this very blog soon.

Read more

Beyond React 16

Today at the JSConf in Iceland, React core developer Dan Abramov demonstrated some very cool features that will soon land in React.

We’ve built a generic way to ensure that high-priority updates don’t get blocked by a low-priority update. We call this time slicing. If my device is fast enough, it feels almost like it’s synchronous; if my device is slow, the app still feels responsive. We’ve also built a generic way for components to suspend rendering while they load async data. We call this feature suspense. You can pause any state update until the data is ready, and you can add async loading to any component deep in the tree without plumbing all the props and state through your app and hoisting the logic.

https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html

Read more

Build User Interfaces by Composing CSS Utility Classes with Tailwind

Simon Vrachliotis recorded a free Egghead.io video course on the kickass Tailwind CSS framework.

In this course, you'll learn how to handle responsive breakpoints, how to trigger specific element states, how to handle specificity, how to keep your bundle file size in check, and how to seamlessly extend Tailwind with your own custom utility classes. By the end of the course, you should have a firm understanding of how Tailwind works and be able to create your own tailor-made design system and utility class CSS toolkit for your next project!

https://egghead.io/courses/build-user-interfaces-by-composing-css-utility-classes-with-tailwind

Read more

Value objects like a pro

On the Hackernoon site Nicolò Pignatelli wrote a good guide on how to write Value objects in a good way.

This is the list you must always check it against:

  • it is immutable and no setters defined;
  • it reflects the semantics of the domain;
  • it shows how information flows and is transformed during runtime;
  • it hasn’t default or useless getter methods;
  • it can be compared to other Value Objects of the - - same class by reading private properties directly

https://hackernoon.com/value-objects-like-a-pro-f1bfc1548c72

Read more

Enabling PHP method chaining with a makeshift pipe operator

Sebastiaan Luca, a freelance Laravel developer from Antwerp, coded up a couple of functions that mimic a pipe operator.

An interesting RFC proposal by Sara Golemon submitted in April 2016 suggested the use of a pipe operator to enable method chaining for any value and method. Yet as of today, it's still being discussed and there's no saying if it will ever make its way into PHP. So in the meantime, here's a solution!

https://blog.sebastiaanluca.com/enabling-php-method-chaining-with-a-makeshift-pipe-operator

Let's hope a real pipe operator will land someday in PHP.

Read more

A pair of helping hands when naming things

In a new post on his blog Sebastian De Deyne shares a few services and tools he uses to help him with naming things.

One of the hardest (and sometimes frustrating) tasks in a programmer's day-to-day workload is naming things. When I have a hard time finding that perfect word, I generally wind up in one of two situations:

  • I have a plausible name in mind, but I'm not entirely satisfied with it
  • I have no idea what I could possibly name it

Luckily, there are tools out there that can be of help.

https://sebastiandedeyne.com/posts/2018/a-pair-of-helping-hands-when-naming-things

Read more

Using Content Security Policy headers in a Laravel app original

by Freek Van der Herten – 5 minute read

By default all scripts on a webpage are allowed to send and fetch data from and to any site they want. If you think about it, that's kinda scary. Imagine that one of your JavaScript dependencies would send all keystrokes, including passwords, to a third party website. That would be pretty bad. In…

Read more

A new security header: Referrer Policy

Almost a year ago, Scott Helme, creator of securityheaders.io and report-uri.com, wrote a blogpost on a not well known http header: Referrer-Policy.

Regular readers will know how fond I am of the existing security headers so it's great to hear that we're getting another! Referrer Policy will allow a site to control the value of the referer header in links away from their pages.

https://scotthelme.co.uk/a-new-security-header-referrer-policy/

Read more

Use the same controller to serve multiple formats

twitter.com

Read more [twitter.com]

Regaining trust in your test suite with Docker

Frank de Jonge, creator and maintainer of Flysystem, recently started using Docker to test the FTP driver. On his blog he explains the why and how.

For Flysystem, an open source PHP package to deal with filesystems, I needed a way to test FTP (barf) interactions. FTP servers are notoriously bad at abiding by the spec. ... For Flysystem's FTP(d) adapter an integration test, using an actual FTP server, brought back the level of confidence it needed.

https://blog.frankdejonge.nl/regaining-trust-in-your-tests-with-docker/

Read more

Extended validation is broken

In a new article on his blog Ian Carroll shows that it's quite easy to trick users into thinking that they're connected to the right site.

Extended validation ("EV") certificates are a unique type of certificate issued by certificate authorities after more extensive validation of the entity requesting the certificate. In exchange for this more rigorous vetting, browsers show a special indicator like a green bar containing the company name, or in the case of Safari completely replace the URL with the company name. ... Today, I will demonstrate another issue with EV certificates: colliding entity names. Specifically, this site uses an EV certificate for "Stripe, Inc", that was legitimately issued by Comodo.

https://stripe.ian.sh/

Read more

Setting up Laravel Horizon with Forge and Envoyer

Dries Vints, maintainer of Laravel.io, posted a step-by-step guide on how to get started with Laravel Horizon on a Forge provisioned server.

I recently installed Horizon for Laravel.io and while it wasn’t that hard to install, I still had to figure some things out. Since this was the first time setting everything up I thought I’d write up the steps to take to get started with Horizon and set everything up with Forge and Envoyer.

https://medium.com/@driesvints/laravel-horizon-with-forge-and-envoyer-82a7e819d69f

Read more