I am a C and C++ developer from way back. I learned C when Turbo C 1.x came out in the Spring of 1987. Tom Yohe handed me a copy saying "if you are so smart then use this." And I did. I built a program to process Chrysler Dodge sales ordering tapes (streams of data) to turn out a script that would run a LaserDisc kiosk. I cut the processing time down from one man week, with mistakes, per vehicle to about 5 minutes of 80186 processing per vehicle.
I did that by processing the manufacturer's sales data file as stream of data rather than just reading in the entire file and trying to process the entire contents once loaded as a blob seeking back and forth for information. I processed the information as it arrived. Acting only on what I knew at that point and trying to predict or decide what to later in the stream and run back to previous data which was then the normal spaghetti code method
In 1990 Turbo C++ was released and I bought my second PC, a 80286 12 Mhz and a 40 MB hard drive, to run and learn it because most of the team I worked with stated that "C++ was too fat and slow to be viable for real programming."
I purchased Bjarne Stroustrup's book on "The C++ Programming Language" version 1. Next The Annotated C++ Reference Manual. Then version 2. Eventually version 3 and the special edition at some point. Along with The C++ Standard Template Library book.
From fully reading Stroustrup I learned one basic premiss of programming in C++. To paraphrase Bjarne, "If you cannot express your Object Orient Design in trees (I still prefer to use the term tries) and streams then you are doing it wrong."
I used this principle to guide my work in Multi-Media messaging to design and then program several networking applications that lead to my being award three US patents for my work on networked objects and streaming data. I was assisted my research and design by Steve Teale's "C++ Iostreams Handbook". Ever since then I have looked at every problem from a Stream and Tree design mentality.
As an example of how this works think of a simple HTML web page with its element tags. I created a simple browser for a set top box by looking at each HTML tag in the file stream to create an instance of an Object. The class of the object created knew how to read and parse the next level of HTML elements. As each object was created it formed a tree of objects.
Then by querying the tree of instantiated objects the browser could act as needed to display information or react to requests. In this particular instance the browser and subsequent HTML object tree was built to read and process file streams from Music Choice. This allowed displaying information and photographs held in the Music Choice data stream on the television via the set top box. This browser allowed Music Choice to transmit data streams that could change the look of the Music Choice music channel on TV.
So instead of the set top box having a static application that had to be updated and downloaded to all set top boxes in the Cable Operator's (MSO) system each time Music Choice changed their format the box had a browser that could download a HTML style or format page in the data stream. Thus I had created a functional programming system using stream information instead of a static procedural method.
Now as a continuation of this research and development I have begun work on MPEG video streams to do some Machine Vision thinking. I am going to design a set of classes to examine RTP streams of Video and Audio to determine objects within the video streams.
---
As an aside I used a similar method to create the Email to Voicemail to Email (EVE) system in the late 90's. The original system had a network of voicemail servers connected via PSTN style lines. Voicemail messages were passed between geographically dispersed voicemail servers by dialing and playback to record over the PSTN lines in real time. It took hours, even over a private ATM network, to move and synchronize user messages.
I had each voicemail server email their recorded messages as attachments to a central mail server. The email server would then route the attachments through a set of mail queues in which each recording was processed by queue rules. This eliminated the real time delays of playback across the private network. Allowed message to be transferred within seconds instead of hours. Cut the required voice bandwidth significantly. And gave users a copy of their voicemail messages in the email inbox.
The reverse was also done in that email messages forwarded to the EVE system were converted to sound via Text to Speech (TTS) so that in the pre-smart phone era users could receive email on their cell phones.
But that is another post to come.
Monday, September 9, 2013
Functional versus Procedural Stream Programming. My browser, your Choice.
Labels:
Borland,
C/C++,
email,
EVE,
IO programming,
MSO,
multi-media,
Music Choice,
networked objects,
OOD/OOP,
STL,
Streams,
Stroustrup,
Teale,
Tries,
TTS,
Turbo C,
voicemail
Sunday, September 1, 2013
Programming a Go-go;
Go dog Go
See Go run
Run Go run
Go West young man
Discovered yet another programming language today while doing some noodling on an example application I am contemplating building. Go.
How did this happen? Well I found my way to Google's Android Development area and then to Google's online Cloud and App stuff and was looking at Ruby on Google when I noticed that I might need to learn Python. And there was Go just sitting there waving its hand saying "pick me! pick me teacher, I am ever so smart."
Well normally I hate classes where some twerp keeps trying to answer all the questions by shouting "pick me." But in this case I think I may learn Go because Google is using it and some smart people are saying it is constrained well enough to be of use. Being a C/C++ guy from back in the day I would prefer to use Ruby but I am going to see what Go has to offer and try to make a few of the sample apps.
I did download the Google Android environment this week but having a few problems getting the Android Simulator to come up without an error. Since my "big" ideas needs both Android device knowledge and Google App and Google Cloud knowledge I will be investigating them this month.
As a heads up if anyone here has thoughts or knowledge on ChromeCast API, location services and simple lists in Google Cloud then you may want to chime in or follow along.
Subscribe to:
Comments (Atom)