Ad
  • Default User Avatar

    I apologised for the tone of my first post. You accepted my apology and have now recanted. Not to mention that I was commenting on the solution you provided not you. I put forth my opinion and you disagree with it.

    I am, quite simply, baffled by your statements against me. You don't know me and I'm confused about why you continue to make public remarks about me despite this.

    I thought the point of this site (despite its adversarial name) was to enhance each others capabilities in our programming endeavours. You've made it very clear that you have no interest in anything that I may have to offer. On the contrary, you have made me feel increasingly worse with each response that you give. You have stated my position inaccurately multiple times and have yet to address any of my concerns or acknowledge any of my positive comments. In short, you have displayed no interest in anything other than winning (for some value of winning).

    From now on I shall refer to you as Jarl.

  • Default User Avatar

    Nice way around the arbitrary comma rule...

  • Default User Avatar

    Separating the 'or' clauses onto multiple lines would help with readability too...

  • Default User Avatar

    Good response. I didn't notice I was critisizing. Probably because I wasn't.

    You are articulate and appear sure of yourself. Perhaps you work in an environment where everybody is extremely experienced. I'm not sure. Because I don't presume to know you...

    I work for a successful software organisation that happily allows room for all levels of expertise.

    Your second last paragraph was out of line as it has nothing to do with our conversation other than your imaginations about me. Your second last setence was fine as a general statement but as you are replying to me it is a misrepresentation of my position to the point of being deceitful and I agree entirely with your last sentence.

    I hear your "don't be old-school" vibe and I'll go with it... Is there room for the rest of us?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    I don't think that 'var' needs to have teams. I'm intrigued by your preference for type inference particulary in a .NET language where the IL implies type inference.

    I like to write code that is functional and humans can understand. In my experience, the use of 'var' at best reduces the width of a line of code and at worst obfiscates the purpose of the code from those who didn't write it. The first is an inconvenience and the second can lead to many problems. Does resharper want to modify all your code to use 'var'? Weird.

    Always code like it's real... :)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Many Ms Man makes some good points.

    One line functions are bad functions. Knowing how to read them will help because many people write them.

    Don't be worried that you can't comprehend them. Rewrite them on multiple lines using variables and you will find that you can comprehend the logic and what they have done is obfiscate it through their "cleverness". This is the definition of unreadable code. It isn't clever, it's unreadable (not to mention undebuggable).

    Always write your code as though you are not going to be the person to maintain it. As much as possible it should be self documenting. If your code becomes difficult to understand because it isn't self describing due to an important consideration like performance, comment it. Instruct people why you have done what you have done.

    It is not you who are falling short here. One line code writers without explanatory documentation are bad at what they do.

  • Default User Avatar

    How did the use of var enhance your code?

    What does "seq" mean? Would someone else maintaining this code have any suspicion as to the goal you had?

  • Default User Avatar

    Good use of the one return. Bad use of the whole function on one line...

  • Default User Avatar

    Do not fall for the idea that just because the language doesn't require braces means that they aren't required. If you have an if, brace it. That goes for all bracable things.

  • Default User Avatar

    Is not using spaces for fun? It's like you're trying to make it unreadable.

  • Default User Avatar

    As with chris_w. One line of code for a function is bad practice because it is undebuggable.

  • Default User Avatar

    Multiple returns are bad for maintainability. In a well functioning professional environment you will not be the only person to maintain the code that you produce. Sneaky returns will be missed by future developers.

    The habit of writing functions on one line in this place is very poor. Being given kudos for it is even worse. Your code is undebuggable. Rather than reviewing your code we would need to review the tests that were written for it to identify its capability.

    Clever, maybe. Best Practices, definitely not.

    Edit: why are all my spaces after period's being removed?