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

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

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?

Xdebug with WordPress

June 24, 2015

Proper debugging and unit testing are both very high on my list of things i need to get my head around and implement into my development workflow as soon as possible. Luckily, there are people like Jonathan Christopher who wrote this great introduction on how to use Xdebug for WordPress Development.

He goes into great detail on how to install and configure Xdebug with MAMP (Pro) and use it with either a separate application or right inside an IDE.

Monday by Noon – Improving Your Process: WordPress Development Using Xdebug

JavaScript.com

June 16, 2015

JavaScript_com

Code School just launched JavaScript.com, a page dedicated to all things JS. Basically, the page is split into Resources and News, which can also be subscribed to via an Email Newsletter called FiveJS (5 Minutes of JavaScript).

First thought: Heck, i wanna to know what they paid for this domain.

Second thought while looking through the news and resources: After all these years working with the web it still amazes me how much knowledge you can get for free.

JavaScript.com