PowerShell is Logical… Usually

Alternative title: questions I’d ask Jeffrey Snover in an AMA.

I use PowerShell at work on a daily basis. It’s not usually anything complicated, but I couldn’t do my job effectively without it. Office 365 is great, but the GUI is slow, and PowerShell is much faster. Managing Active Directory is easy, but managing objects at any scale is always quicker once scripted, especially when you want to repeat tasks.

Today, I needed to deploy a change to local user accounts on our clients. We have a standard local user account for use at events, so non-staff can temporarily use a laptop without accessing company data.

Our domain policies dictate all accounts must have passwords, and password complexity requirements are applied, even to local accounts. To satisfy this, there’s a standard, unprivileged account, set up on each device that requires it, with a uniform password.

Last year, I rolled out a deployment server, because why deploy hardware manually when you don’t have to? Unfortunately, the new deployment system and the old method of deploying a local account don’t work well together. The password used for the local account conflicts with the configuration settings applied by the deployment server.

This is easy to fix. It requires a change to the password. You can do this individually on computers, but that takes a lot of time and disturbs staff. Therefore, PowerShell is the answer.

There are four PowerShell cmdlets for managing local users:

  • New-LocalUser
  • Get-LocalUser
  • Set-LocalUser
  • Remove-LocalUser

I needed to:

  • Check for the existence of the local user account
  • Create the account if it doesn’t exist
  • Update the account if it does exist

So, I wrote a script that could do this, which I could then distribute. I found it didn’t work consistently, and I had to do a bit of digging into Microsoft’s PowerShell documentation to find the cause. It was simple, but it’s a little illogical.

PowerShell has different types of parameters. Sometimes it’s looking for an integer (a number), sometimes a string (free text, essentially), sometimes a boolean (something that’s true, or something that’s false), sometimes a switch parameter (requires no further input).

There are two differences between the Set-LocalUser cmdlet and the New-LocalUser cmdlet.

First, the New-LocalUser cmdlet has the following parameter:

-UserMayNotChangePassword

Whereas the Set-LocalUser cmdlet has the following parameter:

-UserMayChangePassword

Essentially, these switches do the same thing, but in reverse, and it’s difficult to remember which way round it is. Why can’t they both just use the same syntax?

However, there’s a second issue, affecting both these cmdlets, and another one:

-PasswordNeverExpires

In the New-LocalUser cmdlet, these parameters are switch parameters. You include them and there is no further input.

In the Set-LocalUser cmdlet, these parameters are boolean – you have to set them to $True or $false.

It’s easy enough to fix, but it’s odd logic, eh?

2018-19 NFL Playoffs – Conference Round

With a place in the Super Bowl on the line, can the road teams do what they couldn’t last week, and win?

So, I got three out of four last week, but my predictor got all four correct, which means we’re both on 6-2 with three games left in the playoffs. What’s going to happen this week?

(Please forgive the shorter post. I may have miscalculated the kickoff times this week!)

Los Angeles Rams @ New Orleans Saints

The Saints are the top-ranked team in my Power Rankings. The main difference between the two sides is the defense, and that’s where I see this game won.

Many will focus on the Rams’ ability to stop the run. I’m not so sure that will help. I expect the Saints to use motion and quick underneath passes to bypass the rush of Suh and Donald, getting the ball out quickly. If they can give Brees some pretection, the Rams will also really struggle to hold Michael Thomas quiet.

On the other side of the ball, expect the Saints to put everything into stopping Todd Gurley and the run, and allow Goff to throw the ball to his heart’s content. His passer rating last week was 75. Whilst he looked after the football, that’s not a recipe for winning if you can’t run the ball.

If he can throw the ball well, the Rams may well win, but I have faith in the Saints’ defense to stop him.

The predictor picks: Los Angeles.
Rams confidence level: 50%.
Saints confidence level: No data. But 0% when predicted to lose this season.
My pick: New Orleans.

New England Patriots @ Kansas City Chiefs

New England have the worst record of any team left. Make no mistake, they are the underdogs here. Again, I see this being a story of defense, or rather, the lack of it. Whilst the Chiefs will have their work cut out to cover Gronkowski, Edelman and the running game, the Patriots have it much worse.

Do you stop the run? Do you double team Travis Kelce? What about Tyreek Hill? Oh, did you also see Sammy Watkins is back from injury? Even if you cover all those players, Mahomes can run straight through you himself.

In short, the Chiefs just have too much talent to lose this game. It doesn’t mean they won’t (Andy Reid has proved that before), but Bill Belichick is the only reason people believe the Patriots can win this game.

Even worse news for the Patriots: the Chiefs discovered a half-decent defense last week too.

The Patriots may have a defense ranked 17 places higher than the Chiefs, but the Chiefs are #1 for points scored and #1 for points differential. It will show here.

The predictor picks: Kansas City.
Patriots confidence level: 0%.
Chiefs confidence level: 100% (so something’s got to break!)
My pick: Kansas City.

2018-19 NFL Playoffs – Divisional Round

After getting 75% of my picks right last week, how will I do this week? 100% hopefully…

If you followed last week’s picks, you’ll know I got three out of four correct, once ahead of my predictor. So, what about this week’s games? Here’s a quick guide.

Indianapolis Colts @ Kansas City Chiefs

I correctly over-ruled my predictor last week by picking the Colts, and although I could look silly by doing so, I’m very tempted by the Colts tonight. Wishful thinking? Perhaps. But they’re on a roll, winning 10 out of 11, and Andrew Luck is an experienced quarterback who can surely pick apart the Chiefs’ secondary.

