Category: software engineering

Total 32 Posts

Tool for understanding / refining regular expressions

Regular expressions are so powerful. Their syntax can also be quire esoteric. While I consider myself fairly proficient with simple to medium complex expressions, I don’t create them often enough to keep my skills sharp. As such, when I need to figure out what a regex does or need to create one from scratch, there is usually a bit of trial and error as that hard found knowledge works it way through the cobwebs of my mind.

A co-worker pointed me to regexr.com. This site allows you to paste in a regular expression and will show you how it breaks down. Highly recommended.

Screenshot of regexr.com

Apps, Widgets and Gadgets Links from July 2012 Software Engineering Notes

The following links were published in the July 2012 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was apps, widgets and gadgets.

 

“Your Questions Answered Here” Links from September 2015 Software Engineering Notes

The following links were published in the September 2015 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was "Your Questions Answered Here".

 

MariaDB – old passwords

I have been evaluating swapping out MySQL with MariaDB. As advertised, so far it has been a pretty plug and play replacement. With one exception…

For some reason, our MySQL configuration file had the system variable old_passwords set to 1. No issues showed up when using the command line client.

However, when I tried to attach Tomcat to the database it failed. A quick web search showed that this is a well know issue and all that had to be done was upgrade the passwords.

References:
"Unable to load authentication plugin." when trying to connect to MariaDB
Upgrading passwords from old_passwords to "new passwords"

Internet Magazine Links from September 2013 Software Engineering Notes

The following links were published in the September 2013 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was internet magazines.

 

Agile Method Links from May 2013 Software Engineering Notes

The following links were published in the May 2013 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was Agile Methods.

 

Technical Debt Links from May 2012 Software Engineering Notes

The following links were published in the May 2012 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was technical debt.

 

Platform as a Service Links from March 2013 Software Engineering Notes

The following links were published in the March 2013 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was platform as a service (PaaS) links.

 

Security Links from September 2012 Software Engineering Notes

The following links were published in the September 2012 ACM SIGSOFT Software Engineering Notes in the "Surfing the Net for Software Engineering Notes" by Mark Doernhoefer. This issues topic was security links.

 

Remove byte order mark (bom)

I have been doing a lot of localization work. Part of this includes a bunch of SQL scripts encoded using UTF-8. Every now and then, I would get a syntax error on the very first line of the script. The culprit – the byte order mark. Some programs insert this string of characters into the file, others don’t.

Under Linux, it is easy enough to find out if there is a byte order mark in a file. I used the following command on the SQL files in question:


> file filename.sql
filename.sql: UTF-8 Unicode (with BOM) text, with CRLF line terminators

A file without the byte order mark gave me the following:


> file filename.sql
filename.sql: UTF-8 Unicode text, with CRLF line terminators

I wanted a simple way to remove the byte order mark. I found a newsgroup post where Benjamin A’Lee provided a little perl script to do the job. I named the script removeBOM.pl:


#!/usr/bin/perl

@file=<>;
$file[0] =~ s/^\xEF\xBB\xBF//;
print(@file);

This little script works like a champ.