Live data from Hacker News

Cargo cult programming (2020)

blog.bitgloss.ro

11–20 of 50 posts

Re: Cargo cult programming (2020)

#11

Cargo culting is basically doing something you don't understand, hoping that it'll accomplish your goals. Following this person's advice to not learn from blogs and articles, and instead only learn from books, sounds like cargo culting to me. The source of the information doesn't matter. What matters is learning new concepts, knowing how to apply them, and understanding the reasons for applying them. You can learn th…

Next up: why cake driven development is a cargo cult.

Re: Cargo cult programming (2020)

#12
Cargo cult programming, as defined in the Wikipedia article referenced in the blog[1], is bad.

The blog post asserts ways to identify cargo cult programming but, unfortunately, they are probably even worse. Forcing code authors to eloquently describe code that they may have written long ago, then judging the code based on that eloquence, strikes me as a cargo cult method all by itself.

[1] https://en.wikipedia.org/wiki/Cargo_cult_programming

Re: Cargo cult programming (2020)

#13
post #9

"Ask them to explain in detail, a small part of the product. Yes! In detail! ... Everything is explainable in layman’s terms…" - so now you dependent on the teaching/explaining talent rather than code.

It's more accurate to say you depend on the teaching/explaining talent in addition to code talent. Why is that a problem?

I've never heard anything as helpful for learning as the Feynman technique: https://fs.blog/2021/02/feynman-learning-technique/

The article's mention of "best practices" rings incredible true. If it's a "best practice" you should be able to easily list a half dozen reasons why. Otherwise you don't really understand what you're talking about.

Re: Cargo cult programming (2020)

#15

Earlier quoted context omitted.

Who remembers their sources anyway? Once you learn a concept or a principle, the source of that knowledge fades away pretty fast while the concept remains.

Getting a bit off topic but I definitely have some strong associations between concepts and the time & place or people I learned them from.

I have this only for concepts on radically different topics.

If it's something about history, I probably learned it from Revolutions, because I don't read a lot of history otherwise.

If it's about cryptography, I probably learned it from The Code Book, because I don't read a lot about cryptography otherwise.

If it's about language features in Python, heck if I know where I got it from, I watch, read, hear about, and find new stuff about python all the time, it's my job.

Re: Cargo cult programming (2020)

#16
post #5

I guess I do a lot of cargo cult programming by the metrics in the article: if someone approaches me and demands a detailed explanation of the design principles involved in some minor function I wrote months ago, plus a list of the programming books I consulted (printed books -- no online resources, please!), I will probably score poorly in "eloquence" since I'll just be standing there slack-jawed and bewildered.

Who remembers their sources anyway? Once you learn a concept or a principle, the source of that knowledge fades away pretty fast while the concept remains.

I started keeping a list. Each time I discover a game changing concept I add it to my resource list on my personal website. After doing this I found having such a list invaluable to both myself and others.

Re: Cargo cult programming (2020)

#17
Best practices are explainable, a senior programmer can surely explain what exactly makes a best practice as such.

They're not used as an hand wavy answer - "oh it's a best practice and that's that."

Re: Cargo cult programming (2020)

#18
> What you need to hear is books and good authors (e.g. Kent Beck, Robert C. Martin, Martin Fowler, Michael Feathers and many more).

A former coworker is obsessed with some of these authors, particularly with the concept of clean architecture.

It doesn't seem that bad until you read the Java-looking Python monstrosities he writes.

Re: Cargo cult programming (2020)

#19
post #11

Cargo culting is basically doing something you don't understand, hoping that it'll accomplish your goals. Following this person's advice to not learn from blogs and articles, and instead only learn from books, sounds like cargo culting to me. The source of the information doesn't matter. What matters is learning new concepts, knowing how to apply them, and understanding the reasons for applying them. You can learn th…

Next up: why cake driven development is a cargo cult.

Every project starts with CakePHP?

Re: Cargo cult programming (2020)

#20
Other comments are going off on this article because it would require our poor senior programmer to understand in detail every piece of the code. Of course, they have a point.... However, as a test of CCP it is not that bad. But I would restrict the question to asking about a piece of the code where they have done something in the not to distant past.

The more questionable statement in this post is that the ideas should come from reputable authors. This by itself is not at all enough to avoid CCP. It is quite possible to take the ideas of these authors, interpret them in the most clumsy way possible and go do some CCP with them. One can do TTD by attempting to test every indivdual class separately and mocking everything else. The problem with this is that one is testing implementation details that are very much subject to change and also that testing single methods often ends up very trivial things like 'is the standard library of my language still capable of adding an element to a container'. A more skillful way of doing TDD tests some number of classes together and test for properties of the code that perhaps the client could recognize as something they value.

Actually, avoiding CCP requires sound judgement. If one does not have that but is convinced that one is a smart programmer then one is not going to learn anything and nothing that anyone says can help. Reading good authors might actually not help either..... or perhaps it sometimes does.... YMMV.

Post reply on HN