Tools for Diagnosing Domain Name Issues

Oftentimes when inheriting a web project you also inherit myriad domain name related issues. And, as always, the command line is your friend for finding quick information associated with that domain name. Here’s a few tools I’ve been using a lot lately:

Whois lookup

A simple whois lookup will give you basic information on a domain name. It’s a good way to check for availability or when a domain name is going to expire. Use it like the following:

whois chrissalzman.com

If you just want the line for when it expires you can grep your way there:

whois chrissalzman.com | grep "Registry Expiry Date"

This should print something like the following:

Registry Expiry Date: 2018-08-08T14:10:49Z

Redirect testing with curl

curl is one of those tools that I’m constantly finding uses for. Recently a tech I was working with showed me this trick:

curl -IL google.com

This’ll show you just the headers and the redirect path a domain takes to its final destination. It’s especially helpful for debugging redirect rules on your server. Or in a recent case it helped me diagnose an issue I was having with a forwarding service from an unnamed large registrar.

Anyway, running the above command will show you that going to google.com has one 301 redirect to www.google.com. This is a pretty standard setup (although fascinating to note they don’t redirect to https).

The -L flag asks curl to follow any redirects. Without it it will just return whatever is at the first page. Try a curl request on just google.com with no flags and you’ll see that it returns a terse page:

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

The -I or --head flag fetches “the HTTP-header only!”, according to the man page. This is useful when you don’t care about the page itself, but do care about the headers relating to redirects and IP addresses.

Combine these two flags and you’ll get the chain of redirects to the final resting place when you to to a site.

I also found out that it will give you a response of about any SSL issues you encounter. I was hitting one for my domain that required an nginx restart.

host -a

This allows you to request “all” which theoretically returns any records setup for that hostname. This is most useful on, say, a base @ record so that you can see any of the mx, txt, ns, or other records for it:

host -a chrissalzman.com

I’ve found that occasionally this doesn’t return everything to you. I need to investigate this more, but my assumption is it’s due to network speeds. If you run this and don’t get all the records you’re expecting it’s worth rerunning. Some nameservers deny this request, but most don’t. They should notify you if they are denying it

If all you need is A record for that hostname you can drop the -a flag.

dig

Shortly after publishing this post Benedict Singer showed me dig!

dig is powerful. From the man page under BUGS it says “There are probably too many query options.” That is true, it seems like it can do almost everything you need related to DNS.

Basic usage let’s you do a similar lookup to host. The result is extremely similar in terms of response time and output:

dig chrissalzman.com

Adding in any is equivalent to -a for host:

dig chrissalzman.com any

Drop any and add in +short to only return the IP address for the record you’re looking up:

dig chrissalzman.com +short

For my purposes one thing that looks interesting is that you can feed it a bunch of domain names from a text file using the -f flag.

dig -f dignames.txt

dignames.txt contains a list of domain names, one per line, and it quickly iterates through them. I could see this being useful for scripting purposes if you wanted to, say, periodically check if an IP had changed on a host record (sometimes these things get changed by maybe not evil, but certainly incompetent, registrars). Adding in +short will also strip out the boilerplate surrounding the response.

This one will show you the “delegation path from the root name servers”:

dig +trace chrissalzman.com

And this is great for reverse DNS lookups:

dig -x 1.2.3.4

A non-command line bonus tip: whatsmydns.net

After you make a change to your host records it can take a while for it to filter out across the internet. For checking to see the status of that change around the globe I like using whatsmydns.net. They have servers around the world that do an host name check and return the results.

This is also a very useful tool to see if your name server is using multiple IP addresses for your host records. Oftentimes if you use a forwarding service or have a parking page put up you’ll run into this.

Any others?

If I missed something you use day to day, please share!

Posted in y

CSS Grid is Good

The short version of this post is that CSS Grid has me excited about the prospects of web layouts again. From here on if I have the option to use CSS Grid I’ll be using it. Go to Rachel Andrew’s fantastic Grid By Example site and do some examples.

Longer Version

This all kicked off when a friend shared this talk by Marten Rand-Hendriksen about CSS Grid:

It had me hooked for the full 30 odd minutes. It’s rare for a conference talk to grab me enough actually try something, but I opened my text editor immediately after watching it. If video isn’t your thing, here’s his slides.