Andy Reid and the Chiefs haven’t always done well in the playoffs, but that’s not why I pick against them here. I’m more picking for the Colts, because they’ve shown in the second half of the season they are better than their #6 seed shows. They play with confidence, they have good experience, and they just look like a team that knows how to get it done.

If they can’t win in Kansas City, I don’t see anyone else doing so. It’s a brave pick, but I just believe in this Indianapolis team.

The predictor picks: Kansas City (7.5 points).
Chiefs confidence level: 100%.
Colts confidence level: 100%.
My pick: Indianapolis.

Dallas Cowboys @ Los Angeles Rams

I’d love to pick the Cowboys here, but it’s almost impossible to justify. Yes, their defense is immense right now, and they are capable of shutting down the Rams’ running game and forcing them to throw. And yes, passing is exactly where the Rams look weak right now.

And yes, the Cowboys are 7-2 on the road this season. They’ve only lost on the road to divisional rivals. And they won on the road in the regular season against three playoff teams.

But this is where you have to read your stats carefully. They beat Seattle in week 3, and Houston in week 5. Both those teams played better as the season went on.

In week 15, they play the Colts. The Colts are the bar, as you should know by now. What happened? The Colts won 23-0.

So, no matter how much I’m tempted, I’m not getting carried away with the Rams’ struggles at the end of the regular season. With a week off to rest and reset, they can hold off Dallas at home.

The predictor picks: Los Angeles (10 points).
Cowboys confidence level: No data.
Rams confidence level: 75%.
My pick: Los Angeles.

Los Angeles Chargers @ New England Patriots

The Patriots are undefeated at home. The Chargers are still undefeated outside of Los Angeles, having lost one road game in their hometown, and won one home game 5,437 miles away from home in London. Follow?

Philip Rivers has never beaten Tom Brady. Well, I’ve not checked that, but everyone’s said it all week. More to the point, the Patriots are very hard to beat at home, and they’ve had a week’s rest. This Patriots team can be beaten, certainly, but history shows they are particularly hard to beat off a bye. I won’t be falling off my chair in shock if they lose, and I definitely think it’s closer than a 12-point game, but I’m not going against the NFL’s only team to go undefeated at home.

The predictor picks: New England (12 points).
Patriots confidence level: No data.
Chargers confidence level: 100%
My pick: New England.

(There’s no data for New England as this is predicted to be a closer game than any of their home games this season. All other home games have had them as strong favourites, which isn’t the case to the same degree here.)

Philadelphia Eagles @ New Orleans Saints

The Eagles tripped me up last week when I picked the Chicago Bears, and I’ve not changed my mind this week. The Eagles are, I’m adamant, the weakest team in the playoffs. The Saints may have a weaker defense than the defeated Bears, but their offense is much stronger.

The Bears were found wanting on offense, but I don’t see that being a problem here, whereas I just don’t see the Eagles scoring enough points to compete.

In Power Rankings terms, it’s the #1 team against the #15.

The predictor picks: New Orleans (9 points).
Eagles confidence level: 33%.
Saints confidence level: 100%.
My pick: New Orleans.

2018-19 NFL Playoffs – Wild Card Round

With the NFL playoffs upon us, it’s time to see if I can guess the games correctly… of course I can! Right?!

The NFL playoffs are upon us once more, and this year, it looks as open as it has been for a long time. No team stands head and shoulders above the rest, unlike in recent years. In fact, with Nick Foles starting for the Eagles in the playoffs, you could (almost!) see any team winning the Super Bowl in February, and definitely and of the teams in the AFC, on their day.

On the AFC side, the Chiefs can score 50 to win if they need to – but, crucially, not 55, which can be a problem for on defense; the Patriots, meanwhile, have good defense, but an inconsistent offense, although they are the only playoff team to have a perfect record against other playoff teams this season.

The Texans and Ravens have excellent defenses but the Texans allow far too many sacks and the Ravens have an inexperienced quarterback who is a better runner than passer.

The Chargers are very good, but struggle against quality opponents, and the Colts have Andrew Luck, who is playing as well as I’ve ever seen, but they have to win on the road the whole way, which is tough.

On the NFC side, the Rams have struggled in recent weeks, as have the Saints in places, and neither team is strong on defense.

The third seed, the Bears, may in fact be the best team in the NFC right now (and lead my industry-leading Power Rankings), as although they are ranked #8 on points scored, they are the #1 defense (points), and top-four ranked both at home and on the road.

The Cowboys have played better as the season has gone on, but were shut out against the Colts in week 15.

The Seahawks are workmanlike if anything, and have joint-worst record against fellow playoff teams (33%, along with the Chiefs), but did beat the Chiefs by putting up 38 points in week 16.

Finally, the Eagles beat the Rams on the road in week 15, and the Texans at home in week 16. Plus, they have Nick Foles, who makes Tebow Time almost explainable.

So, all in all, it should be interesting. Here’s my (brief) thoughts on this week’s games…

Indianapolis Colts @ Houston Texans

As both teams are in the AFC South, they’ve already played twice. On both occasions, the road team won by three points: the Texans (37-34) in week 4, and the Colts (24-21) in week 14.

The Colts are much better now than in week 4. And whilst the Colts have an average defense, the Texans allowed 62 sacks in the regular season. The You just can’t do that in the playoffs. Colts led the league, allowing only 18. The Texans’ big advantage is their regular season turnover differential (+13). I fancy the Colts to look after the football today, and in doing so, to win.

