this post was submitted on 26 Feb 2025
74 points (97.4% liked)

Programmer Humor

20800 readers
1419 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

I didn't see this coming and I think it's funny, so I decided to post it here.

top 31 comments
sorted by: hot top controversial new old
[–] thesmokingman@programming.dev 5 points 4 hours ago (1 children)

This is just distributed functions, right? This has been a thing for years. AWS Lambda, Azure Functions, GCP Cloud Functions, and so on. Not everything that uses these is built on a distributed functions model but a fuck ton of enterprises have been doing this for years.

[–] GreenKnight23@lemmy.world 2 points 2 hours ago

someone at my work didn't get the message.

2000+ line function with 3157 node packages.

is that nano enough?

[–] NigelFrobisher@aussie.zone 4 points 5 hours ago* (last edited 5 hours ago) (1 children)

Tech moved in cycles. We come back to the same half-baked ideas every so on, imagine we just discovered the idea and then build more and more technologies on top to try to fix the foundational problems with the concept until something else shiny comes along. A lot of tech work is “there was an old lady who swallowed a fly”.

[–] fckreddit@lemmy.ml 2 points 3 hours ago

I always keep saying " You cannot plan your way out of a system built on broken fundamentals." Microservices has it's use case, but not every web app needs to be one. Too many buzzwords floating around in tech, that promise things that cannot be delivered.

[–] xmunk@sh.itjust.works 26 points 11 hours ago

Nano services are microservices after your company realizes monoliths are much easier to maintain and relabels their monoliths as microservices.

Unironically. I'd put a significant wager down on that being the source of this term.

[–] Sprocketfree@sh.itjust.works 2 points 6 hours ago

This is just the Linux way but with... Rest? Seems slow.

[–] psud@aussie.zone 1 points 5 hours ago

I feel like this name addresses the problem of services claiming to be microservices when they're not.

Does that even happen? cat is micro, sed is micro, systemd isn't and doesn't claim to be

[–] icerunner_origin@startrek.website 6 points 8 hours ago (1 children)

What's next? Femtofunctions

[–] smeg@feddit.uk 5 points 8 hours ago

You only need two of them, one for 1 and one for 0

[–] zea_64@lemmy.blahaj.zone 9 points 9 hours ago

We already have nanoservices, they're called functions. If you want a function run on another box, that's called RPC.

[–] princess@lemmy.blahaj.zone 12 points 10 hours ago (1 children)

quantum services

take your source code and put each character in its own docker container

this gives you the absolute peak of scalability and agility as every quantum of your application is decoupled from the others and can be deployed or scaled independently

implementing, operating and debugging this architecture is left as an exercise for the reader

that will be $250,000 kthx

[–] Horrabin@programming.dev 5 points 9 hours ago

implementing, operating and debugging this architecture is left as an exercise for the reader

Challenge accepted by a reader using AI, what could go wrong? xD

[–] LeFrog@discuss.tchncs.de 19 points 13 hours ago

This "article" was written by AI, wasn't it? This is just throwing vague buzzwords around

[–] Nougat@fedia.io 12 points 12 hours ago (1 children)
[–] bitcrafter@programming.dev 4 points 9 hours ago

My services are so small that it is impossible to know just how fast they are running!

[–] nick@midwest.social 13 points 13 hours ago* (last edited 12 hours ago) (1 children)

You know what they say: micro services, macro outages.

[–] psud@aussie.zone 1 points 5 hours ago (1 children)

At least you can accurately point the finger at who's responsible

[–] nick@midwest.social 1 points 3 hours ago

Well during the never sev0 I’m sure the shareholders will be satisfied with that.

[–] Hammerheart@programming.dev 1 points 7 hours ago

Metaservices.

[–] bitcrafter@programming.dev 2 points 9 hours ago (1 children)
[–] Horrabin@programming.dev 2 points 9 hours ago

I can't agree more!

[–] tyler@programming.dev 5 points 12 hours ago (2 children)

we've been using nano-services for the past 6 months or so. Two different reasons. A codebase we absorbed when a different team was dissolved had a bunch of them, all part of AWS AppSync functions. I hate it. It's incredibly hard to parse and understand what is going on because every single thing is a single function and they all call each other in different ways. Very confusing.

But the second way we implemented ourselves and it's going very well. We started using AWS Step Functions and it allows building very decoupled systems by piecing together much larger pieces. It's honestly a joy to use and incredibly easy to debug. Hardest part is testing, but once it's working it seems very stable. But sometimes you need to do something to transform data to piece together these larger systems. That's where 'nano-services' come in. Essentially they're just small ruby, python, js lambdas that are stuck into the middle of a step function flow in order to do more complex data transformation to pass it to the next node in the flow. When I say small I mean one of the functions we have is just this

def handler(event:, context:)
  if event['errorType']
    clazz = Object.const_set event['errorType'], Class.new(StandardError)
    raise clazz.new.exception, event['errorMessage']
  end
  event
end

to map a service that doesn't fail with a 4xx http code to one that does fail with a 4xx http code.

You could argue this is a complete waste of resources, but it allows us to keep using that other service without any modifications. All the other services that depend on that service that maps its own error types can keep working the way they want. And if we ever do update that service and all its dependencies, now 'fixing' the workflow is literally as simple as just deleting the node and the 'nano-service' to go along with it.

I should note that the article is about the first thing I discussed, the terrible codebase. Please don't use nano-services like that, it's literally one of the worst codebases I've ever touched and no joke, it's less than 2 years old.

[–] zea_64@lemmy.blahaj.zone 2 points 9 hours ago

Sounds like a distributed monad

[–] Valmond@lemmy.world 3 points 12 hours ago (2 children)

This looks like hell.

I'm a C/C++ developer though.

[–] tyler@programming.dev 1 points 1 hour ago

You can write your glue nano-service in c/c++ if you want, it’s just that: glue. It doesn’t matter as long as you don’t need to change the original services which also can be written in whatever you want. Ruby, Python, JS just work out of the box with aws lambda and you don’t really have to maintain them or any sort of build infra so it allows for very little maintenance or upkeep cost. You don’t really test these glue lambdas either.

[–] Xanza@lemm.ee 1 points 10 hours ago

I’m a C/C++ developer though.

Ya feel good about yourself, slugger? /s

[–] Star@sh.itjust.works 5 points 12 hours ago

I think it’s just serverless, right?

[–] db2@lemmy.world 4 points 12 hours ago (1 children)

Soooooo... Linux with extra steps.

[–] princess@lemmy.blahaj.zone 4 points 10 hours ago (1 children)

brb deploying each bin from coreutils as a separate aws lambda function

[–] db2@lemmy.world 2 points 7 hours ago (1 children)

Found the OpenAI employee 🤣

[–] psud@aussie.zone 2 points 5 hours ago* (last edited 5 hours ago)

I work in government IT, and AWS is used there too. I prefer working with a team delivering a COBOL data cruncher service, though the build people have it easier when the job is just connecting a source to a sink in AWS