Talk: Conor Hoekstra - Beautiful Python Refactoring

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ส.ค. 2024

ความคิดเห็น • 27

  • @BernardCarney
    @BernardCarney 4 ปีที่แล้ว +8

    Awesome talk! I went through a project I had been working on, and while I'm familiar with enumerate and comprehension, I fell for the same anti-patterns you had mentioned. Really thought this was a great talk for people at any level of programming.

    • @code_report
      @code_report 4 ปีที่แล้ว +5

      Thanks! Glad you enjoyed the talk! I see this anti-pattern in code all the time. Many tutorials are written this way and it is pervasive within many programming languages, not just Python. It is very satisfying for me when ever I can refactor some ITM code to use an algorithm or a function or a conditional expression or something else : )

  • @udianilbey
    @udianilbey 2 ปีที่แล้ว +2

    isnumeric usage introduces a side effect as "12.0".isnumeric() evaluates to false while int(12.0) evaluates to 12

  • @greatbahram
    @greatbahram 4 ปีที่แล้ว +3

    Thank you very much, it was very informative and enjoyable.

  • @ehsan_kia
    @ehsan_kia 4 ปีที่แล้ว +9

    I believe you want to use .isdigit() instead of .isnumeric(). The latter matches numbers in other languages, which int() wouldn't digest well.

  • @laike9m
    @laike9m 4 ปีที่แล้ว +11

    I wonder what tool did the speaker use to make code transformation animation, really cool.

  • @dejavukun
    @dejavukun 4 ปีที่แล้ว

    Great talk as always!

    • @code_report
      @code_report 4 ปีที่แล้ว

      Thanks! Glad you enjoyed it :)

  • @harshpatel105
    @harshpatel105 4 ปีที่แล้ว +1

    Its amazing video. :) Thanks a lot!

  • @eddyecko94
    @eddyecko94 4 ปีที่แล้ว +1

    Very good, c++ is my language of choice yet the ITM is something I’ve leavened

  • @MrG895
    @MrG895 4 ปีที่แล้ว +2

    Nice job! Loved the enumerate callout and the structuring of list comprehensions with lambdas and smart tabbing to make it readable. What did you use for the visualizations? I like the color scheme and the language icons, but adding the latter seems hard for matplotlib or other code-based viz libraries.

    • @code_report
      @code_report 4 ปีที่แล้ว +1

      I just use Microsoft PowerPoint :)

  • @triforce42
    @triforce42 4 ปีที่แล้ว +2

    I loved the transitions and the content. What did you use to animate the slides? Revealjs? Can we see an example/source code?

    • @code_report
      @code_report 4 ปีที่แล้ว +3

      There is no source code. Just Microsoft Powerpoint 2019

  • @taritgoswami3957
    @taritgoswami3957 4 ปีที่แล้ว +2

    Great! I heard that using long one-liners hampers readability. How you made the animation of rearranging the code to the next slide?

    • @code_report
      @code_report 4 ปีที่แล้ว +2

      Thanks! The slide deck is made with Microsoft PowerPoint 2019.

    • @ehsan_kia
      @ehsan_kia 4 ปีที่แล้ว +4

      My personal rule is, it's okay to be a one-liner if it represents a single idea. Like a sentence. Sometimes I will actually explicitly split something into two statements if they read as separate actions. For example one in the video I don't agree with is merging `col[i][1].append` with the ternary operator. Converting the data and adding it to the column are two separate actions in my mind, and make more sense as two statements.

  • @kora5
    @kora5 4 ปีที่แล้ว +1

    Beautiful transitions and animation. How do you create it?

    • @code_report
      @code_report 4 ปีที่แล้ว +3

      Thanks! Microsoft Powerpoint 2019

  • @albertosanchez789
    @albertosanchez789 4 ปีที่แล้ว +1

    Nice presentation and slides.
    The function names comparison between different languages (like the one in the minute 8:40) was taken from a public site?

    • @code_report
      @code_report 4 ปีที่แล้ว +9

      It is a program that I personally wrote that I will be turning into a website within the next year.

  • @Glowackos
    @Glowackos 3 ปีที่แล้ว

    What's the website from 8:53?

  • @akshayjoshi4411
    @akshayjoshi4411 4 ปีที่แล้ว

    What would you suggest to avoid ITM anti-pattern while fetching frames from webcam ?