Hacker News new | past | comments | ask | show | jobs | submit login
Stack Overflow Developer Survey 2022 (stackoverflow.co)
421 points by klez on June 22, 2022 | hide | past | favorite | 364 comments



Docker going strong :-)

Unsurprising, really. The usefulness of it cannot be overstated.

Doesn't even matter if its used anywhere in the deployment chain; simply having the ability to pull up a replica of almost any *nix environment on my laptop in mere seconds, using it for tests, and then throwing it away resetting it again in mere seconds is beyond awesome, no matter if what I'm working on then goes into a huge complicated deployment chain, or is shoved onto some on-premises, zero-abstractions, baremetal server.

And how is it all configured? Plain text files. How is it controlled? Command Line. Meaning I can script it every way I want, using the tools I already have and use. Doesn't get in the way, doesn't demand that I work around it...it works with me and my tools in the same way they already work together.

Oh, and of course, good bye and good riddance to the days when I had to install and configure local RDMS for tests. Everything I use has an official image, so I just write some small setup script, a Dockerfile, knit everything together in a docker-compose.yml and presto, done: Application stack is up and running.

To me, Docker is as essential as my text editor these days.


I find for builds especially it's invaluable. I have a Makefile that builds Docker images and runs build processes for all 4 supported versions of Debian, 3 LTS versions of Ubuntu, RHEL7, and Fedora 35 and 36. It builds and packages the software on all of these, giving me debs and rpms for every relevant distro ("relevant" meaning distros used for servers or workstations for any of our employees and clients).

I then have another set of docker images for making package repositories and signing everything.

I do have a lot of mostly-redundant dockerfiles in some places, but in others I've managed to leverage m4 to reduce the redundancy (though I'm trying to keep it as slim as possible to avoid the pain of turning everything into a convoluted set of impossible-to-maintain macros).

Before this, I was using Vagrant and Ansible for builds, which was slow, memory hungry, and frustrating to debug. Not to mention that dependencies that needed to be built statically couldn't be easily cached, which comes out of the box with Docker.


> Unsurprising, really. The usefulness of it cannot be overstated.

