While at the same time closing all PRs indiscriminately, even the ones that are just trying to update the repo from its decades old JavaScript syntax (and get support in the comments)
I hate adware and nagware, but I respect it here. From the get-go you know this is a space where this person gets paid. This is just an extension of that.
Edge started itself on boot after a recent Windows update. It even had a little pop-up about how “helpful” it was to have it start right when my computer turns on so I can “get to browsing” faster. It’s never been set as my default. Uhg.
And then on next update go turn it off again, since they’ll enable everything again. Rinse and repeat for eternity. Or switch to Linux and be done with their shenanigans.
Run this after every update, specifically the tweak that uninstalls Edge. Makes things a lot easier. It also gives you the option to delay feature updates by two years and only install security updates on time.
What is the perceived problem, then? 99% of sites these days are all built with kits that support Firefox just as well as Chromium, the dev choice to not support or intentionally lock out Firefox is either just laziness (not wanting to deal with any potential problems or not given enough time to run full Firefox user tests) or incentive driven (middle manager has word from high manager that they can’t support firefox because highest manager makes bank from Chromium).
The technical limitation isn’t actually there in the modern web, it’s almost always a manufactured limitation. I think I’ve only ever encountered a single website that didn’t actually technically work on Firefox, and that was Weather Underground. Which they ended up fixing after 3 months or so.
Doesn’t that sound like a good description of a problem?
I think I’ve only ever encountered a single website that didn’t actually technically work on Firefox[…]
There’s gonna be a hell of a lot more of them, buddy. You’re gonna have to hang your cat on your balcony to get an estimate of future weather if you want to avoid using one of them how-are-these-even browsers.
Imagine yourself as a homosexual man in Iran (should be easy). Would you say that hiding that big part of you from everyone and even go as far as marrying a woman you don’t even like just not to arouse suspicion makes the problem disappear? Just the fact that you need to spoof your useragent to view a shitty website, the developer of which would (should) die under a car one day 🤞, is a solid proof that you will soon be that homosexual man in Iran.
My SO just had something similar pop up yesterday. She was running into weird errors on her Chromebook, so I had her change her user agent to Chrome on Windows. Everything magically worked. Hmm…
Eh I mean alphabet and Google do have legitimate reasons for antitrust lawsuits, but that’s independent of how shit Google search has become.
Anyway, for those who are fed up with the terrible results, use Ecosia. I’ve basically never needed to use anything else and the advertising money goes towards planting trees responsibly to rebuild ecosystems.
Anti-trust is not about seeking perfection, it’s a defense against abuses of power. That’s a good thing unless you like to be abused by the powerful, in which case lick some more boots.
Unreal, Unity’s primary competitor, doesn’t. Mainstream gamers seem to only know about the two. Anyway, it’s a meme. I use C# for exclusively boring corporate stuff, and will continue.
I doubt they went away from VBA. While I do use C# any time I can, I can't say the same thing for Excel. I do know there are ways to do interop, and it's not great. Office file formats and interop have always been... awful.
You can access the Excel scripting engine from C#, but this is more of a case of C# supporting Excel than the other way around. (And you will really not want to do it if you just have to read and save data in excel files.)
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.
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.
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.
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.
Unless you’re dealing with some insanely flexible schema, you should be able to know what kind of number (int, double, and so on) a field should contain when deserializing a number field in JSON. Using a string does not provide any benefits here unless there’s some big in your deserialzation process.
What’s the point of your schema if the receiving end is JavaScript, for example? You can convert a string to BigNumber, but you’ll get wrong data if you’re sending a number.
I’m not following your point so I think I might be misunderstanding it. If the types of numbers you want to express are literally incapable of being expressed using JSON numbers then yes, you should absolutely use string (or maybe even an object of multiple fields).
I am not sure what could be the example, my point was that the spec and the RFC are very abstract and never mention any limitations on the number content. Of course the implementations in the language will be more limited than that, and if limitations are different, it will create dissimilar experience for the user, like this: Why does JSON.parse corrupt large numbers and how to solve this
This is what I was getting at here programming.dev/comment/10849419 (although I had a typo and said big instead of bug). The problem is with the parser in those circumstances, not the serialization format or language.
I disagree a bit in that the schema often doesn’t specify limits and operates in JSON standard’s terms, it will say that you should get/send a number, but will not usually say at what point will it break.
This is the opposite of what C language does, being so specific that it is not even turing complete (in a theoretical sense, it is practically)
Then the problem is the schema being under specified. Take the classic pet store example. It says that the I’d is int64. petstore3.swagger.io/#/store/placeOrder
If some API is so underspecified that it just says “number” then I’d say the schema is wrong. If your JSON parser has no way of passing numbers as arbitrary length number types (like BigDecimal in Java) then that’s a problem with your parser.
I don’t think the truly truly extreme edge case of things like C not technically being able to simulate a truly infinite tape in a Turing machine is the sort of thing we need to worry about. I’m sure if the JSON object you’re parsing is some astronomically large series of nested objects that specifications might begin to fall apart too (things like the maximum amount of memory any specific processor can have being a finite amount), but that doesn’t mean the format is wrong.
And simply choosing to “use string instead” won’t solve any of these crazy hypotheticals.
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
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
This is understandable in that use case. But it’s not everyday that you deal with values in the range of overflows. So I mostly assumed this is fine in that use case.
Well, apart from float numbers and booleans, all other types can only be represented by a string in JSON. Date with timezone? String. BigNumber/Decimal? String. Enum? String. Everything is a string in JSON, so why bother?
Well, the issue is that JSON is based on JS types, but other languages can interpret the values in different ways. For example, Rust can interpret a number as a 64 bit int, but JS will always interpret a number as a double. So you cannot rely on numbers to represent data correctly between systems you don’t control or systems written in different languages.
No problem with strings in JSON, until some smart developer you get JSONs from decides to interchangeably use String and number, and maybe a boolean (but only false) to show that the value is not set, and of course null for a missing value that was supposed to be optional all along but go figure that it was
Oh come on. It’s called AI, as in artificial intelligence. None of these companies have ever called it a text generator, even though that’s what it is.
I get that it’s cool to hate on how AI is being shoved in our faces everywhere and I agree with that sentiment, but the technology is better than what you’re giving it credit for.
You don’t have to diminish the accomplishments of the actual people who studied and built these impressive things to point out that business are bandwagoning and rushing to get to market to satisfy investors. like with most technologies it’s capitalism that’s the problem.
LLMs emulate neural structures and have incredible natural language parsing capabilities that we’ve never even come close to accomplishing before. The prompt hacks alone are an incredibly interesting glance at how close these things come to “understanding.” They’re more like social engineering than any other kind of hack.
The trouble with phrases like ‘neural structures’ and ‘language parsing’ is that these descriptions still play into the “AI” narrative that’s been used to oversell large language models.
Fundamentally, these are statistical weights randomly wired up to other statistical weights, tested and pruned against a huge database. That isn’t language parsing, it’s still just brute-force calculation. The understanding comes from us, from people assigning linguistic meaning to patterns in binary.
Brain structures aren’t so dissimilar, unless you believe there’s some metaphysical quantity to consciousness this kind of technology will be how we do achieve general AI
Living, growing, changing cells are pretty damn dissimilar to static circuitry. Neural networks are based on an oversimplified model of neuron cells. The model ignores the fact neurons are constantly growing, shifting, and breaking connections with one another, and flat out does not consider structures and interactions within the cells.
Metaphysics is not required to make the observation that computer programmes are magnitudes less complex than a brain.
Neural networks are based on an oversimplified model of neuron cells.
As a programmer who has studied neuroanatomy and the structure/function of neurons themselves, I remain astonished at how not like real biological nervous systems computer neural networks still are. It’s like the whole field is based on one person’s poor understanding of the state of biological knowledge in the late 1970s. That doesn’t mean it’s not effective in some ways as it is, but you’d think there’d be more experimentation in neural networks based on current biological knowledge.
The one thing that stands out to me the most is that programmatic “neurons” are basically passive units that weigh inputs and decide to fire or not. The whole net is exposed to the input, the firing decisions are worked through the net, and then whatever output is triggered. In biological neural nets, most neurons are always firing at some rate and the inputs from pre-synaptic neurons affect that rate, so in a sense the passed information is coded as a change in rate rather than as an all-or-nothing decision to fire or not fire as is the case with (most) programmatic neurons. Implementing something like this in code would be more complicated, but it could produce something much more like a living organism which is always doing something rather than passively waiting for an input to produce some output.
And TBF there probably are a lot of people doing this kind of thing, but if so they don’t get much press.
Pretty much all artificial neural nets I have seen don’t do all or nothing activation. They all seem to have activation states encoded as some kind of binary number. I think this is to mimic the effects of variable firing rates.
The idea of a neural network doing stuff in the background is interesting though.
The fact that you believe software based neural networks are, as you put it, “static circuitry” betrays your apparent knowledge on the subject. I agree that many people overblow LLM tech, but many people like yourself grossly underestimate it as well.
Language parsing is a routine process that doesn’t require AI and it’s something we have been doing for decades. That phrase in no way plays into the hype of AI. Also, the weights may be random initially (though not uniformly random), but the way they are connected and relate to each other is not random. And after training, the weights are no longer random at all, so I don’t see the point in bringing that up. Finally, machine learning models are not brute-force calculators. If they were, they would take billions of years to respond to even the simplest prompt because they would have to evaluate every possible response (even the nonsensical ones) before returning the best answer. They’re better described as a greedy algorithm than a brute force algorithm.
I’m not going to get into an argument about whether these AIs understand anything, largely because I don’t have a strong opinion on the matter, but also because that would require a definition of understanding which is an unsolved problem in philosophy. You can wax poetic about how humans are the only ones with true understanding and that LLMs are encoded in binary (which is somehow related to the point you’re making in some unspecified way); however, your comment reveals how little you know about LLMs, machine learning, computer science, and the relevant philosophy in general. Your understanding of these AIs is just as shallow as those who claim that LLMs are intelligent agents of free will complete with conscious experience - you just happen to land closer to the mark.
You got it admit, it is a good suggestion. It just wasn’t the right one. But it is trained well enough to correlate left and right together. Since those are very commonly associated together it is certainly a logical choice.
Ah, come-on, why do you think Eliza could do that 60 years ago?
(It couldn’t. It’s at most 40 years old technology, and way more likely just 30. Even though you could program Eliza to do something like this, it would be way too specific for any use.)
Within IDEs people go out of their way to install Intellisense so that "shit randomly pops up while they're typing." There are companies whose whole existence depends on people wanting that to happen.
Wdym, are you expecting me to explain something using nothing at all‽
This is really very relatable, some projects lack both clarity and documentation, and trying to make sense of internals from the examples is a mess of a process
Funny you should mention GitHub actions. It’s exactly one of those tools where I was like “this seems cool. I would like to use it, but I don’t even know what for…” and then when I tried to look into it some more I was just more confused than before.
I mean I was just going to put them on my feet… That’s what they’re for, right? RIGHT?!
Oh god, now I don’t know either…
Nothing is certain!
Reality is starting to crumble!!!
If this language feature is annoying to you, you are the problem. You 👏are 👏 the 👏 reason 👏 it 👏 exists.
I worked in places where the developers loaded their code full of unused variables and dead code. It costs a lot of time reasoning about it during pull request and it costs a lot of time arguing with coworkers who swear that they’re going to need that code in there next week (they never need that code).
This is a very attractive feature for a programming language in my opinion.
PS: I’m still denying your pull request if you try to comment the code instead.
❗️EDIT: A lot of y’all have never been to programming hell and it shows. 🪖 I’m telling you, I’ve fixed bayonets in the trenches of dynamically typed Python, I’ve braved the rice paddies of CICD YAML mines, I’ve queried alongside SQL Team Six; I’ve seen things in production, things you’ll probably never see… things you should never see. It’s easy to be against an opinionated compiler having such a feature, but when you watch a prod deployment blow up on a Friday afternoon without an easy option to rollback AND hours later you find the bug after you were stalled by dead code, it changes you. Then… then you start to appreciate opinionated features like this one. 🫡
I mean, yeah that kind of stuff absolutely should not be in production. However, it’s easy to see how it could be annoying while testing something while working on it. It being annoying doesn’t make it a bad feature, just as finding it annoying doesn’t make you a problem imo.
It is VERY annoying when you’re hunting for a bug. For example, when you comment out a function call to debug an issue, the compiler might suddenly complains about unused variables, so you’ll need to comment them out as well. Repeat several times and you’ll start having an urge to smack the monitor.
That’s a problem with your workplace, not the language nor OP.
You could have a build setting for personal development where unused variables are not checked, and then a build setting for your CI system that will look for them. It gives you freedom to develop the way you want without being annoyed when you remove something just to test something, but will not merge your PR unless the stricter rules are met.
I concur, it is a problem with that workplace. (In this case, OP is just sharing a funny meme. I wouldn’t suggest this meme means they’re a problem. I could have made this meme and I love the feature.)
Developing on a team at a company is like the “Wild West.” What’s considered to be acceptable will not only vary from workplace to workplace, but it can also fluctuate as developers and managers come and Go. Each of them have their own unique personality with their own outlook on what “quality” code looks like. (And many of them do not care about code quality whatsoever. They just need to survive 1-2 years there, make management happy with speedy deliveries, and then they can move on to the next company with a 30% pay bump.)
Having experienced working with developers who frequently filled with code base with unused code while having no control over who will leave or join as a contributor to the code base, I think features like this make for a more sane development experience when you’re developing with a team of seemingly random people that you never personally invited to contribute to the code base.
will not merge your PR unless the stricter rules are met.
This doesn’t fly when you work in big corporate and the boss doesn’t care about the code meeting stricter rules. “A working prototype? No it’s not- that’s an MVP!Deploy it to production now and move onto the next project!”
Why in the world would you want to develop something that doesn’t follow the coding rules required by your org, just so you can go back and fix everything before submitting a PR? That’s just extra work.
Because you want to know if the first half of the code works at all before you write the whole second half.
Finding all the bits that will be used by the second half and changing the declarations to just expressions is a bunch of extra work. As is adding placeholder code to use the declared variables.
I’m having a hard time envisioning a situation where testing my code requires a bunch of unused variables. Just don’t declare the variables until you’ve started writing the code that uses them…
Most of the time you don’t write the code, you change it.
I had tons of situations where I wanted to test deleting a code block which just happened to use an imported library, which the compiler is now complaining about because it’s no longer being used.
If that’s the problem, then I would just use something like goimports to auto fix the imports every time I hit save. I never even see those errors so they don’t bother me.
That’s what warnings are for. The jokes about programmers ignoring warnings are outdated - we live in an age where CIs run linters and style checkers on pull requests, there is no reason for a CI to not automatically reject code that builds with warnings.
Warn in dev, enforce stuff like this in CI and block PRs that don’t pass. Go is just being silly here, which is not surprising given that Rob Pike said
Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods. I grew up and today I use monochromatic numerals.
reading my code after being up for 18 hours and having my eyes glaze over trying to parse the structure of my monochromatic code but then I remember Rob Pike said syntax highlighting is juvenile so I throw my head against that wall for another 3 hours
I agree that golang is being dumb when you don’t even have the option to tell it that this is a testing env or something. But the thing about syntax highlighting is not the same. One is about handholding the developer so much that it makes it even more difficult to develop, and the other is a completely optional feature that is so uselful and non intrusive that even wizardly editors like emacs use it.
<span style="color:#323232;">func main() {
</span><span style="color:#323232;"> test := true
</span><span style="color:#323232;"> _ = test
</span><span style="color:#323232;">}
</span>
Perfectly cromulent code.
If they really wanted to avoid people having unused variables, they should have used a naming convention. Any variable not prefixed by “_” or “debug” or whatever has to be used, for example. Then block any code being checked in that still contains those markers.
What’s a situation where you need an unused variable? I’m onboard with go and goland being a bit aggressive with this type of thing, but I can’t think of the case where I need to be able to commit an unused variable.
You probably wouldn’t be committing this, unless you’re backing up a heavily WIP branch. The issue is that if you’re developing locally and need to make a temporary change, you might comment something out, which then requires commenting another now-unused variable, which then requires commenting out yet another variable, and so on. Go isn’t helping you here, it’s wasting your time for no good reason. Just emit a warning and allow CI to be configured to reject warnings.
I will need it two minutes tops. If I don’t use it by then, I’ll delete it, especially if it gives a warning like Rust does. But this? It just gets in the way.
I have a use case in Powershell: my company has a number of scripts that are minimally but importantly customized per-location, and I have an otherwise unused “SiteId” variable where I keep the location name for that specific script for a quick sanity check when I’m looking them over for any reason. Not necessary, but useful to me. Probably wouldn’t do the same thing in a compiled program, but I can at least see where someone might want something similar.
It costs a lot of time reasoning about it during pull request and it costs a lot of time arguing with coworkers who swear that they’re going to need that code in there next week (they never need that code).
You should go to your team leader and ask them to enforce a coding standard. I agree with other commenters that said this should be a warning instead of an error.
I was working for a team that did quality control on the code of an entire financial group and it’s still amazing to me the shit we let through.
I feel annoyed even having compiler warnings in my code and here we were downgrading errors into warnings so the code would go through, or adding rules exceptions for a program so the team responsible could push a hotfix to prod… It’s all shit. All the way down.
Make your MIT-licensed library big enough that the corpos use it, then switch it to AGPL just before you add a really important and tricky feature they’ve been waiting for.
I would have bought it if they said ifnot instead, it’s the same number of characters and wouldn’t require a major parser overhaul to support keywords with a ’ in the name.
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.