Okay, if you ever feel bad about having screwed up your programming, ask any programmer you really respect what their last bug was, and I guarantee it'll be a null check or an equals check accidentally flipped to not-equals. The more experienced you are in this business, the dumber the bugs seem to get.

@falkreon My favorite was MANY years ago when I was a lot less experienced than I am now, a programmer I looked up to had an extra semicolon...

if (VeryLongFunctionName(foo, bar, smeg, head));

The condition was well past 80 characters long and no one noticed the extra ; on the end of the long line, so that next block of code always ran.

I learned a lot about programmers the day we found that.

· Web · 0 · 8 · 16

@varx @falkreon Right!? You have no idea how much time and whiskey was involved in finding it. Far more than it should have taken.

@minego @falkreon Like, this is the kind of thing you put in if you want to make a logic bomb and need plausible deniability.

@minego @falkreon that's why (agressive) auto-indent system integrated to text editor really improve the coding experience.
a long the days where I type a lot of code, it point out like 2 or 3 mistake of that kind {maching {, missing ; etc.)

@webshinra @falkreon I don't trust autoindent. I type every character, including tabs.

@minego @webshinra There's an accessibility angle here too; auto-indent, syntax completion, etc. can be the difference between being able to write code and not.

That said, auto-indent and me tend to butt heads even when configured to my code standards (such as preemptively indenting something while I'm editing it which, when finished, won't be indented, but then not updating the line once finished). So that particular thing, I don't use.

@falkreon @webshinra True, I don't fault anyone for using it if it helps them. For me it tends to do more harm than good though, so I don't use it.

@minego @falkreon Well, being a limited human being I'll continue to trust the guys behind emacs more than my brain in parsing long file for mismatches.

As every tool, they shape the work, if you like mashing your spacebar more than negociating with the indent-engine, that's your call.
But having a mechanical thing trying to add redondance into the syntax can only help to see what you've truely written (instead of what you would like to have written)

@webshinra @falkreon I have never managed to stop my brain from fighting with it. I do rely heavily on tools to validate the code I right, just not to help me write it.

@minego @falkreon ever tried things like paredit ? (for lisps)
It's pretty amazing how simple tool like it can reduce mental charge a lot.
But the best way to code is the one giving you pleasurable experience.
And not everyone have the same sensibilities.

@webshinra I prefer not to lisp, honestly. It's in the same category as regexes: Not verbose enough to ever be clear, no matter how careful you are.

@falkreon Do as you wish, but I was speaking of the tool, which is conceptually interesting to understand as a programmer.

(But notice that's probably not a really pertinent critics, expressibility being the main advantage of sexp syntax. Maybe learning scheme or whatever modern lisp correctly could help understand that.)

@webshinra @falkreon @minego I loved its auto-indent for C++ but for Lua it messed up everything. It was absolutely horrible for nested functions and custom DSL stuff.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!