News for hackers. Stuff that matters.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @06:20AM (#36721903)
As an engineer for 10+ years with pretty severe ADHD (unmedicated, I cannot usually even read more than a few pages of a book before either losing focus or feeling drained) I have always been aware of how much my performance fluctuates based on the cognitive load of dealing with the code I am currently working with, and how it is displayed. I half-jokingly tend to describe it to people as having a "small brain buffer" where while I can understand (and design and implement) very complex things, it is easy for me to flounder when debugging if I feel unable to visually see or mentally hold the entire problem in my head at once. This is especially true if the code isn't mine.

It is for this reason that I try to write what I feel is very obvious or self-explanatory code, why I try to keep functions/modules as simple as possible and ideally not longer in length than I can see on my screen at once (when possible), and why I almost exclusively join small/new teams who don't yet have an enormous codebase that I'll have to wrap my head around. I am never done tweaking the UIs of the editors I use to maximize my ability to work around these things.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by Netcob on Friday July 14, 2023 @06:35AM (#36722007)
Same here. I try to see the bright side, where I am basically forced to write "clean" code because anything else just doesn't fit my buffer.

And I feel a kinship with current LLMs with small context sizes.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by elcritch on Friday July 14, 2023 @06:54AM (#36722125)
It's funny, my input buffer may be small and it's a large mental drain to read busy code (ADHD con), however once I grasp how a code base works it's just there (ADHD pro).

It makes me wonder if it's related to the hunter-gatherer origin hypothesis. In that scenario covering large tracks of land was beneficial and that ability can be used to mentally map code. The flop side this also leads to distractibility and boredom paying attention to monotonous details.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:07AM (#36722224)
This is true for me as well, but the amount of time/effort it takes to get to that point can vary wildly, sometimes being a bit prohibitive, other times never fully getting there for the duration of the job. If I wrote the code, or was present for most of its growth, or have spent whatever time it took in this instance, I am pretty damn efficient with it indefinitely, as long as I don't for whatever reason take a huge break from working with that codebase. (As a ZFS fan, the silly analogy for my brain that I half-jokingly give people here is that I have a high amount of L2ARC)
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @06:58AM (#36722159)
I did have this weird lightbulb moment a few weeks ago where for a moment I felt like an LLM was the perfect parallel to describe how my brain worked
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by rightbyte on Friday July 14, 2023 @06:36AM (#36722014)
> flounder when debugging if I feel unable to visually see or mentally hold the entire problem in my head at once

Surely this is a general problem and not specific to programmers with ADD? Or do you mean you are relatively worse at "needle sting debugging"?

You second paragraph is just sane things in general. I wish your mindset was more common among my colleagues ...

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @06:52AM (#36722122)
Relative to my peers I have often found myself to have lower tolerances in these areas. It sometimes surprised people when I felt something was complex (to work with, not conceptually) when they did not, or at the length of time it could sometimes take me to fix something that involved digging through a lot of code.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by VHRanger on Friday July 14, 2023 @07:09AM (#36722236)
ADHD is a quantitative disorder, not qualitative.

To some extent, everyone gets mild versions of ADHD symptoms, especially if tired/bad nutrition/no exercise, etc.

ADHD is when these symptoms harm quality of life significantly across many domains and since you were prepubescent (it's a brain malformation, not a series of bad habits)

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by steve_adams_86 on Friday July 14, 2023 @11:04AM (#36725007)
To expand on that, I think it can be clarified somewhat by describing the mechanism at work.

People without ADHD have a generally-working motivation/reward system which is undergirded partially by dopamine. This neurotransmitter is relatively low in ADHD brains, which seems to lead to signal:noise issues. That’s likely a cause of having a highly distractible baseline state, but also leads to bursts of dopamine seeming more salient and arousing. You have a harder time regulating motivation and evaluating perceived rewards.

A lot of what happens in the brain is based on relative states. If your dopamine is always low, something making it spike will seem more interesting than it necessarily should. If your dopamine trends higher, you’re going to have an easier time regulating interest, motivation, and an ability to transition through things you need to do — particularly things you don’t want to do.

The inverse of a dopamine spike is a dopamine drop. This impacts the brain in important ways as well. In a person with ADHD, going from a high to a low can often cause serious declines in mood and energy. In a more typical brain, the same effects are present but less severe.

So while these are all normal challenges people face because they’re the product of the same brain mechanics, a low dopamine baseline makes these mechanics more extreme in people with ADHD. They are primed for distraction and clinging to things which increase their dopamine. This could be video games, relationships, drugs, hobbies, etc. It could even be work too. They’re also primed far harder falls from their highs. This extreme oscillation often means some aspect of life suffers due to a lack of balance. That’s why it can be a disability.

Hopefully that helps explain the quantitative aspect.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by AndrewKemendo on Friday July 14, 2023 @11:49AM (#36725699)
Thank you for this very straightforward and concise explanation

I'm almost 40 and just realizing that I probably have some version of ADHD and your description of the Dopamine roller-coaster fits perfectly with my experience, both good and bad.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by steve_adams_86 on Sunday July 16, 2023 @08:14PM (#36752708)
I highly recommend reading up on it if that particular aspect resonates with you. Driven to Distraction is a very useful and informative read with a decent amount of technical information as well as personal accounts to help relate how the condition manifests.

It’s very diverse. It isn’t always bad, but often is, and even people with god outcomes can often benefit from the insight of understanding why they’re different.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ck425 on Friday July 14, 2023 @12:29PM (#36726251)
It's also why hyperfocus is common and more extreme in ADHD. You can't always control it but when you do get into something everything else becomes a blur and you can go for hours because that high burst of dopamine obliterates everything else.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by _gmax0 on Friday July 14, 2023 @05:31PM (#36730203)
And to think psychiatrists are bestowed with the authority to mass-prescribe amphetamines upon accurately deducing the presence of ADHD from brief patient self-evaluations is eyebrow raising.

Looking forward to when a portable EEG monitors are available at an affordable price.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by tpmoney on Friday July 14, 2023 @02:34PM (#36728072)
Like most discussions of ADHD it’s hard for people with it to explain because the only terms they have for it are the same terms everyone else has for things, so it sounds like the sort of problems everyone has. But when you have ADHD it’s also different because you can’t “just do X” where X is something that works for people without ADHD because something that you can’t describe is different.

An (imperfect) analogy I saw recently was it’s like talking about debt between someone in a middle class household (non-ADHD people) and someone in a poverty household. Sure a lot of the problems are similar in both word and shape, but the middle class person can’t imagine “had to take out a pay day loan to buy used tires from joes tire shack” and the poverty person can’t understand “we had to replace the AC this year so we cut back our spending, and had to skip the family reunion at the beach until the credit card was paid off”.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by bestouff on Friday July 14, 2023 @06:26AM (#36721947)
Hey you are a younger version of me ! I completely agree, and I am now very selective wrt where and with who I work and I still love my job.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by giantg2 on Friday July 14, 2023 @06:51AM (#36722113)
"and why I almost exclusively join small/new teams who don't yet have an enormous codebase that I'll have to wrap my head around."

How do you find these teams? In my 11 years, I don't think I've ever found myself on a greenfield project.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:20AM (#36722296)
I live in Southern California where there was no shortage (until recently, at least) of very early-stage startups, and for years I exclusively used startup-focused sites like AngelList (now Wellfound) when jobhunting. The largest startup had 12 people when I joined. I worked for a company of 40ish once, but they weren't primarily a tech company and engineering consisted of only 3 people.

I should perhaps disclaim that while this worked perfectly for me for close to a decade and I was never without work for more than a couple weeks at a time, I have currently been unemployed for a few months and have had a considerably more difficult time than at any point in the past.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by TylerE on Friday July 14, 2023 @10:14AM (#36724313)
Going with, in general, a company with less than 50 employees doesn't have to meet many of the requirements larger ones do when it comes to things like the FMLA.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:51PM (#36731563)
Yeah but the demand for talent was such that, for at least a long time, the benefits and perks at startups usually exceeded those of the bigger companies. This may not be the case now, but I still think what you describe is not true often enough to be considered a general truism
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by TylerE on Saturday July 15, 2023 @01:05AM (#36733761)
Not true enough? It’s literally how the laws are written. They exempt companies with fewer than X employees, where X is almost always 50
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by carlmr on Friday July 14, 2023 @07:11AM (#36722243)
>it is easy for me to flounder when debugging if I feel unable to visually see or mentally hold the entire problem in my head at once.

So much this. Fuck OOP-inheritance-thinking for spreading implementations to so many files.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by pxc on Friday July 14, 2023 @11:52AM (#36725736)
I also find this splitting-out that happens with OOP extremely unhelpful. I'd never considered that problem being exacerbated by ADHD, but it makes perfect sense.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by carlmr on Saturday July 15, 2023 @03:58AM (#36734599)
The opposite to this: sum types (enums with values).

You have all the logic in one place, and if you forget to handle a case in most languages you're forced by the compiler to be explicit.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by pxc on Saturday July 15, 2023 @12:36PM (#36738517)
* * *
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by vanderZwan on Friday July 14, 2023 @07:11AM (#36722245)
> unmedicated, I cannot usually even read more than a few pages of a book before either losing focus or feeling drained

Tangent: ADHD is strange. I have it too, and yet when it comes to reading my symptoms appear to be the exact opposite (when I was younger I could not stop reading books until I finished them, even if I ended up skipping an entire night of sleep for it). I wouldn't be surprised if in the next decades, as we learn more about it, this diagnosis will split into multiple different comorbid disorders with overlapping symptoms.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by flir on Friday July 14, 2023 @07:22AM (#36722317)
Already has to a degree - hyperactive type and inattentive type.

But you've also got to consider personal taste - hyperfixation happens when it's something you're interested in. Someone else might hyperfocus on video games, or trawling ebay, or researching a topic.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:36AM (#36722415)
I am famous for "ratholing" for hours on some specific thing that caught my interest, usually with little sense of the time that has passed, and almost exclusively on problems that aren't at all what I'm supposed to be focused on at the time
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by flir on Friday July 14, 2023 @07:52AM (#36722520)
Yeah. For myself, Amelia Earhart and TIGHAR is one I particulary remember. I lost days to those jokers.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by eyelidlessness on Friday July 14, 2023 @11:45AM (#36725647)
Not a disagreement, more of a yes, and: “interested” may not necessarily be personal interest, and the subject of hyperfocus might not be a personal interest. It can also happen manifest, for example, as obsession with solving some work problem or chore which isn’t appealing at all until begun. Or even some unrelated yak shaving tangent that fits none of these categories.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by flir on Friday July 14, 2023 @02:46PM (#36728214)
Yeah, from personal experience I'll happily sit there and hand-lint a file. It's... calming? So I wonder what the right word to use in place of "interest" is. Attention?
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ck425 on Friday July 14, 2023 @12:24PM (#36726173)
I read recently that they're starting to view hyperactive and inattentive as different presentations of the same symptoms/root causes rather than different types ie the same things that make hyperactive ADHD not sit still make inattentive constantly go off on mental tangents.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:50AM (#36722509)
What you describe is how I was when I was younger, too. I read everything, I read pretty fast, and I could read for hours on end. That is no longer the case at all, and I'm uncertain when or why it changed so drastically. (The "when" is tough to pinpoint because for much of my early 20s I wasn't doing much reading, and it's possible that the "why" is related to some change my brain underwent during/because of that.)
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by flir on Friday July 14, 2023 @09:08AM (#36723430)
When did you start using the internet regularly? (It's possible that you didn't change, it's just that your brain found an easier dopamine delivery system).
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:12PM (#36731197)
Way, way earlier. I definitely had different dopamine delivery systems during those years when I wasn't reading a lot. I was doing a lot of things differently n general during that time. But it was surprising and disappointing that I never seemed to regain quite the same reading "abilities" (for lack of a better word) even after years of regular reading again.

Don't get me wrong, I read all the time now, but I can't burn through books like I did back then, I don't read faster than I can subvocalize, and it can be challenging to stay focused or retain what I read.

A few years ago, I spent about nine months reading a single book about Napoleon. It was pretty long, detailed, and complex, so it wasn't intended to be an easy/quick read, but it still took me a pretty long time to get through it while giving it the proper focus. But the annoying part is that a couple years later, I struggle to remember details about Napoleon. I know, memory needs to be practiced and reinforced and such, but I had hoped the length of my immersion in the subject would've done a bit more in this area on its own.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by steve_adams_86 on Friday July 14, 2023 @10:15AM (#36724336)
I lost my reading tendency when life got harder. The urgency and anxiety around keeping up with everyday life made activities like reading almost unsettling slow and “unproductive”.

I realized that and did something about it, but I didn’t allow myself to enjoy a book for around 10 years. Not sure if that resonates with you (I hope not!) but I figured I’d mention it just in case. I was totally unaware of what I was doing at the time.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by bredren on Friday July 14, 2023 @10:51AM (#36724816)
I was similar. Went through countless sci fi novels, Crichton’s complete works to the Admiral Thrawn series.

I found a hack into keeping up with my reading, which is to use a kindle with wireless page turner attached to a mechanical arm.

I’m able to fall asleep reading like I used to and slowly make my way through extended science fiction. The effort to read is very low, the last page always set.

I don’t often stay up way past bedtime from reading anymore, but it did happen this year for me reading Symphony of Secrets by Brendan Slocumb.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by gtirloni on Friday July 14, 2023 @10:56AM (#36724895)
What did you do about it? If you don't mind expanding on that.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by steve_adams_86 on Friday July 14, 2023 @04:37PM (#36729572)
Not at all, I responded to someone else about that here:

https://news.ycombinator.com/item?id=36729512

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by asyx on Friday July 14, 2023 @11:58AM (#36725829)
What did you do about it? I'm exclusively a vacation reader. When I have limited free time, reading competes with other hobbies or media and almost never wins just because a book is such a huge time investment compared to a movie or a video game and I'd really like to change that.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by tpmoney on Friday July 14, 2023 @02:24PM (#36727937)
Can’t speak for the OP but in my case, reading is what I do to unwind before sleep. If I let myself work on hobbies or projects until I want to sleep I’ll either be up until 5am doing “one more thing” or won’t be able to sleep because my brain is still working. I need to stop all “thinking” activities at least an hour before I want to sleep. So I read in that space. The caveat to this (because I can also read until 5am if I’m engrossed) is the moment I notice I’m feeling sleepy or I’ve had to go back and re-read a page because I drifted mentally, then it’s time to shut the reader and go to sleep. If I try to power through to finish the chapter, I’m too likely to have caught a second wind and be up all night.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by julianeon on Friday July 14, 2023 @03:27PM (#36728772)
I keep a book near me while working.

I can't really 'break' on the computer because that's where the work is happening. But I can push down the laptop screen for a little while and read for 10 minutes, no problem. A physical book is a different modality, different everything, and sticky enough to keep my interest but not so sticky I'll lose an hour without noticing.

Do that 2 or 3 times during your workday and you'll be finishing books in no time.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by s_trumpet on Sunday July 16, 2023 @06:20AM (#36745332)
I use a similar technique with ebooks on my phone.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by steve_adams_86 on Friday July 14, 2023 @04:32PM (#36729512)
I use a kindle set to the lowest brightness setting and really make a point of reading before I sleep most nights.

I’ve drilled it into my head that if I’m not reading or focused on quality sleep, everything else will suffer. It’s been true for decades and I’ve been disappointed by finding it out again enough times that I generally believe it now.

No phone, no late night computer/work, just reading if I’m not asleep and otherwise sleep. It’s so important.

I don’t claim to be a particularly intelligent person by any means. This change has done wonders for being less stupid, however. Reading really does stimulate your brain in such positive ways. You probably won’t notice when you’ve stopped for a while and that’s a serious shame; we’d probably all read more if it was more obvious how much better we are when we do it. And of course the sleep hygiene plays a huge role too.

Occasionally I fall off the wagon for a week or two due to family stuff. To be honest, my wife hates that I read at night, and that’s friction as well. When your brain has a tendency to work against you though, you really do need to take action to build routines that keep you sane and on a good trajectory. My wife would hate it more if I allowed myself to sleep less and indulge in other things in the evening, so this is a lesser evil that keeps my cup full so to speak and helps me stay on track.

ADHD is all about the pit of success and elimination of problematic systems or temptations, in my experience. Make it hard to fail.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by bluesquared on Friday July 14, 2023 @10:48AM (#36724783)
I am exactly the same way. Was a voracious & fast reader throughout schooling up until college age. Officially diagnosed ADHD in college when the material became hard enough for me to not "brute force through with my raw intelligence anymore" (psychiatrist words, not mine) so I was likely masking all the way up through high school. Younger brother was diagnosed at a more typical age which made my late diagnosis easier.

I wonder if it has to do with the mental burden we start to accumulate in transitioning to adulthood. Much easier to hyperfocus on books when we don't have the weight of finances, careers, complex relationships, etc.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by s_trumpet on Sunday July 16, 2023 @06:14AM (#36745292)
I managed to slowly claw it back by completely changing my reading method. I download ebooks on my phone and read in 5-10 min chunks throughout the day (where I’d normally be using social media or checking the news) followed by 1 hour at the end.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ddorian43 on Friday July 14, 2023 @11:56AM (#36725799)
You get hyper-focus when you're interested in something. So both can't read a paragraph and can read non-stop happen in ADHD depending on your interest in reading.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ck425 on Friday July 14, 2023 @12:21PM (#36726116)
Could that be a learned adaption to ADHD rather than a directly caused trait? Or just hyper focus?

I do have a pet theory that many of us ADHDers develop habits to overcompensate but do so early enough that we don't realise they're learned. For example my room growing up was always super tidy, I literally never had to be asked to clean it and I'd know straight away if someone had been in while I was out. That really confused me when I got diagnosed but in hindsight it's because without everything having a consistent place I'd constantly lose things and never find anything.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by vanderZwan on Tuesday July 18, 2023 @05:20AM (#36769803)
It was definitely not an adaption - I was intrinsically motivated to keep going and read where the story was going, or what exciting new thing I could learn (my parents gave me a children's encyclopedia for my tenth birthday that I would carry around and read everywhere). So hyper focus on the dopamine hit of learning something new, I guess.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by smolder on Friday July 14, 2023 @01:05PM (#36726714)
I have both things going on, you might say. When I first settle down with a book or long form reading after not having done it a while, it's a considerable effort to focus. Typically at some point after forcing myself back to the text and rereading paragraphs many times I will get immersed in the text. Focus improves and reading speeds up, and for a book I might binge-read it in a couple days, with it occupying my thoughts even when I put it down.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by kendalf89 on Friday July 14, 2023 @08:49PM (#36731985)
I have the same experience with books. For me I believe it's due to a complicated synergy between my autism and my ADHD.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by patmorgan23 on Saturday July 15, 2023 @01:15PM (#36738961)
Recently I've heard ADHD described as "the inability (or weak ability) to direct attention" rather than a lack of it. So hyper fixation could be a symptom.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by branko_d on Friday July 14, 2023 @10:19AM (#36724390)
> I half-jokingly tend to describe it to people as having a "small brain buffer"

The good news is that "smallness of bran buffer" doesn't matter very much if you are trying to implement anything non-trivial. Most useful software is so complex that it's impossible to keep all of it in your head in any case. But we can divide and conquer complexity without holding too much in our limited human heads at any single moment in time.

The real art is how you divide and conquer. Having a bigger "buffer" merely delays (slightly) the point at which you have no other choice but to start doing just that.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @10:41AM (#36724665)
I disagree. It really does matter if you have any afflictions that exacerbate it.

It maybe doesn’t matter for relative performance versus other developers but it does matter for the individual.

Having frequent context switches just to keep on top of your work can be really draining.

How much it matters also really depends on the languages you’re working in. Taking a couple languages I use regularly for example:

Python (or any dynamic language ), as much as I enjoy it, can be a nightmare because of how dynamic it is. You have to keep way more of any given app in your head at a time.

Rust by comparison (or any similarly static language) is much easier for me to just focus on the very local code without caring about the rest.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @11:22AM (#36725288)
Modern python is no longer dynamic. Type checking is a big part of python now. Python also has ADTs which match it in power to rust.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @11:36AM (#36725514)
Type hinting , not assertion, is a part of Python.

Type checking is analysis post facto and doesn’t account for dynamicism of classes.

The very ability to self modify an instance at any time or use __getattr__ makes it incredibly dynamic.

It also doesn’t account for every dependency having accurate type hints or any at all.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @11:50AM (#36725719)
modern python development is used in conjunction with an external type checker. That's what I meant.

My mistake for not being clear. Obviously the python interpreter itself does not do any type checks.

It's sort if like how modern development with javascript is used with an external compiler of another language (typescript) that compiles a typed language into one without types.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @11:57AM (#36725811)
Yeah but my rebuttal is that even with type hints and adequate type checking, that Python is too dynamic to trust consistent behaviour.

An object can conform to a type in name only, but that’s not enough to tell you what methods or attributes exist on it at any given time.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @01:08PM (#36726763)
monkey patching is rarely done.

In practice, your rebuttal almost never occurs. I believe these type checkers can detect monkey patching and trigger a type error or warning.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @01:28PM (#36727107)
In practice it does occur very often. I’d suggest not ascribing your own experience to my own. I’ve been professionally coding in Python for over a decade in very varied codebases.

There are tons of libraries in many companies that use dynamic attribute lookups for efficiency reasons, when adapting to different data sources and the like. Or pass through lookups on child classes. Or they’re dynamically looked up on bound libraries from other languages and frameworks.

And these type checkers cannot detect it. Python’s dictionary access is not guarded by the type checkers and neither is __getattr__.

If you’re making such wide sweeping statements you need to be more familiar with the subject matter.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @02:45PM (#36728193)
>In practice it does occur very often. I’d suggest not ascribing your own experience to my own. I’ve been professionally coding in Python for over a decade in very varied codebases.

My experience is different from yours. I'm ascribing my experience to reality not to your experience. I think my experience is more inline with reality then yours is given the metrics.

>And these type checkers cannot detect it. Python’s dictionary access is not guarded by the type checkers and neither is __getattr__.

For this code:

   from typing import Dict
   x: Dict[str, int] = {2: "hello"}
   print(x[3])
   class Hello:
      def __init__(self) -> None:
          self.x = 1
   b = Hello()
   b.y = 2
   c: str = b.x
   print(b.y)
generates this:

   main.py:2: error: Dict entry 0 has incompatible type "int": "str"; expected "str": "int"  [dict-item]
   main.py:3: error: Invalid index type "int" for "dict[str, int]"; expected type "str"  [index]
   main.py:8: error: "Hello" has no attribute "y"  [attr-defined]
   main.py:9: error: Incompatible types in assignment (expression has type "int", variable has type "str")  [assignment]
   main.py:10: error: "Hello" has no attribute "y"  [attr-defined]
   Found 5 errors in 1 file (checked 1 source file)
Monkey patching is checked. Dictionary access is checked. You are completely Wrong on these statements.

__getattr__ is type checked too as long as you type the method signature, I have seen some wierdness around this area for type checkers but that's not the main problem. I understand where you are getting at with __getattr__. When you use this you're essentially creating something akin to a function with a string as a parameter. The contents of a string can't be type checked and if all methods are defined this way on a class none of it can be checked.

>If you’re making such wide sweeping statements you need to be more familiar with the subject matter.

Same for you. You made factually wrong statements. Perhaps you need to be more realistic about people and yourself in general. In life you will encounter people that disagree. It's not wise to rudely call them not "familiar" with the subject matter. All humans make mistakes and you are setting yourself up for failure when you make rude statements like that and then make a factually incorrect mistake right after.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @04:11PM (#36729290)
Your code is not what I’m describing at all. You’re just talking past me without actually trying to understand what I’m saying or reading the specifics.

A Python instance is effectively a dictionary. The contents of that dictionary can be mutated at runtime to disagree with the type that is specified. This is perhaps an antipattern but it’s not uncommon.

Attribute lookups can be dynamic as well without any typing. The typing can be lofted out and specified at the lookup site but that is also no guarantee of what you’ll get at runtime.

You cannot type check this dunder method access.

class A(dict):

    def __getattr__(self, name):

       return self[name]
You may say “oh but that’s uncommon or bad practice” but it’s unfortunately quite common in many production systems because Python has encouraged embracing its dynamicism for decades. That’s not a flaw, that’s a power. But it definitely has its pros and cons.

One may also say that “well that’s just void pointer casting in C or other languages”, which is also true and equally problematic. That’s why newer compiled languages like Rust and Swift have options for sum types / enums that carry a value to design around it in a type safe manner.

———

To your other point on courtesy…

If I say you’re unfamiliar with the details, it’s because you yourself said you aren’t sure YET you claim your world view of type checking is correct and dynamicism is rare. You don’t read my comments and substitute your own.

If I am being rude it is only because your default world view appears to be “the ideal in my head is the way it is”.

Take for example when you say “your rebuttal almost never occurs” or when you say pretty much every tech company uses type checking. You ascribe your own world view with no room for greys or real world variance.

If I say: “but this is my experience” your response is “well that’s not the reality for most cases”. So if I am rude it is because you talk in absolutes and only correct yourself when pushed back upon.

Perhaps do not talk so assuredly in general. Your experiences are not that of others yet you talk as if they’re the norm.

So if I am rude, it is because you are being rude in your responses and perhaps don’t realize it. You’ve basically told everyone who’s responded to you that their experiences aren’t correct.

Anyway I shall not respond further to you because this discussion is hyper fixating on something that was only intended to be an example. It serves no purpose to continue arguing

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @04:56PM (#36729828)
>A Python instance is effectively a dictionary. The contents of that dictionary can be mutated at runtime to disagree with the type that is specified. This is perhaps an antipattern but it’s not uncommon.

Yes I know. but the you will see the code addresses this. Mypy caught the monkey patching. Look at it. I added a property to an instance dynamically and mypy caught it.

>You may say “oh but that’s uncommon or bad practice” but it’s unfortunately quite common in many production systems because Python has encouraged embracing its dynamicism for decades. That’s not a flaw, that’s a power. But it definitely has its pros and cons.

I addressed this in the post you replied to. I specifically stated it. Let me quote it:

"__getattr__ is type checked too as long as you type the method signature, I have seen some weirdness around this area for type checkers but that's not the main problem. I understand where you are getting at with __getattr__. When you use this you're essentially creating something akin to a function with a string as a parameter. The contents of a string can't be type checked and if all methods are defined this way on a class none of it can be checked."

You addressed a point I already addressed, and didn't address the points you were factually wrong about: Dictionary access is type checked. Monkey patching is also type checked.

>Anyway I shall not respond further to you because this discussion is hyper fixating on something that was only intended to be an example. It serves no purpose to continue arguing

Completely agreed let's move on from all the BS. But you said some things that were factually wrong about python Dicts not being type checked. You said dictionary access is not type checked. Please address those things. I am interested in your viewpoint on this matter because I can learn something if my statement is wrong.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @09:13PM (#36732117)
>> A Python instance is effectively a dictionary. The contents of that dictionary can be mutated at runtime to disagree with the type that is specified. This is perhaps an antipattern but it’s not uncommon.

> Yes I know.

I'm not sure…

> but the you will see the code addresses this. Mypy caught the monkey patching.

LOL. Here, what "static type checking" is worth in Python in reality:

  me@box:~$ cat test.py 
  class A(dict[int, float]):
      def __init__(self) -> None:
          self.__dict__["you_are_clueless"] = "Oh boy, so clueless…"
      
      def __getattr__(self, name: str) -> int:
          result: int = self.__dict__[name+"_clueless"]
          return result
  
  some_a = A()
  print(some_a.you_are_)


  me@box:~$ mypy --strict test.py 
  Success: no issues found in 1 source file


  me@box:~$ python test.py 
  Oh boy, so clueless…
  Traceback (most recent call last):
    File "/home/me/test.py", line 12, in <module>
      print(some_a.you_are_)
            ^^^^^^^^^^^^^^^
    File "/home/me/test.py", line 6, in __getattr__
      result: int = self.__dict__[name+"_clueless"]
                    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  KeyError: 'you_are__clueless'

Class `A` claims to be a Dict from `int` to `float`. But I can freely assign a string to a string key…

The signature of `__getattr__` makes no sense in this context, but is happily accepted…

In the body of said function I'm obviously assigning a string to an `int` "typed" variable. But no issue here…

I'm returning this string in contrast to what the signature claims. But also no issue here…

I'm calling an non-existent method on the `A` instance. But that's not an issues for "type checking"…

In comparison, a language with real static type checking:

  class Record(fields: (String, String)*) extends Selectable:
    private val fieldMap = fields.toMap
    def selectDynamic(key: String): String = fieldMap(key)
    //def selectDynamic(key: String): Int = fieldMap(key)
    // >> Compile error:
    //   Found:    String
    //   Required: Int
  
  
  type A = Record { val youAreClueless: String }
  val someA = Record("youAreClueless" -> "Oh boy, so clueless…").asInstanceOf[A]
  
  println(someA.youAreClueless)
  
  //println(someA.youAre_Clueless)
  // >> Compile error:
  //   value youAre_Clueless is not a member of Playground.A
  
  //val someB = Record(123 -> 0.987).asInstanceOf[A]
  // >> Compile error:
  //   Found:    (Int, Double)
  //   Required: (String, String)
It's not even possible to replicate here the rest of the nonsense Mypy is doing above.

[ Live Scala code at: https://scastie.scala-lang.org/eGVUZbVARMuZa36ZyLQqxQ ]

Note, this Scala demo is purely static. The field access is checked at compile time.

Caveat: The code isn't completely safe, as this construct could possibly explode at runtime when doing something like:

  val someB = Record("foo" -> "0.987").asInstanceOf[A]
  println(someB.youAreClueless)
This compiles but ends up in a runtime exception `NoSuchElementException: key not found: youAreClueless`.

But if I wouldn't be lazy I could even get rid of the cast to A (`asInstanceOf[A]`) which is what makes the code unsafe. This would require meta-programming, though, and would be more involved (and therefore likely quite hard to follow if you don't know the language). The point is: It could be made 100% compile time safe! One "just" needs a powerful language with a proper type system.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @07:04PM (#36731132)
> For this code: > > from typing import Dict > x: Dict[str, int] = {2: "hello"} > print(x[3]) > class Hello: > def __init__(self) -> None: > self.x = 1 > b = Hello() > b.y = 2 > c: str = b.x > print(b.y) > > generates this: > > main.py:2: error: Dict entry 0 has incompatible type "int": "str"; expected "str": "int" [dict-item] > main.py:3: error: Invalid index type "int" for "dict[str, int]"; expected type "str" [index] > main.py:8: error: "Hello" has no attribute "y" [attr-defined] > main.py:9: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment] > main.py:10: error: "Hello" has no attribute "y" [attr-defined] > Found 5 errors in 1 file (checked 1 source file)

Nonsense.

Python "generates" this:

  Traceback (most recent call last):
    File "/home/me/test.py", line 3, in <module>
      print(x[3])
            ~^^^
  KeyError: 3
> You are completely Wrong on these statements.

You're completely wrong about almost everything you've claimed so far…

> The contents of a string can't be type checked […]

Nonsense.

This may be true for Python's type checking tools, but that's not a general limitation of type checking.

  class Test:
    // The annotation is unrelated to the demonstration of singleton types.
    @annotation.targetName("m_foo") // This avoids double definitions at the byte-code level.
    def m(p: "foo") = "I only work with 'foo'!"
    def m(p: "bar") = "I only work with 'bar'!"
  
  Test().m("foo")
  Test().m("bar")
  
  // Test().m("baz")
  // >> Compile time error:
  // None of the overloaded alternatives of method m in class Test with types
  //  (p: ("bar" : String)): String
  //  (p: ("foo" : String)): String
  // match arguments (("baz" : String))
Static dispatch, even with overloads, works just fine for (in this case string) singleton types.

[ Live Scala code at: https://scastie.scala-lang.org/5FW6EaAeQa2ybhM3XYhuyQ ]

> You made factually wrong statements. Perhaps you need to be more realistic about people and yourself in general. In life you will encounter people that disagree. It's not wise to rudely call them not "familiar" with the subject matter. All humans make mistakes and you are setting yourself up for failure when you make rude statements like that and then make a factually incorrect mistake right after.

Some people have indeed infinite egos. If there would be just anything else besides that…

I wonder every time why the most clueless are the loudest. That's so embarrassing.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @07:23PM (#36731304)
>Nonsense.>Python "generates" this: Traceback (most recent call last): File "/home/me/test.py", line 3, in <module> print(x[3]) ~^^^KeyError: 3

So? python generates that but the point was demonstrating type checking. The output you see is not generated by python. It's generated by an external type checker. The type checker caught the python exception without running any code.

>> The contents of a string can't be type checked […] Nonsense. This may be true for Python's type checking tools, but that's not a general limitation of type checking.

The context is python. We're talking about python. I'm making a statement about python. Nobody is talking about scala. I don't know why you're getting into scala stuff.

There is literally nothing in my statement to indicate I'm making a general statement about type checking. But I will say checking for the contents of a string is rare for a type checker to do. That is a general statement that is generally true.

>Some people have indeed infinite egos. If there would be just anything else besides that… >I wonder every time why the most clueless are the loudest. That's so embarrassing.

Hey can you please stop being rude? The guy made factually incorrect statements and so did you. That's not an ego thing. It's just true that he's wrong. Everybody makes mistakes... people shouldn't get worked up about someone else identifying a mistake.

I too made a mistake. And I admitted my mistake. See my first couple of posts. I admitted I was wrong: the python interpreter doesn't do type checks. It was an error on my part for not clarifying I meant python development in general with external tools.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @10:26PM (#36732566)
> The output you see is not generated by python.

Obviously, as running the code generates a very different output…

> It's generated by an external type checker.

I know.

But again, you didn't say that.

You said the above code "generates" this…

Maybe you've heard that by now somewhere: Words matter… ;-)

> The context is python. We're talking about python. I'm making a statement about python.

No, you made a statement about type checking. Here the full quote once again:

> The contents of a string can't be type checked and if all methods are defined this way on a class none of it can be checked.

Nothing in this statement is about Python.

All I did was just proving your words once again to be nonsense: You can statically dispatch (which involves static type checking!) just fine on strings. My (Scala) code is prove of this fact.

> There is literally nothing in my statement to indicate I'm making a general statement about type checking.

LOL. Do you actually know what you're writing? Once more:

> The contents of a string can't be type checked and if all methods are defined this way on a class none of it can be checked.

That's a general statement… It couldn't be even more general, actually.

> But I will say checking for the contents of a string is rare for a type checker to do. That is a general statement that is generally true.

Once again complete nonsense.

There are whole libraries doing more or less nothing else than handling singleton types.

Whole software layers utilize that! But I guess you never heard of static data validation…

https://github.com/Iltotore/iron

You have so little clue, but such a big mouth… That's so embarrassing.

A helpful tip: Stop spiting out maximally general claims (because these are almost always wrong!), and think about what you're actually writing.

What's in your fantasy, or what you "may have meant" is irrelevant!

> The guy made factually incorrect statements and so did you.

That's exactly what I'm talking about: You're a severe DK victim as it seems…

> It's just true that he's wrong.

No, actually you are wrong with almost every claim, like I've proven now several times. And this nonsense still didn't stop… Oh, boy!

> people shouldn't get worked up about someone else identifying a mistake.

Think about that once again. Especially in the context that it's you who is wrong here with almost everything you say.

And no, nobody is "pedantic". It only gets quite unrealistic that someone who doesn't even get banal prose straight would be able to write any code. Because the computer is actually very pedantic. And after production is on fire you can't just come to your boss and excuse yourself with "but I've meant this differently, just the stupid computer did again not understand what I've meant".

But to be honest this would actually explain:

> I've likely worked for more companies then you in the last 5 years or so due to my personality. I don't stay at one place for long.

I have some suspicions to why you don't stay anywhere for long… And yes, that would be indeed related to personality…

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @06:12PM (#36730655)
> Obviously the python interpreter itself does not do any type checks.

OMG. Something like that form someone who claims to have worked at significant amounts of Python shops…

https://docs.python.org/3/library/exceptions.html#TypeError

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @07:15PM (#36731223)
You're just being rude, please stop.

I obviously mean static type checks. Not runtime type checks. Please stop being pedantic.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @09:40PM (#36732309)
> I obviously mean static type checks.

No you didn't, as that's not what you've written.

You've written: "Obviously the python interpreter itself does not do any type checks", which is of course complete nonsense.

> Please stop being pedantic.

I'm not pedantic. I just correct all the nonsense you emit.

This wouldn't be needed if you wouldn't also spit out stuff like "I've never said something wrong! I'm always right!" and the like.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sneed_chucker on Friday July 14, 2023 @11:31AM (#36725450)
That's great if you're in a codebase at a workplace which enforces python type annotation checking.

Unfortunately, I can tell you from experience that out in the real world, at fortune 500 companies, there are millions of lines of untyped Python doing critical work while being full of subtle type errors which should be compile time errors but will rear their heads as runtime errors when it's least expected.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @01:13PM (#36726844)
It's changed a lot recently. I would say the majority of companies now use type checking.

It's def not as pervasive yet as Typescript.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @01:29PM (#36727119)
Do you work at the majority of companies? I can tell you that I’ve worked with code bases from each of the FAANG companies that don’t use type checking, because it’s optional. Anything that’s optional in a language will not be ubiquitous

Your statements are incongruent with the reality of production.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @01:53PM (#36727506)
I've likely worked for more companies then you in the last 5 years or so due to my personality. I don't stay at one place for long. Actually I've probably worked for more in my entire career, but only the last 5 years should be relevant.

Even so where I worked is only part of the equation. You can look up which companies use python types in a google search.

Let me add more nuance, companies that use python as glue code as in scripting languages don't use types. This makes sense as python is considered not as important as the main language.

For companies that are primarily based on python... the majority use types. The ones that don't are actively migrating. This includes faang and subsidiaries. In fact type checkers for python are likely to be built by faang or companies close to that tier.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dagmx on Friday July 14, 2023 @02:09PM (#36727748)
I’m unsure how you can so confidently make that assertion.

Even at companies that do use type hints, there’ll be tons of legacy code that won’t (and probably tons of new code as well if we’re being realistic).

It’s like saying every company uses bash scripts. It’s not really indicative of the prevalence in actual code bases in production use other than saying it may be used somewhere within the company.

Between this and your other comments, you’re making very widespread comments that can’t logically apply to everything and nor do they in my experience.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @02:54PM (#36728329)
>Even at companies that do use type hints, there’ll be tons of legacy code that won’t (and probably tons of new code as well if we’re being realistic).

The first part is true, I agree with that assessment and I never made a contrary claim. Companies are migrating.

The second part in parenthesis, is less common, I don't agree that it's a generality among companies that have python as a primary language.

>It’s like saying every company uses bash scripts. It’s not really indicative of the prevalence in actual code bases in production use other than saying it may be used somewhere within the company.

I don't even know what you're getting at with this example. Tons of companies use python "somehwhere" within the company. I'm sure in those cases it's often not typed.

But for companies or teams that use python as a primary it's typically typed or in the process of getting migrated to be typed. That is the nuance I added to my claim.

>Between this and your other comments, you’re making very widespread comments that can’t logically apply to everything and nor do they in my experience.

Except you made statements that are factually wrong. I literally ran mypy on some code and your statements were categorically incorrect from your other comment. Usually these debates are anecdotal so logic doesn't apply as it's just fuzzy opinions regarding social aspects of society. But that's not the case here. You made factually incorrect statements and that has bearing on the correctness of your anecdotal statements too.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by mattgreenrocks on Friday July 14, 2023 @12:23PM (#36726152)
The problem is less the language and more the culture around it. Typing will always be second-class, culturally. Additionally, mypy feels much slower to use versus something like Rust’s ‘cargo check’.

Regarding ADTs: do type checkers ensure totality (all cases covered) when pattern matching?

(I’m not casting aspersions here. It is what it is, you know?)

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @01:11PM (#36726815)
Yes. This was a huge surprise to me too. Everybody loves typescript but basic usage of types in typescript is actually less powerful because it doesn't support this.

You have to use it in a specific way though.

https://tech.preferred.jp/en/blog/python-exhaustive-union-ma...

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @05:58PM (#36730514)
> Modern python is no longer dynamic.

Of course it still is.

The type hints have no runtime semantics whatsoever.

The actual type-checking still happens at runtime in Python, and is not related to any static checks. Out of the perspective of Python's interpreter the type hints don't even exist. They're like comments…

Static type checking is not part of Python!

> Python also has ADTs which match it in power to rust.

All Turing-complete languages match each other in power…

Besides that:

Python doesn't have a static type system in the first place, so it can't compete with Rust in this regard. That's not even the same game.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by formulathree on Friday July 14, 2023 @07:09PM (#36731169)
>Of course it still is. >The type hints have no runtime semantics whatsoever.

I clarified my meaning in another comment. You're right, I meant to SAY modern development involves type checking with python. But not with the interpreter. My mistake for not being clear.

>All Turing-complete languages match each other in power…

I obviously mean type checking. Additionally what you're saying isn't even true. Not all turing complete languages match in power or capability.

>Python doesn't have a static type system in the first place, so it can't compete with Rust in this regard. That's not even the same game.

Modern python development is done in conjunction with a type checker. Sort of like how modern javascript development is done with typescript. That levels up the game to where python is roughly in the same class as rust when it comes to type correctness.

Depending on the type checker python matches the power of rust, roughly. There are differences, but for ADTs they are pretty similar in capability.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @09:32PM (#36732248)
> You're right, I meant to SAY modern development involves type checking with python.

It's completely irrelevant what you "meant" to say. What counts it what you've written!

And that amounts to just nonsense, over and over again…

> I obviously mean type checking.

Once more: It's completely irrelevant what you "meant" to say. What counts it what you've written.

> Additionally what you're saying isn't even true. Not all turing complete languages match in power or capability.

You clearly lag any education whatsoever on CS topics.

The above statement couldn't be more wrong…

> Sort of like how modern javascript development is done with typescript.

LOL. No, "modern JavaScript development" is done with JavaScript. TypeScript development is done with TypeScript…

In case you still don't get it (which I assume): Client side web-development != "JavaScript development".

Words matter.

> That levels up the game to where python is roughly in the same class as rust when it comes to type correctness.

ROFL! See my post below…

Python is not even close. It does not even play the same game…

> Depending on the type checker python matches the power of rust, roughly. There are differences, but for ADTs they are pretty similar in capability.

Oh boy, I start to understand that you have really not the slightest clue what you're talking about…

Looks like that's not even trolling.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by bippihippi1 on Friday July 14, 2023 @11:31AM (#36725445)
At least for me, naturally having experienced needing to context switch often (getting disctracted or multithreading or refreshing forgotten context), I have gotten good at it not by remebering more but by storing the context in an easily retrievable place. I keep tabs open, I print out stuff even when breakpoint debugging, and I reduce my cognitive load by default. I remember where to look to find the data, because I don't remeber the data. I keep the structure in my head and remember only where the details live. like abstracting
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ck425 on Friday July 14, 2023 @12:12PM (#36726000)
People are shocked when they see how many tabs I have open. I just checked and I've 21 windows each with atleast 10 tabs, but the more frequently used one are 30+. But it really does help. I also group them by topic and when I need to focus I start a new window with the tabs for that particular task.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by still_grokking on Friday July 14, 2023 @05:06PM (#36729938)
That's not much tabs…

I have alone in this window here 4682 tabs open.

How it comes? Well, I just don't close them until I have decided whether I want to bookmark them. After month with a browser sessions quite some tabs pile up. (When it gets out of hands I bookmark whole windows… So there remains at least the theoretical possibility that I sort this out later. Even that happens only rarely.)

Before someone asks: From the technical standpoint it's quite easy to have so many open tabs. All you need is Firefox, Tree-Style-Tabs, and tab auto discard ("sleep"). It fits than in under 2.5 GB RAM even (which is less than Chrome with even a few tabs).

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by wpietri on Friday July 14, 2023 @11:58AM (#36725823)
On the other hand, I'd encourage you to see this awareness of cognitive load as a strength. Good code is approachable, and some of the worst code I've written was when I felt the most brilliant. If I've used all my brainpower to write something, then what do I do later when I need to debug it or integrated it? So now I really try to write such that I lower the cognitive load for future me and other developers.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by npunt on Friday July 14, 2023 @11:07AM (#36725054)
This idea of a 'small brain buffer' is why I love writing small atomic notes in wikis [1]. It lets me break problems down into simple pieces that I can later assemble upward in abstraction, rather than try to hold complex ideas in my head and compile them together in one big document. The buffer waxes and wanes, and I need to be able to adapt my writing process so I'm productive no matter where it is at the moment.

[1] https://notes.andymatuschak.org/Evergreen_notes

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by tomjakubowski on Friday July 14, 2023 @11:59AM (#36725833)
I've been doing this too in Obsidian and really like it.

Notes can be as short or long as feels right. If they need to grow they can grow, sometimes they get split into sub notes.

I have notes with titles like "Cardboard furniture", "Staging patch changes in VSCode", and "Hilbert Transform".

Some are one or two sentences, some are more like essays with subheadings.

Small notes tend to have one or two links to other notes. Longer notes have more links and tend towards centralization (eg all booking info about an upcoming work trip).

Search makes it easy to find the notes that don't have links.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by vogon_laureate on Friday July 14, 2023 @12:16PM (#36726035)
It's been a game changer for me. I always did this anyway in other Notes apps, but Obsidian just does a great job of making it feel like it almost prefers you to write notes like that.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by npunt on Friday July 14, 2023 @01:03PM (#36726680)
Yep, Obsidian is the best! Two patterns I use a lot to help with this small brain buffer problem are collections & streams.

Collections (sometimes called 'Maps of Content') are sets of internal & external links or resources around a particular topic, e.g. 'Self Deception', 'Creativity', 'Air Quality', etc. The page names represent the topic so they're easy to name, and if I can't find a page I go to these first before search.

Streams are pages with date headers that contain small notes around a broad topic. For instance, 'Passing Thoughts' are random ideas, 'Story Prompts' are ideas for stories, and 'Inbox' are links to read and any notes I have on them. Streams do three things for me:

1. I don't know how big an idea is until I write it, and this stream pattern lets me optionally break ideas off into their own pages if they get to a certain level of size/complexity.

2. I can quickly capture without having to create a new page, since I'm at ~2000 now and each subsequent page makes search less effective.

3. I can avoid the challenge of naming pages, which is often harder than it seems. For instance, I've taken to naming certain pages like Andy M's evergreen notes style of declarative claims/statements, like 'Recognizing our influences empowers our creativity', 'The curiosity driving information addiction may be due to a sense of deprivation', and 'Good ideas deserve good stewards'. To do this clearly, concisely, and scoped correctly is its own challenge and worth the time investment because it really lets me build on strong foundations, and it prevents similar pages from proliferating in search by being easy to find.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by southwesterly on Friday July 14, 2023 @02:23PM (#36727926)
I like this technique. Thanks.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by jtr1 on Friday July 14, 2023 @01:09PM (#36726788)
How are you aggregating in Obsidian? I feel like I haven't cracked the code on this one
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by vogon_laureate on Saturday July 15, 2023 @03:48AM (#36734545)
Do you mean other than MoCs (Maps of Content)?

I use the Waypoint plugin with folders to create auto-generated maps of content within folder hierarchies. Works nicely to give me an index to use as a first port of call in a subject and works well with graph view.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by whartung on Friday July 14, 2023 @12:38PM (#36726371)
Do you have this issue of where you start in on something, you’re making progress, there’s velocity, the work seems cogent, and then...it’s gone.

Whatever point you had, whatever drive was there, is just gone. The wind has calmed and the sails just drop loose on the mast.

This happens to me, both in my own work, or writing something like this, and then I just dump it.

Kind of aggravating.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by npunt on Friday July 14, 2023 @01:20PM (#36726971)
Yeah definitely! I don't trust that my writing energy nor my memory will continue into the future, so I have a few tactics I use:

If an idea flashes into my head, I quickly write it shorthand anywhere. See my other comment (https://news.ycombinator.com/item?id=36726680) on having 'Streams' pages that offer an immediate working space to write. I let the idea expand with that progress & velocity, and once I've reached the end of my writing juices, if it's important enough I copy/paste it into a better place. Organizing is one task that can be done when the winds of flow state calm.

Similarly, breaking ideas into small bite-sized parts helps because those are easier to complete with less energy. Better to make incremental forward progress than keep trying to do the same big thing over and over.

Also, I try to start with a summarized version of what the thought is. Again, shorthanding the key points is helpful. It's easy to have a big thought that has several constituent parts and immediately dive into some details on one of those parts, only to find that the big picture sort of disappears. Better to capture the TLDR first.

Finally, I'm okay with abandoning ideas, I trust that the important ones will come back, and I make sure to leave affordances for myself so I can always return to what I was doing later. Some things I do to make revisiting ideas easier include:

1. I'll review my 'Passing Thoughts' stream at least once a week to see if my new context or a new perspective allows for the ideas to come back.

2. I keep track of work-in-progress work with a #WIP tag and new pages I've made in 'What's New' stream.

3. I keep track of my thought process with occasional self notes in 'Whats New', e.g. "I dove into X by expanding Y and Z but think I have to reorganize section A to fit it in"

4. In the organizing step I think carefully about how I name pages (including using aliases)

5. I densely link all related ideas so there's many ways to find them.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by olvy0 on Friday July 14, 2023 @03:20PM (#36728669)
That's similar to how I organize my ideas as well. I personally use google keep for this, or just plain text files. I don't try too hard to connect them, maybe I should though.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by TylerE on Friday July 14, 2023 @02:16PM (#36727836)
Yes, it's the not so nice flipside of hyperfocus.

What I do is: Not feel in the slightest guilty about it, because I just came off a stretch of real 10x productivity, and then go do something else for a half hour or so that exercises a different part of the brain - grab one of the many musical instruments around me, for instance.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by vogon_laureate on Saturday July 15, 2023 @03:50AM (#36734551)
All the damn time. ADHD is a curse.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by skinner927 on Friday July 14, 2023 @08:32PM (#36731862)
You should check out TiddlyWiki as it’s designed around the concept that small linkable notes are the best way to organize.

https://tiddlywiki.com/

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by devjab on Friday July 14, 2023 @11:59AM (#36725841)
Interestingly I do the same as you, partly because the single responsibility part of SOLID, but also because it just appeals to me to write clean easily understandable code. It’s for different reasons than you, however, my ADHD brain can “buffer” massive amounts of code… for a while. So I mainly write things simply because it’s much easier for me to “get back to” after 6 months, well, and because it’s clean code. I think it’s interesting that we end up with the same sort of code architecture though, despite not being affected by our ADHD the same.

For me the real struggle isn’t focus or “buffer”, it’s when things are boring. For almost all code work, even debugging, my hyperfocus grinds into gear, and if I’m left undisturbed I can quite literally work for 10 hours straight without eating. I don’t, because there is a bill to pay after doing so and I’ve worked on myself for decades to the point where I know to take breaks, eat and go home, but the hyperfocus is there.

Until things get boring. Luckily this is rare with code. Not so with everything related to the process of being allowed to write code. I try to work in places where the process people bother you as little as possible, and if I can avoid it, I’ll happily go through the rest of my career without ever pretending to listen in another standup meeting ever again.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by rpastuszak on Friday July 14, 2023 @12:16PM (#36726039)
> It is for this reason that I try to write what I feel is very obvious or self-explanatory code [...]

I don't have ADHD, but, for different reasons, my brain seems to work in a similar manner. And, I have developed coping strategies similar to those applied with people on the ADHD spectrum [1][2].

My anxiety around coding has reduced a significantly when I learned about TDD and started writing code made of very small, composable chunks. I even use the same "small buffer" metaphor when talking about this!

I know that some people with ADHD use the writing tool I built for myself. If you have a moment, feel free to give it a shot and let me know what you think: https://enso.sonnet.io

(the web version is free, and has complete feature parity, no need to pay me)

- [1] https://sonnet.io/posts/hummingbirds/

- [2] https://sonnet.io/posts/sit/

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by naikrovek on Friday July 14, 2023 @03:17PM (#36728642)
> My anxiety around coding has reduced a significantly when I learned about TDD and started writing code made of very small, composable chunks.

you definitely do not have ADHD, then. I find these absolutely impossible to trace through when I want to find out what a program is actually doing, in reality.

if I have to find the actual logic used in main or whatever event handler, and it's in a function called by a function called by a function etc., then I will forever despise the developer who felt that this was anything approaching an acceptable design, or even an acceptable idea.

codebases like that are impossible for me to absorb.

put the logic where it fucking goes, inline with its use! right there! nowhere else! don't nest it behind abstractions you don't NEED.

functions that are very small and used in 100 places in the codebase should be inlined in the source code so I can read it. there is no function used this much in an application I've ever even considered working on, anyway.

I always prefer to copy and paste a little bit of logic around than to wrap 5 lines in a function and call it from everywhere.

if the function is 100 lines of complex code, put it in a function and call it ONLY if it is used in more than 2-3 places, and NEVER if it is only used once.

today's "best" practices serve only to shut me and others like me out of participation and are exclusionary.

this does mean that I have to take the time to find very good names for everything, which takes time, but always pays off in readability, for everyone, not just me.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by rpastuszak on Friday July 14, 2023 @03:47PM (#36728991)
Hehe, I agree with what you're saying here, but I think you might've misunderstood me.

> put the logic where it fucking goes, inline with its use! right there! nowhere else! don't nest it behind abstractions you don't NEED.

What you're talking about here looks more like over-abstracting. What I'm talking about is having understandable components with simple, easy to understand behaviour. I think we're on the same page.

I want to be able to understand what the component does at the first glance. I also want to be able to understand what a larger part of the system does at the first glance. But, overall, I'll always err on the side of _under-abstracting_ and duplication, like you.

One might argue that software development is about 1) defining a business problem, _then_ 2) communication (usually with "ghosts" i.e. another developer who is not in the room with you[1]), then writing the implementation. My philosophy on the subject is like this: https://sonnet.io/posts/code-sober-debug-drunk/

TL;DR it's always easier to write code than to read it, be kind to the next person reading it (it might be you)

[1] https://sonnet.io/posts/emotive-conjugation/#:~:text=Ghost%2...

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by somekyle on Friday July 14, 2023 @03:53PM (#36729068)
This is why I like more bottom-up approaches to coding. Code broken up sorta arbitrarily, that's compressed moreso than abstracted, is hard to follow. But, when there's a reasonably small set of solid domain abstractions (even extremely complex ones in implementation), that's totally fine. This is where preferences vary; some folks have committed nuances of various helper libraries to memory, and find it easier to process a `fuse_zip` combinator or whatever than a loop, but for the readers who'd need to look that up, it's an attention land-mine.

API design, abstraction design, is a type of UX design, and like other forms of design, accessibility is a concern. Keeping the vocabulary fairly small and the abstractions well-behaved and consistent help nearly everyone, but particular ADHD folk.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by organsnyder on Friday July 14, 2023 @04:30PM (#36729491)
> you definitely do not have ADHD, then

I do have ADHD (clinically diagnosed), and I disagree 100% with this statement (at least the certainty of it). In my experience, TDD and writing small chunks greatly reduces my anxiety and increases my productivity by helping me to narrow the scope of the task I'm working on.

Different people have very different experiences despite having the same diagnosis. What is exclusionary for one person may be the exact opposite for someone else.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by abletonlive on Friday July 14, 2023 @07:46PM (#36731504)
The thing is that you shouldn't really care about the details of these small functions until you for some reason, need to. At a high level it's easier to understand stringing together a bunch of small functions and assume how they work. If you have ADHD it seems like abstracting away the details in the small functions should help you, but it seems like you aren't able to ignore the details of how each small function works even when in context it doesn't matter, which is where it hurts you.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by bjornasm on Sunday July 16, 2023 @05:23AM (#36745062)
>you definitely do not have ADHD, then. I find these absolutely impossible to trace through when I want to find out what a program is actually doing, in reality.

You cannot determine if people have adhd on whether they agree with you on big vs small functions. Its not how it works and all, and your preference is just a preference and not an universal truth for everyone with adhd.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by MSFT_Edging on Friday July 14, 2023 @01:04PM (#36726701)
I relate to this, one reason I avoid IDEs is the "window" where you can actually see code is so limited. It feels like coding through a paper towel tube.

I'll make my life way harder in order to optimize the view of the code.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Friday July 14, 2023 @01:05PM (#36726717)
> why I try to keep functions/modules as simple as possible and ideally not longer in length than I can see on my screen at once (when possible)

This is the paradox of "readable" code. Each person has a different definition of it. I also prefer to write as dumb code as possible (well, these days I do, I of course tried to be extra clever in my earlier days). But for me it's the jumping around that makes me lose focus. My limit is about 3-4 jumps. This is not to say I write long meandering functions, but I personally couldn't imagine a codebase I'd be happy working in that is made up of modules that fit on a screen. Maybe it's possible! But the projects I've worked on that have a linter rule of "100 lines per file" or whatever end up being these rabbit holes. It's so hard to come up with code design guidelines everyone can agree on.

As a side note, I despise things like imports and aliases. I'd prefer that when I do jump to a function, I can read it without having to check if anything is imported or not. I always opt for fully qualified function calls, regardless of how many characters it is.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by seabass-labrax on Friday July 14, 2023 @01:39PM (#36727298)
> As a side note, I despise things like imports and aliases. I'd prefer that when I do jump to a function, I can read it without having to check if anything is imported or not.

One idea might be to use an LSP (Language Server Protocol) interface. It could describe the fully qualified symbol for you when you, say, select the abbreviated symbol or press a keyboard shortcut. I've been working on a moderately large C program with Emacs and clangd[1] recently and have been amazed at how 'immersive' it feels, and that's from someone who's used to the comfort of a Lisp REPL!

[1]: https://clangd.llvm.org/

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Friday July 14, 2023 @01:57PM (#36727559)
I work in Elixir and there are LSPs available. I'd still rather be able to just read and take as little action as possible to have to figure out where something is coming from. But as a sibling commenter says, they hate long names, so it's impossible to please everyone and comes down to teams making agreements.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ziml77 on Friday July 14, 2023 @01:50PM (#36727475)
For me it's not just the jumps but also overly long names. My ability to quickly scan the code is hindered by names that all jumble together because they aren't visually distinct enough. And when they read like a book, I'm going to have the same problems I have when reading books where I'm somehow reading all these words across the page but at the same time not actually processing any of it.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Friday July 14, 2023 @01:59PM (#36727584)
What constitutes an overly long name for you? Are you talking Java-y things likes `UserAccountBuilderFactoryFactory` or even just something like `operation` instead of `op`?
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by jacoblambda on Friday July 14, 2023 @03:13PM (#36728592)
not OP but I think even just `operation` vs `op` should be self explanatory for the majority of devs. And documentation can dispel any doubt regarding the interpretation of the name.

Terse naming is just fine as long as the names are visually distinct from those in the same scope/namespace and as long as engineers/developers are religious about proper documentation.

i.e. members/classes/types/fn/etc getting a doxy/doc description and local variables getting a `//` comment if their meaning and use isn't easily derivable from the immediate context.

If that isn't happening however, you probably need to be pushing for more descriptive names or better docs during code review.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Friday July 14, 2023 @03:27PM (#36728769)
It's self-explanatory for sure, but I would prefer the actual domain term be Op as well. IE, I really dislike `op = Operation.new()` or whathaveyou. This breaks stuff like editor highlighting and whatnot. It's also harder to keep consistency through a codebase. Like maybe some people do `o = Operation.new()`. I find very high cohesion here helps my code-scanning a ton.

I'm not saying that would be true for anyone, just furthering my premise that it's different for everyone.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by ziml77 on Friday July 14, 2023 @07:45PM (#36731498)
For the `operation` vs `op` example, it's highly contextual. If it's used in a narrow scope or if it's repeated many times (like I've seen in functions that copy fields of one structure to another), `op` is preferable. Otherwise I'm fine with `operation`.

The Java naming is one cause of what I really have a problem with. Like that name on it's own isn't the worst because the key info is right at the start and I'm probably not going to see the type name in function bodies I'm trying to follow. It's when that naming is combined with other overly verbose naming that it gets really gets bad: `CreateUserFromUserAccountBuilderFactoryFactoryOnBackgroundThread()` By the time I've read "BackgroundThread" I'm glancing backwards to see what is happening on the background thread.

Other places where longer names make reading harder are when the names are very similar. With `textBoxXPosition` and `textBoxYPosition` the X and Y get lost too easily. You could rearrange the letters to the front to help with that, but it can still make computations harder to read: `sqrt(xTextBoxPosition * xTextBoxPosition + yTextBoxPosition * yTextBoxPosition)` vs `sqrt(x * x + y * y)` or `sqrt(tbx * tbx + tby * tby)`

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Saturday July 15, 2023 @11:09AM (#36737497)
I think we're mostly in agreement here, thanks for sharing!

I actually always write full variable names, even in narrow scopes. This is mostly because I'm used to programming in dynamic languages and it makes renaming much easier. I've also become so accustom to it that it makes scanning incredibly fast. For example:

    Enum.map(operations, fn operation ->
      execute(operation)
    end)
I can pretty much just read the left-hand side of that if I'm scanning really quickly, ie, ignore everything after `fn`. I'm talking micro-optimizations here, but I have been tripped up before when someone did something like `optn`.

Elixir allows for a shorthand notation for anonymous functions like so:

    Enum.map(operations, &execute(&1))
Some people hate that but again I like it due to the refactoring advantages (it becomes very simple to read once you get used to it).

I hear you on the x/y thing. You example is actually why I really prefer snake case, though I don't want to start a flame war there, haha. But ideally when you're dealing with points and dimensions you wrap them in a type or object that you can pass around and the receivers can extract simple `x` and `y` variables from them.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by Saturn5 on Friday July 14, 2023 @04:53PM (#36729785)
I have a colleague that loves to call functions things like ‘convert_object_type_from_mm_to_m’ and ‘convert_object_type_from_m_to_mm’ . It’s unscannable. They’re the same to me.

He does not like my ‘meter_to_mm’ and ‘mm_to_meter’ because the abbreviations are inconsistent, no verb is used and he needs to go all the way to the typehint to know the input. We both have a point, but there is not really a clear middle ground without writing a novel in function names.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Friday July 14, 2023 @05:42PM (#36730330)
Ya, that is ridiculous, honestly. While it's still all subjective, you gotta draw the line somewhere! I'm a stickler for consistency myself and would be ok with `meter_to_millimeter` but the `convert_object_type_from_` is pure nonsense. Like, assuming you're talking about a language with objects, what the heck else would you be converting?? EDIT: requiring verbs in function names is also overrated. It's one of those things that's usually a good idea, but if comes down to employing some taste to decide when it might not be. EDIT 2: I'm now upset for you for having to put up with that, lol.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by s_trumpet on Sunday July 16, 2023 @06:09AM (#36745273)
I’d personally go with a single function like “convert_object_type” and pattern match into different clauses such as “convert_object_type(obj, from: m, to: mm)” and so on.
[dead]
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by sodapopcan on Friday July 14, 2023 @03:37PM (#36728886)
When I was working in Ruby, I think the default function length for functions was 5 lines. I used to be on board with this until I helped write a whole system adhering to this.

Small functions aren't bad per se, especially if they are re-used a lot, but I no longer believe that they are inherently good. Especially awful are having a lot of tiny single-use private functions.

I think that developers often want an easy way to say "we must do this" and have a tool tell them to do so. Tools can get us pretty far but at some point writing good code is going to come down to taste. This is of course very hard in many large project situations where its every team for themselves, and often every developer for themselves within a team.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by scns on Saturday July 15, 2023 @10:19AM (#36737007)
IntelliJ recommends inlining single use functions.
Re:Effect of Perceptual Load on Performance Within IDE in Pe... by s_trumpet on Sunday July 16, 2023 @06:05AM (#36745260)
At my firm we’ve standardized on import being used only for a short list of well known first/third party modules (e.g. Ecto.Query and Plug.Conn).

Application modules can be aliased, but not library modules. This is so that we don’t need to keep repeating the name of the application throughout the codebase while preserving clarity as much as possible.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by hirvi74 on Friday July 14, 2023 @02:16PM (#36727828)
> As an engineer for 10+ years with pretty severe ADHD (unmedicated...

How did you do it? I wasn't diagnosed until my early adulthood, but even with medication, I feel like I can barely keep my head above water.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by dkh on Friday July 14, 2023 @07:43PM (#36731485)
I was diagnosed and treated young (around 12-13). I was not very well controlled at all at the time, and wouldn't be until my 20s, but I at least was aware of the problem and seeing a doctor regularly from that point on.

Everyone is different, but the key things for me were 1) never settling medication-wise until I found something that truly worked well for me (a process that took years but well-worth it) and 2) utilizing my newfound focus to put systems in place to help me be productive while working around my particular weaknesses. (By this I mean how I handle todos, calendars, notes, workflow processes, etc.) #1 was absolutely crucial and is when I started "feeling good" but #2 is what took me from "feeling good" to "reaching goals".

Regarding the medication, I had a very good doctor. In the beginning, medication would either not work for me, or it would, but for a limited period of time. I was very used to switching things frequently. So later when I would land on something that was okay-ish but not great (a point where many people consider themselves lucky and stop experimenting) I would note that it was helpful in case I wanted to return to it later, but we would move on and try something else, hoping for something better than "okay". And eventually we landed on something lesser-prescribed but that worked quite well for me and continues to work to this day. #2 was still a multi-year battle that I haven't fully won, but I've made enormous strides and I so badly wish I had gotten myself to this point a decade earlier.

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by DoingIsLearning on Sunday July 16, 2023 @08:29AM (#36746225)
> 1) never settling medication-wise until I found something that truly worked well for me

Diving into the detail, what medication have you tried and how did it work/not work for you?

Re:Effect of Perceptual Load on Performance Within IDE in Pe... by BaculumMeumEst on Friday July 14, 2023 @02:18PM (#36727856)
Finely aged, unmedicated, severe ADHD fist bump! I share your struggles. I find drawing lots of diagrams helpful.