News for hackers. Stuff that matters.
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.