Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts

Thursday, October 21, 2021

Windows 11

 The last time I posted on updating to a new version of Windows was way back in 2014.  Here's the link:  Sigma 5: Windows 8.1 - try 1.  Microsoft has a mixed record when it comes to Windows versions.  Many of them are successful, but some of them are failures.

Windows 7 was a big success.  Then Microsoft made a giant leap with Windows 8.  It flopped.  They tried to recover with Windows 8.1.  It too flopped.  As I noted in my long ago post, I ended up giving up on Windows 8.1.  I test drove it briefly, then I went back to Windows 7.  (I never even tried Windows 8.)

Windows 8 was supposed to be a "swings both ways" release.  It was supposed to work well on desktops and laptops, machines that come with a keyboard and a "pointing device" (mouse or touchpad).  Windows 7 worked very well on those kinds of machines.  Windows 8/8.1 was supposed to work equally well on them.

But it was also supposed to work well on tablets, touch screen devices that lack a keyboard and use a the touch screen as a substitute for the pointing device.  Windows 7 worked less well on those kinds of devices.  The idea with 8/8.1 was to provide a common software environment that software developers could write to that would smoothly span both environments.

Windows 8/8.1 was a technical success but it was a commercial failure.  Developers could now write to a common standard.  But, since customers stayed away in droves, why bother?  Microsoft eventually recovered with Windows 10.  It dropped the annoying features of 8/8.1.  It added some improvements, but, for the most part it was perceived as a refresh of Windows 7 that contained little new.

That was an accurate perception.  Windows 10 was a popular success.  I upgraded my machines to it, and so did lots of other people.  That success left Microsoft wondering how to move to a version of Windows that would succeed where 8/8.1 had failed.

It would work well, both in a keyboard/mouse environment, and in a touch-screen environment.  But what they came up with this time also had to be popular with customers.  Microsoft has spent several years trying to come up with such a solution.

But before moving on to the solution that Microsoft has finally come up with, it is worth while looking at a very substantial change that Microsoft made with Windows 10.  It wasn't a technical change.  It was a change in the way they did business.

Previously, if you wanted to move to the new version of Windows, you had to pay an upgrade fee.  For instance, if you were running Windows 7 and wanted to move to 8/8.1 you had to buy an "upgrade" license.  The upgrade version, which was much cheaper than the regular version, included code that validated that you had an authentic Windows 7 license before permitting the installation to proceed.

This business of offering a full price "regular" version and a heavily discounted "upgrade" version of each new release had been the way Microsoft did business all the way back to the days of the DOS 1.1 upgrade to DOS 1.0.  But with Windows 10, Microsoft decreed that if you had a license for Windows 7, 8, or 8.1 you could upgrade for free.

That's not what Microsoft initially said.  They initially said, "if you upgrade within the first six months - it's free.  But if you wait, it will cost you."  But Microsoft never enforced the "it will cost you" part.  Even if you performed the upgrade long after that original offer had expired, you were allowed to upgrade for free anyhow.  Why would Microsoft do that?  It turns out that there are sound business reasons for what they did.

Most people get their Windows license by buying a new computer.  New PCs always come with one or another version of Windows pre-installed.  You used to need to enter an "Activation Code" the first time you used the PC, but not any more. It is now preloaded into BIOS at the factory.  Now, the installation process checks for it, finds it, validates it, and that's that.

You used to need to enter a special "upgrade" Activation Code as part of the process of upgrading to a new version of Windows.  But no more.  The Activation Code for the older version of Windows works for the newer version of Windows.  That makes it easier (and cheaper) to upgrade Windows to a newer version.  But most people don't bother..  And that leads to a lot of people running older versions of Windows.  And that has financial implications for Microsoft.

This new way of doing business means that Microsoft is losing some revenue, the money brought in by selling upgrade licenses.  But it also means that there are lots of customers out there that expect Microsoft to support two, three, or even more versions of Windows.  That entailed substantial cost, likely considerably more than the revenue brought in by selling upgrade licenses.

But wait, there's more.  Viruses and malware started out as a modest problem.  But it has grown and grown and grown.  And Window developed a reputation for being easy to hack.  That was bad for Windows' (and Microsoft's) reputation.

And that hit to Microsoft's reputation had a detrimental effect on Microsoft's earnings over the long term. This has caused Microsoft has put more and more effort into making Windows harder to hack as the years have passed.  Windows is now far harder to hack than it used to be.  But, in many cases the "fix" to Windows involved a substantial rewrite.  Microsoft had plenty of money, so cost wasn't the problem.  But the necessary changes had a ripple effect.

No problem.  Release a "new and improved" version of Windows.  But what if lots of people stick with the old, flawed version?  Eventually, the business case for giving the "upgrade" version of Windows away for free became compelling.  Microsoft put the original version (1511) of Windows 10 out in 2015.  Since then, if you had a PC that ran Windows 7, or anything newer, upgrades to Windows have been free.

That had not caused everyone to upgrade to the new version.  But it has caused a lot more people to do so than otherwise would have.  And Microsoft invested a lot of effort in making sure that old hardware could run the latest version of Windows 10.  I recently did some work on a PC that was built in about 2007 and was originally loaded with Windows Vista.  (That's the version that came after "XP" and before "7".)  Windows 10 runs like a top on that machine.

And we can see this playing out all over the place.  Hackers need a way in to, for instance, install Ransomware.  Time after time their way in has involved exploiting a well known weakness in an older version of Windows.  They wouldn't have been able to get in if the computer was running Windows 10, but it wasn't.

Many organizations (schools, hospitals) don't have the staff necessary to keep on top of upgrades.  Profitable corporations, especially ones that use computers to control machinery, have the money and staff necessary to keep their PCs up to date.

But they use some of their PCs to run vendor supplied software that is used to control the vendor's hardware.  And if the vendor doesn't update its software to work on the newest version of Windows, something that happens far too often (and here I can speak from personal experience), then the corporation is forced to run an old version of Windows on some of its PCs.

This is a widespread problem that no one talks about.  The computers on the Deepwater Horizon, the oil drilling platform that blew up and sunk in the Gulf of Mexico more than a decade ago, was running a very old version of Windows out of necessity.  That disaster spilled millions of gallons of nasty crude oil into the gulf of Mexico.

Hacking was not involved in that disaster.  But computer problems did contributed to the disaster in a big way.  The vendors who provided most of the machinery used on the platform didn't update their drivers.  And that meant that key computers were running an old version of Windows that crashed regularly.  When things started to go wrong the key computer was in the middle of crashing.

Ransomware attacks, not exploding oil drilling platforms, have been much in the news recently.  But often the root cause is the same.  Hackers need a way to get inside and install their malware.  And old versions of Windows have often been their way in.

Once they are in, they can steal data and encrypt files, even if the data and files are located on servers running the latest version of Windows.  Stolen data and encrypted files are the foundation of a successful Ransomware attack.

But back to the subject at hand.  This problem of forcing corporations to sometimes run older versions of Windows on some of their computers has put Microsoft in a bind.  The "the upgrade is free" change in busines practice has at least let Microsoft can say "we provided you with a free upgrade to a version that didn't have the vulnerability".

Unfortunately, although the statement is true, it that only goes so far.  Microsoft does not want to badmouth their customer base any more than necessary.  So, Microsoft ends up sometimes having to step in and help companies that get hit.

But their costs (and reputational hit) are still lower than they otherwise would be.  Since the upgrade is free, many businesses have upgraded many computers that would otherwise still be running old versions of Windows.  And that brings us to Windows 11.

Upgrading to Windows 11 is free to anyone who is currently running Windows 10.  Eventually, all Windows 10 customers will be offered the free upgrade through Microsoft's "Windows Update" feature.  If you don't see that option, and you don't want to wait, then click on this link:  Download Windows 11 (microsoft.com).  There, you will be given several options.

The simplest is to click the "Download Now" option in the "Windows 11 Installation Assistant" section.  This will download a small "helper" program.  If you run that program and select the correct options it will download Windows 11 from the Internet and use it to upgrade your computer.  Warning:  You will need Administrator privilege to do this.  No intermediate steps will be required.  (BTW, for thirty days Windows 11 will include a "Revert" option that will let you revert your machine back to Windows 10.)

However, there is a catch.  A wide variety of hardware could be upgraded to Windows 10.  On paper, it looked like the same would be true for Windows 11.  The "specs" that were widely bruited about before Windows 11 was released were modest.  A Windows 11 capable machine must have  4 GB of RAM and about 70 GB of free disk space on the "C:" drive.  A CPU speed requirement was also listed, but it was so modest that any kind of PC would qualify.

But when Windows 11 became available on October 5, 2021, it turned out that there were additional, far more stringent requirements.  One was easy enough to meet.  From the start, hard disks could be divided into "partitions".  Each partition functioned like an independent disk drive.  This capability required a "Partition Table" to tell the software where things started and ended.  The Partition Table had to be put somewhere.

The early version put it in a place called the MBR - Master Boot Record.  The good news / bad news is that the MBR could hold software.  For instance, this was a handy place to put "Device Driver" code that might be necessary to handle the particular make and model of the Hard Disk on your computer.

But hackers quickly figured out that the MBR was also a great place to put malware.  Placing malware in the MBR let it load and put protections in place before the operating system (Windows) got loaded.  For technical reasons I am not going to go into, that made the malware both harder to detect and harder to dislodge.

For that and other reasons, a new method was created called GPT - GUID Partition Table.  It has better security and some other advantages.  Windows 11 requires that a GPT be used instead of an MBR.  If the Hard Disk on your computer currently uses an MBR then this sounds like a big problem, but it isn't.

First, for many years now the BIOS on PCs have supported both MBR and GPT (or just GPT).  Second, there are utilities that will convert an MBR Hard Disk into a GPT Hard Disk.  So, if your PC has an MBR Hard Disk, all you have to do is to run the utility and convert your Hard Disk from MBR to GPT.  Your PC has to be pretty old for it to not support GPT.

A much bigger problem is that, for reasons I can't figure out (but I have a suspicion), Windows 11 requires that your PC have a relatively new CPU.  If you have an Intel CPU it must be "Coffee Lake" or newer.  Intel started shipping Coffee Lake CPUs in late 2017.

So, if your "Intel Inside" PC was built on or after 2018, you should be okay.  If your PC was built on or before 2016, you are out of luck.  If your PC was built in 2017 your chances are not good.  (There are similar requirements for AMD and other brands of CPU, but I didn't dig into them.)

I think the third new requirement drives the processor requirement.  Your PC must support TPM 2.0.  To do so, a custom Crypto chip must be incorporated into the motherboard.  The required chip supports onboard crypto and some other security related features.  With Windows 10, TPM 2.0 was optional.  With Windows 11, it is required.

I suspect that any PC that has a new enough processor also supports TPM 2.0.  And it does it in such a way as to prevent hackers from interfering with its proper functioning.

Microsoft runs a WinHEC (Windows Hardware Engineering Conference) every year.  That's where hardware issues are hashed out.  The year's results are boiled down and incorporated into a document.  Each annual document provides "new and improved" guidance to the hardware community regarding Windows and hardware requirements.

Microsoft can then shorthand the hardware requirements of a particular version of Windows as "WinHEC version nnnn".  One of these versions laid out how TPM 2.0 was to be implemented.  Windows 11 requires conformance to a much newer version of the WinHEC document than Windows 10 did.

Back in the day, Microsoft used to provide a "Compatibility" utility every time it released a new version of Windows.  You ran the utility and it told you whether you had any hardware issues associated with running the new version of Windows on your hardware setup.  Sadly, they stopped doing that several years ago.  With Windows 11, it's back.  The Windows11 Compatibility utility is called "PC Health Check".

To find out if your PC has any hardware issues that will prevent it from running Windows 11 go here:  Upgrade to the New Windows 11 OS | Microsoft.  Then scroll all the way down to a banner that says "Check for Compatibility".  Then click on the text that says "DOWNLOAD PC HEALTH CHECK APP".

Once the download completes, open the file and install the application.  Warning:  You will need Administrator privileges to do this.  (If you have trouble finding the file, it should be in your "Downloads" directory.)  It will tell you if you're good to go or not.

If you decide to upgrade to Windows 11, what can you expect?  I reviewed the "what's new" articles in the technical press prior to it becoming available and I was underwhelmed.  Microsoft is characterizing it as a major upgrade.  That's why they changed the name from "Windows 10" to "Windows 11".  But, as far as I can tell, that's an exaggeration.  But then I might not be in a position to judge.

I run desktop PCs.  If you run a laptop with a built in keyboard and touch pad then your experience should be similar to mine.  The changes are minor.  But remember that the whole point of Windows 8/8.1 was to provide an operating system that worked well for people like myself, but also for people with touch screen machines.

Windows 11 takes another shot at doing just that.  Since all my PCs have keyboards, and I like it that way, I have no experience with the touchscreen environment.  So, maybe the touch screen crowd are seeing big differences that I am not aware of.

In any case, I was a bit leery of Windows 11 going in.  But my opinion has completely turned around.  Prior to experiencing Windows 11 for myself I grouped the changes into two groups.  Group one consisted of all the changes that I didn't care about (i.e. touch screen changes).

Group two consisted of all the changes I cared about that looked like they replaced something I liked with something I would likely not like.  But I'm a techie.  I have a responsibility to try new things out.  So, with some trepidation, I did.

And I find that I quite like Windows 11.  It does look beautiful.  And I find that they did what I expected.  They changed some thing from something I liked to something I didn't.  But I also found something they changed where the new version looks like an improvement to me.  So, what did they change?  It turns out, not as much as I thought.

One thing that often bedevils upgraders is drivers.  As far as I can tell, Microsoft did not change the driver model.  That means that Windows 10 drivers also work on Windows 11.  So, if you have a Windows 10 PC where the drivers for all your hardware work fine, then the same will be true after you upgrade to Windows 11.  Since driver issues are the source of most upgrade issues, for you, the update process should be a smooth one.

BTW, for planning purposes you should know that it took about 45 minutes to upgrade my machine.  But it is a high-end PC with an SSD disk drive.  If you are lacking in one or the other (or both) of these then the upgrade may take considerably longer on your PC.  And all my non-Windows software came over without a hiccup.  And all my data was all still there, just where I expected it to be.  So, what did change?

The most obvious change is to the Task Bar.  The stuff that was on the left end is now in the center.  I don't know why they did it, but everybody's guess is that they wanted to move closer to how Apple does it.  I wish they hadn't done it, but it is not a big deal.

The change they made to how the right end of the Task bar works is more problematic.  Apparently Microsoft doesn't know what to call that part of the Taskbar, so they refer to this area as the "Taskbar corner".  Lame.  This is where, among other things, some Icons that belong to running applications and services reside.  They are still in roughly the same place.

But there used to be a setting that caused them all to always display.  Without the "all" setting being ON some of them may get hidden under a "^" Icon.  The "all" setting is gone.  And I miss it.  Can I live with the new rules?  Yes!  But I liked the old rules better.  Anyhow, this is a bigger deal but not that big of a deal.

Then there is "Settings".  This has gotten completely reengineered.  Settings seems to be something that Microsoft can't stop themselves from changing every chance they get.  Back in the day there was the "Control Panel" (and something else before that).  The default was groups.  You could then drill down within a group and get to whatever you wanted to fiddle with.  But they gave you a way to "show everything at the same time".  I took advantage of that option.

With Windows 10 they hid (it's still around if you know where to look, even in Windows 11) the Control Panel and replaced it with the "Settings" gear.  Was Settings a big improvement?  No!  It was just a different way of doing the same thing.  It was functionally equivalent to the old Control Panel in the Groups configuration.  Well, with Windows 11 they have now redone Settings to make it more like the old Control Panel with the "show everything" option turned on.

They have made a lot of changes here and there with specific settings.  But the general idea is the same.  It's another of those "change for change sake" things.  But I have been though many generations of "change for change sake" in this area.  So, I have become adaptable.  It took me about fifteen minutes to get used to the new version.  Is it an improvement?  I wouldn't go so far as to say that.

You soon encounter the big change.  What comes up when you click the "Start" button has been completely redone.  With Windows 10 you had columns.  The left-most column contained critical controls like "Power" and "Settings".  Next over, you had a column with an alphabetical list of all the normal applications.  Finally, to the right of these you had the "Wing".  This layout has been changed completely.

The division into vertical columns has been replaced by a division into horizontal sections.  The top section contains the "Search" box that used to be located next to the "Start" button on the Task Bar.  I never used it much, so I don't much care where it is.  But I do appreciate getting the real estate this used to take up on the Task Bar back.

The next section down is a box into which all the stuff that used to be on the Wing has been moved.  The Icons on the Wing came in various sizes, which could be changed.  Wing Icons could also be animated, if the application chose to do so.  For instance, a weather report would continuously update within the "Weather" Icon.  I never liked the Wing.  I always got rid of it by deleting all the Icons on it.

Now all the Icons are small, standard sized squares that are not animated.  I now find this to be a handy place to put links to Applications I frequently use.  (You can still put shortcuts on the Task bar, and I do.)  But, for instance, this is where I now go to find the Settings Icon.  And there is now an "All Apps" link in this area that lets you get to the full alphabetical list of applications.  That works for me.

Below that is another section.  It lists all of the files that you have accessed recently.  I might come to like this.  So far, I just ignore it.  And at the bottom is a section containing a "User" ("User" is replaced by the username you are logged into Windows with) Icon and a "Power" Icon.  So, the three Icons, (Power, Settings, and User) that I used from that left-most column are still easily accessible.  I am very happy with what they have done to the Start Button.

That's it for noticeable differences.  I think that a not-so-noticeable difference will loom large over time.  TPM 2.0 looks like the foundation of a big improvement in security.  With Windows 10 applications developers had to allow for the possibility that it was there and also that it wasn't.  With Windows 11, they can count on it always being there.

And, in this context, Microsoft is a developer.  They develop applications like Office.  Over time they can change Office so that, if it detects that it is running on Windows 11, then it does security a different and more effective way.

Other developers can do the same.  And, in this context Windows itself is an application.  Microsoft can rework more and more of Windows to depend on the presence of TPM 2.0.  This release of Windows 11 was delivered on deadline, so they likely only made the change to a dependance on TPM 2.0 in a few critical places.

But over time Microsoft can update more and more components of Windows to use security based on TPM 2.0.  These updates can be rolled out in an incremental fashion using the Windows Update process.  In many cases, the change may not even be apparent to users.  But let's hope that these changes make life more and more difficult for hackers.

I think that over time incremental updates to Windows 11 will make it much more secure than even Windows 10 was.  If this is not what Microsoft was thinking, then it was stupid for them to obsolete so many computers by making TPM 2.0 required rather than optional.  But, if that's the plan, then the new hardware requirement is one I applaud.

Finally, a note on versioning.  Microsoft has been using a standard way of naming versions of Windows 10 for a couple of years now.  The first two characters are a number.  They represent the last two digits of the year in which the version is released.  The third character is an "H".  It stands for "Half", as in the half of the year the version was released in.  The final character is another digit.   "H1" stands for "first half of the year".  "H2" stands for second half of the year.

The version name of the last Windows 10 release was 21H1 because it was released in the first half of 2021.  The version number of this first release of Windows 11 is 21H2, the version name that would have been assigned to the next update of Windows 10.  Windows 11 version 21H2 represents an incremental improvement to Windows 10 version 21H1, rather than a radical departure.

But that has been the announced plan for Windows for years.  Instead of a big disruptive upgrade very few years Windows would evolve by taking small to medium steps twice per year.  No one step would be a dramatic change from the previous one.  The name change might suggest otherwise, but Microsoft is actually sticking to the incremental evolution plan.  I, for one, am grateful.

Tuesday, May 5, 2020

Computer vs. Sudoku

I'm in lockdown mode, just like everybody else.  So what's a body to do to pass the time pleasantly?  If you are this particular body you decide to write a computer program.  I haven't gotten paid to write a computer program in more than a decade.  And I haven't written one in a couple of years.  It's time to dust off the old skills and take them out for a drive once again, or so I told myself.

If you are going to write a computer program it needs to do something.  Otherwise, there is no point.  So I'm sitting around one day when I thought "it would be fun to write a computer program to solve Sudoku puzzles".  And with that I was off.

A little background.  Sudoku puzzles became all the rage a few years ago.  When they first showed up on the "puzzle" page of the local paper I took a look.  It seemed interesting so I gave it a shot.  I was a total failure.  I could see how you might go about solving one.  But I had neither the skills nor the patience to be successful.

I could see what needed to be done.  But scanning here and there looking for a good next move wasn't something I had the patience nor the eyeball to be successful at.  But I could see how it could be done, in theory.

Now what I am not good at is, in this case, what a computer is very good at.  Computers have infinite amounts of patience and are very good at detail.  If you add in my analytical ability you have everything you need.  And to my eye, the problem was difficult enough to be interesting without being so difficult as to demand more effort than I was interested in expending.  So let's look at the rules of the game.

A Sudoku puzzles consists of a 9 x 9 grid.  Each box contains either a number or an empty square.  You solve the puzzle by filling all the squares with numbers.  But what constitutes a "legal" move?  That's pretty simple too.  Each square must end up with one of the digits running from one to nine.  That's extremely simple.  It is the additional constraints that make things interesting.

You can't duplicate numbers.  There are nine squares in the first column.  If there is a "5" in one square in the column then none of the other squares in the same column can contain a "5".  In the end everything just fits.  There are nine squares in a column and 9 digits.  So it's a matter of putting the digits - one through nine - into the squares in the right order.  And, if that was it, then the problem would be trivially simple.

But there is a similar row rule.  There are nine squares in a row and nine digits.  So it is again a matter of arranging all nine digits in the correct sequence so that each fills a square.   So now things are more difficult but not all that difficult.

Imagine viewing the grid along the diagonal.  In the first diagonal you put a "1".  (There is only square in the first diagonal because it is up against a corner.  In the next diagonal you put all "2"s.  In the next, all "3's, and so on.

Once you have filled nine diagonals with "1" through "9" start over.  fill the next diagonal with all "1"s and the one after that with all "2"s.  Keep going and you will have a "solution" that meets the "no duplicates in a row" criteria while also meeting the "no duplicates in a column" criteria.  So, to make things more interesting a third rule is added.

The 9 x 9 grid is divided into nine 3 x 3 sub-grids.  The first sub-grid consists of rows 1-3 and columns 1-3.  The second one consists of rows 1-3 but columns 4-6.  When you are done you will have 9 sub-grids with the last one consisting of rows 7-9 and columns 7-9.  Each sub-grid contains nine cells so you impose a "no duplicates" rule within each sub-grid.  With this third rule the puzzle becomes hard but not impossible.

The way things work is that a grid is published.  It has some but not all squares filled in.  You are supposed to take it from there and figure out what number to put into each of the empty squares.  Here's the starting position from a puzzle that was published in the local paper several weeks ago.  (I have used white space to highlight the sub-grid boundaries):

Column: -   1  2  3    4  5  6    7  8  9

Row:  1 -   *  1  8    *  *  9    2  *  *
Row:  2 -   4  *  *    *  3  5    7  *  *
Row:  3 -   6  *  3    2  7  1    4  *  *

Row:  4 -   *  4  *    *  *  *    *  6  *
Row:  5 -   *  *  5    3  6  4    1  *  *
Row:  6 -   *  3  *    *  *  *    *  4  *
  
Row:  7 -   *  *  9    4  1  3    6  *  2
Row:  8 -   *  *  1    5  2  *    *  *  4
Row:  9 -   *  *  4    7  *  6    5  3  *

So what do we do next?  Well, there's the brute force method.  Row 1 - column 1 is empty ("*" denotes empty).  We can try a "1" there and see what happens.  That doesn't work because row 1 - column 2 already has a "1".  But we can move on and try "2" and then "3" and so on.  Then we can move on to the next empty square at row 1 - column 4 and do the same thing.  After trying a bazillion combinations we will eventually hit on to a legal solution.

But, boy oh boy, will we have to try a lot of different combinations.  Computers are very patient so this would eventually work.  It is called a "brute force" method.  You just try all the combinations until you find one that works.  There are better ways.

And that was the one insight I developed about how to proceed.  I came up with the idea of a "forced move".  Look at square (1,4) - short for row 1 - column 4.  If you work through all of the combinations then only move that works is "6".  "6" is a forced move.  Go ahead and check.  You will see that 1-5 and 7-9 are all excluded by other squares that have already been filled in.

So what I had my program do was to look for forced moves.  It boringly checked square (1,1) then (1,2) and so on.  If the square was already filled it moved on.  For each empty square it first tried "1", then "2", and so on up to "9".  It counted the number of moves which were "legal", that didn't violate any of the constraints.  I called this number LMC for "legal move count".  The program moved along calculating the LMC for each empty square.

As it moved along it noted when it found a square whose LMC was lower than all the previous LMCs it had encountered.  It remembered where it had found that move (and forgot what it had previously remembered about the old lowest LMC champ).  And it remembered for that move the first (lowest - it  tried 1 - 9 in that order) legal move it had found for that square.  Finally, as soon as it found a square with an LMC of 1 it quit looking.  LMC=1 squares are forced move squares.

So the program worked by first playing all the "setup" moves, those moves printed in the paper.  Once that was done it tried the same thing over and over.  It tried to find the square with the lowest LMC.  It did this by scanning the entire grid as I have outlined above.  It stopped and "played" the move if it found a square with an LMC of 1.

And if it got to the end, having scanned all 81 squares, and had found no empty squares then it said "I'm done".  And for easy puzzles, that's it.  It turns out that there is always at least one square with an LMC of 1, a forced move.  The program finds it and plays it.  Then it goes back to the top and starts a new scan.  Eventually all the squares are full and the program is done.  In the case of the puzzle above that looks like this:


Column: -   1  2  3    4  5  6    7  8  9

Row:  1 -   7  1  8    6  4  9    2  5  3
Row:  2 -   4  9  2    8  3  5    7  1  6
Row:  3 -   6  5  3    2  7  1    4  9  8

Row:  4 -   1  4  7    9  8  2    3  6  5
Row:  5 -   9  8  5    3  6  4    1  2  7
Row:  6 -   2  3  6    1  5  7    8  4  9

Row:  7 -   5  7  9    4  1  3    6  8  2
Row:  8 -   3  6  1    5  2  8    9  7  4
Row:  9 -   8  2  4    7  9  6    5  3  1

Remember, that as we fill in moves fewer and fewer moves remain valid.  When we made our move of placing a "6" in square (1,4) that rendered "6" as an invalid move for any other square in row 1, column 4, and the sub-grid consisting of rows 1-3 and columns 4-6.

In solving the above puzzle the computer first places a "6" at square (1,4).  For its next move it places a "4" at square (1,5).  For its third move it places a "5" at square (1,8).  It continues to proceed in this manner for move after move until it finally places a "1" in square (9,9).  On each fresh move it is able to find a square with an LMC of 1.  If you have a good enough eye and enough patience, you can too.

But what if the puzzle is harder?  Then what?  Well, the program is on the lookout for things going wrong.  What if it finds an empty square for which there are no legal moves?  It sounds like the puzzle has no solution.  But there is another possibility.

In the easy puzzle listed above at every stage it is possible to find a forced move, a square with an LMC of 1.  But that is not true when it comes to more difficult puzzles.  With more difficult puzzles some scans may not turn up a square with an LMC of 1.

Remember, what the program actually does is to look for the square with the lowest LMC.  It is certainly true that we don't want to bother with squares that have an LMC of 2 or more if we can find a different square with an LMC of 1.

But with more difficult puzzles sometimes a scan of all the unused squares in the puzzle does not turn up one with an LMC of 1.  In that case the program just goes with a square with the lowest LMC it found.

In all the puzzles I have looked at the program invariably finds a square with an LMC of 2 if it can't find a square with an LMC of 1.  But the program can deal with situations where the lowest LMC it finds is higher.  Here's how that works.

If, on a scan the lowest LMC that is encountered is higher than 1, then the program selects the first square it encountered with that LMC, whatever it is.  It plays that square and "guesses" whatever the lowest legal move is.  It then goes on to find the next move.  If we get to the end and have found a valid solution, hurray!  We won.

But that may not happen.  We may end up encountering a square that now has no valid moves.  That's where a process that is easy for a computer to do and often hard for a person to do comes into play.  We don't give up.  We do what's called in the computer game "backing off".  So how does that work?

As things are going along the computer keeps track of every move it has made.  And it keeps track of the order they have been made in.  And it remembers the LMC of each move.

Now some moves are special.  They are the moves that were used to load the grid with the "setup", the initial configuration printed in the newspaper.  These moves are flagged as "s" for setup moves.  Later moves are flagged as "n" for normal moves.  The first several moves are "s" moves.  After that, the moves are all "n" moves.

So when a problem (no legal move) is detected here's what happens.  The first thing that happens is that the move we were trying to make is abandoned.  All trace of its existence is erased.  Then the last move on the "queue" (the data structure used to keep track of moves) is examined.  If it is an "s" move then the puzzle is unsolvable and it's time to quit.  But it should be an "n" move.

The LMC of the move is examined.  If it's 1 then the move is "backed off".  All evidence that the move was every made is erased.  Then we go back and examine the next oldest move to see what we find.

If, however, the LMC is greater than 1 there is something we can do.  We can take a different "fork in the road".  Here we take advantage of the fact that we always try the lowest legal value first.  Let's say the LMC of the move is 2 and the value we used was "4".  That means that  besides "4" there should be another move that is higher than "4" that is also legal.

We go looking for it.  Let's say it is "6".  We then change the move to use "6" instead of "4".  We also reduce the LMC by 1.  In our example, the LMC is now 1 so, if the "back off" logic again reaches this point, then it would back the move off and keep looking.  If perchance the LMC had been 3 it is now 2.  So, if we later reach this point, then we can again look for a legal move that is higher than "6".

It is possible, at least theoretically, that we won't be able to find a higher legal move.  But that means that the program has screwed up and it is time to look for code to fix.

But if all goes as it should we back off until we find a fork in the road.  Then we go down a different fork.  Once we've done that we return to business as usual.  We jump back in the top and use the usual code to go looking for a move with an LMC of 1 to add onto the list of moves right after the one we ended up modifying.

It may be necessary to do this "two steps forward, one step back" dance several times.  And it is common to end up putting the same LMC = 1 move on the stack only to later have to back it off as we look for an "LMC higher than 1" fork in the road.  Then, still later after we have taken that different path, we end up just adding the same move back onto the move list again.  But, after a certain amount of "toing" and "froing", we should end up with a set of legal moves that ends up filling the grid up completely.

So that's the rest of the logic my computer program uses to solve Sudoku puzzles.  It has solved all of the puzzles I have presented it with successfully.  And it solves them instantly.

It takes me a minute or so for me to create a file with the setup moves in it.  It takes the computer a second or so to print out the "before" (setup) and "after" (solution) grids.  But solving the puzzle is essentially instantaneous.  Computers are very good at doing a lot of this sort of thing extremely quickly.

And with that, let me give you some background on Sudoku.  It is part of a group of mathematical puzzles called "Latin Squares".  They have been studied extensively for a period going back more than a hundred years.  And it turns out that the origins of Sudoku also go back more than a hundred years.

A puzzle similar to Sudoku was first published in a French newspaper in 1892.  Another French newspaper published a puzzle that was almost identical to Sudoku in 1895.  About twenty years later they went out of fashion and stayed that way for a long time.

Then a puzzle identical to Sudoku was published in a Dell puzzle magazine in 1979.  There it was called "Number Place".  (Sudoku puzzles are regularly but infrequently called Number Place to this day.)

It was likely invented by a man named Howard Garnes. Mr. Garns was well known at the time in puzzle creation circles.  No one knows if he was familiar with the earlier French puzzles but he was probably very familiar with Latin Squares.  He died in 1989 before Sudoku became a giant phenomenon.

The Japanese attribution is not completely unreasonable.  That's where the puzzle first became widely popular.  It was introduced in a Japanese newspaper in 1984 as "Suji wa dokushin ni Kagiru".  This unwieldy name was quickly shortened to Sudoku.  It quickly developed a large and loyal following in Japan.  So. it soon could be found in many newspapers there.

In 1997 Hong Kong judge Wayne Gould saw a Sudoku puzzle in a Japanese bookshop.  He spent six years developing a computer program to quickly crank out new puzzles.  The task he set out for himself was much more difficult than the one one I tackled.  But, once he had it working, the result was a nearly inexhaustible supply of new puzzles.  And they could be made available inexpensively.

He then sold the Times of London newspaper on the idea of regularly publishing Sudoku puzzles.  They first published one in 2004.  The first Sudoku puzzle appeared in a US newspaper later that same year.  And the rest, as they say, is history.

Sudoku has attracted a lot of attention from both professional and amateur mathematicians.  They had long been studying various kinds of Latin Squares when it came along.  Sudoku fit right in.

So a lot is known about the mathematics behind the game but I am going to spare you all of it.  I am also going to spare you from a discussion of the many variants of the game that have been developed in response to its popularity.  If you care, the rich literature on this subject is easy to find.

As for me, I have moved on but not very far.  There is a puzzle called Numbrix that newspaper columnist Marilyn vos Savant champions.

As a programming challenge, it looks very similar to Sudoku.  So I am now writing a program to solve Numbrix puzzles.  I expect to be able to reuse a lot of the code I wrote for my Sudoku program.

I am making slow progress.  But this is because I'm not putting that many hours into it.  It is, after all, a time waster.  I only work on it when I have time to waste.

So that's what I am now up to.

Thursday, August 16, 2018

A Compact History of Computers

For a long time I have thought of myself as a computer guy.  I took my first computer class in 1966 and immediately fell in love.  I then spent more than forty years closely involved with them, first at school and then at work.  I write blog posts about what interests me.  So you would think I would have written a lot about computers.  But I have actually written less than you might think.  And it turns out I have never directly addressed this subject.

Here's a complete list of my computer and computer adjacent posts.  (Normally I would include a link for each but since I have so many I am just going to list the publication date.  You can easily locate all of them by using the handy "Blog Archive" at the right side of each post because it is organized by date.)  So here's the list:  12/21/2010 - Net Neutrality; 2/19/2011 - Artificial Intelligence; 7/30/2013 - Home Networking; 1/24/2014 - Windows 8.1 - try 1; 9/16/2015 - Hard Disks; a 7 part series running from 9/24/2015 to 9/30/2015 on the Internet and networking; and 5/19/2018 - Computer Chips 101.  And I have purposely left one out.  It is my first post on the subject, and the one that is most closely aligned with this subject.  On 10/26/2010 I posted "Computers I have Known".  So that's the list.  Now to the subject at hand.

Most accounts of the history of computers credit a machine called ENIAC as the first computer.  There used to be some controversy about this but it has mostly died down.  But I think it is the correct choice.  (I'll tell you why shortly.)  But before I spend time on ENIAC let me devote a very few words to prehistory.

Perhaps the first digital computational device was the abacus and it did influence computer design.  Then a fellow named Charles Babbage designed two very interesting devices, the Difference Engine (1822) and the Analytical Engine (1837).  He never came close to getting either to work but the Analytical Engine included many of the features we now associate with computers.  But, since he was a failure, he and his work quickly fell into obscurity and had no impact on the modern history of computers.  He was eventually rediscovered after computers had been around a while and people went rooting around to see what they could find on the subject.

In the early twentieth century various mechanical calculating devices were developed and saw widespread use.  These gave some hint of what could be done but otherwise had no influence on later developments.  In the years immediately preceding the construction of ENIAC several interesting devices were built.  The Harvard Mark I is given pride of place by some.  The World War II code breaking effort at Bletchley Park in the United Kingdom spawned the creation of a number of "Colossus" machines.  But they were highly classified and so no one who worked on ENIAC or other early computers knew anything about their design or construction.  So where did ENIAC come from?

It arose out of World War II work but not cryptography.  Artillery field pieces came in many designs.  In order for shells to land where you wanted to they had to be aimed.  To do this a "firing table" had to be developed for each make and model.  If you want this type of shell to land this many yards away then you need to set the "elevation" of the gun to this many degrees.  Once you had fired the gun with a few settings mathematics could be used to "interpolate" the intermediate values.  But with the many makes and models of guns that saw use and with the other variables involved a lot of mathematical computations were necessary.  The US Army literally couldn't find enough "computers", people (usually women) who could and did perform the necessary mathematical computations, to keep up with the work.

Two University of Pennsylvania Electrical Engineering professors named Eckert and Mauchly set out to solve this problem by building a machine to crank these calculations out quickly and accurately.  They lost the race in that ENIAC was not ready soon enough before the end of the War to do what it was designed to, crank out firing tables for the Army.  But in the end that didn't matter.  People found lots of other uses for it.  One of the first tasks it completed was a set of computations used in the design of the first Atomic Bombs.

ENIAC was constructed as a set of semi-independent functional units.  There were units for mathematical functions like addition, multiplication, division, and square root.  There were "accumulator" units that could remember a number for a short period of time.  There were units that could be used to feed lists of numbers into the machine or to print results out.  And so on.  And the machine was not programmed in the modern sense.  To perform a calculation you literally wired the output of one unit into the input of another.  Only simple computations, those necessary for the calculation of firing tables, were even possible.

So the first step was to structure the problem so that it was within the capability of the machine.  Then a plan for appropriately wiring the functional units together in order to perform the necessary computations was developed.  Then the functional units were wired together using hundreds, perhaps thousands, of "patch" cables, all according to the specific plan for the current computation.  Then the whole thing was fired up.

It might take a couple of days to design the calculation, a day to wire up the ENIAC, and several hours to repetitively perform the same calculation over and over, feeding a few different numbers in to each cycle, so that each cycle calculated, for instance, all the numbers to complete one line of the firing table for a specific gun.  ENIAC was able to perform computations at a much faster rate than computers (i.e. people) could.  That was amazingly fast at the time but glacially slow compared to modern machines.  But it was a start.

And if this doesn't sound like what you think of when you imagine a computer, you are right.  ENIAC was missing several different kinds of functional units we now expect to find in even the simplest modern computer.  But it rightly deserves its place as "the first computer" because the designs for all the modern devices we now call computers descended directly from ENIAC.

ENIAC was missing three kinds of functional units now deemed essential.  The first one is the simplest, the "bus".  A bus is an Electrical Engineering term that far predates ENIAC.  The idea is that you have a bar, wire, or set of wires, that connect multiple units together.  All the units share the same bus.  But a bus design allows you use the bus to connect any functional unit to any other functional unit.  With ENIAC a serial design was used instead.  The approximately forty functional units were laid out side by side (the size of the room dictated that they were actually laid out in the form of a large "U") and only functional units that were close to each other could be connected together.

Later computers had a bus (and often several busses) incorporated into their designs.  This allowed much more flexibility in which functional units could be connected together.  There is a disadvantage to this design idea.  If two functional units are using the bus all other functional units must be disconnected from it.  At any single point in time all but two units are completely cut off from communication.

With the ENIAC design many pairs of functional units could be connected together at the same time.  They always stayed in communication.  But it turned out the flexibility and simplicity of the bus was more advantageous than disadvantageous.  (And designs incorporating multiple buses allow multiple parallel connections, at least in some cases.)  Switching to a bus design from the serial design was an easy change to pull off.

The second type of functional unit ENIAC lacked was memory.  ENIAC did incorporate a small number of "accumulators" but these could only be used to store the intermediate results of a longer, more complex computation.  They couldn't be used for anything else and they were very expensive to build.  Computer designers recognized that memory, lots of memory, was a good idea.  But it took them a long time to find designs that worked.  At first, various "one off" approaches were tired.  Then the "mercury delay line" was invented.

A speaker pushed pulses of sound into one end of a tube filled with Mercury.  A microphone at the other end picked up each pulse after it had traveled the length of the tube.  And, since under these circumstances the speed of sound is a constant, it took a predictable amount of time for a specific pulse to travel from speaker to microphone.  The more pulses you wanted to store at the same time the slower things went.  You had to wait for all the other pulses to cycle through before you could pick off the pulse you wanted.  If this design sounds like it reeks of desperation, that's because it did.  But it was the memory technology used by Univac (see below) computers.

After a lot of work Mercury Delay Lines were supplanted by "Ferrite Core" memories.  Little magnetic donuts with wires strung through their centers formed the basis of these devices.  By cleverly strobing high power signals through the correct wires a single specific bit could be "set" or "reset".  By cleverly strobing low power signals a single specific bit could be "read".  This technology was faster and it was "random access".  Any individual bit could be read or written at any time.  But it was slow and expensive compared to the modern solution.  The memory problem was only solved when integrated circuit based memory modules were developed.  They allowed large (gigabyte) fast (gigahertz) cheap (less than $100) memories.

But computers with a small (by current standards) but large (by ENIAC standards) amounts of memory were developed within a few years.  That left the logic unit, sometimes called the sequencer.  Functional units were physically connected together using patch cables in ENIAC.  This involved a slow and error prone process.  If the design was changed to incorporate a bus and if each input interface and output interface of each functional unit was connected to the bus then anything could be connected to anything.  But, as I indicated above, only two at a time.

The logic unit sequentially decided to connect this pair to the bus then that pair to the bus, and so on.  This permitted complete flexibility (within the limits of the hardware) in terms of how the functional units were connected together.  Initially this resulted in a slower machine.  But the increased flexibility got rid of all the rewiring time and greatly reduced the planning time.  And it permitted faster simpler designs to be used for the functional units.  In the end this simpler design resulted in faster machines.

And, as the amount of memory available grew, it was quickly determined that the wiring instructions could be stored in memory as a "program".  This required a more complex sequencer as it had to be able to decode each instruction.  But it again speeded up the process of going from problem to results.  It only took years for all these pieces to be designed, built, and put to good use.  And the reason for this is one of the prime motivators for this post.

Once the ENIAC was built a lot of the details of its design became widely known almost immediately.  This let people focus on making one aspect of the design better.  They could just plug in the ENIAC design for the rest of their machine.  ENIAC was a revolution.  These other machines were an evolution.  And evolution can move very quickly.

The same thing happened when the Wright Brothers flew the first complete airplane in 1903.  As an example, there was a guy named Curtis who was a whiz with engines.  The engine in the Wright plane wasn't that good.  But Curtis could basically take the Wright design and plug his much better engine into it.  So he did.  This resulted in a lot of bad blood and law suits but, for the purposes of this discussion, that's beside the point.

The airplane evolved very quickly once a basic design was out there as a foundation to build on.  World War I saw the airplane evolve at warp speed.  Better engines, better wings, better propellers, better everything, were quickly found and incorporated.  The airplane of 1919 bore only a faint resemblance to the airplane of 1914.  And this was possible because different people could come up with different ideas for improving one or another facet of the overall design and then plug them into an existing design.

The same thing happened with computers.  Pretty much every part of ENIAC needed radical improvement.  But, as with airplanes, an improvement in one area could be plugged into an already existing design.  By 1951 everything was in place.  And that allowed the introduction of the first mass production computer, the Univac I.  Before Univac each computer was hand built from a unique design.  But several substantially identical Univac I machines were built.

At this point "peripheral devices" started to proliferate.  The Univac relied primarily on spools of magnetic tape mounted on tape drives.  The drive could under programmatic control speed to a particular place and read or write a relatively large amount of data relatively quickly.  Over time other types of devices were added to the peripheral pool.  And for comparison, the Univac featured 1000 "words" or memory, each big enough to hold a 12 digit number.  And, as with all subsequent designs, both programs and data were sored side by side in this memory.

Univacs were quite expensive and less than 50 were every built.  But they demonstrated the existence of a market.  Other companies quickly jumped in,  The most successful was IBM.  IBM pioneered a number of technical innovations.  They were among the first to hook a "disk drive" to a computer, for instance.  But IBM was the first company to successfully crack the marketing problem.  They were the best at selling computers.

It may seem obvious in retrospect but computers of this era were very expensive.  Soon a lot of companies came to believe that if they didn't get one they would be left in the dust by their competitors.  But the two industries where computers could obviously do the most good were banks and insurance companies.

Both needed to perform vast numbers of boring and repetitive computations.  And that was just what best fit the capabilities of early computers.  Not to put too fine a point on it, but neither banks nor insurance companies employ large numbers of rocket scientists or other "tech savvy" people.  The people who actually ran these companies, senior executives and members of the board of directors, were scared stiff of computers.

IBM set out to bypass all the people in these companies that would be actually responsible for the installation and operation of computers and instead went directly to these senior executives.  They didn't bother to tout the specifications or capabilities of IBM products.  They knew these people were not capable of understanding them nor did they much care.  What concerned them was "betting the company".

They were afraid that they would end up spending a ton of money on a computer.  Then something terrible would happen involving that computer and the company would go down in flames, all because of something that was beyond the understanding of senior management.  What IBM told these senior executives was "if you buy IBM we will take care of you.  If something goes wrong we will swoop in and fix whatever it is.  Oh, it might cost more money than you had planned on spending, but we promise you that if you go with IBM you will not be putting your company's very existence (and by implication the livelihood of these senior executives) in jeopardy".

And it worked.  In case after case the lower level people would, for instance, say "we recommend GE" or "we recommend RCA".  At the time both GE and RCA were as large or larger companies than IBM.  And both had well established reputations for their technological prowess.  But none of the other companies (and there were several besides GE and RCA) aimed their sales pitches so squarely at senior management.  And in case after case the word came down from on high to "buy IBM anyhow".

And companies did and by the late '60s 80 cents of every computer dollar was going to IBM.  It wasn't that their hardware was better.  It was better in some ways and worse in some ways than the equipment offered by other companies.  But it was good enough.  A saying from the period had it that "no one ever got fired for recommending IBM".   That was true.  And the converse was also true.  People sometimes got fired or got their carriers sidetracked for recommending a brand other than IBM.

It took a long time for the computer industry to recover from the total dominance that IBM held for more than a decade.  But there was one technical innovation that was rolled out by IBM and others at this time that is important to talk about.  That's microcode.

The logic unit/sequencer was by far the most complex and difficult part of a computer to design and build.  It had to take the bit pattern that represented an instruction, break it down into steps of "connect these components to the bus, now connect those components to the bus, now connect these other components to the bus", etc.  It turned out that there were a lot of considerations that went into selecting the correct sequence.  And that made this particular component extremely hard to design and build.  Then somebody (actually several somebodies) had an idea.

What had made the original ENIAC so hard to deal with?  The fact that it had to have customized hand wiring done to it each time a new problem was put to it.  Well, the spaghetti that the sequencer had to deal with seemed similarly complicated.  And if you got something wrong the computer would spit out the wrong answer.  In the ENIAC case you just stopped it, fixed the wiring, and ran the calculation over again.  But once the computer was built there was no even remotely easy way to fix problems with the sequencer.

So several people at about the same time said "why don't we create a computer to run the computer?"  It will run a single special program called "microcode".  If there is a problem and we can change the microcode then we can fix the problem.  And that meant that the sequencer hardware became much simpler.  A lot of the complexity could be exported to the design and coding of the "microcode" program.  And the microcode for a new computer could be emulated on an old computer.  So it could be extensively tested before anything was committed to hardware.

This too sounded like it would slow down things immensely.  But it did not.  The simpler sequencer hardware could be optimized to run much faster than the old more complicated design.  And other tricks were found to make the whole thing go fast in just the same way that replacing the patch cable wiring of ENIAC with a bus and memory resident programs eventually resulted in an increase in computer speed.  By the end of the '60s pretty much all computers used microcode.

Later, ways were found to house the microcode in hardware that allowed it to be updated on the fly.  This meant that microcode fixes could be rolled out well after the hardware was originally manufactured.  Some computer designs have evolved to the point where there are two levels of microcode.  There is the, call it pico-code, that allows the hardware to run multiple versions of microcode that, in turn, implements what appears to be the computer.  This three level architecture is the exception rather than the rule.

The next thing I want to talk about is Microsoft.  Bill Gates was pretty much the first person to figure out that the money was in the software, not the hardware.  When IBM rolled out it's "System 360" family of computers in the mid '60s it laterally gave away the software.  Their thinking was that the value was in the hardware.  And most computer companies followed IBM's lead.  Hardware was the high value profit-maker and software was a loss leader afterthought that you threw in because it was necessary.  Gates was the first person to focus on the word "necessary".

Microsoft was a software company from the get go.  Their first product was a BASIC interpreter for the first generation of personal computers.  At the time you were expected to buy a kit of parts and assemble it yourself.  But almost immediately it became obvious that people were willing to pay extra for a pre-assembled computer that they could just fire up and use.  Either way, however, they still needed Microsoft's BASIC.

Microsoft branched out to other software products, most famously MS-DOS and later Windows.  And they do sell a small line of hardware, keyboards, mice, the odd tablet, etc.  But, unlike Apple, Microsoft has not seriously (some would say successfully) gotten into the hardware business in a big way.  Once PCs took off in a big way Microsoft took off in a big way.  And many other companies have successfully followed this model.  Even Apple has outsourced the manufacture of its extensive line of hardware.  They still do, however, do their own hardware design work.  And they never outsourced their software work.

And even "it's the hardware, stupid" types like IBM have been forced to follow suit.  They were initially forced by anti-trust litigation to start selling their "System 360" software.  From this modest start they have continued to evolve away from hardware to the point where they are now almost entirely a services company.  Over the years they have sold off or shut down most but not quite all of their once very extensive hardware business.  So they do still sell some hardware but it now represents a very small part of their total revenue.

I now want to turn to a product that has been pretty much forgotten about.  A man named Phillipe Kahn started a company called Borland at about the time the first IBM PC was released in 1981.  In 1984 he released a product called Turbo Pascal.  You could buy the basic version for $49.95 or the deluxe version for $99.95.  It was organized around a once popular computer language that has pretty much fallen out of favor called Pascal.  I am not going to get into the differences between Pascal and the well known "C" programming language.  One is better than the other in this or that area but, over all, they are actually pretty similar.   So what did you get for your $49.95 (the version most people bought)?

You got an "integrated development" package.  You could use it to write or modify a Pascal program.  You could then literally push a button and your program would be compiled (turned from a vaguely English-like thing that people could deal with into programming instructions that the computer could deal with).  And the Pascal compiler was lightning fast, even on the PC of this era.  (The process typically took only a few seconds.)  Then (assuming compiler had come across no obvious errors in your program) you could push another button and run your program.

If errors were found by the compiler you were automatically popped back into the "edit" environment.  You could make changes and then immediately recompile your program.  And the package offered similar options for fixing your program after it had compiled cleanly.  If your program seemed to be misbehaving you could run it in a special "debug" mode.  This allowed you to step by step work your way through the execution of your program a line at a time.  You could even examine the current value of variables you had defined for your program to work with.

Once you had seen enough you could pop back to "edit" mode, make modifications, and go through the whole compile/execute/debug cycle over and over as many times as needed to get your program working the way you wanted it to.  Then you could sell your program.  And you cold sell just the executable version that did not disclose the original Pascal "source code" of your program.

With Turbo Pascal and a PC you could go from edit to compile to debug and back to edit within minutes.  This had a profound impact on computer software.  ENIAC required smart, skilled, highly trained people to operate it.  Univac made things easier but it was still very hard.  The IBM 360 made things still easier but the cost and skill level was still very high.  And a single edit/compile/execute/debug cycle could often take all day on any of these machines.

Then there was the snobbery.  The bank I worked for in the late '60s required all of their computer programmers to have a 4 year college degree.  It was presumed that only very smart people (i. e. college educated) were up to the task.  But with turbo Pascal a whole crop of housewives, clerks, blue collar workers, and kids were able to master Turbo Pascal and create interesting, useful, and most importantly, valuable computer programs.

It completely democratized the whole software development process.  It turns out that the only attributes a person needed to become successful in the computer business was a knack for computers, a little training (the documentation that came with the Turbo Pascal package consisted primarily of a single not very big book), and access to now quite inexpensive and ubiquitous home computer equipment.  Not everybody is cut out to be a computer expert but a surprising number of people can master the subject.

And that's about where I would like to leave it off.  Pretty much everything that has happened since is the extension of a trend or movement started during the time period I have covered.  Computers have now gotten faster, more powerful, lighter, more compact, and more portable.  But that's just more of the same.

The hardware has gone from vacuum tubes (essentially light bulbs with extra wires in them) to discrete transistors to integrated circuits (the ubiquitous "chip") but integrated circuits were in wide use before 1980.  Even the Internet is an extension of and an enhancement to the ARPANET, a project that was begun in the late '60s.  And it turns out that people had been connecting computers to networks since well before ARPANET.

I would like to leave you with one last item, well more of a musing.  Since the early days computer components have been divided between hardware and software.  The idea is that the actual parts used to assemble a computer from are hard or, more importantly, hard to change.  Computer programs on the other hand are soft.  They are malleable and easy to change.  But it turns out that actually the opposite is true.  Hardware is easy to change and software is hard to change.

IBM pioneered the idea of an "architecture" in the early '60s when they designed the System 360 family of computers.  Before this every time you upgraded to a new computer you had to redo all the software.  It was presumed that this would not be a difficult or expensive process.  But over time it turned out to become more and more difficult and more and more expensive.

With that in mind IBM designed a family of machines that would all be capable of running the same programs.  They specified an "architecture" that all the machines would adhere to.  The usual reason people replaced computers was because, in the words of an old TV show, they needed "more power".  With the System 360 you could just replace your smaller, less powerful (and less expensive) computer with a bigger one that had more power.  IBM guaranteed you didn't have to change a thing.  All the old software would run just fine on the new hardware.  It would just run faster.

IBM spent a tremendous amount of effort on making sure that the "360 architecture" was implemented uniformly and consistently across all machines in the family.  One of their best people, a guy named Iverson, applied the computer language he had just invented (APL, if you care) to creating models of key components of the architecture that were accurate down to the bit level.  And it worked.

A few years later IBM came out with an upgrade called the "System 370" that was carefully designed to be "backward compatible" with the 360 architecture.  The new line offered additional features but things were carefully arranged so that the old programs would work just fine on the new machines.  So companies were able to easily upgrade to the new machines that, of course, featured more power, without a hitch.

And this became the model for the industry.  The hardware decedents of the System 360 no longer exist.  But software written to the 360 architecture standard (and often quite a long time ago) are still running.  I know because as I am going about my daily business I see all kinds of companies running what I can positively identify as 360 architecture software.  This is made possible by microcode.

Microcode makes it possible for hardware to behave in completely unnatural ways.  The hardware that now runs these 360 architecture programs is the many times descendent of something called a System 38.  The original System 38 bore no resemblance to the grandchildren of the system 360 machines that were in existence at the same time.  But that no longer matters.

In fact, hardware has come a long way since the '60s.  But thanks to microcode the newest hardware can made to faithfully implement the 360 architecture rules so that the old programs still run and still behave just as their programmers intended them to.  And this is in spite of the fact that the hardware that is doing this descended from hardware that was completely incompatible with System 360 family hardware.

Intel developed the first versions of the X-86 architecture in about 1980.  The modern computer chips Intel now sells bear almost no physical resemblance to those chips of yesteryear.  Yet X-86 software still runs on them and runs correctly.  Apple started out using a particular computer chip made by Motorola.  They later changed to a newer, more powerful, and quite different Motorola chip.  Yet they managed to keep the old Apple software running.  Then they made an even more drastic change.  They changed from the Motorola chip to an Intel X-86 family chip.  But they still managed to keep that old software running and running correctly.

It turns out that any individual program, i.e. "piece of software", is fairly easy to change.  But families and suites of software quickly arose.  Many examples of this could already be found when IBM was sitting down to design the System 360 computers.  And these families and suites turned out to be very hard to change.  They behaved in ways more akin to the ways people associated with hardware.  On the other hand, people got very good at making one kind of hardware "emulate", i.e. behave exactly the same as, another quite different kind of hardware.  So hardware started behaving ways more akin to the ways  people associated with software.

This "hardware is soft and software is hard" thing has been going on now for at least a half a century.  But people got used to the old terminology so we still use it.  Is black now white?  Is up now down?  Apparently not.  But apparently Orange is the new Black.

Wednesday, October 21, 2015

Steve Jobs' Mac Sucked

The new movie "Steve Jobs" opened in limited release a few days ago.  As I write this it is set to open wide in a couple of days.  I haven't seen it yet but I plan to.  As I understand it the movie is a fictional account of the events preceding three product launches.  Liberties have been taken.  But, if you believe the makers of the movie, these liberties have been taken in order to better understand Mr. Jobs and his relationship with the people around him.  I leave the question of how successful this aspiration is to others.  And, as all successful movies do, the movie focuses on the relationships between people.  I am not going to go there.  I am a "tech" guy and tech is what I will focus on.  Specifically I am going to focus on the original Macintosh, the "Mac 1", if you will.  Why?  Because I believe it illuminates some of the same issues the movie is addressing, just from a different perspective.

And in the interests of perspective, I want to start by illuminating the environment that surrounded the Mac's original introduction in 1984.  Computers have been evolving rapidly since the very beginning.  Initially people would figure out better ways to do things and incorporate them into subsequent designs.  But this evolution came to be dominated by the evolution of the computer chip.  It started out as the Transistor, a device with a single "gate".  Then the integrated circuit was developed.  It initially allowed several gates to be built into a single chip.  The gate count increased rapidly to dozens, hundreds, thousands, etc.  It is now many billions.

With this increased gate count came increased capability and diminishing costs.  Why?  Consider the picture postcard.  (I know that now everybody takes selfies and posts them to their Facebook page.  But stick with me anyhow.)  A picture postcard from New York might feature say the iconic "I 'heart' N Y" logo.  Or it might instead feature a view of the skyline of the city.  What's my point?  The "I 'heart' N Y" image includes only a few simple shapes while the skyline includes many complex shapes.  Yet the production cost for each is the same.  You print the picture on one side of the card and you put the message and mailing stuff on the other.  It literally doesn't matter what the picture is of.  The cost is the same.

It turns out that computer chips are manufactured with essentially photographic techniques.  A simple chip with a few gates costs about the same amount to manufacture as a complex chip with many gates.  There's a little more to computer chip manufacture (manufacturers spend fantastic amounts of money developing new techniques for manufacturing more complex chips more cheaply) but that is the key insight.  As manufacturers have gotten better and as the demand for computer chips has increased the cost of ever more powerful chips has stayed the same or gone down.  This continuous innovation process has worked out over decades.  But at any specific point in time, say 1984, the best chip available at a reasonable cost has only a limited amount of capability.  It is way more capable than a chip from 1980 but way less capable than a chip from 1990.  So that's the hardware side.

On the software side things advance over time too.  People have lots of good ideas for what would be a cool thing to do.  And during this time there was a company called XEROX.  XEROX pioneered a technology for making copies that was head and shoulders better than anything else.  They leveraged this into a ton of money.  But copy machines are a one trick pony.  XEROX management were very aware of this so they put together XEROX PARC (Palo Alto Research Center) to brainstorm new ideas.  Money was not an object because it was pouring in from the copy machine business.  What was important was to come up with a great new idea.  And PARC did.

They invented all of the pieces of modern computing.  They started with the mouse.  They added to it high resolution (for the time) screens that allowed you to display proportional font text, images, all kinds of things.  They tied it in with a new networking technology called Ethernet and added a laser printer based on their copier machine technology.  It was really cool and it all worked great.  There was just one problem.  It was way too expensive.

XEROX put the whole package together and marketed it.  No one bought.  The problem was that the terminals cost a lot of money.  XEROX's idea was that you would put them on the desks of executives.  They were not too expensive for this.  But what did they do?  In the opinion of the executives they did secretarial work.  They did all the things that secretaries at the time did like keeping track of a person's calendar, handling phone calls, typing things, etc.  (Spread sheets and other high powered business tools were all in the future at this time.)  To an executive of the time that was all secretary's work and the whole XEROX system was far to expensive to put on a secretary's desk.  So no one bought it.

At some point Steve Jobs was informed of what was going on at PARC and got a tour.  He could see the potential.  Anyone could.  The problem was cost.  Jobs figured he could solve that problem so he took all the things he saw at PARC back to Apple and said "do it".  He was CEO at the time so they did it.  The result was something called the Lisa.  You have never heard of the Lisa because it flopped.  The problem was still that it was too expensive.  Jobs decided that if he was going to make the whole thing work he needed to get the cost down to $1,000.  So he set out to do that.  The result was the Mac.

In the early days Jobs' partner was Steve Wozniak.  The Woz, as he was frequently called, was a hardware genius.  What he was particularly good at was combining parts in very creative ways so that something could be made with fewer parts than the "standard" design required.  This made his designs cheaper to manufacture so they could be sold at a lower price.  This is one of the key reasons that the Apple II, the first mass market Apple product, was so successful.  It did everything the others did, and sometimes, more, but it cost less.  This Woz concept of "make it but with fewer parts" was seen as key to meeting the cost target for the Mac.  Woz was instrumental in the early work on the Mac but a number of "Woz clones" ended up doing most of the work in the end.  And Jobs was ultimately unable to hit is target.  The original Mac sold for $1,100.  Initially that looked like it was close enough.

In the first few months the Mac sold very well.  But then sales tailed off rapidly and never recovered.  Jobs had essentially bet the company on the success of the Mac.  When it tanked the Apple board of directors sensibly forced him out.  So why did the initial Mac flop?  It was cheap enough and it had all the cool stuff the PARC system had pioneered.  (Actually it didn't have any networking capability but at that time people were not networking that much so that wasn't the problem.)  The problem was a simple and fundamental one.  You couldn't actually do anything with it.  What?  People bought those early Macs.  Then they tried to run the programs they wanted to run on them and they couldn't.  To understand why we need to take a look under the hood.

First of all, it came in exactly one model.  You got what you got and that was it.  You got a really sweet processor chip called a Motorola 68000.  But that was pretty much it for the good news.  The box came with 128KB (K - thousand, not M - million or G - billion) of RAM.  You got a nice GUI (Graphical User Interface) screen.  But it was built in so it was not upgradable.  And it was small and it was black and white only.  Then you got a 600KB (K - thousand again) floppy drive.

You couldn't add a second internal floppy drive and you couldn't add an internal hard drive.  So you had to boot off the floppy and it had to hold the operating system, your application, and your data.  Parts of the operating system could be saved in RAM after you booted up but there was only a little space and the more of the operating system you put there the less room was left over for your application and data.  That meant you were swapping floppies all the time.  But wait, there's more.

Remember the "leave as many parts out as you can" thing.  To get the price down they left a lot of parts out.  They used software running on the processor chip instead.  And many of these functions were dependent on tight timing. So at predetermined intervals you had to stop running the application so that some time critical function could take place on schedule.  This made writing applications very tricky.  If they didn't defer to the operating system properly the computer would start misbehaving.  This made writing applications much more difficult.

The result of this was that there weren't many applications available on the Mac.  They were very hard (expensive) to write what with the fact that they had to be small and properly behaved (defer to the operating system at appropriate intervals).  So it turned out that the original Mac was a cute toy.

Apple and Steve Jobs couldn't have been so stupid as to allow for no expandability could they?  No!  They weren't that stupid.  They incorporated something called the SCSI (Small Computer Systems Interface) bus.  This was a jack on the back that you could hook say a hard drive into.  But that meant you had a lot of cables and a lot of boxes littering up your desk.  Most people found that they didn't want to do this.  So the practical effect was that a lot of people gave up on the Mac.  They also warned their friends off them so sales quickly dried up.

Somebody fixed the Mac.  It wasn't Jobs as he was fired.  Who was it?  It was John Sculley.  He is a much reviled figure among Apple aficionados but the fact is that he saved the Mac and, by extension, Apple.  He is the guy who took over after Jobs was fired.  The first thing he did was increase the RAM size to 512KB.  It is not much by modern standards but it did a lot to relieve the pressure.  You could now run a bigger program on the Mac.  It was an easy change.  It increased the price slightly.  But by this time people could see the Mac's potential so they were willing to pay a little more.

The next fix came not from Apple but from an outsider.  Someone figured out how to fit a hard drive inside the case.  Sculley was smart enough to adopt the idea even though it was "not invented here".  That fixed the two most pressing problems with the Mac.  You could load a larger program onto the hard disk and then run it from the hard disk and within the expanded 512KB RAM now available. But there was a lot more that needed fixing.

Subsequent Macs added parts back in so operating system functions became far less time sensitive.  That made it much easier to write applications so people did.  Apple also changed to an external monitor so you could get a much bigger screen than the original one.  Finally, a way was found to support color monitors and things like networking.  Macs got substantially more expensive than the original Mac that was the brainchild of Steve Jobs.  But by this time customers liked what they saw and Mac sales increased to the point where Apple was on sound financial footing.

So why is Sculley the goat and not the hero?  The problem was that once he had fixed the Mac he did not know what to do.  So Apple drifted and soon started drifting downward.  This is when Jobs swooped in and "saved the company".  He then went on to success after success.  But he had learned a valuable lesson.

The reason Microsoft did so well over this period is that Microsoft did a much better job of working within the capabilities of cost effective hardware.  The PCs of the 1984 era were much more clumsy than the Mac but they did useful things.  The original iterations of Windows were crude and clumsy compared to the Mac.  But they lived within the abilities of the hardware available at the time.  As the hardware got more capable Windows got more capable.  Microsoft did not do a nice GUI until Windows 95.  But by that time the kind of hardware consumers were able to afford could handle the requirements.

I am not going to go into why Microsoft stalled out a few years after Windows 95 (hint:  Antitrust lawsuit).  Instead I am going to return to Steve Jobs.  It was no secret that he wanted to do the iPhone years before he actually did it.  But he had learned his lesson.  He couldn't do the kind of device he wanted to do at the price point he thought he needed to do it at.  So he waited and did things like the iPod.

But when he finally judged the moment right he brought out the iPhone.  And part of what made the moment right was a decision to outsource manufacturing to China.  All the Apple II computers and early Mac computers were built in the US.  Jobs decided he couldn't meet his price target for the iPhone if he built it in the US so he didn't.

The evolution of the iPhone has followed the Microsoft model.  Apple has regularly introduced new models with additional capabilities.  They have closely followed the increase in capabilities of the available hardware.  A classic example of this is camera resolution.  The camera on the latest model takes much better pictures than the camera on the older models.

It is unclear whether Jobs had an idea for the next new thing.  We'll never know because he is no longer with us.  It is too soon to tell if Tim Cook, Jobs' successor, can keep the momentum going.  Time will tell.

I am not a fan of Steve Jobs as a person.  I am also not a fan of him as a manager.  The justification for this bad behavior is the results he achieved.  And that's enough for a lot of people but not for me.  In spite of that I do want to end with some praise for him in two areas where I think he was truly superior.

He was a spectacularly good salesman.  This evidenced in his ability to sell Apple products to consumers.  But it also evidenced itself within the company.  He is now known for his "reality distortion field".  He was able to find a way to motivate people to achieve what they thought was impossible.  Often what he wanted really was impossible.  But those instances tend to get lost to the mists of time.  And just often enough he was right.  He convinced somebody that they could find a solution to an "impossible" problem and improbably they did.  And those occasions turned out to be extremely important so we now remember and revere them.

But beyond that Jobs was the best person at industrial design in at least the last 50 years and possibly longer.  We celebrate architects for designing beautiful buildings.  There have been several notable and extremely influential car designers.  But Jobs eclipsed them all both in the quality of his work and in his influence on us all.  He sweated the tiniest details.  There are stories about him spending days deciding exactly where a screw should be placed.

The result was series of devices that are characterized by many uses as magical.  They are both extremely functional (they work and they work the way people want them to work) and elegant.  They just look cool and feel cool.  There are designers that are good at functional (Bill Gates) and designers that are good at a cool look (any number of architects).  There are very few that could do either nearly as well as Jobs did both.

Wednesday, September 30, 2015

DHCP and a wrap up

This is really, really, really, going to be the last post in this series, for now.  At this point I have no plans to add anything.  But who knows what the future will bring.  All of these posts can be found in the September, 2015 section the of my blog.  (See Blog Archive in the navigation section at the right.)  But, for consistency sake, here is a link to the first post in the series:  http://sigma5.blogspot.com/2015/09/internet-bits-bytes-and-numbers.html.  And here is a link to the immediately previous post:  http://sigma5.blogspot.com/2015/09/internet-dns.html.  So . . .

DHCP

DHCP stands for Dynamic Host Configuration Protocol.  This mouthful is almost completely meaningless so what's up?  Back in the olden days IP configurations were set up manually.  When my company first rolled out TCP/IP that's what we did.  Several of us maintained extensive lists of which computer would use which IP address.  Besides being tedious and error prone it had a problem.  You had to go to each computer and plug the "static IP configuration" parameters in individually.  That was bad enough but my company had facilities in several states.  So if we wanted to change things up on a computer in another state we had to actually send someone there at a great cost in time and money.

And, hey, this is a computer thing.  Why not automate things?  Early attempts went by the names RARP and BOOTP.  In these cases you plugged everything into one computer.  That computer served the information out to the other computers.  But it was still a lot of trouble.  My company did not use either to any extent.  Then along came DHCP.  This helped a lot.  DHCP added the "dynamic" part.  Instead of having a list of computers and IPv4 addresses DHCP let you use a pool.  With DHCP you allocated a group of IPv4 addresses to the DHCP server and said "go for it".

DHCP depends on Ethernet or some other protocol that supports a the ability to broadcast to all other local computers.  Your computer sends out an "are you a DHCP server?" broadcast message.  Hopefully, exactly one machine answers back.  Then your computer sends a message directly to that computer that says "my name is X - do you have IP configuration information for me?".  The DHCP server looks in its mini-database.  If it already has an entry for that computer it sends out the information.  If not, it picks an unused IPv4 address from the pool, adds in whatever other information it is supposed to provide,  plugs that into the mini-database and sends it out.  Your computer catches the information, plugs it in, and boom! it is on the air.

Here's a little more detail.  Each entry in the mini-database has a time to live.  It can vary from a few months to a few hours, depending on your estimate of the rate of turnover.  In a coffee shop where turnover is quick a few hours is probably a good choice.  In a corporate environment where turnover is slow, a few months is a good choice.  If an entry goes unused too long it is purged and the IPv4 address goes back into the "available" pool.  The other thing is that the DHCP server can send out more than just an IPv4 address for the computer to use.  Typically it sends out the subnet mask, the gateway, and the addresses of the primary and backup DNS servers.  That's the standard set of "IP configuration" information machines need.

By shifting to DHCP we just had to set up a DHCP server at each location and make sure it had a big enough pool of IPv4 addresses to work with.  At this time we also converted from using our 5 class "C" public IPv4 nets to using private IPv4 nets so having lots of IPv4 addresses available at each location was easy to arrange.  Now we just had to make sure each machine had a unique name.  That was much easier to pull off.  Then when the machine booted up it would find the local DHCP server and get the information it needed to operate at that location.  This is usually referred to as a "dynamic IP configuration" for obvious reasons.  We might very occasionally need to change the DHCP setup at a location but that was it.

When you set up a DHCP server you have to plug in the address pool.  Usually you say something like "all IPv4 addresses in the range going from 192.168.0.100 to 192.168.0.200".  It is possible to specify multiple ranges but this is rarely necessary.  Most DHCP servers are set up pretty much the same way.  So it is easy to plug in the subnet mask, the gateway address, and one or both DNS server addresses.  If you have a home network that shares one public IP address among several machines you have a home DHCP server lurking somewhere.  How does that come about?

wrap up

I have left a couple of questions dangling.  I am going to answer them in this section.  But first I am going to do a quick review of my home setup.  My setup is more complicated than most home setups.  I am going to explain why I do things the way I do and then move on to some recommendations for how most people should operate.

Comcast is my ISP.  They have provided me with an Arris cable modem.  This box behaves somewhat like a combination DHCP server and gateway.  Comcast provides a pair of public IPv4 addresses to the box.  One is attached to the Arris box and one is available to be served up to whatever machine I hook up to it.  The hookup is an Ethernet connection.  If I only had one computer I could hook it up directly to the Arris box, set it to do DHCP (the default) and everything would work fine.  My computer would make a DHCP request to the Arris box and the Arris box would serve up a public IP address.  It would also serve up a subnet mask, gateway address (the address of the Arris box), and the addresses of two DNS servers operated by Comcast. That's how that would work.

But I want to hook several boxes up to the Internet.  How does that work?  I have another box.  It is a Netgear FVS318G ProSafe 8 port Gigabit VPN Firewall.  This is a box specifically designed for the home networking market.  It runs about $120 at Amazon.  (BTW, avoid the FVS318.  It has slower ports.)  It has a special port, the WAN port, that you connect to your cable modem.  That's the "external" interface of the box.  Then it has 8 more Ethernet ports, marked as LAN ports.  Together they constitute the "internal" interface.  I hook all my home network equipment up to them.  The 8 "internal interface" ports behave just like an Ethernet switch.  And between the "internal" interface and the "external" interface this box does NAT.  So now all my inside boxes can share my one public IPv4 address.

I also have a separate Linksys WAP54G Wi-Fi base station.  It is just plugged into one of the 8 inside ports on my Netgear box.  I also have a computer running Windows 2008 Server Edition.  This turns my home network environment into a small corporate network, also sometimes referred to as a "Microsoft NT Domain".  This is something most people don't need to mess with.  But I did system administration work on corporate NT domains for a couple of decades.  I like them and I know how to administer them so I did.  It is total overkill for most home users.

Nestled into this mess is a standard PC running Windows 7.  It has a private IPv4 address.  As does the Windows Server box, the Netgear box (on its internal interface), the Linksys box, my TiVo, my DVD player, and my printer.  I also have a couple of other boxes I occasionally use but I think you get the idea.  All the boxes I listed (and the ones I didn't) are able to get out to the Internet whenever they need to.  And they can talk to each other.  I can send files between my computers.  I can print from either one.  My home network does everything I want it to.  But it is overkill for most people.

But like more typical home network users there are some capabilities that all of us need.  So let me run down the list.  I have already indicated that the NAT capability resides in my Netgear box.  My DHCP capability resides in my Windows server box.  My DNS capability also resides in my Windows server box.  That means I had to configure both.  DHCP is pretty easy.  With Windows server DNS is harder but not a lot harder.  (And it probably will not surprise you to know that Microsoft uses its own code rather than BIND.)

First of all, remember that list of "root" servers.  Microsoft plugs that list in for me automatically.  And it changes very occasionally.  But when it does Microsoft sends out the updated list through Windows Update.  As long as I keep my Microsoft maintenance current, which I do, my "root" server list stays current.  I did have to configure a "forward zone".  It holds the "A" records for all my local devices.  And I had to configure two "reverse zones" to hold all my PTR records.  I won't go into the details on how this was done.  Suffice it to say it was not hard.

So I have this expertise built up from decades of doing this sort of thing for a living.  What's a regular person supposed to do?  Many people who don't know much about any of this have home networks that work just fine.  How is that possible?  The solution to both of these questions lies in looking at a more common setup.

Most home users do not have an NT domain operating.  So what do they do about DHCP and DNS?  The answer to both questions lies in the Netgear box.  That box can do DHCP.  I just turned it off.  You don't want competing DHCP servers running around and I knew that I wanted to use my Windows server to do DHCP.  (Why?  'Cuz!)  So I went in and turned it off.  Most people leave DHCP turned on and this is the right thing to do for them.  And the defaults for the box set up a home network using the 192.168.0.0/24 private net and configure DHCP accordingly.  I don't remember the range of IPv4 addresses the Netgear box selects as its default but it works for all but a few home setups.

That leaves DNS.  Here too the Netgear box has a cute trick.  It has a setting called "Get Automatically from ISP".  Remember that the box uses DHCP through its outside interface to get the information in needs to communicate with Comcast.  Well, included in that information are the IP addresses of two Comcast DNS servers.  When turned on (I turned it off manually) this option copies the two DNS entries it gets from Comcast into the DHCP information it serves out to the internal network.  The down side of this is you can't find the IPv4 addresses of the boxes on your internal network using DNS.  I like to be able to do that so I went through all those "NT domain" hoops.  But most people can and do live without this capability just fine.

So if I had not installed a Windows server and I had left all the settings on my Netgear box at their defaults I would have a perfectly functional network.  One final thing on this, the Netgear box assumes it is king of the 192.168.0.0/24 net.  As such it automatically assigns the IPv4 address of 192.168.0.1 to its inside interface.  Then it plugs this address in as the default gateway in the DHCP information it serves out.  So, if they used DHCP, and if they used the default DHCP setup the Netgear box comes with, my home computers would get all the settings they needed to fully participate in IPv4 networks.

The Netgear box would serve out to each machine a unique IPv4 address from the pool of 192.168.0.0/24 addresses it maintains.  It would automatically serve out a subnet mask of 255.255.255.0.  It would automatically serve out a gateway address of 192.168.0.1 (itself).  And it would automatically serve out the two DNS server addresses it got from Comcast.  That's how it works.

There are other boxes that have essentially the same capabilities as my Netgear box.  Some of them have 4 ports or none.  Some of them include a built in Wi-Fi base station.  Pick the box you like.  In some cases you can even get the box from your ISP.  And pretty much all the ISPs operate along the same lines as Comcast.  They might provide you with a different brand or model of cable modem.  And it might not technically be a cable modem.  But in all likelihood it will behave pretty much like the Arris box I got from Comcast.

And you actually don't need to know all this stuff.  Unless something goes wrong.  Then this information may be very helpful.  Do you have no (or bad) DNS server addresses?  Check your NAT box and make sure it is doing the "Get automatically from ISP" thing.  Are IPv4 addresses changing around in weird ways?  Check to make sure you have exactly one DHCP server running and check that the DHCP server is serving out sensible settings.  Are things physically connected up correctly?  In my case the Arris box needs to be connected to the WAN jack and everything else needs to be connected to LAN jacks.  If you have a separate Wi-Fi box is it trying to do the same things (i.e. DHCP) as your NAT box is doing.  For some services you can pick either box to host the service but there needs to be only one box hosting each service.

And then it may be those that just want to know how things work.  I hope these posts give you enough foundation so that you can explore anything or everything in more depth, should you choose to.  Wikipedia is a great source of more information on these subjects.  There are many hard core geeks among its contributors.  And they delight in drilling down much further than I have.  And in a lot of cases, they will provide you with references that will allow you to dive even deeper. It's a lot of fun, if you get off on that sort of thing.  And I do.  For the rest of you, I hope you have found this group of posts entertaining and enlightening.