Joseph Booth

I am an author with a few books to my name, a SQL guy who loves designing and optimizing SQL, and a grandpa (baba) to two wonderful granddaughters. I wrote my very first computer program in 1981, so I've worked with DOS, Windows, early .NET and web development. I've been using SQL Server since version 6.5, prior to that, Dbase, Foxpro, and Paradox.


Experience

Technical Manager, Customer Success

YPrime Yprime Logo

Our team provides support for YPrime internal customers when the problems get very tricky. In typical day we might explore C# source, review web code, or optimize SQL code. Our team works in the UK and the United States to provide maximum coverage. We interact with the product team to help improve the company's product and with the database guys to make out database run as smoothly as possible.

  • Modified multiple SQL reports to run in seconds rather than several minutes
  • Wrote debugging checklists to address common issues found by our group
  • Trained staff in SQL, from basic queries to SQL optimizations
June 2018 - Present

Software Engineer

Freedom Pay Freedom Pay Logo

As a solution architect leading a full stack web development team using ASP MVC and Entity Framework with a SQL Server database for the industry leader in the secure credit card commerce marketplace. Worked with business analysts and developers to design and implement an online portal and reporting system for corporate clients to manage their credit card transactions. Designed and implemented a hosted payment solution, allowing clients to process credit cards on PCI compliant, secure servers.

  • Designed and implemented user security/auditing system
  • Designed and implemented online transaction search and processing
  • Performance tuned multi-tier application consisting of web services, data layer, and MVC front end application
  • Optimized Entity Framework queries to run in seconds, rather than minutes
  • Created Node.js JavaScript libraries to interact with SOAP Web Services for card processing
  • Added validation via data annotations to all data models
  • Designed and developed notification system
  • Developed SOAP and REST services
  • Designed and created web services to create and process transactions
  • Designed and created websites to securely collect credit card information
  • Wrote public label and private label web sites
  • Designed a system to import, validate and store custom CSS files allowing the clients to customize the website to match their branding, while maintaining PCI compliance
  • Created test systems for QA and external clients to interact with the web services
  • Produced all client and internal documentation for the product

November 2015 - May 2018

Senior Developer

Philadelphia Energy Solutions Philadelphia Energy Solutions Logo

Philadelphia Energy Solutions was the largest refinery on the east coast of the United States. Lots of old and new software, some dating back to the 1980's. I had to tackle a variety of different tasks, but my primary focus was the creation of an application called MOC (Management of Change). Any proposed change at the refinery was carefully reviewed and signed off on by a number of engineers. The software tracked the change, Created questions lists to be answer in each step of the change, and they allowed users to electronically approved the proposed change.

  • Completely redesigned and programmed Process Safety's application to evaluate and approve proposed changes to equipment/processes at the refinery
  • Added Google Maps to the Process Safety application to help engineers know which units are being repaired
  • Enhanced Process Safety's application rules processing to customize how changes are documented
  • Created and maintained web applications using HTML5 / CSS 3 with responsive design techniques to run on both desktops and tablets, using JavaScript libraries (jQuery, Bootstrap, Font Awesome)
  • Replaced a manual Computer Aided Design (CAD) drawings search application with an application that interacts with the AutoDesk Vault Application Programmer Interface (API)
  • Wrote an MVC application for the process of checking tools and supplies out of the Tool Room
  • Provided all software installation and support for adding a network of Permasense pipe sensors
  • Designed web services to expose unit/equipment information from SQL
  • Updated applications in advance of Microsoft's end of support for Windows 2003
  • Developed an application and services to poll our various servers and built a database of the machines’ hardware and software to identify changes and incompatibilities
  • Developed an application and services to allow users to browse Oracle and SQL databases using a general tool with a consistent look of our applications

May 2014 - November 2015

Web Developer

MSCI, Inc. MSCI Logo

