1. 2

    Cool book! Though it’s a bit weird that a math language is being used rather than a programming one, i.e. using something like Python would be more suitable for the mission, right?

    1. 5

      Great writeup and I have to give mad props to rust community! I’m a python developer one of the reasons why I love python is that there are brilliant resources for everything and Rust while being a much younger language already developing very similarly (documentation wise). I already have dozens of really great rust resources from lobsters/hackers alone that I eventually plan to go through once I find a reason to write low-level code.

        1. -1

          You shouldn’t trust any web page that uses sticky banners, that’s for sure.

        1. 2

          What a great post, however I feel it didn’t mention a very important idea: give some space for readers to breathe!

          Technical blogs tend to be quite long and information packed, inclusion of some illustrations or even joke images can make a big difference.

          1. 5

            I would actually disagree about jokes. I’ve read several posts here that, while being superb in quality, were made less appealing due to the inclusion of jokes. The most ‘severe’ offender is Kindness for Mean Girls. I found the humor to be simply a distraction from the actual content of the article, which to me was far more interesting and engaging. Similarly, the jokes in the recent CRDT series, while not nearly as emphasized, seemed unnecessary. I loved both articles - but to me, the jokes weren’t an improvement.

            I appreciate written articles and books because the pace at which you go through them is entirely your own. You’re fee to read faster or slower, and to take breaks. If I wanted to take a breather, I would simply pause reading. This would happen on my own terms, as opposed to being enforced on me at a point where the author deems it necessary to sprinkle some humor.

            I also suspect that the points at which ‘breathers’ are necessary depend a lot on the prior experience of the reader. If I wanted to read something on type theory of operational semantics, there’s a good chance I wouldn’t need to pause. If, on the other hand, I tried to read the same content 2 years ago, I’d probably need to stop after every sentence. Rather than diluting the content of the post with jokes and funny images to help 2-years-ago me (who is perhaps the lowest target for any technical article, really), I’d prefer that authors didn’t make assumptions about what would be easy for me and what would be hard.

            1. 4

              The good bit about extra stuff is that you can easily skip it. I’m sure lengthy pieces like books and articles can benefit of a more formal structure but posts (as in blog posts) that is characterless wall of text with some formatting sprinkled in is big pass for me. If I want that I can get a book or read the docs which are not gonna be outdone by a short blog post.

              Inserting blurbs, jokes and other extras is far from being some sort of new concept. If you open up any decent education book you’d notice it’s filled with quotes, info blurbs, illustrations and often even jokes.

              1. 2

                I don’t think it’s that easy to skip extra stuff. At the very least, it requires you too look and see whether or not the piece of info is relevant. That alone takes some cognitive effort.

                If you open up any decent education book you’d notice it’s filled with quotes, info blurbs, illustrations and often even jokes.

                I mostly disagree about jokes (and joke images in particular, as described in your original comment). Could you please give an example of such a book? I’m having trouble thinking of a book I recently read that featured a noticeable amount of jokes. My sample is rather obscure; the books that I’ve read (and found very good) in the past couple of years are:

                • Types and Programming Languages
                • Implementing Functional Languages: a tutorial
                • Static Program Analysis
                • The Cambridge Handbook of Computer Science Education
                • Logical Foundations
                • Visual Explanations (not in its entirety)

                I’m not quite sure what you mean by “education book”. The Cambridge Handbook is a book about education. I dare say it’s quite good; however, I do not remember it including any jokes. The rest of the books in the list are meant to teach a subject, and they all do not include jokes, either (or much of anything “extra”, really).

                That’s not to say that technical articles can’t be funny. However, rather than dropping an image between paragraphs with a pun or somewhat relevant joke like the Mean Girls article I linked, I think it’s more tasteful to imbue the technical content with humor. The example that comes to mind is from the paper A Taste of Linear Logic by Philip Wadler. Linear logic concerns the distinction between propositions with exactly one use, and propositions with an infinite number of uses. Wadler walks through some examples of this concept, but uses “I have money”, “I can buy pizza”, and “I’m happy” as propositions, leading to amusing claims such as “Infinite pizza does indeed lead to infinite happiness”. This is funny, but it still advances the reader’s understanding. The problem here is that doing so requires a lot more thought and writing / rewriting, like @andyc points out above.

                I do completely agree about illustrations being essential to educational material. It’s one thing to talk about lattices and order, but it’s a whole another to provide a picture to make it clear what it all means. However, I think images are essential for their explanatory value, rather than their effect on the “weight” of the post. If text intimidates the reader, then they have a nice side effect of reducing text density; however, this is not their primary purpose.

                As Antoine de Saint-Exupery once said,

                Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

                I think jokes, for the most part, can be taken away.

            2. 1

              I don’t like most jokes/memes in technical writing, but I like to give the reader some air with one or more examples. I like to include examples that should be trivial to understand if the reader understood everything in the more technical/theoretical part. Chances are (s)he didn’t, and can improve (or ‘debug’, if (s)he misunderstood something) his/her understanding with the example.

            1. 2

              My only real complaint with Hugo is the difficulty in making your own themes. I did not find their documentation for theme-makers to be very helpful at all.

              I understand the concepts of partials and that they piece the page together into different “puzzles” by using variants of a partial, but I don’t understand how to change which page gets which assembled “puzzle”.

              1. 5

                The first comment on the lwn post has a reference to a themeless setup for Hugo. The themeless theme sets up a barebones Hugo site. It might be helpful in learning theming because there is very little in the templates and css files to it is easier to work with them than more established themes.

                1. 2

                  I actually found creating my own theme pretty straightforward, especially after trying to do it in Pelican. In a simple case you need only two templates (“list” and “single”), as opposed to a dozen in Pelican. Because of this it’s also easier to create a non-blog in Hugo, as many templates required by Pelican stop making any sense when you don’t create a typical blog.

                  1. 2

                    I think I just need to start fresh as I think I went about it wrong after looking at what @eb commented. I did some very dirty solutions to get things working early on and I think that is contributing to the current issues.

                    1. 1

                      That’s not true at all, in Pelican you only need index and page templates, everything else can be empty. Explicit is better than implicit so if empty files bother you then you can hide them on your system file browser or something.

                    2. 2

                      My current site is built using Gatsby, which, while cool, is a nightmare to keep updated. I’d heard of Hugo, and figured porting my site would be fairly easy since it’s a single-digit number of blog posts and a super basic stylesheet.

                      After fighting with Hugo and their docs for at least three hours, I gave up and just wrote my own site generator. I’m sure Hugo is great for complex scenarios, as most static site generators probably are, but I wanted a home page, list of posts, a post page, and nice syntax highlighting. I couldn’t manage to get that with Hugo as easily as I thought it could be.

                      On the plus side, my site generator is the only one I’m aware of that uses the same syntax highlighting engine as VS Code, so all my code snippets are now super colorful!

                      1. 1

                        I’m using Hugo for several projects and have a similar experience. I still cannot confidently say I know how to solve the simplest tasks like list posts with some conditions or create an archive page. This is mostly my fault, but Hugo’s documentation does not help.

                        1. 1

                          Would you mind sharing a link to your generator if it is open source?

                          1. 2

                            I still need to get inlining of small assets working, but maybe I can use this as motivation to finish it soon! I’ll reply again once I’ve published it.

                        2. 2

                          Check out Pelican. It’s using Jinja2 for better templating and it’s a really nice templating engine also used by Django.

                          1. 3

                            Django doesn’t actually use Jinja2 (at least not by default, you can configure it to do so) but it’s own templating engine. They are however very similar since Jinja2 is actually modelled after the Django templating engine.

                        1. 3

                          Nostalgia.

                          1. 4

                            Indeed, Turbo Pascal that was taught in my high-school and I vividly remember struggling with a thought on procedures: “who on earth would use these when you can use write the code without them” 😂

                            I generally feel that it was a very good introduction language for that time, maybe it still is? At the time other schools at neighboring countries were doing high-school introduction to programming in C which to this day makes me shake my head in horror lol

                            1. 3

                              Still quite a nice and friendly way of doing a cross-platform application that is easy to install and use ..

                              1. 2

                                My reaction exactly. When I started university, we were taught Pascal with Delphi 5 (not using any of the GUI features, just as an IDE for writing command-line apps in Object Pascal). Delphi 3 was a free download, but it had a bunch of serious bugs (I spent a whole day tracking down something where one of the slightly obscure string-manipulation functions was documented to take a pascal string, actually took a C string, and for some reason the type checker let you pass either). We had the Free Pascal Compiler installed in the computer society’s machines[1], so I started writing the code in their lab, or in vim over ssh when I wanted to keep working on it from my room[2]. Free Pascal Compiler made that course a lot easier. I never used it for anything after that course. It’s probably hard to avoid hating the first programming language that you were forced to learn, after the half dozen or so that you learned for fun.

                                [1] Well, actually, machine. At the time, the computer society had silver.sucs.org, which was a 200MHz (I think) Pentium (clone?) that was Internet facing and did mail, talker, and web hosting for the society and platinum.sucs.org, which was a 133MHz Pentium (I think with 32MB or RAM, maybe 64MB?) that ran remote X sessions for half a dozen SparcStation 2s, which we were using as dumb X servers. I’m still amazed that a 133MHz machine could run rich GUI sessions for so many users back then when today a 1GHz single-user mobile phone feels painfully slow.

                                [2] That was probably when my vim addiction started. Any decade now I’ll manage to kick it!

                              1. 4

                                I think Łukasz Langa, Python core developer, has some serious comments about the benchmark setup: https://twitter.com/llanga/status/1271719778324025349?s=19

                                1. 3

                                  Thanks for linking this. A bit of rebuttal from me:

                                  1. As I stated in the article, I did try 4 async workers. Performance was worse than with 5 workers (though not hugely). I don’t have a potted explanation for this I’m afraid - I can only say for sure that using 4 async workers instead of 5 did not change the results for the better in asyncland. (Note: I tried varying the worker numbers for all frameworks individually, not as a collective).

                                  2. I take the point about running the whole thing on one machine. It would be better if I hadn’t of course. It seems unlikely that doing so would change the result since load on the other components was so low. I would be keen to read of any benchmark results using such a multi-machine setup, particularly any that find favourably for async, as I don’t know of any. I would add for anyone hoping to replicate my results (as friend of mine did): it takes a lot of time. It’s not enough in my opinion to just throw up these servers in naive manner, you need to make a good faith effort to tune and add infrastructure to improve performance. For example, when I ran the async servers without a connection pool they broke everything (including themselves).

                                  3. Beyond my own results, there is a chunky body of extant “sysadmin lore” that says: async is problematic under load. I reference a few of the publicly available reports in my article: from Etsy; claims from inside a ridesharing startup; etc. I have also had negative private experiences too (prior to asyncio). The SQLAlchemy author wrote several years ago about this problem and kindly appeared in the HN thread to repeat his claims. The Flask author alluded to unfavourable private benchmarks, presumably from his workplace. The list goes on (including in other language communities).

                                  1. 4

                                    Hi.

                                    The point about not scaling above ~4 workers on 4 vCPUs has little to do about 4 vs 5 workers. It’s about being able to saturate your CPU cores with much fewer processes compared to sync workers.

                                    You could at least acknowledge in your post that sync frameworks achieve on par performance by using more memory. Hard to do an exact apples to apples comparison but the idea stands: async frameworks allow much denser resource usage.

                                    The reason why running your database with your Python process is not a realistic case goes beyond the operational problems with it (no high availability, no seamless scaling, hard upgrades and backups). The problem is that it unrealistically minimizes latency between the services. It doesn’t take much for the sync case advantage to go away as soon as you put the database on a separate box.

                                    That separation would also allow for cheaper scaling: you can run just a few micro instances with little memory and a single vCPU and async workers will be perfectly happy with that.

                                    Finally, appealing to authority and “sysadmin lore” should be out of scope for a benchmark that tries to be objective. For every Etsy I can give you Facebook that moved entirely to an async request model, including Instagram which is using Python 3. And Nginx which you’re using yourself in your benchmark was a big upgrade over Apache largely because of its single-threaded async model vs. a pre-fork server.

                                    You also need to be careful whose authority you’re appealing to. Quoting Nathaniel J. Smith point out deficiencies of asyncio loses its intended strength when you add that he is such a strong proponent of asynchronous programming that he created his own framework. That framework, Trio, is a fantastic research environment and already has informed evolution of asyncio and I’m sure will keep doing so. That’s the point: Nathaniel’s posts aren’t saying “stop using async programming”. They are saying “here’s how we can make it better”.

                                    1. 2

                                      The memory point is fine - for sure less memory is used. How important that is depends on deployment, as traditionally memory usage is not a huge problem for webservers. I contend: not very important for most people.

                                      I don’t accept that the implication that I need to build a HA postgres cluster with backups and replication chains and whatnot in order to test. That would just raise the goalposts so high that it would just be a huge amount of effort and cost for anyone to construct a benchmark. If you’re aware of a cache of publicly available benchmarks that met your exacting criteria in this respect, referencing them would be great.

                                      Going to the harder nut of that - the lower latency via running on the same machine - I am doubtful about how much it matters. Adding more blocking IO operations is simply not going to help because (as I stated elsewhere on this page) IO model just does not seem relevant to throughput for “embarassingly parallel” tasks like webservers. The fact that UWSGI is native code is the biggest determinant of throughput. For response times of course, doing something else while waiting actually seems to hurt - async workloads don’t get scheduled as fairly as the kernel scheduler does for processes.

                                      Nginx using async is fine - everyone seems to think that nginx works ok and the Python community did not have to rewrite a large portion of their ecosystem in order to switch from apache2 to nginx.

                                      On the subject of syadmin lore - I’m afraid that I don’t agree that it is out of scope! I’m not bound by intergalactic law only to consider my own evidence and I think it’s probably a good idea to consider outside evidence as well as what I have available to myself - after all it’s not as though I will have many opportunities to replicate multi-year programmes of software engineering in a cleanroom environment.

                                      Thanks for taking the time to find me on a different medium in order to respond.

                                  2. 1

                                    I mean you really shouldn’t go past the title here.

                                    The claim that sync code somehow would be faster is absurd in its own righ unless your program has absolute 0 IO wait the async overhead will always be lower than benefits.
                                    The only really argument here would be this increased code complexity increases likelihood of faults.

                                    1. 2

                                      The claim that sync code somehow would be faster is absurd in its own righ unless your program has absolute 0 IO wait the async overhead will always be lower than benefits.

                                      Maybe true in python, I don’t know. Demonstrably untrue for high-throughput work on servers with high core counts due to the locking overhead.

                                      1. 1

                                        And yet it is faster and I try hard to explain why in the body of the article (which of course I recommend strongly as the author of it :)). To briefly recap:

                                        1. IO model is irrelevant as OS scheduled multi-processing solves the problem of embarrassingly parallel workloads blocking on IO
                                        2. Use of native code matters a great deal and is otherwise the dominant factor
                                        1. 1

                                          And yet it is faster

                                          To me it seems like really digging for minute edge cases.
                                          Async code, especially in python, is about implicitly eliminating wait. Meaning I can deploy my app anywhere, on any machine, in any way and it will always choose to optimally manage IO wait time.

                                    1. 8

                                      I recently moved from cold north-europe to Thailand and while I was big dark theme advocate and used it everywhere I did a complete 180° here. It’s just so bright here and it’s so nice to work in brighter environments. I’m even waking up early at 6am to enjoy working outside in the balcony. Even so early in the morning and with modern screens it’s still very hard to clearly see and read with a dark theme. Clearly a light theme is the way to go here in Thailand.

                                      What I’m getting to with my anecdote is that this seems be an issue of environments. I think all of the pros/cons can flip right over when the screen is moved somewhere else. Even with my love of light solarized theme I’d probably switch right back to dark theme if I’d have to move back to cold, north-european winter.

                                      1. 4

                                        Clearly a light theme is the way to go here in Thailand.

                                        Conversely, due to the heat (edit:) and humidity it’s entirely possible someone in Thailand will work inside with less natural light.

                                        Geographic location likely has very little impact on whether a light or dark background produces less eye strain. The work area level environment has a lot of impact on it. You could be working in a cloudy city and I’d imagine that working from a balcony would still be too bright for dark mode to be “better”.

                                        1. 3

                                          What I’m getting to with my anecdote is that this seems be an issue of environments.

                                          This seems to be my experience as well. In winter months, I’m perfectly happy with dark themes but in the summer, especially in the morning, or when I’m working from coffee shops I just need the light mode. One other thing that seems to be a factor here is what I’m working on: for example if I have dark theme in the editor and the terminal, but no way of changing it in other windows that I also need to use (like in the browser or PDF reader) then it’s awkward to switch from dark to light and I just prefer to use light mode everywhere.

                                        1. 12

                                          Great introductory article! Both twitter and mastodon have their upsides and downsides but overall, mastodon generates a better experience, conversations are generally more civil. Having different timelines means you can have both diversity of content and content focused on your area of interest. No “shouting in a metropole”, instead “talking inside the village and between villages”.

                                          Do note I say mastodon and not fediverse. The fediverse itself is a large creature with many facets and there’s much to love about it. But mastodon is the closest the fediverse has to twitter, therefore I’m singling it out in the comparison above.

                                          1. 4

                                            mastodon generates a better experience, conversations are generally more civil

                                            I’d agree to an extend but how big of an effect do you think Mastodon has on this? I’d argue that Mastodon is very much capable of suffering from twitters issues and if you look into the biggest instance: mastodon.social you can see that the discussions there tend to be equally toxic as on twitter.
                                            I think the key difference here is the federation/fediverse itself. As you pointed out talking “inside the village” is what makes experience better than twitter and the village effect really falls apart in big, general instances.

                                            So I think the real strength is federated niche communities of subjects and that should be encouraged over mass general instances.

                                            Other than that I really liked how Diaspora approached this issue by putting emphasis on micro-blogging rather than “shouting to the void”. I believe that full formatting and high text limit allowed people to produce beautiful discussions and experiences and really enabled to constrast to weed out the screamers: someones well put together 1 minute read triumph over 10 character sentence any time of the day when put side-by-side.
                                            Another great lesson from Diaspora was emphasis of tags to create these niche villages where healthy experiences could be had.

                                            All in all I think Mastodon is only a slight improvement over Twitter and the fediverse itself contains much valuable implementations of micro-blogging idea.

                                            1. 8

                                              You are absolutely right. Simply put: mastodon.social is no better than twitter. That’s why this instance should, imho, be avoided as well as the new instance the developer is now promoting. Do a few minutes of digging and you’ll find an instance that suits you. And if you really have those like-minded people around you and you watch what they boost, you will find the good people on the large instances while filtering out the toxic.

                                              To some extent… No social network, be it physical or digital, is perfect.

                                              1. 4

                                                Do a few minutes of digging and you’ll find an instance that suits you.

                                                Honest question: where do I dig? Is there a repository for most instances along with a short description of their aims and policies?

                                                1. 3

                                                  That is still the single most important issue with the fediverse: discovery.

                                                  There are sites like: https://fediverse.network/ https://fediverse.party/ https://instances.social/

                                                  Hope they help, but no guarantees.

                                                  Personally, I made an account, ended up not liking the people and discussions there. I looked around, searched the hashtags I was interested in, looked at what instance most people were on who discuss those topics. Turns out most people who talk about #foss are on fosstodon.org, so that’s where I made my account, have been a happy camper ever since!

                                                  1. 2

                                                    Even if you do end up on the flagship instance (not that I recommend it) you can switch away later once you find a better place, and all your data and followers will go with you: https://blog.joinmastodon.org/2019/06/how-to-migrate-from-one-server-to-another/

                                                    I moved from a medium-sized instance to running a Pleroma off the pi3 under my desk and it wasn’t really a big deal.

                                                    1. 2

                                                      Sadly, there isn’t really a place for this (somehow). instances.social claims to be good at this, though from my experience it isn’t worth the time. Mastodon’s Homepage has a list of about 30ish instances. Some other instances I can recomend are bsd.network, fosstodon.org, libretooth.gr, social.privacytools.io and also social.nixnet.services

                                                  2. 2

                                                    So I think the real strength is federated niche communities of subjects and that should be encouraged over mass general instances.

                                                    Easier said than done when your instance doesn’t comply with what a lot of instance maintainers believe. Your instance may end up on a shared blacklist and get defederated from if it doesn’t defederate from other certain instances, essentially treating a majority of mastodon as its own network, just over volunteer-ran servers where fringe instances may as well be in their own unique bubble.

                                                    1. 4

                                                      There’s tiers of federation / blocklists.

                                                      At one extreme is the relay; everything posted to instance A is on the public timeline of instance B.

                                                      Next is the default setting for mastodon: if user@instanceb talks to user@instancea, all toots from both users will appear on the public timeline of both instances.

                                                      Most shared blocklists are used for the next setting, ‘federate interactions, but do not publicise them’. user@instancea and user@instanceb can talk to each other but only people they tag will ever see it.

                                                      Finally is the ban; instance B will never connect to instance A under any circumstances. This is absolutely required censorship functionality (consider ‘content posted to instance A is frequently illegal in the jurisdiction governing instance B so we really can’t host it’). Instance moderators are mostly unpaid, so it’s unsurprising you see them taking shortcuts to avoid trouble.

                                                      The underlying problem is that last one: “Instance moderators are mostly unpaid”. Your options are to pay for censorship you like, or get censorship you dislike for free.

                                                1. 1

                                                  Name your command after what it does. If it makes a directory, name it make directory. If it types a file, don’t name it dog, sheep or cat.

                                                  1. 5

                                                    Ahem… “concatenate” is exactly what cat does. Pretty sensible abbreviation, really.

                                                    1. 1

                                                      No, it’s a cute abbreviation, but not sensible. Why would you even need to abbreviate a command like that?

                                                      1. 5

                                                        Because tab expansion is a modern luxury, and because screen space costs too, even nowadays. Not satisfied? OK… because verbosity becomes tiresome and thus abbreviation is a normal part of human linguistic practice everywhere.

                                                        “Note the obsessive use of abbreviations and avoidance of capital letters; this is a system invented by people to whom repetitive stress disorder is what black lung is to miners. Long names get worn down to three-letter nubbins, like stones smoothed by a river. “

                                                        (except from Stephenson’s classic essay In the Beginning was the Command Line)

                                                        1. 2

                                                          If tab expansion is a modern luxury, then so are glass TTYs. If we change perspective to the last 30–40 years, we can consider that that is a long enough time span to change expectations of how a computer interface behaves.

                                                          Stephenson’s essay quickly manages to confuse principle with implementation, delving into plain fanboyism toward the end. It is not to be read as a guide how to create computer systems.

                                                          1. 3

                                                            I don’t think anybody’s suggesting that the essay is in any way prescriptive. And I agree, the UNIX command line is a pretty lousy UI – but I think having short names for very common commands is hardly the worst thing about it. More to the point, it’s embedded in a long and rich history that includes many worse-is-better design choices, which have proven unfortunately durable for reasons that are worth understanding.

                                                            We’re talking past each other. You want to stay in the land of “ought”, while I think we can’t really get much useful work done there without at least attempting to understand why things are the way they are here in the land of “is”.

                                                        2. 2

                                                          That word is absurdly difficult to spell and is 11 character long. It would be an awful name.

                                                          1. 1

                                                            Then name it something else, like show, type or read.

                                                            1. 1

                                                              But it doesn’t read or show or type files, it concatenates them. You could call it join but it’s called cat. Does it matter what it’s called? None of the names actually tell you what it does. join could do all manner of things. type could tell you what type of file it is or allow you to type out a replacement file. show could show the file in full screen analogously to a slideshow. read could read the file aloud.

                                                              Given that you need to learn what it does regardless of the name, why does the name really matter? It would be annoying to rename the command and you’re never going to get rid of the original name or overload it anyway because it’s one of the most used Unix commands, so all you’re doing is just taking up more space in the namespace of short commands (which is small) to do something we already have a name for.

                                                              1. 1

                                                                If cat concatenates files, how does one display a text file on Unix? Copy it to /dev/lpr?

                                                                Learning Unix is an investment that few are willing to do more than once in a lifetime. Imagine if there were two or more systems with a similar, but different stance on user interfaces – one where the command to concatenate files was called ten for conca_ten_ate and ten -u was considered harmful. Since this is a huge investment, those who have done it already become change-averse since it lowers the value of their investment.

                                                                But as with anything in computing, even the oldest things are only so old that many of the original pioneers are still alive. There will be new people having to learn that cat displays files “because it con_cat_enates files”, and over the course of time, newcomers will outnumber those who already know and can reap the benefits from knowing.

                                                          2. 2

                                                            Tab expansion results in write-only code that is difficult to read. concatenate is too long a name. It gets in the way. Commonly used Unix commands are basically syntax in the language of Unix, they’re function words and not content words. cat is grammatical, not lexical. It’s like have in “I have never been to America”. What do we do with lexical words? We abbreviate them. “I’ve never been to America”. “I’d prefer not to”. Spending 11 characters in a line on grammar is a waste of space that obfuscates the meaning of a script or command.

                                                            1. 1

                                                              Sorry, but how can you say that tab-expansion results in write-only code that is difficult to read?

                                                              Is “I have never been to America” really more difficult to read than “I’ve ne’er ‘n t’ ‘merica”? We don’t abbreviate words to make them easier to read, we do it to make them easier to write.

                                                        3. 5

                                                          The command for making a directory is mkdir and if I had to type out make directory every time I wanted to make a directory I’d throw every single file I touch or use into my home directory.

                                                          Is git a bad name? I know it’s named after Linus Torvalds (har har) but it certainly doesn’t say what it does. The first version control system was called Source Code Control System, or scss. Replacing that was the Revision Control System or rcs. Then of course there’s cvs for Concurrent Version System. But do you have to invent a new synonym for each new one that comes along? Should the next have been vcs for Version Control System, then perhaps git could be called dvcs for Distributed Version Control System, but of course it wasn’t the first of those. Maybe BitKeeper would have been dvcs and git could have been Distributed Revision Manager or drm.

                                                          If something is a small utility that genuinely only does one thing and you can abbreviate that one thing down to a single command name that less than 6 characters long, go for it. cc for C Compiler, rvm for Ruby Version Manager, etc. But generally there comes a point at which you want something to just have a name, like git or hg or vi or python.

                                                          1. 6

                                                            What works very well to name projects in general is [fantasy name]+[what it does]. The fantasy name (or company name) gives you a namespace. The second part makes it obvious what it does.

                                                            Good examples: Apple Mail, GNU C Compiler, Microsoft Paint

                                                            1. 2

                                                              Note that from this point of view, having “util” or “tool” in the name makes perfect sense. If a project is named “fyblid”, what should a client program for talking to it be named? “fyblid-util” of course. Or perhaps “fyblidctl”.

                                                            2. 1

                                                              Why would you need to type out make directory each time you want to make a directory?

                                                              1. 4

                                                                If it makes a directory, name it make directory.

                                                                1. -1

                                                                  One doesn’t imply the other.

                                                                  1. 3

                                                                    Are you being intentionally obtuse?

                                                                    1. 1

                                                                      Not as obtuse as software designers who couldn’t come up with a better control method than renaming every command as two-letter rebuses.

                                                          1. 2

                                                            I have few problems with this article:

                                                            • Some examples are seem a bit rigged and nothing to do with “flat UI”. The Hertz example has nothing to do with flat ui in particular as the second website just fails to indicate “tab” rather than having some flat ui flaw.
                                                            • Last example compares blues links vs purple ones which is again kinda silly. Blue links are automatically associated with “new” unvisited websites as that’ll obvioulsy have higher interaction thatn Purple links which are associated with visited websites.

                                                            I feel that flat UI is more about getting rid of unnecessary information like gradient. What does the gradient add to the button that a slight shadow couldn’t do? Flat icons are also provide the same information without taking stealing attention like detailed graphic art.
                                                            When I open up non-flat designs I often see every part of UI screaming “look at me!” - everything is so loud and tiring. Flat UIs generally are more silent and when everything is silent it’s easier to be the voice that guides the user. Though I guess sometimes designers forget that and users are left stranded in a silent room.

                                                            One thing article did get right imho is underlines. Underlines are really awesome way to emphasize details!

                                                            1. 3

                                                              Some examples are seem a bit rigged and nothing to do with “flat UI”. The Hertz example has nothing to do with flat ui in particular as the second website just fails to indicate “tab” rather than having some flat ui flaw.

                                                              The distinction is with how strong or weak the interaction signifiers are. The premise of the article is that Flat UI tends to coincide with weak signifiers, and in the Hertz example removing the 3D details (the way drop shadows fall from one object onto another) altered the perception of the tab interface.

                                                              Last example compares blues links vs purple ones which is again kinda silly. Blue links are automatically associated with “new” unvisited websites as that’ll obvioulsy have higher interaction thatn Purple links which are associated with visited websites.

                                                              That example is given to back up the assertion that as long as in-line text links are presented in a contrasting color, users will recognize their purpose, even without an underline., i.e. that they offer reasonably close performance.

                                                              The author is not against flat UI; but she does recommend ways to make it work better for users.

                                                              (Later edit) Also of interest: Response to Criticism of Flat Design Eyetracking Study

                                                            1. 2

                                                              I’ve been willing to write a blog on this but here’s a short summary

                                                              1. Python shell - I’ve been using ptpython and xonsh shells to quickly implement custom data processing pipes as I do a lot of data programming but even if you don’t, python as a shell language is amazing.
                                                                Having access to real time play environment is huge boon for productivity.
                                                                I also migrated to invoke instead of make which is really awesome.
                                                              2. Bin - all of the tiny live scripts you sometimes write or your occasional workflows can be optimized and saved. There are a lot of great CLI libraries that make writing CLI scripts a complete breeze so set up your ~/bin with some CLI scripts. Putting yourself in the battle rather than using some mystic one liners from stackoverflow is a brilliant exercise and keeps you in shape.
                                                              3. Vim - people talked about this already but editor is really important. Try neovim, kokoune or emacs. A lot of software like Jetbrains IDE’s have vim emulations too!
                                                              4. Task managers - you can be an amazing programmer but if you’re unorganized you’ll end up wasting a lot of time. Efficiency is not a swear word your boss uses but your own personal respect for your limited time. I find TaskWarrior to be a brilliant tool for micro tasks. You can do really advanced stuff with it but you can also simple fire it up as micro tasks, see my full blog post on that
                                                              5. Debugger and Tests - stop debugging with print statements. Take a weekend to learn your debugger. Personally I really recommend Pycharm’s debugger. On the other end writing tests and code linters can teach you a lot valuable programming info you otherwise wouldn’t stumble upon. I use pytest, flake8, pylint and mypy for python.
                                                              6. Your Desktop - finally you need to be comfortable in your machine. Try different desktop environments or even window managers. Keyboard driven window managers like (i3, awesome, qtile) can really boost your navigation. Combine that with rofi as app launcher/context swittcher and a dropdown terminal and you can really feel like flash when you peek at your colleagues with windows or macos environments.

                                                              I think those would be my top 6 tips but this is a bit of a blackhole subjects. Soon you start reading about philosophy, psychology and micro-dosing psychedelics, so it’s important to remember not to get lost here :D

                                                              1. 1

                                                                Wouldn’t an easy fix for sudo phishing to include some token in the password request message?

                                                                1. 2

                                                                  I could easily make a program which spawns a sudo "$@" style child process, then any time my process reads a byte from stdin, it forwards that byte to sudo and also stores it in a buffer. When I receive a newline byte, I send my buffer to a server. My program will behave identically to sudo in every way, because the user sees all of sudo’s output (sudo would inherit my program’s stdout and stderr), and sudo sees everything the user is typing.

                                                                  1. 1

                                                                    How would you present it to the user without also presenting it to an attacker?

                                                                  1. 5

                                                                    Weirdly I have the complete opposite experience. I work with highly opinionated language (python) so I guess that plays into it but I’ve never met or worked with someone who would use any of these arguments:

                                                                    • I don’t know. It was in some article.
                                                                    • I don’t know. I copy-pasted it from X.
                                                                    • I don’t know. I was doing it in my previous project.
                                                                    • I don’t know. Someone told me so.

                                                                    In my experience it’s the opposite - everyone is really opinionated even about minute details to the point where learning to let it go and move on was the skill that saved me the most time.

                                                                    I see OP is from Poland and me being from Lithuania and worked with Polish developers I can see that this might be a cultural issue. Poland and Lithuania kinda boot-strapped themselves into this medium and prioritized end-results (just make it work) rather than understanding of the medium itself. That’s what I’ve seen more than 5 years ago - today I’d say that both of these regions caught up with modern software culture, for the most part.

                                                                    1. 2

                                                                      Wait… Python is a highly opinionated language? In what way?

                                                                      1. 1

                                                                        I think OP is talking about PEP 8 and the culture around it.

                                                                        1. 1

                                                                          import this
                                                                          :)

                                                                      1. 6

                                                                        When all you have is a hammer everything looks like a nail. Python is not Haskell. It’s not designed around .map crap everywhere. Callbacks are evil.

                                                                        1. 4

                                                                          Callbacks are evil

                                                                          Couldn’t stress this enough. We’re slowly migrating from Twisted callbacks to python asyncio (or Trio) and it has been pure pleasure to see all of the callback spaghetti disappear down the toilet.

                                                                          1. 1

                                                                            Reading the Trio documentation makes me literally (and I do literally mean literally) feel warm and fuzzy inside.

                                                                        1. 2

                                                                          I somewhat disagree with this article.

                                                                          Mastodon instances are pretty much meaningless unless you use specific subject instances (shoutout to the best photographer community http://photog.social) but general instances are completely replacable.

                                                                          Mastodon.social is the worst place you can go to experience mastodon. Instead as article pointed out stick to smaller niche instances, for example my favorite instance is photog.social which is a small, friendly and tech savy photographer community. There’s probably an instance for whatever passion you have too!

                                                                          Maybe there should be an artificial limit for registrations on every instance.

                                                                          Migrations are also have been quite easy with latest mastodon version: you get your follows, followers, old user page redirects to a new one and the only thing you don’t get is your post history.

                                                                          Alternatively since it’s all federated you can use other clients. My favorite being socialhome that allows you to subscribe to tags (similar to how diaspora works). But there’s also photo sharing platform pixelfed, reddit like alternative lemmy and of course Pleroma that has been discussed in this thread already. Just take a look at https://fediverse.party/en/fediverse/ !

                                                                          1. 1

                                                                            Cool idea! I was surprised it doesn’t use promp-toolkit, have you looked into that? It can save you a lot of curses issues. Also promp-toolkit has a lot of cool bells and whistles that could make this even cooler!

                                                                            https://github.com/prompt-toolkit/python-prompt-toolkit

                                                                            1. 2

                                                                              Interesting. I was not aware of that library. Curses certainly has many issues that I think for the most parte have been there for years/decades. I had to resource to quite a bit of trickery, some of which I don’t fully understand. This looks like a good candidate for a curses replacement. There’s the extra dependency added requirement however.

                                                                              1. 1

                                                                                You shouldn’t be afraid of dependancies.
                                                                                Pypi distribution with poetry is actually easier than distributing a single python file via github as you can install app with a single command pip install foo and it’ll even add an entry point, man pages or any other extras you might have. It also provides easy updates for your users.

                                                                            1. 1

                                                                              We’ve been using this quite a bit and keywords > positional args pretty much every time but I feel that there are some minor edge cases where that’s not the case. So I kinda feel that this should be covered by style guide rather than strict enforcement.

                                                                              1. 2

                                                                                I really recommend invoke which is part of fabric but just the “make” part of it. I’ve been slowly replacing all of alternatives (like make) with invoke and it has been pure joy to work with!

                                                                                1. 1

                                                                                  Interesting, that wasn’t on my radar. Thanks!

                                                                                1. 13

                                                                                  The best discussion platform I’ve ever used was bbcode forums. Easy to extend, easy to organize, easy to search, easy to use. We need a modern take on those.

                                                                                  1. 6

                                                                                    Forums are great but they’re very different to mailing lists, IMO. (Flat!!) forums are much better for meandering discussions and as a community hub. They’re much better for long-running threads. The osdev forums are a great example: each person can make their own thread for posting updates about their project, there are many threads that have run for years, etc.

                                                                                    But you couldn’t use a phpBB-style forum to discuss patches or something, it just wouldn’t work.

                                                                                    1. 2

                                                                                      you couldn’t use a phpBB-style forum to discuss patches or something

                                                                                      You don’t need to. Right tool for the job: to discuss patches, use Phabricator, GitLab, GitHub, etc. (Anything other than Gerrit.)

                                                                                      1. 1

                                                                                        The right tool for the job is a mailing list. Code forges are appallingly bad for discussing patches because none of them make it at all easy to suggest changes in the form of a simple patch.

                                                                                        1. 2

                                                                                          In GitHub PRs, I can just write:

                                                                                          ```suggestion

                                                                                          {my proposed change}

                                                                                          ```

                                                                                          And there’s then a button to apply the change (or add it to a batch to apply) right there as a new commit in the PR. CI then runs automatically, without needing anyone to check out the code locally. What is the mailing list workflow that is simpler than this?

                                                                                    2. 5

                                                                                      Forums are considerably better. The thing is you could just as well us an email client to read and post to forum too. Forums have always been superior at presenting discussions compared to mailing list archives. There is certainly room for improvement (Discourse seems like a decent attempt), but when it comes to organizing and browsing past discussions, I’d take bbforum over Mailman.

                                                                                      1. 4

                                                                                        Discourse is the closest I have seen. A pig to host, though, and extension is via http api (your bot also needs hosting etc).

                                                                                        1. 3

                                                                                          Have you ever tried Zulip? The Lean prover community has one and it seems to suit them well (same for rust, these days). I like it a lot, best threading I’ve seen in any kind of messaging system, and it encourages longer form messages with embedded LaTeX and markdown.

                                                                                          1. 3

                                                                                            Couldn’t disagree more with you. Bbcode forums are some of the worst designed interfaces that have ever existed. There abdundance of completely useless user information:

                                                                                            john is user since 1992-11-11, has 20 144 posts, 44 reputation point, 5 thank yous and half of a screen signature banner of a gif leopard eating a linux penguin
                                                                                            message #1004 last edited by john 2020-06-08 20:14:55 UTC+6 South East Asian Pacific Time.
                                                                                            From Russia, Moscow
                                                                                            Offline

                                                                                            A whole 5 page thread of bbcode forums could fit in a single old.reddit screen.