1. 2

    I have put it on my topsites on Firefox. If it is decently ok in its results, as it seems for now, I’d continue to use it.

    Nice go.

    1. 4

      maybe just a detail, but I have added a little snippet in my vimrc. I find those ——— more readable than # Title: mt stands for “markdown title”. Choose your own.

      nnoremap <leader>mt yy<Esc>jP0v$r-<esc> 
      
      make the current line a title

      like this !

      1. 4

        You can even optimize it to fewer keystrokes ! Down to a point I don’t even need a mapping anymore now it’s in my muscle memory ☺

        yypVr-
        
        1. 2

          I use mt sufficiently enough to keep it in a 3-key stroke. But thanks for the yypVr- trick: it is always nice to see a better solultion.

        2. 2

          I personally prefer using the # for headers but a friend of mine always uses -------. He also uses Vim so I’ll be sure to send this to him! It also gives me some other ideas for using key combos to format markdown rather than doing it “manually”

          1. 3

            Don’t hesitate to share those ideas !

            Mines are simply:

            nnoremap <leader>m- I- <Esc> 
            nnoremap <leader>ml I- <Esc>   
            nnoremap <leader>mt yy<Esc>jP0v$r-<esc>
            nnoremap <leader>mpl I- <Esc>p
            nnoremap <leader>mx :s/^- /x /<esc> 
            nnoremap <leader>m# I# <esc> 
            nnoremap <leader>m<cr> O<esc> 
            nnoremap <leader>md :r!date +\%c<cr>
            

            mx is for todo like mardown list, the dot get x when it’s done. mpl, it’s because I paste link as in dot list in general. I will probably use the better version proposed by z3bra in the comment above. Sure you will have more clever ones than mines ;-)

            1. 2

              It’s really recent for me. I have been using # Title exclusively for more than 1 or 2 year. But then only I finally notice that —— are more readable for me.

              This appears true only when using # and ##. Suddenly Main titles are just more apparent and really stands apart from the little indented ## and ###. Well at least for me ;-), that’s the way I look at text.

              So I changed to ——— only a few days weeks ago. A now I much prefer it.

          1. 5

            I think a lot of these arguments about complexity indirectly hinge on the fact we don’t have words to describe complexity besides… complexity. Like if I wanted to say something’s blue, I can call it blue, turquoise, indigo, sky-blue, ultramarine… I could talk about its tints and shades and RGB values. I can convey different useful nuances and talk about “this kind of blue but not that kind of blue.” With complexity, we have “simple” and “complex” and maybe “complicated”, if people can ever agree on the difference between “complex” and “complicated”. We’re stuck trying to talk about a lot of different ideas when we only have one word.

            I see this in the article and in all of the comments under the article. Everybody’s talking about different aspects of “complexity”, but nobody’s making explicit that they are different aspects.

            1. 2

              Maybe we don’t need more words, but rather quantifiable metrics. How many variables and relations between them? Cyclomatic complexity? Developer hours? Even stupid metrics like SLOC have at least one advantage over nuanced jargon: we can argue about whether they are appropriate to a given situation, but we don’t have to bicker about what they mean.

              Something I see missing from all sides of this discussion is the difference between specified (or “business”) complexity and implementation complexity relative to a given spec. Easy to miss when we don’t have a spec or model anywhere in sight, just a pile of code which grew organically with implicit and dynamic requirements. But if we do have a spec, even just a test suite, perhaps we can measure it just like we can measure the implementation. Then we have a more objective basis for comparing multiple implementations of the same spec.

              1. 1

                In the comment I link to a talk that sees complexity as:

                • either simple / compounded / complicated
                • theorical, pratical, practical-at-present time but subject to change in the future
                • ideal, essential, usefull, useless for describing the problem solved
              1. 4

                I attended talks by R. Moura about complexity in software, and the paper “Out The Tar Pit”.

                From my notes in 2015/2016 talks:

                He stresses that he decomposes complexity into

                • Simple : not compound - simplex
                • Compound : made of simplex parts
                • Complicated : The talk/paper does not deal with what complex is in the current every-day word usage: that is purely “complicated”

                He has interesting points of view so as to observe complexity for measuring the REAL problem solved:

                ideal complexity: [theorical] description of problem in pure abstract term

                essential complexity: [practical] problem solving + logic but [practical-today] business logic

                useful complexity: [practical] performance, needed state and mutation but [practical-today] languages and api, abstraction theorem

                useless complexity: [practical] everything but [practical-today] mindset and tradition, not knowing a language enough, repeated code + diluted functions and classes, tons of object managers (with acronyms), logical tricks that can fool you, adding constraints that can make no sense while using them

                IIRC, by [practical-today] he does mean “subject to change” also including “almost sure to change in the future”, because there is a possibility to do better in the future

                Links:

                He is also introducing Hexagonal Architecture as a possible means to address some of the problem of complexity in software engineering. From my notes he makes some parallels between “Out Of The Tap Pit” and “Hexagonal Architecture” approach.

                1. 6

                  Why not do it like Haskell and not use any brackets at all?

                  1. 1

                    Haskell uses () for tupling, so it’s not that they get way without any kind of brackets …

                    1. 2

                      Yes and they use [] for lists and {} for records, that’s not the point. Type application just uses spaces, with () used to indicate precedence if necessary: Maybe (Maybe a). I think this is by far the easiest to read.

                      1. 1

                        cf my other reply to you about Type Application

                    1. 10

                      There is also the Haskell syntax ! Just using one space. Adapted to a C++ like language that would look like vector int

                      1. 1

                        Haskell uses () for tupling, so it’s not that they get way without any kind of brackets …

                        1. 2

                          The title of the article is : “Language designers, stop using <> for generics “

                          But even with Polymorpic types, I’d still rather go with Type Application, rather than a tuple (,)

                          data Measure a b = Measure { quantity :: a , unit :: b }

                          value :: MyFancyType Int InternationalSystem -- here notice the type application

                          value = Measure 5 SquareMeter

                          And although I don’t use them, with the common language extensions TypeOperators or Generics , you would have the available type operator & (like Int & Char) or :*: (like Int :*: Char)

                          1. 1

                            This is a nice workaround – sadly it’s not used as much as it should be. :-/

                          2. 2

                            Not sure the parenthesis have anything to do with tupling in this context, but more with precedence and/or associativity.

                            Technically, you could write complicated generic type signatures without any parentheses by abusing type synonyms:

                            type VecInt = Vec Int
                            a :: Box VecInt
                            

                            would be equivalent to

                            a :: Box (Vec Int)
                            

                            no ? (I’m not sure, I’m just beginning my haskell journey :)).

                            1. 1

                              Yeah, maybe tupling is the wrong word for.

                              As mentioned above, I think it’s a nice workaround, though it may become a bit annoying if it has to be done for every type involved.

                        1. 2

                          After a google-search, the explainations that I have found about what PAM is, were a bit too technical for my current understanding and knowledge of Linux. How would you describe the usage, the importance, the role, of this brick of the linux systems ?

                          (I say Linux, though I see it has been standardized on many other Unix like OSes.)

                          1. 4

                            Pam is an authentication/authorisation system, so in essence any time you “log in” PAM is involved.

                            For example ssh uses it to check usersnames&passwords, and then before the shell is created it might also setup ulimits etc.

                            1. 2

                              PAM is the standardized way in which applications (say “ssh” or “login” or your screensaver, etc) ask the “system” to authenticate and authorize a user. The “system” here is actually a library called libpam. libpam then looks at its configuration files (normally /etc/pam.conf and /etc/pam.d) for the rules to follow to authenticate a user for that application.

                              libpam replaces an older, less flexible, mechanism largely handled by NSS (Network Service Switch) or reading directly from fixed location files like “/etc/shadow”.

                              libpam came about because administrators wanted a flexible way to configure authentication on their systems, say requiring multiple factors via SSH but only a single factor on the serial port. Or supporting authentication mechanisms that are particular to their organization or environment, such as using a MySQL database to determine if a user is allowed to login to the current system via SSH.

                            1. 49

                              Note how the author carefully avoids ever mentioning the word “Microsoft” in this announcement.

                              1. 6

                                GitHub is an independent business unit within Microsoft. So saying GitHub is acquiring npm is correct.

                                1. 17

                                  What is highlighted is that the word Microsoft has been avoided. That is more than correct.

                                  To understand the concerns, for example, one would not take notice if Oracle was trying to buy Java. And surely it would not have any impact on the open source spirit of the language. No. If that happened we would already know.

                                  1. 1

                                    “independent”?

                                    1. 1

                                      GitHub will retain its developer-first ethos and will operate independently Source

                                      GitHub is a legal subsidiary of Microsoft, and has a separate CEO, separate healthcare systems, separate hiring process, etc. I’m just trying to make the point that the omission of Microsoft is correct from a technical standpoint. In fact, I’d argue that it’d be weirder for the statement to say Microsoft was acquiring npm.

                                1. 7

                                  My first experience with this idea was Sublime Text’s Ctrl-P. Every program needs it’s own Ctrl-P.

                                  Nice to see the idea spreading!

                                  1. 7

                                    Emacs’ M-x takes this one step further imo, in that it exposes every function that is reachable through the GUI as a callable function with a text interface. Of course the whole thing is quite dated and could use some modernizations, e.g. context awareness and a nicer graphic design, but the basic idea is there and super powerful.

                                    1. 2

                                      That’s where helm comes in!

                                      1. 1

                                        Emacs’ C-h k and C-h w are great, too. The former tells you the function bound to a key, and the latter tells you which keys are bound to a function.

                                      2. 2

                                        Ubuntu experimented with something similar with Unity, where hitting a specific key combo would let you search the menus of the current application. I thought it was cool, and a nice alternative to scanning menus.

                                        1. 2

                                          Care to explain what Ctrl-P does in Sublime for those of us who don’t use Sublime?

                                          1. 3

                                            I haven’t used Sublime in years now, but IIRC it is a fuzzy finder, opening files, function defintiions etc in the same place, which inspired ctrlp.vim plugin and other similar plugins

                                            1. 2

                                              Ctrl-p exists in VSCode, chrome devtools. Even Visual Studio has this in the form of Ctrl-Q, though it doesn’t search the files.

                                              1. 3

                                                The version 1 of Sublime Text is from 2008. The version 2.0 dates back 2012. This editor came long, very long, before VSCode, and Atom etc..

                                                But maybe Sublime Text took inspiration from another software that predates. In which case I don’t know which one it is.

                                                I remember trying SciTE, Scintilla and TextMate. But chose Sublime Text compared to them.

                                                1. 1

                                                  I should have been more clear. I intended to say, it exists in those editors now. I am pretty sure it is a sublime innovation.

                                                  1. 1

                                                    I also thought so, but reading other comments they say it’s in Emacs. Meta-x . emacs is even way older :-)

                                                    I use Emacs really roughly, essentially for magit. I’ll have to check this M-x but I don’t edit projects in emacs in general….

                                            2. 1

                                              It’s the Sublime equivalent of M-x.

                                          1. 3

                                            This strongly reminds me of xiki which I found promising a few years ago:

                                            Ligth overview:

                                            Source:

                                            There had been some crowd founding for this project years ago. But it did not gain the momentum I was expecting. My usage was more of a exploratory thing, and I did not invest in using it longer cause I switched OS (NixOS), and I have not tried on it.

                                            But that gave me a good lasting impression of a possible future for CLI interfaces.

                                            1. 4

                                              I remember when I first stumbled upon Xiki I was amazed by its flexibility. Sadly it didn’t really make it much beyond a prototype stage and nowadays it seems pretty dead.

                                              It also reminded me of the Acme editor from plan9. And a little bit of squeak/e-toys. Being able to very easily create some one-off interfaces for special use cases is super powerful.

                                              But to be really useful you need tight integration with many parts of the operating system and other software and those integrations need to be written and maintained by someone…

                                              Also I think this coincides nicely with the post on text based cli tools by danluu from a few days ago. It helps immensely to have some structured information on how your tools compose and what data they expect, because it allows you to generate these sorts of interfaces and good context aware autocompletion.

                                            1. 3

                                              I do this for commands that I use (moderately to extremely) often.

                                              When it’s a command I’m not used to yet, the benefits is that I don’t have to relearn it and its parameter everytime. cat mybashfile.sh will show me the command to launch and the comments about the parameters, with an example I have already done.

                                              But in the case of the author however, with a command I call really often I’d be tempted also to use Control-R and edit the command on the CLI, or use history then use fc 499 to edit (in the defined text editor) the command to be relaunched (if the command is number 499 in the history output).

                                              They are only available on linux and OSes with bash though.

                                              1. 3

                                                PowerShell does have the Ctrl + R functionality, so it might suit your usage better than using cmd (which is really only there for backwards compatability). POSH is feeling more and more similar to bash as time goes on IMO.

                                                1. 2

                                                  Thanks for correcting me. I have stopped using powershell since I migrated totally to linux, but I agree with you that it made windows feels more comfortable.

                                                  1. 1

                                                    I get that. I feel like a POSH evangelical even though I use it rarely, but if a tiny tidbit of information like that can help someone then I feel it’s worth sharing it :)

                                                2. 3

                                                  I use the up-arrow to only suggest history that starts with that I already typed, so ls<Up> only gives me results that start with ls. It’s not set by default, but it’s up-line-or-beginning-search in zsh, and history-search-backward in readline/bash.

                                                  I personally prefer that over <C-r> searching for various reasons. YMMV.

                                                1. 3

                                                  “Clean Code” is also a dedicated term for a dedicated coding technique. And when you learn it, you learn that Refactor is one step in the cycle : Red -> Green -> Refactor.

                                                  • If the tests were green after the Refactor, then the code was as good as before the refactor. It was not as bad as the author attempts to make us think. It was working, as good at the previous code.

                                                  • If the code was more readable after the Refactor, then the code was INDEED more readable after the Refactor.

                                                  • If as the author suggests, some times later, the abstraction would have become a hurdle, because the reality often does not comply with our expectancy, it would have become obvious a new Refactor was needed. And , at a stage where all tests were green, the needed Refactor would have been to remove the added abstraction, or choosing another one, another pattern, another function… And the code would have become more readable than before (before = the moment when complexity made the abstraction become a hurdle getting in the way).

                                                  “The code is written once, and read a hundred times.” Of course there are projects where this statement is not true. But these are project that are not actively maintained and modified.

                                                  The trade-off to chose has to take into account: the number of times the code is read multiplied by the time it takes to understand the code, and also the probability to introduce a bug when the time to understand the code is constrained.

                                                  Readibility matters. But readibility also evolves as the project evolves.

                                                  The author’s advice not to be a zealot is a nice advice. The real Zen is outside the Zen.

                                                  1. 9

                                                    Neovim, a markdown file, and a five line shell script that creates a header with today’s date.

                                                    1. 3

                                                      Same but with a slight difference, it also copies (at the bottom of “today” file, with a ––…— separator) the content of the yesterday “today” file. Then it updates the symbolic link of the today file to the file just created. Helps me keep track of what is has not been done as planned.

                                                      I’m still hesitating to give a try at orgmode though.

                                                      1. 1

                                                        I just set this up myself yesterday.

                                                      1. 7

                                                        Good that you’ve decided to do something constructive by learning and working more. I would have suggested starting something on your own. One of the nice things about Capitalism is that if software vendors are doing a poor job — as you’ve identified — you have the freedom to compete with them.

                                                        1. 11

                                                          Unless Capitalism made you sign a non-compete to work at all

                                                          1. 0

                                                            That’s not really a product of Capitalism. That’s a term that two parties negotiate.

                                                            Still, it is fairly common, but usually (I think?) these terms have a relatively short shelf-life.

                                                            1. 4

                                                              the basis of the negotiation is a capitalist relation. it could not be more a product of capitalism.

                                                              on the other hand i don’t see how the freedom to produce your own product is at all specific to capitalism.

                                                              1. 1

                                                                on the other hand i don’t see how the freedom to produce your own product is at all specific to capitalism.

                                                                You forget that capitalism is the freedom to produce your own product. And this is like the definition, not one understanding, that one has to set aside to understand what others are talking about when they use the word.

                                                                1. 1

                                                                  by that definition you can have capitalism without private ownership of the means of production

                                                                  1. 1

                                                                    (that’s the joke)

                                                                    1. 2

                                                                      sadly it’s hard to make a parody on that topic which is not also something someone would say earnestly

                                                                2. -4

                                                                  on the other hand i don’t see how the freedom to produce your own product is at all specific to capitalism.

                                                                  Your local library should stock some history books.

                                                                  1. -1

                                                                    nice

                                                                3. 1

                                                                  Capitalism is about maximizing ROI of its assets. Two strategies are maintaining profitable assets and reducing competition. Non-competes do both. Whereas, the free market approach would have no non-competes so both the companies wanting talent and worker pool supplying it have to improve. No talent is on lock-down.

                                                              2. 2

                                                                you have the freedom to compete with them

                                                                Encouraging one individual to go against entrenched multi-billion companies in a quixotic endeavour with .1% chances of success is quite harsh.

                                                                1. 4

                                                                  It’s less harsh than not having that freedom, and I don’t know how you derived that number.

                                                                  1. 5

                                                                    Having the “freedom” to naively assign and praise all the sucesses thanks to the leading regime is a common theme in the propaganda of both the Communism and the Capitalism. In both case it’s political brain washing, and short-sighted historically speaking.

                                                                    Man has done business and trading and exchange about tools and so on since the dawn of times.

                                                                2. 1

                                                                  The mistake is believing that a product could exist that could suddenly fix all the issues any given company has in regards to security.

                                                                  There is no such product. Most of these companies selling these security-related software are selling vapourware.

                                                                1. 17

                                                                  Possibly off topic but… what are you talking about???

                                                                  1. 17

                                                                    I was wondering the same question, and searching the web for “leetcode”, I found : https://leetcode.com/ which seems to be a platform for coding challenges.

                                                                    Hope it answers your question, it answered mine.

                                                                  1. 1

                                                                    It’s funny everyone is optimizing wc; I see two posts on wc today one beating wc with Go and now this

                                                                    1. 12

                                                                      It started with Beating C with 80 lines of Haskell, which kicked off the fad. I particularly like this one because everybody’s been comparing optimized $LANG to unoptimized C. This one is about what happens when you try to optimize the C.

                                                                      1. 1

                                                                        Yes. it seems the monothread optimized C version is roughly 20 x faster than the unoptimized C version. And roughly 60 x faster using the multihtreaded C optimized version .

                                                                        If I have read correctly. I just skimmed the article rapidly. But you know… With undefined behaviours, there can be some really difficult mistakes from time to time ;-)

                                                                    1. 6

                                                                      I honestly love this article. It’s reasonnable critics, reflections, about most of the core concepts about simplicity that I try to use and advocate.

                                                                      I simply would like to mention that the CORE concept for justifying Clean Code (short funtions for example where the trade off is between concision vs locality):

                                                                      • Code is Written Once, and read Hundreds/Thousands of Time
                                                                      • Human brains can hold 7 concepts in mind at once (in average)

                                                                      This is the driving reason for all of this “simplification”. That’s my claim. Of course there are times the code will not be re-read. But there are also people (me included) who falsely think their brain can handle more than themselves/others easily can indeed.

                                                                      1. 8

                                                                        Unnecessary complexity is the enemy. Necessary complexity is not.

                                                                        The more featureful and rich a language is, the less complex and verbose the applications.

                                                                        With the wrong simplification we end up creating more complexity. We can see that in many popular applications.

                                                                        The article at http://nomad.uk.net/articles/why-gos-design-is-a-disservice-to-intelligent-programmers.html provides good examples.

                                                                        1. 3

                                                                          The more featureful and rich a language is, the less complex and verbose the applications.

                                                                          With the wrong simplification we end up creating more complexity. We can see that in many popular applications.

                                                                          There is a trade off between accepting complexity in a language vs complexity in its artifacts (programs written in the language). It is not a universal that more expressive languages, and therefore shorter programs, are better. Understanding, completely and thoroughly, how language features interact, is a necessary part of mastering that language, and therefore reading and writing programs effectively. Each feature added to the language makes this process harder, especially if those features don’t interact orthogonally.

                                                                          There is a place in the language spectrum for a language like Go: a minimal featureset, perhaps even too minimal, but all features basically orthogonal, easy to grok and keep in your brain’s working cache, and therefore easy to produce relatively elegant and coherent program artifacts. Even if many of those artifacts could be better expressed in more complex languages, the overall cost of comprehension is lower, often much lower.

                                                                      1. 4

                                                                        Is this a common use of the word “manifesto”? Or am I right to think it should not be tolerated?

                                                                        1. 22

                                                                          Or am I right to think it should not be tolerated?

                                                                          You seem to have strong opinions on this topic. Perhaps you should release a document describing your reasoning and the rules you propose for future usage of the word. ;)

                                                                          1. 9

                                                                            “How to Write a Manifesto: A Manifesto”.

                                                                            1. 1

                                                                              If I did maybe I would

                                                                            2. 10

                                                                              I think this is something the Swift community does for large overarching proposals. There are several other manifestos in the docs: ABI Stability Manifesto, Generics Manifesto, Ownership Manifesto, String Manifesto.

                                                                              1. 8

                                                                                Gah that makes me cringe.

                                                                              2. 6

                                                                                Wikipedia sez:

                                                                                A manifesto is a published declaration of the intentions, motives, or views of the issuer, be it an individual, group, political party or government.

                                                                                1. 3

                                                                                  Yeah I don’t get it (nor the point of the software itself tbh), isn’t this just a language extension / library proposal?

                                                                                  1. 3

                                                                                    Is this a discussion to have here, where we can do nothing about it, or as an issue in the repository, where:

                                                                                    1. The people arguably most familiar with the process of doing things in Swift will respond
                                                                                    2. The people arguable most likely to be able to initiate some change in Swift will (hopefully) listen
                                                                                    3. We don’t end up with 13 of the 14 comments in this thread being about the least interesting part of this submission; a single word in the title.
                                                                                    1. 1

                                                                                      My two cents, a 15th commentary ill at ease with this word:

                                                                                      Personally, and maybe for the other 13/14 who comments you talk about, the word Manifesto was entry point for reading the article.

                                                                                      The 3 Manifestos I know of in programming are:

                                                                                      • The Agile Manifesto
                                                                                      • The Software Crafsmanship Manifesto
                                                                                      • The Test Driven Development Manifesto (not sure it’s been published though, it was written in a SoCraTes UK conference)

                                                                                      The 4th Manifesto I know of, is the Manifesto of the Communist Party written by Marx and Engels in the years 1850’s I think. There are probably numerous other Manifesto I don’t know of.

                                                                                      Contrarily to your opinion about the “least interesting point”, I think that the philosophical content of those Manifesto is their “Raison d’Etre”, the reason why they are Manifestos and why they are refered as such. (Whether we agree or not on the content).

                                                                                      The fact there already exists a library in Haskell (as puffnfesh noticed) that does that kind of stuff, and that there is no mention about it in the Differentiable Manifesto is also to be noticed.

                                                                                      One of the other comments says that it’s a habit in the swift community to call important stuffs Manifesto… So…

                                                                                      1. 1

                                                                                        The question I raised was whether this is a nonstandard and misleading usage of the word from the standpoint of the wider software community, so I believe it is a discussion to have here.

                                                                                        If someone with a GitHub account feels there is a consensus that this usage of “manifesto” is wrong, and cares enough about the Swift community to raise the issue with them, they can certainly do that.

                                                                                        1. 2

                                                                                          That’s closer to what I think of as a manifesto, but this Swift proposal is not the same type of thing.

                                                                                        2. 2

                                                                                          Or am I right to think it should not be tolerated?

                                                                                          … as in you’d resist or otherwise fight against it? Are you a prescriptivist?

                                                                                          1. 2

                                                                                            Is it prescriptive to want people to use language which is not misleading?

                                                                                            1. 1

                                                                                              Were you mislead?

                                                                                              1. 1

                                                                                                Yup

                                                                                          2. 1

                                                                                            It makes me think of this, so to me it’s a weird use of the word as well.

                                                                                          1. 2

                                                                                            “The majority of standups are short, yet often meander into casual conversation where people talk about things unrelated to work, like what they did over the weekend.”

                                                                                            I suggest renaming the article: “Why talking about our weekends instead of status is useless, and how to run great product team meetings”

                                                                                            I found the argument so poor, I am a bit…

                                                                                            1. 1

                                                                                              I use Jekyll. It was the most straightforward approach to get something working and to improve upon.

                                                                                              It is likely that I try Hakyll one day when wanting to do more complex stuffs. Not for the moment.