User Friendly Age Function for MySQL

June 9th, 2009

Just a quick and dirty stored function for MySQL that takes two DATETIME arguments and produces a readable difference in hours, days, weeks, months or years. Hope it’s useful.


DELIMITER //

CREATE FUNCTION TimeDiffUnits (old DATETIME, new DATETIME) RETURNS CHAR(50) DETERMINISTIC NO SQL
BEGIN
DECLARE diff INTEGER;

SET diff = UNIX_TIMESTAMP(new) - UNIX_TIMESTAMP(old);

CASE
	WHEN (diff < 3600) THEN
		RETURN CONCAT(FLOOR(diff / 60) , ' Minutes');
	WHEN (diff < 86400) THEN
		RETURN CONCAT(FLOOR(diff / 3600), ' Hours');
	WHEN (diff < 604800) THEN
		RETURN CONCAT(FLOOR(diff / 86400), ' Days');
	WHEN (diff < 2592000) THEN
		RETURN CONCAT(FLOOR(diff / 604800), ' Weeks');
	WHEN (diff < 31536000) THEN
		RETURN CONCAT(FLOOR(diff / 2592000), ' Months');
	ELSE
		RETURN CONCAT(FLOOR(diff / 31536000), ' Years');
END CASE;
END //

DELIMITER ;

Presentation Materials Online

April 25th, 2009

Special thanks to all those who came out for the MySQL Workbench Tutorial and Workshop sessions, I hope they were of use to you.

The materials are now online. A PDF of the slides is available here and a video of the slides and speaker is available here. These materials are also listed on my Presentations page.

Please note that the video is RTSP streaming MP4, allowing you to jump around the video at will. You’ll need Quicktime, VLC or another appropriate player to view it. I’m trying something new with the built in camera on my laptop, providing a video image of the speaker along with the slides. Let me know what you think.

Bring a Laptop to the MySQL Conference

April 18th, 2009

Whether you come to Monday’s Tutorial or the Workbench Workshops on Tuesday-Thursday I strongly recommend you bring a laptop. We’ll be doing a lot of hands-on in both and you’ll be missing out on a lot of the content if you don’t have a copy of MySQL Workbench in front of you (we’ll supply the copy of Workbench, in fact you get the SE edition free for a year just for attending).

You should also act now to register for a Workshop if you haven’t already as Tuesday is already “sold out”. Admission is free but we only have 40 seats in each daily workshop.

For those choosing between tutorial and workshop, I’ll say upfront that we’ll feature the same content in both the tutorial and workshops. The main difference will be in the amount of time available for demonstrations and hands-on practice. Where the tutorial will give the audience a lot of time for trying things themselves, the workshops will be more limited in the hands-on portion of the session.

I’m looking forward to seeing you there, register now!

Speaking at the 2009 MySQL Conference After All

April 14th, 2009

In an unexpected turn of events I am speaking at the 2009 MySQL Conference after all, filling in as a presenter for a Monday tutorial called Introduction to Data Modeling with MySQL Workbench.

In addition to the Monday workshop, we’ll be delivering a shortened tutorial version each day of the conference. Attendees get a complimentary one year subscription to the SE version of MySQL Workbench. You can register at http://dev.mysql.com/workbench/?page_id=206. Spaces are limited to 40 for each session, as of now space is available but you’ll want to register sooner than later.

What will be be covering? So far the lesson plan is shaping up as follows:

Introduction

- Who Are We?

- Who Are You?

- What is the Session About?
- What Will be Covered
- What Will *not* be Covered

Starting Your Schema Design

- Forget Functionality
- Define Your Entities
- Define Relationships

Introducing MySQL Workbench

- History of MySQL Workbench
- Overview of Workbench Usage

Building a Schema with MySQL Workbench

- Lay out our entities
- Define our fields
- Create relationships
- Defining Keys

Normalizing Our Schema

- 1NF
- 2NF
- 3NF
- Additional Normalization References

De-Normalization

- When to Do It
- Alternatives To It
- How To Do It

Moving Workbench Schemas to Production

Maintaining Design With Workbench

- Don’t design, deploy and forget
- Synchronize Schemas

Using Workbench Advanced Features

Using Workbench Advanced Features

The Future of MySQL Workbench

Conclusion

As with most of my presentations this one will target the beginners, in this case both those new to schema design and those new to MySQL Workbench.

Now for the fun part, developing a three hour session on very short notice. Hope to see you there and at the MySQL Conference!

A Session I Will Miss This Year

February 19th, 2009

I don’t think I’ll be attending the MySQL Conference & Expo this year (I didn’t manage to get a session accepted), but I just learned from Twitter that Don MacAskill is delivering a keynote I would have liked to attend.

He’s planning to talk on MySQL and SSD-based storage. SmugMug is using Sun’s new 7000 series storage servers to great success and I am interested in seeing the benefits that from from SSD storage from someone who knows.

I’ll just have to bribe Sheeri Cabral to make sure she records and vidcasts the session.

We’re Hiring Again

February 3rd, 2009

I’ve said before that Message Systems is the best place I’ve worked so far, and we’re looking for more people to join the team.

We’re looking for the following roles:

If you think you’re a fit for any of these drop me a line, mike at thisdomain and I’ll make sure you’re on the inside track.

Legacy of Blood - Cinematic Titanic Review

October 11th, 2008

Legacy of Blood is the fourth offering by Cinematic Titanic. For those not in the know, Cinematic Titanic is the new project by five cast members from Mystery Science 3000: Joel Hodgson, Trace Beaulieu, Frank Conniff, J. Elvis Weinstein and Mary Jo Pehl.

Cinematic Titanic follows the same concept as the original series, with the performers appearing in shadow against the film (this time at the sides instead of the bottom) and riffing the typically abysmal B-Movie nonstop. Legacy of Blood continues the tradition of horrible films with a truly dreadful offering that, while excruciatingly dreadful on its own, provides wonderful fodder for the performers. The general premise follows a family of siblings that hate each other, forced to spend a week in the recently deceased father’s mansion in order to claim their inheritance. Naturally this doesn’t lead to reconciliation and reminiscence but instead to a series of somewhat brutal murders as the siblings are eliminated one by one.

In this offering the performers are showing how well they have settled into things, the riffs are excellent with several laugh out loud moments, the freeze-frame ‘host segment’ is the best one yet, and the pre-show segment is great for poking fun at itself and previous pre-show segments.

All in all I’d have to say that each episode of Cinematic Titanic has been better that the previous (though they started out well) and this is no exception. At this rate I can’t wait for their next offering.

Get it here!

Looking for new Coworkers

September 15th, 2008

It’s been over two years since I left MySQL to work for Message Systems and I’ve really been happy with things here. I work with a great team on interesting work for a good company who treats us well. Not much more you could ask for.

Except for more coworkers. We’re in need of a few new additions to the 2009 team:

We need engineers and tech trainers, scroll down for the details. If you’re interested send an email to mike@thisdomain!

Technical Trainer / Curriculum Developer

This position designs, develops and delivers online and in-person instructor led trainings on the Message Systems products and services for a variety of audiences including customers, partners and internal staff.
You will design courses and instructional material for everything ranging from short informational quick-
starts to multi-day workshops.
The audience for these training programs will primarily be mid-senior level Unix administrators, messaging anti-abuse operations staff, systems architects and other technical staff engaged in designing and maintaining corporate and carrier messaging infrastructure.
This is a full-time position based in Columbia, MD.

Responsibilities

  • Prepare and deliver Message Systems educational materials including on-site instructor-lead training, off-site instructor-led training, hands-on (lab-based) trainings, and web based instructional programs.
  • Work with staff technical writers, solutions architects, and engineering staff to craft self-lead instructional materials for customers and staff.
  • Work with product managers, solutions architects, engineering, partners and customers to build optimal training programs to suit all needs.
  • Provide input and guidance regarding time estimates and effectiveness for planning and deploying
    training solutions.
  • Travel to customer facilities to deliver training courses. Some international travel will be required.
  • Develop methods and metrics to measure the success of the training programs.
  • Make recommendations to management about improving success of programs over time.

Skills Required

  • Good knowledge of UNIX/Linux environments (power user/administrator)
  • Experience developing technical curricula
  • Experience instructing technical audiences of technical topics
  • Self-sufficient in terms of producing instructional materials
  • Extremely strong verbal, written and listening skills
  • Excellent customer service attitude
  • Good team player
  • Solid organizational and time-management skills
  • Willingness to travel to deliver training (up to 25% of the time)
  • Self-starter, able to work independently and seek out assistance when blocked
  • Experience with server-side messaging technologies a plus

Senior Software Engineer - Messaging Infrastructure

The Message Systems engineering team is looking for a highly motivated senior-level
Software Engineer to help us extend the most advanced messaging infrastructure
platform on the market. You will enjoy in-depth exposure to all aspects of building
scalable applications as part of a small, internationally-renowned team that helps
our customers — service providers and hot startups alike — achieve their cutting-edge
messaging goals.
Message Systems is a global leader in messaging, with a global customer base
including tier-1 telecommunications carriers, email service providers and online
enterprises. Our technologies help transit billions of messages per day for customers
worldwide, while offering unmatched flexibility and architectural clarity. The company
combines the best aspects of Open Source, startup, and established company in our
business goals and corporate culture.
Message Systems believes in a fun but focused development environment. We have
flexible hours, outstanding benefits, and a world-class team. Our engineering group
works in an open plan and uses the Scrum development methodology with a focus on
collaboration, automation, and testing.

Requirements

This position involves leading new feature development in our messaging server
product line. Qualified candidates should have current experience developing robust,
high volume server software. Candidates should have strong Perl and C programming
skills, at least 5 years of professional programming experience, and have experience in
and a good understanding of:

  • Software design
  • UNIX (Linux, Solaris or FreeBSD) server development in C
  • Excellent understanding of Perl
  • Writing multithreaded applications
  • Writing TCP/IP and UDP networking code
  • Experience writing TCP-based layer 4 protocols
  • Writing unit and regression tests
  • Experience with gdb and other command line debuggers
  • Familiarity with memory debugging tools and techniques (e.g. valgrind, lint, dmalloc, libumem, etc.)
  • Good grasp of multi-platform portability concerns
  • Familiarity with autoconf and make
  • Experience with one or more messaging technologies/protocols a huge plus
  • Familiarity with event based systems
  • Candidate should have, as a minimum, a Bachelors degree in Computer Science (or related field) from an accredited college or university.

Responsibilities

  • Feature Design and Development - Work with the product team to define feature specifications, author technical designs and take a leading role in their implementation to production quality, complete with positive and negative test cases.
  • Testing - Testing is a primary focus of our development process, and every engineer is responsible for augmenting our automated test suite to guarantee test coverage on new and existing features.
  • Documentation - Ensuring documentation, code maintainability and product feature coherency.
  • This position is full-time in Columbia, MD. We’re only considering candidates with existing US work eligibility.

Software Engineer - Messaging Infrastructure

The Message Systems engineering team is looking for a highly motivated mid-level
Software Engineer to help us extend the most advanced messaging infrastructure
platform on the market. You will enjoy in-depth exposure to all aspects of building
scalable applications as part of a small, internationally-renowned team that helps
our customers — service providers and hot startups alike — achieve their cutting-edge
messaging goals.
Message Systems is a global leader in messaging, with a global customer base
including tier-1 telecommunications carriers, email service providers and online
enterprises. Our technologies help transit billions of messages per day for customers
worldwide, while offering unmatched flexibility and architectural clarity. The company
combines the best aspects of Open Source, startup, and established company in our
business goals and corporate culture.
Message Systems believes in a fun but focused development environment. We have
flexible hours, outstanding benefits, and a world-class team. Our engineering group
works in an open plan and uses the Scrum development methodology with a focus on
collaboration, automation, and testing.

Requirements

This position involves new feature development in our messaging server product line.
Qualified candidates should have current experience developing robust, high volume
server software. Candidates should have strong Perl and C programming skills, at
least 3 years of professional programming experience, and have experience in and a
good understanding of:

  • Software design
  • UNIX (Linux, Solaris or FreeBSD) server development in C
  • Good understanding of Perl
  • Writing multithreaded applications
  • Writing TCP/IP and UDP networking code
  • Experience writing TCP-based layer 4 protocols
  • Writing unit and regression tests
  • Experience with gdb and other command line debuggers
  • Familiarity with memory debugging tools and techniques (e.g. valgrind, lint, dmalloc, libumem, etc.)
  • Good grasp of multi-platform portability concerns
  • Familiarity with autoconf and make
  • Experience with messaging technologies/protocols a huge plus, but not required.
  • Familiarity with event based systems a plus
  • Candidate should have, as a minimum, a Bachelors degree in Computer Science (or related field) from an accredited college or university.

Responsibilities

  • Feature Development - Work with the product team to define feature specifications and complete them with a production quality implementation including positive and negative test cases.
  • Testing - Testing is a primary focus of our development process, and every engineer is responsible for augmenting our automated test suite to guarantee test coverage on new and existing features.
  • Documentation - Ensuring documentation, code maintainability and product feature coherency.
  • This position is full-time in Columbia, MD. We’re only considering candidates with existing US work eligibility.

Looking for Coworkers

September 15th, 2008

It’s been over two years since I left MySQL to work for Message Systems and I’ve really been happy with things here. I work with a great team on interesting work for a good company who treats us well. Not much more you could ask for.

Except for more coworkers. We’re in need of a few new additions to the 2009 team:

We need engineers and tech trainers, scroll down for the details. If you’re interested send an email to mike@thisdomain!

Technical Trainer / Curriculum Developer

This position designs, develops and delivers online and in-person instructor led trainings on the Message Systems products and services for a variety of audiences including customers, partners and internal staff.
You will design courses and instructional material for everything ranging from short informational quick-
starts to multi-day workshops.
The audience for these training programs will primarily be mid-senior level Unix administrators, messaging anti-abuse operations staff, systems architects and other technical staff engaged in designing and maintaining corporate and carrier messaging infrastructure.
This is a full-time position based in Columbia, MD.

Responsibilities

  • Prepare and deliver Message Systems educational materials including on-site instructor-lead training, off-site instructor-led training, hands-on (lab-based) trainings, and web based instructional programs.
  • Work with staff technical writers, solutions architects, and engineering staff to craft self-lead instructional materials for customers and staff.
  • Work with product managers, solutions architects, engineering, partners and customers to build optimal training programs to suit all needs.
  • Provide input and guidance regarding time estimates and effectiveness for planning and deploying
    training solutions.
  • Travel to customer facilities to deliver training courses.  Some international travel will be required.
  • Develop methods and metrics to measure the success of the training programs.
  • Make recommendations to management about improving success of programs over time.

Skills Required

  • Good knowledge of UNIX/Linux environments (power user/administrator)
  • Experience developing technical curricula
  • Experience instructing technical audiences of technical topics
  • Self-sufficient in terms of producing instructional materials
  • Extremely strong verbal, written and listening skills
  • Excellent customer service attitude
  • Good team player
  • Solid organizational and time-management skills
  • Willingness to travel to deliver training (up to 25% of the time)
  • Self-starter, able to work independently and seek out assistance when blocked
  • Experience with server-side messaging technologies a plus

Senior Software Engineer - Messaging Infrastructure

The Message Systems engineering team is looking for a highly motivated senior-level
Software Engineer to help us extend the most advanced messaging infrastructure
platform on the market.  You will enjoy in-depth exposure to all aspects of building
scalable applications as part of a small, internationally-renowned team that helps
our customers — service providers and hot startups alike — achieve their cutting-edge
messaging goals.
Message Systems is a global leader in messaging, with a global customer base
including tier-1 telecommunications carriers, email service providers and online
enterprises.  Our technologies help transit billions of messages per day for customers
worldwide, while offering unmatched flexibility and architectural clarity. The company
combines the best aspects of Open Source, startup, and established company in our
business goals and corporate culture.
Message Systems believes in a fun but focused development environment.  We have
flexible hours, outstanding benefits, and a world-class team. Our engineering group
works in an open plan and uses the Scrum development methodology with a focus on
collaboration, automation, and testing.

Requirements

This position involves leading new feature development in our messaging server
product line.  Qualified candidates should have current experience developing robust,
high volume server software. Candidates should have strong Perl and C programming
skills, at least 5 years of professional programming experience, and have experience in
and a good understanding of:

  • Software design
  • UNIX (Linux, Solaris or FreeBSD) server development in C
  • Excellent understanding of Perl
  • Writing multithreaded applications
  • Writing TCP/IP and UDP networking code
  • Experience writing TCP-based layer 4 protocols
  • Writing unit and regression tests
  • Experience with gdb and other command line debuggers
  • Familiarity with memory debugging tools and techniques (e.g. valgrind, lint, dmalloc, libumem, etc.)
  • Good grasp of multi-platform portability concerns
  • Familiarity with autoconf and make
  • Experience with one or more messaging technologies/protocols a huge plus
  • Familiarity with event based systems
  • Candidate should have, as a minimum, a Bachelors degree in Computer Science (or related field) from an accredited college or university.

Responsibilities

  • Feature Design and Development - Work with the product team to define feature specifications, author technical designs and take a leading role in their implementation to production quality, complete with positive and negative test cases.
  • Testing - Testing is a primary focus of our development process, and every engineer is responsible for augmenting our automated test suite to guarantee test coverage on new and existing features.
  • Documentation - Ensuring documentation, code maintainability and product feature coherency.
  • This position is full-time in Columbia, MD.  We’re only considering candidates with existing US work eligibility.

Software Engineer - Messaging Infrastructure

The Message Systems engineering team is looking for a highly motivated mid-level
Software Engineer to help us extend the most advanced messaging infrastructure
platform on the market.  You will enjoy in-depth exposure to all aspects of building
scalable applications as part of a small, internationally-renowned team that helps
our customers — service providers and hot startups alike — achieve their cutting-edge
messaging goals.
Message Systems is a global leader in messaging, with a global customer base
including tier-1 telecommunications carriers, email service providers and online
enterprises.  Our technologies help transit billions of messages per day for customers
worldwide, while offering unmatched flexibility and architectural clarity. The company
combines the best aspects of Open Source, startup, and established company in our
business goals and corporate culture.
Message Systems believes in a fun but focused development environment. We have
flexible hours, outstanding benefits, and a world-class team. Our engineering group
works in an open plan and uses the Scrum development methodology with a focus on
collaboration, automation, and testing.

Requirements

This position involves new feature development in our messaging server product line.
Qualified candidates should have current experience developing robust, high volume
server software. Candidates should have strong Perl and C programming skills, at
least 3 years of professional programming experience, and have experience in and a
good understanding of:

  • Software design
  • UNIX (Linux, Solaris or FreeBSD) server development in C
  • Good understanding of Perl
  • Writing multithreaded applications
  • Writing TCP/IP and UDP networking code
  • Experience writing TCP-based layer 4 protocols
  • Writing unit and regression tests
  • Experience with gdb and other command line debuggers
  • Familiarity with memory debugging tools and techniques (e.g. valgrind, lint, dmalloc, libumem, etc.)
  • Good grasp of multi-platform portability concerns
  • Familiarity with autoconf and make
  • Experience with messaging technologies/protocols a huge plus, but not required.
  • Familiarity with event based systems a plus
  • Candidate should have, as a minimum, a Bachelors degree in Computer Science (or related field) from an accredited college or university.

Responsibilities

  • Feature Development - Work with the product team to define feature specifications and complete them with a production quality implementation including positive and negative test cases.
  • Testing - Testing is a primary focus of our development process, and every engineer is responsible for augmenting our automated test suite to guarantee test coverage on new and existing features.
  • Documentation - Ensuring documentation, code maintainability and product feature coherency.
  • This position is full-time in Columbia, MD.  We’re only considering candidates with existing US work eligibility.

Finished Presenting at OSCON

July 24th, 2008

My Normalization session seemed to go well enough.

Video is online at: http://www.mikehillyer.com/video/oscon_2008.html.