Furthermore, in addition to the points you mentioned, it also lets us:

  - trivially remap ports to whatever we want (and expose whichever we'd like to the outside)
  - easily set resource limits, so your instance of MariaDB doesn't bring the whole server down and make it unresponsive
  - abstract away storage, in case you want a specific directory for your backups instead of following HFS (say, just have /app, treating the rest of the server as throwaway)
  - perhaps most importantly, your host OS is now separate from the actual containers that you are running, updating/redeploying either becomes a breeze
Recently, I actually decided to build my own containers for all of my personal use cases and it's been an interesting experience: I base everything on a LTS version of Ubuntu and just use apt for getting all of the runtimes (Node, Java, .NET, PHP, Ruby, Python, ...) for my own software, and so far it's a nice experience.

All I need is the base Ubuntu image from Docker Hub and the rest is up to me and the regular mirrors/repositories for the software packages in question, most of which can be stored on my own Nexus instance as needed, as well as the whole build process is primarily driven through Gitea, Drone CI and a few "servers" (repurposed old computers with passive cooling) that I have on my desk.

Though for now I also use Bitnami images for databases and such, which are also decent and which I largely just cache on my end: https://bitnami.com/stacks/containers

So what I'm trying to say, is that there's a lot of flexibility that you can enjoy, both in making your own "templates" for web servers, programming languages, build toolchains etc., as well as you can grab pre-made stuff that other people have made, be it on Docker Hub, someone's Nexus/Artifactory/Harbor instance or another registry out there.

Docker and other OCI compatible tools have largely achieved the sort of adoption and widespread usage that projects like Nix and Guix could also benefit from.


I sorta learned a little about Docker+Kubernetes on a previous project, and it was a nightmare. I don't have a good mental delineation between the two products because the whole thing was a trainwreck, though I'm inclined to think that 95% of the horribleness was K8s.

That said, I also don't remember the Docker documentation to be very good. For someone that doesn't work with it professionally, what's a good starting point to learn Docker well?


Are you sure you need to learn Docker well? I ask this because I use docker on a daily basis, but I rarely actually “use” docker. What I mean by this is that we deploy everything using docker, but it’s handled by our DevOps pipeline and the “docker” part is really just a dockerfile that is typically given to us by our cloud vendor. I think the only thing I’ve changed in ours for nodejs, c#, Python and go images is the image version they get build with.

Lets say I want to write a typescript microservice and deploy it to azure as a serverless functions app. I’ll fork our bare metal nodejs project for azure functions, which is essentially the standard azure cli “create nodejs function -typescript -docker” (this isn’t correct syntax but you get it) with the linting and ts-compiling rules we use on all our projects (and an updated image version in the docker file as mentioned). While I build things and run them locally, I don’t use docker, it’s not until I actually want to deploy to azure and setup the release pipeline and trigger it that docker comes into play, but those DevOps steps (also streamlined) aren’t really docker heavy as they simply use the dockerfile that was mostly provided by Microsoft.

I can certainly build and run my micro service as a docker container locally, but I don’t need to. In fact the only times I did was when it failed to build during the azure pipeline but it turned out to be the azure container registry access controls every single time that happened, so these days I almost never “use” docker. In fact I use it so rarely I almost always have to Google command lines.

I know people use docker in many different ways, and that many use things like docker compose, but my point is that you can deploy everything you build with docker and never actually have to care much about docker itself. So maybe you should ask yourself if you really need to learn docker good before you spend too much time on it.


Though k8s works with docker, you shouldnt need to use it off the bat, especially in the beginning without having lots of experience with docker itself. Most projects dont need k8s and i personally have never used it.

I agree the docker docs are lacking, i basically learned everything by googling stuff, stack overflow and reading some blog posts


Use docker compose, it's simply composing docker run parameters as a configuration file. What I think game changing feature is docker exec -it, enable you to connect and execute commands inside container and debug from it.


> Unsurprising, really. The usefulness of it cannot be overstated.

meh, I can count on my hand the times it was useful to me.

oh, and having to deal with docker desktop is not fun


> oh, and having to deal with docker desktop is not fun

To stay sane, just forget it exists until it crashes irretrievably, then reinstall it and repeat. Containers and images being disposable is the whole point anyway.


Well yeah, Docker + Windows isn't the best experience. I recommend WSL if you must go down that route.


It used to be a bit flakey pre-WSL2 integration ~2-3 years back - it's been absolutely rock solid for me on Windows since then, just like on Linux.


You don't even have to bother with Docker Desktop these days, you can start it in `/etc/wsl.conf` directly with `service start docker` and forget about it, it'll start with the VM. I think this is a rather new feature though.


Same, I can't even remember the last time it's crashed for me or anybody on my team.


Unless docker desktop is installed I have no idea how to deal with the changing IP of WSL which is just painful.


I wish installing Docker inside WSL2 wasn't so problematic - the networking part to make it work is messy


fwiw you can run docker without docker desktop now https://www.swyx.io/running-docker-without-docker-desktop/


Yeah at work on Mac docker desktop isn't fun. At home on Linux Docker is easy. How Mac won mindshare, woof.


Not denying the potential usefulness, but I've seen a lot of time get lost to faffing around with Docker when it completely added nothing at all.


And yet here I am having used Docker like 3 times. I've used Heroku, Nix, or even just versions through asdf if necessary and been fine—though Nix is the only truly reproducible option here. None of these options involved containers or overhead.


What overhead?


The virtual machine?


What virtual machine?


Docker requires a Linux VM when not ran on Linux.


> when not ran on Linux

Well there's your problem..

In all honesty, I've used Docker Desktop on WSL2 quite a bit too and the overhead is very minimal (additional memory consumption mostly).

Avoiding a transformational technology like containers (OCI is used by multiple implementations now, like containerd, podman etc) because of this seems a little silly to me.


... unless you're running Windows containers (on Windows).


> ... unless you're running Windows containers (on Windows).

But aren't most Windows containers a bit on the heavier side? And don't you then need to also use the whole MS server setup for deploying your stuff to prod, which is a no-no in certain settings?

Edit: provided that you can even find an image for the software you need (from an official provider/latest versions/with proper instructions and source). Consider the following:

  - https://hub.docker.com/search?q=postgres&operating_system=windows
  - https://hub.docker.com/search?q=postgres&operating_system=linux
Then again, WSL2 is pretty okay for running *nix based OCI containers, apart from the file permissions (SSH keys and anything like that is a pain, especially with bind mounts).

Even a Hyper-V VM was a decent choice, though any sort of a performance overhead was also negligible - I've heard the story being worse on OS X in regards to disk performance, though not sure whether that's still relevant. The worst thing about Docker on Windows has generally been the weird bind mount syntax for the Windows file system paths (not too bad, to be honest) as well as the whole file permission thing, as well as the Hyper-V approach eating some of your RAM in the background.

Apart from that, it's mostly passable, though Docker/Podman on *nix is comparatively painless. Though I could say that about most development ecosystems, from PHP to Java. Windows is just generally better for certain classes of desktop software and gaming, *nix is generally better for most development related tasks and servers. /opinion


They are somehow heaviear, but you can run them in process isolation mode and then it is the same as in Linux.

The caveat is that the images need to be in sync with the kernel version.

And they are still usefull, there is still plenty of Windows based servers that aren't going to be ported to UNIX environments anytime soon.


This is the opposite of my experience. Docker is a headache to work with for zero tangible benefit. It slows development down by adding an unnecessary layer to the stack.


You didn't write anything about your experience or your knowledge level, so it's impossible to conclude anything useful or tangible about your experience. Wouldn't you agree?


I’ve worked with full stack Rails for 10+ years. Built and sold two startups of my own, and wrote the code for two others that were acquired, among other things. I have a ton of practical experience on the topic.


> simply having the ability to pull up a replica of almost any *nix environment on my laptop

Umm, I struggle with that. I have Ubuntu machines that run in production. They are VMs that run systemd for some stuff and Docker containers for others. The only way to (easily) replicate such machines on my laptop is via VMs (e.g., Vagrant + VMware), not via Docker only.

I do use Docker a lot... Inside VMs.


One of my updated “Joel Test” job requirements is “do you give each developer access to a dev cloud account with fairly wide guardrails.”

I would much rather just spin up all my resources on a dev cloud account using CloudFormation/Terraform, and spend them down when I’m done.

Before I get (rightfully) called out. Yes I work at AWS now. But I also found that just as appealing three years ago when I worked at a 60 person company.


Except when it comes to paying for it. Developer tooling is still a dead end business model if you are not subsidized by a bigger company.


It is surprising how every other profession manages to pay for their work tools, only specific classes of software devs are so much against paying for anything, yet they will gladly have a means to also pay their own bills.


For me, it's due to the terrible process everywhere I've worked for getting approval to buy anything. In some cases, it's even against company policy to pay for a tool out of my own pocket. One product I needed was $10 but the person who was put in charge of all software purchasing decided to try to negotiate a site license with the vendor for a lower price and only for each seat used. She was basically trying to haggle over $10, on the off chance at some point in the future more people would want to use the tool and then the company could pay $8 or some other amount less than $10 per seat. It took months and the involvement of my manager, his manager, and a C level executive to get the $10 purchase approval to go through. I would have paid the $10 myself but that was a "zero tolerance" fireable offense.

I get why companies are concerned about having improperly licensed software on their machines, as the consequences can be great, but too many have gone too far in the opposite direction, making purchasing anything a long and convoluted process.


Seriously. Look at how much blowback $10/month for Github Copilot got. $10! I don't know everyone's financial status, but from where I'm sitting, $10/month for that is cheap.


It's about the value, not the cost. You can get VSCode for free, or JetBrains Professional IDEs for about $10/month (after 2nd year). People just don't agree that Copilot has value comparable to those yet.


> People just don't agree that Copilot has value

You can stop it there.

All the comments I've read complaining about the price were saying basically that. One even explicitly said that if it was cheaper he'd buy it for fun, but since it provided no value, he wouldn't... just to get a thread of people complaining that the price shouldn't change his opinion.


Back of the envelope this though. Lets say a programmer makes $60/hr, or $120k/yr. Lets say Copilot replaces 5 minutes of googling around to find the right stack overflow answer and copy and paste and adapt it to fit. Copilot just has to do that twice in a whole month to be worth $10/month.


I don't disagree, but as I said, it's about comparative value to other tools. Any first world developer can afford $10/month.

That being said, if you are a full time employee you won't magically earn an extra $10 a month for using Copilot, you will only be more productive. It will benefit your employer and Copilot doesn't have an enterprise subscription yet.


I think it’s largely because copilot is hardly worth it to use for free. I found it to provide negative value and waste my time with its correct looking but ultimately incorrect suggestions.


It blows my mind that 72% of developers love Slack. I absolutely hate it with a passion. It's like someone walking up to your desk, except we made it way easier because they don't have to get up and feel the social pressure of waiting for you to stop what you're doing and take off your headphones.


Does your company culture expect immediate response? I like it because we treat it like short-form email, maybe with a slight expectation of quicker response. If I send you an email, it will have some detail and please get back to me within a few days. If I send you a slack message, I expect a sentence or two and a response today or tomorrow.


I've never worked anywhere that didn't expect an immediate response from Slack. If they wanted a delayed response, they'd send an email.

Worse yet, if I try to enforce that myself by not responding, there is a whole conversation in the channel before I get there and then I have to respond to all the messages in a mess of threads or some big long response block.


You need to change your company's culture.

My work uses Teams with the expectation that a message is async. Most people respond whenever they finish their current task or meeting. Response times would generally looks like a bell-curve with the peak around 30 minutes. Some messages have the expectation of requiring an immediate response (e.g. reception who may be relaying information from an external phone call).

Typically when something is actually urgent, we click the call/video-call button instead of sending a message.


Teams is usually:

Hello

Hi

(No response for an hour)

Hello

https://nohello.net/en/


I’m adamant about not responding to just “hello”. So far it’s never been an issue — eventually they send the question.


And you think they would learn not to do that, but they never do.


I think part of it is cultural. At $PREVIOUSJOB we used a lot of Indian outsourced devs and they were quite big on the "hello" thing. Could have been what the outsourced company told them to do, too, but they did stop after being asked to, mostly. QA seemed to hold on to it. They were predominantly women, so not sure if that played into it.


> You need to change your company's culture.

How would one do that exactly? Like I said, I could just not respond right away, and then I either have to respond to a whole discussion later in a mess of threads, or ignore it, but either way I'll get labeled a bad communicator and hard to work with.


> How would one do that exactly?

Don't talk to each team member one-on-one, that'll never work.

Talk to your manager, make it clear in terms they understand. That doesn't mean complain or whine to them as that will just push them away from the point that you're trying to make.

You need to REALLY make it clear to them not in your terms, but in their terms. Show them that every time they do this your productivity goes down. Show them that if it's happening to you, it's also happening to others too. Show them the research that says interruptions are bad. Show them the communication models that other companies are using that work.

Your manager isn't going to do the research for you, they're too busy managing others. The only thing that managers are trying to do is to reduce the complaining to a minimum. If that means the minimum is only you complaining, then they are going to optimise for only you complaining. If you actually show them the research, show them a list of rules, show them a plan that can be implemented, then you complaining is always going to be the minimum. You need to show them that if they follow these steps, then the complaining will essentially go down to zero, only then will they act on it.


With that attitude you will. Honestly though you need to find a communication pattern that works for you and your teammates. In most situations if you communicate your needs clearly you won't get much pushback. For instance closing your instant message and email except for periodic checkins and letting people know why might improve the situation.


You could start small and block off a certain chunk of time during which you won’t respond. And communicate that to people ahead of time and the reasoning for it. Also set your statutes msg during that period. It could catch on and more people could similarly block off certain periods.


I find that even where immediate responses are not required where I work now (and, honestly, everywhere I've ever worked), the Slack status works pretty well for when I'd like to have some "me time". I usually set it to something business or "current fad" friendly, like "in my flow state - not monitoring slack or email".


Start advocating for the basecamp model. [1]

[1]: https://basecamp.com/guides/how-we-communicate


I don't have an answer for you, but wanted to say I sympathize with what you are saying.

People who hand wave and say "just change the company culture" must not have been in your shoes.


> I've never worked anywhere that didn't expect an immediate response from Slack.

Interesting; I've never worked anywhere that DID. Wonder if it's a regional or company domain thing.


You know you set the expectations. Is it firing offense if you reply in 30 mins.


I think a lot of the value in both Slack and Teams is the ability to seamlessly switch from async to real-time conversation, up to an audio/video call. Async should definitely be the default expectation though. Setting status flags can be useful for this. If they want and need an immediate response, they should call me.


I very much have “deep work” time where I turn off everything. If there is a house on fire emergency, they can use our paging app that can bypass DND on the phone.


Could someone explain how you don’t lose track of a message irretrievably in Slack if you don’t respond to it right away? There doesn’t seem to be any way to ever find anything again without looking through every single channel and DM conversation once it’s read — no way to see every message you’ve received by date or anything like that. And DM conversations just drop off the sidebar entirely if you have too many of them.


  > Could someone explain how you don’t lose track of a message irretrievably
  > in Slack if you don’t respond to it right away?
The idea behind "no immediate reply" isn't that you read a message and reply to it later. The idea is that when you're ready, you open Slack, then read and reply to messages. You then close Slack, go do a task, then come back to slack.


Honestly a lot of "Remind me in X"


Right click the message and choose "remind me later"


I dislike the split in Teams between chat and the Teams tab, but at least it has the Activity stream. Also you can mark messages as Unread so you can go back later.


> It blows my mind that 72% of developers love Slack.

Just wait until you've been forced by your company to use Teams instead, then you'll find yourself advocating for Slack even if you hate it too.


Ironically, because Teams is so much harder to use - I actually like it more than Slack.

It creates just enough friction for people to not spam chat-messages all day with emojis.


100%... just switched to a company that uses Teams, hate it already.


Ah, this brought back "fond" memories of trying to reverse engineer a 3-way chat in Teams, and trying to figure out why I didn't understand the conversation. It turned out that Teams would have a kind of eventual consistency for messages, where one or two lines would arrive a few hours later, and pop into existence in the middle of a conversation (three pages up), without notifying you that something had happened. Because, presumably, you had already read messages with a later creation date...

Granted, this was pretty rare, but we noticed it happening at least 2-3 times in a 6 month period. In those cases it caused enough of a headache that I had to start worrying about whether I was seeing the entire discussion, which is a wonderful property to have in a chat tool.


Agree, slow and a resource hog.


My company basically uses slack as an improved email. We don't expect immediate responses unless we specifically tag someone and say ASAP or whatnot. Works out well.


How does someone know the message says ASAP or that they've been tagged unless they're monitoring slack constantly?


turn off notifications for everything except mentions


What does Slack offer that’s an improvement over email for non-realtime conversations?


that I can customize what I get notifications for. I can silence everything but mentions. So if there's an outage or someone has been waiting for a long while on something they can @ me, but if they just want to have a discussion publicly and let people review it at their leisure, they can do that as well.


Any e-mail client with rules can do that and much, much, much, much more, though. Slack only offers three primitive options for notification filtering, and they can only be applied at two levels.


That's because you're using Slack wrong. You push notifications for a particular topic or event into a Slack channel. You then set notification settings on each of those channels.

Slack isn't the filter, it's the data store and UI.

If you want different types of notifications.. I'd just notify on the urgent stuff and then manually view particular topics at your leisure.


Have you tried the alternatives?

With the evil spawn of spaghetti code that Teams is and its cancerous spread through office offerings I'd take Slack or Discord any day.


I would rather prefer Discord myself but it seems it's not that popular in corporate settings.


Yeah Discord is a pain to manage in corporate settings. No SSO, needing to play footsie with Alice creating an invite link so that Bob can join, and only then Alice can attach the correct roles. If people don't use usernames that correspond to their real-life names, then auditing access to ensure users and roles are cleaned up after real-life changes is a huge pain.

Discord is great for small start-ups to help create a virtual office space for remote work, but it really doesn't scale well.


My interpretation: Devs like the experience of interactive instant messaging without any hassle and simply equate Slack with that experience. Slack is really pervasive in our industry despite its subpar experience for developers.

I largely agree with 72% of developers here, although I would gladly swap it out for something better. The notification scheme is good enough. I don’t like to be disturbed a lot, so I disable sound notifications, and just notice the red dot in the browser tab occasionally (which I promptly ignore if I don’t want to stop and read messages).


Note that all of these percentages are a little misleading. It's the percentage of developers who responded to the question, not the percentage of developers who participated in the survey.

For the slack question, it's 72% of 34,440 responses (24,635 love vs 9,805 dread), or about 36% of the 70,000 participants (with ~50% of participants giving no response and I'm assuming therefore being neutral or having no experience.)


I think you can disable notifications, so you're not disturbed


You can, but people get annoyed if you don't respond quickly, because they expect a quick response, otherwise they would send an email.


This is really a social problem, not a technical problem. The technology for instant communication exists and it isn't going to disappear. Your coworkers need to learn to give people space to do their job. Sorry that's scant comfort if that's what your workplace is like.


It's a product marketing problem, specially Slack's. They market it as an instant communication product, but then they put threading and other asynchronous type modalities into it.

I have no problem with instant chat apps. I can set myself as away and people know not to expect a response.

But in slack it's a group conversation with the expectation of instant response, because that's how they market it.


compared to all the spam, antivirus, and other filters corporate mail goes through it is instant


Or is it a technical problem that creates a social problem, thereby making the technology the problem?


But… you don’t have to respond to slack in real time. I just check slack a few times a day. It doesn’t interrupt me because I don’t let it.


As Gerald Weinberg said on consulting "It's always a people problem". People expect Slack (or whichever tool) to solve problems that are people problems. If your company expects you to be glued to Slack and respond instantly, that is a culture problem at your company, and needs to be addressed as such.


It's Microsoft Teams without 80% of the bugs.


Does Teams have bugs?

In my experience it either works, or the button for the feature just doesn't exist on that device.


> Does teams have bugs?

Yes.

I mean, everything has bugs, but it's significantly worse than slack. Here's a short list of my weekly irritations:

- shared images sometimes give you a placeholder empty box while loading.

- shared images sometimes never load from their shared placeholder boxes.

- when auto updates happen, they sometimes result in teams just being broken and has to be explicitly killed before it can restart

- the `code` format tags don't work in chats, only in 'teams' (maybe this is a feature, who knows?)

- sometimes the UI doesn't load and you just get a white empty page instead of a UI, despite being 'online' and receiving notifications.

Not everything, all the time, but consistently noticeably buggy.


I have not experienced any of these bugs. My shared images always load, my automatic updates always work, my code format tags work in chat, the autoupdate is so invisible that I've never noticed it, and the UI always loads.

One thing you listed I do have, but I don't consider it a bug:

> - shared images sometimes give you a placeholder empty box while loading.

That's to let you know that it's loading, and to expect an image to appear.

I use teams on MacOS (intel), Windows, and Android.

Are you on some weird or old beta version?


I discover new bug every week, and my colleagues are also treating it as "working as expected" when they find only a few bugs. You are extremely lucky to completely avoid bugs in Teams.


I think your experience is unique in this regard. Teams is well known to be extremely buggy on MacOS - I've experienced everything the OP has.


Are you currently experiencing those issues?

What's your version of MacOS and Teams?


I've experienced so many Teams bugs over the past few years that it became a running joke. Didn't keep a list though, but by far the buggiest piece of software I had to use on a daily basis.

Also just... a horrible piece of software? Dealing with multiple organisations was such a pain. When I was using it I never got notifications from the other organisations except by email sometimes many hours later. I'm not sure if it's a missing feature or a bug. Whatever - same effect.

It also liked sometimes randomly and continously consuming bandwidth - I'm not sure if that bug ever got resolved or what it was actually doing.


I've never had to use teams over multiple organisations, but I do remember that it did not support multi-account until much further down the road.

I think if I had to use teams on multiple accounts simultaneously, I would have loaded the web app in separate firefox multi-account containers. (I do that at home to keep all of my work and home accounts separate and it works like a dream. It's probably the one feature you can show to get people to switch away from chrome when you show it to them.)

I'm unaware of the bandwidth usage on MacOS & Windows since I've always just used the building's connection. Teams on my Android phone hasn't seemed to cause any bandwidth issues though.


messages just don't send and you only find out hours later, even though later messages are sent

you just stop getting new messages, think you have a quiet day, until you restart teams and see a flood of missed things

does audio work? let everyone try to disconnect/reconnect to give out whose problem it is


Those message issues sound more like intermittent network issues to me.

The only audio issues I've ever seen with teams are actually user issues where they install teams on a new computer, get into a call, then don't read the big popup box that says "teams needs permission to access your mic, follow these steps".

Granted, both MacOS' System Preferences app and Window's Settings app make this more clunky then it needs to be, but that's an OS issue, not a teams issue. (Hopefully it's easier with the upcoming MacOS Ventura's redesigned System Settings app, but based on the screencaps I am not holding my breath.)


Basically, I read the question as: "on a scale where 1 is the worst direct messaging app you ever used and 10 is the best you could imagine, where does this one rank", and not "Do you enjoy using this or do you think these apps should even exist or be part of people's workday"?

Is slack better than Skype and MSN? Goes a good way towards a high grade for me.


I agree with you 100%.

Slack is the most beautiful useless application ever made. It looks great, I hate every single thing about it.

The only thing that does work and lets me focus at development at hand is turning Slack off entirely. I know about notifications, but the mental pressure of having to check if $important_person wrote something or not just gets on my nerves.


It's IRC without the headaches.


I have the same complaint about IRC. :). I'm ok with both Slack and IRC for collaborating on an immediate problem, like an outage, but I hate having it just sit there as a way for someone to ping me any time.


Sure but your complaint is about chat apps, not Slack specifically. For the people who "love" Slack it is just IRC but easier.


It's about the proliferation of slack being treated as the primary mode of communication at many companies now instead of email.

I'd much prefer default asynchronous communication than default real time communication (or some kind of hellish mixture of the two).


Too many people preferred emails. I get several hundred a day because every tool and most coworkers are just constantly giving you updates.

Emails been turned into a feed for me and not a 2 way communication channel at most places I’ve worked


at least email has filters, can't do that for slack


How is slack any different in that regard?


Hasn’t been around as long for people to break it.

I don’t view it as any more than a temporary reprieve and will jump ship the next time a new, less noisy but equally convenient messaging medium comes around


That’s fair, but even between slack and IRC I much prefer IRC for real time collaboration and any chat app for one on on conversations.

Slack threads are the worst thing to happen to IRC. Pick a modality. Is it a real time conversation or asynchronous threads? And then having one on one and group collaborations in the same place means both are done poorly.

It also means the notifications for both get mixed together. I want to get notified when someone posts to a group in slack, and I also want to get notified when I have a direct message, but not at the same time.


I love threads. They're lightweight channels. In large, busy channels it allows parallel conversations. I see no reason a thread would be strictly asynchronous or real time. That's an organizational expectation. And anyone who expects real-time responses outside of a call needs to come back down to Earth.


> It's like someone walking up to your desk, except we made it way easier because they don't have to get up and feel the social pressure of waiting for you to stop what you're doing and take off your headphones.

Turn off notifications.


You should turn off your notification, and look at your Slack's messages only when you choose to.


Ruby is missing entirely in the [1] Salary and experience by language.

156 People responded were programming with Crystal professionally. A language that is still very very young.

Even ignoring Node.Js, there are 3x [2] more Django developers than Rails.

If people thinks Phoenix is young or niche, it has half of Rails professional usage in this survey.

Django's current position should be what Rails tries to achieve. 15% usage is enough for a market sustainable position.

Some Google developer told me Fresh Grad or Junior Software Engineers gets $200K Total Comp per year. That is equal to the median salary of Senior Executive (C-Suite, VP, etc.) in the US. When developers with 5 - 10 years of experience are calling for a "fair" $400K Total Compensation on Twitter. Someone on HN once said Google Senior SWE make up to $700K. The salary gap within the industry is huge.

[1] https://survey.stackoverflow.co/2022/#section-salary-salary-...

[2] https://survey.stackoverflow.co/2022/#section-most-popular-t...


The gap is insane even between the FAANGs, someone got an offer at $450 total comp (inc grants over five years) at one and the other couldn't even break 225/yr total. Something is gonna have to give.


> Something is gonna have to give.

Why? The work product of a senior engineer (on average) is worth some multiple of the TC or the company wouldn't be paying it.

Tom Cruise makes way more than the director or the studio execs too. Because he sells tickets/rentals that make the movie more profitable. Same thing.


Is important to reflect on compensation gaps among top 10 companies in the US over time and the positions that they valued most (whether fair to value them that way or not). That will tell the story of if there is anything to give.


I was trying to look really hard in the salary for graph for Ruby and couldn't find it, would love to know where it landed. Middle to slightly high is my guess.


Ruby is hidden behind Elixir - 12 years / $94644 with 2732 responses


Surprising for me: AWS's market share is still Azure + GCP combined amongst professional developers [1]. With various articles about Microsoft's success I was expecting lower. The same for loved / dreaded. AWS scores significantly better [2] in terms of loved over other cloud platforms. Being in the HN bubble I was expecting that to be lower also. The other items that scored high on loved / dreaded were mostly new technologies vs. dominant incumbents.

1 - https://survey.stackoverflow.co/2022/#most-popular-technolog...

2 - https://survey.stackoverflow.co/2022/#most-loved-dreaded-and...


As an Android developer since 2009, I will not touch anything from Google ever again. Its a very asymmetrical relationship, and if something goes wrong, like your account gets suspended, its a Kafkaesque nightmare, with usually no recourse.


same goes for other platforms too, you know.

The only advantage for Android is that you can theoretically also just distribute via sideloading


Sideloading is neither here nor there. Its about ruining a developer's livelihood, you know... like your account gets suspended (for right or wrong reasons), and ability to earn income stops. Not just because you can't distribute your app on Play Store, but because your ability to work for another organization is blunted because your addition to their account places them at risk too.


Can you explain further? It sounds like you're saying that if I work at company A, company A's Play store account gets banned, and then I go work at company B, that the Play store keeps track of this and then company B's account might get banned, just because I moved there.


There have been reports that if an individual's account has been banned, they can "poison" another company's account by being added to it. I have not heard of this happening across companies.

https://www.androidpolice.com/google-terminate-personal-acco...


Happened to me, my account was banned because I was using it from a restricted country (I used a VPN), for some time it worked fine, then after that ban hammer, all other accounts that used my machine later on got banned. I recall that I read online that they track your MAC address that gets attached to the build artifacts when you upload them to the store and used to link the accounts together, it's even mentioned in their banning email "Your account is associated with another banned account...".


The web standard is powerful enough that native apps are unnecessary for most use cases. Hopefully the gap will be closed further in the next decade. API and documentation is better. Distribution is simpler and cheaper. Not having to interact with the Apple / Google monopolists is the cherry on top.


Yes, it happens on other platforms too, but at least you can reach a human being who can disclose what the actual problem is.


Regarding Azure, it is quite possible the primary developers are corporate/in-house types and not big on responding to this particular survey. About 70,000 developers (in total) responded which is a small fraction of the developer universe.


always the same criticism with surveys. and yet this is one of the biggest surveys in the world. one has to try.


Yes, and its quite likely correct. Possibly why it's often raised!


And I believe microsoft counts their SaaS offerings in their Azure usage, which significantly skews the numbers.


> A Linux-based OS is more popular than macOS - speaking to the appeal of using open source software.

I'm glad to see this, and I hope this trend can continue. Though I wish I worked for such a company, and I friendly-envy people who have such a privilege.


We have the freedom to choose between Windows/Linux/Mac

Most frontend devs went with MacOS.

All backend devs went with Linux.

MacOS is the one that causes problems with containerization and virtualization. Addition: frontend devs use Safari. This comes with its own problems due to browser inconsistencies between platforms.

TL;DR: we have a subset of devs who went with MacOS and there was no tangible gain.

I'm not tribalist, I merely like things that work. Personally, I think Windows is the best looking UI but I use Linux for work - I'm devoid of personal preferences when it comes to getting things done.

In my opinion, and this is by no means a fact - it's a mere opinion, Mac is a status symbol rather than productivity indicator.


Frontend developers go with MacOS because it's the only platform that allows them to test their sites in Safari.


I’d like to filter to United States and reassess. I don’t know anyone running Linux.

It could be the case that only US developers can afford macs.


Students claim to have 4.86 years (on average) of professional experience. O_o

The lowest years of experience of actual professionals belongs to... blockchain developers with 9.63 years (on average) of professional experience.


My guess is that there’s some sampling bias for the student population - if you’re plugged in enough to be doing this survey you’ve probably been hacking for a while.

Fwiw, I started getting paid for slinging code at 16, maintained the website for a university group in college, while still doing other work in the summers. I probably would have answered with “6 years of experience” if asked when I graduated.

Is that truly “professional experience”? In retrospect probably not, but 22yo me would have been too stubborn to answer otherwise.


Do you take hours ratio into the account?

e.g if you've been working 4h a week,

then it'd be weird to say after year that you have 1 year of commercial experience, when your colleagues spent 40 hours / week and have "only" 1 year too

I believe that pay is not necessary, but working for somebody else or in team (e.g OSS) is necessary.

So yea, I wouldn't say that hacking something even cool, but alone is commercial xp.


>Students claim to have 4.86 years (on average) of professional experience. O_o

You've heard of "5 years of experience" entry level jobs, now meet the "5 years of experience" students


The eight Canadian students claim to have an income of (avg) $116,850.5. I think it's time for me to move to Canada.

https://survey.stackoverflow.co/2022/#salary-canada


I'm in Canada and these students allegedly make more money than I do with ~12 years of experience.


it gets better -- twenty years experience and you will make much less again


There are probably crypto-fintech-medtech jobs out there that pay 500k but we'd never get to the salary part of the conversation because the whole idea feels shady. Security might also pay well but there are too many personalities involved in the domain for me to find out.


Those are probably 16-month (effectively fulltime) coop students working at big tech/finance. By senior year some of my classmates were making 10-12k/month.


That's not at all surprising.

It's their intern salary projected on a yearly basis so ~ $9737/month.


Just a note, the comment is quoting from this:

https://survey.stackoverflow.co/2022/#section-experience-yea...

BTW many people go (back) to school after obtaining some professional experience. Not sure about the context of this part of the poll though.


The 4.86 years of experience is the mean of the 677 respondents who indicated student.

Going back to school after a few years is one thing... (and I lack the median, but I'm going to guess that it isn't too far from the mean) but having most students go back to school after 4 years of professional experience seems a bit odd.

I really suspect that they're either counting their 2 months of summer internship as a year several times over, misreading the professional part of it and including hobby, or misreading the professional and considering that they're a senior with 3 years of academic experience which translates 1:1 with professional, so they'll put that down.

The issue is that type of "something is fishy here" without further drilling into it makes me more skeptical of other data outliers and suspect more reporting and analysis issues than a (self reported) poll can be trusted.


I do have 4 years of commercial experience and I'll be getting masters next year.

That's because I've been working full time since 2nd semester

But I still do believe that it's weird.

Maybe people think about experience in general instead of commercial, full time?


(semi unrelated) Does anyone else find them selves using SO less and less as you gain more experience? I'm over 10 years now and rarely find my self on SO.


Anecdotally, I find that web search has been doing a much worse job of recognizing my query and presenting an SO result - which is why I personally use it less. Blogspam created from scraping SO has been completely pwning top results in Google and DDG(bing) and it’s really disheartening.

See for example “geeksforgeeks” and similar sites, which I find to be a poor and overly verbose resource, which now dominates the top position


> See for example “geeksforgeeks” and similar sites, which I find to be a poor and overly verbose resource, which now dominates the top position

Google Search's and Facebook Messenger's spam filters started letting tons of garbage through at roughly the same time. I wonder if the advances in generative deep learning helped with that.


DDG usually shows a SO preview in the right hand gutter for code related searches. I guess that must be a bing feature.


It does when it works, but I’ve found it to work less often these days.


This is so depressingly true. It's why most of my Google queries are affixed with `site:stackoverflow.com` or `site:reddit.com`. I lean on this so heavily that I've setup a couple Firefox keyword bookmarks so I can type `so <query>` or `r <query>` respectively into my address bar as a shortcut.

Doing this has vastly improved troubleshooting, finding recipes or product recommendations, etc. It slices through SEO blogspam. I get genuine results, fast.


I was asking myself similar questions after finding that the survey results bore little resemblance to what I've encountered in the US software industry in the last few years (I've been at it for decades). My first hunch is that the results say more about SO survey takers than about the actual software industry - similar to how various political polls (e.g. FoxNews, Politico) seem skewed towards the bias of the polling organization. My second hunch is that it's a big world, and I and my colleagues may just inhabit a bubble far from the center of the bell curve.

