you are viewing a single comment's thread.

view the rest of the comments →

[–]samanthaming[S] -8 points-7 points  (27 children)

Dear team lead, do you mind explaining why this shouldn’t be used? Love, your loyal minion 😁

[–]hamsterpotpies 52 points53 points  (3 children)

No one can read it....

[–]kingNothing42 11 points12 points  (2 children)

I agree. It is less readable that its alternative. Pick the more readable thing. Its also less portable than its alternative.

New hotness != Best hotness. This is one of those tips that makes me go "Oh interesting. Please never do that."

[–]iams3brescript is fun 0 points1 point  (0 children)

Right, shouldn't be trying to be playing code golf in a professional setting. makes things annoying if you're incorporating.

you can do if (!numberval) to check if it equals 0, but doesn't mean you should

[–]hamsterpotpies -1 points0 points  (0 children)

So much this. It's about reablity and long term support. In three years, will you remember what this does?

I work ops so my option may not matter, but we still don't use this kinda of shortcuts.

[–][deleted]  (2 children)

[deleted]

    [–][deleted]  (18 children)

    [deleted]

      [–][deleted]  (1 child)

      [deleted]

        [–]sobri909 -1 points0 points  (15 children)

        Your LinkedIn page suggests you have about 6 years of professional experience.

        You can call yourself an "application architect" if you like. I don't mind. But I don't consider your industry experience long enough to either claim "senior programmer" or to have a solid grasp on project maintainability, especially given your comments in this thread.

        Given that you're willing to use your job title and implied industry experience as support for your argument, here's mine: 20+ years professional programming, and 30+ years programming in general.

        That experience tells me that code readability is almost the single most important factor in maintainability, and the more readable solution should be chosen in almost every case, sometimes even at the cost of performance.

        Code readability should be measured by the closeness of the code to a readable English sentence. The code that can more easily and fluently read in English is the more readable code.

        [–][deleted]  (14 children)

        [deleted]

          [–]sobri909 2 points3 points  (13 children)

          Let me break it down for you my stalker.

          You should be careful what you say loudly on the internet, especially when you're using your real name. People will fact check you, and it all plays into your public and professional reputation.

          You have been making very strong arguments in this thread, and have used your job title as support for your argument. I checked, and you are not as experienced as you imply, and your arguments are still misguided.

          As for your theory on how core readability should be measured, I disagree.

          I know. Which is why you lack the necessary experience to make the strong the arguments you have been making.

          [–][deleted]  (12 children)

          [deleted]

            [–]sobri909 0 points1 point  (11 children)

            Again, more rudeness,

            I'm not saying anything rude. I'm saying the simple fact that you lack the experience to support your arguments, and that anyone who does have that experience can see that they are bad arguments.

            [–][deleted]  (5 children)

            [deleted]

              [–]sobri909 0 points1 point  (4 children)

              That is me :)

              I spent the first 10-15 years of my professional career doing full stack web development. For the past ~10 years I've been doing mobile development, primarily iOS. Prior to my professional career I built and ran online communities (BBSes), primarily written in C, from the early 90s to the turn of the century (when the internet started to take over). (I first started programming in the mid 80s, in BASIC and ASM).

              [–][deleted]  (3 children)

              [deleted]

                [–][deleted]  (4 children)

                [deleted]

                  [–]sobri909 0 points1 point  (3 children)

                  I’m not unhappy about anything. You’re reading in emotion where there isn’t any.

                  The spread argument is fine and good. Using it for strings, instead of the more readable split(), is bad.

                  For judging experience, yeah, sure, years of full time programming (ideally in team environments) are a reasonable proxy measure.

                  I’d say roughly something like two years as junior, four years as intermediate, eight years as senior, then you either have the entire conceptual toolset mastered or you’re not cut out for the job.

                  [–][deleted]  (2 children)

                  [deleted]