11 ms·
More Good Programming Quotes (2016)
- zyb09 9y agoI thought these two were pretty good: “Bad programmers worry about the code. Good programmers worry about data structures and their relationships.” — Linus Torvalds That's how I always feel when people have lengthy discussions about spaces vs tabs. Good truth coming from the man himself. “Sufficiently advanced trolling is indistinguishable from thought leadership.” Kinda scary true, when you see how some online communities, that started mostly as trolling, became real idiologys over time.
- tome 9y agoLinus's quotation is similar to Wadler's law: > In any language design, the total time spent discussing a feature in this list is proportional to two raised to the power of its position. > 0. Semantics > 1. Syntax > 2. Lexical syntax > 3. Lexical syntax of comments http://wiki.c2.com/?WadlersLaw http://wiki.c2.com/?WadlersLaw
- jwdunne 9y agoAnd on that, I believe Linus uses 8-wide tabs. You are, apparently, doing it wrong if that causes problems.
- falcolas 9y agoGiven the ease with which editors resize tabs, and given the problems caused by excessively nested code: seems reasonable.
- jwdunne 9y agoI agree. I use spaces and 2 to 4 depending on typical language style but even then heavy nesting is obvious. I have a project full of essentially 'if (true) return true; else return false;'. Sometimes heavily nested. It's just not necessary. Guard-style returns go a long way but a long column of those may mask deeper problems of structure. I don't mean inheritance-polymorphism no-ifs but rather your code isn't dumb enough and perhaps your data isn't smart enough.
- dmckeon 9y ago4. Format of whitespace
- hyperpallium 9y agoShow me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious. Brooks
- joncampbelldev 9y agoVery good, although I thought the dynamic typing one was a bit snarky. I'll happily give up dynamically typed languages like clojure when structural typing can give me the same flexibility. I say this as a person learning idris and Haskell and loving it btw, before anyone prematurely tries to convert me to static typing.
- tome 9y agoAs a Haskell proponent I'd be really interested to hear specifically what it is that you'd like to do in Haskell but can't.
- rrobukef 9y agoOpen type variation require existential types. Not the easy types people are used to.
- tome 9y agoCould you explain what you mean by "open type variation"? Google's throwing up nothing relevant ...
- Ace17 9y agopolymorphism?
- tome 9y agoI don't think that can be it. Polymorphism doesn't require existential types!
- rrobukef 9y agoClosed polymorhpism can always be pattern-matched but it requires modifying all matchers. Open polymorphism is the default in OO interfaces: you can always implement a new type by adding code locally. Since existential types can be monomorphised and compiled to binary code allowing type-safe plugins.
- ronilan 9y agoI like this quote: "'Even a single quoted word can be a "double-edged sword"' she said. 'You can't "escape" that'. He didn't."
- neilparikh 9y agoSome of my favourite quotes are from Alan Perlis's Epigrams on Programming [0]. My (current) favourite: "A programming language is low level when its programs require attention to the irrelevant." [0] - http://www.cs.yale.edu/homes/perlis-alan/quotes.html http://www.cs.yale.edu/homes/perlis-alan/quotes.html
- happy-go-lucky 9y agoMy favorite: "Everyone can be taught to sculpt: Michelangelo would have had to be taught not to. So it is with great programmers."
- jplayer01 9y agoGod, what bullshit. Even Michelangelo started with the basics and had to put in a huge amount of effort to master his craft. He had to learn.
- Kenji 9y ago> “When your hammer is C++, everything begins to look like a thumb.” — Steve Haflich As someone who works with C++ every day on my job, this made me laugh out loud. I think I'm gonna write this one on our whiteboard on Monday.
- p0nce 9y agoPerlis's Epigrams are my favourite. http://www.cs.yale.edu/homes/perlis-alan/quotes.html http://www.cs.yale.edu/homes/perlis-alan/quotes.html "When we write programs that 'learn', it turns out that we do and they don't." I still wonder what he means when he says: "Everything should be built top-down, except the first time. ". What is different the first time that warrants not to do it?
- zdkl 9y agoDomain knowledge?
- Jare 9y agoThe first time you don't know what the top looks like.
- tomsmeding 9y agoIn my experience with my own projects, building top-down only works if you already know how the lower-level components will be structured. Else you'll inevitably end up overengineering the lot.
- ianamartin 9y agoMany of these are good. I agree with joncampbelldev. The dynamically typed quote is quite snarky. To that I'd reply: Statically typed languages are when you have to tell a computer that 2 is an integer and 'two' is a string. I know this argument goes back and forth and never ends. And I'm not trying to start a flame war. But I will say this: type systems occupy a space on a spectrum in my opinion, and the spectrum is imperative vs. declarative languages. It's a conceptual spectrum, of course. And the difference is between telling the language exactly what you want and how you want it vs. telling the language what you want to get. On one end you have C# as the avatar of strongly and statically and imperative languages. In the middle, you have something like Python that is strongly typed but dynamic, and at the far end, you have SQL, which is as strong or weak as you define your tables as well as entirely declarative. You can choose your own adventure with databases. You have some bad citizens like JavaScript and PhP, but the conversation is really about the use-case. IMO, strong typing is far more important than static typing. Because I personally can't stand silent errors. Weak type systems are the root of all evils. Anything that can fail silently is dead to me. Fuck you, <language>. Tell me if something broke. Don't just quietly do something I don't expect. Which approach to use to me depends on the team and the size of the project. You can run with Python for small teams. You really can't for large teams. You really shouldn't use C# for rapid prototyping or small teams. But you absolutely should a statically typed language for large teams. Edit to put the sharp in my example of statically and strongly typed language.
- goatlover 9y agoBut C isn't the best example of strongly typed.
- ianamartin 9y agoSorry about that. Edited to say C#.
- quickthrower 9y agoHow do you know 2 isn't a string and two isn't an integer representing, well 0 of course :-)
- 9y ago
- christophilus 9y agoThanks for posting. This gave me a good laugh: – What do we want? – Now! – When do we want it? – Fewer race conditions! @wellendonner
- quickthrower 9y agoThat made me belly laugh
- leodelang 9y agoFocus is a matter of deciding what things you’re not going to do. (John Carmack)
- combatentropy 9y ago"Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration." — Stan Kelly-Bootle Thanks for putting in that one in. Stan Kelly-Bootle was one of my favorite writers. He recently died, but he was a Brit who wrote computer books and folk songs. I think people who dual-specialize, in something left-brained and something else right-brained, are better at both. I've only read parts of one of his books, a 90s book about UNIX. It was so clear and fun to read while seeming to break many rules about writing clearly. I'm not sure how it works.
- hliyan 9y agoHarold Abelson — 'Programs must be written for people to read, and only incidentally for machines to execute.'
- WalterBright 9y ago"The double is cast." -- Julius C'ster
- WalterBright 9y ago"I came, I coded, I crashed." -- Julius C'ster
- WalterBright 9y ago"I think that I can safely say that nobody understands template mechanics." -- Richard Deyman
- fefe23 9y agoWhy oh why do fans of agile programming and dynamic languages always hide behind snarky epiphets from other people? This imbalance is, in my mind, the greatest reason why people still prefer C and Java over Clojure and other hipster languages. The feeling that those people must be overcompensating for something, just look at how they feel the need to talk down on others all the time. In the left corner, you see snarky hipsters complaining about how all security problems would go away if only everybody stopped using C, and if people dropped their methods and adopted agile / XP / scrum / other fad of the week. In the right corner, you see C programmers writing code in the waterfall model. I'm much more attracted to the right corner. Not because C or waterfall are great. Because of the (to me) juvenile unprofessional behavior of the people in the left corner. You see, I'm a programmer. I'm attracted to people who are programming. Not to people who are telling others how not to lead their lives, while appearing to produce scant noteworthy code themselves. Compounding this is that OP is leaving a link to his own blog here. And this blog post is basically "here are some things other people said that I happen to agree with". I learned nothing. BTW: The very same behavior makes me think highly of postgresql and less highly of nosql databases. My instinct tells me to trust people who don't feel the need to trash-talk others. EDIT: to stay with the theme of the post: I always liked "Don't learn the tricks of the trade. Learn the trade." EDIT: To win me over, don't tell me my stuff is bad. Show me that your stuff is good.
- deleted 9y ago[deleted]
- icebraining 9y agoThe only quote in there regarding dynamic vs static is one disparaging dynamic languages. Also, the complaint about C is about it being too weakly typed, not about it being statically typed.
- tome 9y agoI think fefe23 may have been referring to these responses: https://news.ycombinator.com/item?id=14825901 https://news.ycombinator.com/item?id=14825901 https://news.ycombinator.com/item?id=14826072 https://news.ycombinator.com/item?id=14826072
- seodisparate 9y ago"When stuck debugging, question all of your assumptions about the program." A shower thought. Helpful if the program does something other than what you thought it did, allowing you to figure that out quicker.
- mjevans 9y agoMore a reflection of insufficient logging telemetry at higher inspection (debugging) levels. If you have the above and still can't figure it out, maybe you're looking at too much. Sometimes it can help to isolate which stage things appear to go off the rails and then turn up the detail when you've got an idea where to start the search.
- hyperpallium 9y ago1. The bug is not in the section of code you’re looking at. 2. Rule #1 is of no practical use. Philip Roe on debugging CFD codes
- fani_pack 9y ago"I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it." @iamdevloper
- lou1306 9y ago[Warning: spoilers ahead] > "Debugging is like being the detective in a crime movie where you are also the murderer." So, essentially Memento?
- falcolas 9y agoGiven how so many programs operate (little global state, minimal information passed between blocks of execution), there are definitely some parallels.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- WalterBright 9y ago"Great, just what I need.. another D in programming." -- Segfault
- dwarman 9y ago"That which _can_ be configured _must_ be configured. Corr: defaults aren't. (mine, inspired by WIndows 1.0 and it's only got worse since).
- deleted 9y ago[deleted]