5,366 karma · joined Jan 19, 2021 (5y ago) · 1,817 submissions
Instagram: @resumeshovel
LinkedIn: https://linkedin.com/in/mpope
Website: https://resumeshovel.com
comment 5y ago · link · parent
Instead of this...
with {:ok, response} <- call_service(data),
{:ok, decoded} <- parse_response(response) do
decoded
end
Maybe just do this... {:ok, response} = call_service(data)
{:ok, decoded} = parse_response(response)
decoded
Or even this... data
|> call_service!() # don't bother returning ok tuples
|> parse_response!() # just use bang methods!comment 5y ago · link · parent
- I like &Map.get/3 over the some_map[:some_key] syntax
- &with/1 can be hellza confusing in many case if you're calling a bunch of functions, and any ol' one of them can return an error message (e.g. where the heck did `{:error, :bad_arg}` come from?!
- piping into case statements is awesome, and I'll only stop doing it when people complain about it
- higher order functions are useful, and I don't see a problem using one's judgement as need on when to use them
- In the cases where using &with/1 is actually useful, so is using the else block if you really need to
...
Yeah, I just don't like this article's recommendations.
comment 5y ago · link · parent
It's not possible to anticipate every need, nor is it practical. You do the best you can to build something useful with the resources you have, ship it, and know that something will go wrong at some point. When something breaks, and it will, you fix it as best you can. If suspending your account for 5 days is the best you can do, it's the best you can do.
comment 5y ago · link · parent
I guess the main point I’m trying to say that one doesn’t have to fold the second someone threatens you with legal action, even if you don’t have an attorney. A porcupine doesn’t automatically shed all its quills and throw themselves in a mountain lion’s mouth as soon as the mountain lion eyeballs it with a hungry look. You can f*!with people who f* with you. They may just go away when they realize you’re not going to make it easy for them.
The kid who posted this website could get a notarized affidavit saying he didn’t steal any IP, here’s how he got all the stuff, provide links to all the publicly available information, that he simply state that he built a hacky weekend project I good faith, and that no matter how much they pursued him or time they wasted on him, it wouldn’t change the facts of the case. The more time the attorneys spend going after him, the more they’re just gonna waste their own time and look super dumb. Say they are free to pursue whatever legal action they want, just like you’re free to stand up to a frivolous, insecure bully with too much money and free time. Take all the fun out of it for them, don’t roll over and take it because you’re afraid of being potentially bankrupted.
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
If you sue me, I’ll just say “ok, see you in court, let me know if you need anything for discovery“. You’ll be spending lots of money and I’ll be spending nothing. It’s only expensive for me if I get an attorney, and I don’t need one. What happens if we go to court and lose? I have to take down my website? If there’s one lawyer in town, they drive a Chevrolet. If there’s two lawyers in town, they both drive Cadillacs.
comment 5y ago · link · parent
Probably the hardest part was how depressed I was, even as my body was recovering, I simply wasn’t prepared to start hustling to get my sales income back up, pay for physical therapy, deal with the hospital & insurance company, etc.
comment 5y ago · link · parent
EDIT: For more context, nuclear power could be a great tool in reducing carbon emissions. I read somewhere that mining Uranium 235 from seawater at scale would cost roughy 2x to 3x what it costs to get the fuel from the ground at today's prices. I was trying to say that if we're going through all of the trouble to extract Lithium from seawater, it'd be cool if extracting Uranium at the same time made both processes more economical.