(a)

There’s a guy in the software field called Greenspan, and I’m sure you’re not familiar with him, but you probably don’t know the following:

Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

Any C or Fortran program complex enough will contain an AD hoc, substandard, bug-ridden, slow, half-functioning implementation of Common Lisp.

This is known as greenspan’s tenth Law (there are no first nine laws). This guy has never done anything special in his life, but he has a law that is destined to go down in programmers’ scorn chain.

After learning the power of this sentence several times as a C programmer, I finally broke into the Lisp camp late last year, first by racket, then by Jumping into clojure, the golden Club. To be enlightened by the likes of Rich Hickey and David Nolen. Although there is a evil before killing in the selfish: want to let oneself stand on the top of the chain of contempt proud Ni quartet; After killing come in is fear and trembling, sweat dare not go out, learn the more things, the more he despise himself.

Learning a language that is “out of the norm” for you opens up a whole new world for yourself and allows you to get out of the D-K effect. It felt like a C programmer using Python’s repL for the first time and seeing a list for the first time, Dict gracefully wanted to cry. Of course, languages have their own scenarios, and it’s not the presence or absence of a REPL that counts, but how much wisdom you can get out of it that you didn’t know existed. A Python programmer who has learned C code, figured out preprocessor, compiling, linking, loading, and disassembled will cry with joy.

That’s the advantage of learning a language that is alien to you. A Python programmer who learns C, Erlang, Clojure, haskell is an aberration; Learning Ruby is not. Cython and MRI’s GIL (Global Interpreter Lock) are very close to each other. Paradigm shift is of great importance in learning anything. It is a key to continuous growth.

(2)

C and assembly is like Taizu Changquan. Unknown boy play up is the effect of children fighting in the hands of Xiao Feng, but it is fatal. The syntax itself is extremely simple — you can count key words with your hands and feet, and write hello World in two minutes — but its power will only come if you have a thorough understanding of the system and practice various internal techniques.

PHP/javascript is a great way to attract stars. Practice is not difficult, no internal force of the entry quickly, the Internet is everywhere ready-made modules, according to their own immediately after the level of promotion. But its fatal flaw means that you can only swim in the middle of the class, and then bite back when you don’t use it well.

Python/Ruby is the taiji sword, which can be easily dealt with from a humble script to a high-powered machine learning. However, the performance and interpreter implementation are inherently inadequate (Guido/Matz: I gave you an electric drill, you must use it to drill steel plate, the performance is not good, I fault), resulting in computational /IO intensive problems, which can be very painful to deal with.

Erlang/Elixir is like the eighteen palms of the dragon, which are wide open and closed, strong and powerful. But the entry is not easy, deep thinking, will not be many people, can only rely on their own hard study. Actor model, Supervision tree, Messaging passing, pattern matching, light understanding, is half a year of time, practice, that hand is the master style.

Clojure is like nine swords. “Wind and thunder are a change, mountains are a change, water and fire are a change”. The core of clojure is to respond to all changes with invariability. Even though the demand is ever-changing, we should guide the outline and find the flaws, and then use Macro and polymorphic. Code is data, and data is code. With light weight, object and function can be reduced. If you retreat, water will not leak; if you advance, you will attack everything.

Haskell is like a big shift, and it’s hard to fathom without deep internal forces. Lazy Computation/Monad does crazy things like traction and displacement. A program is just a series of transformations from input to output. Do you transfer data one move at a time, or do you transfer operations? By answering that question, Haskell is in the door.

(3)

Professor Randy Pausch (yes, I’ve heard that name a lot) tells a story. He played football when he was a kid, and the coach wouldn’t give the team the ball when he asked them to do opposing drills. Coach, are we playing football or are we playing football? The coach stopped the kids and said,

“How many players play in a game?”

“22”

“How many people have balls in their hands?”

“1”

“I’m going to teach you how to play with 21.”

Reflecting on the story, Randy said: fundementals, fundementals, fundementals. Cool stuff is like the floating part of an iceberg, we just don’t see the more critical bottom.

So learning a language, grammar is just a flying football. Just because you can catch the ball and throw it far doesn’t mean you can run off the ball. Learning a language without understanding its basic ideas is superficial.

(4)

We’ve been writing code for a long time, and there are some things we can’t get around: The requests flowing into the system are first authorized and authenticate, then validate, then route, and then all kinds of transform. If necessary, Record the intermediate results that need to be saved and output Response.

So greenspan isn’t quite right. For most people, writing software is like writing an AD hoc, substandard, bug-ridden, slow compiler with only a few features. We’re just using crude, poorly designed methods, cobbling together classes, functions, and if-else to create a compiler that can only be used in certain scenarios.

Or databases. A database is a compiler, and a compiler is a database. It depends on how you interpret it.

(5)

This doesn’t seem to be the era of lex/ YACC or Bison/Flex. I have witnessed a colleague struggling to parse a system’s data files line by line in Perl without thinking of writing a BNF. The BNF is not an option for him.

Database also gradually no store procedure, trigger what things. The new generation, born on the Web and raised on start-ups, has identified these things as vendor Lockin’s filthiness, easily ignored. I haven’t written trigger myself in years. Recently, dealing with an older Java system with a third party that didn’t have a Hook interface, I went back to trigger and Temp tables in order to keep track of updates to a particular column under a table so that my code wouldn’t change the system (and I wouldn’t be able to change a complex EJB system). Colleagues see, say: huh? How does this work in ORM?

‘You have to have at least two solutions to get to Tradeoff,’ Mr. Hickey said of Tradeoff. However, most of the time it is not easy to find a solution, let alone two or three. Unfortunately, almost everyone who writes code talks about tradeoff when doing design.

(6)

As we choose technology and get the job done, we forget that software is actually working for business goals. Any code that isn’t optimized for practical business goals is rogue. As programmers, it’s easy to get into the design-centric realm:

  • It’s not a fucking bug, the user used it wrong

  • It’s a stupid customer to ask for this

  • It’s not my fault that no one uses it

Commercially, cost/benefit, ROI, time to market, profit; Programmers want tests to pass, code to be submitted, and requirements to be changed.

There is no review, UT or CI in the code. Developers test and test themselves and push production instead of writing logs. The system is partially paralyzed until users find it. But they do a good job. Bad software, a lot of technical debt, can always be made up by bringing in better people; Business rotten, software NB, CI pipeline flying, and how?

One product I recently worked on, Instavest, had such a poor UI that EVEN I wanted to help them change it — using bootstrap, I thought I could beat them even if my UI was as bad as mine. But it is of no damn use

So don’t complain about not being valued and not having a voice. Business vision is the core. If you don’t practice business vision, you can’t find products that can be used and customers are willing to buy. You can only play a part-time role (CTO is also a part-time role). Even entrepreneurship is, in theory, an easily replaceable role.

If you think this article is good, please give it a thumbs up. Thank you very much!

Welcome to subscribe to our wechat account programmer_life. Each article strives to be authentic, Beijing time around 12 noon, West time around 8 PM to meet you.