These days, the only time I drop into SO is when a "how do you do that again?" search yields a relevant-looking question asked within the last year or so. As often as not, the search leads me to a blog post or primary source (e.g. mozilla javascript documentation). But when I do make it to SO, I find that it's still a bustling community full of legitimate expert guidance.


Yes. Several parts to it.

1) My experience is greater. Many of the problems that I encountered before, I know how to solve.

2) I know what knowledge I'm looking for if I don't know the answer. Instead of searching for the problem I am having (and ending up on SO), I am searching for the specific part of the documentation that I need for solving the problem that I have.

3) I tend to bias to project specific knowledge now. The general pollution of search on Stack Overflow means that it is more productive to search Spring documentation or the project specific forums ( https://github.com/spring-projects/spring-kafka/discussions ) rather than Stack Overflow itself.

4) Stack Overflow content is having difficulty with the lack of curation of old answers and the deceased quality of people answering now. Finding an answer written in recent times with a few variations on "have you tried {x}?" without the material leading to how that suggestion was derived means that trying to apply the answer is shotgun "maybe this works" without an understanding for how it works or if that is the right solution.

4b) I try to avoid the "have you tried {x}" answers as that impacts the rate I grow my experience (and thus part 1) at. Likewise, in general, people who try the shotgun solutions (and I can see that in code reviews if they're not good about cleaning up (and they aren't) tend to continue to make the same type of errors again as they are following cookbook / paint by numbers approaches rather than understanding some basic food science or aesthetic theory.