There’s a lot of reasons why I think that styling on the web is hard for people. Mostly it comes down to a question of mental models. Folks who are learning naturally think that CSS will be able to easily do something it can’t. If you’ve ever watched someone try to put two columns side by side or center something you’ve seen this firsthand. I’d argue that CSS Grid’s primary strength is that it closely fits the mental model most poeple are already trying to apply to web layouts. They want to draw boxes and put them next to or on top of each other. CSS Grid allows you to go from low fidelity to sketch to working version in a more intiuitive way.

That’s very powerful and I’m excited to see what emerges from it.

Semantic Markup Tho

Ease of coding is one thing, but grid also makes it far easier to separate the semantic markup of a page from the visual styling. Your templates don’t need to be strewn about with div’s to make it all work. Instead you piece the page together semantically and then visually it can match your…well, your vision.

The Basic “A-ha!” Example

I’d recommend working through this basic example yourself. Pick your classic website template: a header, two columns left to right, and a footer. This is difficult–although not impossible–to pull off without grid and shockingly easy to pull off with grid. I’m still a bit stunned at how minimal the css is to make it work even responsively.

You really should go do it yourselves. Here’s a working solution. And here’s a gist of the code.

Note: you don’t actually need the line grid-template-columns:1fr 1fr; if all of your columns are going to be the same width as they are in this example. I find it’s better to be explicit though because future you needs all the help they can get.

A Few Things That Caught Me Up

Here are a few issues I ran into. Putting them here in hopes you don’t also make my mistakes:

Don’t Forget Your Display

Just don’t forget this line in your css on the main parent grid element or you will be sad for 45 minutes wondering why nothing was working:

display:grid;

Get your grid numbers straight

Off by one errors are easy to run into. The grid designations start with “1” on the far left and end with one more than whatever you’ve designated for your columns.

So if you’ve done this, as I did:

grid-template-columns: 1fr 1fr;

And you want something to span the width of the grid you need to set it to the following:

grid-column: 1 / 3;

That will go from the left edge to the right edge. To me it made more sense to do “1 / 2” (“the first box to the last one, of course…?”), this is actually how Microsoft did it for the initial spec. There are good reasons to get away from this, but it’s not as intuitive to me.

Firefox is Good

Firefox has a grid inspector built into the dev tools. Navigate to the element that has display: grid on it and click on the little grid icon to toggle it on.

Super useful for seeing how it’s all fitting together.

Draw it Out

If you’re having issues with getting it all aligned I found it useful to roughly draw out the layout(s) and put boxes around discrete chunks. It helps to visualize your intended output. Code is great, designing using code is not.

Is it supported everywhere? What about IE?

Edge has full support as do the other major browsers and mobile devices. IE 11 has support with a prefix for an older spec.

You should be designing with progressive enhancement on the mind though. I liked what Rand-Hendriksen had to say in his talk about this: “Accessible mobile-first layouts work well on all screen widths”. You can deliver the “mobile experience” to users whose browser’s don’t support the latest and greatest fancy specs and it’s probably fine.

Rachel Andrew is the expert on all of this. She has a great blog post on the pros and cons of trying to use it in IE:

https://rachelandrew.co.uk/archives/2016/11/26/should-i-try-to-use-the-ie-implementation-of-css-grid-layout/

The good news is that the IE implementation is pretty much frozen in time between IE10, 11 and current versions of Edge (presumably until Edge updates to the new specification). So work you do to implement grid in IE should work in those versions without needing to do different things for different IEs.

Do remember that Edge is now “the” browser for Windows 10 and beyond. It’d been a few years since I took a look at the browser marketshare and it was englightening: Chrome is very much in the lead these days.

Special Thanks

Thanks to Sam Firke for moral support and editorial comments on this post!

A2 Local Politics: In Which I Link to a Sports Blog

A2 local politics filter: I really liked this piece by MGoBlog about the upcoming election.

Been thinking about this quote for the past day:

“Denying the fact that Ann Arbor will change with weak appeals to parking, traffic, and floodplain development is pure NIMBYism and should be rejected out of hand. Keeping Ann Arbor “funky” or “unique,” which seems to be the main goal cited by development opponents, is 1) impossible and 2) detrimental to everyone in the community who isn’t already locked into a mortgage they intend to keep until they die.”

