Live data from Hacker News

Write libraries instead of services, where possible

catern.com

321–328 of 328 posts

Re: Write libraries instead of services, where possible

#321
A comment on the website. I know on HN its popular to have minimal sites. But this is just rediculous. While I also dislike medium, they get the spacing right. This site is awful to read.

Generally lines shouldn't be longer than 700px or so (+/- 100px). Its harder for the eye to stay on the same line when its longer than that.

One line of CSS can fix this and vastly improve the experience.

The font size is tiny, I have to zoom in 50% to easily read. While I can do that, its annoying to have to do so.

That's another 1 line CSS fix. And then one final line of css to center everything.

I'm not asking for an entire site redesign, but literally 3 lines of CSS can vastly improve the end user experience.

CSS needed:

    body { 
        max-width: 700px;
        font-size: 20px;
        margin: auto; 
    }
Edit to add: http://bettermotherfuckingwebsite.com/ for a good minimal example site.

Re: Write libraries instead of services, where possible

#322
post #240

Earlier quoted context omitted.

Because a large majority of those developers feels entitled to get everything for free. If I want to get money (not donations) I rather target traditional corps.

I agree that if you want to make money you shouldn't target FOSS, but how does that fit into the "libs vs saas" conversation?

SaaS are the easiest solution to achieve payments from FOSS consumers.

Re: Write libraries instead of services, where possible

#323

Earlier quoted context omitted.

Of course it "works", there's been multiple countries run on it and continue to run on it. What you mean to say is you don't like it.

Such as? In which countries did it work?

The communist party was pretty successful in helping to overthrow the Portugese dicatorship in the early '70s, but they were also democrats. They're still one of the major political parties in Portugal, and you see ads for the communist party everywhere.

The Indian state of Kerala is the most advanced, well run, and successful region of the country. On development indexes it ranks with the poorer regions of the EU. It's also largely a communist state, but once again the communists are democrats.

Re: Write libraries instead of services, where possible

#325
post #290

Earlier quoted context omitted.

How do you keep track of background jobs? Is the queue persisted on disk somewhere? If it's not and a background worker crashes for some reason, then is the job lost?

Oban uses Postgres for persistence https://hexdocs.pm/oban/Oban.html

That’s a very nice library. BEAM + Elixir + OTP supervision trees + Obama for background jobs + PostgreSQL for persistent storage seems a killer combination. And like you said you can scale horizontally naturally with the Erlang plateform without even using k8s. Really interesting.

Re: Write libraries instead of services, where possible

#326

Phoenix is practically built with this idea in mind. My startup is built out of a single phoenix monolith. Only external dependency is postgres. Despite this, I've managed to completely avoid all the typical scaling issues of a monolith. Need a service or background worker? I juts make a Genserver or Oban worker and mount it in the supervision tree. The Beam takes care of maintaining the process, pubsub to said servi…

This was possible due to the fact that BEAM does allow you to do things like the ones you describe and enjoy advantages of both worlds (monolithic and microservices). If someone does not use Elixir/Erlang however or if the the product consists of parts written in multiple languages (for whatever reasons) then it's simply not possible to have the advantages of microservices in a monolithic approach.

Sounds like an argument for using Elixir.

Re: Write libraries instead of services, where possible

#327

Earlier quoted context omitted.

I can recommend watching this[0] to understand BEAM design better. [0] - https://www.youtube.com/watch?v=JvBT4XBdoUE

+1, probably my favourite talk on the BEAM too, even allowing for the fact that listening to Joe Armstrong himself was always a distinct pleasure.

Really great talk! He talks about some problems about the BEAM Distribution, but didn't get into details about it. Do you have any idea about those problems?

Re: Write libraries instead of services, where possible

#328

Earlier quoted context omitted.

Democratizing making software comes at a price Now everybody can and is trying to make a living off of it

Is that such a bad thing?

Absolutely not!

But OP seems to think so

Post reply on HN