I probably take more guidance from blog articles and GitHub issue comments than I do from StackOverflow. I think this started to happen for me around 2015/2016. I'm not sure though if that's a function of me requiring more niche/targeted guidance, or StackOverflow no longer capturing as much knowledge as it once did.


I can only talk about my personal experience:

- Documentation seems to have gotten way better overall.

- Github issues are often a good place to search for open/resolved problems.

- I've simply gotten better at reading and debugging code over time.

- There are often chat rooms for larger communities on Slack/Discord nowadays. You get a more fluent and direct form of communication there.

- I still sometimes reach for Stack Overflow. But it tends to be for things where I'm a total newbie.


I find that in recent years my best resources are official docs because that's where I find the "obvious" answers to the issue I'm having by not having previously read the docs. I also find lots of answers in gh issues (often unresolved) where I gain insight into what might be happening so I can come up with a solution. SO answers that I find useful are usually ones which link to related docs.


Why is that in recent years. The best resources have always been thofficial docs and that has not changed since before SO. The issue is that official docs are often not good and you need pointers too them. In fact I would say that official docs are getting worse and you need more help from SO now.

Agreed that github issues are very useful for understanding. But even there for popular reps there are too many stupid questions to wade through.


StackOverflow has become nearly useless because they don't mandate version numbers on questions and answers. I never start searches on SO and walk away empty handed probably 95% of the time I find my way there.


