1. 1

    I have been doing this for the past couple years using the Architecture Decision Record format. I’ve never regretting spending time writing one.

    1. 13

      Sometimes, Programs That Use Transactions… Are Worse

      You ever see a reference that is such a deep cut you feel like it’s written for you, specifically?

      1. 9

        I am personally delighted every time someone catches these. :)

        1. 2

          Haha, amazing! Thank you for introducing me to this.

        1. 23

          One can no more dissuade a visionary of this kind than one can dissuade a member of the Fabian Society from the virtues of global humanitarian government, but then neither will the vox populi of provincial yokels be of any use in countering it. One can only stoically resign to the pull of inexorable necessity.

          With the help of an Internet search query or two, and a good deal of re-reading, I could probably figure out what this means. But I am le tired. And I haven’t even gotten through the first chapter.

          This brings up a different controversy: Is writing like this useful to stretch peoples minds, help them grow? Or does it just discourage people and make them feel dumb? Is writing a form of art, or a means of communication, or both?

          From my perspective, it looks more focused on artistry than actually communicating and transferring knowledge. Which isn’t necessarily a bad thing.

          1. 22

            It’s called “purple prose”.

            1. 2

              That’s exactly what I was referring to, TIL.

            2. 9

              From my perspective, it looks more focused on artistry than actually communicating and transferring knowledge.

              Your perspective may change if you finish reading the document before dashing off to post a comment about the style instead of the substance of the source material. :)

              It goes on to give a lot of historical context on previous attempts and on systems issues.

              1. 8

                That’s the point though - I’d happily read the whole thing, if I had the mental capacity to do so. I’m sure there’s plenty of good info in there, but it’s buried under so much prose that I feel like I need a college degree to begin understanding it.

                1. 4

                  The point that you mentioned is a local maximum in terms of hard-to-read prose, and (from my reading up to section 2.3) I believe it is a global maximum too - the text is much nicer almost from that passage onward and I only found one other spot that I believe to be particularly egregious. I encourage you to keep going! I very much dislike the Unix culture and tooling in general, but found this article to be fascinating anyway.

                  1. 1

                    I sampled towards the end and found the prose similarly tiresome.

                  2. 3

                    Not every reader is native English speaker (and reader). Reading this style is very demanding and makes it harder to focus on the main topic. I have no idea if there are expressions hidden that I don’t know yet, or if a reference in the text is key to the final point.

                  3. 9

                    You make the mistake of implying that there’s an objective way to communicate clearly and it’s not instead dependent on the listeners.

                    Most tech documentations, even when assuming no previous knowledge from the reader, would be unreadable for most people for the sole reason of their structure and dryness.

                    You’re witnessing something written by a person that is on the boundary between different worlds and can merge them into a single piece of writing and this confuses you. It’s normal and probably the author did it deliberately.

                    Lot of us programmers on the left are keen in rupturing the cultural and social bubble in which the tech sector is entrenched and I wouldn’t be surprised if the author wrote the piece in this way to deliberately challenge the stylistic elements of engineer-oriented writing.

                    1. 7

                      I agree, but I think it’s just interesting that the author seems to have raised the educational bar, not lowered it. Now you have to be an engineer AND a literary genius to understand what’s being written.

                      And I’m not saying this is necessarily a bad thing. I’m just noting that it’s unapproachable for people like me. I’m sure after a bit more education and time, I’ll appreciate it too.

                      1. 13

                        You don’t have to be a genius to understand that paragraph, just literate. I understood it just fine and the highest formal education I’ve received is community college.

                        Anyone who works in software is accustomed to googling tech jargon they’re unfamiliar with and learning as they go. I think it is interesting that you balk at doing this in a humanities context and perhaps that was the point.

                        1. 4

                          I think you hit the nail on the head. It sounds to me like you’ve put in the hard work to understand and appreciate this kind of writing, and that is truly awesome (no sarcasm there). For me, I could totally figure this out, no doubt about it. But it would still be quite the slog, because I haven’t invested quite as much hard work as you have into the humanities yet. And that’s ok.

                          That’s why I say this “isn’t necessarily a bad thing.” I could use some more development in my humanities skills! But if the goal is to communicate ideas, then writing like this will only communicate ideas to a gifted few who are good at both engineering and humanities. Again: Not necessarily a bad thing.

                        2. 1

                          If you want to start from somewhere, I suggest you read Geek Sublime from Vikhram Chandra. He’s both a programmer and a novelist.

                        3. 1

                          Lot of us programmers on the left are keen in rupturing the cultural and social bubble in which the tech sector is entrenched

                          And yet you at the same time alienate readers who’ve never studied literature in English, nor English literature. More often than not from second and third world countries.

                          1. 6

                            We write in different ways to reach different audiences in different ways. I never said everything should be written this way. There’s a growing idea of writing more propaganda disguised as tech opinion pieces using a language that programmers like. I mean, the far-right has been doing that for three decades now, it’s time for the left to react.

                            The “poking” at the bubble is complementary and clearly doesn’t aim at reaching the masses, but just at bringing out those that have the potential to connect with those readings.

                            Also I’m not American, I’m not an English native speaker and in “second and third world countries” humanities are usually valued a lot more than in the protestant anglosphere, so I don’t get your point.

                        4. 8

                          This is the “English (Literary)” locale where it is assumed you know your leftist lore (and French philosophy). Not my thing but sometimes the references lead to interesting wikipedia pages.

                          1. 11

                            This brings up a different controversy: Is writing like this useful to stretch peoples minds, help them grow? Or does it just discourage people and make them feel dumb? Is writing a form of art, or a means of communication, or both?

                            When I was younger I thought that impressing people with my vocabulary is the utmost purpose of my writing, but as years have gone on I have realized that this is just mental peacocking (to use a friendly term). The real greatness is to convey information (or even humor) using simple language while staying informative and engaging. I have been way more impressed with authors being able to write like this than people who just show they own a thesaurus.

                            1. 6

                              This brings up a different controversy: Is writing like this useful to stretch peoples minds, help them grow? Or does it just discourage people and make them feel dumb? Is writing a form of art, or a means of communication, or both?

                              I would argue the former. You’ve learned a little more about the world by virtue of looking up a literary or cultural reference you didn’t previously understand. I’ve done this with plenty of texts I’ve read, in English and particularly in other languages (English is my cradletongue). Of course you weren’t obligated to do so - you could’ve decided that this article about systemd written using these kinds of literary references wasn’t worth your time to understand, and if enough people thought similarly, it would lose a substantial portion of its potential audience. But using literary and cultural references is something that writers and speakers do in pretty much every genre of human communication; and it’s only because this author happened to choose ones that you were unfamiliar with, that you found it something worth remarking on.

                              1. 3

                                I found it really funny. To me, that kind of descriptiveness adds humor, but maybe I’m the only one? Like putting an eccentric accent on a movie character.

                                1. 1

                                  i found it pretty funny too :)

                                2. 2

                                  I think the article would be much longer if it wasn’t for the use of various literary devices for compression.

                                  Maybe that would be for the better as more people would benefit from reading it.

                                  On the other hand, it’s useful to have someone shine a light on gaps in your knowledge of things which used to be well known. Certainly I don’t think that a lot of the things referred to in the writing should be particularly exotic, yet sadly they are.

                                  Finally, I personally get some enjoyment from reading things like these. It’s the kind of enjoyment I get from reading old books. Difficult to read but full of very interesting ideas.

                                  1. 2

                                    Is writing like this useful to stretch peoples minds

                                    While I do not particularly like the style of this text, I appreciate any kind of writing style that does not resemble the current “ted-talk” style uncultured vomit that is becoming the style of almost everybody today.

                                    1. 2

                                      I”m less offended by the use of some obscure terms and references than by the implicit comparison of a Gnome maintainer to a follower of Stalin:

                                      And if we are to take the “revolution OS” metaphor further, then Bassi’s position is not unlike Stalin’s defense of the need of a vanguard party in The Foundations of Leninism (1924), with those opposed consequently in the role of Trotskyites, Zinovievites and ultra-leftists: “The theory of worshipping spontaneity is decidedly opposed to giving the spontaneous movement a politically conscious, planned character. It is opposed to the Party marching at the head of the working class, to the Party raising the masses to the level of political consciousness, to the Party leading the movement; it is in favour of the politically conscious elements of the movement not hindering the movement from taking its own course; it is in favour of the Party only heeding the spontaneous movement and dragging at the tail of it.”

                                      1. 2

                                        Arguably, in many historical cases, such ways of expression were used to hide the real meaning, a sort of emphemization. It was especially used when it came to criticizing a point of view, to filter out as many people as possible to not bear the consequences of saying clearly what you intended to say. The more fluff and ambiguity the more you can hide behind it.

                                        EDIT as this comment says, it’s called “purple prose”.

                                        1. 1

                                          FWIW, here’s my translation:

                                          You can’t dissuade visionaries like this, and the popular bloggers won’t help you counter them either. All you can do is give in [and use the visionaries’ stuff?]

                                          Without the context of the surrounding paras I don’t really know what they were getting at.

                                          I think people write like this because it’s fun for the writer, not necessarily for the reader ;)

                                          Edit: the context is:

                                          • The Fabian Society is a British internationalist lefty think tank. Because they’re internationalist and lefty (but not anarchists), they’d probably really like a global humanitarian government.

                                          • “vox populi” is latin for “voice of the people” and sometimes means the “opinion of the people”, but that bit is a bit clumsy anyway.

                                        1. 7

                                          I’ve spent weeks trying and failing to implement Vault at $job, so I am sympathetic to the argument. But SOPS + KMS are simply not a replacement for Vault unless your needs are very simple. We already do basically this, but Vault offered a bunch of useful things that we couldn’t do.

                                          The biggest value of Vault is the plugins you can enable to help automate more infrastructure. I want to automatically provision things like Certificates and SSH keys, with a short lifespan. I want to automatically rotate keys without manual intervention.

                                          If all you need are encrypted secrets checked into git, then yes. Use this. Vault was not for you.

                                          1. 1

                                            Sounds a lot like what dry-types in Ruby is doing.

                                            1. 1

                                              The only ActiveRecord feature that is more of a footgun than this is default_scope. Almost every time I have ever used counter caches I’ve ended up having to replace the functionality with my own implementation.

                                              1. 1

                                                Hmmm. Is that because the cache doesn’t serve your needs, because it becomes inaccurate, or because of performance concerns (or for some other reason)?

                                                1. 2

                                                  In my experience, a simple count of all associations is rarely what you actually need, especially if you’re soft-deleting records. Counts more often than not need to take some kind of business logic into account when being computed, and this is not possible with this feature.

                                                  Accuracy is also, less frequently, a problem as well.

                                              1. 4

                                                Monads are not some mystical, otherwordly concept. Using them is actually pretty mundane. If you approach them as if you need to have your mind blown, you’re going to miss the point.

                                                One of the least pretentious things I’ve read about monads and I wholeheartedly agree.

                                                1. 3

                                                  This is the best article I’ve read about technical interviews in a long, long time.

                                                  1. 4

                                                    But here is where the problem lies, it’s surprisingly rare that I find myself editing only one file at a time.

                                                    I got stuck on this plateau for a while myself, but learning how to use splits and tabs is extremely worthwhile. The syntax isn’t any harder than the usual vim stuff, and I’ve found it to be generally more powerful than GUI editors.

                                                    1. 3

                                                      I’ll admit to being somewhat FreeBSD curious, but my biggest takeaway from this is that it’s stable. Is that really it? Because I don’t think that’s much of a pain point on Linux today, either.

                                                      1. 2

                                                        I’ve been using it about a year. Agree there’s quite a bit of overlap/similarity.

                                                        Documentation is better on the BSD side, especially for ‘how do I adjust the machine to my preferred workflow’.

                                                        For instance, I didn’t need to start a web browser in order to figure out how to add an init script - not something I have ever been able to say about a linux machine I’ve used.

                                                        1. 5

                                                          For instance, I didn’t need to start a web browser in order to figure out how to add an init script - not something I have ever been able to say about a linux machine I’ve used.

                                                          Although I agree that Linux man pages are absolutely underwhelming compared to the BSDs, I don’t understand this particular example. systemd is really well-documented in terms of man pages. systemd.unit(5) describes the whole unit format, systemctl(1) how to enable, start, stop, and restart units.

                                                          1. 2

                                                            How do you find out which man page is relevant?

                                                            I tend to work from what already exists; my ubuntu machine had init scripts in three formats under /etc.

                                                            In freebsd there’s only one type. If you know find, grep, and the name of a running process, you can find the init script easily. From there you can copy the format pretty easily.

                                                            1. 2

                                                              How do you find out which man page is relevant?

                                                              man systemd

                                                              I tend to work from what already exists; my ubuntu machine had init scripts in three formats under /etc.

                                                              I don’t really use Ubuntu (except on some work servers). Maybe they still have some old SysV init scripts or upstart files around from before the previous switches?

                                                              If you know find, grep, and the name of a running process, you can find the init script easily. From there you can copy the format pretty easily.

                                                              Same with systemd, you do not even have to do some ad-hoc finding or greping:

                                                              ❯ systemctl status $(pidof fwupd)
                                                              ● fwupd.service - Firmware update daemon
                                                                 Loaded: loaded (/nix/store/90r6gfc2vimim57v21biq863pv5fnrrn-fwupd-1.3.7/lib/systemd/system/fwupd.service; linked; vendor preset: enabled)
                                                                 Active: active (running) since Thu 2020-02-20 10:06:18 CET; 2 days ago
                                                                   Docs: https://fwupd.org/
                                                               Main PID: 2379 (.fwupd-wrapped)
                                                                     IP: 0B in, 0B out
                                                                  Tasks: 5 (limit: 4915)
                                                                 Memory: 15.5M
                                                                    CPU: 5.715s
                                                                 CGroup: /system.slice/fwupd.service
                                                                         └─2379 /nix/store/90r6gfc2vimim57v21biq863pv5fnrrn-fwupd-1.3.7/libexec/fwupd/fwupd
                                                              

                                                              (There are weird paths with hashes because I use NixOS ;).)

                                                              1. 1

                                                                man systemd

                                                                Once you know it’s systemd, that’s a good starting point. The presence of a bunch of sysv and upstart init scripts might confuse you.

                                                                man systemd will even tell you that you SysV init scripts are also supported, so you can actually use either format (Perhaps that explains why I have both).

                                                                Upstart format is not supported, though I have a few files in /usr/share/upstart too.

                                                                Same with systemd, you do not even have to do some ad-hoc finding or greping:

                                                                The point of the ad-hoc find/grep was to figure out what exists - if you already know you have systemd you don’t have this problem.

                                                                1. 1

                                                                  The point of the ad-hoc find/grep was to figure out what exists - if you already know you have systemd you don’t have this problem.

                                                                  Luckily, but to the dismay of some people, virtually every Linux distribution has switched to systemd ;).

                                                      1. 12

                                                        Guido’s retrospective mirrors many of the points in your article. While this won’t fix past mistakes, we can at least be reasonably confident that the same mistakes won’t be repeated with “Python 4”.

                                                        Regarding the Unicode changes, as a user I’ve seen many cases of UnicodeDecode error: \xef out of range (or whatever it was) errors, and as a developer I fixed many of them in my own programs as well. Python 3 really does make things easier here. I appreciate it’s not useful for Mercurial specifically, and that the current stdlib usage may introduce some problems, but it also solved a lot of them. And it seems to me that the stdlib problems are fixable(?) Or are the Python maintainers unwilling to do so?

                                                        Personally, I rather like Go, and use it for most places where I previously used Python. It has somewhat similar (though not identical) design ethics: most of The Zen of Python applies equally well to Go, perhaps sometimes even more so than Python. Rust, on the other hand, seems more similar to Ruby’s design ethics, which is not a necessarily a bad thing; I worked with Ruby for several years and liked it. It’s just different.

                                                        1. 3

                                                          I’ve thought for a while that Go is to Python as Rust is to Ruby. It’s nice to see someone else say it.

                                                          1. 2

                                                            I agree. I also think Go is to Java as Rust is to C++, and it’s funny that both analogies work.

                                                          2. 2

                                                            I just wish that python had as good of a binary packaging story as Go has. If I could build a python binary that was system specific like Go. I don’t think I would really be tempted to switch. But that packaging story makes me right a lot of infrastructure tools I would have traditionally written in Python in Go now because carrying python around is such a chore.

                                                            1. 2

                                                              Could you use http://www.pyinstaller.org/ ? I haven’t used it myself, but I did use py2exe back in the day to ship a bunch of internal python utilities.

                                                              1. 2

                                                                The article addresses this. Mercurial will be adopting PyOxidizer for distribution, and you can too.

                                                              2. 1

                                                                Personally, I rather like Go, and use it for most places where I previously used Python. It has somewhat similar (though not identical) design ethics: most of The Zen of Python applies equally well to Go, perhaps sometimes even more so than Python. Rust, on the other hand, seems more similar to Ruby’s design ethics, which is not a necessarily a bad thing; I worked with Ruby for several years and liked it. It’s just different.

                                                                I see this a lot, and we’re into the realm of inherently subjective personal here - but Go feels so different to me that I find it hard to grasp the comparison.

                                                                Go’s level of abstraction is much closer to what C feels like to me. I’m back to worrying about making errors in code that I must rewrite myself that would be handled by Python’s batteries included philosophy.

                                                                I’m glad Go makes you happy, and I hope one day to feel the love, but I’m not nearly there yet and still find Python to be far and away my language of choice for day to day work.

                                                              1. 2

                                                                I agree that infinite ranges are best!
                                                                However, I would order the other two differently, or perhaps label them equals.

                                                                Contributors to Rails have repeatedly stated that Arel is considered an internal, private API, and it is not recommended for use in application code. To my knowledge, they also do not explicitly call out changes to Arel in release notes. I realize their pleading gets little attention. They also know their pleading gets little attention. That does not make it a good idea to ignore those pleas.

                                                                In the case of raw SQL for a comparison operator, the two proposed drawbacks are less impactful (in my opinion) than requests from the Rails team.

                                                                Yes, raw SQL is not preferable in a general sense. It also technically has a higher risk of injection, in general cases. However, when used with keyword interpolation, the values will ultimately run through ActiveRecord::ConnectionAdapters::Quoting#quote. If your Ruby Date object (or an ActiveSupport::TimeWithZone object, or any other comparable database type with a Ruby equivalent) would cause an issue in that code, we’ve all got much bigger problems than just less-than and greater-than operators.

                                                                With regards to “database adapter compatibility”, I question whether less-than and greater-than are, in reality, not portable across different SQL databases? I am ignorant where this might be so, and would be happy to learn of those cases.

                                                                But if so, is that transition between two database engines (with such wildly different comparison operators, and therefore presumably other differences?) more likely than changes to a private/internal API, or less likely? It’s a bet on one risk or another, I think either one can be said to be crappy bet in a general sense.

                                                                In the case of these comparison operators (rather than “in general”), it feels like an incredibly minor difference, but one that leans toward the raw SQL. They are both changes which could bring pain. One of the changes you are possibly in of control of: Are you likely to change databases to one which does not support the > and < operators? The other change you do not control: does the Rails core team change something internal to Arel?

                                                                1. 2

                                                                  I really really wish queries in ActiveRecord could be built like in Sequel. It’s so much nicer than Arel, which like you said you really shouldn’t be using in production anyway. Honestly, the only way to do anything relatively complex with the database in ActiveRecord involves string interpolation and sanitization. It’s the biggest complaint I have with the entire stack.

                                                                  1. 1

                                                                    I’ve had some success using interpolation with to_sql (which sanitizes for you).

                                                                    It’s still a bit yuck but it’s the least bad alternative I’ve found in rails.

                                                                    1. 1

                                                                      I have only used Sequel on one side project. I really, really enjoyed it, and wish I had the opportunity to use it at work. Alas, decisions made years ago about this-or-that ORM are not worth the literal business cost to undo at the expense of more impactful, revenue-driving features.

                                                                      One of the ideas of ActiveRecord in its early days, as stated by DHH himself, is not that SQL is bad and we should avoid writing it at all costs for some ideological reason. Instead his idea was that the simplest of SQL queries (e.g. a bunch of WHERE clauses with a LIMIT or JOIN thrown in) should be able to be expressed in very simple, application-native code. Not exactly his words, but something like that, as well as some comment about how ActiveRecord works very purposefully to let you write raw SQL when you feel you need to. If I could find the right Rails book I purchased once-upon-a-2010 I would find the exact quote, but I think the idea remains.

                                                                      Sequel is great, but I have not used it “in anger” to know where the warts are. ActiveRecord has warts, and I know where they are. Despite those, it is good enough in many cases, and in the cases where it is not, was explicitly built to allow the programmer an “out”, and to write SQL when they really need to.

                                                                      I have listened to the The Bike Shed podcast for many years running. During the era when Sean Griffin was a host, he was both paid to contribute to ActiveRecord full-time (I think?) and was building a new, separate ORM in Rust. Some of the discussions provided a very interesting lens into some of the tradeoffs in ActiveRecord: which were inherent, and which were just incidental choices or entrenched legacies that need not remain in an ideal world.

                                                                      EDIT: Followup thought. You really do need a mental model for ActiveRecord::Relation when using “ActiveRecord”. Something I contributed at work (and which I hope to open source somehow in 2020) was an extension (patch?) to the awesome_print gem that previews ActiveRecord::Relation more intelligently. After building it, I realized that both junior and mid-level engineers on my team did not completely grok ActiveRecord::Relation, and how that just being able to see bits of it splayed out, in chunks more discrete than just calling #to_sql, helped them feel more confident that what they were building was the right thing.

                                                                      1. 1

                                                                        The problem with interpolating to_sql or using any form of SQL strings is that ActiveRecord scopes can no longer be composed for any mildly more complicated/useful queries, especially if ActiveRecord tries to alias a sub-query one way or another as strings are exempt from aliasing. ActiveRecord doesn’t parse any SQL strings. This is a problem as you don’t know who or what will consume/compose queries with those scopes using SQL strings later. Changing a scope which is used in many contexts to use literal SQL becomes a very dangerous undertaking as it might break many of its consumers due to the above. So I’m with @colonelpanic on this one. IMO, Rails Core team should either embrace Arel and its direct use or maybe replace it with something better.

                                                                        1. 1

                                                                          The other thing I’ve had success with in rails: PostgreSQL supports updatable views.

                                                                          Turning a monster query into a view is a big, ugly undertaking - but so far I’ve only needed it after a project has become a success (at which point I don’t mind too much) and tends to happen to the least-churned tables (I’ve only had to modify these kind of views once or twice).

                                                                      2. 2

                                                                        Contributors to Rails have repeatedly stated that Arel is considered an internal, private API, and it is not recommended for use in application code.

                                                                        I have very little sympathy for this position because the official query interface is simply not adequate for even mildly complicated use-cases.

                                                                        I’ve been using Arel directly, and even patching in new features, for ten years. Can’t think of a time it’s ever been an issue.

                                                                        I will continue to use Arel until a better alternative presents itself. String interpolation is not a serious alternative.

                                                                        1. 1

                                                                          In Rails’ code, the core example of utilizing #arel_table is exactly greater_than: https://github.com/rails/rails/blob/c56d49c26636421afa4f088dc6d6e3c9445aa891/activerecord/lib/active_record/core.rb#L266

                                                                          The bigger concern with SQL injection is future developers adding into the string unsafe code, so avoiding them is preferable.

                                                                          As far as database compatibility, there are plenty of non-SQL database adapters available, and sticking to some form of Arel or built-in syntax, rather than SQL, keeps it more likely to translate to many different databases. It’s not “a must”, but it’s pretty sweet to swap out adapters on an app and have everything “Just work”

                                                                          1. 1

                                                                            As far as database compatibility, there are plenty of non-SQL database adapters available, and sticking to some form of Arel or built-in syntax, rather than SQL, keeps it more likely to translate to many different databases.

                                                                            I am highly skeptical that there are actually that many databases in use which wouldn’t be just as happy with the simpler greater-than/less-than formulations.

                                                                          2. 1

                                                                            With regards to “database adapter compatibility”, I question whether less-than and greater-than are, in reality, not portable across different SQL databases? I am ignorant where this might be so, and would be happy to learn of those cases.

                                                                            FWIW here are the ORM-to-SQL operator mappings for Django’s four built-in database backends:

                                                                            So if there’s a database where > and < aren’t the greater-than/less-than operators, it isn’t one of those four.

                                                                          1. 4

                                                                            This is really cool feature. If you want to just pass all the arguments of the current method to a new method, Ruby 2.7 makes it dead easy with the help (…).

                                                                            Those are the kind of features I really fear. They look good and useful and simple, but they make code so much less grep-able.

                                                                            1. 3

                                                                              It shouldn’t be a thing for 99% of delegations since the Forwardable module handles most of that work. The trick would be how many Rubyists know about this rather than jumping on the ellipsis operator.

                                                                              1. 1

                                                                                Forwardable is almost never used in practice because it has an annoying API.

                                                                            1. 11

                                                                              Can we ban this blog completely? All of the posts are just lazy blogspam summaries of Ruby and Rails features that do little more than restate what the feature is, and the author and invite tree have been banned from lobsters already.

                                                                              1. 5

                                                                                Hm, that’s an interesting idea. Right now the consequence of spamming is “you get banned”, there’s still incentive to spam, because you get hits for the time you’re not banned. But if the consequence is “you get banned and nobody can post links to your site ever again”, people might think twice. …Might.

                                                                                1. 1

                                                                                  There tends to be a half-life to these things - the community remembers previous infractions, and would probably flag subsequent submissions as spam.

                                                                                2. 4

                                                                                  So, are you saying that technical blog posts about framework features are not welcome on lobsters? Is there something in the submission guidelines being violated here? Or are you calling this spam simply because you are not interested in the content? I don’t think “spam” is a defensible categorization.

                                                                                  1. 3

                                                                                    It is spam because it it’s authors organised a voting/submission ring in order to drive traffic to their company blog; that is, unsolicited content to drive a commercial outcome.

                                                                                    Whether the content is suitable for the site is actually orthogonal to spamminess, but it’s easy to lose sight of that as so little spam is suitable.

                                                                                    1. 1

                                                                                      Okay, I can understand why over-submission is considered spammy even if the content is fine. I was not aware that there was a coordinated submission scheme happening.

                                                                                1. 11

                                                                                  Braintree doesn’t use globally-unique ids for their transaction records. 48 hours I’ll never get back.

                                                                                  1. 1

                                                                                    Isn’t that a payment system? This seems pretty worrying…

                                                                                    1. 1

                                                                                      Yes… and I have plenty more horror stories where that came from.

                                                                                    2. 1

                                                                                      Hi, I work at Braintree and we do and have always used globally unique ids for transactions. You may have run into a recent issue we had, though (https://status.braintreepayments.com/incidents/n1hf4hj89lks). We have since cleaned up the duplicate ids and put measures into place to help prevent issues like this in the future. If that timeline doesn’t line up with what you saw, we’d love to know more.

                                                                                      1. 1

                                                                                        No, this was caused by switching a dev environment to a different sandbox account. Your API was giving us transaction IDs that were colliding with ids we received from the previous merchant. Thankfully, this never impacted production.

                                                                                        I sincerely doubt that your ids are globally unique because they’re far too short for that, and because of this blog post.

                                                                                        1. 1

                                                                                          That post is referring to the fact that a transaction id might be the same as a customer id, and that given only an id, we don’t know what type it is. Transaction ids are unique against all other transaction ids.

                                                                                          1. 1

                                                                                            Nevertheless, your sandbox did repeat transaction ids. I have two days’ wasted time to show for it.

                                                                                    1. 0

                                                                                      This reads like a rant, tag suggested.

                                                                                      Regarding the pipe-line operator, that’s exactly how it works in Elm, and it’s quite useful there.

                                                                                      1. 3

                                                                                        I don’t think so… I’m unfamiliar with Elm, but based on this article it appears that Elm’s pipeline works similarly to Haskell’s, no?

                                                                                        # given
                                                                                        foo "bar"
                                                                                          |> baz
                                                                                          |> quux
                                                                                        
                                                                                        # Ruby's pipeline is equivalent to
                                                                                        foo("bar").baz.quux
                                                                                        
                                                                                        # Elm and Haskell's work more like
                                                                                        quux(baz(foo("bar")))
                                                                                        
                                                                                      1. 5

                                                                                        Interesting. I’m using Ruby since ages, starting with 1.8 (with some old software even using Ruby 1.6)… And I’ve never used RubyOnRails much. I like Ruby as one of the most readable programming languages. However, over time more and more obscure operators are added that are not understandable by looking at them in itself. I don’t like this development, but it isn’t at all a new one. Back when 1.9 was introduced, they added this -> operator. In my opinion, this was a first design mistake; until the current day, I fail to see how this should resemble a λ or even a Λ it is supposed to resemble. I stick to using the lambda method. Likewise, the &:symbol syntax is plain ugly. |> looks like a syntax error, and ... conflicts in its meaning with the expected one (variadic argument list). Appearently this list is only about to get longer and longer.

                                                                                        Please stop adding operators to Ruby. It makes the language unreadable.

                                                                                        1. 8

                                                                                          Back when 1.9 was introduced, they added this -> operator. In my opinion, this was a first design mistake; until the current day, I fail to see how this should resemble a λ or even a Λ it is supposed to resemble.

                                                                                          is a pretty widespread function notation in math papers, ie writing the square function as x ↦ x². This is usually done when we need to emphasize that functions are mappings between sets, or when distinguishing functions from sets of functions.

                                                                                          1. 2

                                                                                            … conflicts in its meaning with the expected one (variadic argument list).

                                                                                            I don’t understand, isn’t that exactly what it is?

                                                                                            1. 3

                                                                                              No, Ruby has *args for a variadic argument list. The ... syntax only provides a way to forward arguments. It replaces this idiom:

                                                                                              def foo(*args)
                                                                                                bar(*args)
                                                                                              end
                                                                                              

                                                                                              Or, in case a block should be forwarded as well, this one:

                                                                                              def foo(*args, &block)
                                                                                                bar(*args, &block)
                                                                                              end
                                                                                              

                                                                                              This is needed rare enough that I don’t think it warrants its own syntax feature.

                                                                                              1. 2

                                                                                                This is most likely driven by the changes to keyword arguments; I believe they will likely no longer be included in *args once they become a first-class feature rather than syntax sugar for a Hash.

                                                                                          1. 7

                                                                                            Parameter forwarding is a nice convenience that doesn’t suffer from any of the problems of |>: mixing positional args with kwargs and a block means forwarding arguments is kind of annoying in Ruby. I welcome ...

                                                                                            As my Ruby has tended more toward a functional style I’ve been doing this sort of thing a lot more.

                                                                                            1. 4

                                                                                              Let’s Encrypt has been a really enjoyable integration experience, and the ACME spec it’s based on is pretty easy to follow.

                                                                                              1. 1

                                                                                                PBKDF2 and bcrypt may be brute-forced before too long.

                                                                                                [Citation Needed]

                                                                                                What makes you say that? Both KDFs can have their iterations cranked up to increase complexity, and they are designed to prevent parallelization so you have to compute each iteration sequentially.

                                                                                                1. 1

                                                                                                  RFC8018 is fairly readable even if you’re not familiar with crypto math; the iteration function is forced to be serialized by making the output of the previous iteration the input of the next.