Ed The Dev .com

Edward Delaporte's Technical Journal

Python fast list comprehension

no comment

Here’s a one line list comprehension that stops processing the list as soon as it finds a true member, and returns false if all members are false. Keep in mind that you could also use a lamba function to check for a more complex circumstance in the list.


mustBlock = next((True for rule in rules if rule.block == True), False)

Writing code from an Android device

no comment

James Graves has done what I’ve been dreaming of – he has configured an Android phone as a development environment. James, you are my hero for the week!

Freeing up space on Windows hard drives

no comment

WinDirStat is freeware for Windows that creates a visualization of the largest files on your hard drives. It’s priceless for freeing up that extra gigabyte that you need to install that new game.

It found that my World of Warcraft installer files were wasting 8GB of space, even though I had removed World of Warcraft, itself.

Also, there’s a MAC version called Disk Inventory X, which is also quite awesome.