HNHacker News
TopNewBestAskShowJobs

afhammad

249 karma · joined January 3, 2011

Self-taught programmer from a young age. Have been in the software industry for ~20 yrs. Enjoy leading and working in small high performing teams.

I've mostly worked with RoR, Clojure and Elixir and lots of infra/platform experience

Twitter: @orinj

submissionscomments
afhammad··on Evaluating modular RAG with reasoning models
Could you share more on your local setup please?
afhammad··on Show HN: Trains.fyi – a live map of passenger trains in the US and Canada
Similar but for the London Undergroound:

https://traintimes.org.uk/map/tube/ https://traintimes.org.uk/map/tube/schematic/

afhammad··on Choose Postgres queue technology
There are a few mentions of Oban [1] here. Most people don't realise that Oban in fact uses SKIP LOCKED [2] as well.

Oban's been great, especially if you pay for Web UI and Pro for the extra features [3]

The main issue we've noticed though is that due to its simple fetching mechanism using locks, jobs aren't distributed evenly across your workers due to the greedy `SELECT...LIMIT X` [2]

If you have long running and/or resource intensive jobs, this can be problematic. Lets say you have 3 workers with a local limit of 10 per node. If there are only 10 jobs in the queue, the first node to fetch available jobs will grab and lock all 10, with the other 2 nodes sitting idle.

[1] https://github.com/sorentwo/oban [2] https://github.com/sorentwo/oban/blob/main/lib/oban/engines/... [3] https://getoban.pro/#feature-comparison

afhammad··on Meta’s Microservice Architecture [pdf]
"chasing" is a good word
afhammad··on Ways to shoot yourself in the foot with Postgres
From my understanding, `work_mem` is the maximum available memory per operation and not just per connection. If you have a stored procedure with loops and/or many nested operations, that can quickly get quite big.

One trick worth noting, is that you can override the working memory at the transaction level. If you have a query you know needs more memory (e.g doing a distinct or plain sorting on a large table), within a transaction you can do:

`set local work_mem = '50MB'`

That will override the setting for operations inside this transaction only.

afhammad··on Keep the monolith, but split the workloads
> Bad code in a specific part of the codebase bringing down the whole app, as in our November incident.

This is a non-issue if you're using a Elixir/Erlang monolith given its fault tolerant nature.

The noisy neighbour issue (resource hogging) is still something you need to manage though. If you use something like Oban[1] (for background job queues and cron jobs), you can set both local and global limits. Local being a single node, and global across the cluster.

Operating in a shared cluster (vs split workload deployments) give you the benefit of being much more efficient with your hardware. I've heard many stories of massive infra savings due to moving to an Elixir/Erlang system.

1. https://github.com/sorentwo/oban

afhammad··on Show HN: BraiMax Chess – Bootstrapped personalized chess training Web App MVP
Good timing, I’ve been searching for something like this!
afhammad··on SBF’s legal defense is being funded with Alameda money he gave his father
tax exemption
afhammad··on Smart urinals stuck on boot at a gas station in Germany
413 Payload Too Large
afhammad··on Single File Elixir Scripts
There's been a lot of development in the Elixir ecosystem and so a lot to share.

Embedded with Nerves, the various AI/ML libraries and tooling, LiveBook getting better every day, LiveView innovating and improving DevEx, etc..

Then there's fly.io pushing out content given their target market is developers and they have a big focus on deploying Elixir applications.

afhammad··on Ask HN: What would be your stack if you are building an MVP today?
Adding my vote here. Throughout my career I've gone the C#.NET -> RoR -> Clojure -> Elixir/Phoenix route. After spending a year with Elixir, iterating rapidly on a production system, I'd default to it for any MVP or serious project going forward.

LiveView is also very close to becoming default over React for interactive Frontends.

afhammad··on NYSE Tuesday opening mayhem traced to a staffer who left a backup system running
It seems that this wasn't as routine as these things aught to be but rarely are.
afhammad··on Ask HN: Whats the best internal tool where you work?
Retool (on-prem) + Tailscale (golink, etc)
afhammad··on Create optimal conditions for lucky things to happen to you (2020)
A lot of people are in the right place at the right time, but very few are equipped to realise it and take advantage of it.

