373 reputation
312
bio website
location New York, United States
age
visits member for 2 years, 2 months
seen Nov 16 at 23:27

Slowing converting from Stack Overflow lurker into a contributing member.


Feb
12
comment Is using '{}' within format strings considered Pythonic?
@Andrea - that's exactly what my first thought was, but it's hard to argue that the BDFL thinks it's un-Pythonic. After seeing the quote of him on this, I went back at looked at the Zen of Python again, and thought maybe this is a case of "practicality beats purity"? The rationale in the discussion (linked in Greg's answer) is around convenience for the code writer. And in any case, really the most explicit way to use string formatting is "{a}{b}".format(a=string_a, b=string_b) rather than the numbering. Anyhow, that's just my speculation and reading between the lines on the thinking...
Feb
12
comment Is using '{}' within format strings considered Pythonic?
To folks who are voting to close this question, may I just point out that what is or is not Pythonic is an important part of Python coding culture, and I'd argue coding culture is an important element of software engineering, an accepted subject of this site.
Feb
12
comment Is using '{}' within format strings considered Pythonic?
@GregHewgill - I don't agree that syntax feature being possible in Python automatically makes it Pythonic. But your quote of the BDFL's view on this syntax is very helpful -- thanks for finding and sharing that. If you made that an answer, I'd select it.
Dec
6
comment Is C# development effectively inseparable from the IDE you use?
Really appreciated your thoughts here, as you seem to really "get it" in terms of both the IDE and "Sublime VimNess" approaches to things. I'm with you in all you say here. Here's hoping it comes to pass.
Dec
6
comment Is C# development effectively inseparable from the IDE you use?
"These 'using' and 'import' statements are to aid human readability." -- yes, that's a key philosophical difference at work here. Readability at a textual level is a key first-order Python design principle. C# don't strictly need, but practically rely on a good IDE like VS to be "readable". Incidentally, "import" in Python is also more than about readability, unlike "using" in C#.
Oct
16
comment Is C# development effectively inseparable from the IDE you use?
@Svish - see the Stack Overflow question I linked to in my question: how do you know what namespace it comes from?
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
Lots of helpful insights from the various answers given (thanks to all!). Selected this one for answering the question explicitly: "Theoretically no, but practically yes."
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
@Andy -- I can see it sounds that way. But these text editors are actually very powerful, offering a ton of tooling and programmer efficiency features. It's just a radically different way of getting at and using those tools and features than an IDE (and one that may be more or less appropriate for certain languages/programming cultures).
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
@JimmyHoffa - thanks, that's helpful for understanding the C# culture.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
@MichaelKjörling - thanks. In Python you have to import stuff to use it -- that's definitely a difference. But my hangup is about reading not writing code. When you see a reference to a name, how do you know where it's from? The Pythonic way is: look for the import (which should be explicit by convention). The C# way, I'm coming to understand, is: use the IDE features and/or Google the docs.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
Not that I couldn't choose to use this idiosyncratically -- but coding isn't an isolated art and I think it's best to follow (or at least start with) the norms of a coding culture -- i.e. be "Pythonic" with Python and whatever the equivalent "C# way" is with C#. And it's clear from the answers and comments here that using a good IDE like Visual Studio is central to the "C# way" (if that's the right way to put it).
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
Thanks for the additional thoughts. By the way, funny you mention this. The (enforced) use of self in Python (to the point of even having to include self as the first parameter for a method) is one of the most distinctive features of the language -- and a good example of its philosophy of "explicit is better than implicit". It's another thing that will require a mental shift for me with C# culture. [continued in next comment]
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
@BinaryWorrier -- Python folks actually use a ton of tooling also; it just often via command-line tools and visually-minimalist-but-feature-rich-text-editors-with-lots-of-keyboard-shortcut‌​s-or-commands like Sublime Text 2 and vim. The end result in terms of getting lots of coding conveniences may not be all that different, but the way you get and think about those conveniences sure is.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
On a separate note, var in C# is nice syntatic sugar/compiler shortcut that I like for making code less verbose and repetitive. Just wish you could use it everywhere, not just inside methods.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
That approach exemplifies the cultural difference. Not that Python programmers don't google stuff -- of course they do -- it's just the way of thinking about it is different.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
The issue is reading not writing code. (The Stack Overflow question I link to above gives an example.) When reading code, how do you know where something comes from? With Python, you can look for an explicit import (assuming the code follows the strong Python conventions for using such imports). With C#, it seems the consensus is that in practice you use an IDE like VS.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
By the way, it could be argued that Python is also its own monoculture, given then strong adherence to what is considered "Pythonic" in coding style and approach, and the language's core design principle of having one obvious right way to do things. I tend to think programming monocultures in this sense can be very good, as it creates a coherent community and shareable code. It's just (too bad? and/or an opportunity to expand my mind?) that the Python and C# cultures are so... different!
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
Thanks, that's helpful context.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
That's definitely a big difference between Python and C#, but it doesn't really help me understand why there is such lack of explicitness in imports. As @pbr noted in his comment, Java (which also has the public/private distinction) is similar to Python in its cultural preference for explicit imports.
Oct
15
comment Is C# development effectively inseparable from the IDE you use?
I should probably have said "quickly read code"... It's quite a mental shift for me to not have all references right there in the same source file, and instead to use tools to locate those references.