Both teams are 2-3 against playoff opponents, 1-1 against each other, both losing at home. The Colts lost all three of their games in the first five weeks; the Texans won both their games in the first five.

The predictor picks: the Texans (1.5 points).
Texans confidence level: 50%.
Colts confidence level: 33%*.
My pick: Indianapolis.

*Yes, that means the predictor predicts [for the Colts] that it will more like prove itself wrong, than right!

Seattle Seahawks @ Dallas Cowboys

The Cowboys are 3-3 in games against other playoff teams, and the Seahawks are 2-4. However, if it helps, the Seahawks are 0-2 on the road, and the Cowboys are 2-0 at home. Which makes this look quite easy…

Seattle have beaten the Cowboys this season, comfortably in week 3 (24-13), but the reality is Seattle is not Arlington. Whilst Russell Wilson is great on the move, this Seahawks team have ground it out by doing just enough, and I just don’t think they have enough to beat a team that’s 7-1 at home, when they are only 4-4 on the road themselves.

The Seahawks are joint-ranked #6 for points (offense), and the Cowboys are ranked #6 for points (defense).

The predictor picks: the Cowboys (4.5 points).
Cowboys confidence level: 100%.
Seahawks confidence level: No data. But they’ve played some dreadful teams on the road and still lost, so I’ll go with “confident”.
My pick: Dallas.

Los Angeles Chargers @ Baltimore Ravens

The Ravens were, until week 17, the #1 scoring defense. They were overtaken by the Chicago Bears, but they still hold the #2 spot. The Chargers are ranked #8.

The Ravens are ranked #13 on scoring offense, which won’t surprise, but it may surprise you to learn the Chargers are only ranked #10.

The Ravens are 6-2 at home, but the Chargers are 7-1 on the road. Indeed, the Chargers score more points on the road, and allow fewer, than at home. They are ranked #3 on the road, behind only the Saints and Rams, whereas the Ravens are ranked #9 at home.

The Ravens have only played three games against playoff opposition this season, going 1-2. But the win was against the Chargers… in Los Angeles. They lost both home games.

The Chargers’ one road loss was against the Los Angeles Rams. So it seems like it should be a Chargers win…

The predictor picks: the Chargers (2.5 points).
Ravens confidence level: 100%.
Chargers confidence level: 100%.
My pick: I gut really want to pick the Ravens, but my brain says my predictor is successful for a reason. So, I’m going against my instinct and picking San Diego Los Angeles.

Philapelphia Eagles @ Chicago Bears

The Eagles are without their starting quarterback, although their backup has a better record this season, and won them the Super Bowl last season.

Chicago are my #1 team in my Power Rankings (albeit slightly affected by the Rams and Saints resting players in week 17).

The Bears are 2-1 against playoff teams, all at home. They lost to the Patriots, but held the Rams to 6 points.

The Eagles are 3-3 against playoff teams (1-2 on the road), including a win against the Rams in Los Angeles. But they also got beaten 29-23 in Dallas, and only scored 7 points in New Orleans (not a great defense). But… Nick Foles, etc.

The Eagles are the lowest ranked playoff team in my Power Rankings, and are not top-ten in any metric. The lowest ranking for the Bears is #8 (points scored), and everything else is top five.

My predictor picks: the Bears (7.5 points).
Bears confidence level: 75%.
Eagles confidence level: 50%.
My pick: Chicago.

Constraining images with CSS

Small details make a big difference to websites. It’s never a good look when an image is larger than its container. Fortunately, it’s very easy to fix.

Responsive websites are great; mobile-first websites are even better. However, they do sometimes present frustrating issues. One issue which props up on a fairly regular basis is the issue of images – more specifically, a question along the lines of:

Why don’t my images fit on the page?

It’s a simple question really – if text can adapt to fit on a smaller screen, why do images sometimes insist on maintaining their original size? The answer is very simple.

Here’s a fairly average piece of code for an image:

<img src="image.png" alt="Image" width="800" height="200">

When displayed on a website, that image will display at a resolution of 800 pixels wide by 200 pixels high. If you’re using a screen with a lower resolution, the text will be scaled down and the image will dwarf the rest of the content. That’s because, without any other information, the browser doesn’t know any better.

So, to get around it, you need to add the following CSS:

img {
 max-width: 100%;
 height: auto;
 }

This does two things. First, it constrains all images to the maximum screen width. If that is 320 pixels, that’s the size the image will be scaled to. Second, it constrains the image height proportionally, so the image doesn’t look like it’s been squished.

So, what if you need to constrain not just images, but videos, and possibly more besides? Easy. Change your CSS to this:

.constrain {
max-width: 100%;
height: auto;
}

Now, you can use the .constrain class on any element and it will be constrained to the intended width.

Setting a static IP address in Ubuntu Server

Networking takes care of itself in Windows, and static IPs aren’t very hard. But how do you set a static IP address in Ubuntu Server?

I’ve used Linux regularly for more than ten years. For the majority of that time, I’ve used Ubuntu, although I’ve also dabbled in Fedora (without much success) and CentOS (with marginally more).

I’m generally comfortable with Linux and when I’m not, I usually know where to look. However, if there’s one thing I always seem to have issues with on Linux, it’s networking.

When I first used Ubuntu, it was often a struggle to get any usable networking. After a while, it was just wireless (mainly WPA) which caused an issue. Latterly, the main issue I’ve encountered is networking with virtual machines (and most of those issues have been with VirtualBox – VMware doesn’t seem to encounter the same issues).

If you’re working with a server, you’ll want to set a static IP address. Once working, this makes things much easier than using a dynamic address.

If you use Ubuntu Desktop, you can edit these settings very easily from your control panel, but on Ubuntu Server you’ll need to use the command line.

In Ubuntu, your network settings are stored in /etc/network/interfaces. To edit the file, enter nano /etc/network/interfaces in a command line (or, if you have a different text editor, like vi, use that instead of nano). This will open the file in a text editor. A sample file might look like this (comments removed):

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

So, what does that mean? Well, there are two interfaces. The first is the loopback interface. Leave that be – if you mess with it, things will break. Ubuntu uses that to communicate with itself.

The second is the eth0 interface. This is your network card. You may have more than one; if you have a second, it might be labelled eth1. Your network card have a completely different designation – on my VMware virtual machine, it’s labelled ens33).

The second line in each of those blocks sets those interfaces. The first lines (auto lo and auto eth0) tell Ubuntu to start those interfaces on boot. If eth0 wasn’t started on boot, the machine wouldn’t have any networking outwith the machine, which will cause you problems!

In the example above, and by default, Ubuntu uses DHCP, so the instance will allow your DHCP server (usually your router) to give the machine an IP address and set any other settings with it.

So, how do you set a static IP address? Well, it goes something like this:

auto eth0
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.254
dns-nameservers 8.8.8.8 8.8.4.4

Line-by-line, that configuration does the following:

  • Sets Ubuntu to configure the eth0 interface on boot.
  • Sets the interface as a static interface (rather than DHCP).
  • Gives the interface an address (in this case, 192.168.0.10).
  • Sets a 24-bit subnet mask (so the network runs 192.168.0.1 – 192.168.0.255), and the network in the line underneath.
  • Sets the gateway (router) address. The address displayed is the one used by BT routers – others may use 192.168.0.1.
  • Sets the DNS nameservers to use. I’ve used Google nameservers in this example. You only need one for things to work, but it’s better to have at least two. You can mix them too – for better redundancy, you could use one Google namerserver and one OpenDNS nameserver.

A few quick notes:

  • Once set, you need to reboot the server for the changes to take full effect. Stopping and starting the networking interface won’t cut it.
  • If you forget to add the auto eth0 line and networking doesn’t automatically come up on boot, run sudo ifup eth0 That will manually bring up the inferface. Remember to fix your configuration afterwards!
  • If you don’t set your DNS nameservers, you’ll still have network access, but you won’t be able to resolve domain names. Thus, you will be able to ping an IP address would work, but pinging an FQDN would not work. You’ll eventually notice if this doesn’t work, because things like updates will fail.

This should be everything you need to know to set up a static IP address in Ubuntu.

2016-17 NFL Playoffs – Super Bowl

Roger Goodell can’t hide any longer. He has to see the Patriots tonight. The question is, does he have to hand them the Vince Lombardi Trophy?

The end is in sight. Only two teams are left fighting for the Vince Lombardi Trophy. Will it be the Atlanta Falcons, or the New England Patriots, who end up victorious in Houston?

One thing I have learned is that it’s not worth me picking against my predictor. Twice I’ve picked against mt predictor in the playoffs, and twice I’ve made the wrong call.

Picking the Patriots as the winners of the AFC Championship game was relatively easy, but my predictor correctly predicted the Falcons would see off the Green Bay Packers – and they did it very easily. The Packers’ defense couldn’t stop the Falcons’ offense, and the Packers didn’t generate much offense of their own for much of the game.

The Patriots, meanwhile, made mincemeat of the Steelers and were never really tested. I suspect the Falcons, with their ability to generate pressure upfront, and their much more potent offense, will do a better job in the Super Bowl. But will it be enough?

In truth, I don’t really know, but the stats suggest the Patriots are the more likely winners in this contest. Whilst the Falcons generate pressure, the Patriots are good at restricting opponents to field goals, whilst neither offense is easy to stop. It should be a great game.

The Patriots have won 6 out of 7 games against playoff opponents this season, whilst the Falcons have won 4 of 6. Both teams lost to the Seattle Seahawks. On the road, the Patriots were 2 of 2, whereas the Falcons were 1 of 2. The Falcon’s home loss was to the Kansas City Chiefs.

My own view is that it’s easier to see the Patriots putting up 30 points on the Falcons, than the Falcons putting 30 points up on the Patriots. And, whist the Falcons lead the league in points rank, the rank comfortably behind the Patriots on everything else.

For the Super Bowl, as there is no real home and road team, I designed a new predictor, by comparing home and road data for the two teams. I compared the following:

  • Average road scores
  • Average home scores
  • Average allowed road scores
  • Average allowed home scores
  • Comparisons of the above

I won’t bore you with the technical details, but if they’re evenly matched, they should win 6 games each in this table.

BasisRoadHomeR-PredH-PredWinner
NE-RPatriotsFalcons28.516.5Patriots
NE-HFalconsPatriots16.530.5Patriots
ATL-RFalconsPatriots3425Falcons
ALT-HPatriotsFalcons3037Falcons
NE-R-ADJPatriotsFalcons31.4525.9Patriots
NE-H-ADJFalconsPatriots26.530.25Patriots
NE-R-ADJFalconsPatriots32.128.6Falcons
NE-H-ADJPatriotsFalcons36.12529.5625Patriots
Road-OFFPatriotsFalcons28.534Falcons
Home-OFFAtlanta FalconsPatriots3730.5Falcons
Road-DEFFalconsPatriots16.525Patriots
Home-DEFPatriotsFalcons3016.5Patriots

