Intel's Ronler Acres Plant

Silicon Forest

Wednesday, August 26, 2015

Goose

Google Programming Language is Go for 2012 launch
Back in the late 1970's, some Computer Science students at some schools were learning about the C programming language and the UNIX Operating System. The University of Texas in Austin wasn't one of them. We learned about Pascal and Fortran and a lot of low level theory about how computer systems worked.
    When I joined the Intel camp I picked up PL/M-86, which was kind of like Pascal and kind of like C. Some people would say it was more like assembly language. (Some people call it assembler, which I guess is kind of a short cut, but to me 'assembler' was a thing, i.e. a program to assemble code written in assembly language into machine code.)
    Somewhere along the way I picked up C and when I was at Stevens it was all C all the time.

    A few years ago I interviewed for a job at Google. They wanted somebody to test the motherboards they were building, which I thought was a little weird. Google is all software, isn't it? Lots of people make computers, why would you go to the trouble to build your own when you can buy these things right off the shelf? I eventually figured out it was simple economics.
    Making printed circuit boards is much easier than making chips. It's more akin to a printing press than the nuclear physics level of technology used to make chips. As such, it's much easier to get into it, and so lots of people did and the knowledge needed to do it has become diffuse.
    Guys who are making circuit boards for the open market are taking a risk that someone will buy them. As such, they need to pad their bill to compensate for the inevitable duds. Since making boards is fairly easy, it doesn't take a huge volume to make it pay to make your own. Specialty manufacturers make runs of a couple of dozen boards all the time. A run of a thousand boards could easily make building them yourself totally worthwhile. And how many servers does Google run? Anybody want to guess? (Look here.)
    The point is, in case your weren't already aware, is that Google is totally willing to roll their own.

    One of folktales that comes out of the programming world is the story about a really smart programmer (typically from China, because we are racist white guys, you know) who has written a really cool program all by himself. This is wonderful until he leaves the company and someone else gets to try and modify it, or fix a bug, or change the copyright date or something, and what the new guy finds is a pile of spaghetti code. Code so convoluted, twisted and riddled with crap that he has no hope of ever figuring out how it works, much less how to fix it. Now the guy who originally wrote it had no trouble with it because he wrote it. It may have taken him ten years (or weeks or days), but he had a model in his mind and he understood how it worked. Any little change or fix was easy because he knew exactly where it needed to be tweaked. But since he never told anyone else how it worked (probably because he was Chinese and his English wasn't that good so no one was willing to try and understand him) when he left the company all that knowledge went with him. In a case like this the best thing to do is to throw out the original and write a new one. Or hire the Chinaman back.

    These days C++ seems to be very popular, along with a babble of interpreted languages like Python and Ruby and I dunno what all.
    Interpreted languages are very popular with application programmers (the people who write all the apps for your smart phone). They make it quick and easy to write programs, but they do have some limitations. First is that they bring an enormous library of functions and procedures with them. On one hand, this is good. All the code needed for all kinds of cute little tricks has already been written, you don't have to write them yourself. On the other hand, you didn't write them and if they break you are kind of screwed. Yes, you can probably find some way to deal with it, but that is a time consuming hassle. The other problem is the assumed environment. If everything you are doing is inside the envelope, so to speak, all well and good. However, if you want to do something that is outside the envelope, like actually talk to the hardware, well, good luck with that. It can be done, but you will probably be sweating bullets to get it to work.
    C doesn't have that problem. It has other problems, and it doesn't provide much in the way of an 'environment'. You have to pretty much build your own, but you can do anything that can be done with a computer. It is very in tune with a computer's basic operations. Works for me.
    C++, I think, was a reaction to the genius Chinaman problem. To be fair, not all bad code was written by furrin devils. We've got plenty of home grown hackers butchering their way to inscrutability. I've dealt with a few. The C++ crew was also trying to give it some more power, so more complex things could be done without having to write a mile of code to implement it. Teach the compiler how to do these things and let the compiler generate the mile of code.
   The problem with C++ is that they talked about it. Endlessly. On one hand, this is also a reaction to the Chinaman problem. Let's make sure that more than one person understands what this program does. And if it's a big project, people who are working on different parts of it are going to have to talk to people who are working on other parts so that when the project is complete, the two parts will play together. So now people are talking to each other, which is good, but some people really like to talk and will spend all day talking if you let them. When you let people talk, sometimes they come up with good ideas, sometimes not so good ideas, but when you are talking about imaginary shit you don't really know if it's a good idea or not until you try it.
    What happened is that someone collected a bunch of these ideas and stuffed them into C++ and because the talkers were talking about it, it became popular. The C++ versus C language became a religious war for a while. I think it has been pretty much settled by a division of the Union. There are two camps and they just don't talk to each other, probably don't even acknowledge the others existence. I think it comes down to personality types. All the lawyer types support C++ because of the endless litigation involved, while the mechanically minded go for C.

    A few weeks ago I was looking at the employment want-ads and I noticed someone was asking for Go programmers and I'm thinking great, another super flakey programming language for another obscure niche in Smart-Phone land.

    In my mind, my father-in-law was first and foremost a golfer. In his prime be probably played 200 rounds of golf in a year. He was club champion for several years. He was, and still is, a character. But a couple of years ago he had a stroke and now he is living in a retirement home and the most competition he gets is a game of cribbage. No more golf, for now anyway.
    We went to visit him this summer and I noticed that he had several books on the windowsill. I was a little surprised by this because I never knew him to be much of a reader. He was a golfer (see previous paragraph). On the other hand, he is a lawyer, so maybe after spending all day reading legalese he had had enough of reading. Now, in his enforced retirement, he has more time to kill and has time to spend on amusements, like reading.
    My wife recently told me that my mother-in-law used to read my blog religiously, or least more than once. Now I'm thinking perhaps my father-in-law might like to read some of my ramblings, but he is old school and isn't going to learn how to use a computer. Well, shoot, I've got a printer, I could print a story and mail it to him.

    A Chromebook is my main computer these days, but my printer is connected to my Linux box. Not to worry, Google has something called cloudprint that lets you print to any registered printer from any Google-fied computer. Well, sort of. There are any number of web pages that will tell how easy it is to set up cloudprint, just follow these steps. As if. Near as I can tell they are all lying, especially for someone who is trying to use Linux.
    Eventually I found an authorized Google project on Github with all of the source files to implement Google's CloudPrint on Linux. All I have to do is download them, along with all the necessary tools and libraries and who knows what all, spend a few minutes (hours? days?) connecting them all together, and presto, I'll be able to print directly from my Chromebook. How wonderful is that!
    So I'm looking at these source files, just for grins, see if they are really there and not wrapped up in some obscure archive format, and what do I find? They are written in the Go programming language. Huh. So now I look up Go and I find that it comes from Google. Google didn't like what the market offered, so they wrote their own. Near as I can tell it is a derivative of C, with some added features or something, but not so expansive as C++. You might call it C+, but you might get that confused with C# (yet another programming language), so Go.
    Now all I have to do is order some new ink for the printer.

The title? Go comes from C, -> Go out of C -> Go out of See -> Goose.

No comments: