There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

airbussy , in Let's do micro service

But why? Microservices do have some good advantages in some scenarios

1984 , (edited )
@1984@lemmy.today avatar

Problem is that companies are using them for all scenarios. It’s often their entire tech stack now, with kubernetes.

It’s similar to the object oriented hype that came before it, where developers had to write all their programs in a way so they could be extended and prepared for any future changes.

Everything became complex and difficult to work with. And almost none of those programs were ever extended in any significant way where object oriented design made it easier. On the contrary, it made it far more difficult to understand the program since you had to know which method was called in which object due to polymorphism when you looked at the code. You had to jump around like crazy to see what code was actually running.

Now with kubernetes, it’s all about making the programs easier to scale and easier to develop for the developers, but it shifts the complexity to the infrastructure needed to support the networking requirements.

All these programs now need to talk over the network instead of simply communicating in the same process. And with that you have to think about failure scenarios, out of order communication, missing messages, separate databases and data storage for different services etc.

prof ,
@prof@infosec.pub avatar

You can have the best tool in the world and still find people just hitting their own face with it.

1984 ,
@1984@lemmy.today avatar

I don’t think people have a choice. If you join a company where they use kubernetes, you have to use that technology for everything. You can’t escape the complexity even if you just want to make a simple program. It still needs to run in kubernetes.

prof ,
@prof@infosec.pub avatar

Depends on who you think the people are.

CTOs, technical team leads and such can make those decisions. And devs can also suggest migrating to simpler solutions.

If a tech giant like Amazon can do it like they did with Prime Video, I don’t think it’s impossible other companies can do so too.

1984 ,
@1984@lemmy.today avatar

Yes but in practice, companies don’t want to replace their entire tech stacks, and specially if it’s a large company. It costs an enormous amount of money (because of the time and effort it takes) and means the entire company has to relearn how to work with that stack instead.

It’s not impossible and it can happen, but in my experience from working at probably 20 companies now, there is almost always a strong resistence to change.

People don’t even change their default search engine or browser most of the time.

bort ,

if you just want to make a simple program. It still needs to run in kubernetes.

“hello OPS-team. Here is my simple program. Have fun running it on your kubernetes”

magic_lobster_party ,

On the contrary, it made it far more difficult to understand the program since you had to know which method was called in which object due to polymorphism when you looked at the code. You had to jump around like crazy to see what code was actually running.

I agree with this point, but polymorphism is often the better alternative.

Using switch statements for the same thing still have the problem that you need to jump around like crazy just to find where the variable was once set. It also tends to make the code more bloated.

Same with using function references, except this time it can be any function in the entire program.

The solution is to only use polymorphism when it’s absolutely needed. In my experience, those cases are actually quite rare. You don’t need to use it everywhere.

1984 ,
@1984@lemmy.today avatar

Yeah I agree. With experience you know where to use it and where it really shines, and when not to use it because it will just make everything harder to reason about.

But a lot of devs are not that experienced when they make these decisions. All of us learn from mistakes, and those mistakes stay in the code base. :)

frezik ,

If object oriented design is fundamentally about components sending messages to each other, then microservices are a different route to OO design. If people are bad at OO design, then they’re likely bad at designing microservices, as well. The two aren’t so separate.

All these programs now need to talk over the network instead of simply communicating in the same process.

This is where things go really wrong. Separating components over the network can be useful, but needs careful consideration. The end result can easily be noticeably slower than the original, and I’m surprised anybody thought otherwise.

1984 ,
@1984@lemmy.today avatar

It’s absolutely slower. There is no way to make a network request faster than a function call. It’s slower by probably thousands of times.

TrumpetX ,

I have to look it up every time, but this is always worth reading once a year to remind yourself:

gist.github.com/hellerbarde/2843375

1984 ,
@1984@lemmy.today avatar

Yeah I’ve seen it before. It’s a very good reminder for everyone to keep in mind isn’t it. :)

frezik ,

Since this is from 12 years ago, have any of these numbers changed much? Especially the SSD numbers.

TrumpetX ,

Not in any order of magnitude

frezik ,

By that chart, 1MB read from an SSD is only 4 times slower than 1MB read from RAM. Wouldn’t have to be an order of magnitude improvement to have an important affect there.

addie ,
@addie@feddit.uk avatar

Think you’re understating it there. Network call takes milliseconds at best. Function call, if the CPU has correctly predicted the indirect branch, is basically free, but even if it hasn’t then you’re talking nanoseconds. It’s slower by millions of times.

1984 ,
@1984@lemmy.today avatar

Yeah it’s insane. But of course if scaling different parts of the application, I guess micro services are the way to do it. But otherwise one could scale the entire app by just putting more of the entire app on servers. No need for micro services. It just needs to be written to be able to listen to message queues and you can have any number of app instances.

frezik ,

In theory, it can be faster with parallelization. Of course, all the usual caveats about parallelization apply, and you’re most likely going to create a slower system if you don’t think it through.

namingthingsiseasy ,

There is no way to make a network request faster than a function call.

Apologies in advance if this it too pedantic, but this isn’t necessarily true. If you’re talking about an operation call that takes ~seconds to run, then the network overhead is negligible. And if you need specialized hardware for it, then it definitely could be delegate it out to a separate machine over the network. Examples could include requiring a GPU, more RAM, or even a faster CPU if your main application is running on more power-efficient CPUs.

I’m not saying that this is true in every case - they are definitely niche cases. But I definitely wouldn’t say that network requests are never faster than local function calls.

Corbin ,

Well put. And this is a generic pattern; for example, GPUs are only faster than CPUs if the cost of preparing the GPU and retrieving the result is faster than directly evaluating the algorithm on the CPU. This also applies to main memory! Anything outside of the CPU can incur a latency/throughput/scaling tradeoff.

BellyPurpledGerbil ,

I don’t disagree with there being tradeoffs in terms of speed, like function vs network requests. But eventually your whole monolith gets so fuckin damn big that everything else slows down.

The whole stack sits in a huge expensive VM, attached to maybe 3 or 4 large database instances, and dev changes take forever to merge in or back out.

Every time a dev wants to locally test their build, they type a command and have to wait for 15-30 minutes. Then troubleshoot any conflicts. Then run over 1000 unit tests. Then check that they didn’t break coverage requirements. Then make a PR. Which triggers the whole damn process all over again except it has to redownload the docker images, reinstall dependencies, rerun 1000+ unit tests, run 1000+ integration tests, rebuild the frontend, which has to happen before running end to end UI tests, pray nothing breaks, merge to main, do it ALL OVER AGAIN FOR THE STAGING ENVIRONMENT, QA has to plan for and execute hundreds of manual tests, and we’re not even at prod yet. The whole way begging for approvals from whoever gets impacted by anything from a one line code change to thousands.

When this process gets so large that any change takes hours to days, no matter how small the change is, then you’re fucked. Because unfucking this once it gets too big becomes such a monstrous effort that it’s equivalent to rebuilding the whole thing from scratch.

I’ve done this song and dance so many times. If you want your shit to be speedy on request, great, just expect literally everything else to drag down. When companies were still releasing software like once a quarter this made sense. It doesn’t anymore.

1984 ,
@1984@lemmy.today avatar

I agree with you, and that is a hellish environment to work in.

There must be a better middle ground for all of this.

vrighter ,

but they have a lot more disadvantages for most scenarios (if you’re not a faang scale company, you probably don’t need them)

fidodo ,

The problem is that they become a buzz word for at scale companies that need them because they have huge complex architects, but then non at scale companies blindly follow the hype when they were created out of necessity for giant tech stacks that are a totally different use case.

fidodo ,

They add a lot of overhead and require extra tooling to stay up to date in a maintainable way. At a certain scale that overhead becomes worth it, but it takes a long time to reach that scale. Lots of new companies will debate which architecture to adopt to start a project, but if you’re starting a brand new project it’s probably too early to benefit from the extra overhead of micro architectures.

Of course there are pros and cons to everything, don’t rely on memes for making architecture decisions.

anakin78z ,
@anakin78z@lemmy.world avatar

I guess I’m not sure how others build with micro services, but using AWS SAM is stupid simple, and the only maintenance we’ve ever had to do is update a Node version. 🤷

lemmyvore ,

SAM is serverless but that doesn’t necessarily mean micro services.

pulaskiwasright , in New language

My favorite is “Java is slow” said by someone advocating for a language that’s at least 10 times slower.

humbletightband ,

Those who say such things are straight ignorant

pulaskiwasright ,

They’re basically fashion victims.

humbletightband ,

I wouldn’t say so. They are inexperienced. They don’t know where the bottleneck of most of the modern software is (it’s io in 80-90% of cases) and how to optimize software without rewriting it to C++

SorryQuick ,

How are they ignorant? It’s a known fact that java is slow, at least slower than some others. Sure, it’s still fast enough for 95% of use cases, but most code will run faster if written in, say, C. Will have 10x the amount of code and twice as many bugs though.

xor ,

the jvm brings enough bugs to outweigh any benefits there…
it is relatively fast, but it’s slow in that it takes up a bunch of resources that could be doing other things…

humbletightband ,

the jvm brings enough bugs to outweigh any benefits there…

Please name a few

xor ,

i decline your invite to debate the merits of java and jvm… i will instead walk my dog through this beautiful park here…

but, it’s all been said on top level comments on this post.
it’s trash, and honestly, even if it was perfect, sun microsystems has ruined any potential benefits.

humbletightband ,

Have a good walk at least

humbletightband ,

takes up a bunch of resources that could be doing other things…

You cannot get rid of garbage collectors, but you can always compile your java into binary to reduce the memory footprint.

xor ,

sea lion

kaffiene ,

Bullshit.

humbletightband , (edited )

Java is indeed slower than C, Rust, in some cases than Go.

But that doesn’t mean that

code will run faster if written in, say, C

Again, like 80-90% of production code are bounded by disk/network io operations. You will gain performance from using C in embedded systems and in heavy calculations (games, trading, simulations) only.

SorryQuick ,

Which is exaxtly what I said, that it’s fast enough for most use cases.

In theory though, you will “gain performance” by rewriting it (well) in C for literally anything. Even if it’s disk/io, the actual time spent in your code will be lower, while the time spent in kernel mode will be just as long.

For example, you are running a server which reads files and returns data based on said files. The act of reading the file won’t be much faster, but if written in C, your parsers and actual logic behind what to do with the file will be.

But it’s as you said, this actual tiny performance gain isn’t worth it over development/resource cost most of the time.

kaffiene ,

My favourite is “all the boilerplate” then they come up with go’s error checking where you repeat the same three lines after every function call so that 60% of your code is the same lines orlf error checking over and over

xtapa ,

When you handle all your errs the same way, I’d say you’re doing something wrong. You can build some pretty strong err trace wrapping errs. I also think it’s more readable than the average try catch block.

kaffiene ,

You still need to add error handling to every call to every function that might raise an error

pulaskiwasright ,

And god help you if you forget those 3 lines somewhere and you silently have database failures or something else.

kaffiene ,

Yeah, that’s the other thing - it does become easier to accidentally fail to deal with errors and the go adherents say they do all of that verbose BS to make error handling more robust. I actually like go, but there’s so much BS with ignoring the pain points in the language.

steeznson ,

Things like lombok make the boilerplate less of an issue in modern Java too

some_guy , in Dad has the chops to be a project manager.

My dad asked me if I could build a site for him. I tried, but ultimately didn’t have the chops (I can customize Wordpress, but this was supposed to be from scratch and I didn’t keep up when things like CSS came into being; old). I sent him to hire an outside party.

Here’s the thing: he wanted his menus vertical on the left side. I told him that’s not how it should be done; they should be at the top. But he was adamant. Later, he told me that his web consultant shop had also said the same. It’s the only time he ever said, “you were right,” about anything like in my entire life. Not that he was an asshole (though he really was when I was growing up). It’s just not something he said. And no one can take that from me. I even called my mom and told her.

milicent_bystandr ,

And now… Lots of websites with menus on the left!

Still, happy for you that your dad could humble himself to you. That’s really hard for some people, even when they’d like to, it’s like your brain just won’t compute how to say it without coming out wrong so you never say it.

HopFlop ,

Lots of websites with menus on the left!

Can you send an example? I’ve only seen these foldout side bar menus.

SpaceCowboy ,
@SpaceCowboy@lemmy.ca avatar

I’m looking at a page right now that has some buttons for “Subscribe, Create a post, Block community” on the side. But I guess it’s on the right side and maybe since they’re buttons it doesn’t count as a menu.

KairuByte ,
@KairuByte@lemmy.dbzer0.com avatar

To be fair, those are less a nav bar and more contextual content. You likely also have the main nav bar along the top.

Strykker ,

YouTube, google drive, Any readthedocs site with more than 1 page

Microw ,

Well, the youtube menu is most likely positioned there because they dont want people to use it.

pirrrrrrrr ,

Every site in the early 2000s had a left nav menu

Zagorath ,
@Zagorath@aussie.zone avatar

Wikipedia, especially the new design with the table of contents in the sidebar.

Png_Yakuza ,

Here’s some articles written about it as well from NN group if you’re interested

www.nngroup.com/articles/vertical-nav/

Here’s an article on user attention on website predominantly leaning left as well as a related topic

nngroup.com/…/horizontal-attention-leans-left/

a_wild_mimic_appears ,
ulterno ,
@ulterno@lemmy.kde.social avatar

I don’t get it.

We have only 1080px in vertical, part of which is also used for Taskbars, titlebars and toolbars in most cases. Then there is this trend of sites not using most of the horizontal space for main body text.
So, what reason do we have to not use the wasted side-space and instead congest the already low vertical space?

I would understand if it were a mobile-only site or if you were explicitly talking about the vertical version of it, but even for 4:3, I won’t consider a sidebar to be a bad idea, unless perhaps, it was German.

ShortFuse ,

Your dad is right. On desktop, navigation is on the left. On tablet, you shrink it to a rail. On mobile it should be a dismissible nav drawer.

The top menus, especially the flyover(on mouse hover), are bad for accessibility because they convert a non-committal action (hover) to a context changing one (focus). It’s a uniquely web-only invention and thankfully falling out of usage. (Unless you mean menubar/toolbar. Those are fine but extremely rare on Web.)

IsThisAnAI , in Open Source VS Company

On what planet do you live where people treat commercial requests nice? Clearly you haven’t been in the industry long.

ByteJunk ,
@ByteJunk@lemmy.world avatar

I presume OP works at a decently sized company, and they have magical people like PMs and CSMs that turn customer tantrums into neat little cards that he can push down the kanban.

vithigar ,

Or a giant company where customer tantrums are just background noise that is easily ignored.

Quill7513 ,

Soothing white noise that helps you sleep

habl ,

I always go to the headquarters of the commercial company in a bomb suit to request the update I need.

underisk , in Gamedev is Easy
@underisk@lemmy.ml avatar

Another dev who forgot to .AddGameplay()

Zagorath ,
@Zagorath@aussie.zone avatar

I assume that’s part of the constructor?

HereIAm ,

Should really start practicing dependency injection, so you can create any kind of gameplay you want easily!

wesker , in Full Stack Programmer Doing Frontend
@wesker@lemmy.sdf.org avatar

I can’t be the only person who thinks “full stack” translates to “master of nothing.” One of the best career moves I ever made was shrug off the pressure to go full stack, and dedicate myself to backend only.

ImWaitingForRetcons ,

In my case, it was to increase the number of available job opportunities rather than any genuine interest.

Fal ,
@Fal@yiffit.net avatar

I think knowing about frontend is important for a senior or higher level engineer. I would expect someone at that level to be able to contribute where necessary, and know enough to make sane decisions and know when those decisions impact backend/frontend. But to be equally good at both isn’t reasonable

wesker ,
@wesker@lemmy.sdf.org avatar

A backend engineer that has adequately put in the time to operate at a senior level, will more than likely have worked closely enough with FE to check those boxes. They should be familiar with technical design and processes, which if done effectively, teach an engineer to ask those questions.

