• 0 Posts
  • 15 Comments
Joined 1 year ago
cake
Cake day: December 31st, 2023

help-circle
  • For those of us who read developer code better than PO/PM “english”, indeed code is the documentation, or at least can be. Ofc when the code is thousands of lines long, split between multiple files, interacts with networked resources that you’ve never heard of, sending signals that do who knows what downstream, upstream, sidestream, flipstream, or whatever… yeah documentation can be important too:-). Also when the code is in some other language that you don’t know quite as well.

    By “testing” I should clarify that I did not necessarily mean things like user or unit testing - though that stuff has its place too - but rather even more foundational “verify that your code does what it is supposed to do” kind of testing:-). One could argue that that is just straight-up “writing code”, but then too writing documentation could be folded into that as well, e.g. having things like human-readable variable names, Pre & Post conditionals for functions and the like, so it all gets a bit fuzzy here.

    And if we are being pedantic, a “quick call?” could save a month or year’s worth of time “writing code”, to ensure that you know what needs / desires to be done. Likewise, updating Jira could save someone else SOO much time, or even yourself down the line when you wonder about something that was never mentioned. So I assume that OP was not taking this all that seriously, and just joking about “yeah, meetings are less fun than writing code”, and we all ofc have to pile on with our further opinions about what’s fun:-).






  • The syntax of Perl seems superior to me, though partly b/c I just like the style of semi-colons and braces as in C++, and also so that you can edit it in any text editor you choose, not just those IDEs or ones that will show you the difference between a tab and some spaces.

    But mostly perhaps b/c I have not invested any efforts into actually learning Python the same way that I did Perl - that O’Reily book that explained, from the perspective of the literal creator, why things work in Perl as they do, was a fantastic read!






  • Admittedly, I too am not certain why “noone inprove bash such that you can write a normal foor loop with whitespace in file names?” :-P I just noticed that not only was “foor” loop misspelled, and “noone” is likewise improper (should be “no one” or “nobody”), but “inprove” is also a “performance improvement company that helps clients implement their internal continuous improvement programs more effectively, and achieve better, more consistent and sustained results”, according to Google’s (SEO) search feature:-P

    Therefore, I have little trouble believing that they wanted all of bash to be changed - for free ofc - so that they could do something like:

    touch “Iron Man”; mv Iron Man The Greatest Movie of All Time!?

    And the computer would auto-magically figure out that since mv is a command involving files, and “Iron Man” is a file that exists, that it should be the first argument and the rest of the text is the second argument. i.e., why learn how bash works, when you can make a post to !Linux@lemmy.ml and put hundreds of programmers to work for you to change the entire world, at your beck and call, while also working in how ashamed they should be that they haven’t done that effort preemptively?

    Which ngl, might be a good idea. Or, you know, OP could learn to use tab-complete that already does that. I should have mentioned that I suppose… but it seems too late now b/c I doubt the mods will let this post remain for too much longer. Even if you were correct and they meant variables: they never actually said that, which makes this communication really difficult to both guess what OP might have meant and also solve their problem for them, on top of them being willing to learn on their own. But we can do better on our end too: perhaps we could create a community specialized in providing help to newcomers who want to learn linux - like what resources can they read/watch/play with, to help them get started? To be clear, *I’m* not offering to start that!!


  • OpenStars@discuss.onlinetoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    1 year ago

    That only affects whitespaces within quotes though. Still, fair point, except I just tried a bunch of stuff in both bash and zsh and touching a file works, echoing a string works, then I stopped so I don’t know about the asterisk but we have already veered far away from what OP said: “normal foor (sic) loop with whitespace in file names” - whereas what you had seems significantly more advanced than a “normal” foor (sic:-P) loop.

    Notably, Mac OSX right out of the box uses zsh. I haven’t touched “standard” personal distros for a number of years but a quick search suggests that Mint, Ubuntu, and NixOS all use bash by default - which halfway though not entirely surprises me? Anyway if OP wants to change their default shell to something more advanced, that would be fine for common every-day usage, though asking for bash itself to now be changed after decades of backwards compatibility seems a non-starter to me. There are reasons for why it works as it does, and those reasons have nothing to do with it being “old”, but rather b/c it “works”.

    And the underlying reason for that is b/c we are still using keyboards. The addition of mice as HUDs enabled drag-and-drop, and perhaps some kind of glove or fingertip reader or eyesight-tracker may allow the same, like Minority Report (an old movie) or Iron Man style pinching an “object”, grabbing it and letting it go, is basically just another style of “mouse”. Afaik, there hasn’t been even a hint of anything truly revolutionary for all this time. Although I can envision one such idea: combining keyboard+“mouse” in a more intelligent way, like if you start typing a command, then fix your eyes on the screen to a particular file and perhaps flick your eyes in a particular direction to indicate acceptance and it could fill it in for you, without having to move your hands away from the keyboard. With glasses and ubiquitous cameras everywhere now, we might see something like that in a few decades? Though it would put further pressure onto privacy concerns over having a camera watching every move you make.


  • It’s a subset of the standard delimiter problem: if I want to use the delimiter inside of an entry, can I even do that and if so then how?

    e.g. in comma-delimited lists you could “escape” the commas individually, or encapsulate each entry inside quotes, or provide each entry by name, etc. - all of which significantly complicates the retrieval process by adding greater complexity to decide on rules determining how it all works (like if by name, then what if the user [stupidly? on purpose?] provides multiple entries with the same name - do subsequent ones overwrite the earlier ones or their contents get appended to the end and if the latter, is any separation provided between them? and on and on it goes):

    • item1,item2,item3
    • “Denver, CO”,“New York, NY”,Miami/, FL
    • “Lastname, Firstname”,Lastname/, Firstname
    • item1=“Denver, CO”, item2=“New York, NY”

    Common English has issues with this too like is a list with “John, Marsha, Barbie and Ken” 4 entries or just 3 where the latter is a pairing? (leading to Oxford comma discussion:-P it is very important though bc while while individual people may have similar needs like food, pairings may have different constraints like if they drive together then they need less parking space)

    So this delimiter issue is not even specific to CLIs, nor even computers in general - it is a universal problem with any communication system.


  • It has nothing to do with bash specifically - other shells like sh, csh, tcsh, zsh, etc. are the same. Whitespace in UNIX is just that way by design. And it’s been a long while since I used a Windows CLI but they were that way too - plus added all that weirdness about ~1 at the ends of filenames, and Mac OSX also. So not even just UNIX, but it’s how the CLIs tend to work, where whitespace acts as the “delimiter” between arguments sent to a program.

    program_name arg1 arg2 arg3 arg4

    So if you use whitespace like “cp file 1 file 2”, the CLI sends arg1=“file”, arg2=“1”, arg3=“file”, arg4=“2”, rather than arg1=“file 1” and arg2=“file 2”. These are just the foundational rules of how CLIs work - a computer can’t read your mind, and this is how you precisely tell it what you want, within this highly rigid framework to avoid misunderstandings.

    The alternative is to use a GUI, so like see file, drag file, and ofc that has its own set of tradeoffs good and bad.


  • I am starting to come around if not to the horrible solutions then at least the shift in thinking that made people consider using those, over the old-school approach.

    Back then, the internet was this cool new thing. Fast-forward to today, and all those old pages with broken links, outdated information, and outdated presentation of information, can be problematic. e.g., should a site show an email address, or a phone number, or will doing so allow it to be spammed by bots? (except: that will happen anyway, no matter what, and why prevent people who have legitimate needs to find information?)

    Back then, people had actual attention spans, and finding new information was cool, so when people saw it, they gobbled it up and relished the chance to do so. Fast-forward to today though, and there is so much more information (& unfortunately misinformation, plus active disinformation too) than could ever hope to be read, much less absorbed and/or retained, that the default is to skim or skip rather than actually “read”, e.g. a ToS/ToC that is mandatory to continue with a service that you use literally daily.

    So, I am not advocating for e.g. CSS, or React/Angular, etc., but I at least see why people were considering those options, b/c there were problems with the old approach too.