Pythonic way of iteration

Python is amazing. My understanding so far is that all programming languages can do, at the fundamental level, pretty much the same things - they just all do it in their own way. And Python has some really unique ways of doing regular things. These are so unique to Python, they even received their own term - writing pythonic code. One of these features is iteration. When you need to access both the item and its index, traditionally you would loop over the length of the list and use index to access the item. ...

December 10, 2022 · 1 min · 205 words

Deep Work: Rules for Focused Success in a Distracted World

Deep work - the ability to focus without distraction on a cognitively demanding task. Essential for producing valuable output, and it is becoming increasingly rare due to the constant distractions of modern technology and the proliferation of shallow work (tasks that do not require deep focus). Practical strategies for cultivating the ability to do deep work: setting clear goals creating a dedicated workspace setting aside dedicated blocks of time for deep work developing a “deep work ethic” The ability to do deep work is becoming increasingly valuable and rare, as more tasks can be automated and the demands of the modern workplace often involve a constant barrage of shallow, distracting tasks. ...

December 2, 2022 · 2 min · 230 words · Cal Newport