As you can see, the Patriots win 7 times, the Falcons 5. So it’s not a big mismatch at all. What is interesting is margin of victory.

Without adjustment, the Patriots win on average by 13 points, whereas the Falcons win by 8.

If looking only on offense, the Falcons should win, by 6 points. If looking only at defense, the Patriots should win, by 11 points.

When making adjustments for the Super Bowl opposition, the Patriots win on three of the four scenarios. Taking the Falcons’ base averages at home and adjusting for the Patriots’ road averages, the Falcons lose, by 6.56 points. Which is funny, because the Falcons are the designated home team in the Super Bowl, if that matters at all… which I doubt.

Anyway, if you add up all these match-ups you get the grand total. So what does it say…?

It says the Patriots will win 29.54 – 26.84. So let’s call that 30-27.

My pick: Patriots.
Predictor says: Well, it doesn’t predict neutral games, but if the Patriots are the road team, it confidently predicts the Patriots by 5 points. If they’re the home team, it’s less confident, but it still picks the Patriots by 5.

I’m sure Tom Brady would settle for another Super Bowl ring, and picking up the MVP car from Roger Goodell and let Matt Ryan keep his league MVP award.

Roger Goodell? He might not enjoy that so much.

2016-17 NFL Playoffs – Conference Round

We’re left with four teams and one of the number 1 seeds has been knocked out – so who will make it to Houston?

