今日推荐英文原文：《The Parallel Threads of Life and Programming》
推荐理由：一个在 Windows 操作系统上适用的小工具。在看到某些文字或者图片的时候希望将它们存放为文件，但是新建文本或者另存为图片都稍显麻烦，而这个工具能让你直接将文字保存为文件或者使用复制粘贴来保存一张图片，在需要进行大量这种操作时能够节省不少时间。
今日推荐英文原文：《The Parallel Threads of Life and Programming》作者：Brandon Wozniewicz
The Parallel Threads of Life and ProgrammingOur deepest desire is that, by paying the cost which is time, we are shown a glimmer of some fundamental truth about the universe. To hear it whisper its lessons and point towards its purpose.
If you look hard enough for these lessons you find them. Whether they are a manifestation of your mind or can be held in your hand, once you see them, they remain forever yours.
Programming offers great parallels to life. We are tasked with creating something, something whose sum–in the end–feels greater than the parts. Like life, it is a test of bounded creativity. There are rules we must follow, some we should follow, and others we are free to ignore. Programming offers us a glimpse, however ephemeral it may be, into some fundamental truths about the world in which we reside.
Four Parallels Between Programming and “Life”
- Iteration is progress.
- Most complex problems are collections of smaller problems that have already been solved.
- How you define a problem is how you will solve a problem.
- The arrangement of parts is much more important than the parts themselves.
Iteration is progress.Imagine if I gave you a magic bag. What ever you place in the bag will double in value every day. The only catch is you have sit in a chair and stare at the bag for 8 hours, and the only thing you can place in the bag is a single penny.
Man, rules, huh?
If you started the month with that single penny, and placed it in the bag, you would only have $163 on the 15th of the month. Surely, you think, there must be a better way to make $163 in 15 days. Considering this, you might be inclined to stop spending 8 hours a day staring at a bag. But if you are willing to continue for 15 more days, you would have more than 5 million dollars by the end of the month. Go ahead, I’ll wait while you do the math.
In programming, we use the term iterate to indicate repeating something. In its loosest definition, it means just that–repetition. In a more formal definition, it is repeatedly applying a procedure to the previous result of that procedure. For example, adding the number 1 to 1 to get 2, then adding 1 to 2 to get 3, and so forth.
When we iterate we are also looking for feedback, waiting for some condition to be met so we can either stop iterating or adjust how we are iterating. If we fail to listen for that feedback, we may get stuck in an infinite loop. Our computers freeze up, and like the impatient elevator rider, we now repeatedly press CTRL ALT DEL to try to get out.
Life is no different. We often expect we can jump from point A to point B without ever defining what point A or point B is. And, even when we define those points, we expect an immediate move from start to finish. Instead, what is often the truth, is we must incrementally make our way from beginning to end. We must listen for feedback that tells us where we are so we can make adjustments.
When–or if–we have goals, progress can often feel–for the first few days, weeks, or even months–non-existent. We’re often enticed to start over or start fresh. But in doing so, we fail to realize, while we might not be at our goal, we are somewhere in between. A complete restart isn’t necessary, we just need to make some minor adjustments.
Stop starting over. Let iteration be the force the creates progress.
Most complex problems are collections of smaller problems that have already been solved.Even the most fascinating apps are a series of mostly mundane solutions to mundane problems. In fact, most of the solutions implemented within a program are nothing unique. It is the combination of those mundane solutions that creates a unique product.
There is a term you may have heard called abstraction. To abstract something is to move something away from something. In computer programing, when we abstract something, we are building higher-level technology on top of lower level technology to make it easier to work with the lower level technology. For example, most programming languages are abstractions of the infamous binary language (0s and 1s). They put a layer between us and some more fundamental, but cumbersome level of interaction with the computer. These higher-level languages allow us to focus on higher-level problems.
You may have also heard the term library. And, while I am not speaking of a poorly lit, dusty, and quiet location where books live, it isn’t far off. A library, in programming terms, is code that someone else wrote that you can use to solve routine problems. It abstracts away those things which aren’t absolutely fundamental to solving what ever problem you have. For example, if you are writing a program that requires someone to log in to use your app, you could write the code to encrypt and decrypt passwords yourself, or, you could use code written by someone else that will do that for you. With option 2, we free up time to focus on bigger problems our app is trying to solve.
All of us use abstractions in some shape or form. For example, the grocery store is an abstraction of producing our own food. A car is an abstraction of traveling by foot. An oven is an abstraction of building a fire. These are layers we place in front of us, that allows us to allocate time to higher-level problems.
Reinvent the wheel only to learn how to make a wheel, not to drive to the store.
How you define a problem is how you will solve that problem.If I told you I would give you a lump sum of $100,000,000 if you would read the book Frankenstein to me every day for the rest of your life would you do it? What about if I were to give you only $1/day?
Most of us would jump at the opportunity for $100,000,000. Even with a zero-percent return and inflation, you’d likely be set for the rest of your life. But, how about for $1 a day?
My guess is some people jumped at the first opportunity, and scoffed at the second. Maybe others googled how long it would take to read Frankenstein (about 5 hours– if you are curious). So you might be thinking $100,000,000 for five-hours per day of work is worth it. Thats 35 hours per week for the rest of your life. That is probably less than you work now. But $1/day isn’t worth 35 hours of work per week.
You decided on the solution based on how you defined the problem. You defined the problem is having to read to me once per day. What if you define the problem as having me listen to you once per day? Did the lights just turn on? Could you record the story and just play it?
Recall the story of a truck that drove under a bridge and got stuck. Engineers spent hours trying to figure out how to move the bridge. A child came up and said, “what if you let the air out of the tires?” From the child’s vantage point, the problem wasn’t the bridge was too short, but rather the truck was too tall.
Most people can solve any problem. In fact, most problems state the solution. For example, if the bridge is causing the issue, the answer is to do something with the bridge. If, however, the problem is that the truck is too tall, then the solution–almost glaringly obvious–is to make the truck shorter.
The arrangement of parts is much more important than the parts themselves.What does the Google Maps codebase, the Declaration of Independence, Martin Luther King Jr.’s I have a dream speech, Steve Jobs 2005 commencement address, and my first app, Hello, world app have in common?
The access to the same 26 letters of the English alphabet.
There is very little that is more fascinating to me than the written word. The written word is one of the most powerful technologies that emerged from humans. Yes, I use the term technology because–even carved into the the wall of a cave–it fundamentally changed how we persist information. No longer was data constrained within the boundaries of our minds. While the purpose of the written word was initially linked to record-keeping, it quickly became a way to spread ideas. Some of these ideas would anger, and others inspire.
Every language (including computer language) has subtleties when transmitting information through writing or speech. The words and their constituent parts may be slightly different, but ultimately, a language is a set of symbols that can be arranged into what seems to be an infinite number of ideas.
For example, in the English language, there are 29 symbols that I can use to represent nearly my entire universe. I’ve mentioned the 26 letters, but it is also helpful to have access to periods, commas, and question marks. Those 29 characters are available to you, me, and were available to Steve Jobs. Yet, each of us, throughout our lives, will follow different trajectories based on the combination of letters we chose. And, while we often add words to the dictionary, we don’t usually add letters. This means that all the ideas that can exist, already do, with their constituent parts quietly waiting for us to shuffle them into existence.
Les Brown sums it up well with this thought experiment:
- Imagine if you will, being on your death bed. And standing around your bed–the ghosts of the ideas, the dreams, the abilities, the talents given to you by life.
- And that you, for whatever reason, never acted on those ideas. You never pursued that dream. You never used those talents. We never saw your leadership. You never used your voice. You never wrote that book.
- And there they are, standing around your bed, looking at you with large angry eyes saying: “We came to you. And only you could have given us life! Now we must die with you forever.”
- The question is — if you die today–what ideas, what dreams, what abilities, what talents, what gifts, would die with you?