1. 2

    Hate to be that guy but I can’t believe it is 2018 and the Rails world still holds so tightly to the active record pattern despite it hurting so much.

    1. 2

      OP here.

      It’s a legacy Rails app from 2011. Moving the whole chunk to something other than the AR pattern is not feasible, nor will it ever be.

      The best we can do is to rewrite pieces of it at a time with better patterns, and that’s exactly what we are doing now.

      1. 1

        Much of the perceived productivity wins that out-of-the-box Rails provides are derived from the tight coupling between ActiveRecord (or at least ActiveModel) and the rest of the provided libraries. I agree it is a hindrance, but choosing not to use it in the initial phases of a project causes other sorts of friction unless you really know the ecosystem and know what you want to do instead. After all, isn’t ActiveRecord almost half of the lines of code in Rails in the first place?

        With respect to tests, the community’s preference for factory libraries (instead of the built-in fixtures) exacerbates the performance issue quite a bit.

      1. 10

        Pattern matching is one of the only features I regularly feel is lacking in Ruby.
        There are other things I dislike or wish weren’t present, but the only missing feature is this.
        Combining conditionals and assignment just feels 10x better than having them separate.

        I even built a pattern matching library with some gross fun hacks on top of a specific namespace, thread-local singleton instance variables and caller_locations to allow for kinda-mostly pattern matching. I’m going to see if I can dig up the code, because aside from a first/rest pairing, I managed to get nested matching across Arrays and Hashes, and an Any object to match anything.
        Then I bumped into a Ruby Tapas video on the topic and stole the hubcaps to implement Erlang-like guard clauses.

        1. 6

          Have you looked at Qo at all? If so, any strong opinions about where it’s lacking? (Admittedly, it’s a giant hack, but it’s a pretty good giant hack.)

          1. 12

            Hello! Author of Qo here. Yeah, you’re right, it is a bit of a giant hack XD

            Anyways, I’d love to hear any ideas or suggestions on it. Typically I use the issue tracker to keep tabs on what I want to do with it, so feel free to jump in there as well.

            Admittedly I’m also the one who wrote a small-scale novel on pattern matching in the description to try and cover bases as I really really really want this feature, as evidenced by writing Qo in the first place.

            1. 3

              What do you think about the %p() or %m() syntaxes? I think they’re really ugly personally. Is it possible to make a spin on case which parses the when clauses as patterns without any special extra delimiters? You somewhat hit on that when talking about Scala style I think. Something like this maybe?

              match val 
              when [:constant, "constant", [1], variable_binding]
                variable_binding + 1
              else
                0
              end
              

              If you already covered that, apologies, I read your comments quickly last night and might have missed it.

              1. 4

                EDIT Codefied my idea here - https://bugs.ruby-lang.org/issues/14709#note-6

                match(value) do |m|
                  m.when(/name/, 42) { |name, age| Person.new(name, age) }
                  m.else { |object| raise "Can't convert!" }
                end
                

                An example practical usage:

                def get_url(url)
                  Net::HTTP.get_response(URI(url)).then(&match do |m|
                    m.when(Net::HTTPSuccess) { |response| response.body.size }
                    m.else { |response| raise response.message }
                  ))
                end
                

                Original:

                Not a problem, there are a lot of them (may Matz and Koichi forgive me)

                I hadn’t quite covered it yet. That’s always been the trick about this: what should it look like?

                Truthfully I don’t know quite yet, but I’m working on ideas. In regards to the %p and %m I would agree with some Reddit comments that they can tend slightly Perl-ish. I’d like a more fluent syntax if possible that reads intuitively, and I don’t think that quite does it.

                I had initially proposed this:

                new_value = match value
                  when %m(:_, 20..99) { |_, age| age + 1 }
                  else { |object| ... }
                end
                

                …which is quite similar to your suggestion. I’d almost consider switching the syntax a bit to something more like this:

                new_value = match value
                  when matches(:_, 20..99) { |_, age| age + 1 }
                  else matches(:_) { |object| ... }
                end
                

                When possible I would prefer very clear words as syntax over the percent shorthands. With this you could almost amend case to look for matches

                1. 1

                  Ahhh, I hadn’t seen how binding the match results as block arguments would be valuable, but your example of using === overloads like Class.=== and Regexp.=== have convinced me. I learned pattern matching in Erlang so I was thinking about the Erlang style mostly, and I didn’t think of how pattern matching would be most useful in Ruby. Blocks are a good way to reuse the case style matching that’s already well understood.

                2. 1

                  OOH I like this! You should counter-propose this syntax.

              2. 2

                I only just saw it via this proposal. Hope to find time to play with it today after work.

            1. 3

              I really wonder - why is it such a problem in Ruby? I have experience with some php and python ibraries. Usually the best approach was generating html and have it rendered to PDF by some of these libs. Never really had any problem with that. Aren’t there any good PDF libraries in Ruby?

              1. 1

                Usually the best approach was generating html and have it rendered to PDF by some of these libs.

                Aren’t there any good PDF libraries in Ruby?

                It functions the exact same way in the Ruby ecosystem, with several of the most common libraries (e.g. wicked_pdf and pdfkit) using wkhtmltopdf to achieve this, which is probably what you are used to in Python as well.

                It does feel like a pain to get a PDF looking just right when created from HTML, but it’s probably just a relative thing? That is, PDF generation is just a more fiddly/clunky process in general, but since so many other tools in Ruby feel easy/seamless, having PDF generation not meet this expectation makes it stand out.

              1. 5

                Isn’t this just a frustration with the fact that so many packages depend on so many packages? Because the same rogue actor stuff would apply to any tree dependency self-published system. See your local Gemfile. Do you really know what’s being installed?

                So what’s the proposed fix? Stop depending on so many packages?

                Perhaps there should be a line drawn for the major packages, to use less of these tiny modules.

                But this is also part of the beauty of single responsibility packages. Composing extremely simple parts is all we really need, right?

                Think about all of the tiny programs you run on your Unix machine of choice. Perhaps those are also at fault for the “too small to be worth it” sin.

                Again, where do we draw lines?

                1. 6

                  The elm package manager will refuse to publish a package that violates semantic versioning. So if you’re a malicious actor, changing the API of some package for nefarious purposes, you’d be doing a bit of a hard job because since functions can’t change their signatures without you bumping the major version and since most elm-packages.json files will not update major versions automatically, it becomes harder to ship evil code. Also, a simple elm-package diff command would tell you what changed between versions, making it easier for you to audit the code. There is a lot of beauty in it. It is not evil proof, but it makes it a bit harder.

                  1. 2

                    I wonder if you can push this to an extreme, where each public function is independently versioned. Then you could upgrade to a new version even if there are breaking changes, as long as they’re not in any part of the API you use. I’m not sure if it would be useful but its a fascinating idea.

                    1. 1

                      This is super interesting. I wonder how much this friction reduces velocity and quick progress, especially for younger developers. But I like this.

                    2. 3

                      I just took a look at the Gemfile for one of my websites and there are a lot of gems but ~80% come from the rails team and most of the rest are trusty sources like amazon. This is not even close to as bad as when I created a blank Vue project that already had thousands of packages many about 3 lines long.

                      1. 1

                        Good heuristic. Still possible to see bad stuff come down the pipe, but perhaps not as common just by way of community.

                        Could we imagine the same thing happening, though, in a parallel universe? I think so.

                        Then again, standard libs for Ruby do a lot of the small stuff for you. Even/odd come to mind.

                        1. 1

                          Ruby seems to have lots of mega libs that do big tasks but JS devs seem to have taken the path of making a new package for every function. I do wonder how often JS devs add 2 packages that do the same thing because they forgot about the last one. The result is also that questions online about ruby often tell you to use methods built in to ruby or ActiveSupport where as JS questions either get you to build it yourself or use jquery.

                          1. 1

                            In defense of ActiveSupport, you can include individual pieces of it at whatever granularity you like, and the documentation explicitly calls this out to you at the very beginning.
                            Even in projects that are not web-related, I sometimes bring ActiveSupport along but will only require 'active_support/core_ext' and add things later if I need them as the project grows (often things like time_with_zone or number_helper).

                            I think that it’s a good way to balance “provides a lot of stuff” and “forces you to use all of its stuff”. I want to complain that the rest of Rails’ sub-projects don’t provide the level of utility when included gradually, but I also appreciate that that is the whole bargain: Rails’ perceived productivity boosts are derived from a tight coupling that pays dividends, you as long as you go with the Rails Way.

                            Edit/Afterthought: Over the years, some of the better Ruby libs to hit this balance of providing a lot but allowing for gradual or clean interop (with other libs, or with your application code) have been those authored or worked on by Piotr Solnica.

                      2. 1

                        What I do in my Python work is generally be willing to depend on large, tested projects with well established, thriving communities that have a good history of responding to security incidents. These packages usually do not depend on other packages or when they do, on well established ones (e.g. requests library).

                        I might include other, less known packages, if I intend to use most of their functionality and if it is not easy to replicate on my own. Otherwise I write my own version or copy with attribution and license only the relevant parts.

                        This is not perfect, but gives me some confidence that things will be fine.

                        It is also an approach that completely breaks down in my Javascript/Typescript work because of so many packages being pulled in and everything seemingly depending on everything else (yes, I am exaggerating).

                        1. 1

                          The problem already starts with licenses. For many apps for example you’ll have to list the licenses of all used libraries, and the libraries, including all transitive dependencies in the UI.

                          For my Android app that’s a few dozen overall, and it took only a few hours to do this. For even the smallest Angular project, this is insanity.

                          So if you want compliance, you’ll need to throw the entire ecosystem out right now. Or you just violate the licenses. Often even projects such as angular have dependencies that have no license.

                          1. 1

                            I just tested this. In the old client project I mentioned earlier, find node_modules/ -iname "license" gives me 743 results.

                        1. [Comment removed by author]

                          1. 10

                            I think it’s usually because “that’s what work is buying me”.

                            1. 10

                              Can anyone show me a laptop that doesn’t lose to a macbook in any of these categories?

                              • performance
                              • price
                              • form factor
                              • fit and finish
                              1. 5

                                I really like Lenovo X1 Carbon.

                                1. 2

                                  Very happy with 5th gen x1c. If only I could get 16:10 though…

                                2. 5

                                  Personally I like the Dell XPS 13 and 15. The 4K screens are really amazing to see in person. You can configure with an i7 processor, optional fingerprint reader, fast SSDs up to 1TB, up to 32GB RAM, touch/non-touch display options, up to 97Wh battery in the ~4.5lb model or 56Wh in the 4lb if you want to go lighter (benchmarks). For ports, it has an SD card slot, 2 USB-A 3.0 with PowerShare, 1 HDMI, and a Thunderbolt 3 (including power in/out).

                                  I feel they compete in several of the categories and are worth checking out in person somewhere (Frys, etc) if you’re in the market. Just earlier today someone posted a link to this guy’s experience spending a year away from MacOS and he winds up with an XPS 15, which he mostly likes.

                                  1. 8

                                    Too many QA issues to compete with a MacBook. Just check /r/dell.

                                    1. 8

                                      Not a chancee, my favooritee part is the firmwware feature that douboles up my keypressese!

                                  2. 2

                                    I went from a 2011 macbook pro 15” to a thinkpad 460p running kubuntu, its not as flush as the macbook but it beats performance & price for me. Form factor, I should’ve got a 15” again but thats my choice. Fit & finish on the macbook is better but then I can easily remove my battery and get to all the internals of the laptop, so I prefer the thinkpad.

                                    1. 1

                                      I can try, though I am not sure what “fit and finish” means or how to measure it.

                                      Ignoring that, I would offer up both the Dell XPS 13 or Lenovo X1 Carbon.
                                      There are reasons to pick one over the other, but for me it was the X1 Carbon for having matte screen.

                                      1. 1

                                        Fit and finish covers build quality and aesthetics. According to this page it’s an automotive term.

                                      2. 1

                                        The new Huawei Matebook X?

                                        1. 1

                                          How about the ASUS ZenBook Pro? I don’t have experience with it, but superficially it’s got very similar form factor and design to a MacBook. Aluminum uni-body and all. And being not-Apple, you obviously get better performance for the price.

                                          1. 1

                                            Thinkpad P71. Well, except for the form factor (I’d rather get stronger arms than have to compromise on other factors), it beats the Macbook Pro on all fronts.

                                          2. 5

                                            I’ve run Linux on a Macbook because my employer wouldn’t give me anything else. Reason was: effort of IT team vs my effort of running Linux.

                                            But pretty sure my effort was extensive compared to what their effort would have been :)

                                            1. [Comment removed by author]

                                              1. 2

                                                Yeah, but then you’re stuck with the clunky old macOS rather than a nice modern UI like StumpWM, dwm or i3.

                                            2. 4

                                              16:10 screen, wide-gamut display, correct ppi (X1C is too low, and the high-res Dells too high).

                                              The last ThinkPad (of which I have many) to have a 16:10 screen was T410, which is now 8 years old.

                                              Personally, there’s no other modern laptop I’d rather use, regardless of operating system. To me nothing is more important than a good and proper screen.

                                              If anybody comes up with a laptop that has a 4:3 screen, I’ll reconsider.

                                              1. 1

                                                Doesn’t the pixelbook have a nice tall aspect ratio? Ignoring linux compatibility and the fact that it’s a chromebook, I feel like you’d like the hardware.

                                                1. 2

                                                  It does, but tragically it’s ruined by a glossy finish on the screen. I bought one for the aspect ratio and brightness but almost threw it out the window several times in frustration before giving it away.

                                              2. 2

                                                I don’t think many people buy new Apple hardware with the intention of immediately wiping it and installing Linux.

                                                My MBP, for example, is running OSX because I need it (or Windows) to use Capture One photo software. When I upgrade to a new machine I’m going to put Linux on the old one and use it for everything else. I did the same thing with my iMac years ago.

                                                I personally still think the build quality of Apple laptops are better than the alternatives. The trackpad in my old MBP, for example, still feels better than the trackpads I’ve used on newer machines from other brands. The performance and specs are less important to me as long as it’s “fast enough” and the build is solid.

                                                All that said, I’m not buying any more Apple products because their software quality has completely gone down the toilet the last few years.

                                                1. 2

                                                  In this case I didn’t really have a choice. I had tried asking for a PC before I started this job; but they tried to get me in really fast and provisioned a Mac without even asking me. My boss made up some bullshit about how you have to have them for developers laptops as the PCs the company bought didn’t have the specs (16GB of ram and such). I’m really glad I got Linux booting on it and not have to use it in VMWare (which does limit your max ram to 12GB and doesn’t give you access to the logical HT cores).

                                                  But yea if it was my personal laptop, I wouldn’t even bother buying a mac to being with. My recent HP had everything supported on it with the latest Ubuntu or on Gentoo with a stock kernel tree right out of the box.

                                                  1. 1

                                                    I got given a macbook so I had no choice what laptop to use so I installed linux on it and it works well enough.

                                                  1. 14

                                                    I believe that OO affords building applications of anthropomorphic, polymorphic, loosely-coupled, role-playing, factory-created objects which communicate by sending messages.

                                                    It seems to me that we should just stop trying to model data structures and algorithms as real-world things. Like hammering a square peg into a round hole.

                                                    1. 3

                                                      Why does it seem that way to you?

                                                      1. 5

                                                        Most professional code bases I’ve come across are objects all the way down. I blame universities for teaching OO as the one true way. C# and java code bases are naturally the worst offenders.

                                                        1. 5

                                                          I mostly agree, but feel part of the trouble is that we have to work against language, to fight past the baggage inherent in the word “object”. Even Alan Kay regrets having chosen “object” and wishes he could have emphasized “messaging” instead. The phrase object-oriented leads people to first, as you point out, model physical things, as that is a natural linguistic analog to “object”.

                                                          In my undergraduate days, I encountered a required class with a project specifically intended to disavow students of that notion. The project specifically tempted you to model the world and go overboard with a needlessly deep inheritance hierarchy, whereas the problem was easily modeled with objects representing more intangible concepts or just directly naming classes after interactions.

                                                          I suppose I have taken that “Aha!” moment for granted and can see how, in the absence of such an explicit lesson, it might be hard to discover the notion on your own. It is definitely a problem if OO concepts are presented universally good or without pitfalls.

                                                          1. 4

                                                            I encountered a required class with a project specifically intended to disavow students of that notion. The project specifically tempted you to model the world and go overboard with a needlessly deep inheritance hierarchy, whereas the problem was easily modeled with objects representing more intangible concepts or just directly naming classes after interactions.

                                                            Can you remember some of the specifics of this? Sounds fascinating.

                                                            1. 3

                                                              My memory is a bit fuzzy on it, but the project was about simulating a bank. Your bank program would be initialized with N walk-in windows, M drive-through windows and T tellers working that day. There might’ve been a second type of employee? The bank would be subjected to a stream of customers wanting to do some heterogeneous varieties of transactions, taking differing amounts of time.

                                                              There did not need to be a teller at the drive-through window at all times if there was not a customer there, and there was some precedence rules about if a customer was at the drive-through and no teller was at the window, the next available teller had to go there.

                                                              The goal was to produce a correct order of customers served, and order of transactions made, across a day.

                                                              The neat part (pedagogically speaking) was the project description/spec. It went through so much effort to slowly describe and model the situation for you, full of distracting details (though very real-world ones), that it all-but-asked you to subclass things needlessly, much to your detriment. Are the multiple types of employees complete separate classes, or both sublcasses of an Employee? Should Customer and Employee both be subclasses of a Person class? After all, they share the properties of having a name to output later. What about DriveThroughWindow vs WalkInWindow? They share some behaviors, but aren’t quite the same.

                                                              Most people here would realize those are the wrong questions to be ask. Even for a new programmer, the true challenge was gaining your first understandings of concurrency and following a spec rules for resource allocation. But said new programmer had just gone through a week or two on interfaces, inheritance and composition, and oh look, now there’s this project spec begging you to use them!

                                                          2. 2

                                                            Java and C# are the worst offenders and, for the most part, are not object-oriented in the way you would infer that concept from, for example, the Xerox or ParcPlace use of the term. They are C in which you can call your C functions “methods”.

                                                            1. 4

                                                              At some point you have to just let go and accept the fact that the term has evolved into something different from the way it was originally intended. Language changes with time, and even Kay himself has said “message-oriented” is a better word for what he meant.

                                                              1. 2

                                                                Yeah, I’ve seen that argument used over the years. I might as well call it the no true Scotsman argument. Yes, they are multi-paradigm languages and I think that’s what made them more useful (my whole argument was that OOP isn’t for everything). Funnily enough, I’ve seen a lot of modern c# and java that decided message passing is the only way to do things and that multi-thread/process/service is the way to go for even simple problems.

                                                                1. 4

                                                                  The opposite of No True Scotsman is Humpty-Dumptyism, you can always find a logical fallacy to discount an argument you want to ignore :)

                                                          3. 2
                                                            Square peg;  
                                                            Round hole;  
                                                            Hammer hammer;  
                                                            hammer.Hit(peg, hole);
                                                            
                                                            1. 4

                                                              A common mistake.

                                                              In object-orientation, an object knows how to do things itself. A peg knows how to be hit, i.e. peg.hit(…). In your example, your setting up your hammer, to be constantly changed and modified as it needs to be extended to handle different ways to hit new and different things. In other words, your breaking encapsulation by requiring your hammer to know about other objects internals.

                                                            2. 2

                                                              your use of a real world simile is hopefully intentionally funny. :)

                                                              1. 2

                                                                That sounds great, as an AbstractSingletonProxyFactoryBean is not a real-world thing, though if I can come up with a powerful and useful metaphor, like the “button” metaphor in UIs, then it may still be valuable to model the code-only abstraction on its metaphorical partner.

                                                                We need to be cautious that we don’t throw away the baby of modelling real world things as real world things at the same time that we throw away the bathwater.

                                                                1. 2

                                                                  Factory

                                                                  A factory is a real world thing. The rest of that nonsense is just abstraction disease which is either used to work around language expressiveness problems or people adding an abstraction for the sake of making patterns.

                                                                  We need to be cautious that we don’t throw away the baby of modelling real world things as real world things at the same time that we throw away the bathwater.

                                                                  I think OOP has its place in the world, but it is not for every (majority?) of problems.

                                                                  1. 3

                                                                    A factory in this context is a metaphor, not a real world thing. I haven’t actually represented a real factory in my code.

                                                                    1. 2

                                                                      I know of one computer in a museum that if you boot it up, it complains about “Critical Error: Factory missing”.

                                                                      (It’s a control computer for a factory, it’s still working, and I found that someone modeled that case and show an appropriate error the most charming thing)

                                                                      1. 2

                                                                        But they didn’t handle the “I’m in a museum” case. Amateurs.

                                                                2. 1

                                                                  You need to write say a new air traffic control system, or a complex hotel reservation system, using just the concepts of data structures and algorithms? Are you serious?

                                                                1. 0

                                                                  Is it me, or does a 2x test/code ratio feel like a hilarious waste of time, or not nearly enough?

                                                                  1. 2

                                                                    I thought we had a normal ratio for a Ruby/Rails application that has thorough test coverage, but I’d love to hear from others on what their ratio looks like. We didn’t aim to have a certain ratio or anything. We write tests as we’re writing code, and that’s what we ended up with. Lines of code isn’t a consistent metric across different projects since style and conventions come into play, but I thought it was something I could share to convey the size of our application.

                                                                    1. 2

                                                                      The more consistent our architecture became, the more we were able to leverage integration tests, i.e. end to end assertions of the public side effects resulting from a single use case, and have confidence in that use case’s correctness. The average use case simply had far less “exciting” code, relied more on libraries, and far more that could be taken for granted. Unit tests are emphasized in our library code (e.g. internal gems) or in anything “interesting”, which is taken to mean any logic hairy enough that it doesn’t just fall out of air with our bog-standard architecture.

                                                                      Certain policy and permission classes, many of which boil down to a comparison operator or two, are also unit tested by default in pursuit of “tests as documentation” rather than assertion of correctness.

                                                                      I haven’t run the stats in a while but if you ignore view code (any .erb files, css and our javascript whose tests are nonexistent or in shambles), we are sitting at 1:1 or bit lower in our main monolith. In my conversations with others, I would not say that your 2:1 is out of the ordinary, though anything higher might make me raise an eyebrow.

                                                                      At some point if you’re being so thorough that you have excess of a 2:1 test:domain code ratio, you either have a very hairy, naturally complex business domain (and my eyebrow lowers), or you should look into property testing/generative testing.

                                                                    2. 1

                                                                      I think it depends tremendously on how you write tests.

                                                                      EG: If your tests are mostly high-level integration tests it seems quite high; if they’re mostly low-level unit tests it seems low.

                                                                      Similarly, If you’re using a terse style (eg via DSL / metaprogramming) it seems high; if you’re using a verbose style (eg the recommended rspec approach) I’d say you’ve mostly tested the ‘happy path’.

                                                                      1. 1

                                                                        Right, that’s my point. I also was speaking in general, not specifically about a Rails application. I don’t do Rails any longer, but when I did, the codebase was more like 5-8x tests to codes. And of course, in Scala, the type system – for all of my reservations about complexity – allows a much leaner ratio.

                                                                      2. 1

                                                                        If you’re really serious about testing, especially more end-to-end stuff and interacting with the front-end, it’s pretty easy to end up needing 10 lines in a test to check a feature that only required 2 or 3 to implement.

                                                                        There’s some cross-checking too of course, but if writing 3x as much code meant basically no regressions, that’s a decent deal

                                                                        1. 1

                                                                          I depends a lot on the code. For example, in my current codebase I have something like:

                                                                          Maybe(resource).fmap(&:author).fmap( ->(n) { n[:full_name] }).or(Some('Somebody'))
                                                                          

                                                                          This is part of a method that gets a hash that, ideally, looks like this:

                                                                          {
                                                                            author: {
                                                                              full_name: 'John Doe'
                                                                            }
                                                                          }
                                                                          

                                                                          However, there might be some cases where the hash is nil or the hash does not contain the expected keys. So for a line (actually two, since the line is too long for my taste) of code you easily end up with four test cases (hash is nil, hash does not have the :author key, the :author key returns a hash without the :full_name key and the ideal scenario where all the data is present).

                                                                          Then again, you most likely have a bunch of lines of code that are just doing simple things, like check if a property is set or something like that, where the test cases are a lot simpler so you might not end up with a 2x test/code ratio.

                                                                          1. 2

                                                                            I have no idea what your domain/code-culture is, but if you just want something short, maybe plain Ruby is enough? :

                                                                            Hash(resource).dig(:author, :full_name) || 'Somebody'
                                                                            

                                                                            Your short code example looks like a mix of Ruby with Rust, or Haskell monads. Yet, I wonder what happens when resource is an Array. Does that Maybe function swallow the exception? It’s hard to bolt on types where there were none before! :)

                                                                            1. 2

                                                                              The library used is dry-monads and if you pass an array you get an NoMethodError: undefined methodauthor’`.

                                                                              I agree that the dig method is more appropriate for a Ruby codebase and in some places it was used instead of the Maybe monad. The reason why we’re using that (and I was the one pushing it as team lead) was that those constructs are closer to constructs in other languages and one of the side goals that I have is to enable people as much as possible to explore other languages and my feeling is that this kind of code helps.

                                                                        1. 5

                                                                          An architecture after my own heart.

                                                                          One of the most influential works on architecture I have ever encountered is an old talk from Ruby Midwest 2011. Not just in its amount of content (though of course books, being books, have more, e.g. PoEAA), but in the sheer focused force of a few salient points, and quotable quotes, which then drove me to explore further. Chief among them, and which snapped me-circa-2012 back to reality, was the thought “Huh, why are the folders in /app grouped by some pattern name, unrelated to our business domain? No other job I’ve had did that…”

                                                                          I gave it a shot twice with my current job’s main monolith. One failed, the other half-succeeded: we gained a more expressive structure than just “MVC”, and we aggressively section off library code into internal gems, but we never truly freed our domain from the tyranny of /app.

                                                                          What wound up happening was sequestering sub-sections of the domain that “felt’ like they would one day be broken away into subfolders of /app/services, each representing a self-contained mini-domain. Consequently it means we never fell victim to equally-all-encompassing “service objects” because that folder name was already taken. Our boundary “enforcement” was discipline and code review, and at the cost of a few layers of abstraction. Somewhere along the way, we also stumbled onto what you call an Observer Pattern, but we just call “messaging” (via the guess that it would break off on its own, into RabbitMQ or Kafka, which it has).

                                                                          The big difference is that our tests for these are not as disciplined. The domain logic might not be coupled, but the tests wound up being so. Tearing a service’s code out is easy. Getting its tests to pass again once isolated is inappropriately hard.

                                                                          It seems like both of us driving at similar goals led to mostly similar decisions! The only difference is we may never break the bondage of /app in that monolith. By the time we gained the engineering headcount and roadmap slack to attempt that, various data science and marketing needs had driven us to at last split the services out, one by one, rather than fight Rails while molding them into a more disciplined structure.

                                                                          1. 15

                                                                            You do all of this, but then you still can’t get into the Gmail, Yahoo or Outlook inboxes. Why?

                                                                            Maybe the first email you sent (to a close friend, who happens to use Gmail) accidentally had a spam trigger word. Maybe the IP on your shared host was previously used by someone whose WordPress install got hacked and wound up sending spam. Maybe something else entirely! You’ll never know!

                                                                            Or maybe you did everything right and got lucky on all those details, and everything is working fine. But then some troll messes with you by maliciously filling out your form 200 times with bullshit email addresses that don’t exist. Are you doing double opt-in? Are you bounce-parsing to make sure you don’t re-send repeatedly to non-existent email addresses? How do you handle backoff on receiving domains that temporarily greylist you? Missing those details is going to hurt you too in the long run. The industry best practice is double opt-in for a reason, and if you want to do anything other than that, you’re fighting an uphill battle. It’s a battle you can still fight, but not an easy one.

                                                                            The current state of email deliverability is the end result of layers of good intentions, all collaborating to produce a worst-of-all-worlds situation for unsophisticated good actors. We can’t seem to solve it without unnecessarily re-enabling spammers, aside from “Give up hope and let a few centralized ‘trusted’ ESPs own our very concept of email.”

                                                                            I got stuck following this guide on how to startup… the next step after collecting e-mail addresses was sending something to them.

                                                                            Although all the best talking head VC-turned-bloggers (or bloggers-turned-VCs?) will tell you email marketing is a great idea, and that you’ve not really tried it until you’ve sent at least one hundred thousand emails, no one gives actual deep details of best practices for startup email marketing. If they did, and everyone followed the advice, it would be self-defeating for those who currently are reaping the benefits of the more sophisticated strategies.

                                                                            This article is still great. It is all accurate and good advice. As they say, it is “necessary but not sufficient”.

                                                                            1. 7

                                                                              Yes, I agree entirely. I wrote about this a while ago:

                                                                              http://penguindreams.org/blog/how-google-and-microsoft-made-email-unreliable/

                                                                              Which I based off the “Hostel E-mail Landscape” blog post that’s references at the bottom of my post.

                                                                              I can understand why spam filters are so aggressive. I’ve looked through my spam trap and found some crazy good phishing sites, some carefully crafted Javascript ransomware and lots of other terrible things. Some of it makes it through, but at least I can identify and know what to do with it. Many average Internet individual cannot.

                                                                              It an attempt to keep people safe, e-mail is now terribly terribly unreliable, unless you’re one of the big players like Google, MS or Mailchimp. It’s the slow death of the distributed and federated web.

                                                                              1. 2

                                                                                I rather hoped you’d chime in. ;)

                                                                              1. 26

                                                                                Another item onto the list of stupid, self-sabotaging ideas from Mozilla.

                                                                                • Pocket
                                                                                • Cliqz
                                                                                • Looking Glass
                                                                                • (Anything else I missed?)

                                                                                That said, I’m still a Firefox user, because after all, I still trust the Mozilla Foundation and Community more than the makers of the other browser vendors.

                                                                                1. 11

                                                                                  Mozilla has it’s missteps, on the other hand, they are still better than the other Browser Vendors out there and I haven’t seen a viable Firefox Fork out there that works for me. Plus it seems the Looking Glass addon was inert unless specifically enabled by the user, so I don’t see the harm tbh.

                                                                                  “Atleast [they are] the prettiest pile of shit.” ~ Some quote I heard somewhere

                                                                                  1. 3

                                                                                    I would add Mozilla Persona to this list, which was a great idea, but was mismanaged and shut down by Mozilla before it could do anything good.

                                                                                    I pretty much lost my faith in Mozilla having any idea what it is doing at that point.

                                                                                    1. 5

                                                                                      Original Pocket introduction was mishandled, but since Mozilla owns and operates it now, integration with Firefox makes sense.

                                                                                      1. 7

                                                                                        is it open source now?

                                                                                        1. 6

                                                                                          My understanding is, it’s not yet. It’s being worked on. I have no idea what kind of work it takes, but the intention is that it will be fully open sourced.

                                                                                      2. 4

                                                                                        You missed ‘Quantum.’ (The one where they broke their extension API for the sake of alleged performance).

                                                                                        1. 45

                                                                                          That one I actually like; the performance is much better, and the memory leaks much fewer. Pre-quantum I was on the verge of switching to Chrome because of the performance gap and leaks.

                                                                                          1. 11

                                                                                            I agree. The browser engine is noticeably better - if only the software around it were also on the same level. Some lightweight browser like surf or midori should adopt it, instead of WebKit.

                                                                                            1. 1

                                                                                              WebKit is easy to adopt because WebKitGTK and QtWebKit (or whatever it’s called) are well supported and easy to use. And Chromium has CEF. (IIRC Servo is also implementing CEF.)

                                                                                              I don’t think current Gecko is easily embeddable into whatever.

                                                                                              Back in the day Camino on Mac OS was a Gecko browser with a custom Cocoa UI, but doing that today would be way too hard.

                                                                                              1. 2

                                                                                                I should clarify, I was talking about Servo. I don’t really thing there would be a point in using Gecko, since it will probably turn into a legacy project.

                                                                                                1. 2

                                                                                                  It seems the other way to me? What they’re doing instead is slowly retrofitting pieces of Servo into Gecko piecemeal. (or at least, some kind of Rust equivalent to the C/C++/JS code being replaced) Servo would then be dead or explicitly turned into some staging ground for Gecko.

                                                                                          2. 21

                                                                                            I will go beyond alleging a performance improvement, I will attest to it. Surprisingly enough, the improvement includes Google properties such as Gmail and YouTube. They are both more responsive in Firefox now than Chromium or Chrome.
                                                                                            On the extension side, I do not use a large number. Those which I do, however, still function.

                                                                                            I freely admit that the plural of anecdote is not “data”, but I would feel remiss not to share how impressed I am with Quantum. Pocket has always annoyed me, so I certainly do not see Mozilla’s actions as unimpeachable and am only giving them credit for Quantum because I feel they deserve it.

                                                                                            1. 8

                                                                                              Based on this, Quantum was a balanced update where the team had do sacrifice the old extension API. Also, it’s not that they’ve removed extensions completely. (And no, I’m not talking about you Looking Glass)

                                                                                            2. 8

                                                                                              Quantum is great. uBlock Origin and uMatrix now work on Firefox for Android just as well as on desktop.

                                                                                              1. 3

                                                                                                ublock origin worked on firefox android before firefox quantum no ?

                                                                                                1. 1

                                                                                                  IIRC it worked but the UI was somewhat different. Now uMatrix is also available, and both extensions have UI that looks practically identical to the desktop versions.

                                                                                          1. 3

                                                                                            Work: Finalizing documentation to unveil new process standards for our product development teams. Changing most of it for the better, and a lot of it will be pretty conventional/uncontroversial, but part of it involves giving up on a few of my ideals. Not for bad reasons, mind you, I am just learning to compromise with reality I suppose.

                                                                                            Code-wise I will only be writing a bunch of unit tests for a bunch of legacy utilities and library code. One of the libraries might end up extracted and open sourced, depending what my team thinks.

                                                                                            Personal: Nothing major terms of digital technology. I have been saving and using wine bottles to craft interesting containers for plants, though. Most recently I have been cutting them in half to make self-watering planters where some mesh keeps soil and the plant above, while some twine hangs through it into a pool of water, which seeps up into the soil via capillary action. I have 4 more bottles to cut and craft in this way.

                                                                                            1. 4

                                                                                              Effective behavioural advertising requires hods of data, and nobody can gather sufficient data enough to compete against Google’s “superprofiles”

                                                                                              I doubt if it’s effective. I see completely unrelated ads all the time, mostly for mainstream things that I hate (mobile games, Hollywood movies, cars). Also I see lots of ads for cosmetics and local nail coloring services despite I’m male. Sometimes I think collected data is completely unused (or used to fit very primitive models) and data collection is just for deceiving advertisers that their ad networks are highly targeted and hi-tech, and for data hoarding.

                                                                                              1. 6

                                                                                                For the most part, when it comes to these sorts of ads, you’re looking at either pricing at a keyword/slot level or in”real-time bidding” with blind auction. Basically, despite having all this data to target (which honestly could happen way better with Google’s dataset) most of it gets destroyed by the heavily-skewed financial incentives of advertising.

                                                                                                1. 5

                                                                                                  Some of the misfires I’ve seen:

                                                                                                  • “He searches a lot about programming and reads a lot of programming stuff… let’s advertise coding bootcamps!”
                                                                                                  • “He just wrote a case study of how his employers use X and the pros and cons of that. I know, let’s send him ads for X!”
                                                                                                  • “He JUST bought Spotify. Let’s advertise Spotify more. And Google Play.”

                                                                                                  A few years ago I did a bunch of research into various robo-advisors and in the end decided to stick with Vanguard. I still get robo-advisor ads (and payday loan ads…) to this day.

                                                                                                  1. 1

                                                                                                    I get similar ads too, but usually for no longer that 1-2 days after searching/visiting sites. This means that they are really using collected data but algorithms are very far from understanding this data.

                                                                                                  2. 2

                                                                                                    For professional reasons I want at least some awareness of the current state of advertising, so I will occasionally disable my adblocker. When doing so, I am always shocked at how irrelevant the ads are. Similar to @hwayne, many of them are for things I have already purchased, and for which a near-term repeat purchase does not make sense.

                                                                                                    Funniest of all is YouTube, where I consistently get ads in five languages, only two of which I could be said to understand.

                                                                                                    1. 1

                                                                                                      Absolutely! This probably is the biggest secret in the world kept in plain sight. To this day, I’ve never really observed two searches with the same terms from two different google accounts differing in any meaningful way.

                                                                                                    1. 2

                                                                                                      Anyone else think the aardvark desktop background looks like the top bit of a skull peering out of the screen…

                                                                                                      1. 2

                                                                                                        Maybe not a skull, but I could see a girl’s head with a bow on one side, and a little whisp of hair on the other side, looking sideways, kind of like a certain Japanese food company mascot.

                                                                                                        To try and keep it on topic, I still don’t know if I’m sold on GNOME, but I’ll definitely at least try it when 18.04 comes out. There’s a big pile of little things across the interfaces that don’t gel with me, but I could see myself switching away from Cinnamon if they (and/or Wayland) got their HiDPI features working better. I don’t see much hope on Cinnamon’s side for the particular issues I am facing as long as it is still on X, but I put up with those because everything else works so well.

                                                                                                        1. 2

                                                                                                          I’ve been using the latest Gnome 3 at work and Cinnamon at home – just to experiment. Gnome sacrifices function for form and expects users to memorize more keybindings. When you alt-tab it will group windows of the same application – eg. all your terminals are grouped and you have to Alt-` to switch within the group. The window bar default does not show minimize or restore buttons. And the biggest visible difference, the top bar does not show all your windows in Gnome. If you want to know what’s open you either have to alt-tab, or press the super key to bring up the activities menu. The top bar has a lot of unused space – like new Apple products that lack ports and buttons. To contrast Cinnamon shows each window in the top bar – they’re more like thinkpad and a bit less sexy. I’m going to keep using both because I’m an indecisive person.

                                                                                                          1. 2

                                                                                                            There is a gnome3 shell extension to change the alt-tab behaviour back to *normal” and another one to bring minimise/maximise window buttons back.

                                                                                                            1. 1

                                                                                                              When you alt-tab it will group windows of the same application

                                                                                                              It’s behavior from MacOS, I’m using MacOS for about 5 years and still can’t get used to it. However it makes sense there, because focus is applied to application, not window on MacOS. Displayed menu depends on app in focus and you can focus on app without windows. AFAIK, gnome has no such behavior (not tried recent versions).

                                                                                                              The top bar has a lot of unused space – like new Apple products that lack ports and buttons.

                                                                                                              I think it was borrowed from early 2000’s mobile phone UIs, almost all old phones (not smartphones) had similar panel too, usually without clock, but with signal strength, battery level, etc indicators. It looks out-of-context on desktop, nowadays industry is too obsessed with bringing handset controls to workstations. IMHO this panel is most frustrating thing in Gnome 3 UI.

                                                                                                        1. 12

                                                                                                          At one point in my life, I finally got my act together and consolidated the number of email addresses I used regularly from around 10 to 3. One of these was a Gmail account, and I happened to be living in Japan at the time.

                                                                                                          Google has never forgotten this, but isn’t sure that it matters either, as if it can’t make up its mind about what to do with that information. I still occasionally see a お待ちください when authenticating or switching Google services. I have not noticed a pattern as to when this occurs.

                                                                                                          On international travel to non-English speaking countries, my first touch with Google used to send me to google.co.jp. It used do this and display google.co.jp in Japanese. Then for a while it would send me to google.co.jp but have it in English. Now I get the local country TLD, but in English or Japanese, and with an offer to switch to the native language.

                                                                                                          I am not bothered by this, just intensely curious what the actual inputs are to the function that determines what version and language Google sends me to!

                                                                                                          1. 1

                                                                                                            At some point in the early aughts, I told Google I lived in Australia. Like you, for years, it would bounce me through google.com.au when in a new country or doing SSO. At some point in the last handful of years, it has decided I do live in the US, and stopped doing that.

                                                                                                          1. 3

                                                                                                            I remember an exchange somewhere in an episode of The Bikeshed with one host laying out this sort of solution, and contrasting it with having DoerOfThing objects all use a #call method. The other host responded “So then don’t you just want a collection of stateless functions in namespaces?”

                                                                                                            To which the first admitted “Yeah I guess I do want that.”

                                                                                                            I feel similarly.

                                                                                                            Thus far, in $WORK_CODEBASE we avoided some of the issues presented in the article by actively choosing to not use the term “service object”, and instead have several categories for “doer of things” objects, and appropriate naming conventions. For about half of these, we do just use #call, and so far this has not resulted in the apocalypse.

                                                                                                            This does limits the “implicit, undocumented paths” problem, though does not entirely solve it. It is much easier to know where you will find something you are looking for, and to have an obvious answer where new code belongs when implementing new behavior. It is a solid step beyond a junk drawer “services” folder, but falls short of trying to write Clojure in Ruby.

                                                                                                            1. 3

                                                                                                              Sounds about right. I’m stuck with a 2K resolution on a 4K screen and no HDMI sound. Even picked a pricey GPU that’s supposed to be well supported. Can anyone suggest an AMD card that supports the above?

                                                                                                              1. 3

                                                                                                                I currently have an AMD RX580 and use dual 1440p monitors without issue. I have also tested another 2x 1080p simultaneously with those 2x 1440p. All at 60Hz. So it can definitely push the necessary pixels for 4K on Linux. You need a more recent Linux kernel (4.8 or above iirc, I’m on 4.12) for the newer AMDGPU driver. There are some improvements to be made on certain codec playback support (I get occasional tearing on VP9 at 1440p for instance) but ever since the switch to the AMDGPU stack I have a lot of confidence in AMD fixing things as time goes on.

                                                                                                                My previous Nvidia card was supposed to support 2x 1440p, but wouldn’t run the second one at the correct resolution, instead limiting it at some odd resolution of 2160x1200 (iirc?). Would not work in nouveau, would not work in the latest proprietary drivers.

                                                                                                                As for HDMI audio on the RX 580, I am traveling but will try and test when I return home. I don’t know if I have an HDMI audio device though.

                                                                                                                1. 2

                                                                                                                  I believe HDMI audio is still not available ootb until a set of AMD patches (that have been around for quite a while now) are mainlined.

                                                                                                                  https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-Linux-4.15-1

                                                                                                                  1. 1

                                                                                                                    Yeah, HDMI audio with the latest AMD cards got pushed back when their big code dump was refused back in the spring. They’ve been rewriting it to use kernel APIs instead of wrappers ever since & the main code merge was accepted by Dave Arlie a week or two ago IIRC. So, barring some ironing out of wrinkles, 4.15 looks hopeful.

                                                                                                                2. 2

                                                                                                                  I have an R9 390X that drives 3840x2160 + 1920x1080 all at 60Hz in Linux without issue. I’d do some research, though; I don’t even come close to stressing it in Linux, it’s there so the Windows install on that machine can run games.

                                                                                                                  No idea about sound, my monitors are connected over displayport and dvi, respectively, and my speakers are plugged into my sound card.

                                                                                                                  1. 1

                                                                                                                    Even my old intel i915/i5 testing setups can push 60Hz@4K, it’s likely that it’s not about your card but rather about the combination of (GPU, connector, cable and display) or bandwidth saturation. KVMs and similar stuff in between can mess with the negotiation. For 4k@60Hz you want a chain capable of HDMI-2.0 or DisplayPort. It might simply be that Xorg probes the connector, gets the choice of 2k@60Hz or 4k@30Hz and picks the former.

                                                                                                                    AMD cards won’t give you HDMI sound on the open source drivers unless you manually integrate their HAL patches. The relevant fixes are slowly trickling in, and chances are that in 4.15 the support will get there. But really, “recent” features like display-port chaining, event-driven synch like FreeSync etc. all have spotty support and its a gamble if it will work on any given card.

                                                                                                                    1. 2

                                                                                                                      I’m using the DisplayPort cable that came with my monitor. I can set it to 4K but the DE becomes unusably sluggish on both Wayland and Xorg. Thanks for the pointers.

                                                                                                                  1. 1

                                                                                                                    I have a n00b question: With something like sway, do I have to install another windowing system underneath it (like we did with X) or is the Wayland Composer the whole GUI package itself?

                                                                                                                    1. 1

                                                                                                                      Please excuse the late reply. Also, Wayland is not currently my daily display server.

                                                                                                                      However, from my limited use and knowledge, the traditional divide between Window Manager and Desktop Environment that we are used to in X-based environments does not look the same in Wayland. From what I have read, it will be more common to build them monolithically. This is just the sense I have gotten from reading about various Wayland compositors and window managers, though I am not aware of the specific technical details as to why.

                                                                                                                      So sway would be used in a standalone manner, providing both a compositor and window manager. This as opposed to being able to use, say Openbox as the window manager for XFCE or i3 as the window manger for for GNOME.

                                                                                                                      And now that I say that, since it has been possible in X-GNOME to replace its window manager, I wonder how GNOME in Wayland is constructed differently to either allow or disallow this?

                                                                                                                    1. 3

                                                                                                                      First, nobody forces anyone to buy a macbook. (I don’t want to rant). I can recommend Thinkpad keyboards, especially the one of my X1 Carbon 5h. Gen, except that you then have to deal with HiDPI on Linux which is no fun. Second, the website is not made for fast scrolling, it looks totally broken if I scroll to the bottom of the page, possibly because of some fancy lazy loading.

                                                                                                                      1. 7

                                                                                                                        except that you then have to deal with HiDPI on Linux which is no fun

                                                                                                                        But it is currently improving very quickly. I am running the latest stable GNOME on Wayland on Arch with 2x scaling (fractional scaling is still experimental) and most stuff seems to work now. I am using a MacBook Pro most of the day, but Linux has really gone from years behind to close enough to be usable in just a year.

                                                                                                                        (I hear that X.org is a different story altogether, no different scaling for different displays.)

                                                                                                                        Second, the website is not made for fast scrolling, it looks totally broken if I scroll to the bottom of the page, possibly because of some fancy lazy loading.

                                                                                                                        And the moving wrinkles are as annoying as the <blink> tag.

                                                                                                                        1. 3

                                                                                                                          HiDPI worked ok on Xorg at least two years ago, at least until you plugged in a low-DPI screen, because it could not run them in different modes.

                                                                                                                          And I quite dislike the 2x scaling. In 1x everything is too small, in 2x everything is way too large. I ended setting GNOME to 1x and Firefox to scale 1.6x which worked ok.

                                                                                                                          1. 3

                                                                                                                            latest stable GNOME on Wayland on Arch

                                                                                                                            I’m experiencing quite the opposite, in fact I switched to Cinnamon until this scaling issue is fixed.

                                                                                                                            Everything is fine unless you use two displays with different scaling (even when you use only one of them). Say for example you have an external monitor with normal DPI and a HiDPI laptop display then the window borders/icons and probably something else is scaled two times on the external display even when the laptop lid is closed, ignoring the scaling factor which is set.

                                                                                                                            I hear that X.org is a different story altogether, no different scaling for different displays

                                                                                                                            Yes, this feature will only be available for Wayland.

                                                                                                                            1. 2

                                                                                                                              Did Cinnamon fix that problem for you?
                                                                                                                              I use Cinnamon and still have that issue, but it’s entirely possible I am just missing something.

                                                                                                                              1. 3

                                                                                                                                Not entirely, i.e. it can’t scale each display differently but the window borders respect the scaling factor in contrast to Gnome where they follow the scaling of the highest DPI screen (even when it is turned off).

                                                                                                                            2. 2

                                                                                                                              idk about different scaling for different displays, but I have one single 1.5x scale (4K) display, and just adding Xft.dpi: 144 to ~/.Xresources made everything look pretty much perfect in Xorg.

                                                                                                                            3. 2

                                                                                                                              just got the 5th gen x1c (wqhd) and am very happy with it. I disabled scaling though and use i3. Some stuff still seems messed up (vlc is HUGE, i don’t know if it’s still scaling or the scaling factor reset on reboot or something).

                                                                                                                              I just increase the font size on firefox and in the terminal and feel fine without scaling.

                                                                                                                            1. 10

                                                                                                                              We use LaunchDarkly for feature flagging so we can do contained rollouts and testing of new beta features

                                                                                                                              We use Optimizely for A/B testing

                                                                                                                              Surely there are libraries for many languages and web frameworks for doing that? For example

                                                                                                                              I can understand using Pusher (even though there’s a lot of open source self-hosted solutions for that as well), but A/B testing and feature rollout? Why are these things even offered as-a-Service?

                                                                                                                              I don’t understand this “use 3rd party services for everything” mentality. Downloading a library is easier than creating another goddamn account.

                                                                                                                              1. 4

                                                                                                                                They are offered as a service because you have the library wrapping your feature, but can inevitably end up with lots of supporting infrastructure. By supporting infrastructure, I mean things like feature group management, automating roll out of the feature to a larger cohort etc. If your support team needs to replicate a customer issue they might need to be able to report on users that have a feature flag, and ensure they see the exact same feature set too. In many cases you don’t need all this, but some people do.

                                                                                                                                For others though, having it as a service can be an easy way to adopt feature flags, although in practice they could probably have achieved the same result as your approach. The founders of LaunchDarkly and CircleCI produce a podcast (https://www.heavybit.com/library/podcasts/to-be-continuous/), so it’s unsurprising that they use eachother’s products.

                                                                                                                                1. 2

                                                                                                                                  I can understand using Pusher (even though there’s a lot of open source self-hosted solutions for that as well), but A/B testing and feature rollout? Why are these things even offered as-a-Service?

                                                                                                                                  Different companies have differing amounts of engineering resources, different patterns to their revenue (e.g. to hire more engineers… or not), and different levels of legacy cruft in their products. Stemming from these differences, and especially for anything infrastructure- or process-related, the “build vs buy” conversation will also differ greatly between companies.

                                                                                                                                  I have had this same conversation with people regarding Heroku and SendGrid. That is, I know people who cannot fathom why anyone would need (or want) to pay for that category of PaaS in that way. Meanwhile, I shudder to imagine how much more difficult my company would have had it without them.

                                                                                                                                  1. 1

                                                                                                                                    It’s more “download vs buy” here. For trivial stuff like A/B testing and feature flags, integrating a 3rd party service isn’t significantly easier than adding a library.

                                                                                                                                    Heroku and SendGrid

                                                                                                                                    That’s why I said “I can understand using Pusher”. That kind of stuff is actual infrastructure than needs maintenance, yeah.

                                                                                                                                    1. 2

                                                                                                                                      Curious: What library are you referring to when you mention of A/B testing, and what does it provide?

                                                                                                                                      Followup: Have you used Optimizely? I am not currently a customer, but when I was, I found it impressive. I would not be able to implement the same level of tooling, WYSIWYG DOM editing, analytics integrations and reporting for less money (the cost of my time) than their subscription costs. Not that simpler needs could not be met with a simpler solution, but if you need what they offer, Optimizely is not a service without its value.

                                                                                                                                      1. 1

                                                                                                                                        I linked to https://github.com/ankane/field_test in the original comment, of course there are lots more for different web frameworks and stuff.

                                                                                                                                        WYSIWYG DOM editing

                                                                                                                                        That sounds horrifying.

                                                                                                                                        1. 2

                                                                                                                                          Quick edit: First off, thanks for pointing out the link!

                                                                                                                                          That sounds horrifying.

                                                                                                                                          I thought so too, at first, but it’s not.
                                                                                                                                          Not entirely, anyway. I of course then thought “but what if you’re using some SPA framework?” and, to my surprise, there was an answer for that, and it wasn’t a bad one. I’m speaking beyond my minor experience, but I suspect it messes with load times a bit, and might not be something to layer on top of, say, a Rails app that already struggles with bad load times. But if you’ve already got a snappy site, Optimizely probably isn’t going to hurt, and might make a marketing team feel like they have freakin’ super powers.

                                                                                                                                          I have seen things like Optimizely and Infusionsoft give marketing teams amazing productivity boosts that the company’s product engineering team would be hard-pressed to match, and arguably shouldn’t try to match. Especially if it would distract them from their central product and serving their primary/external users needs better.

                                                                                                                                          Through quirks of the current labor market, software engineers command higher salaries than rank-and-file-but-sophisticated digital marketers (though at the top-of-the-top they even out). This leads software engineers, myself included, to assume that our higher pay means we are more important to a company’s goals in some absolute sense. This is not true, and if a company happens to have an engineering team of 5, and a marketing team of 20, distracting those 5 engineers to have them build and maintain a tertiary A/B-testing framework that can match Optimizely, versus enabling those 20 marketers to do more in less time, can make the latter look very appealing.

                                                                                                                                  2. 1

                                                                                                                                    Feature flagging seems a bit extreme to me.

                                                                                                                                  1. 12

                                                                                                                                    And for all of this hard work, what are we going to get? … Fractional display scaling

                                                                                                                                    This feature alone has me watching this project closely now. I look back at my history in the wide world that is desktop Linux, and it is one of only two issues I still find outstanding from darker days, when children were forced to work underground, turning the big wheels by hand. When WiFi was a blessing known to few, when both Xorg and ALSA needed reconfiguring on a regular basis.

                                                                                                                                    That past seems so distant now, barely a memory, until I need displays with differing DPIs or need my desktop scaled to non-integer values.