We’ve been in A2 for 8ish years now (I really need to do the math on that). I’ve said goodbye to A LOT of people who would have loved, or at least liked, to settle down here, but it just doesn’t make financial sense. The only way out of that is to build more places for people to live (or to make it unattractive to investors looking to diversify their investments by buying up single family homes, but good luck defending that position (shout out to my landlord friends! I don’t hold this against you and would do the same if we had the capital!)).

Unless, of course, you don’t want new people to settle down here. If that’s the plan, well, yeah, don’t do a thing to anything.

My wife and I were able to buy in because of generational wealth, two steady incomes, and a willingness to put in sweat equity. Yes, it’d be easier money-wise if we didn’t have a kid. I’d like to think that “raising future consumers and citizens” shouldn’t preclude home ownership though. If prices continue trending upwards as quickly as they are we wouldn’t be able to afford to be within the city limits in a few years.

Anyway, long-winded and not very concise way of saying I’m voting for Ackerman for Ward 3 because he’s pro-development. My political stance these days is that we should so many buildings that you wonder how in the world so many buildings could be built at the same time.

Fitting a Stove in a 2003 Honda CRV

Yes, a standard issue stove (or an oven or a range depending on what you want to call it) can fit in a 2nd Generation 2003 Honda CRV if you put the seats down and finagle it a bit.

If your car is somehow magically clean too you could probably put the seats all the way up and not have to finagle as much. You might even be able to keep the left passenger seat up, although I wouldn’t count on it.

Inside the Car
Hatch Open

I do not have a 2002, 2004, 2005, or 2006 CRV to test this on, but I’m pretty sure it’ll fit in those too.

Refinishing Our Floors, a DIY Sanding Adventure

The past few days have been spent staring at the floor. Prepping them with the help of a friend (thanks, M!) and then so much sanding with another friend (thanks, K!).

Here’s a portion of the floors before we did anything:

What we started with

What followed was a lot of prep. The previous owners had carpet everywhere which meant staples and nails (they also had pets they didn’t take care of, but that’s a whole other issue). Even with no furniture in the house this took forever. Every time I thought we were done there’d be something else I’d overlooked (“got all the doors off, check. Oh, right, closet doors too…”).

Friday was supposed to be the first big day of sanding. The plan was to use a large orbital sander instead of a drum sander. Slower, but easier to handle for someone who didn’t know what they were doing. I got the sander got home and realized that I wasn’t nearly as ready as I thought. More prep and moving things ensued. By the time I was actually ready to start the sander it was 4 hours later than expected. Managed to do one pass just to prove I could and then left for the night.

On Saturday K came over and we clocked a twelve hour day of sanding, vacuuming, and running to the hardware store. If he hadn’t come I don’t think I would have finished this. Three cheers for K! We did stop for lunch, dinner, and ice cream. I’d rented a fancy powerful edger which proved to be more trouble than it was worth (YMMV). We returned it and bought a hand-held orbital sander that took longer, but gave more even results.

It took four solid passes with different grits to get to the finish we were looking for (36, 60, 80, 100 for future reference). In retrospect we probably didn’t go deep enough since there are still some scratches here and there. Oh well!

We wrapped up after 11pm and left exhausted. Here’s the only progress picture I have because it was a frantic day. This was my view the entire time:

Progress Sander

Here’s a few sanded pictures:

Sanded segment

Sanded

My wife helped vacuum out the place on Sunday and then I put some polyurethane in a discrete location for testing. It looked not great. Here’s the test spot:

Gross. Unstained with Poly

This is admittedly the worst spot in the house, but still was deflating. If we were doing this “right” we’d be replacing the bad planks throughout the house–each room has a handful. Our goal isn’t perfect though (for a lot of reasons, but mainly cost and also because we’re trying to not be too precious about these things). We talked it over and decided to try staining.

Stains all have great names. It’s like paint colors but aimed at dudes. There was one called “Gunstock”, which is just like…come on. Here’s a few test strips. The left is Minwax’s “Early American” and the right is “Provincial” (the far right is the unstained poly test):

Stain Options

We opted for Early American with the thought that it’d blend all the wood we had in the house together well. Fingers crossed I went and bought a gallon and a quart of it.

That lead to another grueling late night of staining. Hands and knees wiping it on and wiping off the excess with cloth rags. Again finished after 11pm and just managed to shower before collapsing into bed. The result though exceeded expectations:

Just the stain

Then on Monday I put the first coat of poly down (we went with Varathane’s water-based floor finish) and it started to shine (I mean, yes, that is sort of the point of poly, but you know).

Here it is right after application:

One Coat of Poly

And here’s the second coat drying:

Two Coats of Poly

Tuesday morning I put the final coat on and now we wait for 48 hours before we can walk on it:

Three Coats of Poly

And here’s the worst corner and what it looked like with 2 coats of poly on it. It’s night and day from what it looked like when we started:

The corner stained and with a few coats of poly

Update on the thursday after: here’s a few more pictures after drying for a few days. It’s a lot glossier than I thought it’d be. Some bubbles and small bits of things here and there. We’ll sand out the egregious ones or just live with them:

Dry and Up Close

Dry in the entry room

Would I ever do this again?

Maybe.

If you’d asked me right after the sanding I would have said absolutely not. Now that we’re seeing the results I am appreciating the “why” behind each of the subsequent steps more.

If we were to do it again I’d be more aggressive with sanding from the start. We started with too high a grit and had to go back to a lower one which added hours to the project. I’d also split up the sanding to 2-3 days rather than trying to cram it into a short a time as possible. I’d also probably have someone show me how to use a drum sander and use it well. The orbital sanders were good enough for this project. I don’t know if I’d have the patience to use them again though.

Lessons learned!

House Stuff We Need

We’re closing on our house on Wednesday!

That’s terrifying so I’m combating the thought of draining our savings accounts with planning and packing.

We’re looking for a lot of things that are not the sort of things one needs while renting. Do you have any of the following you no longer need?

  • 8 foot ladder (attic access)
  • 1620 foot ladder (for getting to the roof)
  • 2 foot-ish step ladder (for getting slightly taller)
  • Lawn mower
  • Shop Vac
  • Miter Saw

Oct 12, 2018 update: we have all of this and so much more now. So much.

Headshots

My wife and I are opening up a few spots over the next month for corporate headshots in or around Ann Arbor, Michigan.

Generally speaking this is for those of you who need to update the headshot on your website, your social media profiles, your business cards, or to have a photo on hand for any upcoming presentations or publications.

You can see a portfolio of our work over at our website.

Why You?

What we think we bring to the table is a focus on kindness. When someone sees this photo of you they should get a sense of you. We don’t prescribe you wear certain clothes, or that we do your headshots in a specific place. We’ll work with you to find a good natural pose, but you should be you and sometimes that means we won’t clean up your desk (entirely), or we might go outside because outside is where you feel more alive.

We’re not going to do crossed arms.

We’re not going to do angry looks (although we might for fun).

Gently put, if you need to be intense or intimidating we’re not the right photographers for you.

Money Stuff

We’re not the cheapest photographers (nor the most expensive) and we’re wholly comfortable with that. Our rate these days for one location and one person starts around $225 and goes up from there (rarely down, but let’s talk if you’re working for a non-profit).

Where does that money go though?

There’s a lot that goes into a good headshot and only a small fraction of it happens during the shoot itself. What you usually don’t see is all the work before we take the photos and all the work after we take the photos. There’s packing and setup and travel, then the shoot, then the hours spent afterwards managing files, deleting the bad ones, obsessing over the good, and generally making it as easy as possible for you to be very happy with the results.

Conclusion

All that to say, let’s talk. Send Chris an email or find us in person! If we’re not the right fit we’re extremely happy to point you in the direction of any of the other amazing photographers around Ann Arbor.

Posted in y

Cleaning NES and SNES Consoles

NES Console

72 Pin with four different choices: Boil, Clean Bend, or Replace

Clean

You can clean the connector somewhat by putting isopropyl alcohol on a clean cartridge and reinserting it a few times. Clean the cartidge between insertions. Or, dismantle the console and clean the connector itself off of the board.

Boiling

While this sounds like it couldn’t possibly work, it looks like it does.

Bend

I’d really recommend against this. I’ve tried it. It’s hard to do and I did more harm than good. If you must, get some quality dental tools. If cleaning or boiling didn’t work you should replace it.

Replace

You can get a replacement for between 10 and 30 dollars on the internet. Here’s what 10 gets you.

I’ve tried one of these before and didn’t like it. Super stiff and felt like it was scratching the pins of the cartridge.

