All Posts By

Hatem Nassrat

    Loop vs Map vs List Comprehension

    As a Python developer I have seen lots of different preferences in this topic. These preferences aside, I was set to find which of them is faster in which situations. TLDR; If you require a list of results almost always use a list comprehension. If no results are required, using a simple loop is simpler to read and faster to run. Never use the builtin map, unless its more aesthetically appealing for that piece of code and your application does…

    Continue Reading

  • 7zip vs Gzip … compression and speed

    Since we work with twitter, this comparison will be using twitter as a data-source. We have randomly selected 5k users and used their public tweets for this test. Setup The setup…

  • Python: String Concatenation

    I have recently revisited my notes around string concatenation and along side a web search found a great deal of debate on what is the best method. Even the python wiki…

  • Python Memory Footprint

    This article applies to python 2.7 64-bit (32bit and py3k may be different) Edit: I added simpler estimate formulas along side the actual formulas, so the python memory footprint can be…

  • “Be A Customer Company” First

    Recently, listening to the legendary Marc Benioff (CEO@SalesForce.com) speak about social.com made the world realise how important it is to treat your customers like first class citizens. His keynote resonated greatly…