Let us chat about nothing.

Now over here, if you’ll follow me, we have something rather special.

Read this first

Learn Regex the Easy Way, Part 3: Character Classes

Learn Regex the Easy Way, Part 3: Character Classes

Quick Recap

In Part 2, we learned about anchors and boundaries. The caret ^ matches the start of a line, $ matches the end, and \b matches word edges. They match positions, not characters. Now let’s match actual characters, but with more control than just typing them out literally.

Square Brackets Create a Character Class

A character class is a set of characters inside square brackets: [abc]. It matches any ONE character from that set. Not all of them. Not some of them. Exactly one character from the options inside the brackets.

[abc]    Match a single character: a, b, or c

MATCH THESE

  • a
  • b
  • c

DO NOT MATCH THESE

  • d
  • e
  • ab
  • abc

Notice that [abc] does NOT match “ab” or “abc.” It matches exactly one character. If your text contains “ab,” the regex will match just the “a” (the first character from the set it finds).

Ranges

You...

Continue reading →


Learn Regex the Easy Way, Part 2: Anchors and Boundaries

Learn Regex the Easy Way, Part 2: Anchors and Boundaries

Quick Recap

In Part 1, we talked about what regular expressions are, why they look intimidating (they really do look like a cat sat on your keyboard), and why verbose mode with comments is the way to learn them. We also set up regex101.com in PCRE2 mode. Now let’s write some actual regex.

Anchors Match Positions, Not Characters

Here’s the first counterintuitive thing about regex: not everything matches a character. Some symbols match a position in the text. These are called anchors.

Think of it this way. When you type the letter a in a regex, the engine finds the letter “a” in your text and consumes it. The match moves forward one character. Anchors don’t do that. They check “am I at a certain position?” and if yes, the match continues, but the engine doesn’t move forward. Nothing is consumed. No character is matched. Just a...

Continue reading →


Make Regular Expressions the Easy Way

Introduction and The Problem

Regular Expressions have been around for a long time and can solve problems nothing else really seems to be able to. There are a lot of great examples of where to use them, and where to not use them. Every once in a while, a new product (or version of a product) comes out which includes regex support. Some people get excited about being able to use regular expressions. They tell other people about it.

Then they realize most people seem to think Regular Expresions, or regex for short, are the hardest problem in coding.

There are a group of people who get nervous about regex, or really just do not want to work with any regular expressions. I do not blame them; it looks weird.

However, if I can become proficient at regex, so can you. The following is a set of regular expressions I created, some in part due to what I am recommending in this post.

My ...

Continue reading →


Growl in Retirement

Growl is being retired after surviving for 17 years. With the announcement of Apple’s new hardware platform, a general shift of developers to Apple’s notification system, and a lack of obvious ways to improve Growl beyond what it is and has been, we’re announcing the retirement of Growl as of today.

It’s been a long time coming. Growl is the project I worked on for the longest period of my open source career. However at WWDC in 2012 everyone on the team saw the writing on the wall. This was my only WWDC. This is the WWDC where Notification Center was announced. Ironically Growl was called Global Notifications Center, before I renamed it to Growl because I thought the name was too geeky. There’s even a sourceforge project for Global Notifications Center still out there if you want to go find it.

We’ve had a lot of support over the years; from our hosting providers at Network Redux...

Continue reading →


The responsibility of ad networks

Ad networks are serving up malware. This is a practice known as malvertising. This scenario is becoming more and more common as an infection vector utilizing different exploit kits.

Imagine this. You browse a website. Then you get an infection. The website is one which is well known, in the top 500 websites on the internet, and has been around for years. This website provides you with daily news and traffic reports, weather, you name it. You get an infection from a source you trust and you do not even know it.

Antivirus is ineffective. You now have to deal with it on your own. You may even have to pay a ransom in some cases unless you back up your files.

THIS IS INSANE

You should not have to worry about using the internet on legitimate websites. Advertising networks and those who serve ads on their websites complain about adblocking, however when the only way to prevent an infection...

Continue reading →


SSL, TLS, PCI and your app

TLS superseded SSL a very long time ago. However SSL never really went away since it was still considered to be safe. That changed last year and this year. It is no longer safe to use and needs to be removed, else face the consequences. Going one step further, TLS 1.0 is also a bad idea. Utilizing TLS 1.2 is really the best option.

If you are writing an application and utilizing encryption from the operating system, then that should most likely take care of what needs to be done in the application itself. You will likely have to configure the host or web server, but that is outside of your app.

However, if you are writing an application and specifically bundling SSL and/or TLS, the time has come to think about and change what you are doing. The ramifications here are that if you sell your product to a customer who processes credit cards and they get dinged, your application will...

Continue reading →


Family Sharing is here, you must enable it developer. Or you are a jerk.

One thing that i do not see a lot of people talking about this week is the new Family Sharing that was introduced at WWDC. At first it seems like a neat way to just share some pictures and photos, locations and some content. However it is critical that you, the developer, pay attention to this.

YOU MUST ENABLE FAMILY SHARING

I cannot stress this enough. It’s an optional thing that you have to actually enable in itunesconnect, but in reality if you do not enable family sharing then you sir or madam are a grade a, section 7, 9th level of hell jerkface. Or at least that’s how you will appear to your customers. The reason is simple, this makes it easier to share content with your family. If you hate families do not enable this option.

i.e. you’re going to enable this. Go do it now, I’ll wait. When you get back I’ll explain my reasoning here.

Apple built this with the idea of making life...

Continue reading →


Let out your collective yawn

If you found the iPhone 5c/s presentation by Apple boring today, you’re not alone. A lot of people were expecting exactly what they presented and more. Nothing else showed up. You’ll see a lot of people talk about a lack of innovation for a while, and how Apple is dying without Jobs. Things like that don’t help anyone. Let’s talk about why people found today boring:

  1. They already knew about all of the things coming out. There were no surprises at all. Those who have been around apple product announcements for more than 10 years expect some kind of surprise. Rumor mills killed this more than anything else.

  2. These were all iterative changes. Nothing new, just additions to the existing. Think of this as a clay model you’re slowly removing bit from in order to make the end product come alive. Except you’re doing it in front of thousands of very critical people.

My opinion is that Apple is...

Continue reading →


Tools should be simple

If you look at some software preferences and there is an advanced tab, sit and think about that for a minute. Think about the fact that most people will never see those preferences. Also, think about the fact that the advanced tab is a sign of failure.

It’s a failure to make a decision to cut something. To redesign it to work automatically in some fashion. A failure to figure out where a preference would fit in within the application in general. Too many options lead to confusing people. However, advanced preferences just scare people. The point of whatever you are working on is not to scare people off. Avoid the advanced feature creep at all costs.

When I worked on Adium I used to tell a few of the guys working on it that if the option was in the menu or was in advanced, it was just hidden. That was true 5 years ago, that’s true today. People just do not go into these things unless...

Continue reading →


The Real Reason Google Killed Reader

In a post Google Reader world, the knee jerk reaction is to sit and list out the reasons to be angry at Google. There’s the fact the service is gone, the fact you can’t get your data easily from them, and a myriad of other things.

Another knee jerk reaction is to try to make a rival product for a now dead system. If this is you, you would spend between 3 and infinity months writing software for a somewhat crowded market, filled with parsing, interface and user problems. It’s sort of an interesting thing to work on, there’s a ton of room for innovation and improvement, but you’d still be working on an end user product and would have to deal with the whims of that user base.

A better thing to think about is why they dropped out of the Feed Reading market. I’ve come to the conclusion that the surface problem for most people is likely that they think too hard to get any benefit out of RSS...

Continue reading →