A pleasant walk through computing

Comment for me? Send an email. I might even update the post!

How to Secure-Erase Regular and SSD Hard Drives Without Superstition

"Securely erasing a hard drive requires at least three passes"

"Securely erasing a hard drive requires randomly mixing ones and zeros"

"Securely erasing a hard drive requires 35 passes if you want to really be safe"

From my research, none of these is true. The simple facts are:

  1. To securely erase a mechanical (i.e. "magnetic" or "platter") hard drive, write one pass of zeroes (or ones) to the entire drive.
  2. To securely erase an SSD, just delete all the data. Not format. Delete.

References

This article nicely summarizes the research.

You Only Need to Wipe a Disk Once to Securely Erase It

SQL Permissions for Data Folders

I always have trouble finding how to do this. When an .mdf file is located in a folder other than the SQL's Data folder (set up during installation), it can't be seen when trying to Attach.

To make it visible, add the SQL Instance NT Service user to the folder. For example:

  • My SQL Instance is named SQLEXPRESS2016
  • My database files are in F:\SQL
  1. Right-click on F:\SQL and open Properties > Security tab
  2. Edit
  3. Add
  4. My object name would be NT SERVICE\MSSQL$SQLEXPRESS2016. You have to enter it this way, you can't search for it.
  5. Grant Full Access
  6. Save and exit

If you want to be able to use SQL's Browse button, do the same as above on the "F:" drive, but only giving Read access.

Grammar for Developers - 3 Simple Rules, 3 Common Mistakes

It's a truism that (many) developers are not good writers. And it's not just style or composition, it's grammar. This has always puzzled me, since if a programmer makes a grammar mistake (using a backtick instead of an apostrophe, for instance), the program won't run. Maybe the problem is that they don't pay attention to the red squigglies in Word.

Here are three rules that, if followed, would take care of about 70% of the most grievous errors I see in blog posts, emails, business proposals, and technical documentation.

I even made a fancy PDF.

Grammar for Developers - Apostrophes

3 Simple Rules

  1. Never make a pronoun possessive using an apostrophe
  2. Always make a noun possessive using an apostrophe
  3. Never use an apostrophe with a verb**

3 Common Mistakes

Right: Unit testing has its benefits.
Wrong: Unit testing has it's benefits.

Right: Carol's code is clean. Her code's style is precise.
Wrong: Carols code is clean. Her codes style is precise.

Right: He runs that backup every day.
Wrong: He run's that backup every day.

Terms

A noun is a specific person, place, thing or idea: Carol, France, house, radish, memory, Chipotle.

A pronoun is a generic, non-specific person or thing. These are the common pronouns: it, he, she, her, them, they.

A verb is an action taken by the subject. He codes. She tests. They demonstrate.