1. 3

    I initially thought it’ll let you download a ZIP with MP3/FLAC/OGG/OPUS/ as a backup, Would be nice for someone who want to move out from Spotify, as you can’t actually play the JSON file or even import it somewhere else.

    (disclaimer: I don’t really care about these “piracy issues” which people likely want to bring on there)

    1. 6

      I will point out that it’s near trivial to bypass the Spotify DRM with Panda. There’s a post i’ll try to dig up.

      https://moyix.blogspot.com/2014/07/breaking-spotify-drm-with-panda.html

      1. 4

        Yeah, now that I think of it I should have called it export rather than backup, or something like that…

        1. 2

          You used to be able to do that with C SDK[1].

          [1] https://github.com/mopidy/libspotify-archive (archive because the files aren’t hosted by Spotify anymore)

          1. 2

            I used to use something like that for a Spotify competitor in the very early days of streaming music. It was fantastic.

          1. 38

            Rust.

            The dev experience is so much nicer than my usual C/C++. After spending a lot of time writing and doing code reviews of C, C++, and rust, I am pretty convinced that it is much easier to write correct code the first time in rust than it is in the others, and rust has equally nice performance properties but is much easier to deploy.

            I spend most of my day working on high performance network software. I care about safety, correctness, and performance (in that order). The rust compiler pretty much takes care of the first item without any help from me, makes it very easy to achieve the second one, and is just as good as the alternatives for the third.

            1. 6

              I’m curious if you’ve ever tried another — non C/C++/Rust — language (anything garbage collected or dynamically typed) for projects where you don’t necessarily care about the fastest runtime? Is that ever relevant, or do you really only work on “high performance network software”?

              1. 8

                I work in games, and my experience is very similar to mortimer. I would go rust with no hestitation.

                I’ve done a lot of C# with Unity, and quite a bit of Go. I’d pick Rust over both of them any day of the week.

                The big thing with C# in games is that you lack control, and also have to do generally more memory management than even C++, working around the garbage collector is not fun.

                1. 7

                  Sure, there is some stuff where performance doesn’t matter too much, and for those we’re free to choose something else. Python is pretty popular in this space, though even for these things I’d still consider using Rust instead just because the compiler makes it harder to screw up error handling and such.

                  I did a transparent network proxy in ruby once, and that was super nice because ruby is super nice, but if I were to do it again today then I’d pick Rust. Most of the code wasn’t something you’d get from a library, and the vast bulk of bugs I had to handle would have been squashed by a better type system (this thing that is usually a hash is suddenly an array!) and better error handling (this thing you thought would work did not, and now you have a nil object!). Ruby (also python) just don’t help you at all with these things because it’s dynamically typed and will usually return nil to indicate error (or python will sometimes throw, which is just offensive). This paradigm where the programmer has to manually identify all the places where errors can happen by reading the documentation, and then actually remember to do the check at runtime is really failure prone - inevitably someone does not remember to check and then you get mystery failures at runtime in prod. Rust’s Result and Option types force the programmer to deal with things going wrong, and translate the vast bulk of these runtime errors into compile time errors (or super-obvious-at-code-review-time unwrap()s that you can tell them to go handle correctly).

                  I haven’t really done any professional Java dev, but the people I know who do Java dev seem happy with it. They don’t have any complaints about performance - and they deploy in places where performance matters. When they do complain about Java, they complain about the bloat (?) of the ecosystem. FactoryFactoryFactories, 200 line backtraces, needless layers of abstraction, etc.. I don’t think they’re looking to change, so they must be happy enough. When I did Java in school I remember lots of NullPointerExceptions though, so I assume the same complaint I have about ruby / python / C / C++ error handling would apply to Java.

                  For personal projects, it was usually ruby (because ruby is super nice), but lately all the new stuff is Rust because the error handling is so much better and it’s easier to deploy. Even when I don’t care about it being fast I do care about it being correct.

                2. 1

                  Another reason: Attract good developers!

                  That’s the flipside of all the good techical reasons, plus actually some of the bad - learning curve and newness.

                  There are too few Rust and Haskell jobs, ok many C and C++ jobs, and absurdly many Java jobs.

                  1. 11

                    In order to validate the ‘learning curve for newbies’ concern, I actually gave Rust to a new employee (fresh out of uni) to see what would happen. They had a background in Java and hadn’t heard of Rust before then. I gave them a small project and suggested they try Rust, then sat back to see what happened. They were productive in about a week, had finished the project in about two weeks, and that project has been running in production ever since without any additional care or feeding for over a year now. This experience really cemented for me that Rust isn’t that hard to learn, even for newbies. The employee also seemed to enjoy it (this is a bit of an understatement), so if new staff can be both productive and happy then I’m not too concerned about learning curves and stuff.

                    1. 4

                      Vast majority of people that write about Rust online mention fighting the borrow checker. Your new folks didn’t have that problem?

                      1. 8

                        Having helped both a few co-workers and a fresh intern with answering rust questions as they learned it, I’ve come up with a theory: Fighting the borrow checker is a symptom of having internalized manual memory management in some previous language before learning rust. And especially severe cases of it is from having internalised some aspect of manual memory management wrong. People who don’t have that are much more likely to be open to listening to the compiler than people who “know” they’re already implementing it right & they just need to “convince the compiler”.

                        1. 8

                          I find that I can often .clone() my way out of problems for now and still be correct.

                          Sometime later I can revisit the design to get better performance.

                          1. 4

                            Oh yes, new people fight the borrow checker but it just isn’t that bad (at least not in my experience) and they seem to get past it quickly. The compiler emits really excellent error messages so it’s easy to see what’s wrong, and once they get their heads around what kinds of things the borrow checker is concerned about they just adapt and get work done.

                            1. 3

                              I felt that I wasn’t fighting it. It was difficult, but the compiler was so helpful that it felt more like the compiler was teaching me.

                              (That said, I was coming from Clojure, which has terrible compilation errors.)

                              1. 1

                                Not sure about his employee’s perspective. But, I’m new to writing in Rust, and I think the frustration with the borrow checker is not understanding (or maybe just not liking?) what it is trying to do. My experience has been that at first I wanted to just try to build something in Rust and work through the documentation as I go. In that case the borrow checker was very frustrating and I wanted to just stop. But, instead I worked my way through the Rust book and the examples. Now I’ve picked up the project again, and it isn’t nearly as frustrating because I understand what the borrow checker and ownership stuff is trying to do. I’m enjoying working on the project now.

                              2. 2

                                This experience really cemented for me that Rust isn’t that hard to learn, even for newbies.

                                Counter anecdota – we have a team at $job that works entirely in rust, and common complains from the team are:

                                1. The steep learning curve and onboarding time for new team members
                                2. The Very Slow compile times

                                We aren’t hiring many folks direct from uni though – so perhaps counter-intuively, having more experience in other languages may make learning rust more difficult for some, and not less? Unsure.

                          1. 21

                            Catalina runs best on Macs with hardware specifications that Apple marketing isn’t yet prepared to make the baseline for models such as the iMac.

                            So MacOS Catalina is like Windows Vista?

                            1. 7

                              Yes. Having been a Windows user at that time, all I feel are unpleasant flashbacks.

                              1. 2

                                In that case, on the upside macOS in 2-3 years is going to be absolutely fantastic for 5-7 years!

                                1. 3

                                  You jest but I’m looking forward to it.

                                  1. 3

                                    And then it will be cursed to become a user-hostile ad platform that you have to pay for, until the end of time.

                                2. 1

                                  Using any new piece of software triggers roughly two dozen security prompts, so yes.

                                1. 1

                                  This is a good intro and a decent play to start with templating k8s. We’ve been doing similar things for a while now, but recently we’ve been moving towards https://helm.sh/ Which takes care of most of this for us.

                                  We have our charts which live inside the repo with each microservice, then we have deploy-* git branches on that repo. The chart is templated, and we have “values” yaml files for each branch. When our CI/CD detects a change on one of those branches it builds, and then deploys to the namespace specified by the branch name “deploy-prod” -> “prod.values.yaml”.

                                  It’s been absolutely fantastic so far, though I can see that there’s still a lot of room for improvement.

                                  1. 4

                                    Anyone have a snippet of the kind of code that C2rust ends up generating? Would be interesting to see how much work cleanup would end up being

                                    1. 5

                                      I did a fairly deep investigation but it was a while ago, the tools have probably changed since: https://wiki.alopex.li/PortingCToRust

                                      1. 4
                                        1. 4

                                          Not sure if the website is being kept still up to date, but www.c2rust.com let’s you try it online. The code is pretty un-idiomatic (using unsafe points instead of references and so on), but note that there is also a refactor step being actively worked on. Based on the video, it doesn’t look like they used that here, but this is where the code lives: https://github.com/immunant/c2rust/tree/master/c2rust-refactor.

                                          Full disclosure: I used to work on this, but I’ve not kept up with developments from the past few months.

                                          1. 2

                                            Here’s dwm converted with it.

                                            1. 2

                                              You can see yourself. There’s an online translator: https://c2rust.com/

                                              Rust intentionally tries to discourage use of raw pointers and pointer arithmetic by not having a syntax sugar for them, so directly translated C code ends up very ugly.

                                              It starts looking OK only after you disambiguate pointers into proper references/slices/optionals. In C it’s not clear whether a pointer argument to a function means 0 or 1, exactly 1, or N elements. Rust has separate types for these cases, and syntax sugar and safety comes with them.

                                              1. 1

                                                It’s a start though! I’d rather start from there, and refactor towards idiomatic than start from scratch in some cases.

                                            1. 11

                                              On the rust side I use cargo-deny to block unwanted licenses. It’s great.

                                              1. 2

                                                This is great and should exist for every tool. Next, generalize it and allow random code quality and open/closed PR metrics and anything else you can think of…

                                              1. 6

                                                I wish this were a github repo or such. I would love to contribute a bit more. Would be interested in seeing [idiomatic modern] C++.

                                                Would be also cool to see the assembly output (where possible) of each.

                                                Here’s Rust’s:

                                                https://godbolt.org/z/uqFRP7

                                                Looks like O3 does slightly better than Os

                                                1. 3

                                                  Godbolt shows far fewer syscalls than both u/ddevault’s and u/soptik’s results, I don’t understand what’s going on here; any insight anyone?

                                                  1. 2

                                                    How do you figure? There’s basically just a call to std::io::stdio::_print, but it probably does a bunch of syscalls inside there.

                                                    If there is a difference it’s likely because godbolt is compiling it as a library rather than a binary

                                                    1. 2

                                                      Doh, I misunderstood the output

                                                  2. 2

                                                    I would be curious about Java with Graal…

                                                  1. 8

                                                    Nice, number of syscalls is a pretty interesting indirect metric for how much STUFF is going on behind the scenes, even for a short-lived program. I don’t see this as a performance metric, just complexity. I want to play with the the Rust example sometime, and I want to see how Nim stacks up so I should try that too; anyone have any other suggestions for languages to try? Non-JIT implementations by preference, to keep apples to apples.

                                                    1. 6

                                                      Note about the rustc command:

                                                      rustc -C opt-levels=s test.rs

                                                      should be:

                                                      rustc -C opt-level=s test.rs

                                                      1. 2

                                                        Yeah, and I also wanted to compare debug vs release mode. Looks like someone beat me to it though.

                                                        1. 2

                                                          Yep that and the C version has a subsequent strip invocation but the Rust one doesn’t.

                                                        2. 3

                                                          number of syscalls is a pretty interesting indirect metric for how much STUFF is going on behind the scenes, even for a short-lived program

                                                          Not really. Setup and teardown might take a while (relatively–even 100 syscalls is basically nothing), even if runtime is very lightweight and optimized.

                                                        1. 3

                                                          I’m currently on a system76 oryx pro 15”

                                                          I’m missing my custom built AMD Threadripper with a GTX 2070/2080 and 64GB of ram though!

                                                          1. 3

                                                            Compile speed is one of my largest complains about Rust. These are good improvements but it’s still so far from where I’d like it. :(

                                                            My tonic/tower/tokio project with ~300 LOC takes about 3 minutes to build if I touch one leaf file not referenced elsewhere. The equivalent in Go would take less than 1 minute. My project is still tiny, I worry about what happens in 2, 3, 5 years. I work with C++ that takes over an hour for a full rebuild, but even touching just one file compiles and links quicker than my 300LOC Rust binary.

                                                            1. 1

                                                              It is consistently improving. There are tools, such as cargo check, RLS and listing to help as well.

                                                              The only time I really have an issue is when the codebase is so performance sensitive that I have to use release builds.

                                                              1. 1

                                                                Have you used Go or D (or even C)? I found you get spoiled by the speed there.

                                                              2. 1

                                                                ~300 LOC takes about 3 minutes to build if I touch one leaf file not referenced elsewhere.

                                                                Is this common? I didn’t realise Rust was that much slower than C++.

                                                                1. 4

                                                                  This is not only the compiler. Some ecosystems rely extremely on generics for modularity. Those are rolled out and compiled the moment all generic parameters are resolved, which is often delayed to the final program. This also leads to a lot of code being rolled out and optimised by the LLVM. Touching that program will lead to all that code being rolled out again.

                                                                  Tools like cargo-bloat can show that effect.

                                                                  rustc is not fast, but not that slow. But if you are actively asking for it to do a lot of work, you will get it.

                                                                  This is, btw., one of the reasons I’m not using the tokio stack.

                                                                  1. 1

                                                                    And to clarify for those not well versed in Rust, the problem with generics is only for functions/types that must be monomorphized. Rust gives you the option of choosing between monomorphized generics and VTable generics. The former often give better runtime performance at the cost of compile times. Libraries that use monomorphized generics heavily can dramatically degrade compile times, similar to how template heavy C++ has poor compile times.

                                                                    1. 1

                                                                      Touching that program will lead to all that code being rolled out again.

                                                                      Sure, but only for the touched file’s compilation unit, right? So it’s that and linking the executable that takes 3 minutes.

                                                                      I have a template-heavy (stdlib and my own) C++ project here, consisting of multiple libs and executables and ~60,000 lines of C++ which all compiles and links from scratch in just over 4min on a computer from 2011. There’s a huge difference between that and a 300LOC program which takes 3min to do an incremental build.

                                                                      Edit: excluded test LOC because I didn’t compile those when I timed the build.

                                                                      Edit2: I guess this is really all moot because I’m sure there are benchmarks comparing apples to apples but even so, 300LOC is just tiny which is why I am so surprised.

                                                                      1. 1

                                                                        It’s 300 LOC but using a lot of libraries, it may end up being 60k LOC in the end. The big difference is it’s 300 LOC with tens of thousands of essentially heavy template code underneath. It’s also only using ld, lld apparently speeds this up massively, and there’s seemingly plans to migrate rustc that direction. I’m also running it via WSL2, so I’m going to look at how it differs natively.

                                                                        1. 1

                                                                          It’s 300 LOC but using a lot of libraries, it may end up being 60k LOC in the end.

                                                                          I was actually compiling 60KLOC from scratch though. And that 60K uses lots of third-party templates. If I included third-party templates I would have much more than 60KLOC!

                                                                          I’m also running it via WSL2, so I’m going to look at how it differs natively.

                                                                          This sounds like it might make a difference.

                                                                1. 1

                                                                  Me and Angelo Pesce both ended up with basically the exact same toolset and he described it in great detail here:

                                                                  http://c0de517e.blogspot.com/2011/04/2011-tools-that-i-use.html

                                                                  1. 5

                                                                    Javascript: Javascript developers spend so much time reinventing the wheel that they do have some interesting wheels.

                                                                    1. 13

                                                                      I was really confused about what was supposed to complete that sentence. After trying “John Carmack” and “admin@gmail.com” I finally figured it out by putting in “google” and getting an unrelated result:

                                                                      @font-face in CSS allows to include your own fonts inside an email.

                                                                      Of course, the really obvious guesses in this category of “bold”, “italics”, and “colors” don’t give any results either. I’m really questioning the primary presentation of this information. It seems to be much more suited to list format like on the features page.

                                                                      1. 2

                                                                        I still have no idea what this site is all about.

                                                                        1. 6

                                                                          It’s pretty much the same as [caniuse.com] (https://caniuse.com/) - website for frontend developers which lists browser compatibility for various CSS/Js features. Except this is not compatibility with browsers but email clients.

                                                                        2. 1

                                                                          I spent like 2-3 minutes on there before giving up… Still lost.

                                                                          1. 3

                                                                            I spent like 2 minutes thinking about it and then finally guessing it might be about which HTML/CSS features are understood by email clients.

                                                                            But only because I had to spend hours to do this, years ago.

                                                                            It’s really, really badly communicated

                                                                        1. 2

                                                                          The link to the Rust implementation goes to the Racket one. I also think it’s super disingenuous to say “Implementation in *” and end up on a github ticket hoping that someone creates one. Rubbed me the wrong way.

                                                                          1. 1

                                                                            100% Agree! Just pushed fixes for both of those things. A big challenge right now is how to help people build implementations in different host languages. Having a few calls per week now with people interested in doing that and so I figured step 1 was to start adding links so people can start to see what the future will look like once there are more libraries.

                                                                            Thanks! Very helpful.

                                                                            1. 2

                                                                              Yeah, even if it just said “Help Wanted: Rust implementation” I would have been more okay with it

                                                                            1. 5

                                                                              Does Barry have his own email address?

                                                                              1. 5

                                                                                He does!

                                                                              1. 17

                                                                                I’ve been a hiring manager / engineering director in San Francisco for a number of years and I’ve talked a lot with people who’s job it is to set engineering compensation.

                                                                                This is mostly my own speculating and reasoning it out. So sorry, won’t be citing any sources.

                                                                                Much of what you’re seeing is really the top companies, especially FAANG and those trying to compete with them for engineers. This is especially true in the Bay Area where there are a lot of engineers, but still a limited number that live there or are willing to relocate. The housing costs are a big deterrent to relocating. Everyone is hiring.

                                                                                There is another tier of companies that doesn’t pay as well as these.

                                                                                In those top companies, they generally have to recruit engineers from other companies, and candidates often have multiple offers. They index their compensation against each other. So it’s a bit of an arms race. If another company is willing to pay your engineers more, you need to match it or risk losing them.

                                                                                Generally it’s a labor shortage, combined with easy Venture Capital, but also a set of businesses that have or have potential for great profit and revenue with high margins.

                                                                                One thing we’re seeing is a push to hire remote engineers, elsewhere in the US or even outside of the US. I think this is because we’ve finally run compensation up to a level that is hard for businesses to bear. And everyone uses video conferencing and things like Slack now.

                                                                                Generally for more senior engineers in the US, they can demand Bay Area compensation even when remote. More junior are going to take a hair cut on Bay Area compensation.

                                                                                1. 16

                                                                                  I’m talking with a friend of mine right now who is moving from Google in SV at ~$250k USD to Google Montreal at ~$230k CAD (~$170k USD). (Total comp with stock/bonus)

                                                                                  While $250k USD in SV is great, you’re still living in an overpriced rental, you just feel mid-upper class. But $230k CAD in Montreal though is completely different. You’re basically “the 1%”, you can buy what ever place you want, you can go to the fanciest restaurants often, etc.

                                                                                  My friend is going from a rather miserable place he hates, to his home city and while he took a comparable pay cut, he’s gaining a much better QOL and Google just saved $60-70k USD on a single employee.

                                                                                  The real question ends up being where you want to end up in the long run. I was in a similar boat making ~$170k CAD ($130k USD) (base pay, no bonus/comp) working remote from Toronto, which was awesome a comparable position locally would have got me around $120k CAD. I had an amazing downtown penthouse condo, my QOL was generally great. But I wasn’t going to live in Toronto forever, my partner lives in the US, and we’ll likely end up in the US for at least the next 5-30 years. My $170k CAD salary was a huge hindrance if we were wanting to buy a place in one of our choice cities: Seattle, Boston, DC, NYC, etc. All of which are more expensive than Toronto. I’m in Seattle now and while I comparably make a lot more my QOL dropped a fair bit, I now live on the 2nd floor of a ~6 story rental building, paying the same percentage of my income towards rent as I was for my Toronto penthouse. (So really a lot more than I was paying for my Toronto place.) But if I were to return to Toronto I’d just straight up have more cash.

                                                                                  The trade offs are interesting.

                                                                                  1. 1

                                                                                    My friend is going from a rather miserable place he hates, to his home city and while he took a comparable pay cut, he’s gaining a much better QOL and Google just saved $60-70k USD on a single employee.

                                                                                    Glad to hear that your friend is choosing their own happiness over money, even if it worked out with QOL. Also glad to hear that someone aside from myself detested SV—most people there make fun of everywhere that’s not California. I’m extremely happy I don’t live there anymore.

                                                                                    I’m in Seattle now and while I comparably make a lot more my QOL dropped a fair bit

                                                                                    Interesting to hear that Seattle is more expensive than Toronto! That goes against what I assumed. I’m actually in the inverse boat—due to circumstances surrounding my partner we’ll likely end up moving from Seattle to Canada in the next few years. I love the PNW, but Vancouver seems even worse than Seattle at this point QOL-wise.

                                                                                    1. 2

                                                                                      Also glad to hear that someone aside from myself detested SV—most people there make fun of everywhere that’s not California. I’m extremely happy I don’t live there anymore.

                                                                                      I didn’t realize how little I liked the Bay Area until I moved to Toronto. Obviously, there’s a lot of California that I miss, but it’s really nice to not hate my working life any longer.

                                                                                1. 15

                                                                                  Summary to avoid having only the annoyingly clickbaity title:

                                                                                  Mike presents some broad, sweeping, and perhaps unfair, generalizations about programmers in the industry. He then shares his expectations for what it would mean to strive to be among the very best programmers in the field. Specifically the technical, individual and team skills required for any programmer to solve the hard problems before them. For those programmers where good enough just isn’t, and that want to take control of their own learning and careers, but just need to know what their next steps should practically be to have a bigger impact.

                                                                                  1. 6

                                                                                    I agree with that summary and wish I hadn’t watched the video. It can be summarized as ‘list of things I think, without much justification, that people should do’. Some of those are very reasonable; others, much less so.

                                                                                    1. 6

                                                                                      Could you elaborate on that? By contrast, I agreed with all of the 50 or so points Acton makes in his talk, and wished that I worked regularly with engineers that showed that maturity.

                                                                                      1. 5

                                                                                        I can articulate precisely what problem I am trying to solve.

                                                                                        I have articulated precisely what problem I am trying to solve.

                                                                                        I have confirmed that someone else can articulate what problem I am trying to solve.

                                                                                        I can articulate why my problem is important to solve.

                                                                                        I can articulate how much my problem is worth solving.

                                                                                        Great!

                                                                                        I have a Plan B in case my solution to my current problem doesn’t work.

                                                                                        I have already implemented my Plan B in case my solution to my current problem doesn’t work.

                                                                                        Waste of energy, imo, unless you’re time-constrained (like he says, you have to ship a demo for e3/whatever). Absolutely, you should think about if your solution is the best one, but going so far as to implement another one is just a waste. Make a second one if the first one doesn’t work. Or, as joel sposky says, don’t even do that, fix the solution until it works.

                                                                                        I can articulate the steps required to solve my current problem.

                                                                                        I can clearly articulate unknowns and risks associated with my current problem.

                                                                                        I have not thought or said “I can just make up the time” without immediately talking to someone.

                                                                                        Great!

                                                                                        I write a “framework” and have used it multiple times to actually solve a problem it was intended to solve.

                                                                                        Disagree. If you have written a framework, great! If you have written a framework, then you should actually use it and make sure it solves a problem. But no reason to write a framework if you never have any need for one; otherwise, you’re writing a bunch of code but are unable to articulate the problem that it is trying to solve :)

                                                                                        I can articulate what the test for completion of my current is.

                                                                                        I can articulate the hypothesis related to my problem and how I could falsify it.

                                                                                        Great!

                                                                                        I can articulate the (various) latency requirements for my current problem.

                                                                                        Very domain-specific, imo. Latency is not relevant to most developers, really only to gamedevs and HFT. Otherwise you’re wasting money (generally, developer-hours are cheaper than server-hours).

                                                                                        I can articulate the (various) throughput requirements for my current problem.

                                                                                        Ditto. Throughput is slightly more of a broad problem than latency, but not by much.

                                                                                        I can articulate the most common concrete use case of the system I am developing.

                                                                                        Great!

                                                                                        I know the most common actual, real-life values of the data I am transforming.

                                                                                        Why? This is useful if tuning for performance, but aside from that you have to correctly handle any values within the range you accept (and generate a type error if passed values outside that range), so what’s the point?

                                                                                        I know the acceptable ranges of values of all the data I am transforming.

                                                                                        I can articulate what will happen when (somehow) data outside that range enters the system.

                                                                                        He makes reference to filesize exceeding working memory. Honestly—yes, this is good ui, but if I’m a function opening a file then I should assume that I’m allowed to open that file and that the ui has done the job of saying ‘that file is too big’. Otherwise, code tends to get ugly and crashing is actually fine because if that’s gotten past the ui then you already have a bug.

                                                                                        I can articulate a list of input data into my system roughly sorted by likelihood.

                                                                                        I know the frequency of change of the actual, real-life values of the data I am transforming.

                                                                                        Again, why? Aside from performance, there’s no real reason to think about this.

                                                                                        I have (at least partially) read the (available) documentation for the hardware, platform, and tools I use most commonly.

                                                                                        This would be great, but lacking it isn’t a deal-breaker imo.

                                                                                        I have sat and watched an actual user of my system.

                                                                                        I know the slowest part of the users of my system’s workflow with high confidence.

                                                                                        I know what information users of my system will need to make effective use of the solution.

                                                                                        Amazing!

                                                                                        I can articulate the finite set of hardware I am designing my solution to work for.

                                                                                        I can articulate how that set of hardware specifically affects the design of my system.

                                                                                        I have recently profiled the performance of my system.

                                                                                        I have recently profiled the memory usage of my system.

                                                                                        I have used multiple different profiling methods to measure the performance of my system.

                                                                                        I know how to significantly improve the performance of my system without changing the input/output interface of the system.

                                                                                        Again, this is very domain-specific and doesn’t make sense outside of gamedev.

                                                                                        I know specifically how I can and will debug live release builds of my work when they fail.

                                                                                        I know what data I am reading as part of my solution and where it comes from.

                                                                                        I know how often I am reading data I do not need as part of my solution.

                                                                                        I know what data I am writing as part of my solution and where it is used.

                                                                                        I know how often I am writing data I do not need to as part of my solution.

                                                                                        Great!

                                                                                        I can articulate how all the data I use is laid out in memory.

                                                                                        Domain specific…

                                                                                        I never use the phrase “platform independent” when referring to my work.

                                                                                        I never use the phrase “future proof” when referring to my work.

                                                                                        This is a very nice theory. In practice, it’s about as useful as saying that c isn’t turing-complete—technically true, but really doesn’t tell you anything very interesting about what you can do. ‘Platform independent’ and ‘future-proof’ don’t mean ‘this will work on any platform at any time at all’. They mean ‘this is not so tied to the baggage of one platform that it would be difficult to port it to another platform similar to the ones we know about’.

                                                                                        I can schedule my own time well.

                                                                                        I am vigilant about not wasting others’ time.

                                                                                        I actively seek constructive feedback and take it seriously.

                                                                                        I am not actively avoiding any uncomfortable (professional) conversations.

                                                                                        I am not actively avoiding any (professional) conflicts.

                                                                                        I consistently interact with other professionals, professionally.

                                                                                        I can articulate what I believe others should expect from me.

                                                                                        I do not require multiple reminders to respond to a request or complete work.

                                                                                        I pursue opportunities to return value to the commons (when appropriate.)

                                                                                        Great!

                                                                                        I actively work to bring value to the people I work with.

                                                                                        I actively work to ensure underrepresented voices are heard

                                                                                        Seems antithetical to a strong work-life separation.

                                                                                        1. 4

                                                                                          I can articulate the (various) latency requirements for my current problem.

                                                                                          Very domain-specific, imo. Latency is not relevant to most developers, really only to gamedevs and HFT. Otherwise you’re wasting money (generally, developer-hours are cheaper than server-hours).

                                                                                          I can articulate the (various) throughput requirements for my current problem.

                                                                                          Ditto. Throughput is slightly more of a broad problem than latency, but not by much.

                                                                                          This is a game-specific conference talk, but I still feel like these are applicable to most developers, even if performance isn’t important as productivity in your domain. Eventually the attitude that these are irrelevant catches up and you have work to undo problems. Latency can be a problem for the user experience with SPA web apps. Being able to explain how your work might impact the latency of the user experience can be very helpful.

                                                                                          1. 1

                                                                                            In most cases, it’s a waste of time to start off by thinking about this. Sounds like premature optimization. If your SPA is slow, then you can profile it, look for problems, fix it. Don’t intentionally write your code awfully, but latency should be the last thing on your mind unless it becomes a problem.

                                                                                            1. 6

                                                                                              Well then, it seems like it should be easy to think about then. “I’m writing a non-interactive command line application, latency is irrelevant”. There, you’ve articulated the latency requirements. Knowing what the requirements are doesn’t equate to premature optimization.

                                                                                              That said, I’m never going to write ls in clojure, because it would take ten seconds to start and that’s annoying. Latency requirements tend to be hidden under assumptions.

                                                                                          2. 3

                                                                                            In addition to what you wrote, I would actually quite strongly disagree with the seemingly straightforward:

                                                                                            I can articulate the steps required to solve my current problem.

                                                                                            In the particular meaning he seems to ascribe to this sentence in the video (~t=5:40), i.e. “I’m stuck”: in my understanding, that’s like one of the most important parts of the job! Not knowing how to solve my current problem, but sitting and thinking hard about it, researching stuff on the web, talking with others about it…

                                                                                            Even if I look at a broader meaning of the sentence, in many (most?) cases, I would expect to, at best, be able to articulate a list of steps that might, hopefully, take me to solving my current problem. I’ve recently come to see programming as somewhat akin to an experiment, in the nomenclature of the scientific method:

                                                                                            • “my current problem”   ~   a physical phenomenon (notably, the better I understand the problem, the more “observations”, or “characterizations” of it I have)
                                                                                            • proposed architecture of a solution   ~   the hypothesis (namely: “this solution would solve the problem”)
                                                                                            • “a list of steps that might solve it”   ~   a plan of an experiment
                                                                                            • actual implementation attempt   ~   performing an experiment.

                                                                                            In other words, I only know what steps are really the ones required to solve the problem, after I’ve eventually successfully solved it (implemented a correct solution). Before that, I can only have a plan, which may well fail, and require me to reevaluate/rethink any of my earlier phases. More than that: if I do have such a plan, it means I’ve already completed the earlier phases, so I’m quite far in the process!

                                                                                            1. 1

                                                                                              The way I read this is that you and Mike are on the same page. The steps aren’t a locked down thing, it’s just the steps of your plan. Things will absolutely change as time goes on and you execute your plan. But the point Mike is making is that too often people set off with no actual plan. They just start typing, paint themselves into a corner, and waste their most valuable resource, time.

                                                                                              “Weeks of programming can save you hours of planning”

                                                                                            2. 3

                                                                                              I actively work to bring value to the people I work with.

                                                                                              I actively work to ensure underrepresented voices are heard

                                                                                              Seems antithetical to a strong work-life separation.

                                                                                              What has work-life separation got to do with this, and how is this antithetical to being a good professional? If you have a junior dev let them be heard. If you are working with a UX consultant don’t dismiss their ideas out of hand because you think you know better. When someone has an imperfect approach, try to get them onto the right track instead of derailing them further. These are all normal elements of technical leadership whether you are a manager, tech lead, or an individual contributor.

                                                                                              1. 1

                                                                                                If you’re working with a ux consultant yes, don’t dismiss their ideas out of hand. That’s not actively working to ensure their voices are heard, that’s basic professionalism. But you shouldn’t have to be responsible to bring their ideas to someone else.

                                                                                                1. 2

                                                                                                  Ensuring underrepresented voices are heard doesn’t mean that you have any responsibility to actually bring their ideas to anyone else. It can be as simple as actually listening to them, or making space for them.

                                                                                              2. 1

                                                                                                Otherwise you’re wasting money (generally, developer-hours are cheaper than server-hours).

                                                                                                Did you mean server-hours are cheaper than developer-hours here? Because from what I got from your previous statement is that you’re going to spend a lot of developer-hours into latency optimization without even actually needing it.

                                                                                                1. 2

                                                                                                  Err, yeah, mistyped.

                                                                                        1. 56

                                                                                          Fortunately, it’s also the best of currently available major browsers, so it’s not exactly a hardship.

                                                                                          1. 22

                                                                                            Not on macOS. Sure, it has a whole lot of great features, but it’s just slow. It feels slow, looks slow, and macOS keeps telling me that Firefox is using an excessive amount of power compared to other browsers.

                                                                                            I guess it’s too much to ask for, for Firefox to feel like a good, native macOS app, like Safari, but the fact of the matter is that that is why I don’t use it as my main browser.

                                                                                            1. 19

                                                                                              I use it on Mac OS X and it doesn’t feel slow to me at all. And it’s not using an excessive amount of power that I can tell. Perhaps it’s the version of Firefox being used?

                                                                                              1. 14

                                                                                                I’ve been sticking to Safari on MacOS because I’ve read that it really does make a difference to battery life (and I’m on a tiny Macbook so, you know, CPU cycles aren’t exactly plentiful). This thread just prompted me to check this for myself.

                                                                                                I opened a typical work mix of 10 tabs in both Safari 12.1 and Firefox 66.0.3 on MacOS 10.14.4: google calendar + drive, an open gdocs file, two jira tabs, this lobsters thread (well, it is lunchtime…) and the rest github. Time for some anec-data! :-)

                                                                                                After leaving both browsers to sit there for 10 mins while I made lunch (neither in the foreground, but both visible and showing a github page as the active tab), these are the numbers I eyeballed from Activity Monitor over about a 30 second period:

                                                                                                Firefox:

                                                                                                • Energy Impact: moving between 3.3 and 15.6, mostly about 4
                                                                                                • CPU: various processes using 0.3, 0.4, 0.5 up to one process using 1.4% CPU

                                                                                                Safari:

                                                                                                • Energy Impact: moving between 0.1 and 1.3, mostly around 0.5
                                                                                                • CPU: more processes than Firefox, but most using consistently 0.0 or 0.1% CPU

                                                                                                Firefox isn’t terrible but Safari seems really good at frequently getting itself down to a near-zero CPU usage state. I’ll be sticking with Safari, but if I was on a desktop mac instead I think I’d choose differently.

                                                                                                As an aside, Activity Monitor’s docs just say “a relative measure of the current energy consumption of the app (lower is better)”. Does anyone know what the “Energy Impact” column is actually measuring?

                                                                                                1. 5

                                                                                                  I have had the same experience with Firefox/Chrome vs Safari.

                                                                                                  I use Chrome for work because we’re a google shop and I tend to use Firefox any time my MacBook is docked.

                                                                                                  But I’m traveling so much, I generally just use Safari these days.

                                                                                                2. 9

                                                                                                  I use it on Mac OS X and it doesn’t feel slow to me at all.

                                                                                                  If you can’t feel and see the difference in the experience between, say, Firefox and Safari, I don’t know what to tell you.

                                                                                                  And it’s not using an excessive amount of power that I can tell. Perhaps it’s the version of Firefox being used?

                                                                                                  Have you tried checking in the battery menubar-thing? There’s an “Using Significant Energy” list, and Firefox is always on it on my machine if it’s running. And that is both Firefox as well as Firefox Nightly, and it is so for all versions since a long time. My two installs are updated per today, and it’s the same experience.

                                                                                                  1. 1

                                                                                                    If you can’t feel and see the difference in the experience between, say, Firefox and Safari, I don’t know what to tell you.

                                                                                                    There are plenty of people who can’t hear the difference between $300 and $2000 headphones. Yes, there are audiophile snobs who’re affronted by the mere idea of using anything but the most exquisitely constructed cans. But those people are a vanishingly small minority of headphone users. The rest of us are perfectly happy with bog standard headphones.

                                                                                                    Apple likely had to descend through numerous circles of hell while hand-optimizing Safari for the single platform that it needs to run on. Will Firefox get there? Unlikely. Will most users even notice the difference? Most certainly not.

                                                                                                    1. 6

                                                                                                      They will when their battery life is abysmal and they start hearing that it’s because of Firefox.

                                                                                                      I really want to see Firefox get more adoption, but there are a lot of techies with influence who will keep away because of this, myself included. It’s not a convenience thing - I just can’t get to mains power enough as it is in my job, so more drain is a major problem.

                                                                                                      1. 1

                                                                                                        They will when their battery life is abysmal and they start hearing that it’s because of Firefox.

                                                                                                        The problem is that the feedback cycle isn’t even long enough for them to hear about this. The cause and effect are almost immediate depending on your display resolution settings with bug 1404042.

                                                                                                        1. 3

                                                                                                          This is what happens when you fight the platform.

                                                                                                          1. 2

                                                                                                            This is what happens when the platform is hostile to outsiders.

                                                                                                            1. 8

                                                                                                              See, I don’t see it that way. I see it as Mozilla deciding on an architecture for their software that renders that software definitely suboptimal on the Mac. It’s just a bad fit. I’m not claiming that Mozilla should have done things differently – they are welcome to allocate their resources as they see fit, and the Mac is most definitely a minority platform. There are many applications that run on the Macintosh that are not produced by Apple that don’t have these problems.

                                                                                                              iOS is a different story, one where hostility to outsiders is a more reasonable reading of Apple’s stance.

                                                                                                      2. 2

                                                                                                        Now that I’m at work, I’m seeing what hjst is showing. This doesn’t bother me that much because I use the laptop at work more like a desktop (I keep it plugged in). But yes, I can see how Firefox might be a bit problematic to use on the Mac.

                                                                                                      3. 1

                                                                                                        I’ll have to check the laptop at work. At home I have a desktop Mac (okay, a Mac mini).

                                                                                                      4. 4

                                                                                                        There are known issues which are taking a long time to fix. Best example is if you change the display resolution on a retina Mac. You can almost see the battery icon drain away on my machine.

                                                                                                        1. 3

                                                                                                          I find it depends a lot on what FF is doing - usual browsing is fine, but certain apps like Google Docs or anything involving the webcam make it go crazy.

                                                                                                          1. 20

                                                                                                            Google sites, unsurprisingly if disappointingly, don’t work as well in Firefox as they do in Chrome. But that’s really on Google, not Mozilla.

                                                                                                            1. 15

                                                                                                              They used to actively break them - e.g. GMail would deliberately feed Firefox Android a barely-functional version of the site. https://bugzilla.mozilla.org/show_bug.cgi?id=668275 (The excuse was that Firefox didn’t implement some Google-specific CSS property, that had a version in the spec anyway.) They’ve stopped doing that - but Google’s actions go well beyond passively not-supporting Firefox.

                                                                                                        2. 5

                                                                                                          For me, it feels faster than Chrome on MacOS, but the reason I don’t use it is weird mouse scroll behavior (with Apple mouse). It differs too much from Chrome’s behavior. I don’t know how to debug it, how to compare, what is right behavior (I suspect Chrome’s scrolling is non-standard and it dampens acceleration, while Firefox use standard system scrolling). It just feels very frustrating, but in subtle way: I become nervous after reading lots of pages (not right after the first page). I tried various mouse-related about:config settings but none of them had any effect (and it’s hard to evaluate results because differences are very subtle).

                                                                                                          Maybe the answer is to use standard mouse with clicky scroll wheel, but I hate clicky scroll wheels. “Continuous” scrolling is one of the best input device improvements of recent times (however it would be better if it was real wheel/trackball instead of touch surface).

                                                                                                          1. 1

                                                                                                            Have you tried Nightly yet? I believe there are some great improvements made recently for this. It isn’t all fixed, but it has improved.

                                                                                                            1. 3

                                                                                                              I’m on Nightly right now, and it hasn’t improved for me at least.

                                                                                                            2. -1

                                                                                                              I think macOS disadvantages apps that compete with Apple products. That’s unfortunate though.

                                                                                                              1. 7

                                                                                                                Any evidence for this statement?

                                                                                                                1. 9

                                                                                                                  Do you have any proof?

                                                                                                                  Anecdotally I use a lot of third-party apps that are a lot better than Apples contemporaries.

                                                                                                                  I just think the truth is that Firefox’ hasn’t spent enough time on optimizing to each platform, and on macOS where feel and look is a huge deal, they simply fall through.

                                                                                                                  1. 1

                                                                                                                    The reports that Firefox has issues on macOS and Apple’s behaviour with iOS, for starters.

                                                                                                                    1. 7

                                                                                                                      Often the simplest solution is the correct one, meaning that it’s more likely that Firefox just hasn’t optimized for macOS properly. If you look at the bug reports on the bug tracker, this seems to be the case.

                                                                                                                      Also if your theory were to be correct, why is other non-apple browser like chromium not having these issues? Could it perhaps be that they have in fact optimized for macOS, or do you propose that apple is artifically advantaging them?

                                                                                                                      1. 13

                                                                                                                        pcwalton hints at twitter that gains that e.g. Safari and Webkit have is through the usage of private API in macOS. You could probably use those API as well from Firefox, at the cost of doing tons of research on your own, while Webkit can just use them. (further down the thread, he hints at actually trying to bind to them)

                                                                                                                        https://twitter.com/pcwalton/status/1068933432275681280

                                                                                                                        1. 3

                                                                                                                          That’s very interesting, and it’s probably a factor. However these are problems that Firefox have, not all third-party browsers. No Chromium based browser have these issues, at least in my experience. Maybe it’s through privat API that you can optimise a browser the most on macOS, but it doesn’t change the fact that Firefox is under-optimised on macOS, which is why it performs as it does.

                                                                                                                          1. 8

                                                                                                                            Point being: Chromium inherits optimisations from apples work which Mozilla has to work hard to develop in a fashion working with their architecture. Yes, there’s something to be said about organisational priorities, but also about not being able to throw everyone at that problem.

                                                                                                                            I’m really looking forward to webrender fixing a lot of those problems.

                                                                                                                            1. 1

                                                                                                                              And it’s a sad fact, because I’d love to use Firefox instead of Safari.

                                                                                                                              1. 7

                                                                                                                                Sure, from a users perspective, all of that doesn’t matter.

                                                                                                                                Just wanted to say that this is hard and an uphill battle, not that people don’t care.

                                                                                                                                The Firefox team is well aware of those two contexts.

                                                                                                                        2. 0

                                                                                                                          It’s certainly possible. But at the very least Apple has little incentive to have Firefox work well on macOS. Chrom{e|ium} is so widely used, that Apple would hurt themselves if it didn’t work well on macOS.

                                                                                                                          I’d be a bit surprised if Mozilla is really falling down on optimising Firefox on macOS. It’s not as if Mozilla is a one man operation with little money. But perhaps they decided to invest resources elsewhere.

                                                                                                                    2. 1

                                                                                                                      That’s true in cases where apps want you to pay for features (like YouTube not offering Picture-in-Picture since it’s a paid feature and Apple wants money for it to happen) but not true in the case of Firefox. Unfortunately, Firefox’s JavaScript engine is just slower and sucks up more CPU when compared to others.

                                                                                                                  2. 7

                                                                                                                    Yeah, I’ve switched between Firefox and Chrome every year or two since Chrome came out. I’ve been back on Firefox for about 2 years now and I don’t see myself going back to Chrome anytime soon. It’s just better.

                                                                                                                    1. 3

                                                                                                                      Vertical tabs or bust.

                                                                                                                    1. 10

                                                                                                                      At least from the perspective of someone who is used to C that is considerably less safe, this seems like a risky pattern.

                                                                                                                      error = sanity_check();
                                                                                                                      maybeDo(continue_process(), error);
                                                                                                                      

                                                                                                                      eliminates my ability to stop worrying that input that is not sanity-checks is immediately kicked out. I have to now check that the entire future processing contains maybeDo, and if it’s missed one time, I’m probably handling input that hasn’t passed a sanity check and might have a vulnerability.

                                                                                                                      1. 3

                                                                                                                        I agree, and while the example looks nice, that’s not what real code looks like. If you’re going to copy/paste and call the same function 5x in a row just throw the call + error handling in a loop over the array of inputs.

                                                                                                                        1. 2

                                                                                                                          If maybeDo expects a function, then using continue_process() instead of continue_process typically would not compile.

                                                                                                                          But your example is introducing non-monadic error handling again. It’s just another variation of having a possibility to forget to check a return value, and this can be solved with the type system:

                                                                                                                          continuator = sanity_check();
                                                                                                                          continuator.process();