Thursday, May 17, 2012

Please Learn to Think about Abstractions

Please Learn to Think about Abstractions:

Jeff Atwood wrote a post called Please Don't Learn to Code and Zed Shaw wrote a post called Please Don't Become Anything, Especially Not A Programmer.
My wife lost her wedding ring down the drain. She freaked out and came running declaring that it was lost. Should we call a plumber?
I am not a plumber and I have no interest in being a plumber. While I advocate that folks try to be handy around the house, I choose to put a limit on how much I know about plumbing.
While my wife has an advanced degree in something I don't understand, she also, is not a plumber. As a user of plumbing she has an understandably narrow view of how it works. She turns on the water, a miracle happens, and water comes out of the tap. That water travels about 8 inches and then disappears into the drain never to be seen again. It's the mystery of plumbing as far as she is concerned.
I, on the other hand, have nearly double the understanding of plumbing, as my advanced knowledge extends to the curvey pipey thing under the sink. I think that's the technical term for it. After the curvey pipey thing the series of tubes goes into the wall, and that's where my knowledge ends.
Everything is a layer of abstraction over something else. I push a button on my Prius and the car starts. No need even for a key in the ignition. A hundred plus years of internal combustion abstracted away to a simple push button.
Jeff said:

Please don't advocate learning to code just for the sake of learning how to code.

Zed says:

Never listen to people who try to make beginners feel like losers.

I think everyone should learn how to think and when to dig deeper and should be able to do it in a welcoming and friendly environment.
Learn how to question how things work. Learn that everything new and simple hides something large and complex. We are all standing on the shoulders of giants like Newton, Tesla, Kettering, Berners-Lee, and on and on.
You can chose to live in a world where things just work, or you can choose to dig a little. You don't need to learn to code, you don't need to be an expert in everything but know that you can learn. You can learn a little or a lot. I don't think the Mayor of New York  needs to know how to code, but it'd be nice if he knew a little about DNS and a little about HTTP.
Judge Alsup in the Oracle v. Google case has been learning Java on the side during the case. Recently when a lawyer tried to imply something was a days work and patentable the Judge, armed with his new understanding that ends an a lower level of abstraction declared (via Groklaw):

Judge: We heard the testimony of Mr. Bloch. I couldn't have told you the first thing about Java before this problem. I have done, and still do, a significant amount of programming in other languages. I've written blocks of code like RangeCheck a hundred times before. I could do it, you could do it. The idea that someone would copy that when they could do it themselves just as fast, it was an accident. There's no way you could say that was speeding them along to the marketplace. You're one of the best lawyers in America, how could you even make that kind of argument?
Oracle: I want to come back to RangeCheck.
Judge: RangeCheck! All it does is make sure the numbers you're inputting are within a range, and gives them some sort of exceptional treatment.

The Judge could have remained in the dark, or relied on an expert to interpret for him, but he dug a step deeper and learned some Java. He knows how to think and he applied to remove a layer of abstraction away from the problem facing his court.
I opened the trap under the sink and retrieved the ring. She was thrilled. "I never knew that was under there." Now she does and now we both know a little about plumbing and abstractions. And that's a good thing.



© 2012 Scott Hanselman. All rights reserved.





ICT4PE&D

No comments:

Post a Comment

Thank's!