1.  

    PHP7: good performance, deployment is a breeze, great ecosystem.

    JavaScript: prototypes are fun! Asynchronous programming is easy.

    Bash: very convenient.

    Excel: live variable updating is actually a pretty neat idea sometimes.

    1. 6

      I will give a short talk (10 min) at the PyCon Japan 2019, in Tokyo. The talk is scheduled tomorrow, but I am still polishing my slides…

      1. 1

        A few years ago, I set up a personal SMTP server with Postfix on Linux. I had the chance to own my physical server hosted in a data center with a super clean IP address. Only with rDNS and SPF (I was too lazy to set up DKIM), I was surprised to see how good the deliverability was. I could reach GMail and others without problem.

        1. 1

          I think you need DKIM and DMARC for Gmail these days? But yes, if you disregard Microsofts free mail services and don’t send too much bulk mail, it isn’t too hard.

          1. 1

            I have neither and I deliver to Gmail without problems.

        1. 8

          Fast booting Linux is cool but, for severs (not consumer grade machines), the BIOS/UEFI tend to be so long that the kernel boot time becomes negligible anyway.

          However, I understand that fastboot can be a great value for IoT devices.

            1. 2

              How long does UEFI spend? I’m just glad I don’t have to wait for the memory test in POST any more….

              1. 3

                I’ve already seen 10-30 sec UEFI runtime before even seeing the GRUB interface! With HPE, Dell and Supermicro (which seemed to be the less worse) servers.

                1. 2

                  That’s crazy! What’s it doing in all that time?

                  1. 2

                    I suppose there are a lot of hardware checks (RAID controller, network cards, RAM, …). Since it’s enterprise-grade hardware, I guess those checks are desirable before booting the OS to avoid HW-related crash during production. But, I can be mistaken.

            1. 2

              How does revocation typically work?

              1. 7

                It generally doesn’t, because nobody sets it up. What they do instead is make the certs very short lived. One CAN setup a blacklist.

                As an example, this is hashicorp’s vault implementation of SSH CA key signing: https://www.vaultproject.io/docs/secrets/ssh/signed-ssh-certificates.html

              1. 1

                We love Stellar’s “path payments” system, where a person can send a token or currency to another user, magically transforming it to a different token in the process.

                Interesting. I guess this can make a good system for supply chain traceability or similar stuff.
                The idea has already been explored with other DLTs.

                1. 0

                  When streaming videos, is 4K or 1080p playback that necessary? Sometimes, 720p or even 480p is perfectly fine (at least on YouTube). 480p videos encoded with modern tools (mature codec, good muxers) have a fine quality overall. Lower resolutions leads to less CPU (or even more efficient: GPU) energy consumption.

                  So, as a developer, know your ffmpeg flags ;)

                  1. 2

                    On my 1080p screen, good 480p videos are definitely watchable, but it’s quite apparent how compressed they are. No problem if it’s, say, a lecture series with slides downloaded separately, but I wouldn’t do it for entertainment.

                  1. 27

                    Write less bloated software. Less CPU cycles, less memory, less power needed. Write code that sucks less.

                    Write less bloated websites. Keep them small, cut the Javascript-bloat and tracking. With fewer requests the load on the network is less and visitors wait less.

                    In the real world, try to arrange home office if possible. It saves resources and time spent while commuting.

                    1. 33

                      What about less time spent with (re-)compiling binaries to change a option one your configuration? ;^)

                      1. 16

                        While I want to believe this because I love optimizing the living hell out of databases I hack on, I’m unconvinced that by writing more efficient software it will cause anything other than induced demand. People still have the same number of highway lanes, just smaller cars using them. Maybe the CPU p-states drop a little more often in the short-term, but usage expands to capacity as with so many resources. We use resources we have until we cannot use more.

                        The only solution to using less power is to limit the power that can be used. Optimizations can happen after this vital step is achieved. Until then, we will just maintain utilization.

                        Doing this in any sort of meaningfully large-scale way will require governments to properly capture the externalities associated with various forms of power production over time.

                        When I make programs more efficient, I’m not really helping to encourage governments to do that, and I don’t think I’m helping things in this respect.

                        1. 3

                          Induced demand is definitely a thing, but I could imagine that if you write a fast alternative to some popular website AND it somehow got many users, it would be a net win.

                          For example, whenever I go to weather.com I’m shocked at how slow and bloated it is. If someone wrote a really low latency version of it, and somehow ranked on Google (big if I know), then it might save power overall.

                          Basically I think it’s better overall to attract demand for the efficient thing rather than the inefficient thing. Although I think you would have to be a very rich person to fund this kind of thing, because the market clearly doesn’t pay for lack of bloat in web pages and native phone apps.


                          Or another alternative – if someone here actually works at weather.com, or nytimes.com, cnn.com, I bet you could really make a dent in the power bill without affecting any functionality :) Easier said than done I know.

                          1. 4

                            Or another alternative – if someone here actually works at weather.com, or nytimes.com, cnn.com, I bet you could really make a dent in the power bill without affecting any functionality :)

                            Are you looking for this? https://lite.cnn.io/en ;)

                            1. 1

                              there’s also https://text.npr.org/

                        2. 7

                          On a somewhat related note, use languages that are more efficient, powerwise if possible. https://thenewstack.io/which-programming-languages-use-the-least-electricity/

                          1. 1

                            You can perfectly travel to work without having a too negative impact by cycling or public transport.

                          1. 1

                            I used Bootstrap 4 and it was easier than pure CSS. But everything is not about CSS, there is also the visual look. Since I suck at that, I decided to focus my efforts towards ergonomics and readability and not bother with visual beauty.

                            Overall, I am not that satisfied by the design itself. But, I think my website does the job, so as is it will remain. Ugly, but perfectly readable on all kinds of screens I used so far, and super fast!

                            1. 3

                              I never thought about that hack but it seems to be solid advice. I will definitely give it a try.

                              I suspect the method can work with people from other domains as well, who are not necessarily engineers.

                              1. 1

                                I’ve heard a lot of disdain towards spreadsheet-oriented programming from us, so-called “real programmers”. But, for some applications, it seems to be the best tool. For example, I’m currently working on a scheduling optimization software and it turns out that a spreadsheet-like UX was the best choice (some kind of overspecialized Excel).

                                Like Ted Nelson said about VisiCalc:

                                VISICALC represented a new idea of a way to use a computer and a new way of thinking about the world. Where conventional programming was thought of as a sequence of steps, this new thing was no longer sequential in effect: When you made a change in one place, all other things changed instantly and automatically.

                                From: https://en.m.wikipedia.org/wiki/VisiCalc#History

                                1. 2

                                  Refactoring is much easier, as the type checker will often tell exactly what code needs to be changed. We don’t need to hope for 100% test coverage, which is usually impractical anyway. We don’t need to study deep stack traces to understand what went wrong.

                                  I think this is one of the biggest benefit I will expect from type-annotated Python.

                                  I have worked on large PHP and Python projects and changing our data was always a big source of stress. Even with tests, how could we be sure that we were not forgetting to rewrite a function somewhere to be compliant with the update?

                                  I think mypy could have helped here.

                                  1. 2

                                    Anybody who has tried to set up any sort of non-trivial IoT network has run into this issue. It is very difficult to create a network which covers the entire house without relying on a plethora of gateways and routers, which significantly increases complexity and cost

                                    I think a layer 3 switch supporting VLANs is enough. Bonus if the switch can provide power through PoE fore wire-connected devices.

                                    1. 1

                                      You are correct, that would make setting up a network easier. And you can certainly do a lot of IoT work that way!

                                      However, the point I was trying to make was more about interoperability - right now a lot of IoT protocols make it difficult to talk to the WWW, usually only the gateway can do that. This means that the gateway will likely need custom software that translates between web standards and its proprietary protocol. Thread simplifies things by natively supporting IPv6 routing right down to the end device.

                                      There are also applications where connecting an Ethernet cable is impractical. However, these mostly pop up in industry. For instance, using IoT tags to determine the location of free range cattle, or any other application where a radio device has to move a lot.

                                    1. 2

                                      I started using d3.js recently, for a scheduling optimisation software. The API is so comprehensive and get you covered in a lot of situations.
                                      I was referring to an outdated d3.js guide so far. Now, I know I can refer to this one instead!

                                      1. 3

                                        Honest question: is anyone outside of Fastmail (and Fastmail-owned Topicbox) using this?

                                        1. 15

                                          You’ve got to start somewhere. I’d given up on IMAP ever getting better or being replaced. This is an encouraging step.

                                          1. 2

                                            Absolutely agree, I’m curious to see if anyone’s implemented it independently. It’s been a thing for a few years now, and I don’t recall seeing anyone else implement it but I know my awareness is hardly comprehensive :-)

                                            1. 6

                                              Apparently someone has a grant or something to add JMAP support to K-9 mail this fall. And Dovecot have been talking about adding support for a couple of years, but I don’t see it as having gotten anywhere.

                                                1. 1

                                                  Can’t wait for K-9 to support JMAP! Since better performance over mobile networks is a core goal of JMAP [1], I except to see a fair improvement when I pull new emails over a LTE or 3G connection.

                                                  [1] https://jmap.io/#why-is-this-needed

                                            2. 1

                                              Also, I’m curious why there hasn’t been any move from Fastmail to make it available externally. AFAIK, it’s pretty much an implementation detail of their web client, and there’s no documented way to use an external client connecting via JMAP, nor even mention of it coming in the future.

                                            1. 5

                                              I can’t remember who said it but I always liked the description of C as “universal assembly language”.

                                              I love C, I’d say 50% of the code I write is in C. The other 50% is in Python. I think, though I’m not sure, that it’s going to eventually be 50/50 Rust/Go. The future is coming.

                                              (Along with the occasional assembly language, of course. I’m interested to see what architectures we come up with as silicon real estate gets less expensive. Intel was banking on almost-operating-system-on-a-chip with iAPX 432, maybe we’ll get there eventually.)

                                              1. 5

                                                I can’t remember who said it but I always liked the description of C as “universal assembly language”.

                                                I’ve never really liked that, because it gives people some incredibly misguided ideas about how C works on modern compilers and CPU architectures.

                                                Essentially people naively assume that they can predict what C “naturally” compiles to, and claim this as an advantage of C, when in fact they’re just assuming they have a grasp of what the compiler and CPU are doing when both are frequently doing something else entirely that’s faster but happens to preserve the semantics.

                                                1. 7

                                                  Look at Mr. I-Can-Afford-Something-Better-Than-A-PDP-11 over here.

                                                  1. 1

                                                    Hey, I’d love to be able to justify buying a working PDP-11. Found one for sale for about the price of a high-end laptop.

                                                  2. 3

                                                    Dont forget D, Nim, and Zig. Especially D given its maturity and compile speeds.

                                                    1. 11

                                                      Don’t get me wrong, but I feel like D has been “almost there” for like 20 years now.

                                                      (Fun fact combining my love of computer science and the history of western religion: “Nim” was originally named “Nimrod”. Nimrod was “a mighty hunter before YHWH” (the tetragrammaton, there’s a lot to discuss there, along with the exact meaning of “before”) in Genesis. “Nimrod” became an insult in English when Bugs Bunny mockingly called Elmer Fudd “a mighty hunter” and a “Nimrod” in a cartoon in the 1950’s.)

                                                      1. 6

                                                        Re D. The licensing situation caused a lot of it. Now, they have a lot of features, a fast compiler, and a compiler for faster executable. Maybe it just needs a killer app or big company backing it.

                                                        Re Nim. I knew about Nimrod. I assumed the negative connotations were why they changed the name. I never checked, though.

                                                        1. 8

                                                          The licensing situation caused a lot of it.

                                                          RIP REBOL

                                                          1. 7

                                                            RIP REBOL

                                                            Fortunately, there is the Red programming language

                                                    2. 2

                                                      I think, though I’m not sure, that it’s going to eventually be 50/50 Rust/Go

                                                      Both languages make a lot of sense and I can imagine smart companies having this kind of mix (with some JS or python added, probably). But it looks like a strange mix for a person in my opinion.

                                                      If you manage to maintain the ability and mindset to efficiently code in Rust (which is a real burden), is there really a reason to write anything in Go ? I don’t see one but I’d welcome your argument.

                                                      1. 1

                                                        If you manage to maintain the ability and mindset to efficiently code in Rust (which is a real burden), is there really a reason to write anything in Go ? I don’t see one but I’d welcome your argument.

                                                        Perhaps you are hoping for contributors who haven’t learned to live with the borrow checker. Perhaps your program is fairly simple, and you want to distribute cross-platform binaries (for cross-compilation, rust is better than C, but light years behind go)

                                                        1. 1

                                                          Depends on how well one knows/likes Go, really. I’m not good enough at it to think of it as replacing Python for quick-and-incremental tasks, but I could see where others might.

                                                        2. 1

                                                          I’d say 50% of the code I write is in C. The other 50% is in Python.

                                                          For me it’s 50% C and 50% Go. I like working with types too much.

                                                        1. 2

                                                          I fell into this trap before. Some years ago, at my first job, I was in charge of designing and developing a Web broadcast planning tool. I replaced all native array methods by hand-written forEach/map functions and some lodash ones.

                                                          It was (a bit) faster. But, I spent ~1 month doing it.
                                                          The problem is, it added too few value but it costed 1 month of development.

                                                          1. 2

                                                            agree, exactly. I bet there are lots of similar stories out there

                                                          1. 2

                                                            Declarative email filtering can be done with procmail. In what way is this better or a different use case?

                                                            1. 2

                                                              I can think of at least two reasons:

                                                              1. a (in my opinion) saner syntax
                                                              2. doesn’t have to run on the mail server
                                                              1. 2

                                                                I didn’t know about procmail. It seems to me that the main difference is that imapfilter is like procmail, but with the capability to do its work over IMAP.

                                                                1. 1

                                                                  Procmail still exists as a package on most systems, but the source project is not really maintained anymore.

                                                                1. 5

                                                                  Did you know that any standard-compliant email service allows users to have a near-infinite number of email addresses?

                                                                  Which standard would that be? The ‘+’ symbol is valid in the local part of an address as per the classic email RFCs. But the notion of “plus addressing” is only a de-facto standard feature that a lot of mail providers accept. It’s not codified in a standard as far as I know. And so there’s no guarantee that user+foo@example and user+bar@example are both valid nor reach the same person.

                                                                  1. 5

                                                                    Similarly, a “standard-compliant” implementation will treat johnsmith and john.smith as specifying two different mailboxes, but GMail has popularized “dots don’t matter”. And a compliant implementation will treat johnsmith and JohnSmith as specifying different mailboxes, but most mail hosts treat the local-part as case-insensitive (despite the standards saying that only the special mailbox postmaster gets case-insensitive treatment).

                                                                    And on and on. So many of the things people get indignant about, and start demanding “compliant” implementations for, are behaviors that aren’t in the RFCs.

                                                                    1. 3

                                                                      a compliant implementation will treat johnsmith and JohnSmith as specifying different mailboxes, but most mail hosts treat the local-part as case-insensitive (despite the standards saying that only the special mailbox postmaster gets case-insensitive treatment).

                                                                      According to RFC2821, the definition of a Mailbox is:

                                                                      Mailbox = Local-part “@” Domain
                                                                      Local-part = Dot-string / Quoted-string
                                                                      ; MAY be case-sensitive

                                                                      The definition of MAY is defined elsewhere:

                                                                      This word, or the adjective “OPTIONAL”, mean that an item is
                                                                      truly optional. One vendor may choose to include the item because
                                                                      a particular marketplace requires it or because the vendor feels
                                                                      that it enhances the product while another vendor may omit the
                                                                      same item.

                                                                      So, unless this has been superseded it appears that mailboxes don’t need to be case-sensitive.

                                                                      Edit: RFC2821 was in fact superseded by RFC5321, but it did not make case-sensitivity a requirement.

                                                                      1. 2

                                                                        RFC822:

                                                                        Note: This reserved local-part must be matched without sensitivity to alphabetic case, so that “POSTMASTER”, “postmaster”, and even “poStmASteR” is to be accepted.

                                                                        Shifting all local-parts to “MAY” be case-sensitive in later RFCs doesn’t undo the original damage, since now you have to play games with which set of RFCs the “compliant” implementation complies with.

                                                                    2. 1

                                                                      I may be mistaken, then. I will dig that issue and edit my post accordingly if I cannot find the relevant RFC or something. Thanks for the comment, and sorry for the possible mistake!

                                                                    1. 2

                                                                      I’m considering learning Mithril v2. I’ve heard a lot of good things about it.