In the Wild Card round two weeks ago, all four home teams won. Last week, only two of the home teams won, with both the Kansas City Chiefs (#2 in the AFC) and the Dallas Cowboys (#1 in the NFC) sent packing, by the Steelers and Packers respectively. So, can either of them repeat their road wins again this week?

First, let’s look at last week’s predictor predictions:

GamePredictionResult
Seahawks - FalconsFalcons by 9Falcons by 16
Packers - CowboysCowboys by 7Packers by 3
Steelers - ChiefsSteelers by a hairSteelers by 2
Texans - PatriotsPatriots by 22.5Patriots by 18

In the Wild Card round, my predictor picked all games correctly. Last week, it picked 3 out of 4 – that’s still a decent 7 of 8 so far in the playoffs. More importantly (to me), the margin of victory seems to hold up quite well.

It predicted the Steelers – Chiefs game would be very tight, and suggested the Steelers would win by a whisker. And they did.

It predicted the Seahawks would lost by more than a score – even though I tried to come up with reasons why that would be wrong. And they did.

It predicted the Patriots would win by three scores. And they did. Not that you’d think that from the media reaction after the game… I’ll come back to that.

It also predicted the Cowboys would win by a score, and they didn’t. The Cowboys’ defense looked awful in the first quarter, and that really cost them as they fell behind quickly. They did really well to recover, but that sideline catch to set up the winning Mason Crosby field goal was really something special.

Anyway, I’ll refer back to those games as we look at the Conference Round games.

Pittsburgh Steelers at New England Patriots

Make no mistake, the Steelers were up against a good team last week. The Chiefs have a good defense and an offense that whilst not explosive, is well-balanced and doesn’t often turn the ball over. It was always going to be a tough game. But they won it, and they played well.

That said, they scored six field goals and no touchdowns. For a team with Le’Veon Bell, Ben Roethlisberger and Antonio Brown, even up against a strong redzone defense like the Chiefs’, has to be a little disappointing.

It was the Chiefs’ lowest home score of the season, so the Steelers’ defense deserve credit, but offensively, the Chargers, Saints, Buccaneers and Titans had all gone to Arrowhead and scored more. To win at Gillette Stadium, the Steelers will need to turn some of those field goals into touchdowns. The Patriots allowed only 27 touchdowns in the regular season – ranked #2 in the NFL, behind only the Giants, so that’s not an easy task.

The Patriots won their game by 18 points. It says a lot that despite winning by three scores, their performance was questioned.

Let’s be clear. The Patriots never really looked like losing this game. Yes, as a Patriots fan, it was frustrating to watch, but the Texans didn’t ever look like winning. Don’t believe me? Let me remind you:

  • The Patriots took the lead with 9:27 left in the first quarter with a dump-off pass to Dion Lewis. After that, the Texans never got back on terms with the Patriots – the closest they got was 14-13 with 10:49 left in the second quarter.
  • The Patriots scored 34 points – that’s higher than their season average.
  • The Patriots allowed 16 points – their season average is between 15 and 16 points.
  • All Houston’s points came from turnovers (2 INTs, 1 FUM, for 13 points) or drives kept alive by penalties (a 15-yard unsportsmanlike penalty on what would have otherwise been 4th and 8, resulted in a field goal).
  • Brock Osweiler’s QB Rating was 47.6.

Essentially, the game looked closer than it was at halftime because the Patriots made uncharacteristic mistakes – yet they still led. So, in truth, anyone with a brain knew they would go in at halftime – leading by 4 points – and sort themselves out.

And they did. They came out in the second half, made fewer mistakes (except Dion Lewis, who kept coughing up the football), and outscored the Texans 17 – 3. When they Did Their Job, the game was over.

One thing they will have to watch this week is looking after the football. The Steelers recovered 10 fumbles in the regular season (10), and if New England has been bad in one area this year, it’s fumbling the football – they gave away 9, compared to the Steelers, who gave away only 3.

Normally, after fumbling twice in a week, Bill Belichick wouldn’t start you the next week. As Dion Lewis did that but also scored three touchdowns, it’ll be interesting to see what happens to him this week…

The key to the Steelers winning is to stop the Patriots scoring. I know, it sounds obvious, but they won’t win if this becomes a shootout. If their defense makes this a low-scoring game, it’ll be a proper slugfest. If not, they will probably struggle. Turnovers will be key.

So, let’s predict this one.

The Patriots are 5 of 6 against playoff teams in the regular season. The Steelers are 4 of 7. Of those, the Patriots are 3 of 4 at home, and the Steelers are 1 of 2 on the road.

The Steelers have a good road defense. They have allowed no more than 20 points in 6 of their 9 road games. They’ve also scored 24 points or more in five of their nine road games, but all five of those games were against teams that didn’t make the playoffs.

My predictor tells me that overall, these teams are ranked closely for this matchup. However, the Steelers have been inconsistent on the road, and so it predicts a Patriots win. With the Patriots in the top 5 for scoring offense, overall offense, passing offense, scoring defense and rush defense, and the Steelers not appearing in the top 5 on any official metric, it’s hard to disagree.

However, the Steelers are, according to my own rankings, the third-best team in the NFL, and top two of those teams still left in the playoffs. The problem? The Patriots are the number one.

Pick: Patriots.
Predictor: Patriots, with 50% confidence, by 10 points.

Green Bay Packer at Atlanta Falcons

Forget the hype: according to my stats, neither of these teams are as good as their AFC rivals – despite what the experts and fans say. Too many people have been too quick to say the winner of this game will win the Super Bowl. They may, but the stats say if they do, they’ll win as underdogs.

My ratings measure seven metrics, in addition to the overall home/road ratings for each game. On each of those seven ratings, the teams are ranked from #1 to #32, with #1 being the best. So, the best possible score for a team is 7. The worst possible score is 32*7, which is 224. So, what are the numbers for the remaining teams?

TeamScoreRankRelative
Patriots14110
Steelers29316
Falcons51620
Packers56724

Of the seven metrics – which are Overall Rating, Home Rating, Road Rating, Points For, Points Against, Points Difference and Cumulative Median (I’ll explain that one another time), the Patriots lead the NFL in 5, and the Falcons lead in 1. The Patriots and Steelers outrank both the Falcons and Steelers on 5 metrics.

The Falcons lead the NFL on Points For. Green Bay are #4, ahead of the Patriots at #5 and the Steelers at #13. The Patriots lead the NFL on Points Difference, followed by Atlanta (#2), Pittsburgh (#4) and Green Bay (#6).

The relative ranks between just the four teams left are also shown in the table above, but essentially, the categories suggest the AFC teams are stronger.

So, the key question then is, of the Packers and Falcons, which is stronger? To be honest, my rankings suggest they’re very evenly matched, and I’d agree with that.

The Falcons are a more balanced team, with a good running game, a great deep threat with Julio Jones (and plenty other receivers besides), and a defense which seems to be peaking at the right moment.

On the other hand, you have a Packers team which doesn’t have a brilliant defense (bad news when playing the Falcons, but which has Aaron Rodgers, who will undoubtedly find holes in the Falcons’ defense. So expect a high-scoring affair.

The Packers aren’t a great road team, but they’ve won so many games on the bounce now (the last three against playoff teams, and the last game against the #1 seed in the NFC), I can’t see it affecting them.

I’m tempted to say whoever gets the ball first wins. But they Packers have won 7 of 9 games against playoff teams this season, and the Falcons are 3 of 5. I’ve gone against the Packers two weeks in a row. After *that* sideline throw last week, I’m not doing it again. They have a winning swagger and last week was the proof they are a very good team.

Plus, I’d love to see a Patriots – Packers Super Bowl. Rodgers and Brady in the same Super Bowl? Yes please!

Pick: Packers.
Predictor says: Falcons, with 80% confidence, by 5 points.

2016-17 NFL Playoffs – Divisional Round

We’re only two wins away from the Super Bowl, so who will be left standing after the Divisional Round this weekend?

In the Wild Card games in last season’s playoffs, all the home teams were knocked out. However, this season it was reversed, with all the road teams knocked out. So, what can be expected this week in the divisional round?

Last week, three of my picks (the Texans, Steelers and Seahawks) were correct, and one (the Giants) was incorrect. However, my predictor went one better, scoring all four correctly:

GamePredictionResult
Giants - PackersPackers by 8.5Packers by 25
Lions - SeahawksSeahawks by 9Seahawks by 20
Raiders - TexansTexans by 2.5Texans by 13
Dolphins - SteelersSteelers by 12.5Steelers by 18

As you can see, all four games were settled by margins larger than predicted – although the predicted margins were on the whole larger than most other people would have predicted.

The only exception to that would be the Raiders – Texans game, where most people would have expected the Texans to win by more than 2.5 points, but that was mainly down to the injury to Derek Carr, which my model doesn’t take into account.

All in all, my prediction model worked very nicely. So, how will it stack up this week? Let’s see.

Houston Texans at New England Patriots

Let’s get this game out of the way first. Let’s be honest – this is the biggest mismatch of the weekend. Despite being in the playoffs, and even getting through to the Divisional Round, the Texans are the twenty-third ranked team in my rankings.

They are a team that does two things well: they win at home, and they don’t allow many points – at home.

The trouble is, they’re playing on the road, where they allow, all things being equal, ten points a game more, score six points a game less, and lost three quarters of their games.

They play the meanest defense in the league, and an offense that can score on the ground or through the air almost at will.

A sidenote: I know people say the Texans have the league’s best defense. They don’t. The Patriots do. The Patriots allow fewer points per game than any other team (by two points a game). Give out awards for yards a game if you like, but last time I checked, you win based on points scored. That matters a whole lot more.

So, who’s going to win? The Patriots. By how much? Anywhere between 10 and 40 points. I could cloud you with more figures, but I won’t bother – apart from this:

My predictor is 35-3 in games this one-sided this season. One of those was the Cardinals beating the Seahawks in week 16. Another was the Bills beating the Patriots 16-0 in week 4, when the Patriots didn’t have a fit quarterback. The final one? The Texans – Chargers game in week 12. Unfortunately for Houston, they were meant to win it, and they lost – San Diego’s only road win of the season.

Pick: Patriots.
Predictor says: Patriots, 83% confidence, by 22.5 points.

Pittsburgh Steelers at Kansas City Chiefs

This is an interesting matchup. If the Steelers were at home, they would be clear favourites, but a trip to Arrowhead makes this much harder to pick.

Undeniably, a team with Ben Roethlisberger, Le’Veon Bell and Antonio Brown are not a team you can write off. Nevertheless, the Chiefs’ defense is tough, they have a quarterback who doesn’t tend to turn the ball over, and they also can run the ball. Add on to that a bye week to rest, and Andy Reid’s 16-2 record after a bye week, and something has to give. So who’s it gonig to be?

People will tell you the Steelers are poor on the road. Well, they’re not the best team, but they are 5-3 on the road, and the Chiefs are only marginally better at home (6-2), so there’s not a lot to choose there.

Intriguingly, their average points per game are almost identical (23.47 to 23.81), as are their points allowed (18.76 to 18.81). However, the Chiefs are marginally better scoring on the road than at home. The Steelers are the third-rated team on the road, behind only the Patriots and Cowboys. So, are the Steelers edging towards victory?

The Chiefs are 2-2 in their last four home games, which have been the toughest of their home games. The Steelers are 4-0 in their last 4 road games, and haven’t allowed more than 20 points in any of those games. They’ve also scored at least 24 points in all those games. That’s a significant turnaround compared to their first four road games, where they scored fewer than 16 points in 3 games, and allowed more than 20 on 3 occasions.

The Chiefs are 1-0 in home games against playoff teams this season, whilst the Steelers are 0-1 in road games against playoff teams.

I’ve flip-flopped on this all week, and I’m not confident. But I’m going to back the Steelers’ recent road form.

Pick: Steelers.
Predictor says: Too close to call. Based on previous similar matchups, it suggests Steelers.

Green Bay Packers at Dallas Cowboys

I refuse to get carried away with how good this Green Bay Packers team is. Yes, they are good, but they’re not really good. Last week, they were flattered by a New York Giants team which had plenty of opportunities to take a big first half lead, but didn’t take them. The Giants paid for that in the second half, but the game could have looked very different had they taken those chances. I suspect the Dallas Cowboys wouldn’t have wasted those chances…

The Packers still have two main weaknesses. First, their defense is not great, especially right of the hash mark. I expect the Cowboys to exploit this. Second, they struggle to run the ball. There’s only so long you can rely on Aaron Rodgers. You need more than him to win a Super Bowl. The Cowboys’ defense aren’t great, but they aren’t bad either, and allow 6 points fewer per game than the Packers. It’s definitely advantage Cowboys.

The Packers give up too many points on the road. They allowed 47 against the Titans, 42 against the Redskins and 33 against the Falcons. Yes, they’ve also scored 30 points three times, but who against? The Falcons (terrible defense), the Bears (just terrible) and Lions (average).

The Cowboys have allowed 20 points at home 5 times, but never more than 26. They have only once scored fewer than 20 points at home, have surpassed 30 three times, and on one of those occasions, they scored 42 (against the Lions).

The Packers are 1-1 in road games against playoff teams this season. They beat the Lions and lost to the Falcons. The Cowboys are 1-1 in home games against playoff teams – they beat the Lions and lost to the Giants.

But, looking at the season, the Cowboys always do the business when they should – except against Eli Manning. Tom Brady knows all about that. The Giants just defy convention.

Pick: Cowboys.
Predictor: Cowboys, with 83% confidence, by 7 points.

Seattle Seahawks at Atlanta Falcons

Although there are three cracking games this week, this is for me the most intriguing, because it’s a battle of relative strengths and weaknesses. It’s hard to know what will win out.

On one hand, the Falcons have an explosive offense, up against a team that whilst not as good as it has been, is hard to beat in the air. On the other, you have a Seahawks team which has struggled to score consistently, up against a Falcons defense which has more holes than emmental.

I suspect the end product may end up disappointing, as I’m coming to the conclusion the Falcons will likely be more able to score against a tough Seahawks defense, than the Seahawks will be able to take advantage of the Falcons’ ropey defense. I do hope I’m wrong though.

The Falcons have allowed 29 points or more 6 times at home this season, and have scored 30 points or more 6 times too. Their lowest scoring home game featured 54 points, a 41-13 win against San Fransisco. They have lost at home to Tampa Bay, San Diego and Kansas City, but all needed at least 25 points to win. Can Seattle score that many?

It’s hard to know. They can, but they don’t consistently. They scored 31 against New England on the road, but they also scored a combined 24 in Los Angeles, Arizona, Tampa Bay and Green Bay. Those four games combined would be enough to get a tie against Atlanta in their lowest-scoring game.

This is the Seahawks’ problem: against balanced teams, they’re a good matchup. They don’t create massive mismatches. Unfortunately, that’s their downfall this week. The rest of their game probably can’t make up for the mismatch of Julio Jones. I think any thoughts to the contrary are probably wishful thinking on my part.

Pick: Falcons.
Predictor: Falcons, with 62.5% confidence, by 9 points.

2016-17 NFL Playoffs – NFC Wild Card

Following on from my insight into the AFC playoff race, here’s your guide to the NFC playoffs.

New York Giants and Green Bay Packers

This game is easily the juciest game of the weekend. One team on a 6-game winning streak against another known for shutting down opposing offenses. Even better, the Eli Manning is 2-0 in the playoffs when playing at Lambeau Field, so this really should be the game to watch…

The Giants are 3-2 against playoff opposition this seasom. The Packers are 5-2, including a win against the Giants at Lambeau Field. The only playoff team the Giants have beaten on the road is the Cowboys (week 1). The only playoff team the Packers have lost to at home is the Cowboys (week 6).

The game isd essentially two teams’ weakenesses matched against each other on one side, and their strengths on the other. Are the Packers’ offense (ranked #4 on points) better than the Giants’ defense (#2)? Are are the Packers’ defense (#21) worse than the Giants’ offense (#26)?

At some point, Aaron Rodgers has to turn the ball over. At some point, the Packers’ run must end. At some point, Eli Manning and Odell Beckham Junior will connect and show that the Giants’ offense can be better than that #26 ranking.

The Giants’ pass coverage and the Packers’ issues in coverage, especially down the field on Clay Matthews’ side, mean this matchup is built to expose these. It may not happen, but this is the best chance the Giants will get.

I’m not confident picking this game, not least because both teams have been inconsistent this season. Despite the Packers’ impressive six-game winning streak, only the win against the Seahawks was unexpected. The other five were weak opponents. They’ve given up at least 24 points in each of their last three games, and that makes me think they’re not quite as good as others think, and that the Giants have just enough hope they can overcome their ropey road form to pull this one off.

The Giants and Packers met at Lambeau Field in week 5. The Packers won 23-16.

My pick: Giants
Predictor says: Packers, 80% confidence, by 8.5 points.

Detroit Lions at Seattle Seahawks

Let’s cut to the chase here: the Detroit Lions are the only playoff team not to have beaten another playoff team this season, and it’s not for lack of opportunity. They have lost to the Packers at home, and on the road to the Packers, Cowboys, Giants and Texans.

That really should tell you all you need to know. Against non-playoff teams, the Lions are 9-2. Against playoff teams, they are 0-5. They’ve had a good season, but it ends here. They’ve hit their glass ceiling. That shouldn’t disappoint them, they just need to accept they’ve hit their maximum potential this season.

The Seahawks, on the other hand, whilst inconsistent this season, have played well against playoff opposition, winning three out of four games. They beat the Falcons and Dolphins in Seattle, and beat a Brady-led Patriots team on the road in an impressive week 10 win. Their only loss was an odd road loss to the Packers 38-10 in week 14.

The real differentiator here is that whilst both teams score around 20 points a game, the Lions give up around 21, whereas the Seahawks are closer to 17 points a game. I don’t see the Lions running many points up on the road in Seattle.

My pick: Seahawks
Predictor says: Seahawks, 80% confidence, by 9 points.

Bye Week: Dallas Cowboys

If the New England Patriots are the best team in the NFL, most people would agree the Dallas Cowboys are the next best, and the best in the NFC. The regular season definitely suggests that, although come the playoffs, they will have to beat quality and experienced opposition to get to the Super Bowl.

The question mark the Cowboyd have to answer is this: when facing up to the Seahawks, Packers and Giants, do they have the poise to beat teams with quarterbacks like Russell Wilson, Aaron Rodgers and Eli Manning, who between them have five Super Bowl appearances, four of those on the winning side? No matter how good the Cowboys are, they will be up against teams who have proved they can win in the postseason, even if they’ve been merely average in the regular season.

Outside of experience, the Cowboys only have one obvious weakness to exploit: defense. They won 7 out of 8 games at home, their only loss was in week 1, to the New York Giants, and even then only by a point. Furthermore, four of their wins were double digit wins. However, they give up a median of 20 points at home, which whilst not the worst of the playoff teams, is not league leading either (though it should be pointed out, the three teams leading the league on this all missed out on the playoffs).

If you can slow down the Cowboys on offense, they’re beatable, because their defense allows scores – every road team scored at least 14 points this season against the Cowboys, compared to the Patriots who allowed three road teams a combined 13 points, whilst piling on 94 points at the same time.

Bye Week: Atlanta Falcons

If the Cowboys’ defense is a weakness, the Falcons’ defense is positively ugly. They allowed 29 points or more in 6 of their home games this season, which would put road teams in the top 10 for scoring in the NFL this season.

Of course, the reason Atlanta are in the playoffs is that they lead the league in scoring, comfortably, with an average of nearly 34 points a game.

That’s great, but what happens against quality opposition? Well, their two closest games this season at home came against two playoff teams. They played the Green Bay Packers in week 8, winning 33-32, and played the Kansas City Chiefs in week 13, losing 29-28.

In fact, despite all their scoring, five of their home games were one possession games. They beat three teams by two, three or even four scores, but those teams were the Panthers, Cardinals and 49ers, none of whom were great teams this season.

It’s hard to put 40 points up against a playoff team, and when you concede an average of 25+ points at home, you don’t have much margin for error. In short, this team gives up too many points to win the Super Bowl.

And the bad news? The most likely visitors to Atlanta next weekend are the Seattle Seahawks. To me, that’s the worst possible matchup for this team.