1. 2

    The linked opinion poll by Gasarch is a pretty fun read, and has a section with various academics’ thoughts on the matter:

    Only a few people will follow the proof. Whoever does will spend the rest of his life convincing people it is correct.

    Even though P6=NP people should still work on trying to prove P=NP to see what goes wrong. I think the P=BPP question is almost as interesting. I am appalled that people take for granted that P=BPP.

    1. 1

      That’s a cool one to read. I like seeing the different opinions of respectable mathematicians and computer scientists’ two cents on the issue. As an aside, the professor who taught me Calc 2 is quoted in this list, which was a nice surprise :)

    1. 2

      Has anyone here tried using Godot in anger yet? I’m tempted to use this instead of Unity for things, but a bit unsure of how difficult it might be to use Godot for simple prototyping (namely whether docs are complete enough).

      Would love to hear the pros of this in terms of usability.

      1. 2

        Godot is great. I’ve used Unity a bit but honestly I don’t think I’d ever choose it over Godot (except for maybe non-technical reasons, like the asset store).

        As for the docs, I found them to be pretty good, and things are reasonably discoverable in-editor too.

        1. 2

          I quit Unity years ago and switched to Godot. The docs aren’t great (they seem to be working on that) but the builtin stuff is amazing, it’s kinda weird at times but it always seems like it has the one specific thing you want. I spent days implementing things that I usually don’t find in editors just to find out that they were already implemented in Godot, just a bit hidden.

          GDScript is acquired taste, I still don’t love it, but it’s grown on me enough that I can use it comfortably. For all its quirkiness (tries to be python but fails) it hasn’t given me a single issue or unwanted behavior, unlike the spotty C# in Unity (although I’ve heard it’s getting better?).

          1. 4

            Looks like they support C# now via Mono. Looking forward to someone writing a wrapper for F#.

            1. 2

              The main reason I never took Godot seriously is that they decided to invent their own language because “none of the existing ones were good enough” which tells me that the project leadership at the time were not very sensible. It’s a good sign that they’ve realized that was a mistake.

              1. 2

                I think that was nearly ubiquitous in game engines prior to, say, 2009–2010 or so. Unreal has its own language, UnrealScript, based on a previous in-house language, ZZT-oop. And Unity started with a DIY language, UnityScript, which had Javascript-like syntax and was sometimes called “Javascript” in the docs, but wasn’t really JS, and was finally axed just a few months ago. So it’s not that surprising Godot would also have one, even if it started a little later than those two engines.

                I’m not 100% sure on the timeline, but I think Lua was one of the first third-party languages to be widely picked up as a game scripting language. At the time it was seen as necessary for game-scripting languages that they be lightweight, small implementations that are easily embeddable, and ideally permissively licensed, which Lua fit the bill. Though now things have moved on to where embedding Mono isn’t a dealbreaker.

        1. 1

          Looks pretty cool! I hate to be “that guy” but what is something like this commonly used for?

          1. 1

            If you’re doing 3D printing or experimenting with parametric architecture (let’s add two stories to that building), this is very useful. Also, there’s a big community of people experimenting with generative design, see Nervous System https://n-e-r-v-o-u-s.com/ or Marius Watz http://mariuswatz.com/ – or just browse Creative Applications http://www.creativeapplications.net/

          1. 1

            I’m having a hard time discerning exactly what the Kappa architecture is from this article. It sounds like it’s just, “Serve your real-time and historic information with the same backend.” Is that really deserved a name? So the vast majority of all APIs are “kappa architecture”?

            1. 25

              I used to do the things listed in this article, but very recently I’ve changed my mind.

              The answer to reviewing code you don’t understand is you say “I don’t understand this” and you send it back until the author makes you understand in the code.

              I’ve experienced too much pain from essentially rubber-stamping with a “I don’t understand this. I guess you know what you’re doing.” And then again. And again. And then I have to go and maintain that code and, guess what, I don’t understand it. I can’t fix it. I either have to have the original author help me, or I have to throw it out. This is not how a software engineering team can work in the long-term.

              More succinctly: any software engineering team is upper-bound architecturally by the single strongest team member (you only need one person to get the design right) and upper-bound code-wise by the single weakest/least experience team member. If you can’t understand the code now, you can bet dollars to donuts that any new team member or new hire isn’t going to either (the whole team must be able to read the code because you don’t know what the team churn is going to be). And that’s poison to your development velocity. The big mistake people make in code review is to think the team is bound by the strongest team member code-wise too and defer to their experience, rather than digging in their heels and say “I don’t understand this.”

              The solution to “I don’t understand this” is plain old code health. More functions with better names. More tests. Smaller diffs to review. Comments about the edge cases and gotchas that are being worked around but you wouldn’t know about. Not thinking that the code review is the place to convince the reviewer to accept the commit because no-one will ever go back to the review if they don’t understand the code as an artifact that stands by itself. If you don’t understand it as a reviewer in less than 5 minutes, you punt it back and say “You gotta do this better.” And that’s hard. It’s a hard thing to say. I’m beginning to come into conflict about it with other team members who are used to getting their ungrokkable code rubber stamped.

              But code that isn’t understandable is a failure of the author, not the reviewer.

              1. 7

                More succinctly: any software engineering team is upper-bound architecturally by the single strongest team member (you only need one person to get the design right) and upper-bound code-wise by the single weakest/least experience team member.

                Well put – hearing you type that out loud makes it incredibly apparent.

                Anywhoo, I think your conclusion isn’t unreasonable (sometimes you gotta be the jerk) but the real problem is upstream. It’s a huge waste when bad code makes it all the way to review and then and then needs to be written again; much better would be to head it off at the pass. Pairing up the weaker / more junior software engineers with the more experienced works well, but is easier said than done.

                1. 4

                  hmm, you make a good point and I don’t disagree. Do you think the mandate on the author to write understandable code becomes weaker when the confusing part is the domain, and not the code itself? (Although I do acknowledge that expressive, well-structured and well-commented code should strive to bring complicated aspects of the problem domain into the picture, and not leave it up to assumed understanding.)

                  1. 3

                    I think your point is very much applicable. Sometimes it takes a very long time to fully understand the domain, and until you do, the code will suffer. But you have competing interests. For example, at some point, you need to ship something.

                    1. 2

                      Do you think the mandate on the author to write understandable code becomes weaker when the confusing part is the domain, and not the code itself?

                      That’s a good question.

                      In the very day-to-day, I don’t personally find that code reviews have a problem from the domain level. Usually I would expect/hope that there’s a design doc, or package doc, or something, that explains things. I don’t think we should expect software engineers to know how a carburetor works in order to create models for a car company, the onus is on the car company to provide the means to find out how the carburetor works.

                      I think it gets much tricker when the domain is actually computer science based, as we kind of just all resolved that there are people that know how networks work and they write networking code, and there’s people who know how kernels work and they write kernel code etc etc. We don’t take the time to do the training and assume if someone wants to know about it, they’ll learn themselves. But in that instance, I would hope the reviewer is also a domain expert, but on small teams that probably isn’t viable.

                      And like @burntsushi said, you gotta ship sometimes and trust people. But I think the pressure eases as the company grows.

                      1. 1

                        That makes sense. I think you’ve surfaced an assumption baked into the article which I wasn’t aware of, having only worked at small companies with lots of surface area. But I see how it comes across as particularly troublesome advice outside of that context

                    2. 4

                      I’m beginning to come into conflict about it with other team members

                      How do you resolve those conflicts? In my experience, everyone who opens a PR review finds their code to be obvious and self-documenting. It’s not uncommon to meet developers lacking the self-awareness required to improve their code along the lines of your objections. For those developers, I usually focus on quantifiable metrics like “it doesn’t break anything”, “it’s performant”, and “it does what it’s meant to do”. Submitting feedback about code quality often seems to regress to a debate over first principles. The result is that you burn social capital with the entire team, especially when working on teams without a junior-senior hierarchy, where no one is a clear authority.

                      1. 2

                        Not well. I don’t have a good answer for you. If someone knows, tell me how. If I knew how to simply resolve the conflicts I would. My hope is that after a while the entire team begins to internalize writing for the lowest common denominator, and it just happens and/or the team backs up the reviewer when there is further conflict.

                        But that’s a hope.

                        1. 2

                          t’s not uncommon to meet developers lacking the self-awareness required to improve their code along the lines of your objections. For those developers, I usually focus on quantifiable metrics like “it doesn’t break anything”, “it’s performant”, and “it does what it’s meant to do”. Submitting feedback about code quality often seems to regress to a debate over first principles.

                          Require sign-off from at least one other developer before they can merge, and don’t budge on it – readability and understandability are the most important issues. In 5 years people will give precisely no shits that it ran fast 5 years ago, and 100% care that the code can be read and modified by usually completely different authors to meet changing business needs. It requires a culture shift. You may well need to remove intransigent developers to establish a healthier culture.

                          The result is that you burn social capital with the entire team, especially when working on teams without a junior-senior hierarchy, where no one is a clear authority.

                          This is a bit beyond the topic at hand, but I’ve never had a good experience in that kind of environment. If the buck doesn’t stop somewhere, you end up burning a lot of time arguing and the end result is often very muddled code. Even if it’s completely arbitrary, for a given project somebody should have a final say.

                          1. 1

                            The result is that you burn social capital with the entire team, especially when working on teams without a junior-senior hierarchy, where no one is a clear authority.

                            This is a bit beyond the topic at hand, but I’ve never had a good experience in that kind of environment. If the buck doesn’t stop somewhere, you end up burning a lot of time arguing and the end result is often very muddled code. Even if it’s completely arbitrary, for a given project somebody should have a final say.

                            I’m not sure.

                            At very least, when no agreement is found, the authorities should document very carefully and clearly why they did take a certain decision. When this happens everything goes smooth.

                            In a few cases, I saw a really seasoned authority to change his mind while writing down this kind of document, and finally to choose the most junior dev proposal. And I’ve also seen a younger authority faking a LARGE project just because he took any objection as a personal attack. When the doom came (with literally hundreds of thousands euros wasted) he kindly left the company.

                            Also I’ve seen a team of 5 people working very well for a few years together despite daily debates. All the debates were respectful and technically rooted. I was junior back then, but my opinions were treated on pars with more senior colleagues. And we were always looking for syntheses, not compromises.

                        2. 2

                          I agree with the sentiment to an extent, but there’s something to be said for learning a language or domain’s idioms, and honestly some things just aren’t obvious at first sight.

                          There’s “ungrokkable” code as you put it (god knows i’ve written my share of that) but there’s also code you don’t understand because you have had less exposure to certain idioms, so at first glance it is ungrokkable, until it no longer is.

                          If the reviewer doesn’t know how to map over an array, no amount of them telling me they doesn’t understand will make me push to a new array inside a for-loop. I would rather spend the time sitting down with people and trying to level everyone up.

                          To give a concrete personal example, there are still plenty of usages of spreading and de-structuring in JavaScript that trip me up when i read them quickly. But i’ll build up a tolerance to it, and soon they won’t.

                        1. 1

                          This seems like a considerably simpler way to do dimensionality reduction as compared to say PCA or SVD. I take it the drawback must be that it doesn’t preserve enough structure? Or that the real value in the other algorithms is that they’re much better at removing dimensions of lesser variance?

                          1. 2

                            Out of my gut:

                            This method uses the theoretical upper bound of dimensions required to keep distortion under the given epsilon (though is it really a hard upper bound?). It works for any inputs (random or not). It doesn’t care about structure, it doesn’t try to fit the data. Really cool trick.

                            But yeah, if you have structured data, and you care about that structure, you probably want to do something like PCA anyway (which is all about fitting your data). Even if you only care about reducing dimensionality, you want something smarter than this random projection because the number of dimensions you need for your structured data is far less than the theoretical upper bound. So yeah, they’re more optimal as they will find the dimensions with little variance which you can then drop.

                            Since machine learning was mentioned, I wonder how feasible it would be to take one of these random matrices and train it to better match the structure (and then reduce dimensions).

                            Disclaimer: I know nothing about maths.

                          1. 5

                            I feel bad saying this (I really do), but I can’t help shake the feeling that the true motive of the author was to market his game via this story.

                            The world is filled to overflowing with failed business ventures. I’m not sure this one is particularly different or insightful or noteworthy.

                            1. 4

                              I actually found this perspective pretty interesting – the bar for success seemed really low. 300 sales to survive, 700 to stay in business? That’s what, between $1500 and $3500 after Steam’s cut and before taxes? In that light it’s actually kind of depressing how hard it is to even make a splash.

                              1. 1

                                the bar for success seemed really low. 300 sales to survive, 700 to stay in business?

                                For a single-person business that seems reasonable. Compare with the “Manabi line”.

                                In that light it’s actually kind of depressing how hard it is to even make a splash.

                                There are just so many games out there though. Average sales are always going to equal number of users * number of games per user / number of games on sale. And there are so many people who want to make games.

                              2. 3

                                As I talked about above, I do think it’s worth talking about these kinds of situations. There are a lot of young people interested in games who would love to get into game development, there are a lot of colleges advertising their game-making programs and talking about how it’s such a great and fun career, and there’s a lot of attention given to the successful stories in indie development. Failure stories like these get told a lot less often, even though they’re likely the more typical scenario. If we don’t talk about them, we don’t give the people considering doing indie game development a clear picture of the risk involved.

                                As for the marketing aspect, I can’t say whether that was his primary motive, but well, hey, I’m sure it doesn’t hurt.

                              1. 2

                                This is one of those cases where “clever” is used as a synonym for “obfuscated.” Or am I missing something RE: modern js best practices, as hinted by the line “…we strive here to avoid creating new functions”?

                                1. 1

                                  Relevant (for Elm instead of JS, but the point stands): http://martin.janiczek.cz/clanek/being-clever-antipattern-in-elm/

                                1. 5

                                  Wow, way to bury the lead! Check out the mod he made for Blades of Steel and Contra at the bottom.

                                  1. 4

                                    Yeah! It’s kind of hilariously not even mentioned except via those gifs. I was exploring some of his other projects, and they equally (and more, in some cases) impressive.

                                  1. 1

                                    If I understand the docs, it seems like it’s on me, the user, to deploy and manage the code the workers run. It would be great (and a differentiating feature) if dramatiq could handle this – e.g., if the workers were dumb and ran code distributed by the submitter. Deploying code to dozens or hundreds of workers is always what makes these things painful to use.

                                    1. 1

                                      IIRC Cloud Haskell works in the way you propose. While interesting, I don’t think it’s a model I’d adopt for a dynamic language. At least not for your average SaaS workload!

                                    1. [Comment from banned user removed]

                                      1. 2

                                        No, not really – this is for when any particular scope exits; atexit can only fire when the whole process is being shutdown.

                                        1. [Comment from banned user removed]

                                          1. 1

                                            Except in go you can easily make a closure to make a new scope.

                                            func () { v = a() defer v.Close() … } ()

                                            1. 1

                                              Except in go you can easily make a closure to make a new scope.

                                              Do you not understand that closures are a type of function and your observation changes nothing in the fact that Go’s “defer” works at function scope, as described in official docs?

                                              https://tour.golang.org/flowcontrol/12

                                      1. 5

                                        Love that Alsup is a self-taught QBasic hobbyist – discovering qbasic.exe sitting around on my harddrive is how I got my start as well. With qbasic gone from modern machines, what’s filling this role? Javascript? Ugh.

                                        1. 1

                                          I question your assumption that Javascript in the browser is a worse language for a beginner to start playing around with programming with than QBasic was. I agree that Javascript has a lot of design warts and awkward corner cases, and that it was a relatively poor choice to become the ubiquitous scripting language of the web. But at the end of the day Javascript is a powerful and modern programming language that you can build pretty sophisticated software with. More powerful than QBasic was for sure. And having the modern web browser as a platform means a beginner has immediate access to all sorts of cool technologies (3d graphics, network requests, the web itself, etc.) that would’ve blown the minds of kids raised on QBasic.

                                          1. 6

                                            Well, real-talk for a moment: what’s the bare minimum I need to know in JavaScript to draw a simple picture? Without using a library or P5.js or something. Contrast that to QBasic.

                                            I think the most important feature for a beginner is speed of feedback. I should be able to write a line of code, and see an immediate result. A beginner doesn’t care about 3d graphics, network requests, DOM structure, hyperlinks, etc. They don’t yet know enough to know why those things are valuable (or not), or if they do (like 3d graphics), they’re not ready to integrate them into an application yet. Hell, they’re not ready to have an application yet!

                                            QBasic, with no libraries and minimal knowledge, allowed a budding programmer to produce simple-but-interesting programs with a small amount of code, with visual (and audio! don’t forget the PC speaker!) feedback. Don’t forget the value of that kind of simplicity.

                                            1. 4

                                              It’s much more powerful, but try to forget absolutely everything you know about software for a sec and think about what you have to know to write a simple graphical program from scratch.

                                              1. 3

                                                I agree with all of this except that JavaScript is more powerful than QBasic. The “power” of a language is a vague notion which people have conflicting ideas about what it means, and I personally think that’s not the interesting point anyway. I agree with you that JavaScript is an excellent language for beginners.

                                                As remy_porter noted, speed of feedback is really important for learning. Both languages provide this, and I think for Judge Alsup’s purposes they’re quite similar. I would always recommend JavaScript over QBasic to a young person whose goal was to go on to a career in software development, but that has to do with the technologies it integrates with being more contemporary.

                                                Anything the judge learns is going to be out of date for the majority of his career, but that isn’t really a detriment given his goals. In particular since he probably expects to have to rule on more cases require understanding the comparative merits of different programming languages, I think it’s entirely appropriate that he’s going back in the timeline a bit. You really have to go back to earlier languages to understand what motivates modern ones.

                                              2. 1

                                                QBasic here, too. Did VB6 later. Loved the fast startup of environment, fast compiles, English-like readability, and ability to compile-run-debug faster than friends using C. Helped me pick up programming quickly. VB6 similarly started and ran my code both in 1 second on a 400MHz machine. Could throw GUI’s together but learning to wrap Win32 for toy games was a pain. Among other things. That led me to study how the languages could be extended into 4GL’s that made common things effortless to express. Went from there. :)

                                              1. 5

                                                This seems like it could potentially simplify the language a bit – having both ref and var types is a bit strange, and using these to simulate const-ness never felt quite right either.

                                                In my opinion, nim has a problem with the composability of its language features. For instance, async functions use Futures but parallel code uses FlowVars: they’re modeling the same concept but are completely incompatible. ref and var feel like a similar situation – hopefully this consolidation will help!

                                                1. 9

                                                  I’m currently working on a GUI app using Go, and in the process I realized that this is one of the coolest use cases for the “single binary output” feature. No dependencies, no libraries to be installed. Everything that’s needed to run the app on the desktop is contained in that one single binary. The Go runtime, the accompanying dependencies, everything. Coming from the Python world, this is so refreshing.

                                                  1. 8

                                                    Aren’t you just describing static linking? This is an ubiquitous feature among compiled languages.

                                                    1. 11

                                                      “Coming from the Python world” :)

                                                    2. 2

                                                      What kind of GUI? OpenGL?

                                                      1. 4

                                                        Yep, at the moment I’m playing around with https://github.com/golang-ui/nuklear .

                                                        There’s https://github.com/andlabs/ui as well which is really native, but it hasn’t been under development for a year now so not sure what the status there is.

                                                        1. 2

                                                          That’s pretty cool. I’ve used go-qml before and while it’s not particularly lightweight, it’s a pretty interesting framework.

                                                      2. 1

                                                        I didn’t care much for go when I first started using it, but it made the whole deployment pipeline soooo much easier. It’s crazy how much that helps and just sweeps so much stuff under the rug – if you had asked be beforehand, I would have said that the language itself would trump pretty much everything.

                                                      1. 2

                                                        Somewhat on-topic, the best tool I’ve found for managing migrations is sqitch. Not only is it way better than letting whatever obnoxious ORM you’re using manage the migrations, it’s actually pretty pleasant to use.

                                                        1. 2

                                                          This looks very similar to Flyway, which I love for the exact reasons you’re highlighting: you write the updates in pure SQL, making it trivial to use things like UPDATE INDEX CONCURRENT and the like (though unlike sqitch, Flyway does use database version numbers—something I’m okay with, honestly). That said, I don’t honestly find ORM migration tools universally awful. There’s nothing wrong with Django’s/Rails’/EF’s built-in tools for small projects; I’d just go to something like Flyway when the project gets a bit older and you start caring about things like details index specifications/making use of things such as the PostgreSQL update patterns like here.

                                                          1. 1

                                                            One of my team mates at a previous job was able to open-source our schema management tool (https://github.com/dbsteward/dbsteward). It was developed in-house and used in a production environment for many years before things like ActiveRecord migrations were commonplace.

                                                            It requires a good bit of XML/XSLT knowledge but it worked very well for us in a HIPAA/PHI environment where data had to be tightly controlled and audited. It was a useful tool back in 2011 when working in a fairly legacy home-grown PHP codebase. I haven’t used dbsteward since I left that job, so I can’t really comment on using it with more modern frameworks.

                                                          1. 2

                                                            I think if this guy said, “Enough with the dumb javascript build tools already, just use something that already exists,” his point would have come across much better. Nothing wrong with make in my opinion, but I can’t stand learning a new weird JS library to write build scripts.

                                                            1. 2

                                                              I’m just happy this might make namedtuple’s implementation sane. That weird use of eval prevents them from being pickle-able, which every now and then causes issues when I use some library that has namedtuples somewhere deep inside.

                                                              1. 2

                                                                This quote from part 2 resonates with me:

                                                                Schemaless does not mean no schema; instead, it means an implicit schema in the app (a particularly challenging misnomer for anyone outside our industry)

                                                                I’ve tried to make that argument many, many times in my career. My preferred phrasing: “If you can query it meaningfully, it’s structured/schema’d data, regardless of how you store it”.

                                                                I continue to be astonished with how frequently that perspective is considered novel, and how often developers try to argue against it.

                                                                1. 4

                                                                  I say something along the lines of, “It has a schema, the database just doesn’t know what it is.” Or in particularly bad instances, “It has a schema, you just don’t know what it is.”

                                                                1. 2

                                                                  That…seems quite a bit more complicated than it really needs to be. In my experience it’s also good to avoid executing code at import time in these modules, because this code is imported both during packaging and during runtime (for pkg_resources and such). For instance, is README.rst really going to be present in $PWD at runtime?

                                                                  This really could be trimmed down to just that call to setup and nothing more.

                                                                  1. 2

                                                                    For instance, is README.rst really going to be present in $PWD at runtime?

                                                                    I’ve seen variations of this one go wrong myself. Strongly agree that i/o in setup.py is a terrible idea.

                                                                    1. 3

                                                                      Requests has been doing it for like 6 years! Never once been an issue, and we’ve been installed like… more than almost anything else.

                                                                      Just need to specify it in MANIFEST.in.

                                                                      1. 1

                                                                        By the way, I heard about PEP 518 being implemented in pip 10. Do you think setup.py will eventually die as a consequence? In that case, how long do you think the adoption would take?

                                                                        1. 1

                                                                          Given that people are still using Python2.6, quite a while :)

                                                                  1. 3

                                                                    I hate AWS as much as the next guy (fuck data pipelines) but here’s something that’s weird to me:

                                                                    Answer to HN comments: Google doesn’t provide “GCE dedicated instances”. There is no need for it. The trick is that regulators and engineers don’t complain about not having something which is non-existent, they just live without it and our operations get simpler.

                                                                    Is that really how it works? I can’t imagine “but your honor, GCE is cheaper!” would hold up in court.

                                                                    1. 12

                                                                      Actually, yeah. A lot of compliance and regulation, be it PCI or HIPAA, comes down to vague “reasonable precautions” that you’re supposed to take. So if Amazon offers some precaution, even if it’s rather unclear what benefit it offers, it’s reasonable to take it. But there may not be a rule actually requiring physical isolation.

                                                                      The law says you can’t just toss old hard drives with medical records in a dumpster. Some people interpret that to mean you wipe them with dd. Some people interpret that to mean you shred them.

                                                                      Back in the day, we had some customers who said they couldn’t use the cloud offering because of health privacy laws. But other customers determined they could use it once we told them that only authorized personnel had database access. None of this shit is really about security or privacy. It’s just checking boxes.

                                                                      1. 3

                                                                        None of this shit is really about security or privacy. It’s just checking boxes.

                                                                        Tell me about it. My favorite is how everyone wants encryption at rest, which disk encryption satisfies. As if someone breaking into the AWS data center and stealing a rack of hard drives is the risk rather than vulnerabilities in the crappy software in question.

                                                                      2. 1

                                                                        Interesting - I wasn’t aware that GCE didn’t offer dedicated instances.

                                                                        FWIW, Azure offers non-virtualised instances (“Large Instances”). They’re mentioned in some of the marketing material (see, eg this document) but not on public price lists AFAICS. I guess you don’t pay for your 4TB RAM instance with your corporate Amex card…