firelizzard ,
@firelizzard@programming.dev avatar

“I’m capable of not making a fool of myself with UI” does not equate to “I’m a full stack developer”

joyjoy ,

Full stack means we do it because nobody else will.

MajorHavoc ,

I feel seen.

I might get that sentence embroidered on a pillow.

firelizzard ,
@firelizzard@programming.dev avatar

You don’t have to be a full stack dev for that to happen to you

joyjoy ,

No, but when it does happen, you’ll probably turn into one.

firelizzard ,
@firelizzard@programming.dev avatar

When it happens? That happened to me a long time ago. I’m still a backend developer. I can create UIs and I can spin up and manage docker CI infrastructure but I sure as hell don’t want to. A properly run company team should have separate professionals for UX, front end, back end, sysadmin, etc. Just because I am capable of doing those things does not mean I should.

DreadPotato ,
@DreadPotato@sopuli.xyz avatar

Just because I am capable of doing those things does not mean I should.

This is the crux of why so many companies, especially smaller and medium sized ones, are a hot mess. capable of << good at, but of course it’s cheaper to just get johnny to do everything.

Prunebutt ,

As someone who likes to dip their toes into everything, I feel a bit called out by “master of nothing”.

wesker ,
@wesker@lemmy.sdf.org avatar

My apologies. My intention wasn’t a dig at engineers themselves, but rather the trend of employers seeking “full stack” engineers, and the implications of them shopping for a singular engineer willing to do the job of multiple engineers-- IE be taken advantage of, and the first to be let go, because of a lack of specialized domain knowledge, etc.

Prunebutt ,

No worries. Wasn’t really offended. ;)

Fuck that employer behavior, though.

Rodeo ,

It just means he can’t do it by himself.

Yours won’t be perfect, but you can do the whole thing by yourself.

wesker ,
@wesker@lemmy.sdf.org avatar

Why would I want to do it by myself, in a professional team setting?

Username ,

The truth is that there is value in both a generalist and a specialist.

sheogorath ,

My company started with full stack devs only and we’ve transitioned to specialized back end and front end since we realized that 1 specialized BE Engineer and 1 specialized FE Engineer can work faster with better quality than having 2 Full Stack Engineers.

Simulation6 ,

Thank goodness issues respect the FE/BE break out.

BaardFigur , in FLOSS communities right now

