Programmer Humor

This magazine is not receiving updates (last activity 0 day(s) ago).

Daxtron2 , in Junior dev VS FAANMG dev

If you work for FAANG you're morally bankrupt

CanadaPlus ,

But financially bussin'!

And also, it's actually a complicated question. A one-man boycott doesn't do anything. If you work at a FAANG, work for a better world when you're off, and go whistleblower when they do something really evil, I find no fault in that at all.

Zangoose ,

The other consideration is that pretty much every company you could work for as a software developer is going to try to take advantage of your work. Most companies are morally bad at best and morally terrible at worst. If you discourage any good person from working there, the problem will only snowball from there.

If working at FAANG gives you the resources to support things you're passionate about, and you're willing to stand up for your values when they do something bad, there isn't a problem with that IMO.

Daxtron2 ,

FAANG is just as exploitative if not more than the average in the industry.

Zangoose ,

My point wasn't that FAANG isn't exploitative (my bad if it came off that way, I didn't mean for that), it's that everywhere else is also exploitative to some degree (most probably less so than FAANG, there are definitely a few that are worse though), and that it could still be reasonable to work there for some people.

GarlicToast ,

You can work in bioinformatics, the pay is lower than FAANG, but your code will benefit society.

frezik ,

Benefit society, or go to support a pharmaceutical company that will in some way benefit society in exchange for making a few people rich?

No ethical consumption working conditions under capitalism.

GarlicToast ,

Bioinformatics isn't used only for medical research or within big companies.
Sub-topics like metagenomics, that are helpful in many areas of research, require high level of technical knowledge, that the life science people don't have.

Daxtron2 ,

Giving up your morals for money is morally bankrupt

CanadaPlus ,

Agreed. Just working for somebody bad doesn't necessarily mean you've given up, though. I mean, they made a movie about Schindler, and we all know who he worked for.

Daxtron2 ,

Sure but an employee for FAANG and an undercover antifascist aren't really comparable

RustyNova , in Surely "1337" is the same as 1337, right?

To whoever does that, I hope that there is a special place in hell where they force you to do type safe API bindings for a JSON API, and every time you use the wrong type for a value, they cave your skull in.

Sincerely, a frustrated Rust dev

skuzz ,

"Hey, it appears to be int most of the time except that one time it has letters."

throws keyboard in trash

Username ,

Rust has perfectly fine tools to deal with such issues, namely enums. Of course that cascades through every bit of related code and is a major pain.

RustyNova ,

Sadly it doesn't fix the bad documentation problem. I often don't care that a field is special and either give a string or number. This is fine.

What is not fine, and which should sentence you to eternal punishment, is to not clearly document it.

Don't you love when you publish a crate, have tested it on thousands of returned objects, only for the first issue be "field is sometimes null/other type?". You really start questioning everything about the API, and sometimes you'd rather parse it as serde::Value and call it a day.

skuzz ,

API is sitting there cackling like a mad scientist in a lightning storm.

skuzz ,

True, and also true.

Rednax ,

The worst thing is: you can't even put an int in a json file. Only doubles. For most people that is fine, since a double can function as a 32 bit int. But not when you are using 64 bit identifiers or timestamps.

firelizzard ,
@firelizzard@programming.dev avatar

That’s an artifact of JavaScript, not JSON. The JSON spec states that numbers are a sequence of digits with up to one decimal point. Implementations are not obligated to decode numbers as floating point. Go will happily decode into a 64-bit int, or into an arbitrary precision number.

Carighan ,
@Carighan@lemmy.world avatar

Relax, it's just JSON. If you wanted to not be stringly-typed, you'd have not used JSON.

(though to be fair, I hate it when people do bullshit types, but they got a point in that you ought to not use JSON in the first place if it matters)

RustyNova ,

As if I had a choice. Most of the time I'm only on the receiving end, not the sending end. I can't just magically use something else when that something else doesn't exist.

Heck, even when I'm on the sending end, I'd use JSON. Just not bullshit ones. It's not complicated to only have static types, or having discriminant fields

Mubelotix ,
@Mubelotix@jlai.lu avatar

You HAVE to. I am a Rust dev too and I'm telling you, if you don't convert numbers to strings in json, browsers are going to overflow them and you will have incomprehensible bugs. Json can only be trusted when serde is used on both ends

OsaErisXero , in Alcohol is my way to turn myself on and off again

'The wind keeps blowing my wifi signal away ' is more than enough information to diagnose the problem, and 'the computer forgot my password' is now a real thing since password managers started coming baked into browsers.

We are so far beyond parody of ourselves that i have no idea how the onion stays in business.

pineapplelover ,

Using Bitwarden must be too complicated for these guys or something.

invertedspear ,

I work with programmers and devops people who think BitWarden is too complicated. I get it when it comes to the product team and BAs, but even then.

30p87 ,

You misspelled KeePass

pineapplelover ,

If bitwarden is too complicated, keepass is out of the picture

WalrusDragonOnABike ,

How could you be simpler than keepass? Like, there's more advanced features, but for basic function, its just a password to access a list of passwords.

elvith ,

...its just a password to access a list of passwords.

Unless you never thought of, implemented, regularly did and regularly tested your backup of the database. Or... try to use it on more than one device - maybe even at the same time.

That's the main problem with KeePass. It's nice to have it offline, fully under your control and out of the cloud, but that comes with some responsibilities on your end. And now think of how the average user solves this. If you're tech savvy enough, KeePass is great!

WalrusDragonOnABike ,

You technically only need it on one device if you don't want to be able to copy/paste or use the autotype feature. Which works fine until you lose or break that one device or upgrade to a new one and forgot you needed to transfer your passwords or delete your database because you didn't remember what it was and wanted to free up space.

And Bitwarden has scary things like "self-hosting".

cmnybo ,

It works fine with Syncthing so long as you only ever have the database open on one device at a time.

eatham ,
@eatham@aussie.zone avatar

You can have it open on multiple at a time if you are not editing.

eatham ,
@eatham@aussie.zone avatar

Setup syncthing between the computers. If the person is not tech savy enough, they can always force the tech savy enough person they know to set it up for them. The are no problems with the tech, people just dont know it exists. Even if you don't or can't use syncthing (iOS users), you can just be stupid and put it in the cloud.

cizra ,

You misspelled KeepAss.

excel , (edited ) in Trying to understand JSON…
@excel@lemmy.megumin.org avatar

If you’re branching logic due to the existence or non-existence of a field rather than the value of a field (or treating undefined different from null), I’m going to say you’re the one doing something wrong, not the Java dev.

These two things SHOULD be treated the same by anybody in most cases, with the possible exception of rejecting the later due to schema mismatch (i.e. when a “name” field should never be defined, regardless of the value).

sik0fewl ,

Ya, having null semantics is one thing, but having different null and absent/undefined semantics just seems like a bad idea.

Username ,

Not really, if absent means "no change", present means "update" and null means "delete" the three values are perfectly well defined.

For what it's worth, Amazon and Microsoft do it like this in their IoT offerings.

0x0 ,

It gets more fun if we're talking SQL data via C API: is that 0 a field with 0 value or an actual NULL? Oracle's Pro*C actually has an entirely different structure or indicator variables just to flag actual NULLs.

expr ,

Zalando explicitly forbids it in their RESTful API Guidelines, and I would say their argument is a very good one.

Basically, if you want to provide more fine-grained semantics, use dedicated types for that purpose, rather than hoping every API consumer is going to faithfully adhere to the subtle distinctions you've created.

sukhmel ,

Except, if you use any library for deserialization of JSONs there is a chance that it will not distinguish between null and absent, and that will be absolutely standard compliant. This is also an issue with protobuf that inserts default values for plain types and enums. Those standards are just not fit too well for patching

paholg ,

They're semantically different for PATCH requests. The first does nothing, the second should unset the name field.

expr ,

Only if using JSON merge patch, and that's the only time it's acceptable. But JSON patch should be preferred over JSON merge patch anyway.

Servers should accept both null and undefined for normal request bodies, and clients should treat both as the same in responses. API designers should not give each bespoke semantics.

ooterness , in Surely "1337" is the same as 1337, right?

CBOR for life, down with JSON.

0x0 ,

If there are no humans in the loop, sure, like for data transfer. But for, e.g., configuration files, i'd prefer a text-based solution instead of a binary one, JSON is a nice fit.

MonkderDritte ,

What, no! Use TOML or something for config files.

0x0 ,

TOML

Interesting... me likes it.

frezik ,

What I'd like for a configuration language is a parser that can handle in-place editing while maintaining whitespace, comments, etc. That way, automatic updates don't clobber stuff the user put there, or (alternatively) have sections of ### AUTOMATIC GENERATION DO NOT CHANGE###.

You need a parser that handles changes on its own while maintaining an internal representation. Something like XML DOM (though not necessarily that exact API). There's a handful out there, but they're not widespread, and not on every language.

Michal ,

Yaml is more human readable/editable, and it's a superset of json!

themusicman ,

If you're moving away from text formats, might as well use a proper serialisation tool like protobuf...

mariusafa , in Coomitter be like

Please use Conventional Commits. Simple and easy to use. Plus it is very easy so combine with Versioning techniques like Semantic Versioning.

efstajas ,

Honestly, I've worked with a few teams that use conventional commits, some even enforcing it through CI, and I don't think I've ever thought "damn, I'm glad we're doing this". Granted, all the teams I've been on were working on user facing products with rolling release where main always = prod, and there was zero need for auto-generating changelogs, or analyzing the git history in any way. In my experience, trying to roughly follow 1 feature / change per PR and then just squash-merging PRs to main is really just ... totally fine, if that's what you're doing.

I guess what I'm trying to say is that while conv commits are neat and all, the overhead really isn't really always worth it. If you're developing an SDK or OSS package and you need changelogs, sure. Other than that, really, what's the point?

mariusafa ,

You can always water it down. The point is to have some order in the commits. Otherwise is just messy.

JackbyDev ,

Any standard that wastes valuable space in the first line of the commit is a hard sell. I don't see the point in including fix/feat/feat! just for the sake of "easy" semantic versioning because generally you know if the next release is going to be major or minor and patches are generally only only after specific bugs. Scanning the commits like this also puts way too much trust in people writing good commit messages which nobody ever seems to do.

Also, I fucking hate standards that use generic names like this. It's like they're declaring themselves the correct choice. Like "git flow".

mariusafa ,

You can always adapt to your how repo. But yeah, that's the point. If you can trust people to make changes on a repo then you should be able to trust them in using some kind of commit structure.

Generic names are probably used in order to crate a familiar, easy to remember, structurized commit format.

JackbyDev ,

The generic name I'm complaining about is "conventional commits", not "fix" and "feat"

UpperBroccoli , in Basically the extent of my IPv6 knowledge

It is incredible to me how some people think they make themselves look smart by wearing their willful ignorance like a crown.

thirteene ,

Cisco as a client tried to force ipv6 for their managed service and after an entire quarter of attempting to resolve it, we actually disabled it for their virtual address per their request. IPv4 has issues and IPv6 promises solutions, but it's not a stable platform yet. This appears ignorant but is based on truth. IPv6 is also eventually going to hit exhaustion with the frequency we spin up virtual machines, it's okay to skip a bad generation.

RobotZap10000 ,

IPv6 is also eventually going to hit exhaustion

Top-tier trolling right here.

thirteene , (edited )

I'm sorry but how? We have appliances with dockerfiles, micro containers for remote controls, extensive botnets of virtual machines, centuries in the future when we have expanded into the solar system and trillions of humans all having millions of unique applications with addresses, it's inevitable to hit a finite number. When every square meter of smart road has an routable address; we will likely be rewriting networking anyways. The only players pushing IPv6 transition are networking companies because a new standard requires new hardware.

RobotZap10000 ,

IPv6 has a total of 3.4E+38 addresses, and the entire surface area of the earth is 5.1E+14m². If we divide those two, then we find that you can have 6.7E+23 addresses for every square meter of your Saharan desert or Pacific Ocean smart roads. If civilization doesn't collapse due to nuclear wars or climate catastrophes and we actually do make it to the stars, I doubt that we would still be using the centuries-old and deprecated internet protocol.

IPv4, in contrast, has 4.5 billion addresses, and there are currently 8 billion humans on Earth. While not every of them lives in the parts of the world with internet, that number will most likely soon shrink to nearly nothing. When everyone and their dog has a smartphone, laptop, desktop, console, smart TV et cetera, that 4.5 billion doesn't seem nearly as big as it first once seemed to be.

This isn't a Y2K-scale problem that will summon armageddon if we don't solve it immediately, but our current solutions to the overflowing IPv4 addresses are well-polished hacks at best. IPv6 will ensure end-to-end connectivity for many years to come.

thirteene , (edited )

So, yes a few pieces of land mass tech such as smart road or solar paneling and we hit the theoretical limit of IPv6. And we currently dont need the addresses. So glad that you agree

where_am_i , (edited ) in Stop use docker

Weak one. Let's ideate on a better version

STOP DOING DOCKER

  • Virtualization was supposed to reduce the overhead, not create entire DevOps departments.

  • Years of containerization yet no real use over make clean; make build

  • Wanted to deploy your app in the "cloud" anyways for a laugh? We had a tool for it, it's called rsync

  • Let's run a virtual container in --privileged mode, so we can manage system resources from it -- Statements dreamt up by utterly Deranged

Look at what tech interviews have been demanding your Respect for all these years.
(These are real documentation examples for how a simple virtualization supposedly works)

????

??????

?????????

--

Hello, I would like to put 20 Terabytes of "images" into my /var/lib/, please!

They played us for absolute fools!

where_am_i ,
where_am_i ,

A good example of a similar meme: https://i.redd.it/uew0stv0mff61.jpg

ulterno ,
@ulterno@lemmy.kde.social avatar

https://i.sstatic.net/7GLcJ.png

The owner of the site does not allow hotlinking to the resource.

henrikx ,

And who's gonna stop us?

ulterno ,
@ulterno@lemmy.kde.social avatar

Error 1011: Access Denied

Cloudflare, apparently

And I feel like this is going to be my new Find My IP service.

dan ,
@dan@upvote.au avatar

Your version is better than OP

MonkderDritte ,
  • Let's run a virtual container in --privileged mode, so we can manage system resources from it

Seriously?

where_am_i ,

agree or disagree with facts and arguments.

Right now it's not clear if your reaction is pointed towards the privileged mode or towards its criticism.

MonkderDritte , (edited )

You don't support superposition yet?

...I mean, not running monitoring software as container, would be an idea.

MostlyBlindGamer , in Trying to understand JSON…
@MostlyBlindGamer@rblind.com avatar

Thanks for the transcription!

Surely Java can tell the difference between a key with a null value and the absence of that key, no?

I mean, you can set up your deserialization to handle nulls in different ways, but a string to object dictionary would capture this, right?

bleistift2 OP ,

Sure, Java can tell the difference. But that doesn’t mean that the guy writing the API cares whether or not he adds a key to the dictionary before yeeting it to the client.

agressivelyPassive ,

It can, but especially during serialization Java sometimes adds null references to null values.

That's usually a mistake by the API designer and/or Java dev, but happens pretty often.

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

That’s the thing though, isn’t it? The devs on either side are entering into a contract (the API) that addresses this issue, even if by omission. Whoever breaks the contract must rightfully be ejected into the stratosphere.

agressivelyPassive ,

That's exactly not the thing, because nobody broke the contract, they simply interpret it differently in details.

Having a null reference is perfectly valid json, as long as it's not explicitly prohibited. Null just says "nothing in here" and that's exactly what an omission also communicates.

The difference is just whether you treat implicit and explicit non-existence differently. And neither interpretation is wrong per contract.

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

I think we’re fully in agreement here: if the API doesn’t specify how to handle null values, that omission means they’re perfectly valid and expected.

Imagine a delivery company’s van exploding if somebody attempts to ship an empty box. That would be a very poorly built van.

Lysergid ,

Kinda, I guess we all can agree it’s more typical to deserialize into POJO where theres is no such thing as missing field. Otherwise why would you choose Java if you don’t use types. This great precondition for various stupid hacks to achieve „patching” resources, like blank strings or negative numbers for positive-only fields or even Optional as a field.

NigelFrobisher ,

You can always bind the JSON to a hashmap implementation, as that’s all JSON is anyway. It’s not pretty but it works.

maxinstuff , in Surely "1337" is the same as 1337, right?
@maxinstuff@lemmy.world avatar

I'll have you know all of my code is stringly typed.

onlinepersona , in Alcohol is my way to turn myself on and off again

The "what do we even pay you for?" is just like with projects:

"why isn't this finished yet?"
We have to add tests and make sure we've tried to cover our bases.
"that's not necessary, if it works now, just release it"
That's not-
"I don't care, I pay the bills"
Sure thing boss.
*a few weeks later*
"This thing doesn't work"
Yeah, it's what we wanted to test.
"Well why didn't you?"
😐

Anti Commercial-AI license

Hexarei ,
@Hexarei@programming.dev avatar

Somehow there's never time to do it right, but there's always time to do it again

barkingspiders , in Please stop

I am a little biased because I've been using Debian professionally for many years now but we don't deserve Debian. It is fantastically stable and reliable and makes an excellent platform for running your services off of. If you are at all interested in offering some time and energy to the open source community, consider adopting a Debian package!

A_Union_of_Kobolds ,

I'm thinking about a Linux laptop with FOSS software for my business actually, Lemmy's relentless horde of pro-Linux propaganda has won me over

(OK I've always liked FOSS I've just never taken the jump)

qprimed ,

ONE OF US! ONE OF US!

but seriously, modern FOSS distros (yes, debian is modern, damnit!) are amazingly good. you have an exceptionally high probablility of switching and staying switched.

A_Union_of_Kobolds ,

I'm looking forward to it!

Side note: anyone got recommendations for business software? I've started browsing the FOSS community here for ideas but I'm not sure what QuickBooks alternatives exist

F04118F ,

A quick Google shows Quickbooks to be cloud-based accounting software.
For FOSS accounting, GnuCash exists so you could try that (it can also run on Windows and macOS).
However, it's unlikely to have feature parity so if you like the added convenience that Quickbooks offers, see if you can use Quickbooks in a browser. Being cloud-based, they would probably build a browser version before building a Linux desktop app.
If they don't and you need to run a Windows desktop app on Linux, you can probably do this using Bottles (which uses Wine and Proton under the hood, the tech that enables the Steam Deck).

A_Union_of_Kobolds ,

I mean yeah, but specifically I'd like something built for Linux that's good for just basic spreadsheet stuff. I'm an electrician so I mostly just need to track jobs and accounts.

F04118F ,

Most of (what we call) Linux OSes are formally GNU/Linux. GnuCash is as close as it gets to "made for Linux". If you don't want an accounting-specific application, but just generic spreadsheets, check out LibreOffice.

I highly recommend GnuCash for accounting though: a fellow board member cleaned up an org's accounting by putting it all in GnuCash, where it was a bunch of error-prone Excel sheets before. That really made it easier to keep track and to do it right.

roguetrick ,

GnuCash

Huh, they've even got active development on an Android app.
https://github.com/GnuCash-Pocket/gnucash-android?tab=readme-ov-file

mexicancartel ,

Yeah I installed the android app just for fun.(I don't do accounting lol)

realbadat ,

Take a look at Apache OFBiz, Akounting, Frappe Books, and LedgerSMB.

fine_sandy_bottom ,

I'm an accountant.

The best accounting software will be the one your accountant uses.

When clients are on the same platform that I use internally everything just matches up and it's beautiful and elegant and amazing.

When clients are using something else it just doesn't fit our workflows and it's just more of a fuck around, which of course the client gets charged for.

JoMiran ,
@JoMiran@lemmy.ml avatar
nexussapphire ,

That's how I feel about arch, it's not "stable" but the few issues I've had they typically have it fixed with an update within hours.

I do have to clarify when I switched to arch from windows my entire computer was brand new and practically no other distro booted or if it installed it dumped me to a black screen.

After running my server on archlinux with the stable kernel for 7 years I did install Debian on my new server. Zfs just required an older lts kernel than I could get on arch without a ton of hassle. I didn't need it on my Mac mini with an external hard drive plugged in. From my experience it's not very different to maintain compared to arch but it's nice having built in automation instead of writing my own.

Man it's weird using a system of what I can guess is a bunch of bash scripts on Debian to set things up compared to just using the tools built into and written for systemd.

dan , (edited )
@dan@upvote.au avatar

it's not "stable"

"stable" in this case means that it doesn't change often. Debian stable is called that because no major version changes are performed during the entire cycle of a release.

It doesn't mean "stable" as in "never crashes", although Debian is good at that too.

Arch is definitely not "stable" using that definition!

nexussapphire ,

Yeah, I know the definition. I knew someone would quote it verbatim, someone always does. I quoted it because it's not the word I would use. I like scheduled or versioned releases better but someone always disagrees with me. As far as I've seen it's a major/minor version release cycle anyway.

otter , in Alcohol is my way to turn myself on and off again
@otter@lemmy.ca avatar

Oh, we do have a !talesfromtechsupport community (link). Looks like the mod is inactive and the community doesn't have that many subscribers

Maybe we can try making a new one here on programming.dev

graphito OP ,
@graphito@beehaw.org avatar

Touche, I get your point, indeed there's a lot of tech supporty posts however narrowing the community is only good when it has enough content

How about we wait out on fragmentation for flagship community of the instance until it starts to get at least 5 posts/day (30 posts/week)?


For lurkers hoarding high quality content for this community, this is your sign to press the button "New post"

apprehentice , in Surely "1337" is the same as 1337, right?

"1" + "1"

kionite231 ,

"11"

wesker ,
@wesker@lemmy.sdf.org avatar

int("11")

Skua ,

strings are in base two, got it

Rez ,
@Rez@sh.itjust.works avatar

Wouldn't the answer be "10" in that case?

joyjoy ,

1+1=11 means base 1

Eheran ,

How so?

CanadaPlus ,

1
11
111
1111
11111
111111

That's base 1. By convention, because it doesn't really fit the pattern of positional number systems as far as I can tell, but it gets called that.

Eheran ,

Oh, I get it, was reading as base 2 and confused by that. Essentially Roman numerals without all the fancy shortcuts.

Klear ,

Based

Skua ,

yes, if I could do maths

SpaceNoodle ,

That's unary.

andyburke , in Surely "1337" is the same as 1337, right?
@andyburke@fedia.io avatar

These JSON memes got me feeing like some junior dev out there is upset because they haven't read and understood the docs.

wesker ,
@wesker@lemmy.sdf.org avatar

"true"

kbin_space_program ,

Timing is about right for it to be a batch of newly minted CS grads getting into their first corporate jobs.

Valmond ,

Comments? Comments? Who needs comments?

RustyNova ,

You guys have docs?

0x0 ,

The code is my bible.

RustyNova ,

The schema is this SQL statement

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • kbinchat
  • All magazines