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.

crony , (edited ) in My Git Knowledge
@crony@lemmy.cronyakatsuki.xyz avatar

Average linux user managing his dotfiles.

Yes I’m guilty of that, only thing more I know is creating new branches.

Asudox , in What’s in a name?
@Asudox@lemmy.world avatar

“child” seems to be enough. short and concise.

2deck ,
@2deck@lemmy.world avatar

child-1 just in case

dyc3 ,

Yeah leave em wondering what happened to child-0

wieson ,

Error in line 1: You can’t use a reserved symbol in a variable name.

zerofk ,

“Slave” works too.

butmingus , (edited ) in What’s in a name?

Definitely naming my next dog Byte.

Edit: Petabyte!

merc , in Every language has its niche

Ruby -> Rails.

It just hasn’t had a second revival.

phoenixz , in Every language has its niche

Is PHP becoming irrelevant? It still comprises the vast majority of web pages out there. Maybe that has been going down but with he amount of competing languages and systems out there, that is to be expected.

Either way, it’s an awesome language, happily been using it for decades now

caseyweederman ,

Perhaps it was before Facebook came along

bionicjoey ,

Wikimedia, WordPress, Drupal…

Anticorp ,

Nah, something like 93% of all websites on the planet were PHP when Facebook came around, thanks to WordPress.

bitcrafter ,

Either way, it’s an awesome language, happily been using it for decades now

Mind taking a moment to share why you like it? I am not very familiar with it.

CanadaPlus ,

… And it’s one of the languages everybody craps on. Like, I’ve seen people compare JavaScript favourably to it.

phoenixz ,

Yeah they do, with no real reason, really. Oohh, “some functions use underscore and others don’t!” And? It’s not a problem, really. Every language has baggage from the past and PHP kept it for stability, I’m happy with that.

CanadaPlus ,

“some functions use underscore and others don’t!”

That’s weird, but more of an aesthetics issue than anything. JavaScript will actually decide to behave oddly for no reason; if that’s it it’s still king of the shitbirds.

bier ,

I’m not the one you asked, but what I like isn’t really about PHP itself, but the fact that I can get dirt cheap hosting with PHP and MySQL. Every time I want to create a small “app” that makes some manual task easier it’s very useful to create something I can access from the internet.

Python is really useful for stuff like that too, but (in my experience) not as easy and cheap to use as an web app.

For example I go to dinner with some friends every month and we always forget who’s turn it is to choose and book a restaurant. So I just made this PHP page that shows the current and next 2 months with a name. So we always use that to see who’s turn it is.

Hadriscus ,

Dope !

AVeryCleverName ,

What makes hosting with PHP cheaper than with python?

bier ,

I don’t know, maybe it’s because PHP used to be the default web based language? I just buy hosting, I don’t sell it…

AVeryCleverName ,

What do you use for hosting? I’m looking for a good host and highly budget conscious.

bier ,

I’m Dutch and use a local Dutch company, I also wanted a .nl tld

phoenixz ,

Though I like that you use PHP, I don’t think there is such a thing as PHP hosting, or python hosting? Maybe I’m not understanding what you’re saying here?

bier ,

When you pay a company and they provide you with a domain (you choose) and give you a webserver, some disk space, a database etc.

I pay about 30 euros a year for 5 websites. They are all very basic (either some php stuff I made, or WordPress). These websites have very few visitors so the hosting specs don’t really matter. All these websites have a specific domain name, some disk space, and a database.

For this price they offer PHP and MySQL. So it’s not a dedicated server where I’m root and can Install other stuff.

bitcrafter ,

I’m not the one you asked, but what I like isn’t really about PHP itself, but the fact that I can get dirt cheap hosting with PHP and MySQL.

Oh, wow, I looked a little into this and hosting really is dirt cheap! That is a benefit that I genuinely was not expecting.

phoenixz ,

Quite early on the eyes, powerful, fast to build and rolk out projects, about. A billion libraries with all the functions you’ll ever need. People both about it because it has some language quirks from way back in the beginning, I see it as stability. I don’t know how node is now but I remember a few years back where every bug fix came accompanied not only by 10 new bugs but also a bunch of interface changes that immediately broke everything. Every. Single. Damn. Time.

Having said that, it under very active development and has been majorly improved over the years. Dumb design choices are no long available and right now it’s quite easy to work securely with it.