Supported an application to provide financial reporting services to large pension and fund managers. I designed and enhanced graphs and tables used in the main reporting product. Primarily worked in VB.Net, with some C# and JavaScript. I also wrote stored procedures and optimize SQL for performance on the back-end of the platform...

  • Developed the UI and reporting for Alternatives 2.0 along with fixing several residual bugs from Alternatives 1.0. Took full ownership of this project, soliciting and implementing valuable feedback from key stakeholders
  • Primarily worked in VB.Net, with some C# and JavaScript
  • Wrote stored procedures and optimized SQL for performance
  • Designed a system to allow direct upload of client spreadsheets into reporting platform
  • Designed a database structure and editing tool to eliminate XML dependency
  • Created Visual Studio add-on tool to document existing class code for standardization and to convert data set routines to SQL code for easier testing
  • Enhanced suite of nine asset allocation analytics to support multiple allocations per account
  • Added historical reporting support to multiple analytics
  • Mentored/trained junior programmers and QA analysts
  • Documented and managed our Star Team and Team Foundation Server (TFS) builds and project tracking
February 2011 - May 2014

Books

I've written a number of books, most recently several Succinctly Series e-books for SyncFusion.
You can read about them here and download a copy directly from SyncFusion if you'd like. (Simply click on the book image)
The Succinctly Series of books (over 200 titles) are aimed as quick read (about 100 pages) to help understand various topics.

Database Design Succinctly

Database Design book The way a user might perceive and use data and the optimal way a computer system might store it are often very different. In this book, welearn how to model the user's information into data in a computer database system in such a way as to allow the system to produce useful results for the end user. The book will cover how to design a database system to allow businesses to get better reporting and control over their information, as well as how to improve their data to make sure it is as accurate as possible.
Author Interview video

Syncfusion, Inc. · May 25, 2022

SQL Server Metadata Succinctly

SQL Server Metadata book SQL Server is a very complex and powerful product, but it provides tremendous amounts of data about itself. You can use this metadata to improve your database design, increase performance, review security, and more. This book will show readers sample scripts and queries using information schema views as well as SQL Server-specific views.

Syncfusion, Inc. · Nov 29, 2019

Angular Succinctly

Angular Succinctly book Angular is a massively popular JavaScript framework built to take advantage of component development in web apps. It is constantly evolving, with a new major release delivered every six months. In Angular Succinctly, author Joseph D. Booth guides you through setting up a development environment, interacting with the Angular CLI, building Hello World, and more with the latest release, Angular 7. By the end, you will know how to set up templates, compose components from those templates, and tie them all together with modules to deliver a cohesive web app.

Syncfusion, Inc. · Feb 4, 2019

Natural Language Processing Succinctly

Natural Language Processing Succinctly book AI assistants represent a significant frontier for development. But the complexities of such systems pose a significant barrier for developers. In Natural Language Processing Succinctly, the book will guide readers through designing a simple system that can interpret and provide reasonable responses to written English text. With this foundation, readers will be prepared to tackle the greater challenges of natural language development.

Syncfusion, Inc. · Dec 13, 2018

W3.CSS Succinctly

W3.CSS Succinctly book W3.CSS is a free, no-license CSS framework you can use to produce responsive websites that work across all common browsers and devices. W3.CSS is small and simple to learn, and is a worthwhile contender to consider when deciding on a CSS framework. W3.CSS Succinctly will take you through using features such as containers and helper classes, visual elements and animations.

Syncfusion, Inc. · June 11, 2018

Angular 2 Succinctly

Angular 2 Succinctly book Angular 2 is a massively popular JavaScript framework built to take advantage of component development in web apps. Angular 2 Succinctly will guide you through setting up a development environment, interacting with the Angular CLI, building Hello World, and more. By the end, you'll know how to set up templates, compose components from those templates, and tie them all together with modules to deliver a cohesive web app.

Syncfusion, Inc. · March 22, 2017

Github Succinctly

Github Succinctly book GitHub offers unparalleled access for developers to work on projects together, bridging geographical divides to bring teams together. Whether you are an individual developer looking to explore new projects, post your own, or provide your company with a safe place to work, this book will help you get started.

Syncfusion, Inc. · June 13, 2016

Accounting Succinctly

Accounting Succinctly book Accounting Succinctly is a developer's guide to basic accounting. Written with business app development in mind, the book discusses some of the most common accounting processes, including assets, multiple accounts, journaling, posting, inventory, and payroll. An appendix includes SQL code examples to get you started with several basic accounting transactions.