At the beach, waves will hit everyone in their path (right place, right time) but only those that notice it and already have momentum in the direction it's heading are able to ride it. If they have experience, and the tools (a board), they can ride it for longer without crashing.

afhammad··on Create optimal conditions for lucky things to happen to you (2020)
By Louis Pasteur. It's quoted in the article
afhammad··on Write admin tools from day one (2022)
On the tools: I have gone the route of using the libraries (e.g Kaffy for Phoenix, ActiveAdmin for Rails) and later building a central shared backoffice from scratch that any team can contribute to. In the former you are always wasting time fighting the library to get what you want, in the latter it has the advantage of being language/framework agnostic but it's too costly for smaller teams.

More recently i've used tools such as Retool (there are many alternatives), it has been ideal and allows for non engineers to build there own tools with a little bit of SQL knowledge.

afhammad··on Alpine.js
Fair, I was going based on hearsay/docs. It looks like LiveView has been trying to accommodate the issue with some work arounds such as: https://github.com/phoenixframework/phoenix_live_view/issues...
afhammad··on Alpine.js
Alpine.js is seeing an increase in utility as it pairs nicely with htmx[0], Phoenix LiveView[1] and the likes for lightweight interaction that doesn't require the server.

[0]: https://htmx.org

[1]: https://github.com/phoenixframework/phoenix_live_view

afhammad··on Getting Started with Tmux
why? (actually curious)
afhammad··on Bumblebee: GPT2, Stable Diffusion, and More in Elixir
> almost a WebUI alternative to a REPL

That's basically how my team have been increasingly using it. Simply connect Livebook to a locally running Phoenix project and you have a Livebook REPL into your server. When you're dealing with complex data, pulling from different sources and have to build up a bunch of context before you iterate on a function it's super useful to be able to break up that code into chunks, take form inputs[0] along the way and document any quirks. We keep a bunch of livebooks committed in the repo to help debug and iterate on the more complex parts of our codebase.

0: https://hexdocs.pm/kino/Kino.html

afhammad··on Bumblebee: GPT2, Stable Diffusion, and More in Elixir
> Maybe a more serious question: is anyone using Elixir ML in production?

Checkout this recent talk about how https://www.amplified.ai/ moved from Python to an Elixir ML stack: https://www.youtube.com/watch?v=Y2Nr4dNu6hI

afhammad··on Are tech stocks now good value?
You can't generalise, and nobody really knows.
afhammad··on CVE-2022-41924 – tailscaled can be used to remotely execute code on Windows
Yep agreed. I think/hope an incident such as this will create a step change in their security processes. As you said, it only takes a few of these incidents to make it very difficult for the business to recover, especially given the tech savvy customer base.
afhammad··on CVE-2022-41924 – tailscaled can be used to remotely execute code on Windows
This means you will see more of Tailscale.

Vulnerabilities are inevitable, the actions taken in the hours (ideally) and days following the discovery is what matters most.

afhammad··on Waze Founder Noam Bardin is starting up a Twitter alternative
He wasn't the founder of Waze, he was the CEO.
afhammad··on Waze Founder Noam Bardin is starting up a Twitter alternative
So is https://twitter.com/gabor

https://t2.social/

afhammad··on Show HN: Open-source alternative to Retool
I hope you're right but from the outside it looks like everyone is just rebuilding the same thing.
afhammad··on Show HN: Open-source alternative to Retool
looks identical (in features) to Retool, etc. Am I missing something?
afhammad··on Show HN: Open-source alternative to Retool
agreed. I'm gonna checkout windmill when i get a chance, thanks!
afhammad··on Show HN: Open-source alternative to Retool
@vladsanchez, @sevazhidkov, @Aeolun

I agree, the website is terrible at explaining what it is, I only got it by seeing it fully implemented in a business. It's too broad to describe here but this might help: https://www.youtube.com/watch?v=uF-GSj-Exms

Page 1 of 3Next →