Saturday, May 20, 2017

Computer Predictions from 1981

One of my favorite pastimes is reading old magazines, especially old computer magazines. They serve as a history book that was written as the history was being created. Thanks to Archive.org there are plenty available to read. One of the thing I especially enjoy in old computer magazines are the predictions of the future of the industry. In the January 1981 issue of Personal Computing I ran across an article by William R. Parks called "What will Computing Be in Fifty Years". He tries to predict what computing will be like in 2030 and 2080. It is still 13 years from the first date at the time I am writing this but a lot of what is predicted here is already possible or even happened. Here are the predictions in italics and my commentary on them.

 

"In today's America nearly every household has at least one television set. In fifty years, almost every home will have a computer system which will be even more powerful than the most advanced computer we have today."

According to a 2013 US Census report 83.3 percent of households reported owning a computer (1). If you include video game consoles, tablets and smartphones that people may do not automatically refer to as a "computer" then the number is likely higher. Most, if not all of these devices are more powerful than what was available in 1981, so I would say this prediction is accurate. It's interesting to note that with the current rise in the use of phones, tablets and computers to consume video content I wouldn't be surprised to see a decline in the number of TV's in US households.

 

"Nearly every appliance will have an intelligent component processor that can hear and speak. Some families will own mobile robots that can speak as well as listen to commands."

This is two predictions in one, so let's take them one at a time.

Most appliances these days have some sort of embedded processor in them, and we are definitely starting to see appliance with more advanced processing capabilities, especially with internet connected appliances. Voice synthesis is something that could  be added to any appliance today at very little additional cost, so I think this prediction is technologically possible, but it's not something that there is a lot of demand for. Voice recognition is a little harder since it requires more processing power, and I think we haven't seen a lot of this in appliance for both technological and practical reasons. If we do start seeing more voice activated appliances we probably won't see the technology built directly into the appliance, but instead will see devices like the Amazon Echo which will process the voice commands and then send them to the appliance. Most appliances have a very simple user interface so if you have to walk over to the appliance to talk to it, you might has well just use the manual interface. On the other hand, being able to preheat my oven without getting off the sofa has a lot more value. Of course voice recognition and response become much more valuable when we start talking about handicapped users.

As for mobile robots, this is something that lots of predictions of the future think we will have and it's something that I am sure a lot of people would want, but we clearly aren't there yet. We are starting to see robots in the home, but in very limited use cases like vacuuming and mowing the lawn. We really don't seem that much closer today to a general purpose home robot then we were in 1981.

 

"The huge television industry we have today, serving the general public in producing programs viewed by hundreds of millions of people, will be an even larger industry employing countless computer programmers in the production of mass media interactive programmed events in the year 2030."

There is no doubt that the TV industry has grown considerably since 1981, but they probably didn't imagine how much the industry would change. Back then people in the US were primarily getting their TV programming from the big three (four counting PBS) broadcast networks. Those networks are still around but have been joined by smaller broadcast networks, hundreds of cable networks, premium channels like HBO and Showtime, streaming services like Netflix and Amazon, not to mention user created content on YouTube.

As for the interactive part, this idea has been around for a long time in a lot of different forms. On-demand services have added some level of interactivity by allowing us to watch programs whenever we want. People also imagined being able to access things like weather, or stock quote, or even electronic mail through their TV, but the internet fulfilled that need. There was also the idea of the audience being able to directly interact with a program which I think is what this author was referring to. We have seen this happen in small ways, like being able to vote for contestants on a reality show, or participate in some sort of enhanced experience on your tablet while you are watching the show, but in general the idea of true interactive programming hasn't caught on. The technology is in place to do this, but I just don't think anyone has come up with a truly compelling way to make TV interactive.

Computer programmers have definitely become more a part of the TV industry just like they have in most industries.

 

"Fifty years from now, all banking and mail will be done directly from a computer terminal in the home. A kind of paperless society will result and 20 percent of the population will work at home, communicating to their places of business"

Let's take this one a piece at a time starting with banking. A Pew Research article from 2013 said that 51% of adults bank online (2), and a 2015 article from CBS Money Watch says that 39% of adults with mobile phone use them for online banking.(3) We could also consider ATM use as doing banking from a "computer terminal".

As for mail it's clear that a lot of personal correspondence has moved from mailed letters to online communications. Mail also ties in with the online banking. Total first class mail volume going through the USPS has dropped from 97.7 B pieces in 2006 to 62.4 B pieces in 2015 (5). According to a 2015 article in Digital Transactions, US consumers paid 37% percent of bills online, but 90% still want to receive the bills on paper. (4)

Banking and mail have definitely made large moves online, but we are still a long way from "all banking and mail", and I doubt we will reach that point by 2030.

According to the United State Bureau of Labor Statistics, in 2015, 24% of employees did some or all of their work from home up from 19% in 2003 (6), so we appear to at least be close to the prediction already.  In the 80's people definitely thought telecommuting would be a big thing in the future and the internet has helped make that possible, but people have also discovered that even though there are some good things about telecommuting, there are also significant down sides which probably explains the slow growth over the past 12 years, a trend which I would expect to continue.

 

"The same chips that manipulate data will also be able to store many volumes of books. Some of the programs and data will be so complicated that it will take many years of training to fully utilize such a system. For example, there will be one chip especially for doctors (reference programs and data for medical professions) or a machinist's chip (all necessary programs and graphics displays to operate as a machinist). Computers will also be a very important subject in the schools."

I am not exactly sure what the author was trying to get at with this prediction. Chips that had both processing and persistent storage did exist even at that time, but even today the only place you really see this is in embedded controllers. The whole idea of data and processing both being on the same chip isn't even that important since you can have them on separate chips in the same package and get the same result. As to the prediction about how complicated it will be, there are certainly programs that have a large learning curve, things like CAD and design software, but even these don't require years of training. I think in general software has become easier to use and not harder.

One way we could could think about the realization of this prediction is in the form of smartphones and tablets where they could be loaded with all the apps and data (or a connection to the data on the internet) for a specific job.

That last part has definitely come true, classes in computers are common in both grade schools and even more so in colleges where we have entire curriculums about computers.

 

"The problem of unemployment will be solved by distributing the workload. Every citizen' will work a fewer number of hours per week because of automation. Programmers, however, will work at home as many hours per week as they like and computer programming will be the most open field of employment."

Clearly the problem of unemployment is nowhere near being solved and the issues brought up by this prediction are quite complex. We have definitely seen an increase in automation which has eliminated jobs, but this has not necessarily lead to a shorter work week. The Internet has also lead to the elimination of jobs by allowing people to do things online where they used to have to call customer service, but on the flip side the Internet has also opened up other areas of employment and made it much easier for people to set up their own companies online. As discussed in one of the earlier prediction there has definitely been an increase in work at home jobs, and programming is one of those jobs that is well suited to working from home. Were this will all go over the next 13, and even more so 63, years is hard to predict but it will definitely have a large impact on our society.

 

"A project to make computers virtually human-like will succeed. The obvious dangers to society will be overcome by a liberally educated society that will see the differences between man, the human, and simulated man, the computer-robot. Man will be in control and children will be taught to distinguish between artificial intelligence and human intuition. The power of the computer will nevertheless make some think that certain robots are "alive" and some computer personalities will be as famous as Hollywood stars are Today."

Making a computer that can behave like a human has been a dream of computer scientists since the beginning of the computing. Some progress was made in niche areas, for example programs that can play chess, and more recently we have seen things like IBM's Watson project which was able to beat a human in a game of Jeopardy. Despite this progress we still haven't reached a point where that average person will run into a general purpose AI. Educating people about this will be important, but I think we will have a period, maybe a long one, where people are easily fooled by AI even when they have been educated about it. We will likely see AI in computer form first, because making a human like robot holds challenges beyond the AI. The idea of computer personalities still seems very far off. Special effects technology has come a long way and photo realistic digital characters, both human and otherwise are becoming common in movies, but there are still talented actors behind the scenes bringing them to life.

 

"The 1970's and 1980's will be looked upon as the important beginnings of miniaturized computer technology at low cost. Perhaps, in the future complex society, computer-robots will sell for the same price automobiles sell for today. The robot industry will become as important as the auto and steel industries and just as nearly every household has a car today, it will also have a computer-robot."

The first statement is obviously true. That was the era where the transition from main frames to personal computers started and it definitely was the start of computers becoming smaller, more powerful and cheaper. I have talked about robots earlier in the article, as for cost that is really hard to say at this point. The few robots that are available today are significantly less expensive than cars, but it's hard to say what a fully functional personal robot might cost.

  1. http://www.census.gov/library/publications/2014/acs/acs-28.html

  2. http://www.pewinternet.org/2013/08/07/51-of-u-s-adults-bank-online/

  3. http://www.cbsnews.com/news/smart-phones-are-revolutionizing-consumer-banking-habits/

  4. http://www.digitaltransactions.net/news/story/Americans-Overwhelmingly-Prefer-Paper-Bills_-but-Increasingly-Pay-Them-Electronically

  5. https://about.usps.com/who-we-are/postal-facts/decade-of-facts-and-figures.htm

  6. https://www.bls.gov/opub/ted/2016/24-percent-of-employed-people-did-some-or-all-of-their-work-at-home-in-2015.htm

Friday, January 20, 2017

C# Substrings

Anyone who has worked with strings in C# is probably familiar with the Substring function. For example, if we want to get the first three characters of a string we could do this:

string s = text.Substring(0,3);
or to get characters 3 and 4:
string s = text.Substring(2,2);
Only slightly less known is that if you want to get the end of a string you can omit the length and just use the starting character. So to get everything from the 3rd character to the end of the string you can do this:
string s = text.Substring(2);
We can also use Substring to get a single character but there are actually some lesser known ways of doing this.
The first way is to use the fact that a string in C# can be treated as a character array. To get the third character you could do this:
char c = text[2];
This method could also be used to iterate through all the characters in a string:
for(int i=0; i<text.Length; i++) {
   char c = text[i];
   // Do something with c 
}
but there is an even simpler way to handle this:
foreach(char c in text)
{
     // Do something with c 
}
This last method is a much cleaner way to iterate through all the characters in a string.