I was actually part of a study on improving that. They selected for some criteria that I'm not privy to, but part of it was being active on the site. Iirc only a few hundred meeting invites went out in total. Some of the questions I was asked were also geared towards validating the problem so they could present it to management and get more manpower on solving it.

Since then I've seen sorting by 'recently most voted' being used by default sometimes, but I still have to read up on the actual results. They're somewhere on meta SO or meta SE.


Part of the problem is the attitude that questions are duplicates of questions posted 10 years ago, so they get closed without answers. I am not sure recently most voted is enough. I think the culture needs to change substantially, maybe figure out some way to discourage closing as duplicate (cost N*5 points where N is the age of the supposed duplicate in months or years). Make it really expensive.


Maybe my attitude is wrong, but I've always felt the onus is on the Question asker to dictate that they've found the old answers and provide explanation to why they're no longer relevant to the problem. "I've already tried solutions from <x>,<y>, and <z> but they use functions depreciated in 2.1 and I'm using 3.0."

I do recognize the problem you're describing though. I think I've developed this mindset because I stopped helping out in StackOverflow a lot due to the low quality of many questions. I did a bit of time moderating with the intent to teach new users how to improve their questions, but ultimately the amount of users who want quick answers outpaces my patience so I just moved on. I follow two niche categories now that I consider myself an expert in and that's about all I help out with anymore.


