HN user

afhammad

249 karma

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

I've mostly worked with RoR, Clojure and Elixir.

Twitter: @orinj

Posts29
Comments69
View on HN
github.com 5mo ago

Claude Receipts

afhammad
1pts0
blog.bytebytego.com 2y ago

Discord Serves 15M Users on One Server

afhammad
58pts7
www.drgupta.ai 3y ago

AI(GPT) chat physician by Martin Shkreli

afhammad
2pts0
face.camera 3y ago

iPhone Face Motion Capture

afhammad
1pts0
news.ycombinator.com 3y ago

Ask HN: What's the status of Keybase after Zoom acquisition?

afhammad
4pts1
www.1000bit.it 3y ago

IBM's first commercial tablet – ThinkPad 700T [pdf]

afhammad
1pts0
world.hey.com 3y ago

DHH – The Bubble Has Popped

afhammad
15pts5
www.lurotbrand.co.uk 3y ago

London Mews Directory

afhammad
36pts31
algorithms.design 3y ago

How Artificial Intelligence Is Changing Design

afhammad
2pts1
status.quay.io 6y ago

Quay.io goes down for second time this month

afhammad
11pts4
thenextweb.com 9y ago

Planet of the Apps

afhammad
2pts0
www.youtube.com 9y ago

To Clojure and back: writing and rewriting in Ruby

afhammad
1pts0
qz.com 10y ago

Robot escapes research lab

afhammad
1pts0
getmondo.co.uk 10y ago

Mondo bank crowdsourcing name change

afhammad
1pts0
medium.com 10y ago

5 Practical Lessons for Any Startup

afhammad
6pts0
www.jide.com 10y ago

Remix Mini. The world's first true Android PC?

afhammad
1pts0
www.iflscience.com 11y ago

Blood Donors in Sweden Get a Text Whenever They Save a Life

afhammad
3pts0
en.wikipedia.org 11y ago

VisiCalc

afhammad
17pts7
www.species-in-pieces.com 11y ago

Interactive endangered species exhibition

afhammad
2pts0
www.igvita.com 11y ago

Concurrency with Actors, Goroutines and Ruby

afhammad
18pts1
www.infoq.com 11y ago

Windows embraces Docker

afhammad
1pts0
gridstylesheets.org 11y ago

Grid Style Sheets (GSS)

afhammad
7pts1
twitpic.com 11y ago

Cost of Living 1938

afhammad
3pts0
www.coursera.org 11y ago

Mining Massive Datasets

afhammad
13pts0
www.youtube.com 12y ago

New Apple campus [Official Video]

afhammad
1pts0
www.wolframalpha.com 12y ago

If you switch from Tea to Coffee, how much more caffeine are you getting?

afhammad
1pts1
www.youtube.com 12y ago

Mark Zuckerberg in Conversation with Stanford President John Hennessy [video]

afhammad
3pts0
developer.mozilla.org 12y ago

Ruby HTML5 tag

afhammad
1pts0
www.panarabiaenquirer.com 13y ago

U.A.E to rename itself to AAA111

afhammad
1pts1

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

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.

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

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.

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.

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.

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.

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