Stack Overflow Developer Survey 2022
survey.stackoverflow.co
survey.stackoverflow.co
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.
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
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.
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.
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
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.
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.
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 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.
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 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.
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?
I agree the docker docs are lacking, i basically learned everything by googling stuff, stack overflow and reading some blog posts
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.
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.
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.
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'd much prefer default asynchronous communication than default real time communication (or some kind of hellish mixture of the two).
Emails been turned into a feed for me and not a 2 way communication channel at most places I’ve worked
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
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.
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.
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.
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.
People who hand wave and say "just change the company culture" must not have been in your shoes.
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.
Interesting; I've never worked anywhere that DID. Wonder if it's a regional or company domain thing.
> 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.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).
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.
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.)
In my experience it either works, or the button for the feature just doesn't exist on that device.
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.
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?
What's your version of MacOS and Teams?
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 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.
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
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.)
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.
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.
It creates just enough friction for people to not spam chat-messages all day with emojis.
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.
Discord is great for small start-ups to help create a virtual office space for remote work, but it really doesn't scale well.
Is slack better than Skype and MSN? Goes a good way towards a high grade for me.
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.
Turn off notifications.
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...
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.
1 - https://survey.stackoverflow.co/2022/#most-popular-technolog...
2 - https://survey.stackoverflow.co/2022/#most-loved-dreaded-and...
The only advantage for Android is that you can theoretically also just distribute via sideloading
https://www.androidpolice.com/google-terminate-personal-acco...
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.
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.
It could be the case that only US developers can afford macs.
The lowest years of experience of actual professionals belongs to... blockchain developers with 9.63 years (on average) of professional experience.
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.
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.
You've heard of "5 years of experience" entry level jobs, now meet the "5 years of experience" students
It's their intern salary projected on a yearly basis so ~ $9737/month.
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.
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.
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?
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.
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.
Doing this has vastly improved troubleshooting, finding recipes or product recommendations, etc. It slices through SEO blogspam. I get genuine results, fast.
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.
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.
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.
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 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.
Agreed that github issues are very useful for understanding. But even there for popular reps there are too many stupid questions to wade through.
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.
- 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.
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.
That being said, unix.stackexchange.com, is great.
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.
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.
Oh boy did this make me feel old.
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!
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.
So not impossible but kinda pointless for JS
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?
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 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.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.
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.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's almost like "Best performance of all languages!" is not that important of an requirement for a language to become popular :)
In this context this almost always means node.js with express
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.
Right, it would be nice to have a simple one.
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.
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.)
If my comment does get into a hall of fame, please edit out the repeated "indeed".
In relation to what? Do you have an alternative way of maintaining blockchains security?
Was it because of legacy editors or what?
Editor now helps formatting code, even when pressing enter button, it aligns entry on new line.
(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.
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.
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.
I'm still looking for a golden tool to convert total compensation plus geography into expected happiness.
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...
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.
- 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).
I decided to go with Elixir because it seems fun (I have no Functional experience). However, I am seriously considering Rust, because it seems so universally loved.
Maybe the grass is greener on the other side?
I will definitely pick up Rust when I feel I am comfortable enough with Elixir.
I primarily want to work with Distributed Systems, but It seems the best 'setup' is Elixir for Distribution logic and Rust for leaf-nodes-number-crunching logic.
I'm just recommending Rust in general, not over Elixir, because I've never used Elixir and have no experience in that area. Rust is a pretty easy language to love.
I have no functional experience apart from dealing with similar, toned down concepts in JavaScript.
I was considering Clojure or Elixir depending on tooling, ecosystem, market worth and most importantly, what can it teach me.
The reason I got inclined to Elixir was to learn Phoenix/LiveView. The reason for Clojure was it's very much adored here and it seems a good starting language for FP.
Rust is in my list but maybe sometime later this year.
Maybe a slightly unconventional answer, but F# is quite nice.
As a language, the syntax is pragmatic and approachable like Ruby, but the VM scales super well since it's Actor model provides concurrency by default.
There are even projects working to enable GPU-accelerated numerical computations (Elixir Nx) and Jupiter Notebook style collaboration and code sharing.
If you're primary goal is to learn something fun that's also great for getting actual work done, you'll probably really like Elixir.
My recommended introduction would be installing it, and running through their official guide from the top:
Key points:
- Most respondents are junior-mid developers.
- Clojure was written by an experienced developer (Rich Hickey) and is adopted mostly by experienced developers.
- Clojure is not beginner-friendly, however it is extremely pragmatical.
- The appreciation of pragmatism over perfectionism is an acquired taste, which takes time and experience to develop.
- It is remarkable how the love for Clojure came out despite its user base being so under-represented.
https://jessewarden.com/2021/01/in-search-of-the-best-functi...
F# in particular because of the established ecosystem and possibility to fall back to OOP if you need it, since it is multi-paradigm.
«JavaScript to ReScript» where he evaluates a lot of FP languages: https://youtu.be/dFHj1d9FG8M
NB: He’s all about static types though.
The "Web framework and technologies" section doesn't seem accurate to compare in a meaningful way.
For example, they have Node.js as a standalone option probably throwing off everything. Then these compare weird when put together as options: Next, Nuxt, React, Vue, etc.
Love it or hate it, jQuery was also #3.
2. Python is quick to write for scripts, one-offs, and things that don't need to the performance of C++.
3. The ecosystem is fairly stable and low-drama.
(Speaking as one of those C++ and Python devs.)
Ok I also use C# for the parts of game development where Python is too slow / not well integrated, but C++ would be overkill.
But web dev? No way. Trendy new languages? Meh.
I hear a lot of noise about rust but I still didn’t find motivation to commit to learn it
Can anyone tell me how the general Rust job market looks for you guys outside of things like Indeed?
- almost 33% of people have programmed professionally for less than 4 years
- just over 27% have programmed professionally between 5 and 9 years.
If that hunch is correct, it would explain why the data are so skewed towards people with less than 5 years of professional experience.
I used to search for solutions a lot more, nowadays, with the amount of content farming and spammy blog content, I feel a lot more averse to any search query at all.
The threshold is raised such that I really need to be stuck to go online and I will usually end up in vendor forums at some endpoint.
First of all JS technologies. Second overall.
I literally had to google them
Angular is steady while vue even trended downwards.
The absolute king is React. Clearly professional developers are choosing to go for it because it looks like a safe bet.
I was kinda surprised Svelte didn’t even show up given that people are calling it the next in line. I guess React will be the new jquery for a while.
I especially recommend people looking into SolidJS: https://www.solidjs.com/
Then, there is a community effect. We all know vite and vitest are originally from vue ecosystem. As people start using them, they are more exposed to vue.
Of course - youtube is not included; I imagine that'll really skew the graph
edit: shoot, I just checked and I actually purchased 98 courses.
So by Stackoverflow I “waste” few hours getting “less things done” my productivity is “worse” by gaining few days reducing time required for solving the issue.
Scratching my head here..
Ps. Thr survay seems extremely biased by getting mostly JS developers / freelancers to respond. Enterprise world looks completely differently.
That's why they called it a 'Developer Survey'.
Any ideas around why that could be?
One basic example: https://jobs.braveclojure.com/, five pages of jobs that are all about Clojure (and some others languages + Clojure)
Not to mention when you're running a Clojure company and you go out to find candidates, most of them are really good and you won't have to look for very long, as long as you can compensate them well, as the competition between companies (for candidates) is fierce.
Good engineering principles translate across stacks.
Some examples of problems that I've seen Clojure excel in solving: 1. Complex rule modeling 2. Optimization systems 3. Big Data pipelines 4. Highly concurrent systems 5. Streaming systems
For comparison:
Ruby - The meetup group of the tiny Ruby community (confirmed by experience) has 329 members: https://www.meetup.com/ruby-meetup-oslo/
Imba - The meetup group of the niche full-stack web programming language Imba, has 134 members. https://www.meetup.com/imba-oslo-meetup/
1. Git Is the King: The Use of Git Is Increasing Year by Year
2. Version Control Universe: GitHub, GitLab, Bitbucket, Azure DevOps
3. Docker Usage Is Increasing Year by Year
4. Docker and Kubernetes Are in Every Developer’s Toolbox
5. Communication Matters: Developers Love Slack
6. You Probably Have Knowledge Silos As Productivity Killers
7. Smaller Organizations Often Tend to Be in the Office
8. Developer Experience: Processes, Tools, and Programs Within an Organization
Read More: https://betterprogramming.pub/stack-overflow-2022-developer-...
A) The most senior programmers simply don't visit Stack Overflow that much
B) The more senior you get, the less actual programming your work entails, and you again visit Stack Overflow.
Or something similar.
28% is still pretty good compared to Java's 33%.
Perhaps we should add Braille to our business cards besides the he/him they/them descriptors.
C suite/VP that receive salary that is substantially higher than engineering managers don't sit on StackOverflow.
I recall looking for it in previous surveys but couldn't find it.
This is what I am afraid of. It leads to an arms race where everyone now has to code outside of work to be competitive.
As someone who values work-life balance, this is a worrying trend.
But who are these 1.38% of professional developers who self-report that they do not use version control? Please rethink your life...
I tried looking for word with CMD+F and the section I was looking at completely disappeared!
How stackoverflow builds this in when flashing content is such a common annoyance, I don't know. Sure, you don't want to load a megabyte of data for when people open the page for just 2 seconds, but there are animations on top of the lazy loading, the actual data is not that large anyway, and the loading distance is not hard to increase either.