deleted_by_author

  • Loading...
  • Fudoshin ,
    @Fudoshin@feddit.uk avatar

    Remember IRC!

    psmgx ,

    We use slack at work so I don’t just remember it, I use a fancy version

    Evotech ,

    It’s good?

    gaylord_fartmaster ,

    It really isn’t. At least not for what most people try to use it for.

    _number8_ ,

    it makes me download 5 updates whenever i launch it then it looks just as shitty as before

    rainerloeten ,
    @rainerloeten@lemmy.world avatar

    It’s better. Not good. Better than other tools, at least in the eyes of the many people using it. But as I stated at another post, to me this speaks to the fact that we need better FOSS alternatives for whatever purposes discord is used. I don’t like Discord either, don’t get me wrong! But so many people using it means something’s missing and I don’t think it cab solely be explained by the lack of knowledge of existing solutions but at least partly by the existence itself.

    exocrinous ,

    Discord’s #1 unique feature is pluralkit

    Appoxo ,
    @Appoxo@lemmy.dbzer0.com avatar

    Matrix is there :p Ready to use (i think it’s missing call and video options)

    KillingTimeItself ,

    its missing all my friends inside of my computer though!

    Appoxo ,
    @Appoxo@lemmy.dbzer0.com avatar

    Convince them :-)

    tabular ,
    @tabular@lemmy.world avatar

    It needs to be a big wave of migration, rather than convincing one individual at a time. Discord needs to shit the bed while there’s a tolerable/better alternative we can all agree on.

    Appoxo ,
    @Appoxo@lemmy.dbzer0.com avatar

    Tbh I don’t see that happening with matrix anyway. Even with discord going to shit.
    Every platform that needs a guide is too complicated for the common folk.
    This goes also for Lemmy. The users on Reddit that stayed either didn’t care about the whole API stuff or didnt understand the issue.
    Hell even I use it sometimes because the content here is sparse and I don’t have any meaningful to contribute as a post (not even a repost lol)

    We are the exception and putting up with reading a bit and then deciding where to start the camp.
    Discord, FAANG, streaming sites. All of them and more are simply to register, login and then use. At best you will set up 2FA.
    Most of the folks I know (even my boss of an IT company) do not register 2FA and if only because they are forced to (Google and MS/O365 does it for example).

    I probably see another (commercial) platform rising before Matrix will become popular.

    tabular ,
    @tabular@lemmy.world avatar

    It’s harder for regular folk to move and they may not (yet) have an issue with what we may see, but regular folk would tolerate anything and tolerate it forever? They just have a different line which companies cannot cross.

    I think (and admittedly, I hope) every proprietary software is destined to shit the bed due to the irresistible temptation to make the user’s experience worse for increased profit. If there’s no alternative then users have no choice but luckily many of us will even create useful software just as a passion. You may be right that we just have not created software aimed at them because it’s other tech people who give feedback/contribute.

    KillingTimeItself ,

    the ironic thing is that basically the only thing that needs to happen for matrix to have that moment is some startup company to host a server much like discord, and then create a front end.

    It’s literally something they’re capable of doing, and it would totally work. The ENTIRE backend is already done, they can even help contribute to matrix as well. The value is the customer base, not the open source code, so it’s not like it’s going anywhere.

    KillingTimeItself ,

    thats like saying “fix the government”

    lol

    xigoi ,
    @xigoi@lemmy.sdf.org avatar

    For video calls, there is Jitsi integration.

    Appoxo ,
    @Appoxo@lemmy.dbzer0.com avatar

    Including screen caption?

    xigoi ,
    @xigoi@lemmy.sdf.org avatar

    Yes, I’m pretty sure.

    BaumGeist ,

    It’s terrible for secure/private communications, it requires hacks that violate the TOS and EULA to modify the client to get rid of ads and change themes, it’s not FOSS, and it locks features behind a paywall…

    But it does what skype already did, so I’m glad we all have to migrate to the new fad site that strips even more of our dignity and privacy every 10 years that’ll die anyway because it offers nothing and has a terrible business model.

    Evotech ,

    And forums was very good for secure communications?

    Umbreon ,

    People act like the alternatives are any better but they really aren’t. Sure don’t get me wrong it sucks that you typically have to scroll through useless info to find what you’re looking for, but I put that on the server owner, you see the same issue on most forums too. Discord brings huge audiences that you wouldn’t normally see in small communities. It’s free, easy to setup and access, has a mobile app with toggle-notifications(and maybe just my settings but I’ve never gotten an ad notification or anything I haven’t purposely toggled). People here are acting like you have to start using it as your primary messaging app and that you can’t just take your messaging to another platform if your worried about chat logs.

    Evotech ,

    There’s zero way dishes would become so popular if users didn’t like it.

    The fact that it has chat, voice, streaming, automation, accessible api and oauth.

    I mean please, these foss people can downvote all they want, but it’s a good application for communities.

    histic ,

    uhh sure buddy

    Evotech ,

    Literally the most popular community platform. People are clearly choosing it because there are much better alternatives out there

    noodlejetski ,

    “millions of flies can’t be wrong!”

    Evotech ,

    Cope

    KeenFlame ,

    Do you just not understand the quote?

    technom ,

    It’s bloated, filled with features no one needs for straight-forward work, has a somewhat obtuse UI and is buggy as hell. I don’t like Matrix much more than Discord. But even it has far fewer problems. I don’t know in which universe Discord is considered as ‘good’.

    ono ,

    My guess: The kids who used Discord for gaming grew up, and just went with the familiar thing when starting new communities and projects.

    Also, Discord did heavy marketing early on, until it carved out a network effect. So here we are.

    Sanctus , in dotnet developer
    @Sanctus@lemmy.world avatar

    I can, but due to the extra strains involved the price of this contract will increase.

    MagicShel ,

    How many strains does it take to develop using .net? Are we talking high end or ditch weed?

    NoLifeKing ,

    We talk about 2 bottles of Cuban Rum and 3 packs of sour gummy worms on top of the pay.

    Feathercrown ,

    Sour? That’s top quality, you drive a hard bargain

    uphillbothways ,
    @uphillbothways@kbin.social avatar

    You think that now... Wait 'til I bargain a hard drive.

    Feathercrown ,

    I’ll trade you two soft drives for it

    KingBoo , in Bug Fixing

    Me: “Hmm… No… No the code is good, it’s the compiler that’s wrong.”

    runs again

    runswithjedi ,

    deleted_by_author

  • Loading...
  • Isoprenoid ,

    It’ll be done soon, then I can go home. TGIF, am I right?

    MajorHavoc , (edited )

    Yeah. And I can send a quick email to update the team after I get home from my 45 minute commute, then log off and go to the cottage in that cell signal dead spot by the lake.

    Kata1yst , in The Perfect Solution
    @Kata1yst@kbin.social avatar

    Rofl. I just imagine OP furiously updating LinkedIn with "AI Programmer".

    nullPointer , in Programmer tries to explain binary search to the police

    just tell them there is a black man at the moment of theft, they will get on it lickety split!

    Cannacheques ,

    Sad meme very relevant

    Grimble ,
    • Binary search: O(log(n))
    • Sequential search: O(n)
    • Linear search: O(n)
    • Police ethnicity database search: O(0)
    ScrewdriverFactoryFactoryProvider ,
    @ScrewdriverFactoryFactoryProvider@hexbear.net avatar

    No need to search when you already have someone you wanna pin it on.

    xmunk , in Welcome to the wonderful world of code obfuscation

    As a Real Programmer™ I have developed such a deep fear of anything time and date related that I would fully endorse dispatching an API call to the tz_database instead of attempting any fucking part of this.

    Kids, it’s fine to meme about silly stuff… but date and time is deadly serious, regardless of how careful you think you’re being you are wrong.

    Do you know how many timezones there are in Indiana? No? Look it up and scream in horror.

    sunbeam60 ,

    What if I told you that weekend days are locale dependent?!

    Time and date is the black hole where optimistic programmers go to die. Nothing is simply with localisation and if you think it is, you mustn’t have worked enough with it.

    Source: Run a system that schedules millions of interactions across the world and deeply depend on this. The amount of code to manage and/or call out to external services to give us information about time zones, summer time, locale specific settings, day names, calendar systems, week numbers etc etc.

    kogasa ,
    @kogasa@programming.dev avatar

    IMO every datetime should be in utc, and variables for datetimes should either be suffixed “Utc” or have a type indicating their time zone (DateTimeOffset or UtcDateTime etc). Conversion to local time happens at the last possible second (e.g. in the view model or an outbound http request parameter). Of course that doesn’t solve the problem of interoperating with other morons programmers who don’t follow these rules, but it keeps things a lot neater locally.

    Scheduling based on regional time conventions (holidays, weekends, etc) is just not great though.

    usrtrv ,

    Throwing UTC everywhere doesn’t solve comparisons around leap seconds. I’m sure they’re other issues with this method, but this is kinda the point of “just use a library”. Then it’s someone else’s problem.

    kogasa ,
    @kogasa@programming.dev avatar

    I’m a .NET dev, I don’t have a concept of “just use a library.” Everything is a library. I don’t mean “using int for datetimes is ok as long as you label it utc,” I just mean “don’t deal with time zones.”

    v9CYKjLeia10dZpz88iU ,

    Unix is the easiest format I’ve used. It’s easy to parse, it’s consistent, there’s not usually competing unix like formats, it converts perfectly to other time formats, most file explorers can immediately sort it correctly, and it’s clearly the date from which the universe spawned into existence.

    xmunk ,

    It’s alright, but real programmers use Julian UTC.

    v9CYKjLeia10dZpz88iU ,

    I also really like the Bitcoin block number. It will likely be one of the most provable records of time passing, but not as convienent for tracking or converting time.

    coloredgrayscale ,

    Luckily we won’t colonize the moon or another planet anytime soon…

    AndyLikesCandy ,

    Here’s a fun thought experiment: What gregorian year and date will the spacian date value of zero correlate to? Trick question.

    The atomic clock on the moon and every other celestial body colonized will simply start at zero, and thanks to relativity it will not actually be the same rate of time passing as on earth.

    Enjoy your nightmares.

    DAMunzy ,

    2 timezones but the complication is that it is dependent on which country you’re in?

    xmunk ,

    There are two distinct time offsets used in Indiana but there are 11 different timezones en.m.wikipedia.org/wiki/Time_in_Indiana

    Zanothis ,

    Relevant talk by Jon Skeet

    invidious.io.lol/watch?v=64X8rCy1jSA

    fireflash38 , in Yes

    What if, get this, we put the bash scripts in yaml. And then put it in kubernetes.

    PupBiru ,
    @PupBiru@kbin.social avatar

    well now you’re just describing ansible

    Vash63 ,

    Very, very bad Ansible.

    nxdefiant ,

    Have you considered embedding python in those bash scripts? I have done this, and it is glorious.

    tetris11 ,
    @tetris11@lemmy.ml avatar

    I wrote my webserver in pure bash.

    bash -c “python -m http.server 8080”

    MeanEYE ,
    @MeanEYE@lemmy.world avatar

    Did you know you can zip entire Python project into single file and make it executable? Quite a neat feature. Shove all dependencies, modules and assets in there and voila. Single file python application.

    tetris11 ,
    @tetris11@lemmy.ml avatar

    PIGZ is an incredible standard

    Rhllor , in The lengths we have to go to

    Actually had a colleague who determined distances on microscopy images that way. She would measure the scale bar included in the image with her ruler on the screen, measure the distance she was interested in and calculate the distance using the rule of three. I mean, why bother using the measuring tool included in the software.

    cybervseas ,

    If it works it isn’t stupid.

    sznio ,

    I’ve heard of people printing out charts, then cutting out the part they wanted to calculate an integral of, then weighing the paper.

    w2qw ,

    How thick is your paper?

    jcg ,

    How inaccurate is your scale?

    JonEFive ,

    How precise are your scissors?

    WhiskyTangoFoxtrot ,

    How funky is your chicken?

    SkyeStarfall ,

    Nono that’s genius

    …ignoring the part that it’s just a discrete approximation of an integral a la a Riemann sum.

    siipale ,

    I’ve heard of it too. You would need an analytical balance to get accurate measurements weighing a piece of paper. Just cut out the part you want to take an integral of, then cut out a piece of paper with known size (or cut several pieces with different sizes to get more accurate results) and weigh each of them. I guess this used to be cheaper and faster than using computers when computers were big and expensive.

    jadero ,

    Or maybe just a powder balance. When I was a kid in the 1960s, Dad did a lot of reloading his own ammunition. We kids had fun doing things like weighing our names (weigh a small piece of paper to get the tare, weigh again to get the loaded weight, subtract) and other miniscule things. As I recall, it was accurate to less than a grain (0.065 gram).

    One of the things we did was weigh different shapes of paper to calculate area. Start with a sample of a unit area. Cut out a funky shape and weigh it, then do the math.

    Quereller ,

    I was reading an old book about chromatography in laboratory and they exactly describe this method to determine the amount of substance.

    PixxlMan ,

    That’s pretty clever!

    Liz ,

    That was a common way to do it before computers were common.

    thedolanduck ,

    I’m guessing she didn’t make any zoom either

    bjoern_tantau , in average day in NPM land
    @bjoern_tantau@swg-empire.de avatar

    Link to the PR? The PR description and the comment somehow contradict each other. Or I am stupid. Or the commenter.

    sus OP ,

    I tried to edit the ‘highlights’ into a single image, the top is the description of the PR, the middle is a comment replying to another comment

    github.com/micromatch/to-regex-range/pull/17

    bjoern_tantau ,
    @bjoern_tantau@swg-empire.de avatar

    Thanks!

    What a shit show.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines