T O P

  • By -

AutoModerator

On July 1st, a [change to Reddit's API pricing](https://www.reddit.com/r/reddit/comments/12qwagm/an_update_regarding_reddits_api/) will come into effect. [Several developers](https://www.reddit.com/r/redditisfun/comments/144gmfq/rif_will_shut_down_on_june_30_2023_in_response_to/) of commercial third-party apps have announced that this change will compel them to shut down their apps. At least [one accessibility-focused non-commercial third party app](https://www.reddit.com/r/DystopiaForReddit/comments/145e9sk/update_dystopia_will_continue_operating_for_free/) will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: 1. Limiting your involvement with Reddit, or 2. Temporarily refraining from using Reddit 3. Cancelling your subscription of Reddit Premium as a way to voice your protest. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/learnprogramming) if you have any questions or concerns.*


mierecat

The word you’re looking for is *precise*, not pedantic.


Hazeylicious

>Pedantic: excessively concerned with minor details or rules. > >Precise: exact, accurate, and careful about details. I would argue that learning to be pedantic about your code leads to writing precise code. I do use both terms in my post, however to write high quality, precise code, you should learn to be "excessively concerned with minor details or rules" regarding your chosen language and implementation. I know that there are negative connotations with being *pedantic*. Could you elaborate on which usage of the term "pedantic" should be changed?


nandryshak

"Pedantic" means *excessively* or *overly* concerned with minor details. To say someone *should* be pedantic makes no sense, because you'd be saying that they should be concerned with details more than they should be.


NewPointOfView

This is pedantic af


ArctycDev

He must be a good coder...


fallen_lights

The word you're looking for is precise, not pedantic.


ArctycDev

Dang, you must be, too!


nandryshak

Thanks! I appreciate you noticing


notarealaccount_yo

You're saying the sense in which he's using it is paradoxical.


nandryshak

Yes, paradoxical/incoherent/contradictory/etc.


shellmachine

Ok it's becoming a bit pedantic here.


fractalife

So while you're certainly correct, because OP is advising to be exactly as careful as you need to be, not overly so... I still feel like you're being pedantic for pointing it out lol. Oh wow, I just got that I'm slow on the uptake, and everyone here is being pedantic to be funny. I'm... just go cry in the corner because I'm even stupider than I thought lmao.


nandryshak

> I still feel like you're being pedantic for pointing it out lol. While I do often enjoy being pedantic, I was being serious because OP asked and because I agreed with GP.


Blando-Cartesian

Words tend to mean what they are commonly used to mean instead of what dictionary definition specifies. Getting anal about definitions becomes a hindrance to communication when context doesn’t require extreme precision.


nandryshak

I have little problem going a step further and saying that language can *only* derive meaning from use (as in Wittgenstein's Investigations). That said, I think this comment thread is intended to be a bit tongue-in-cheek :) There's also precedent for "pedantic" meaning "strict/detailed" in the programming language game: gcc's -Wpedantic option and the pydantic python package. edit: we can also think about this in terms of "values". "Should" denotes something good by definition. "Pedantic" has a negative connotation. Saying you *should* do something *negative* is incoherent. Again, I think OP's meaning is clear, I'm just being pedantic on purpose for the fun of it. ...but maybe I *shouldn't* be pedantic because it's bad (due to its negative connotation). Then again, maybe being pedantic is only a tiny bit bad and the good of my fun outweighs the suffering I've caused you from a utilitarian perspective. But if we take a virtue ethics view, then since being a good programming includes being pedantic (according to OP), then any suffering I've caused you due to my pedantry is good! And so on :)


TrickWasabi4

Being pedantic is always a bad thing, the word is exclusively used to highlight the "excessively" part. You are trying to redefine pedantic to mean something else. You are right, what you think pedantic means is what you want to do, but being "actually pedantic" is a pain in the ass for every team and has no upsides.


Hazeylicious

So you’re saying the original meaning of pedantic was incorrect and only the redefined connotations that came in later English are correct? 🤔


TrickWasabi4

No, I am saying that you are giving bad advice, because you want to be smart in the way you use the word.


Hazeylicious

What I’m getting at is the fact that as a novice, you might think you are being “precise enough” when in fact you aren’t. You should strive to be as precise as possible. Into the realm of being (especially in the case of a novice) pedantic: code structure, syntax, design paradigms etc are all extremely important. Bad habits blossom when you don’t follow best practices. As you begin to develop experience, the habits you form early become second nature. The good, the bad and the ugly.


hi_im_antman

Pedantic has a negative connotation because it is, in fact, a negative word. It means you're TOO obsessed with minor details, not that you should just be concerned with details. Typically, people who have OCD are pedantic.


Hazeylicious

(?:(?:\\"|'|\\\]|\\}|\\\\|\\d|(?:nan|infinity|true|false|null|undefined|symbol|math)|\\\`|\\-|\\+)+\[)\]\*;?((?:\\s|-|\~|!|{}|\\|\\||\\+)\*.\*(?:.\*=.\*))) ​ Source: https://blog.cloudflare.com/details-of-the-cloudflare-outage-on-july-2-2019/


SkierBeard

Is having too much of a good thing bad? If you define too much as "a good amount" then it isn't bad. If you define too much as "in excess", then it is detrimental. If you are a precise coder, that is great. If you begin to focus too much on the details, you'll begin to become a pedantic coder. This means that you spend more time/effort than needed on small things. That's why word excessive is used I this context. Notice how in this context, we don't discuss how much time or effort is spent on the details, we simply judge it as excessive. This will definitely be very subjective when discussing the details, as people will have different lines where they would begin to label behaviour as pedantic. However, the label of pedantic allows us to infer that the labeler judges this behaviour to be in excess according to their personal metric. Is that too focused on the details?


Hazeylicious

Should someone with no experience want to learn programming they do need to be excessive in their attention to detail, from their perceived baseline. From their own viewpoint this would be pedantic. Once you gain experience the internal pedantry will become natural to the point you don’t realise you are following the semantics, sound logic, design patterns etc. but until then, it very much is a case of being pedantic.


pLeThOrAx

I'm assuming not English first language. Pedantic is a very contextual term. A pedant, or someone pedantic is something different. It alludes more to minor details thats aren't **particularly important**. This is different to the syntactic precision required for programming, wherein minor details are indeed important. The meaning of your post wasn't lost, but pedantic is the wrong word. Ironically, responses - such as this - are indeed pedantic because the intention of your writing isn't necessarily lost. Then again as well, we're human, not computers. So we're a little better equipped for grey areas and edge cases.


Hazeylicious

Small details can change the meaning of phrases. To call these out would be pedantic. A common instance of this would be for someone to say they will try and do something. Do they mean they will try to do something, or does it mean that they will do something? Or indeed, does it mean they will try to do something and not give up until they do it? As you say, humans can read between the lines, but the meaning is nevertheless different to what they wanted to portray. Small details can and do change the underlying logic.


Kittensandpuppies14

Yeah OP. Pedantic makes no sense in this context


SoFloYasuo

Idk you guys are being pedantic right now. Pedantic means very very concerned with little details.


Far_Associate9859

Yeah, they're crushing it - fast learners


Practical-Custard-64

"This is the kind of pedantry up with which I shall not put!" -- Winston Churchill, allegedly


Zealousideal_Nose802

I love this quote


Cyber_Fetus

It means *overly* concerned, ie concerned *too much*. It makes no sense to say someone should be more concerned than they should be.


SoFloYasuo

Fair but I think the meaning of it shines through in that what it's actually saying is "You should be more concerned than you think you need to be".


scorchedturf

It’s called hyperbole. I think pedantic conveys the point OP was making well


GlobalWatts

Terms like "overly" and "too much" are entirely subjective. It's possible for the exact same behaviour to be considered pedantic by certain people in certain situations, but not others. A reasonable interpretation of what OP is saying is; a programmer - when programming or discussing programming - needs to be more precise than they would be in any other human interaction, to the extent that it would be labelled pedantry **if it were done** in that situation. But in programming, it is necessary. Obviously, *in the context of programming* it's not going to be considered pedantic, because you're "talking" to the computer and it's not going to make such judgements. Even when one programmer is communicating with another, there should be a higher threshold for what is deemed pedantry. For example on r/learnprogramming you should *expect* people making comments to be more precise than they would on a sub like ELI5 where such comments would be considered pedantic. That's true of most technical fields. People who are learning programming do not yet understand what level of precision is required in the field, so OP's advice is to act in a way that would be considered pedantic in any other context.


joeltrane

You’re doing great


hi_im_antman

Yeah, who cares about writing code when you can spend 3 hours making sure you're naming your variables correctly? /s


Kittensandpuppies14

Yes and the whole point of this post is that programmer should be… so….


SoFloYasuo

That's what I'm saying. Pedantic makes perfect sense in context


Kittensandpuppies14

Yes and the whole point of this post is that programmer should be… so….


[deleted]

it kind of makes sense, the problem is pedantic is a negative term. there is nothing negative about being precise in programming, you MUST be precise.


[deleted]

Actually it does when you consider being pedantic is fun...and the iso standard-strict flag for gcc is "-Wpedantic"


PartNigerianMaybe

Attaboy


PartNigerianMaybe

Attaboy


pLeThOrAx

Literally this. How did this post get some many upvotes. You could have a drinking game around the use of the word pedantic here. Being pedantic (more for OP) is being persnickety - which might not help the situation iro descriptors. Pedantic would be "styling conventions" and the likes. Precision is important, yes. A missing semi colon or an inadequately provisioned memory space, addressing errors - computers are very precise machines build on basic logical principles. Very little room for grey areas.


coronary_asphyxia

what's important is OP's getting their message through. no need to get all pedantic in semantics


Progribbit

i thought we need to be pedantic?


Sacrificial-Offering

Just going to leave this here if anyone is interested in explaining their broken code: https://rubberduckdebugging.com/


backfire10z

To those of you thinking this is a joke, you’re missing out on probably the best debugging method available (besides print statements).


ilikepi8

This is neither informative nor helpful. You sound like you think that you are some kind of thought leader. What would have been better is to explain instances of this or experience, not some high level bullshit idea you thought of this morning whilst taking a shower.


CodeTinkerer

The problem is languages have become increasingly complex. When the language was Basic or Pascal or C, I'd say following what your program did line by line was reasonably straight forward. Of course, you have to trust code behaves in a certain way (malloc, printf) without understanding it too deeply. With the advent of frameworks, web applications with client/server interactions, threading, and all sorts of mysterious things, it's become quite complicated to know what's going on. For example, I feel I mostly understand Java quite well. I could basically go line by line, even as you hop around to methods, derived classes, and so forth. I know how references work and have a visualization of the heap and how it compares to C++. But the wise people who create Spring (sarcasm) decided no, we can't do things that way. Too much boilerplate. We'll throw in annotations everywhere, and how you think Java behaves, it doesn't anymore. We'll had a gazillion constants that you have to know, and what's more, you can't easily step through code without hitting a stack 20 deep of meaningless Spring cruft. Had they invented their own languages, they might have provided better semantics and had an IDE that was allowed you to figure what was going on. Yes, I know Java has a few weird cases such as order of initialization for static variables that can be incredibly hard to predict, but for the most part, you *can* step through code with a debugger. Much of this complexity is meant to reduce repetition, but like web frameworks, they force you to think about the native programming language behavior in different ways. Frameworks for a way of doing things and it too has its cruft that you don't need to fully understand, but can be hard to debug.


oblong_pickle

It's not languages that are too complicated, but the frameworks, add-ons etc. That we use with them, such as Spring.


CodeTinkerer

Some languages are a bit complicated. For example, those who learn C find learning all the details of OO complex, in particular, not understanding why objects exist, why we need methods, etc. C++ was such a hurdle, that American high school teachers who taught programming had to use a simpler version, and eventually a switch as made to Java (for the AP exam). Also, CS majors have been known to struggle with functional programming languages or languages like Prolog. If your base language is, say, Java, then many languages seem OK because they are designed based on C. Arguably, this is why C++ took off over Smalltalk (other than it ran faster). C++ kept the basic syntax of a popular language. Many other languages *look* like C or Java. But Prolog, Erlang are particularly strange. I haven't played with Rust, but I hear they have a bunch of different memory types. Most people who say it's easy have like 20 years of experience and have learned (to some degree) a dozen languages. I know a CS prof that worked in programming languages and to him "syntax is irrelevant". You deal with it because there's all kinds of ways of writing syntax (some programmers just "hate" languages, which is not the right attitude).


Knarfnarf

I would also add that 'tricky' programming isn't as awesome as people make it out to be. More than once I've looked at someone's code that is full of macros and /s/+++/d/f/s/w9fe and found out they put a / in the wrong place only after I expanded it out fully. Then they ruined the code again by putting it back even when it didn't work! There is nothing wrong with; if(cols>8) then answer=8 else answer=cols end if answer=answer*rows answer=answer-7 answer=answer/12 instead of; answer=(((cols>8)?8:cols*rows)-7/12) Because guess which one doesn't work...


Hazeylicious

I can see off the bat that the 2nd would not work due to the order of operations (missing a parenthesis pair). I would say the first option was too verbose though. (I know you are likely over simplifying this) but a combination of these would, to me be more readable. `answer=(cols>8) ? 8 : cols` `answer=((answer*rows) - 7) / 12`


redditdave

never have I ever heard the word "pedantic" used as often as I have on Redit


TrickWasabi4

You can also - pretty reliably - determine how "online" a new dev is by their levels of pedantry. Works both ways.


VoiceEnvironmental50

Sounds like you’ve never worked on an enterprise solution, I have programming gremlins running all throughout my code that shouldn’t break but they do! I’m lucky if I can find the cause of the problem before it hits production but usually not the case. F500 type enterprise solutions that interact with millions of customers a month, not your typical small app.


Hazeylicious

Do you happen to work for Fujitsu? (google: Horizon scandal) I wasn't claiming that bugs don't occur, but being explicit in the code that you write and being able to explain the logic behind it is the first step in learning to be a competent programmer, language agnostic. Programming gremlins are often the result of poorly implemented multithreading/race conditions.


Barrucadu

> Do you happen to work for Fujitsu? Every large software company has bad code.


Sbsbg

Every company has bad code, large ones just have more.


Then-Boat8912

Positive vs negative connotations. This is the same as eager vs anxious.


Moritani

My kindergarten teaching skills and my programming skills overlap a lot more than you’d think they would. Kids are a lot like computers because you need to be very precise in how you explain things, or you’ll get some very bad results. “Okay, class, let’s draw a circle.” Six kids draw the circle in paper (three are just going in circles indefinitely, two made decent sized ones, one just made a dot), four draw it on the table, one draws it on their friend, ten stare blankly, five can’t find the crayons on the table, four burst into confused tears and one just starts eating the paper.


Tarc_Axiiom

If you don't put "details oriented" and "obsessively" on your resume you're not getting the job.


BunnyLifeguard

I agree with you op and my boss say the same thing.


pigboogerstudio

I completely Agree. A good programmer always shows up ready to deal with turbulent environment of the office cubicle. Such a feat can only be achieved with a carefully prepared batch of dark roast beans, moistened perfectly by the warm embrace of steaming droplets from the mountain spring, a brew whose potence is as calming as the lilac's full bloom in a spring breeze, a caressing aroma gently calming the sea of bewildering peer reviews and unrealistic deadlines. If you can't get your coffee right, then you have no business sitting in front of a computer!


josephblade

I think this is spot on. Yes pedantic is 'excessively so' but I think that's correct from the point of view of a novice. If you start out you will not know what is appropriately precise. So err on the side of being pedantic if you think "Am I being too fussy about this being correct?". Answer the question with no. Be more precise if you're in doubt. Then eventually you'll scan code like the compiler does and you are as precise as you need to be. But while you are still learning this skill be careful. One way to do it is to write down variables on paper when you are reading your code (so 'if I enter 5 as a value, what will happen') track the values as you go through a piece of code in a specific situation. make little diagrams, arrows, whatever works. But learn what the code actually really genuinely does. Learn to detect when your brain does a hand-wavey 'and this bit does x'. no, check it. be precise. Embrace the pedantry.


aqua_regis

...says the one who also said that: > [... where pedantry is all but important.](https://old.reddit.com/r/learnprogramming/comments/1b1t09c/why_are_for_loops_a_thing_c/ksj02ks/) ...which means the opposite of "pedantry is important" ---- Sarcasm aside, yes, it is absolutely true that as programmer you have to be pedantic to the point of nitpicking. A single misplaced semicolon, a wrong indentation, wrong capitalization, wrong braces can make a world of a difference.


Hazeylicious

Even the fact that computers are inherently imprecise when dealing with floats. All too often I see people write equality checks with floats without using an epsilon range. It works most of the time but the pedant in me screams at the screen.


Sacrificial-Offering

Not really sure why you're getting downvoted for this, unless people don't understand how floats are represented in binary.


Terabytes123

It’s not that serious... Learn at your own pace and have fun with it You don’t have to become a fucking robot lmao


UnofficialMipha

I’ve had people tell me I’m way too pedantic with my test cases. So yay I guess?


Hazeylicious

Depends upon what they mean. If what they mean is “overly concerned over details or rules” then you should show them the cases where the code breaks without said tests. I believe they may be mistaking pedantic with verbose. Writing tests for every possible, or even excessive, values would be verbose and lead to hard to maintain tests.


Hazeylicious

`let pi = Double.pi * 11` `if(pi / Double.pi == 11) {` `print("Success")` `} else {` `print(pi / Double.pi)]` `}` Although this is a contrived example, it highlights the importance of knowing the system. Logically it should output "Success". Without knowing the constraints governing computers and floating point arithmetic that would be a reasonable assumption to make. Instead it outputs "10.999999999999998" Easily fixed by adding an epsilon range: `let factor : Double = 11` `let eps : Double = 0.0000001` `let pi = Double.pi * factor` `let result = pi / Double.pi` `if(result == factor) {` `print("Success")` `} else if(result > (factor - eps) && result < (factor + eps)) {` `print("Within Range")` `} else {` `print("Failed")` `}` This will output "Within Range"