The Blinking Light Win, on the other hand, looks very promising.

Go more expensive if you can. The cheaper ones are often not built to nice tolerances. Replacing it is a matter of unscrewing screws and careful popping off the old one. If you’re reasonably handy it’s extremely doable.

SNES Consoles

The easiest way to clean the connector inside is to clean a cartridge, then wet the cart, insert it, clean the cart, and repeat that process. An alternatively is to, very carefully, use a microfiber cloth and alcohol. There’s a lot that can go wrong (snag on the pin because you delved too deep) so be careful!

The design of the SNES is such that the pins will rarely go bad, which is good because replacing the pins is more or less impossible without a lot of soldering.

Note on replacing batteries

Games with save systems rely on a battery backup to keep the save stored on the cartridge. That battery will eventually go bad. The batteries are a standard CR2032 and is–relatively–easily changed. You’ll need access to the insides of the cartridge. After that, you disengage the battery from the cartridge , replace it, and secure the battery back in place. This might require some soldering, although there are tutorials for ways to do it without soldering. You can also buy battery replacement kits

Cleaning NES and SNES Cartridges

Your NES or SNES is likely not broken. The problem is almost always do to a poor connection between the console and the cartridge. Over time either the pins inside of the console, or the pads on the cartridge, get corroded and encased in funk. Get rid of the offending materials so a proper connection can be made between the two and everything magically works.

How do you do that though?

Don’t blow into it

Really, don’t do that.

If you’re able to get a game to work by pulling it, blowing on it, and reinserting it, all you did is either seat the cartridge in a slightly different place, scraped off some of the gunk onto the internal connectors. Or, worse, the moisture from your gross mouth is facilitating a connection. Whatever the cause, later on the moisture is not going to be your friend, which is why you shouldn’t do this.

If you must force air into it use compressed air. However, unless there’s an obvious bit of fuzz in there, the problem is likely something that’s not readily removable.

Opening things up with Gamebits and Pens

Picking up a set of gamebits–really an inverted torx–for cleaning and repairs is advisable. There are two that you’ll need: one for the console itself and one for the cartridges. If you get a good set it’ll be universal across almost every game system that accepts cartridges. Plus, if you have a good game store nearby, like the excellent Get Your Game On in Ann Arbor, they might have them available. Alternatively, you can order a set from amazon or an ifixit kit that has them included.

My feeling is that if you’re going to do this more than a handful of times it’s worth getting a set. It’ll speed up cleaning since you have more surface area visible to you without trying to peer around plastic.

On to the cleaning

Whether or not you get the gamebits cleaning is about the same: scrape off what you can with dry materials then get the rest with wet materials until it’s squeaky clean.

Here we have a shockingly gross looking copy of Final Fantasy. I’m honestly not sure where I got it, but, yikes:

Front of cartridge

Side of cartridge

Interior of cartridge

Dry Process

I’d suggest loosening anything on the plastic part of the shell with a toothpick if it doesn’t come off with a dry q-tip. This is surprisingly effective at gently scraping away offensive stuff. On this Final Fantasy cartridge I was able to remove most of the sticker and a chunk of the whatever it is from the casing.

If you can open the cartridge you can use an eraser on the pads as well. Just be careful to clean up the leftover eraser bits after you’re done. If you use one, I’d recommend a separate eraser (the trapezoidal pink ones work well) not one attached to a pencil. You’re liable to slip at some point and you don’t want to gouge the PCB with the metal eraser holder.

Wet Process

Q-tips and isopropyl alcohol. Go with 91%. If you need it fast, it’s easily found anywhere that has a pharmacy. I’d recommend a small bottle if you can. You’re unlikely to run out and a smaller bottle is easier to handle.

Wet one end of the q-tip in a small amount of isopropyl alcohol. Then rub that on the pads inside of the cartridge. Continue to do this until the q-tips stop coming out with any amount of blackness, or brownness, or grayness. Just white wet q-tip, please.

Depending on the cart this can take a lot of q-tips. Throw on something on netflix and scrub away.

Clean front

Clean Side

The detritus

Once you’re done, put it all back together and try it out!

The definitive guide to cleaning is from hardcoregaming101. I haven’t tried Brasso yet, but am planning to on at least one NES cartridge I can’t get to work in any other way:

Retrowaretv recommends against brasso.

As a point of interest: cartridges have different pins!