1. 11

    I would love to see an explanation on these wats, I have no idea why they happen.

    1. 9

      Luckily there is a spec! Many of these are explained in chapter 2, which is only 1732 pages long. Should be pretty straightforward.

      1. 1

        select a, b from nums order by 2;

        sorts by values in the second column

        select a, b from nums order by 1+1;

        sorts by a constant, just like order by 3*1 would

        ((select a from nums) union (select a from nums)) order by b;

        the set resulting from this operation (union) does not include a column named b

        select b from nums group by a;

        b is functionally dependant on the primary key a

        select user, password from users;

        see select user; alone. I suggest you always qualify your columns

        I’ll add my own “wat”:

        select sum(nums.a) from nums group by ();

      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. 2

                npm is a company dedicated to making the management of JavaScript dependencies predictable and effortless, and they expect other ecosystems to have similar world-class dependency management tooling available.

                Yeesh. And they picked rust? Sorry, rust, but having observed what happens when people use npm, I’m staying as far away from cargo as possible. I can’t handle that level of predictability. :)

                1. 11

                  I’m still waiting for npm to burn through their Series A and take the Node community with them.

                  1. 4

                    Their series A was in 2015, so it’s safe to say they haven’t “burned through” anything by VC standards, whether or not they eventually succeed.

                    1. 6

                      The ultimate left-pad.

                    2. 4

                      I’m also curious what aspects of go mod (i.e. recent dependency management changes in go) they found unappealing.

                      1. 7

                        The project described predates go mod, hence the “at the time they performed this evaluation”. The Rust services at NPM are actually into production for quite some time now.

                        (I admit that could be made clearer, I was not involved in writing the paper)

                      2. 2

                        Could you please elaborate? Like, how could it be better, what they’re doing etc. Because I really really don’t understanding (and I’m willing to) all this hate towards npm.

                        1. 6

                          Seems like only yesterday we were discussing how worldwide productivity ground to a halt because somebody pushed a bad package to npm and nobody was capable of simply going back to a previous working version.

                          https://lobste.rs/s/ztev4w/misconception_about_oss_support

                          I mean, I suppose it’s possible for some other package manager or some other ecosystem to have problems too, but literally every story about left pad or backdoored packages stealing crypt wallets or whatever always involves npm front and center.

                          1. 3

                            I see what you mean, and yes the NPM ecosystem has problems. I don’t think they’re related to the desired features of NPM itself, though, but rather the anemic state of the Javascript standard lib, particularly in ES2015, which creates the desire to publish and use lots of packages for doing common things of trivial complexity that are included in the StdLib of most languages. For whatever faults Rust and Cargo have, they seem to have avoided the issue of having tons of tiny crates/libs, creating huge dependency chains in most significant crates/libs, due to lack of common simple methods in the StdLib.

                            I think that this instead calls out how much better the basics of dependency management are in these languages compared to almost all other common languages. How many other compiled languages have a standard dependency management system that supports having a lockfile that ensures that all builds of the application are using the same library code, no matter who or where they are built?

                            1. 1

                              There are complications because javascript is minimal, but there are major problems with tooling and how npm administers the repo that have nothing to do with that.

                              How many other compiled languages have a standard dependency management system that supports having a lockfile that ensures that all builds of the application are using the same library code, no matter who or where they are built?

                              Are you talking about npm? Because npm doesn’t do that.

                              1. 2

                                There may be problems with how NPM administers things, but it sounds like we’re talking about whether Cargo is good or bad. Do you know of Cargo sharing some of the same issues from an organizational/policy perspective that NPM has?

                                Are you talking about npm? Because npm doesn’t do that.

                                Well I was talking about compiled languages specifically, but AFAICT NPM does do that

                                1. 1

                                  Perhaps I am wrong, but I took @tedu’s comment as a bit tongue-in-cheek. Cargo being better designed than npm, but npm potentially infecting cargo. Maybe that’s how I wanted to read it—I have no allegiance to either community, though.

                      1. 3

                        I’m currently using AwesomeWM + multicolor copycat theme with some tweaks.
                        My setup is basically a X99 and an LG Ultrawide screen.

                        1. 8

                          The last two paragraphs are really important.

                          Be knowledgeable about what’s actually in the C and C++ standards since these are what compiler writers are going by. Avoid repeating tired maxims like “C is a portable assembly language” and “trust the programmer.”

                          Unfortunately, C and C++ are mostly taught the old way, as if programming in them isn’t like walking in a minefield. Nor have the books about C and C++ caught up with the current reality. These things must change.

                          There’s no excuse for invoking UB anymore. Either you have a use case that absolutely requires the ridiculous features of C and C++ (in which case you better be damn sure you’re not stepping on a mine), or you’re performing malpractice by using an inappropriate language.

                          1. 20

                            I think a lot of people don’t understand just how easy it is to write code with undefined behavior in it. Because C and C++ programmers often aren’t taught about it when learning the language, when they do hear about it, they think “oh, that’s something that other people’s code has to deal with. I write good code, and I’m this doesn’t affect me. If it did, I would have been taught it when I learned the language.”

                            This is why I value John Regehr’s work so much. He’s been beating the drum of UB as a danger to take seriously for a while, and I’m really happy to see his stuff getting more traction in the programming community.

                            I’m going to be teaching a class on C programming soon, and I’ll absolutely put UB front and center in it; maybe with people like John Regehr pushing for better education and better tooling, more people will do the same.

                            1. 1

                              What resources do you guys recommend to learn C?

                              1. 2

                                I think anyone trying to learn the language properly needs at a very minimum, the (draft) standards. There are far too many books, tutorials, etc. that just gloss over important details or make grossly misleading simplifications.

                                Then read (good) man pages for library functions. Read code. Write code. Lots of code. Keep an eye out on some projects and watch it as bugs get fixed. Try to understand the bug and the fix.

                                A book might or might not help. I’ve only read one book on C – Expert C Programming. It was an ok read but I didn’t learn too much from it. A newcomer might find it more useful however.

                                EDIT: taossa ch6 is also a great read for anyone doing C. http://ptgmedia.pearsoncmg.com/images/0321444426/samplechapter/Dowd_ch06.pdf

                                Alternative link: https://trailofbits.github.io/ctf/vulnerabilities/references/Dowd_ch06.pdf

                            2. 5

                              I could agree with that, but there’s a lot of code written 20 years ago or more. And it’s not so easy to simply use an old compiler. Want to run arm64? Get a new compiler. And the arm64 platform would be rather less interesting if you simply banned all old software.

                              1. 1

                                That’s a great point about old software being used on new hardware. In such cases, would it be better to use a compiler with defined (and safe) behavior in all UB? (Presumably the performance of the new hardware is better than the old hardware it was originally written for, so you could afford things like symbolic addresses, bounds checking, “gcc-x86-like” overflow, etc.)

                                It still seems like it would be better to fix the old software so it doesn’t invoke UB, but we all agree how hard that is.

                                1. 2

                                  There’s quite a lot of UB in C, much of it designed so that different platforms can each use their “native” support for various things like addressing modes, alignment, etc. If you really wanted to define all behavior to be essentially equivalent to what gcc on x86 traditionally does, this would amount to a pretty significant runtime layer on non-x86 platforms emulating x86-like behavior. At which point why even use C, not something that actually has a portable runtime and/or bytecode defined from the start? I guess purely for legacy software it’d make sense.

                                  1. 1

                                    That’s a great point about old software being used on new hardware. In such cases, would it be better to use a compiler with defined (and safe) behavior in all UB?

                                    There are so many people proposing this that eventually one might start to believe it is actually a thing.

                                    But I have not seen such a compiler and I doubt I ever will.

                              1. 1

                                off-topic: what’s this keyboard model tho?

                                1. 2

                                  Vortex POK3R with Cherry MX Clear switches and DSA Granite caps :)

                                  Played around with fancier stuff but at the end of the day I was happiest with the look and feel of this one.

                                1. 0

                                  I would like to see an implementation using Rust.

                                  1. 1

                                    Reading the “Programming Elixir 1.2” book by Dave Thomas, as (the backend of) the game I’m currently working on is mostly written in Elixir.

                                    1. 23

                                      It’s interesting that he suggests that you wouldn’t write a Haskell app on PS4. I happen to be in gamedev, and although the common wisdom is that everything in this field is hyper-bummed hand-tuned C++ and assembly, more and more those languages are retreating to the core engine and in some cases fragmenting and dissipating completely. Most (by any metric) games these days are written in pure C# on Unity. Unity itself is written in C++, but few companies splurge for the source license. Even most of the existing top tier games (world of warcraft, call of duty…) are written primarily in an embedded extension language (lua or similar) that exposes primitives at a higher level to the game designers and scripters.

                                      But intriguingly, even that is undergoing revision – one designer I interviewed recently had been working on a recently released top-tier AAA game in the running for best game of 2016, and he said that their engine was literally Racket all the way down to the metal, from DSLs used to create the scripting interface all the way down to the shader compilers. And another dev I interviewed from another top tier AAA gaming company also said their engine was almost entirely Racket as well now. I almost didn’t believe it until he showed me screenshots of the debug interface.

                                      Similarly, I know from personal experience that many mobile game studios are using or experimenting with erlang on the backend – including me! So the notion that these languages are so esoteric as to be implausible isn’t informed by facts on the ground; at least, not this particular ground.

                                      1. 3

                                        IIRC, Crash Bandicoot was written using a Scheme dialect.

                                        1. 3

                                          one designer I interviewed recently had been working on a recently released top-tier AAA game in the running for best game of 2016, and he said that their engine was literally Racket all the way down to the metal, from DSLs used to create the scripting interface all the way down to the shader compilers. And another dev I interviewed from another top tier AAA gaming company also said their engine was almost entirely Racket as well now.

                                          That’s unexpected! Can you mention the game and company names?

                                          1. 9

                                            I’m speculating without any direct knowledge, but Uncharted 4 was recently released to critical acclaim and was developed by Naughty Dog, who famously used AOT-compiled Lisp to write games like Crash Bandicoot and Jak and Daxter.

                                            1. 1

                                              Thanks for the reference.

                                          2. 1

                                            I once worked at a company that wrote extensive amounts of PHP to host websites. One day I suggested that we rewrite the entire core of the infrastructure in order to make it faster and more stable, but all I got back was some grumbles about how much time it would consume.

                                            I’m also soon going to be working somewhere where Angular is the core of the frontend, but I have no idea how I could convince them to consider switching to React without breaking down barriers and starting fires.

                                            1. 4

                                              I don’t know what your specific situation was like, but I think the response you got back from the PHP company was valid. A big rewrite is something that one should be able to make a really good ROI on or be pulling in enough money to cover a failure if it happens. They do need to happen (probably more often than they should), but there should be a pretty healthy dose of “no way” in order to elucidate a compelling reason.

                                          1. 3

                                            São Paulo, Brazil.

                                            1. 2

                                              It’s 56 years old, to be exact.

                                              1. 3

                                                I guess that’s an important step to an actual “containerization” offered by Docker. I’ve never given too much attention to Unikernels, but now it’s getting pretty interesting. Projects like Tor, Qubes OS and even Mirage OS could take many different advantages that Docker gives, and I would like to see how ARM-based SoCs will explore that kind of “virtualization”.