Yeah, questioners should be encouraged to include version numbers. Ideally there would be a specific mandatory field for a version number. I'm honestly shocked there isn't one, it seems so obvious there's no way I'm the first to think of it.


One thing I haven't seen mentioned so far is the community/moderation. Those who do "visit" frequently are quite the clique, much like Wikipedians, with many of the same kind of outcomes. I used to spend my time helping people on there several times a week but I've been put off.

That being said, unix.stackexchange.com, is great.


Absolutely. Two of the big reasons are improved understanding and problem solving skills on my part and improvements in the tech stack I use day to day making things more clear and covering more use cases cleanly.

The third is that I’ve come to recognize that the average quality of answers on SO is quite poor — while they technically serve as solutions to posted problems, they often come with big caveats… use of private/deprecated APIs, hackiness, and feature misuse abound.

As such when I use SO these days it’s usually not for wholesale solutions to problems but rather to add to a greater body of examples of APIs in action which I can then abstract and use as needed. It’s decent for this use case.


> The third is that I’ve come to recognize that the average quality of answers on SO is quite poor — while they technically serve as solutions to posted problems, they often come with big caveats… use of private/deprecated APIs, hackiness, and feature misuse abound.

The real clean answer is usually a mildly upvoted comment that scolds the answerer for violating a standard or using a bad practice. SO is still useful when that happens.


Closed. This question does not meet Stack Overflow Guidelines. It is currently not accepting answers.


I love that GitHub added discussions to repos directly now. You can ask a question without getting berated by some SO mod about how your question makes no sense because you didn’t use the technically correct term for something.


There always those really weird esoteric bugs that someone has already slogged through lots of trial and error to resolve. SO is great for those kinds of problems.


Yep - if you're getting a particular error code or message that makes no sense, googling as often as not finds it in a SO post, along with 20 ways to solve it, of which at least 1 usually gives you what you need to do so. It's hard to imagine how much time I'd have spent tracking it down otherwise.


I can confirm. Also the technology used really counts: with Javascript I got weird error and there are no standard in the ecosystem so I found my self looking on Google and SO all the time. With Ruby, on the other hand, there are better documentation, no weird errors and everything seems so smooth that I visit StackOverflow just once a month. I have been working with JS for 3 years and just 1 year with Rub


Broadly, yes. It's been years since I asked a question, and for searching and finding an answer, github issues has replaced it.


Every time I search on stackoverflow it thinks I am a robot and wants me to solve a capture. My workaround is to use "site:stackoverflow.com" on some search search engine. But this definitely made me use SO way less.


I find myself using it equally much, but maybe in a different way. There are always times I find my self wanting to do something weird in a framework a specific framework or a language so I go see if there are already solutions out there. There are also times where I find an existing question but I’m not happy with the answers so I write my own after some research—which I would have hoped to have been able to skip—then my answer serves as a reference for the next time I need to do something similar (which may be as long as a year or two, so I won’t remember).


24 years experience here.

12 years old account on SO.

Haven't used SO for anything for past 7 years.

I stopped answering questions after their policy changed which states that you don't own your answers, they do.

I figured, what's the point in using SO if there's code beggars plaguing it and SO staff isn't taking proper steps to prevent it from happening so I stopped using it alltogether.

It's not the place it once was after it was ran over by horde of code plumbers who can't look for similar answers.


My SO usage decreased dramatically once I switched from a simple text editor (Sublime) to an IDE that can resolve symbols and drill down into their definitions.

A lot of my SO usage used to be just looking up API documentation/syntax (and SO would rank higher than the framework's own documentation) which I no longer need to do if I can just Cmd+Click into the symbol and see its internal implementation.


I believe that Stack Overflow belongs to a time when VCS was the exception rather than the rule, codebases were scattered across many different providers, discussions took place on dedicated channels or mailing lists, documentation was scarce and of poor quality, and tooling was limited to the most essential. All this added friction to any form of shared knowledge of being built by the general public.


I didn't start using SO till I had already been a professional programmer for 20+ years, so I have no idea how I might have used it had it existed when I was starting out.

After 35 years as a professional programmer, I find SO invaluable. I might not use it with any kind of regularity, but when I need the kind of thing SO delivers, SO delivers.


I used it a lot more when I wrote more JS. When writing Elixir I just read the docs or go look at source code.


It probably depends on the technology you are using. For example, the Android conceptual guides are very good, but the javadoc / references are abysmal. You simply can't get anything done without SO because its more authoritative than the Android javadoc.


I find this as well. Earlier in my career it was useful, but in the last bunch of years I rarely if ever am on SO, and if I am, I’m trying to contribute answers. Wouldn’t be surprised if the survey data is largely skewed to more junior people.


In the beginning I used SO a ton, both asking questions and using existing answers.

But now I can't remember the last time I visited SO and I stopped asking questions many years ago.

This is true even when learning new languages and other things.


That would be great. I work in a generalist type of field where learning new tools is part of the job so I am still googling the same stupid questions almost every day


I google the same git commands three times a day and end up on stackoverflow. Everything else is answered by the github issue comment with 10 emojis under it.


Yeah, more or less, I still do come back to it when I'm picking up a new language or framework.


No, haha, I forgot the opposite of `include?` in Ruby yesterday and ended up on SO which promptly told me it was `exclude?`. Which I've known forever. Haha.


> A majority of respondents (75%) have been working for 14 or fewer years as a professional developer, meaning they’ve never worked in a world without Stack Overflow.

Oh boy did this make me feel old.


The horrors of expertsexchange?


Even worse -- the horrors of having to find a book in the library to answer your question.

When I started working all the senior devs had full bookshelves of O'Reilly books, and if you got stuck you went to them to either ask a question or use their books. Then as they left the company, all of us would fight over who got ownership of the O'Reilly book collection!


This is how I learned and rounded out the edges with random forums.


Observations:

1: Amazing that Javascript is the most popular language, despite nobody has yet managed to write a fast FizzBuzz in it :)

https://codegolf.stackexchange.com/questions/215216/high-thr...

2: SQL and Bash both went up a percentage point! Yay! The art of terse and efficient code is not yet dying.

3: Strange that "Web frameworks" mixes backend and frontend frameworks. Why is "node.js" listed here? Isn't node.js a runtime?

4: Docker made a big jump from 49% to 64%. I consider that a good thing. I don't believe in "containerizing" applications. But I prefer to have Docker stay around for the long term. Because containers on their own are so darn useful.

5: Git is at 94%! Really? 94% of developers use Git? Or do they use some tool that is using abstracting Git away, like GitHub? Anyhow. Thats great, because Git (like vim) is one of the best pieces of software out there and I love that it will be around for a very long time.


> Amazing that Javascript is the most popular language, despite nobody has yet managed to write a fast FizzBuzz in it

It's almost like "Best performance of all languages!" is not that important of an requirement for a language to become popular :)


Being the native language of the most popular information sharing standard in the history of humanity surely must account for something.


I don't think it's a surprise honestly. It's the language used for creating programs that can be shared with anyone who has a browser. You don't share the code or the software and tell your friend to run it. You share a link to a webpage and it runs there. It's the language that underpins the most shareable form of software out there.


> Git is at 94%! Really? 94% of developers use Git?

I think this means that 94% of the people using Git have questions!!

IMHO, this means that a simple Distributed Version Control System is really required.


All the Git users took a break from reading tutorials and googling for solutions, and took this survey.


> a simple Distributed Version Control System is really required

Right, it would be nice to have a simple one.


like mercurial?


Regarding Git being 94%, if you see the table just below about interacting with the version control system, you'd see 83.57% users using command-line. 28.44% are using version control hosting service web GUI. 83.57% is still a big number of people who are using git with fewer abstractions on top.


Re 2: Bash can be terse, yes. Efficient? Depends. It can be efficient in terms of developer time to get something running. Efficient in terms of CPU time? Maybe not.


It is efficient in neither. No 3+ lines bash code will be without a bug, I assure you. That “language” should be buried deep.


> Why is "node.js" listed here? Isn't node.js a runtime?

In this context this almost always means node.js with express


I so rarely hear of Express in the context of backend JS. People always just say Node. Curious convention.


It’s because it’s not possible.


Why not?


This fizzbuzz competition specifically requires the solution to work up to 2^63 which is not possible as the largest int in JS is 2^54-1. You would have to use BigInt which would greatly reduce your performance.

So not impossible but kinda pointless for JS


I'm not a programmer just a pedant ... can't you just concatenate two integers one as your bigend and one as your little end. Sure, probably not fast, but slow !== impossible.


The thing that was said to be impossible was writing a fast FizzBuzz. Assuming that your reference is C, it kind of is.


This has piqued my interest, I'm slightly familiar with C and Python, do you (or does anyone) know of any sort of review of resource optimisation for a simple program (like fizzbuzz)?

To me, naively, it seems like the bigend would fit in a register and so memory use wouldn't increase noticeably if you used some sort of double integer type. So it's it processor bound?



That's pretty much what BigInt is doing for you.


There's ASM and C answers, without going near BigNum libraries. You wouldn't necessarily have to implement or use a BigNum library.


ASM and C have access to native 64-bit integers. Javascript does not.


Javascript does [0]. Shipping in Chrome v67, and rolling out elsewhere.

[0] https://chromestatus.com/feature/5371603852460032


That's not native 64-bit integers. That's BigInt, and it's already out everywhere, and unless the situation has changed, it's significantly slower than just 64-bit integers would be.

I'm not actually attacking JavaScript for this, note. I don't think it's really all that much of a problem given the purposes of JavaScript, and I think it could really be better fixed by doing something similar to what Lua did, and have all numbers transparently either a 64-bit floating point number or a 64-bit signed integer. If you are using JavaScript and something like specifically needing 64-bit integers is an issue for you, there's a good chance you should just be using WebAssembly.


I suspect the parent thought 'native' meant 'inbuilt 64 bit integers' and you thought 'native' meant '64 bit integers in C'.


Note: none of the code below has been tested!

I have no idea how one does I/O to stdout in Node, so in the following I'm just going to assume that we have a function printi() that takes an integer argument and prints it, without and padding and without a newline, we have a function prints() that takes a string and prints it, and that we have a function nl() that prints a newline.

Here's a program that would print the numbers from 1 to 9999999999999999999, which is larger than 2^63, without using BigInt.

  for (let r = 1; r < 1000; ++r) {
    printi(r); nl()
  }
  for (let l = 1; l < 10000000000000000; ++l) {
    for (let r = 0; r < 10; ++r) {
      printi(l); prints('00'); printi(r); nl()
    }   
    for (let r = 10; r < 100; ++r) {
      printi(l); prints('0'); printi(r); nl()
    }   
    for (let r = 100; r < 1000; ++r) {
      printi(l); printi(r); nl()
    }   
  }
That's not yet FizzBuzz but it could be made so by wrapping the print lines with a conditional check to see if they should be replace with Fizz, Buzz, or FizzBuzz. Just keep a variable around the is the current line number mod 15, and use it for the FizzBuzz logic check.

But first let's take a closer look at the "count to 9999999999999999999" program and see if it can be sped up. The first thing to notice is that each time through the outer loop it calls printi(l) 1000 times. Printing integers is often slow so calling printi 1000 times on the same l is not good.

Instead, we should print l to a string at the top of the outer loop, and then prints that string in the inner loops. I'll assume there is an itos() function that takes an integer and return a string.

We could also precompute all the right side strings.

  let right = []
  for (let r = 0; r < 10; ++r) {
    right.push('00' + itos(r) + '\n')
  }   
  for (let r = 10; r < 100; ++r) {
    right.push('0' + itos(r) + '\n')
  }   
  for (let r = 100; r < 1000; ++r) {
    right.push(itos(r) + '\n')
  }
So now the counting parts would look something like this:

  for (let r = 1; r < 1000; ++r) {
    printi(r); nl()
  }
  for (let l = 1; l < 10000000000000000; ++l) {
    left = itos(l)
    for (r = 0; r < 1000; ++r) {
      prints(left + right[r])
    }
  }
