News for hackers. Stuff that matters.
Re:Become Shell Literate by bentcorner on Saturday December 12, 2020 @01:40PM (#25400401)
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 looking at your code in a diff viewer or in your browser in an online repo.

Re:Become Shell Literate by gfxgirl on Sunday December 13, 2020 @12:41AM (#25404570)
I'm not really sure of your point. I can't imagine naming something "flag" but I can imagine "enabled" or "visible"

In my experience it's not common to name members/properties taking other classes into account so I might have a Window class with "visible" and Shape class also with "visible" and Player class with "visible". I don't think I've ever seen a project where they made those "someWindow.windowVisible", "someShape.shapeVisible", "sompePlayer.playerVisible" just for the sake of searching regardless of if they person is using an IDE that could tell the difference or just notepad/nano.

All of my experience is they would all be just "someWindow.visible", "someShape.visible", "somePlayer.visible". In other words, that choice has nothing to do with IDE or no IDE.

Is there some other example you were thinking of?

Re:Become Shell Literate by morelisp on Saturday December 12, 2020 @02:34PM (#25400853)
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 by scns on Saturday December 12, 2020 @04:08PM (#25401726)
Intellij would mark those with squiggly underlines and even jump there in an otherwise error free file when you press f2.
Re:Become Shell Literate by tracyhenry on Saturday December 12, 2020 @03:18PM (#25401307)
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.
Re:Become Shell Literate by BlueDingo on Saturday December 12, 2020 @03:58PM (#25401653)
Right, the typo was done once and from then on the IDE offered it up for auto completion.
Re:Become Shell Literate by MereInterest on Saturday December 12, 2020 @09:03PM (#25403661)
I think it also comes into the language design. If you expect programmers to use an IDE, then language features and best practices can require large amounts of boilerplate, on the expectation that the IDE will be generating that boilerplate. For languages expecting no IDE to be used, the language itself needs to avoid that boilerplate.