19 ms·
Uncle Bob and Silver Bullets (2017)
- buescher 6y agoWhat interesting software, systems, or products has "Uncle Bob" developed? Why should I listen to anything he says?
- mlinhares 6y agoNot that this makes much of a difference since a lot of the academic production isn't coming from people building products but are still incredibly important to help us build software. A lot of the distributed systems work (like stuff Leslie Lamport did) wasn't part of a product but are all seminal to the systems we have nowadays, they might not even exist as they do if people in academia weren't doing research on it. So you shouldn't stop listening to Uncle Bob because he hasn't built famous software products, but because a lot of the stuff he says is just bullshit not backed by any research or real world experience :)
- sandofsky 6y agoAcademia is (one would hope) built on a logical, provable process. The material should be peer reviewed. Ideally you can independently reproduce findings in a lab. If not, you should absolutely scrutinize it. Martin's work is purely anecdotal, delivered with an authoritative tone. I might excuse that from a John Carmack, who built systems that changed an industry. Yet I've found Carmack's writing quite humble. Thinking of the smartest people I've worked with over my career, none of them used the rhetoric of Martin. But they all made their living building software, not selling books and corporate training.
- bern4444 6y agoI kind of agree with your comment here and with what mlinhares responded with. There are a few engineers I enjoy following who give good, and actionable advice. One is Scott Wvlaschin especially if you're interested in Functional Programming Another is James Sinclair[0]. A couple other names, Ryan Florence and Michael Jackson (the dev, not the singer). And one last one is Kent Dodds. These are mostly people on the front end (since that's where I work). I've found content put out by all of them (articles, videos, tutorials etc) to be excellent and if not directly practical insightful. They also all actively write software. I recommend taking a look when you have a chance. Better than uncle bob [0]https://jrsinclair.com/ https://jrsinclair.com/
- charlieflowers 6y ago+1 on Kent Dodds. Clear thinking and good insight.
- staticassertion 6y agoThe article is about disagreeing with Robert Martin, not about why you should listen to him.
- buescher 6y agoYou're right. On first read I thought it made a tongue-in-cheek turn to why you might listen to him anyway, got disgusted, and stopped reading. My mistake there. But really, why write a whole article about a number of pieces of clothing the emperor's not wearing?
- duxup 6y agoI feel like we could ask that about any author. But we don't go down that road in every post. But do you have thoughts on the actual article?
- ohthehugemanate 6y agoSOLID principles, Release-Reuse Equivalency Principle (REP), Common Closure Principle (CCP), Common Reuse Principle (CRP), Acyclic Dependency Principle (ADP), Stable Dependencies Principle (SDP), Stable Abstractions Principle (SAP)... i'm sure there are others. Oh and a little thing called Agile software development, along with being a major early proponent of XP before agile existed. If you're an object oriented developer, his design patterns are a big part of the normal definition of "good code." If you're in any kind of short project oriented work, his project practices are a go-to resource. I know he's been a software developer since the 70s, but I don't know what, if any products he was hired for became famous. Is that an important bar for someone who talks about software quality amd development process?
- buescher 6y agoActually, yes it is. I'm aware of his "contributions"; you don't have to patronize me. What important software, products, or systems have the authors of the Agile manifesto created? What did most of them do for a living when they wrote it, and what have they done since?
- charlieflowers 6y agoNot the GP, and I agree with some of the Uncle Bob skepticism -- often his fervor outweighs his content. But several signers of the Agile Manifesto have done outstanding things. The Agile Manifesto itself is also outstanding (it may seem obvious now, but it was not obvious to the world it was published to). Ward Cunningham invented the wiki for chrissakes. So let's not throw out the baby with the bathwater.
- buescher 6y agoOK, the wiki is clever, but it is not really a demonstration of the power of agile methods. I'd bet money it wasn't test-driven or sprinted or crc-carded or whatever into existence. Ward may as well have also invented an excellent salad dressing, as far as that bears on agile. Not a big fan of the patterns movement either; not that there's anything wrong with any of the GoF patterns. The agile manifesto is vague enough that people tend to project their aspirations onto it. It was true then and it's true now. I'm also old enough to remember when most of it was called "extreme programming", so it wasn't exactly a revelation at the time.
- dang 6y agoPlease don't cross into personal attack on HN. Articles can be interesting regardless of whom they're about or by. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- buescher 6y agoThe article by Bob Martin accuses developers that do not follow his methods of being "undisciplined" and "sloppy" - that is sufficient grounds to question, not attack, his qualifications for doing so.
- dang 6y agoNot here though. Part of being a good HN contributor is learning to resist the temptation that comes up, when hitting the most provocative part of an article, to rush to the comments to address it.
- jbjbjbjb 6y agoIf you read Uncle Bob’s post he does say “tools are fine” and that he’s invested in them too. What’s so bad with adding discipline into the mix too?
- Jach 6y agoThe underlying point people miss is that you might have the best tool in the world, but without any discipline to start using it and continue using it, it will go unused. Discipline matters. Edit: relevant to the other thread, this is a pattern with writings about Uncle Bob. When you read him directly disagreements are usually not so clear-cut as detractors make them. Clean Code is the tech book that I've argued with most, still worth reading, as opposed to certain other tech books. But I grant that he expresses himself increasingly poorly when moving from books to blogs to tweets, and even his books are written in a 'school of martial arts' style (admitted to in the preface/intros), i.e. presenting His Way without the side detours into alternatives and innumerable context-sensitive exceptions. This makes it easy to mischaracterize him as saying things like "don't ever comment code, comments are bad!" but if you read his book/code you will in fact find some comments. Perhaps his beliefs are slightly more nuanced?
- buescher 6y agoI'm sure they are. He makes his living as a software process consultant, right? And the author of the original article is right: Bob Martin is dismissive of tools that aren't unit tests, and "discipline" in Bob's article is the discipline to... write unit tests. Your "underlying point" is just making an uninteresting truism out of a more specific argument.
- aidenn0 6y agoI mean I'm not a fan of Strunk and White either, and the fact that E.B. White often violated the rules from Strunk and White to good effect when writing his own prose doesn't redeem the book, if anything it damns it.
- sydd 6y agoWhat's going on with all the Uncle Bob hate nowadays? I last heard about him ~6-8 years ago when people were preaching his sentiments about clean code and TDD. I agree with some of his stuff, e.g. he was the one who convinced me how important tests are. Also the blog author is exaggerating in lots of places e.g.: "Safer Languages: The ‘Dark Path’." In the linked article he says "It’s not the fact that Swift and Kotlin are statically typed that has me concerned. Rather, it is the depth of that static typing." (I myself don't agree with Uncle Bob, I think nullable types are an awesome thing)
- henricao 6y agoWait, why do you consider this article "hate"? It gives many examples of supposedly bad advice and makes a point to say they are wrong.
- ifFxhF938 6y agoHe's voiced support for Trump, which is why he has no idea about anything programming-related anymore.
- trianglem 6y agoName one product he has successfully created. The dripping self victimization is disgusting.
- zarkov99 6y agoHe as written many useful books and identified a core set of principles for good design. That is much harder than being a cog in the building of a successful product.
- anthonygd 6y agoThat's an entirely circular argument and doesn't prove anything about Uncle Bob. Question: Why should I listen to Uncle Bob? Answer: Because he wrote a book telling you what to do. He's got some un-controversially good opinions but he also has some opinions that are just plain stupid. Since his opinions don't compile and aren't testable, it's not easy to rate their over all value.
- timemachine 6y agoThis style of rebuttal article has me too jaded to focus on the topic and see behind the hegemonic politics. I would have ignored the post and not commented except that the referenced R. Martin article is the same style of immediate reference invocation diatribe and they both suffer from the same short comings. Turtles all the way down. Alas, this comment is more of the same, shame on me. Please learn from our mistakes.
- nightowl_games 6y agoWell designed Static Types are better than Unit Tests. They only fail because they are hard, because c++ is hard, because our present cultural reality is optimized for Time to Market, because we dont teach computer science to kids in elementary school and because if it works, it works, we ship it and move on. I propose that Unit Tests have arisen in popularity solely because of the rise of Python, as a band aid to the complexity that rises as an untyped code base gets large. Matt Godbolt does a great job giving an overview of the power of static types to ensure correctness in this C++ On Sea Talk [1]. I've worked in places where people evangelize Unit Tests. But it is certainly true that no one really code reviews the Unit Tests that hard. People generally skim the tests file to see how many tests there are and give it the thumbs up. But then they seriously review the feature code. If TDD is to truly followed, shouldnt we review the tests more thoroughly than the implementation? Does anyone actually do that? My basic assertion is that, in practice, no one _really_ follows TDD. I think it's more of an easy political win. If you evangelize TDD, you look like a "real programmer" who cares about Stability and Reliability, but are you actually following through with that? Are you rejecting pull requests because some test case isn't present? Are you primarily reviewing the tests above the implementation? Is it actually feasible to test every code path in an untyped language? I would propose that it is not. That correctness can only come through the compiler, through a static type system. 1: https://www.youtube.com/watch?v=nLSm3Haxz0I https://www.youtube.com/watch?v=nLSm3Haxz0I
- packetlost 6y agoThere's more than 1 class of problems that unit tests solve though. I'd still want pretty good testing over my business logic heavy code. I'd also like to point out that Python's typing module + mypy is, while still not perfect, quite good as a tacked-on type system. Also I believe unit tests as a concept first gained popularity in the Java ecosystem, not Python, which kind of negates the assertion that they are popularized because of Python's typing shortcomings.
- orwin 6y agoNo, it was from the smalltalk guys, who later designed Eclisped and came to Java. But it was from smalltalk and never caught up until PHP, Ruby and python came strong.
- pmcollins 6y agoi didn’t learn anything useful by reading the linked article but i have learned a lot by reading uncle bob’s books. they have made a huge difference to the enjoyment i get from coding, and to the quality of my code. if you haven’t, i highly recommend taking a look and making your own judgement.
- 0xbadcafebee 6y agoThe author's getting tripped up on whether Uncle Bob is suggesting to use "correctness techniques" and missing the forest for the trees a bit. Uncle Bob's central theme of advice is basically to stop thinking in cargo cults. "If I just do X Technique / use X Tool, my code will be better" is a fast track to "I am doing all 100 Techniques / using all 100 Tools and my code still has bugs. Maybe I just need new Techniques / Tools." Nothing is enough. As humans, we build things shittily. And the chaos of the universe also makes sure that everything slowly becomes shitty over time. You should consider techniques as a small part in a grander scheme, which is the holistic implementation, operation, and maintenance of the products your code makes up. I have been running systems for a while. I've seen a lot of code - some of it even good. It still makes for shitty products, because the people writing the code are thinking more about the code than how it's operated/maintained/supported and how the user experiences it. There is no technique or tool or code that can ensure the rest. Show me the best code in the world and I will show you an unhappy user.
- buescher 6y agoBob's article dismisses a whole host of techniques as a setup to preaching the "discipline" of unit testing. You're projecting a bunch of your own frustration with user experience and software lifecycle issues onto his vagaries. User experience is its own engineering domain, by the way, and most people, including developers, are terrible at it without exposure to the best ideas in it. It's not just a matter of "thinking" about user experience (or lifecycle requirements, for that matter).
- dalke 6y agoI got fed up with Robert Martin years ago. 11 years ago I wrote an essay on "Problems with TDD" - http://www.dalkescientific.com/writings/diary/archive/2009/12/29/problems_with_tdd.html http://www.dalkescientific.com/writings/diary/archive/2009/1... . Martin was rather against my viewpoint. So, what's an example of TDD "done right"? It should be his "FitNesse" program, right? (http://fitnesse.org/ http://fitnesse.org/ ) Which means that finding problems in that code should point out areas where TDD is insufficient, right? It contains its own web server, so I looked at just that part. 1) There was a directory traversal attack, in several places. This gave access to my /etc/passwd curl 'http://localhost:8080/files/../../../../../../etc/passwd' 2) This GET request deleted a file: curl 'http://localhost:8080/files/?responder=deleteFile&filename=../../../../../../Users/dalke/This_is_a_file.txt' 3) This uploaded a file to an arbitrary location: POST /files/../../ HTTP/1.1 containing a header with Content-Disposition: form-data; name="file"; filename="I_escaped.txt" 4) There was a non-persistent cross-site scripting vulnerability due to incorrectly escaped HTML: http://localhost:8080/files?responder=%3Cscript%3Ealert%28%22hi!%22%29%3C/script%3E 5) An uploaded file with an embedded NUL in filename would result in an infinite loop in the server: Content-Disposition: form-data; name="file"; filename="\0foo.txt" 6) The password hashing scheme was trivially broken, that is, given the hash I could construct a password which generated the same hash. Take a look - it still uses the same hash algorithm! https://github.com/unclebob/fitnesse/blob/master/src/fitnesse/authentication/HashingCipher.java https://github.com/unclebob/fitnesse/blob/master/src/fitness... These meant the system was totally p0wnable. And I found a few public servers using FitNesse as the web server. I reported all of these years ago, and at least some of them were fixed. If these security issues are still present now, there's been plenty of time to fix them. My analysis helped confirm my view that TDD generates happy-path tests, and strengthen my complaint that TDD, at least in the "red-green-refactor" formalism, ignores the rest of the testing/design that needs to be done even at that development stage where TDD is most effective.
- tptacek 6y ago6) The password hashing scheme was trivially broken, that is, given the hash I could construct a password which generated the same hash. Take a look - it still uses the same hash algorithm! https://github.com/unclebob/fitnesse/blob/master/src/fitness https://github.com/unclebob/fitnesse/blob/master/src/fitness... What fresh hell is this? private byte[] encrypt(byte[] lock, byte[] key) { int keyIndex = 0; for (int i = 0; i < lock.length; i++) { byte lockByte = lock[i]; byte keyByte = key[keyIndex++]; lock[i] = (byte) (lockByte + keyByte); if (keyIndex == key.length) keyIndex = 0; } return lock; }
- jdmoreira 6y agoSorry but I have to join the bashing. Some years ago I wanted to get better at programming so I picked up his material. It took me less than 10 hours to realise he was just peddling the same thing as the Gang of Four book that was released in 1994. I'm sorry but I'm not interested in your design patterns that only need to exist because your OOP language lacks more powerful constructs. A lot has happened in terms of language design since 1994. If you are still stuck in Java 5 or something like that, please go ahead and read his books otherwise you will be better served by learning a modern language like Swift, Kotlin, Rust, etc...
- dang 6y agoDiscussed at the time: https://news.ycombinator.com/item?id=15415278 https://news.ycombinator.com/item?id=15415278
- wglb 6y agoI've been aware of Bob for quite a while during is career. His TDD discussions are good, and useful in some contexts. One of the very best craftsman programmers I know won't program any other way. One thing that I see as counterproductive is his very strong opinions. One of his books calls out Java as not being object oriented or extensible due to the way that exceptions propagate. The other thing to be aware of is that some problems cannot be solved by the incremental approach. The most famous one that I am aware of is an adherent to TDD tried to develop a program to solve sudoku. Bob complimented him on his honesty at trying publically, but didn't admit that the TDD approach didn't work. TDD is probably a good approach for certain classes of problems, but whether or not those are interesting is my question. Perhaps in his journey he will discover languages where variables don't have type, but values stored there do.