Now add in the FizzBuzz logic and put it all together:

  let n = 1  // current count % 15
  let right = []
  for (let r = 0; r < 10; ++r) {
    right.push('00' + itos(r) + '\n')
  }   
  for (let r = 10; r < 100; ++r) {
    right.push('0' + itos(r) + '\n')
  }   
  for (let r = 100; r < 1000; ++r) {
    right.push(itos(r) + '\n')
  }
  for (let r = 1; r < 1000; ++r) {
    if (n == 0) {
      prints('FizzBuzz\n')
    } else if (n % 3 == 0) {
      prints('Fizz\n')
    } else if (n % 5 == 0) {
      prints('Buzz\n')
    } else {
      printi(r); nl()
    }
    if (++n == 15) n = 0
  }
  for (let l = 1; l < 10000000000000000; ++l) {
    left = itos(l)
    for (r = 0; r < 1000; ++r) {
      if (n == 0) {
      prints('FizzBuzz\n')
    } else if (n % 3 == 0) {
      prints('Fizz\n')
    } else if (n % 5 == 0) {
      prints('Buzz\n')
    } else {
      prints(left + right[r])
    }
    if (++n == 15) n = 0
  }
That's going to be slower than a similar simple FizzBuzz that just goes to 2^54-1, but I don't think it would be a lot slower.


Yes, in theory it could print all the numbers you said, but in practice it won't because of floats dropping precision at some point. For JavaScript that point is 2^53.

The easiest way to see this is by typing `9007199254740992 + 1` in your browser's dev console. It should spit out `9007199254740992`. `(Math.pow(2, 53) + 1) == Math.pow(2, 53)` returns true.

That means your program would print invalid output (or rather start looping infinitely) starting at that number (which is much smaller than 2^63) thus disqualifying your solution.


When the person I was responding to said the largest JS int is 2^54-1 I assumed that meant I could use all integers in [0, 2^54-1], but you are right that I can only go up 2^53. That breaks the specific code I posted but not the underlying idea. Fixing it to deal with that lower upper bound is easy.

Just change the constant 10000000000000000 in the outer loop to 1000000000000000 (which is 2^49+437050046578688 and well below 2^53), change the filling of the right[] array to

  for (let r = 0; r < 10; ++r) {
    right.push('000' + itos(r) + '\n')
  }   
  for (let r = 10; r < 100; ++r) {
    right.push('00' + itos(r) + '\n')
  }   
  for (let r = 100; r < 1000; ++r) {
    right.push('0' + itos(r) + '\n')
  }   
  for (let r = 1000; r < 10000; ++r) {
    right.push(itos(r) + '\n')
  }
and change the loop that starts "for (let r = 1; r < 1000; ++r) {" to go to 10000 instead of 1000.


> That's going to be slower than a similar simple FizzBuzz that just goes to 2^54-1, but I don't think it would be a lot slower.

OK, I've actually tried it, after fixing the issue Allypost identified with the original code (JavaScript integer arithmetic only works up to 2^53, not the 2^54-1 I had assumed).

Here's a simple FizzBuzz:

  let n = 1
  for (let r = 1; r < 9990000; ++r) {
    if (n == 0) {
        console.log('FizzBuzz')
    } else if (n % 3 == 0) {
        console.log('Fizz')
    } else if (n % 5 == 0) {
        console.log('Buzz')
    } else {
        console.log(r)
    }
    if (++n == 15) n = 0
  }
I compared that to the the more complicated one, with the outer loop changed to just go to 999, so it would produce the same output as the simple FizzBuzz. (And with the more complicated one changed to use console.log for output instead of the dummy functions in the original, itos() replaces by letting JavaScript implicitly do the conversion, and getting rid of explicit newlines since console.log works in lines.

Running each a few times via node with stdout directed to /dev/null, the simpler might be slightly faster but there is enough variation run to run that there is overlap. E.g., I got 23.811 vs 23.979 when I ran the two once, and then 24.325 and 25.550 when I ran them again.

Similar relative results when directing output to a file. There I actually saw in most runs the complex one run slightly faster than the simple one, but there was enough variation that I can't really say that one was on average faster than the other. The runs saving to disk took about 2.3x as long as the ones that discarded output.

None of them were anywhere near the speed of the programs in other languages on the code golf page linked a fews comments upthread. We're looking at about 5.4 MB/second when not saving the output to disk. That's around 1/20th the speed of the slowest on on the code golf page.

I'm just running things with "node file.js". I don't know if there are options that could be set to make it faster.

Anyway, the assertion upthread that JavaScript is not fast for this seems plausible, though not for the reason given (that it would need BigInt).


It depends more on the particular IO-behavior than the language. (How often does it flush for example)


> 1: Amazing that Javascript is the most popular language, despite nobody has yet managed to write a fast FizzBuzz in it :)

The reason for that is that standard output implementation in Node.js is very slow. When the challenge is to write as fast as possible to standard output that's not ideal.


There is no way that 94% of programmers know how to use Git. Most of them barely know how to program.


"Fully remote" is the most common work environment! Wasn't expecting that, even considering covid. I wonder if employers will pressure staff to return to the office (e.g. hybrid) and fully remote will lose that number 1 spot next year. Time will tell. https://survey.stackoverflow.co/2022/#section-employment-wor...


I answered "Very Favorable" to "How favorable are you about blockchain, crypto, and decentralization?"

I am indeed very favorable indeed to decentralization.

I also think blockchains are almost always a waste of electricity by computers pointlessly playing Numberwang all day. (I'm not quite sure if "almost" is needed there.)


I agree this is a very unfortunate grouping of topics. The irony is that there’s a lot of cryptocurrency stuff that isn’t even well decentralized, so it’s almost an objectively bad grouping.


"Pointlessly playing Numberwang all day" is the best, most accurate description of blockchain activity I've ever heard.


I was thinking the exact same thing. That comment deserves some kind of Hall of Fame status!


Thank you.

If my comment does get into a hall of fame, please edit out the repeated "indeed".


> I also think blockchains are almost always a waste of electricity by computers pointlessly playing Numberwang all day. (I'm not quite sure if "almost" is needed there.)

In relation to what? Do you have an alternative way of maintaining blockchains security?


They don’t seem to answer the most important question: Does using spaces over tabs still predict a higher salary?


Real programmers indent with the corn emoji.


Tabs, but only when set to three spaces.


I'm using tabs. Explains a lot...


I never understood the deal behind tabs vs spaces figths.

Was it because of legacy editors or what?

Editor now helps formatting code, even when pressing enter button, it aligns entry on new line.


For me, important differences are how the cursor behaves when moving around, and the effect of backspace. I like consistent movements, i.e. always one character position per keypress, and therefore prefer spaces.


(1) My poor back button

(2) Those YoY salary increases are bonkers

(3) Poor Ruby on Rails. Seems to be slowly sliding into irrelevance in the face of stiff competition.


Rails is boring tech [0] now. Phoenix seems to top the "wanted" listed, but it only has about a ~1000 respondents. If I had to guess I'd say js/typescript will eventually eat rails, django etc. If I started coding today, or indeed within the last 10 years, it's not clear why I would choose anything other than Javascript.

[0]: https://mcfunley.com/choose-boring-technology


If you look at most loved languages, most wanted languages and most popular languages among both students and professionals Python and Typescript are the best choices for new stuff. Of the newer languages it seems Rust has the most momentum behind it.


Been a Rails dev for my whole career and at this point my love for it is slowly sliding away.

It’s the most amazing framework ever for the first few years but after the app starts to grow older and larger it becomes almost unworkable. It’s virtually impossible to update even the smallest gem and know you haven’t caused issues. A rails upgrade is impossible without 100% test coverage of everything and even then you have to cross your fingers that nothing slipped through.

The current place I work at is investigating pulling things out of rails and in to a Rust macro service so we can have some confidence that changes actually work.


The investigation out-withstanding, do you actually know of any also amazing framework that has been used for more than a few years (which I guess is already pretty long on average for web tech stuff) that performs better in this department?

I wonder what we would even fairly compare Rails to. Django? Laravel is already quite a bit young but sure, why not. I guess finding someone who actually has deep, year long and equivalent experience on the candidates would be pretty hard.


Spring Boot.


When you see (once more) that despite your 20 years of experience you're being paid less that what students are being paid in other countries :-) (yes people, I know it's my fault that I'm still staying at this job... no need for downvotes or negative comments).


Depending on your geography, it might be a fair price to pay for universal healthcare, free daycare and university for your kids, as well as having a notion of evening and weekend.

I'm still looking for a golden tool to convert total compensation plus geography into expected happiness.


The average American pays 10% of his income on healthcare expenses. [1] That would mean it would be around $5,000/year. The US charges maybe $30,000 more for college than some cheaper countries. With two kids, that's maybe $1,500/year amortized over a career.

Those aren't going to be worth it for the average person unless you live in Norway, Luxembourg, or the UAE. I doubt there's any country where those outweigh the average programmer salary difference, let alone after taxes. Even if you have a serious health condition and crappy health insurance, deductibles cap out at $7,000/year.

[1]: https://www.advisory.com/daily-briefing/2019/05/02/health-ca...


This feels a little reductive of the benefits that come from public education and healthcare.

Developers making 300,000$ a year don't make up the entirety of the US population. I think living somewhere where everyone gets an opportunity at life contributes greatly to overall happiness and helps reduce social tensions.

Good urban design, a nationalized electricity grid, or train system also contribute a lot to the disparity in taxes and salaries.


But there are of course other issues you don't see too much in other western countries - such as:

- rampant homelessness problem

- getting your car broken into, home burglarized, robbed, etc.

- police brutality

- gun crime

- higher rate of traffic accidents

- larger distances to travel / commute

- abortion rights

- political diversity

and so on.

I'm obviously not saying that those are at all unique to the US, but many of those things are more frequent in the US than comparable west-European countries.

Of course, if you live in a very nice area - those are things you might never experience in the US (at least as far as crime goes).


Cost of college is not the major cost of kids. Daycare can be in excess of 2,000/month.


you are not alone


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: