1,057 Matching Annotations
  1. Last 7 days
    1. In Potluck, we encourage people to write data in freeform text, and define searches to parse structure from the text.

      From a gradual enrichment standpoint I understand but from a data entry standpoint this seems like more work.

    1. In summary, terminal input is weird.  It’s weird largely because there’s a character-only pipe sitting between the terminal and shell.  And going one step back, the weirdness comes from the whole historical division of terminal vs. shell, which is based on emulating a physical hardware setup that hasn’t been built since the 80s. 

      Summary of why the terminal input is so weird.

  2. Nov 2022
    1. Currently Xournal++ does not have shortcuts/keybindings configurable in the preferences. However you can write your custom plugin to achieve exactly that.

      Must learn (and install) Lua (version >=5.3) to make custom shortcuts for Xournal++ via personally made plugins.

    1. What does 'passing an argument' mean in programming?You have a grinder that will grind anything that you pass on to her. You give her Rice. She grind it. You give her wheat. She grind it. You give her a Justin Bieber song CD. She grind it. She grinds every thing that you hand over to her. In programming, we create function that does the stuff we need. Say add, subtract, multiply or print the stuff that you pass on to it. Then we pass on stuff upon which the function will operate and return us the results. This process of passing the 'stuff' to be processed is referred to as passing an 'argument' in programming. Thank You.
    1. I like to say that in ECS we design bottom-up. We look at data and which behaviour depends on which data. In OO we design top-down, we search for abstractions and generic behaviours / definitions.
    1. there is no single perfect universal programming language. Until I came to that point, I wasted a lot of time thinking that GW-BASIC QBASIC QB 4.5 VB4 Delphi Java C++ C# 1.0 was the only language I would ever need
    1. There are three main types of module and function mocking in Jest:jest.fn: Mock a functionjest.mock: Mock a modulejest.spyOn: Spy or mock a function

      Esto es sólo una prueba para Juanda

    2. One of the common ways to use the Mock Function is by passing it directly as an argument to the function you are testing.

      curioso

    1. Clean code examples (YouTube)Why Are You Still Creating CRUD APIs?Remove Your If-Else and Switch CasesWhy Cognitive and Cyclomatic Complexity Matters in Software DevelopmentWriting Cleaner Code (With Examples)Resources for the curious📚 Source Code (GitHub) by Nicklas Millard, the authorRESTful API Design by MicrosoftArchitectural Styles and the Design of Network-based Software Architectures by R.T. FieldingWhat is REST by codeacademyIs Crud Bad For Rest? by Boris LublinskyHATEOAS Driven REST APIs by restfulapi.netHATEOAS — a simple explanation by Bartosz JedrzejewskiWhy HATEOAS is useless and what it means for REST by Andreas ReiserRESTful Considered Harmful by Tomasz NurkiewiczTask-Based UI on cqrs.wordpress.comCRUD is an antipattern by Mathias VerraesWhy REST sucks by Troy A. Griffitts

      Useful links for Web & generic programming.

    2. RPC-like but still REST-full is way more preferred than those rotten CRUD designs.

  3. Oct 2022
    1. The first interaction with a programming language should be what it can do for you, rather than an exhaustive glossary of what it is.
    1. she says in contrast to e.g. reading, we don’t know much of anything about teaching programming. There’s no body of work

      Hermans posits that there is no actual body of work about how to effectively teach programming. In contrast to reading.

    1. it can be ‘run’ at some point, which produces the ‘running program’. Not to be confused with a ‘non-running program’, the running program is the original program plus some run time state attached to its various parts which changes as it runs.

      Reminiscent of The Pinocchio Problem.

    2. The program is a document like construct created by a programmer—it has some structure presented via a primary visual representation through which the programmer views and manipulates it.

      Reminiscent of the distinctions Martin Fowler makes on Projectional Editing.

    1. On “good” days, developers spend more time developing and less time collaborating
  4. pointersgonewild.files.wordpress.com pointersgonewild.files.wordpress.com
    1. IMO: one of the biggest problems in modern softwaredevelopment• Code breaks constantly, even if it doesn’t change• Huge cause of reliability issues and time wasted• This is somehow accepted as normal

      ⬑ "The Code Rot Problem"

    1. The program will compile, but not run, because JVM will not recognize the main() method. Remember JVM always looks for the main() method with a string type array as a parameter.

      With out String args[] in main().

    1. An object in Java is the physical as well as a logical entity, whereas, a class in Java is a logical entity only.

      Object exists but Class is just logical steps to make object. Class --> Blue print and Object ---> Car

    1. Many popular SQL clients do not use SSL by default. If you aren’t deliberate about choosing encryption, the connection will be unencrypted.

      Table with SQL clients and their default SSL mode:

    2. SSL is disabled by default in jdbc, npgsql, node-postgres, and pgx.

      Table with programming libraires and their default SSL mode:

  5. Sep 2022
    1. I have a simple coding principle: write lines of code as though instructing a real person how to do the job. And that naturally expands to designing and modelling systems like real organisations with their own divisions, departments, branches, and all the various “job positions” that need to be filled. Make the whole system appear as human as possible.
    1. A line of code containing 6+ pieces of information should be simplified.

      When to simplify a line of code?

    1. That’s why it was such a life-changing event for me when I found Dash in 2012.

      Offline docs: - macOS: Dash ($30) - Windows/Linux: Zeal (free) - Windows: [Velocity] (https://velocity.silverlakesoftware.com/) ($20) - Web: DevDocs

    1. Also be aware of how Ruby handles aliases and inheritance: an alias references the method that was resolved at the time the alias was defined; it is not dispatched dynamically.
    1. For example, whereas C programmers have argued for years about where to put their brackets, and whether code should be indented with tabs or spaces, both Rust and Go eliminate such issues completely by using a standard formatting tool (gofmt for Go, rustfmt for Rust) which rewrites your code automatically using the canonical style. It’s not that this particular style is so wonderful in itself: it’s the standardisation which Rust and Go programmers appreciate.
    2. If you like the functional style of programming, though, you’ll find a lot more facilities for it in Rust, because Rust has a lot more facilities than Go in general.
    1. The LISP part, though, is not going well. Porting clever 1970s Stanford AI Lab macros written on the original SAIL machine to modern Common LISP is hard. Anybody with a knowledge of MACLISP want to help?
    1. When you run a command like python or pip, your operating system searches through a list of directories to find an executable file with that name. This list of directories lives in an environment variable called PATH, with each directory in the list separated by a colon: /usr/local/bin:/usr/bin:/bin Directories in PATH are searched from left to right, so a matching executable in a directory at the beginning of the list takes precedence over another one at the end. In this example, the /usr/local/bin directory will be searched first, then /usr/bin, then /bin.

      What is PATH?

    1. Now, not every programmer prefers that kind of development. Some programmers prefer to think of development as a process of designing, planning, making blueprints, and assembling parts on a workbench. There’s nothing wrong with that. Indeed, a multibillion-dollar international industry has been built upon it.

      I still think they should worry about it. Production systems need to evolve and contain data; reasoning about the systems completely statically from the source code with no regard to the existing data is a lot more complicated than it needs to be.

    2. In fact, there’s a style of programming, well known in Lisp and Smalltalk circles, in which you define a toplevel function with calls to other functions that don’t yet exist, and then define those functions as you go in the resulting breakloops. It’s a fast way to implement a procedure when you already know how it should work.
    3. Moreover, because the entire language and development system are available, unrestricted, in the repl, you can define the missing function bar, resume foo, and get a sensible result.

      This seems like one of the key points. The ability to edit computations while running. Type holes with resuming gets you most of the way there but there's probably also modifications. I wonder how you can keep it from getting confusing. Something similar to FRP?

  6. Aug 2022
    1. Obnoxious.

      As someone recently pointed out on HN, it's very common nowadays to encounter the no-one-knows-else-what-they're-doing-here refrain as cover—I don't have to feel insecure about not understanding this because not only am I not alone, nobody else understands it either.

      Secondly, if your code is hard to understand regarding its use of this, then your code his hard to understand. this isn't super easy, but it's also not hard. Your code (or the code you're being made to wade into) probably just sucks. The this confusion is making you confront it, though, instead of letting it otherwise fly under the radar.* So fix it and stop going in for the low-effort, this-centric clapter.

      * Not claiming here that this is unique; there are allowed to be other things that work as the same sort of indicator.

    1. Mob requires good communication skills. There is no space for passive-aggressiveness; or arrogance. If You want to show You are better than Your colleagues, You aren’t a candidate for Mob.

      Main requirement of effective mob programming

    1. Corollary: Spolsky (at least at the time of this article) didn't really understand types, having about the same grasp on computing fundamentals as your average C programmer.

    1. It should be dead simple to distribute content (eg. static content).It should be easy to build apps.It should be not too hard to build a platform.

      The thing that gets me about takes like this is that it's all the stuff below the Web content layer that accounts for what makes all this stuff harder than it needs to be.

      What's the hard part about distributing content (static or not, but let's go with static for simplicity)? It's registering a domain, updating DNS, and keeping a Web server up—all systems that have nothing to do with the "infernal" trio and also generally programmed in what are typically described as saner languages and their traditions. It's either that, or it's relying on somebody else, like GitHub Pages, and integrating the implementation details/design decisions for their value-add into your workflow.

      To "build a platform" is ambiguous, but it sounds a lot like "creating a server-side application to serve non-static content and handle associated requests". Is the infernal trio to blame for the difficulties of that, too?

    1. Dynamic typing makes that harder

      So run a typechecker on the code to check your work if you want type checking. That is what TypeScript does, after all. And it's been around long enough that people shouldn't be making the mistake that a runtime that support dynamic types at runtime means that you can't use a static typechecker at "compile time" (i.e. while the code is still on the developer workstation).

    1. In computing, serialization (US and Oxford spelling) or serialisation (UK spelling) is the process of translating a data structure or object state into a format that can be stored (for example, in a file or memory data buffer) or transmitted (for example, over a computer network) and reconstructed later (possibly in a different computer environment).[1] When the resulting series of bits is reread according to the serialization format, it can be used to create a semantically identical clone of the original object. For many complex objects, such as those that make extensive use of references, this process is not straightforward. Serialization of object-oriented objects does not include any of their associated methods with which they were previously linked.

      This process of serializing an object is also called marshalling an object in some situations. The opposite operation, extracting a data structure from a series of bytes, is deserialization, (also called unserialization or unmarshalling).

    1. What is not OK is what I perceive as the dominant attitude today: sell SciPy as a great easy-to-use tool for all scientists, and then, when people get bitten by breaking changes, tell them that it’s their fault for not having a solid maintenance plan for their code.
    1. An ActivePaper is, by defini-tion, a package combining the code, data, and documentationthat describe together a computational scientific study.
    1. What I call software collapse is what is more commonly referred to as software rot: the fact that software stops working eventually if is not actively maintained. The rot/maintenance metaphor is not appropriate in my opinion because it blames the phenomenon on the wrong part. Software does not disintegrate with time. It stops working because the foundations on which it was built start to move.
    1. I can't possibly keep updating software to deal with new JavaScript versions

      There's a fundamental misunderstanding (alternatively, misdirection) about what the source of breakage is. JS is not an SDK, and neither is the Web platform. Whatever worked in the old "JavaScript version" will work in the new one.

    1. and free of globals

      Ah! This remark highlights a fundamental difference in understanding between two camps, which I have been (painfully) aware of, but the source of this confusion has eluded me until only just right now. (Really, this is a source of frustration going back years.)

      In one camp, the advice "don't use global variables" is a way of attacking a bunch of things endemic to their use, most notably unnecessary coupling to spooky state. In another camp "no global variables" is understood to mean literally that and taken no further—so you can have as much spookiness as you like, and so long as the value is not directly accessible (visible) from, say, another given piece of code appearing at the top-level ("global") context, as with the way i is bound to the activation record in this example but is not accessible outside the scope of getGetNext, then you're good.

      That is, there are two aspects to variables: visibility and extent, and the first interpretation seeks to avoid the negative effects on both dimensions, while the second is satisfied by narrowly prohibiting direct visibility across boundaries.

      I find the latter interpretation bizarre and completely at odds with the spirit of the exhortation for avoiding globals in the first place.

      (What's worse is the the second interpretation usually goes hand in hand with the practice of making extensive use of closures, which because they are propped up as being closely associated with functions, then leads people to regretfully refer to this style as functional programming. This is a grave error—and, to repeat, totally at odds with the spirit of the thing.)

  7. Jul 2022
    1. Later in life and irrespective to the character of the relationship held, the good enough approachinforms how communication between people can be practiced. One of the widest known formulasfor that is called Nonviolent Communication, subtitled as the ‘language of life’ [ 39]. The subtitle seemsparticularly appropriate to our case, as it describes a method of communication that does not servesocial programming and allow humans to author and own their speech. A nonviolent communicatordoes not reinforce the boundary cuts and refrains from installing the personware-shaping doublebinds.

      !- definition : nonviolent communication, language of life * a method of communication that does not prioritize social programming over an individual's right to articulate and own their own speech.

    1. von neumann was furious at him furious that he would waste precious machine time 00:04:20 doing the assembly that was clerical work that was supposed to be for people right and so we saw the same story happened just a little bit later when john backus and friends came up with us idea they called fortran this is so call high-level language where you could write out your formulas as if your writing mathmatical notation you could write out loops and this was shown to the assembly programmers and once again they just 00:04:46 they weren't interested they don't see any value in that they just didn't get it so um I want you to keep this in mind as I talk about the four big ideas that I'm going to talk about today that it's easy to think that technology technology is always getting better because Moore's law because computers are getting always more capable but ideas that require people to unlearn what they've learned and think in new ways there's often 00:05:10 enormous amount of resistance people over here they think they know what they're doing they think they know a programming is this programming that's not programming and so there's going to be a lot of resistance to adopting new ideas

      Cumulative cultural learning seems to be stuck in its own recursive loop- the developers of the old paradigm become the old "guard", resistant to any change that will disrupt their change. Paradigm shifts are resisted tooth and nail.

    1. In computer programming, Intentional Programming is a programming paradigm developed by Charles Simonyi that encodes in software source code the precise intention which programmers (or users) have in mind when conceiving their work. By using the appropriate level of abstraction at which the programmer is thinking, creating and maintaining computer programs become easier. By separating the concerns for intentions and how they are being operated upon, the software becomes more modular and allows for more reusable software code

      Definition of Intentional Programming * In computer programming, * Intentional Programming is a programming paradigm * developed by Charles Simonyi * that encodes in software source code the precise intention which programmers (or users) have in mind when conceiving their work. * By using the appropriate level of abstraction at which the programmer is thinking, * creating and maintaining computer programs become easier. * By separating the concerns for intentions and how they are being operated upon, * the software becomes more modular and allows for more reusable software code. * Can we see an example of this in action for clarification?

    2. Intentional programming
    1. The thing that bugs me when I listen to the Muse podcast—it's something that's present here along with the episode with gklitt—is that there's this overarching suggestion that the solution to this is elusive or that there are platform constraints (especially re the Web) that keep any of these things from being made. But lots of what gets talked about here is possible today, it's just that no one's doing it, because the software development practices that have captured the attention of e.g. GitHub and Programmer Twitter value things that go against the grain of these desires. This is especially obvious in the parts that mention dealing with files. You could write your Web app to do that. So go do it! Even where problems exist, like with mobile OSes (esp. iOS), there're things like remoteStorage. Think remoteStorage sucks? Fine! Go embrace and extend it and make it work. It's not actually a technical problem at this point.

    2. @18:52:

      I wanna also dig a little more into the kind of... dynamism, ease-of-making-changes thing, because I think there's actually two ways to look at the ease of making changes when you solve a problem with software. One way is to make software sufficiency sophisticated so that you can swap any arbitrary part out and you can keep making changes. The other is to make the software so simple that it's easy to rewrite and you can just rewrite it when the constraints change.

    1. // NB: Since line terminators can be the multibyte CRLF sequence, care // must be taken to ensure we work for calls where `tokenPosition` is some // start minus 1, where that "start" is some line start itself.

      I think this satisfies the threshold of "minimum viable publication". So write this up and reference it here.

      Full impl.:

      getLineStart(tokenPosition, anteTerminators = null) {
        if (tokenPosition > this._edge && tokenPosition != this.length) {
          throw new Error("random access too far out"); // XXX
        }
      
        // NB: Since line terminators can be the multibyte CRLF sequence, care
        // must be taken to ensure we work for calls where `tokenPosition` is some
        // start minus 1, where that "start" is some line start itself.
        for (let i = this._lineTerminators.length - 1; i >= 0; --i) {
          let current = this._lineTerminators[i];
          if (tokenPosition >= current.position + current.content.length) {
            if (anteTerminators) {
              anteTerminators.push(...this._lineTerminators.slice(0, i));
            }
            return current.position + current.content.length;
          }
        }
      
        return 0;
      }
      

      (Inlined for posterity, since this comes from an uncommitted working directory.)

    1. In terms of this analogy, a lot of objections to end-user programming sound to me like arguing that Home Depot is a waste of time because their customers will never be able to build their own skyscrapers. And then on the other side are the people arguing that people will be able to build their own skyscrapers and it will change the world. I just think it would be nice if people had the tools to put up their own shelves if they wanted to.
    1. Debugging is the process of finding and removing errors (bugs) from a software program. Bugs occur in programs when a line of code or a statement conflicts with other elements of the code. We also call errors or defects in hardware bugs.

      Debugging and debugging software

      Debugging is the process of finding and removing errors (bugs) from a software program. Bugs occur in programs when a line of code or a statement conflicts with other elements of the code. We also call errors or defects in hardware bugs.

    1. Review: a formal assessment or examination of something with the possibility or intention of instituting change if necessary.

      (comment with good examples of code review comments)

  8. Jun 2022
    1. YouArentGonnaNeedIt (often abbreviated YAGNI, or YagNi on this wiki) is an ExtremeProgramming practice which states: "Always implement things when you actually need them, never when you just foresee that you need them."

      Only implement features in code when you actually need them. Never implement features that you anticipate needing, because you aren't gonna need it (YAGNI).

    1. But to my knowledge, this is the first time anyone has collected public info about Bigco dev environments in one place

      Examples of big companies moving to development in the cloud

    1. It is NOT an exception if the username is not valid or the password is not correct. Those are things you should expect in the normal flow of operation. Exceptions are things that are not part of the normal program operation and are rather rare.

      Exceptions are things that are not part of the normal program operation and are rather rare.

    2. Exceptions should be reserved for what's truly exceptional.

      Exceptions should be reserved for what is truly exceptional.

    3. Make sure the exceptions are at the same level of abstraction as the rest of your routine.

      Make sure that exceptions are at the same level of abstraction as the rest of your routine.

    4. Don't use exceptions if the error can be handled locally

      Don't use exceptions if the error can be handled locally.

    5. Use exceptions to notify about things that should not be ignored.

      Use exceptions for things that should not be ignored.

    6. if the function's assumptions about its inputs are violated, it should throw an exception instead of returning normally.

      If a function's assumptions about it's inputs are violated, throw an exception.

  9. May 2022
    1. I think RSpec should provide around(:context)/around(:all). Not because of any particular use case, but simply for API consistency. It's much simpler to tell users "there are 3 kinds of hooks (before, after and around) and each can be used with any of 3 scopes (example, context and suite)". Having some kinds of hooks work with only some kinds of scopes makes the API inconsistent and forces us to add special case code to emit warnings and also write extra documentation for this fact.
    2. I've been thinking of looking into implementing this in rspec-core, primarily to make the API more consistent (e.g. so that you can combine any scope -- example/context/suite -- with any hook type before/after/around).
    1. Knuth recommended getting familiar with the program by picking up one particular part and "navigating" the program to study just that part. (See https://youtu.be/D1jhVMx5lLo?t=4103 at 1:08:25, transcribed a bit at https://shreevatsa.net/tex/program/videos/s04/) He seems to find using the index (at the back of the book, and on each two-page spread in the book) to be a really convenient way of "navigate" the program (and indeed randomly jumping through code, as you said), and he thinks that one of the convenient things about the "web" format is that you can explore it the way you want. This is really strange (to us) as the affordances we're used to from IDEs / code browsers etc are really not there

      I can't help but think that currentgen programmers are misunderstanding Knuth and anachronizing him, with their being a product of the current programming regime where most never lived in a world without structured programming, for example, when we hear "literate programming", we attempt to understand it by building off our conception of current programming practices and try to work out what Knuth could mean given widespread modern affordances as a precondition, when really Knuth is just advocating for something that approximates (with ink and paper) currentgen tooling, and is therefore in fact more primitive than our reference point which we are trying to understand as being capable of being improved upon, but Knuth's LP is an improvement nonetheless of something even more primitive further still.

    1. With every generation of computing comes a dominant new software or hardware stack that sweeps away the competition and catapults a fledgling technology into the mainstream.I call it the Canonical Stack (CS).Think the WinTel dynasty in the 80s and 90s, with Microsoft on 95% of all PCs with “Intel inside.” Think LAMP and MEAN stack. Think Amazon’s S3 becoming a near universal API for storage. Think of Kubernetes and Docker for cloud orchestration.

      Explanation of Canonical Stack (CS)

    1. By offering to have a real-time technical discussion, you are reframing the code review process away from an 'instructor correcting student' dynamic and into a 'colleagues working together' mindset.
    1. Level 5: Stop the line. The highest level of code review comments. Borrowing the term from Toyota's manufacturing process this is when the code reviewer noticed something in the PR that signals a major defect.

      Stop the line - 5th type of MR comments

    2. Level 4: Infringement. This is where things get more serious, note that infringement means rules were broken. In this context, rules can mean a number of things, from the more obvious feature spec and framework rules to things like style guides and coding principles.

      Infringement - 4th type of MR comments

    3. Level 3: Suggestions. These can also be thought of as recommendations and alternatives.

      Suggestions - 3rd type of MR comments

    4. Level 2: Nitpicks. Usually, comments about grammar errors and minor stylistic issues/typos go there. The solution to the nitpicks is usually very obvious and if the solution is opinionated, the opinion is not strongly held. Naming a method foobarGenerator vs foobarFactory goes in here, and nitpick comments often start with Nitpick:.

      Nitpicks - 2nd type of MR comments

    5. Level 1: Clarifications. I also think of these as sanity checks, I may even start the comment with something like I may be completely off the base here... or Just to sanity check...

      Clarifications - 1st type of MR comments

    1. The problem is that a lot of old school website devs can write jQuery and very very little actual JavaScript.

      This happens to be true of many of the new/up-to-date Web developers I see, too.

      Anecdote: I never really did StackOverflow, either as a reader or a contributor. One day several years ago (well after StackOverflow had taken off), I figured that since I see people complain about JS being confusing all the time and since I know JS well, then I'd go answer a bunch of questions. The only problem was that when I went to the site and looked at the JS section, it was just a bunch of jQuery and framework shit—too much to simply ignore and try to find the ones that were actually questions about JS-the-language. "I know," I thought. "I'm in the JS section. I'll just manually rewrite the URL to jump to the ECMAScript section, which surely exists, right? So I did that, and I just got redirected to the JS section...

    Tags

    Annotators

    1. now something breaks elsewhere that was unsuspected and subtle. Maybe it’s an off-by-one problem, or the polarity of a sign seems reversed. Maybe it’s a slight race condition that’s hard to tease out. Nevermind, I can patch over this by changing a <= to a <, or fixing the sign, or adding a lock: I’m still fleshing out the system and getting an idea of the entire structure. Eventually, these little hacks tend to metastasize into a cancer that reaches into every dependent module because the whole reason things even worked was because of the “cheat”; when I go back to excise the hack, I eventually conclude it’s not worth the effort and so the next best option is to burn the whole thing down and rewrite it…but unfortunately, we’re already behind schedule and over budget so the re-write never happens, and the hack lives on.

      I'm having real difficulty understanding what is going on here and in what situations such cascading problems occur.

      Is it a case of under-abstraction?

    1. as if the only option we had to eat was factory-farmed fast food, and we didn’t have any way to make home-cooked meals

      See also An app can be a home-cooked meal along with this comment containing RMS's remarks with his code-as-recipe metaphor in the HN thread about Sloan's post:

      some of you may not ever write computer programs, but perhaps you cook. And if you cook, unless you're really great, you probably use recipes. And, if you use recipes, you've probably had the experience of getting a copy of a recipe from a friend who's sharing it. And you've probably also had the experience — unless you're a total neophyte — of changing a recipe. You know, it says certain things, but you don't have to do exactly that. You can leave out some ingredients. Add some mushrooms, 'cause you like mushrooms. Put in less salt because your doctor said you should cut down on salt — whatever. You can even make bigger changes according to your skill. And if you've made changes in a recipe, and you cook it for your friends, and they like it, one of your friends might say, “Hey, could I have the recipe?” And then, what do you do? You could write down your modified version of the recipe and make a copy for your friend. These are the natural things to do with functionally useful recipes of any kind.

      Now a recipe is a lot like a computer program. A computer program's a lot like a recipe: a series of steps to be carried out to get some result that you want. So it's just as natural to do those same things with computer programs — hand a copy to your friend. Make changes in it because the job it was written to do isn't exactly what you want. It did a great job for somebody else, but your job is a different job. And after you've changed it, that's likely to be useful for other people. Maybe they have a job to do that's like the job you do. So they ask, “Hey, can I have a copy?” Of course, if you're a nice person, you're going to give a copy. That's the way to be a decent person.

    2. If you’re a coder, when’s the last time you just quickly built something to solve a problem for yourself or simply because it was a fun idea?

      And how future-proof was the result or how easy was it to make sure you could share it with others in a form that they could make use of (and not be dependent on you or some third-party or their internet connection)?

    1. This column will continue only if I hear from people who use literate-programming systems that they have not designed themselves. and it did not continue.
    1. To keep tiny mistakes from crashing our software or trashing our data, we write more software to do error checking and correction.

      This is supposed to be the justification for increasing code size. So what's the excuse for projects today? Software of today is not exactly known for adding more "error checking and correction". It feels more like growth for growth's sake, or stimulating some developer's sense of "wouldn't it be cool if [...]?".

    1. suppose when you needed to make a permanent edit to the style sheet on your homepage, you opened up the CSS viewer, made the edit, and the result persists—not just in your browser, but by changing the very style sheet itself
    1. an acknowledgement of network effects: LP is unlikely to ever catch on enough to be the majority, so there needs to be a way for a random programmer using their preferred IDE/editor to edit a "literate" program

      This is part of the reason why I advocate for language skins for comparatively esoteric languages like Ada.

    2. in other words, there would be no "weave" step

      Well, there could still be a weave step—same as there is like with triple scripts (to go from compilation form back to the original modules) or with Markdown, which should be readable both as plain text and in rendered form.

    1. memory usage and (lack of) parallelism are concerns

      Memory usage is a concern? wat

      It's a problem, sure, if you're programming the way NPMers do. So don't do that.

      This is a huge problem I've noticed when it comes to people programming in JS—even, bizarrely, people coming from other languages like Java or C# and where you'd expect them to at least try to continue to do things in JS just like they're comfortable doing in their own language. Just because it's there (i.e. possible in the language, e.g. dynamic language features) doesn't mean you have to use it...

      (Relevant: How (and why) developers use the dynamic features of programming languages https://users.dcc.uchile.cl/~rrobbes/p/EMSE-features.pdf)

      The really annoying thing is that the NPM style isn't even idiomatic for the language! So much of what the NodeJS camp does is so clearly done in frustration and the byproduct of a desire to work against the language. Case in point: the absolutely nonsensical attitude about always using triple equals (as if to ward off some evil spirits) and the undeniable contempt that so many have for this.

  10. www.mindprod.com www.mindprod.com
    1. local a (e.g. aPoint) param p (e.g. pPoint) member instance m (e.g. mPoint) static s (e.g. sPoint)

      This is really only a problem in languages that make the unfortunate mistake of allowing references to unqualified names that get fixed up as if the programmer had written this.mPoint or Foo.point. Even if you're writing in a language where that's possible, just don't write code like that! Just because you can doesn't mean you have to.

      The only real exception is distinguishing locals from parameters. Keep your procedures short and it's less of a problem.

    1. This can get much worse than the above example; the number of \’s required is exponential in the nesting depth. Rc fixes this by making the backquote a unary operator whose argument is a command, like this: size=‘{wc -l ‘{ls -t|sed 1q}}
    1. The argument used to propose its use is to avoid the construction of multiple volatile objects. This supposed advantage is not real in virtual machines with efficient garbage collection mechanisms.

      Consider a Sufficiently Smart Compiler/Runtime where a multiply-instanced class has the exact same runtime characteristics as code that has been hand-"tuned" to use a singleton.

    1. When creating a singleton, the author is making the assumption that no program will ever have any reason to have more than one instance of the class.  This is a big assumption, and it often proves wrong later on when the requirements change.
    2. Avoid singletons from the start.