Earlier quoted context omitted.
A better example might be perpetuating typos (and other less obviously wrong bad names), the number of times I've seen some variant of "setIntercetpor" or "closeDataSteam" or... anything that gets actually typed as "most of the first word plus completion."
Your example sounded like results produced with editors that do not understand the underlying language. A proper IDE would not prompt you with closeDataSteam if it's not a member function of the object to which you want to close the data stream.
Become Shell Literate
151–160 of 341 posts
Re: Become Shell Literate
#152Earlier quoted context omitted.
> Yes, this is doable with find and awk You don't even need awk for that one: grep ^class `find . -mtime -1 | grep py$` Maybe you could try to use an example where it really makes a difference? Some natural operation that would be very cumbersome with plain shell but is easy and direct with marcel. Otherwise many people may fail to see the point.
Read a CSV file, foo.csv, and sort by the sum of the 4th and 7th columns (which are integers): read -c foo.csv | sort (*x: int(x[3]) + int(x[6])) I suppose we could argue about what is a "natural" operation. Marcel grew out of a set of tasks that were "natural" in the domain I was working in. An important part of that domain was operating on databases, and clusters of nodes, and databases on those nodes. So marcel ha…
Yes, that's a much better example. Here the "obvious" shell solution involves using awk to compute the sum of the two columns and putting it as the first field, sorting by the first field, and then removing that field. I guess a "rosetta stone" of such examples (e.g. on the frontpage of the site) would make a strong case for the interest of marcel.
Re: Become Shell Literate
#153Someone should write "become IDE literate" as a response to opening of using vim with no extensions and using grep a lot. I've been using editors that are language aware since at least the late 90s. Depending on the language they'll show me all references, take me to the definition or declaration, stack those jumps so as I follow the links I can pop back a level to where I was. All of this is instant. 1000x faster th…
On top of that, his opening example is so easy if you use a GUI for Git it's mind-boggling. It'd literally be click status column to sort, click top entry, shift-click bottom deleted file, right-click, restore. Done, a couple of seconds without even thinking about it. And somehow this simple task in a GUI inspired a blog post about how useful the shell is. I'm not going to deny a shell is extremely useful, and knowin…
In any case there are like a bazillion of GUI git tools. Are you certain each and all of them support this feature? If someone doesn't know any of them, what are the odds the first GUI tool they install has this feature? The hidden cost of finding the "right" tool is overlooked in its advocacy.
Re: Become Shell Literate
#154Earlier quoted context omitted.
I do like my IDE but my one complaint with leaning on it a lot is that it lets you write code that is harder to understand if you don't have that IDE readily available. For example, if you name a member "flag" and you have several types with the same member, your IDE can tell you where this flag is used, so it's not a big deal if you wanted to refactor or are trying to track down a bug. But god help you if you're loo…
A better example might be perpetuating typos (and other less obviously wrong bad names), the number of times I've seen some variant of "setIntercetpor" or "closeDataSteam" or... anything that gets actually typed as "most of the first word plus completion."
Re: Become Shell Literate
#155I agree that IDEs and the tools that accompany them are powerful and can make you more productive. Learning them is an investment that can pay dividends. On the other hand, most of the IDEs I took the time to learn in school are now obsolete. I still use the shell today because those skills are still relevant and have gotten me out of a jam plenty of times. I've chosen to prioritize learning tools that are reliable and lasting even if it costs me some productivity.
Re: Become Shell Literate
#156Earlier quoted context omitted.
Cant we make this argument for any level of abstraction? A lot of people start out with shells and end up being unable to understand how to construct a switch or adder in logic gates. A shell is a great tool but shouldn't be a crutch.
Emotionally, I actually agree with this. I'd love for at least a basic understanding of computers down to boolean logic and the very basics of semiconductors up to the OS level and beyond to be "widely known" by programmers and "computer literate". At the same time, I know that's extremely unreasonable to expect. I guess for the shell and editor, you can argue you ought to understand it stripped of abstractions, sinc…
cf. https://www.pbs.org/show/crash-course-computer-science/
No, it won't give you the level of understanding that an actual comp sci/engineering degree will (after all, it's just a couple dozen ~10 minute videos), but it does touch on all the major concepts and through the series builds on concepts presented earlier.
Re: Become Shell Literate
#157Earlier quoted context omitted.
> they'll show me all references, take me to the definition or declaration, stack those jumps so as I follow the links I can pop back a level to where I was. All of this is instant. I do this in stock vim using ctags files. You can generate them with anything, though “exuberant ctags” is very popular. Ctrl+] when over an identifier jumps to its definition, and there’s a tag stack to jump backwards similarly (you can…
The point of IDE is that there is almost 0 configuration. You get everything by just clicking "install". Y you can configure vim or emacs to be as expressive as IntelliJ. But the time it takes is much larger than 0. And when you switch to another language you'll probably need to repeat many steps.
Re: Become Shell Literate
#158Earlier quoted context omitted.
> Some people are happy in their IDEs and see no reason to move to the lower-level of abstraction in their tooling. True but you're also at the mercy of whatever company is responsible for developing those IDEs. I'm not advocating everyone do development in shell but I feel like you should know what's going under the hood when things go wrong.
> True but you're also at the mercy of whatever company is responsible for developing those IDEs. With all the IDE companies being so ruthless, I wonder where are all those screwed-over IDE users running to.
Re: Become Shell Literate
#159Someone should write "become IDE literate" as a response to opening of using vim with no extensions and using grep a lot. I've been using editors that are language aware since at least the late 90s. Depending on the language they'll show me all references, take me to the definition or declaration, stack those jumps so as I follow the links I can pop back a level to where I was. All of this is instant. 1000x faster th…
On top of that, his opening example is so easy if you use a GUI for Git it's mind-boggling. It'd literally be click status column to sort, click top entry, shift-click bottom deleted file, right-click, restore. Done, a couple of seconds without even thinking about it. And somehow this simple task in a GUI inspired a blog post about how useful the shell is. I'm not going to deny a shell is extremely useful, and knowin…
With the shell, the second time you do it is a few keystrokes, if even. Wanna do it across multiple projects, it’s super easy without ever loading any of them in your IDE.
Wanna share it with teammates, you simply need to pass a script file to them, and they can do it without having to do anything.
And now finally if you need to incorporate this behavior in your headless CI? It’s the same script, instead of having to putz about with the CI configurations or whatever.
Re: Become Shell Literate
#160Someone should write "become IDE literate" as a response to opening of using vim with no extensions and using grep a lot. I've been using editors that are language aware since at least the late 90s. Depending on the language they'll show me all references, take me to the definition or declaration, stack those jumps so as I follow the links I can pop back a level to where I was. All of this is instant. 1000x faster th…
I strongly agree with this narrative and it matches my own experience. I spent 9 years of college and then grad school using exclusively either vi or emacs because I believed IDEs were a crutch that weak engineers relied upon. It wasn't until I got a real job that I found myself forced to learn a proper IDE (IntelliJ). It blew my mind just how powerful the IDE was and how it massively increased my productivity. Putti…