aalhour | 26 days ago | on: Ask HN: Who wants to be hired? (February 2026)
aalhour's comments
aalhour | 5 months ago | on: Ask HN: What Is Your Hobby?
aalhour | 6 months ago | on: Ask HN: Does anyone else pronounce CLI as "clee"?
aalhour | 7 months ago
EDIT: typos.
aalhour | 10 months ago
aalhour | 2 years ago | on: Ask HN: How many times will this loop run on average?
aalhour | 2 years ago | on: Ask HN: How many times will this loop run on average?
def p(n):
total = 1
for i in range(1, n):
total *= (100-i)/100
return total
for i in range(1, 100):
print(f"p({i}) = {p(i)}")
The first 13 results: p(1) = 1
p(2) = 0.99
p(3) = 0.9702
p(4) = 0.9410939999999999
p(5) = 0.9034502399999998
p(6) = 0.8582777279999998
p(7) = 0.8067810643199997
p(8) = 0.7503063898175998
p(9) = 0.6902818786321918
p(10) = 0.6281565095552946
p(11) = 0.5653408585997651
p(12) = 0.503153364153791
p(13) = 0.44277496045533604
p(12) sits at 50%, of course it will be the mean! :Daalhour | 2 years ago | on: Ask HN: How many times will this loop run on average?
aalhour | 2 years ago | on: Ask HN: How many times will this loop run on average?
1/99 * sum([(i-1)*i for i in range(2, 100)]) # 3266.666666666667
Both the median and mean are around 12 for 10K runs of the loop.aalhour | 2 years ago | on: Ask HN: How do I get invite to Lobste.rs?
aalhour | 2 years ago
aalhour | 2 years ago | on: Ask HN: Books on building databases similar to Crafting Interpreters
EDIT: typos.
aalhour | 3 years ago
aalhour | 3 years ago | on: Ask HN: Favorite, timeless tech article/book
aalhour | 4 years ago | on: Ask HN: Favorite Nonfiction Books of 2021?
aalhour | 4 years ago | on: Ask HN: Which book or course gave you an unfair advantage?
* The Selfish Gene
* Probability: For the Enthusiastic Beginner
* How to Measure Anything
* Rationality: From AI to Zombies
* Cynefin: Weaving Sense-making into the fabric of our world
* Major works of Friedrich Nietzsche
aalhour | 4 years ago | on: Ask HN: What books, courses, practices helped your mental health last year?
aalhour | 5 years ago | on: Go is not an easy language
In my personal experience, I had an easier time getting onboarded on Python than Golang.
aalhour | 5 years ago | on: Ask HN: What book has the most accurate depiction of tech in the next 10 years?
aalhour | 5 years ago
Fully remote: Yes (and open to hybrid in Munich)
Willing to relocate: No
LinkedIn: https://www.linkedin.com/in/aalhour/
Website: https://aalhour.com/
GitHub: https://github.com/aalhour
Resumé/CV: available on request (has personal contact info)
Email: a.z.alhour(at)gmail(dot)com
Technologies: Go, Python, Java, k8s, docker, AWS (backend/data infra)
About me: A software engineer with 15 years of experience (ex-Shopify, ex-HubSpot), with prior engineering management experience. I work on the backend, did data engineering in the past and am looking for a role in backend/data infra.