THE PENDING DRAFT

Reasons to switch to HTTPS

July 11, 2015

A collection of 10 reasons why a switch to HTTPS is a good idea, for any page.

Today, however, there are more reasons than ever to switch to HTTPS — even for a news site, corporate site, or any site that doesn’t consider itself at the top of the security food chain. HTTPS adoption grew 80% last year alone, much faster than previous years, but we’re still very far from encryption being the norm.

If you’re not convinced HTTPS is right for you, or need ammo to convince your peers and bosses, here are 10 good reasons to go HTTPS.

Up until now, i was a bit hesitant to flip the switch on my own and also on client pages, mostly because i have no idea where to start and the certificates aren’t cheap. But i’m looking forward to the possibilities with upcoming free initiatives like Let’s Encrypt, which should be available by September 2015.

10 Reasons To Use HTTPS

Gabor Lenard on what he learned during two weeks of painfully slow internet

July 10, 2015

When we went to Hungary during the Christmas period last year I bought a 1GB data plan on a prepaid card. However, soon after I went online with my laptop the entire data allowance was used up. Strangely, I wasn’t able to add another data package. Instead, T-Mobile limited my internet access to 32kbps till the end of the month.

Since there was no easy way to fix it and I had nothing critical to do I decided to embrace the situation as an opportunity to understand how it feels to be on a slow network most of the time. I had already started reading the book Responsible Responsive Design at that time anyway so I was curious.

To be on a slow connection for a longer period of time can really be an eye opening thing if you work on the web. As Gabor mentions in his post it’s not only that pages load slowly, but some just won’t load at all.

I experienced the exact same thing in the last weeks when we were on vacation in Spain after WordCamp Europe. I had a 200 MB mobile data package, and at our AirBnB apartment we had a very slow WiFi. So i had to choose between a moody and sluggish WiFi or the tiny bit faster but crazy expensive mobile connection.

It was frustrating, to say the least. But if you work on the web, you should force yourself into this situation while developing. Gabor recommends to turn on device mode in Chrome and simulate a slow connection right from the beginning, because as he puts it:

I need to feel the pain as soon as possible so that I immediately notice the changes that are bad for performance.

This should be an exercise we should do on a regular basis and – even better – we should integrate them into our project workflows. Imagine if everyone involved, from your client, project manager, boss to the content creators would have experienced a few weeks of bad connection first hand.

I’m sure performance wouldn’t be an afterthought anymore.

Three takeaways for web developers after two weeks of painfully slow internet

Improving Code Quality

July 9, 2015

If you’re building things with WordPress, it’s important to deliver quality code. Especially if it’s going to be released to the public or used by a client. There’s a good post on the WPMUDEV Blog covering many aspects from HTML/CSS, JavaScript or PHP to the WordPress Coding Standards or Accessibility.

It’s a great starting point if you are unsure how to improve your code but also a good reminder for experienced developers.

Stop Cowboy Coding: 10 Tips for Improving the Quality of Your WordPress Themes and Plugins

Cloud Source Repositories by Google

July 8, 2015

Fully-featured private Git repositories hosted on Google Cloud Platform. Browse, edit and commit repository files in our integrated source editor. Activate the Cloud Debugger to debug hosted applications during runtime.

Google quietly launched a GitHub competitor. Could be an interesting option, if you need hosting for private repositories and don’t want or can’t pay for a GitHub Account.

Google Cloud Source Repositories

Human Curation for Apps?

July 8, 2015

The App Store has long recommended apps in the Featured tab, but Apple Music doesn’t just bring curation, it brings personalities. Beats 1 isn’t just curated, it’s curated by DJs who are front and center: Ebro Darden, Julie Adenuga, and Zane Lowe. What would the equivalent of Beats 1 be for apps? Something like a year-round, non-stop Apple Design Awards.

Human Curation for Apps? Hell yeah! I love this idea.

Human Curation and the App Store

W3C Mobile Checker

June 28, 2015

The Mobile Checker is a tool for Web developers who want to make their Web page or Web app work better on mobile devices.

The W3C released a tool to check your mobile websites. Pretty sweet.

W3C Mobile Checker

WordPress Plugin – Airplane Mode

June 27, 2015

WordPress makes a whole bunch of connections when you are using the Dashboard. For example to fetch external files like fonts or to display the latest news and so forth. While this is convenient in most situations, it can completely slow you down or lead to error messages when you are on a slow/unstable connection or don’t have a connection at all, as we had this week. The solution to this is called Airplane Mode, a WordPress Plugin by Andrew Norcross which disables all external calls from WordPress.

Control loading of external files when developing locally. WP loads certain external files (fonts, Gravatar, etc.) and makes external HTTP calls. This isn’t usually an issue, unless you’re working in an evironment without a web connection. This plugin removes/unhooks those actions to reduce load time and avoid errors due to missing files.

GitHub – Airplane Mode

Sanitize Text Field with Multiple Lines in WordPress

June 26, 2015

I recently ran into a problem where we had a text field in a metabox, that was meant to be able to hold multiple paragraphs of text, but still be properly sanitized.

The text sanitization (sanitize_text_field) removes all tags, including line-breaks, so i had to find a workaround. This is the best solution i found:

$pdr_multiline_text = implode( "\n", array_map( 'sanitize_text_field', explode( "\n", $_POST['pdr_text_field'] ) ) );

Basically, what it does is breaking up the given string into smaller chunks on line-breaks (Implode on "\n"), then sanitize those smaller strings using sanizite_text_field() and then put them back together (explode on "\n").

Stackoverflow – How to sanitize multi-line text from a textarea without losing line breaks?