HN user

skinner927

413 karma
Posts0
Comments185
View on HN
No posts found.

Edit: egg on my face. The article’s author suggested the same service. Heh. Anyways…

I highly recommend a service like SimpleLogin. It allows for dynamic wildcards:

- store1@my.domain - whatever@my.domain - @my.domain

All gets fwd to my real email and I can kill any address from my email client by unsubscribing (or login to the SimpleLogin interface)

You can go further and use subdomains or pattern matching to send things to different addresses like your spouse and friends. e.g.

- @friend.my.domain -> friend@gmail.com - *@spouse.my.domain -> babe@example.com

Not affiliated, just really happy with the service

Children ages 4-7.

They also believe a fat man dressed in red zips around the earth one night to give everyone presents.

They’re children. They don’t need to know where bacon and hot dogs come from.

I doubt those children care about anything outside their bubble.

You’ll never learn it by reading something. You have to experience it. Get your hands dirty.

Write a simple single-threaded http server that takes strings and hashes them with something slow like bcrypt with a high cost value (or, just sleep before returning).

Write some integration tests (doesn’t have to be fancy) that hammer the server with 10, 100, 1000 requests.

Time how performant (or not performant) the bank of requests are.

Now try to write a threaded server where every request spins up a new thread.

What’s the performance like? (Hint: learn about the global interpreter lock (GIL))

Hmm, maybe you’re creating too many threads? Learn about thread pools and why they’re better for constraining resources.

Is performance better? Try a multiprocessing.Pool instead to defeat the GIL.

Want to try async? Do the same thing! But because the whole point of async is to do as much work on one thread with no idle time, and something like bcrypt is designed to hog the CPU, you’ll want to replace bcrypt with an await asyncio.sleep() to simulate something like a slow network request. If you wanted to use bcrypt in an async function, you’ll definitely want to delegate that work to a multiprocessing.Pool. Try that next.

Learning can be that simple. Read the docs for Thread, multiprocessing, and asyncio. Python docs are usually not very long winded and most importantly they’re more correct than some random person vibe blogging.

I appreciate the reply. It does feel like most resources online are just the summary of 3 web searches and boom they’re an expert. Thanks for the links and info.

1. Assuming IEC refers to cables we plug a desktop PSU into mains/wall: IEC can carry up to 1800w vs 100w PoE++

2. Powerline networking is considerably slower and less reliable than CAT5/6. Additionally, building code for running power lines is much more strict than low voltage CAT5/6

The point of linters is so the code looks the same regardless of who wrote it. This way it’s easier to read. Some people have horrible style and linters really help.

I find linters make me faster. Sometimes I’m feeling lazy and I just want to pump out a bunch of lines of ugly code with mappings poorly formatted, bad indents, and just have it all synched up when I save.