July 23rd, 2013 by Lincoln Baxter III

Guide to Regular Expressions in Java (Part 2)

Often unknown, or heralded as confusing, regular expressions have defined the standard for powerful text manipulation and search. Without them, many of the applications we know today would not function. This two-part series explores the basics of regular expressions in Java, and provides tutorial examples in the hopes of spreading love for our pattern-matching friends. (Read part one.)
July 22nd, 2013 by Lincoln Baxter III

Guide to Regular Expressions in Java (Part 1)

Often unknown, or heralded as confusing, regular expressions (regex) have defined the standard for powerful text manipulation and search. Without them, many of the applications we know today would not function. This two-part series explores the basics of regular expressions in Java, and provides tutorial examples in the hopes of spreading love for our pattern-matching friends. (Read part two.)
July 4th, 2013 by Lincoln Baxter III

An even better visual regular expression tester

For those of you who have not seen the Visual Regex Tester yet, this video should be informative, and for those of you who have, make sure to check out the new reverse-syntax highlighting features that I’ve recently added. My goal is to make this tester as useful and fun as possible; it should be a regular stable of regular expression development.

June 14th, 2013 by Lincoln Baxter III

Drop-in migration from MySQL to Percona DB in two minutes

Percona DB is a drop-in replacement for the MySQL database, and as you’d hope for a business model based on providing out-of-box performance enhancements, the install is a complete breeze.

June 4th, 2013 by Lincoln Baxter III

Upcoming Conference Appearances for OCPsoft

I’d like to take a brief moment to let everyone know that we’re going on a Conference Tour! I’ll be presenting on [[Rewrite]] at South-east Linux Fest (FREE) in Charlotte, North Carolina at the Blake Hotel (June 7-9).

I’ll also be presenting [[Rewrite]], Errai, and JBoss Forge at JUDCon Boston 2013 (June 9-11):

So please come join me for a fun and hopefully informative few sessions!

May 28th, 2013 by Lincoln Baxter III

Announcing PrettyTime :: NLP Natural Date Processing

If you have ever used Google Calendar, Siri, Android Voice Command or other natural language tools, you might be familiar with convenient calendar features and voice calendar control. android_voice_scheduling “Schedule a dinner party for six pm, next Thursday,” and The start time for your dinner party conveniently shows up, ready for your finishing touch. But how does this work? Can we use it for our own applications?

If you’ve given this a bit of thought, you’ve probably figured out that in order to understand grammar, the nearly infinite possible combinations of words, expressions, numbers, and dialects should require a not insignificant amount of computing power, and a good deal of creativity.

May 4th, 2013 by Daniel Sachse

Migrating from PrettyFaces to Rewrite – Simplicity meets power

Hi Java web-developers. I hope you are already familiar with [[PrettyFaces]]. If not, I will give you a very short introduction taken from the project documentation:

PrettyFaces is:

“The open-source /url/#{rewriting} solution for Servlet, JSF, and Java EE, including features such as: page-load actions, seamless integration with faces navigation, dynamic view-id assignment, managed parameter parsing, and configuration-free compatibility with other web frameworks.”

[[Rewrite]], on the other hand, is a URL-rewriting framework built for extendability, for use with any web-framework or pure Servlet itself, and is used for the core of PrettyFaces “4.0” – bringing the best of both worlds… so that sounds very cool thus far, but what do we want to achieve with it? Why would we use either of these frameworks?

April 3rd, 2013 by Lincoln Baxter III

Set up an anti-spam filter for your website with mod_security and fail2ban

top apache2 cpu usage

Frequently spammers target products such as wordpress, web forum software, phpMyAdmin, and other common tools used by hobbyist and professional website administrators.

Whether you are hosting your own blog, or running a website for your company or more, it can be difficult to deal with the increasing amount of malicious web traffic seen on a daily basis, while still allowing friendly crawlers such as Google, Yahoo, and MSN search engines.

This harmful and wasteful traffic may damage your system or simply waste its resources, slowing down the site for your more welcome users. If this sounds familiar to you, but your page hits don’t seem to add up, then you may want to consider taking some of the measures outlined below in order to secure your site from harmful hacks and sluggish spam.

February 25th, 2013 by Matyas Danter

Setting up Google OAuth2 with Java

oauth_logo

For all of you who are trying to figure out how to integrate with Google’s single sign-on functionality, this article might be for you. I’ve taken the liberty of condensing all of the actual logic required to perform OAuth Google login, and provided it as a class and a JSP (seen below). In order to follow along better, I suggest cloning the example GitHub repository, and deploying to the application to your server of choice.

January 4th, 2013 by Lincoln Baxter III

JavaScript is the new Perl

perl_logo javascript_logo_unofficial

I don’t think we will see a “winner” of the browser-language wars any time soon, but there will be a winner. JavaScript hype is still through the roof, and with the discovery of a dynamic language in the browser actually works decently between late browsers, people are thoroughly excited; however, I’d akin this to people discovering Perl during the advent of C and C++. Does it work? Yes. Is it pretty? Not by a long shot.

Don’t get me wrong, I love Perl – I think it’s an incredibly powerful and fun language that now suffers from the bad reputation it acquired before gaining true object-oriented features – but, those who hate Perl hate it because it’s “too hard to maintain” and too “strange.” So if you want to talk about a strange language, look at JavaScript – it’s like Perl times ten. At least Perl has a consistent type inferencing and enforceable namespacing! (I think you’d have a hard time arguing that enforceable namespacing is a bad thing… global variable collisions can result in some pretty nasty bugs, particularly because it is easy to never see the downstream impact.)

Point being? As someone who has already gone through several language hypes and paradigm shifts in Computer Science (even in my relatively short 14 year experience,) JavaScript is a lot like Perl – extremely powerful, but a potential maintenance nightmare if one is not extremely diligent – and while I do like both languages, JavaScript just waiting for the next technology to come around and make it look like Perl does today: pervasive, but lacking enterprise adoption on large applications.