Beyond the “but these two functions should have similar naming but they don’t!” argument, that with a good editor doesn’t matter anyway, there isn’t really a good argument out there not to use it.

masterspace ,

Depends on how you’re judging relevance.

93% of webpages could be PHP because of Wordpress, but that doesn’t necessarily mean there’s a lot of PHP developers.

phoenixz ,

If that hypothetical 93% is WordPress, there’s still a huge demand for PHP developers to maintain that and the plugins and so

NikkiDimes ,

PHP is horrible, I hate it, and I will not elaborate. Good day, sir.

phoenixz ,

Well that is an excellent argument if I ever heard one…

NikkiDimes ,

I said good day sir!

phoenixz ,

Good day to you too, how have you been?

NikkiDimes ,

Not too bad. Just chillin’. How 'bout you?

phoenixz ,

Very fine! Nice cool day today.

Oha , in Oh, the irony

what that?

squirrel OP ,
@squirrel@discuss.tchncs.de avatar

It’s - reportedly - a tool to reveal who’s at risk of burnout. I couldn’t try it myself because of the error, but I read about it here

boredtortoise ,

The majority of the global workforce is at the risk of a burnout. No app needed

henfredemars ,

Perhaps, but you aren’t going to package up the solution and sell it to people with that attitude.

boredtortoise ,

Yeah I won’t myself but I hope someone fixes all of this

MotoAsh ,

Here’s a hint: “packaging it up and selling it” is not the solution to anything work related.

boredtortoise ,

Yep. That’s one of the paths which have led here

MonkderZweite , (edited )

If you’re in IT, you can disguise your timout every 2 - 3 years as a sabbatical in your CV, so it doesn’t look bad.

MonkCanatella , in Hey, I'm new to GitHub!

Yo did a character from a Tim Robinson skit write this?

https://sh.itjust.works/pictrs/image/fb10f7ce-b29d-46d9-b6bb-057284cbe28a.jpeg

Kolanaki ,
@Kolanaki@yiffit.net avatar

“Just compile it you fucking asshole!”

“I CAN’T! I DON’T KNOW WHAT ANY OF THIS SHIT IS AND I’M FUCKING SCARED!”

silas , in onlick
@silas@programming.dev avatar

Spatial computing has gone too far

bruhduh ,
@bruhduh@lemmy.world avatar

Apple vision pro 2 be like

superterran , in Junior Dev VS Machine Learning
@superterran@discuss.online avatar

LLM costs $20 a month and needed only 60 hours of training, junior dev has been at it for years, costs as much for a half hour, and still needed me to repeatedly explain what a rectangle is

activ8r ,

If you’re paying someone $40 an hour who doesn’t know what a rectangle is then I think you’re the problem.

Nomecks ,

The problem is that he’s paying $40 an hour and for that you only get someone who knows what a ਆਇਤਕਾਰ is.

superterran ,
@superterran@discuss.online avatar

I’ve just worked for agencies that hire juniors and outsource. If you’ve seen what I’ve seen you’d change your tune

Treczoks , in Junior Dev VS Machine Learning

One key point here is: While you actually can replace a bunch of junior developers with AI in some places, any replaced junior developer will never become a senior developer that cannot be replaced by the AI because he/she is basically experince on two legs.

So, corporations, don’t complain about the lack of experienced, senior personnal because YOU have been the main reason they don’t exist.

peto , in What's stopping you from coding like this ?

That wrist angle looks uncomfortable as all hell.

MeDuViNoX ,
@MeDuViNoX@sh.itjust.works avatar

You may not like it, but this is what peak performance looks like.

udon , in What I want to become Vs What I do

None of these engineers built a dam, ship, or plane. They did some math and drew some lines, and some other people built the stuff.

force ,

In this context it’s heavily implied “built” is used as “engineered/designed”, in the same way I “build” a shitty engine for an app

udon ,

Exactly my point. In the second case the two lines are also not the product, but it’s heavily implied that the dam, bridge is something useful, while the python code is useless. There are many examples where the opposite is the case

FluffyPotato , in Every Family Dinner Now

Yea, I tried to use AI for my work, it seems to have zero clue about the software I asked about but it pretends it does. I think I’m safe.

alcasa ,

Sounds good enough for my boss to me

gravitas_deficiency , in Bug Fixing

<span style="color:#323232;">======== 37/37 tests passing ========
</span>
OsrsNeedsF2P ,

That’s when the real debug session begins

lorty ,
@lorty@lemmy.ml avatar