Syncfusion, Inc. · May 15, 2015

Regular Expressions Succinctly

Regular Expressions Succinctly book Regular Expressions Succinctly teaches Visual Studio developers how regular expressions can help solve basic programming problems. By introducing patterns and rules to your C# strings, you can eliminate the need to write your own complex code for text manipulation. You'll learn to search for numbers, characters, symbols, and more, as well as enable your code to identify and reproduce patterns. Steps for creating and testing your own regular expressions are also included.

Syncfusion, Inc. · September 8, 2014

Visual Studio add-ins Succinctly

Visual Studio add-ins Succinctly book Integrated development environments are intended to boost developer efficiency. A vital piece of this efficiency is an IDE's openness for extensions and customizations that developers can add to create precisely the environment they need. Visual Studio, Microsoft's flagship IDE, allows developers to create add-ins for any purpose they can think of, from generating boilerplate source code, to interacting with the many windows within Visual Studio. With this book, you'll learn how create add-ins for Visual Studio, how to test their functionality, and how to deploy them to make you and your colleagues' lives a little easier.

Syncfusion, Inc. · July 7, 2014

Puzzles

SQL Puzzles

To help people get up to speed, I generally provide a series of SQL puzzles, to solve, but also start thinking in SQL. Go ahead and read a puzzle, guess the answer, then click the "Reveal" button.

 The phone number list puzzle

Voter table

We have a table of voters for a state, approximately 9 million rows

  • Our user wants full name and birthday of all democrats
    (Index on party_affliation,LastName already exists)
  • Query used
    select * from people
    where party_affliation = 'Democrat'

  What is a quick way to speed up this query?

 Reveal

Replace the * with FirstName,LastName,Birthday.
The dl_image field is a large size, and it is not needed for the list.

 You should always only bring back the fields needed for the result.

 The school list puzzle

Student table

We have a table of 150,000 students at a school across the country
There are two indexes on this table

  • One is on gender, followed by LastName, First name Include GPA
  • Other is by GPA, followed by LastName, First name Include gender

A recruiter called and wants a list of all women with a GPA of A+

  Which index should we use, and why?
  Why might the school's name be important?

 Reveal

Assuming a normal distribution of students and grade, the index starting with GPA is likely to find fewer rows. Then each of these rows can be checked for gender.
However, if the school was the "STEM school for boys", the gender index might be a better starting index to use, since there are only a few girls at the school.

 SQL Statistics allow SQL to understand the distribution of data in tables.

 The customer mailing puzzle

Customer table

A SQL developer runs the following code to create a mailing list to send out a promotional mailing

select CUST.firstName,CUST.Lastname,CUST.address,
       ZIP.city,ZIP.stateCode,CUST.zipcode
from dbo.customer CUST
join dbo.zipcode ZIP on ZIP.Zipcode=CUST.Zipcode

A week or two later, a couple customers called, complaining they never received the promotional mail

  Any idea why?
  And how can we fix it?

 Reveal

Why:In this example, the complaining customers likely had a bad zipcode (one not found in the zip code table). Since the JOIN only returns rows found in both tables, the missing zip code would "hide" the associated customer row.

Fix: To fix the issue, you need to use a LEFT JOIN to the zip code table, which means include the customer even if they don't have a linked zip code.

select CUST.firstName,CUST.Lastname,CUST.address,
       ZIP.city,ZIP.stateCode,CUST.zipcode
from dbo.customer CUST
left join dbo.zipcode ZIP on ZIP.Zipcode=CUST.Zipcode

The USPS (United States Postal Server) will deliver mail without a city and state as long as it contains a valid zip code.

 The online gaming puzzle

User tables

It is the year 2025, and Blaire's game company has taken off. They now have reached 100,000 users
They decide to send special awards to the top 10 users (lifetime points)

  • Here is the query the developer wrote

SELECT top 10
      firstName,lastName,lifetimepoints
FROM [dbo].[Users] usr
ORDER BY LifeTimePoints DESC

  But James Mullen might be mad, any guess why? How can we fix this for him?

 Reveal

James and Edward have the same total lifetime points, however, the TOP 10 command only returns the top 10 rows regardless
We can add the WITH TIES to the TOP 10 clause, to ensure both James and Edward are returned by the query

SELECT top 10 WITH TIES

 The password puzzle

User tables

Recently, a company decided to use a 4-digit PIN numbers rather than passwords, since most users were accessing the site on their mobile phones.
They didn't want to break existing code, so the left the PasswordValue field alone as varchar(12).
They asked a developer to write a query to find any potential invalid passwords.

  • Here is what the developer wrote

SELECT
      id,firstName,lastName,PasswordValue
FROM [dbo].[Users] usr
WHERE PasswordValue IS NOT NULL and IsNumeric(PasswordValue)=0

   What potential problems might this approach cause?

 Reveal

There are two issues here, the first is that the mobile phone expects a 4 digit PIN, so any Password Values with a length other than 4 will fail.
The second isssue is that SQL IsNumeric() has a few unexpected issues, as shown below:

  • 02E5 - This is scientific notation, so it is a valid numeric
  • $100 - Currency also retured a valid number
  • -500 or 1.05 - Both are valid numbers

You can replace the original WHERE clause with the following code. It will check length and that all characters are digits. It will also exclude any NULL values from the result.

WHERE PasswordValue NOT LIKE '[0-9][0-9][0-9][0-9]'

 The soccer club puzzle

Soccer tables

There is a table of teams and win/loss records. The club wants a simple report listing the teams, their winning percent, sorted by that percentage

  • Here is what the developer wrote

SELECT TeamName,Wins,Losses,
Round(Wins/(Wins+Losses)*100,0) as WinningPercent
FROM Scores
ORDER BY WinningPercent DESC

   Unfortunately, this didn't work, all percentages show zero...

 Reveal

When SQL divides by an integer (Win and Losses), the result is an integer. In order to get the percentage, you need to use decimal numbers.

  • Wins=9 / (Wins=9 + Losses=3) results in .75, but SQL makes an integer value of 0.
  • Wins=9 * 1.0 / (Wins=9 + Losses=3) results in .75, but SQL makes a decimal of .75.
  • Cast(Wins as Float)/(Wins+Losses)*100 also results in .75

cast(Wins * 1.0 /(Wins+Losses)*100,0) as WinningPercent

 The slowpoke puzzle

User tables

We have a table (ASPNetUsers) containing every user (about 110,000 row) across all stores.

  • Each store has its own list of users (StoreUsers), typically 800-1000 users.
  • Running this query takes almost a minute to return 850 rows

SELECT sur.Email
      ,u.UserName as 'UserName'
      ,u.FirstName as 'First Name'
      ,u.LastName as 'Last Name'
FROM [StoreUser] sur
JOIN [YPA_AspNetUsers] u ON u.Id = sur.id

  Why might this query run so slow?
  How can we speed it up?

 Reveal

The ID data types are inconsistent between the two tables. This means SQL needs to convert the data types to be compatible, for every row.
If we explicty perform the conversion on the smaller table, the query wil run much quicker (typically 1-2 seconds)
JOIN [YPA_AspNetUsers] u ON u.Id = cast(sur.id as varchar(36))

 Avoid implicit conversions whenever possible, if data types are not the same, perform a explicit conversion on the smaller table, on the right side of the JOIN expression.


Scripts

SQL Scripts

I've written a few SQL scripts over the years that might be helpful. Feel free to download and use them in your work..

Holiday_list()

This function returns a table of "holidays" for any given year. Rather than build a table of holidays and update it each year, this UDF stores holiday rules as procedural logic and computes the holidays of any year...

To use the function, you should first review the code and comment out any holidays you might not want to include, or possibly add any additional holidays. There are three "rules" for computing holidays dates.

  • Fixed date holiday-Holidays which fall on the same "date" each year (such as Christmas or April Fool's day)
  • Fixed day holidays-Holidays which fall on the X day of the week of the Y week of the month (such as Thanksgiving or labor day)
  • Easter holidays-Holidays that are relative to the date of Easter Sunday (Good Friday, Palm Sunday, etc.)

Once the function contains your set of holidays, you can use the function just as you would a normal SQL table. For example, the following SQL line

SELECT * FROM holiday_list(2023) ORDER BY Holiday_date

returns
Holiday_nameHoliday_date
New Year's Day1/1/2023
Martin Luther King Day1/16/2023
Groundhog Day2/2/2023
President's Day2/20/2023
Easter Sunday4/09/2023
Take your Daughter to Work Day4/27/2023
Mother's Day5/14/2023
Etc.....
 Download

GenRandNames

The GenerateRandomName procedure returns a random "person" name. This can be useful when you need to generate realistic looking, fictious data for testing purposes.

For example, the following SQL lines

DECLARE @TheName VARCHAR(64)
EXEC GenerateRandomName @TheName OUTPUT
PRINT @TheName

might return: Nicole Tucker or John Hammond etc...

 Download

Tables to JSON

This script generates a JSON file documenting your database tables. It includes the field name and type, the Primary Key, Any foreign keys, default values, and check constraints

For example:

JSON table structure sample

You can open the JSON file in any JSON viewer or source code you written

 Download

Current projects

I currently am working on two projects, for learning and fun. (And maybe some down the road)

DataOpus Logo  DataOpus

DataOpus is a Windows application to anaylze a database, looking for table issues, performance suggestions, lint checking of stored procedures, etc.

Sample of a stored procedure review, highlighting any found issues.

Stored proc review sample

It is current nearing beta release.

 Tennis Contract

I play in a tennis contract twice weekly, and we often need to check who is scheduled to play, and possibly arrange subs. This web application shows the schedule, who is playing, a list of players, and list of available subs.


Interests

Apart from SQL, Web development, and debugging tricky issues; I am an avid tennis player, often playing 3 times a week. I also love reading fiction, particularly Dean Kootz, Lincoln Child, and James Patterson.

However, my most fun moments are spent with my family and my granddaughters. They bring a smile to my life every day...


Here are a couple old articles I've written, hopefully give you a bit of a laugh

 Interviewing the computer


This article was published in October of 1980 in the Rider News. Paul Bubny thought he was interviewing the computer, which was really me in another room. Poked lots of fun at the computer center, although I am not sure how much the computer admins enjoyed it.

(By Paul Bubny)

Very few people on the College campus are aware of the entity who most often affects their daily lives. I didn't say "person", I said "entity". This being lives (or occupies space at any rate) on the ground floor of the Fine Arts building. In the early morning or evening hours, you can see its elaborate banks of colored lights flashing and whirling. It is the College's computer.

Rider News: How do you like Rider?
Computer: Well despite the bad pay, poor conditions (they keep me locked up in a refrigerated room), it's not bad
RN: What does your average day consist of?
Computer: I start off in the morning helping the registrar mess up the students' schedules. Then I usually spend some time in the afternoon showing the bursar ways to overbill students. You'd think they'd let me relax at night, but nooo!. I spend my nights running backups...
RN: Anything else?
Computer: After the administration puts me to work, I have to put up with students too. They all want to play "Star Trek" or "Tic Tac Toe" or something like that...
RN Do you have any influence around here?
Computer Sure I do! I can change anyone's cumulative average without a trace. I can bill students for accounts they already paid and if I get very upset, I can even mess up payroll. If you don't believe me, I'll change your GPA.
RN What would you change if you had the power to do so?
Computer: Well, first I would demand vacation time for us computers. Then I'd ask for time off at night. I have a crush on this PDP-8 computer at Rutgers, but I never get to see her because I am always at work.
RN Are you interested in any computers at Rider?
Computer I am the only computer at Rider!! However, they do have some cute word processors over in the library.
RN Do you have any favorite people at Rider?
Computer Do you mean humans? I suppose there are a few, like Joe Booth. He is my favorite, he even gives me vacations sometimes.
RN Do you read the News?
Computer Yes, on occasion. I got very offended by a story that said John Dupree was really inside me. Since then I haven't really paid much attention to it.
(Editor's note: The column to which the computer refers,"The True Story of the Computer, It's really a one man operation", appeared in the Jan 20, 1978 News and was written by former News editor Ray Frager)
Computer Say, do you know where Ray is now, I'd like to send him a greeting and a token of my appreciation...