Great time to find out your tests are useless!

gravitas_deficiency ,

They’re not completely useless. They’re conditionally useless, and we don’t know the condition yet.

CanadaPlus , (edited )

So how do you write a good test? It’s like you have to account for unknown unknowns, and I don’t really have a good theory for doing that.

Right now, I usually end up writing tests after the code is broken, and most of them pass because they make the same mistakes as my original code.

Theharpyeagle ,

For unit tests, you should know the input and expected output from the start. Really responsible devs write the unit tests first, because you should know what you’re going to put in and what you’ll get out before you start writing anything. If you find yourself making the same mistakes in your tests as you do your code, you might be trying to do too much logic in the test itself. Consider moving that logic to its own testable class, or doing a one-time generation of a static set of input/output values to test instead of making them on the fly.

How granular your tests should be is a matter of constant debate, but generally I believe that different file/class = different test. If I have utility method B that’s called in method A, I generally test A in a way that ensures the function of B is done correctly instead of writing two different tests. If A relies on a method from another class, that gets mocked out and tested separately. If B’s code is suitably complex to warrant an individual test, I’d consider moving to to its own class.

If you have a super simple method (e.g. an API endpoint method that only fetches data from another class), or something that talks with an external resource (filesystem, database, API, etc.) it’s probably not worth writing a unit test for. Just make sure it’s covered in an integration test.

Perhaps most importantly, if you’re having a lot of trouble testing your code, think about if it’s the tests or the code that is the problem. Are your classes too tightly coupled? Are your external access methods trying to perform complex logic with fetched data? Are you doing too much work in a single function? Look into some antipatterns for the language/framework you’re using and make sure you’re not falling into any pitfalls. Don’t make your tests contort to fit your code, make your code easy to test.

If ever you feel lost, remember the words of the great Testivus.

CanadaPlus ,

First off, thanks for the help!

Really responsible devs write the unit tests first, because you should know what you’re going to put in and what you’ll get out before you start writing anything.

I’ve obviously heard the general concept, but this is actually pretty helpful, now that I’m thinking about it a bit more.

I’ve written pretty mathy stuff for the most part, and a function might return an appropriately sized vector containing what looks like the right numbers to the naked eye, but which is actually wrong in some high-dimensional way. Since I haven’t even thought of whatever way it’s gone wrong, I can’t very well test for it. I suppose what I could do is come up with a few properties the correct result should have, unrelated to the actual use of it, and then test them and hope one fails. It might take a lot of extra time, but maybe it’s worth it.

How do you deal with side effects, if what you’re doing involves them?

Theharpyeagle ,

For your vector issue, I’d go the route of some static examples if possible. Do you have a way to manually work out the answer that your code is trying to achieve?

For side effects, that may indicate what I referred to as tightly coupled code. Could you give an example of what you mean by “side effect”?

CanadaPlus , (edited )

For your vector issue, I’d go the route of some static examples if possible. Do you have a way to manually work out the answer that your code is trying to achieve?

Not necessarily. In this scenario I’d imagine it’s a series of numbers as opposed to something more human-friendly exactly because there’s internal complexity that’s important but hard to manually survey, let alone generate. If you’ve worked with GANs at all, maybe it’s a point in a latent space.

For side effects, that may indicate what I referred to as tightly coupled code. Could you give an example of what you mean by “side effect”?

I mean it in the standard functional language way, if you’re familiar. There’s an operation that happens at some step of an algorithm, and it changes a data structure which is referred to or updated at another step. Sometimes you can’t really avoid it, because the problem itself has an interconnection like that.

A sorting algorithm example, if that doesn't make this too complicated.Concurrency it’s pretty much guaranteed to do it, so let’s say we’re trying to implement some sort of bespoke sorting algorithm, where each compare is large and complex enough we have bugs, and which runs in multiple threads. If threads are interfering with each other in this program, how do you test for that? The whole thing won’t give expected results, obviously, but another unsorted array or a failure to terminate doesn’t tell you much. Each compare and each swap might look correct at first, and give properly typed results. Let’s assume that each thread might traverse to anywhere in the array, so you can’t just check when they’re overlapping.

ivanafterall , in Sometimes things do go your way
@ivanafterall@kbin.social avatar

Another version of this is unexpectedly finding some niche, single-developer software tool that does precisely the thing you need, all because some genius angel stranger (strangel?) from the internet happened to encounter the same problem, and somehow knew how to fix it.

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