News for hackers. Stuff that matters.
Re:Advent of Code Surveys: Results by petargyurov on Friday December 24, 2021 @04:25AM (#29671961)
Interesting to see VS Code gain more users each year whilst other popular editors/IDEs lose users.

Not necessarily an indication of actual user base; could just be that more/less devs of each "group" are deciding to participate.

Side note; I decided to move from PyCharm to VSCode and honestly, I am starting to miss PyCharm. Yes, it's sluggish to boot but it handles Python so much better: better inspection, highlighting, better Git integration (3-way merge!) and better tooling all round.

I find myself having to mess around in VSC's settings.json for far too long, scrambling to find the relevant extensions documentation because god forbid you include all the keywords somewhere easy to find in the IDE! And to top it all off, there's currently some annoying bugs with error highlighting in VSC that make it a pain to use.

Re:Advent of Code Surveys: Results by dogsandcats on Friday December 24, 2021 @06:03AM (#29672582)
> Not necessarily an indication of actual user base; could just be that more/less devs of each "group" are deciding to participate.

Could be also AOC getting more popular and hitting the developer mainstream more, hence skewing the percentages more in favor of mainstream tools. The absolute number of devs from "fringe" groups might have stayed constant.

Though VS Code is also getting quite popular in general, so probably that too. It is quite lightweight, just works and setting up new languages is a matter of a few clicks. Honestly the only reason I am not using it (other then not trusting or wanting to support Microsoft), is that the VIM emulation does not feel quite right for me.

Re:Advent of Code Surveys: Results by dharmaturtle on Friday December 24, 2021 @09:12AM (#29673711)
FYI you can use VSCodium, the de-Microsoft version, with the neovim plugin, which uses real neovim and not emulation.

https://vscodium.com/

https://marketplace.visualstudio.com/items?itemName=asvetlia...

https://www.youtube.com/watch?v=g4dXZ0RQWdw

(As a newb I'm finding this to be a good way to learn vim without massacring my productivity.)

Re:Advent of Code Surveys: Results by matsemann on Friday December 24, 2021 @04:34AM (#29672033)
Or that using an editor instead of an IDE doesn't matter as much for these small tasks where everything fit in one file?

I'm a big JetBrains fan, and now use PyCharm at work. But there is something about Python making IDEs not as useful as it is in other languages. Too much magic and weirdness in the language makes it harder for tools to do a good job.

Re:Advent of Code Surveys: Results by the_duke on Friday December 24, 2021 @10:23AM (#29674299)
The whole "VS Code is an editor, not an IDE* argument doesn't hold water anymore.

There are decent to great LSP clients for many languages. VS Code has git integration. And by far the richest plugin ecosystem of any editor/IDE.

Yes the Intellij solutions are often better and top notch for languages like Python/PHP/Go/...

And everything feels more integrated and coherent.

But VS Code is still very far beyond a dumb text editor.

Re:Advent of Code Surveys: Results by CodeGlitch on Friday December 24, 2021 @12:37PM (#29675596)
I just tried VsCode for Java development. Frankly I wasn't expecting much as Java is one of those languages that requires a lot of ide features to be useful. Previously used heavyweights like eclipse and Netbeans.

And you know what? Installing the official Java plugin results in a really nice experience. The debugger is good, the hints and documentation work. Not tried the refactoring tools under anger yet though. I didn't have to touch any of the settings.

Hats off to Microsoft.

Re:Advent of Code Surveys: Results by tzs on Friday December 24, 2021 @10:59AM (#29674621)
I haven't really used it extensively, but so far VS Code reminds me of that quip people used to make about Emacs a long time ago: it is a pretty good operating system but needs a decent text editor.

I don't do anything that needs or even benefits much from a ton of extensions. I'd expect someone who is would find VS Code amazingly useful (unless they were overwhelmed by the very large number of available extensions).

Re:Advent of Code Surveys: Results by jstx1 on Friday December 24, 2021 @11:55AM (#29675169)
Extensions are imporant to give you full support for a given language which essentially turns VSCode from a text editor into an IDE for said language. The rest of it is small modifications, cosmetic changes and convenience.
Re:Advent of Code Surveys: Results by Tarq0n on Saturday December 25, 2021 @10:40AM (#29684138)
I think a major selling point of vscode is that it can productively edit anything. Your project happens to include some secondary languages like markdown, yaml or css? No problem. Same for polyglot developers or codebases. This way you never run into the limits of a language-specialised IDE.
Re:Advent of Code Surveys: Results by strogonoff on Friday December 24, 2021 @05:33AM (#29672409)
I’ve started using VS Code with Python recently.

There was an unpleasant surprise in that Pylance silently pulls unvetted third-party typings with not even an opt-out—resulting in typing mismatches across versions, in addition to generally exhibiting too implicit of a behavior for my taste. (Coming from Python pre-typings originally, I have grown to appreciate TypeScript’s model where user is asked to install typings explicitly if missing.)

So I ended up using VS Code with Python extension but Pylance overridden as disabled, and with mypy and flake8 installed in your environment (and enabled in VSC) it actually works fairly well, showing errors and warnings from both.

Can’t remember whether I had to edit settings.json or not, but it took some time to hunt down relevant settings.

Re:Advent of Code Surveys: Results by thow_away_soon on Friday December 24, 2021 @11:57PM (#29680552)
> I decided to move from PyCharm to VSCode and honestly, I am starting to miss PyCharm.

I'm a vim user and had to use PyCharm on a previous job, and it wasn't half bad. I'd take IntelliJ before VSCode if I had to.

> Not necessarily an indication of actual user base; could just be that more/less devs of each "group" are deciding to participate.

I found no data regarding this, but I have the impression that new developers are getting into VSCode, and maybe those younger ones are skewing the editor/IDE usage. I'd like to see a survey about editor/IDE migrations, it would be interesting to see where people start and with what people settle.

Re:Advent of Code Surveys: Results by prometheon1 on Friday December 24, 2021 @09:25AM (#29673805)
To find settings of an extension I always use the settings gui, it has way better discoverability, so far searching for the name of the extension and approximate keywords yielded the setting I needed quite quickly. I use settings.json to check or change settings I already know, and for sharing them with others.
Re:Advent of Code Surveys: Results by welder on Friday December 24, 2021 @09:41AM (#29673933)
It matches the WakaTime results (not a survey, just stats on IDE usage when WakaTime plugin is installed).

https://wakatime.com/a-look-back-at-2020

Change the url to 2021 to see the new results after midnight Jan 1 2021.

Re:Advent of Code Surveys: Results by Barrin92 on Friday December 24, 2021 @12:52PM (#29675810)
anecdotally this year was the year that made me switch to vscode after being an emacs user for a long time (last exception still being clojure/cider)

Two points were Dendron which finally is a good enough org-mode replacement for me and the lack of having to battle with extensions and packages in elisp. Config sync as well as the pretty much one-click full setup for almost every language is pretty great.

Re:Advent of Code Surveys: Results by jstx1 on Friday December 24, 2021 @05:27AM (#29672372)
For me this year AoC was a lot less fun that last year. As soon as the problem required reading it multiple times to figure out what it's even asking of me, I just gave up. Might be my own state of mind or the puzzles being more tedious, I don't know.
Re:Advent of Code Surveys: Results by wdroz on Friday December 24, 2021 @06:31AM (#29672738)
I gave up at the day 03, trying to quickly understand the wall of convoluted text at 6 a.m. without coffee as "hobby" was too much for me. Then As I were no longer in the tops of our internal leaderboard, I just leaved it and move on.

At least I wasn't sleep deprived the whole month like my coworkers.

Re:Advent of Code Surveys: Results by Waterluvian on Friday December 24, 2021 @07:52AM (#29673193)
Exact same for me.

That’s fine. It’s just not for me I guess.

Re:Advent of Code Surveys: Results by keyle on Friday December 24, 2021 @05:48AM (#29672491)
It might have been your state of mind?

I spoke to a couple of other people that did the previous years, and I found it myself, it was significantly "easier" this year. Let me be clear, not "easy", but "easier" :)

I agree about reading it twice or thirce or quadrutrice (ice, ho ho ho), sometimes you're reading it and all you want is "just tell me what to do!"

Re:Advent of Code Surveys: Results by rakejake on Friday December 24, 2021 @09:46AM (#29673987)
Upto Day 16 or so I would have agreed, but the difficulty really ramped up in the last week. Part 2 of Days 21, 21 were much harder than anything I did last year IIRC.
Re:Advent of Code Surveys: Results by sundarurfriend on Friday December 24, 2021 @11:09AM (#29674703)
I agree with both these observations. The problems felt easier this year than the last (which is the only other one I've done), but the last week or so they got not just difficult, but complex in a not-so-fun way. I do plan to tackle them slowly over the next few months though, when I have time (and after I'm finished with [Rosalind](http://rosalind.info/problems/list-view/)).
Re:Advent of Code Surveys: Results by matsemann on Friday December 24, 2021 @05:54AM (#29672531)
I found them less tedious this year. Maybe not easier, but some times earlier years I've felt that I know how to solve a problem, but it's so many cases to consider that I won't bother coding them all up (probably means I could've solved them more cleverly, though). This year it was more straight forward. Except getting rotation in day19 right I guess, which I didn't bother.
Re:Advent of Code Surveys: Results by jeroenheijmans on Friday December 24, 2021 @02:26AM (#29671231)
Ooh <3 to whomever posted my AoC pet project here :-)

Tip: the datatable for "Reasons to participate" contains some of the most heartwarming stuff you'll read all day.

Happy holidays y'all!

Re:Advent of Code Surveys: Results by culi on Friday December 24, 2021 @04:47AM (#29672126)
Developer Survey 2021: • (url) https://insights.stackoverflow.com/survey/2021 • (num) 80,000+ • (by) StackOverflow

State of the Developer Ecosystem 2021: • (url) https://www.jetbrains.com/lp/devecosystem-2021/ • (num) 31,743 • (by) JetBrains

State of the Octoverse 2021: • (url) https://octoverse.github.com/ • (num) 12,000+ • (by) GitHub

State of CSS 2021: • (url) https://2021.stateofcss.com/ • (num) 8,714 • (by) Sacha Greif

Advent of Code 2021: • (url) https://jeroenheijmans.github.io/advent-of-code-surveys/ • (num) 4,245 • (by) Jeroen Heijmans

Awaiting: State of JS 2021, any other major ones?

Re:Advent of Code Surveys: Results by yodelshady on Friday December 24, 2021 @04:47AM (#29672124)
Compared to last year: I moved from Python to Rust, VSCode to neovim, and having no work or social life to having some. I suspect the latter is the primary reason I only got to day 14 this year.

That said, it is definitely easier, by a mile, to throw away an approach that turns out to be faulty in Python, which means it's easier to try it in the first place. It's easier to simply write down the approach and figure out the implementation when you need to as well.

Interested in getting more out of vim, so far I'm quicker for some things, but I'm not convinced I'm quicker overall.

Re:Advent of Code Surveys: Results by ducharmdev on Friday December 24, 2021 @01:29PM (#29676240)
I also switched from python to rust, and it sure was rough haha. The compiler is a stern but effective teacher; I felt like I was constantly fighting the language, but primarily because of my lack of understanding of ownership (not rust's fault!).

The Dijkstra stuff on day 15 is what ended it for me; like you said, python makes it easier to prototype stuff, so if you need to learn/relearn algorithms you never use day to day, it's so much more forgiving.

Re:Advent of Code Surveys: Results by johnchristopher on Friday December 24, 2021 @03:33AM (#29671595)
chuckles at vim having 3 times more usage than emacs :].
Re:Advent of Code Surveys: Results by rich_sasha on Friday December 24, 2021 @05:04AM (#29672228)
They are probably people who tried it once and still can’t exit.
Re:Advent of Code Surveys: Results by falcor84 on Friday December 24, 2021 @11:52AM (#29675135)
I'll just leave this here - https://github.com/hakluke/how-to-exit-vim
Re:Advent of Code Surveys: Results by dharmaturtle on Friday December 24, 2021 @09:18AM (#29673764)
I'm simultaneously learning neovim (by embedding it in VS Code) and emacs (primarily for magit - might learn org-mode later). Not sure why, but previously I never considered the possibility of being able to use both - I thought they were mutually exclusive.

I don't have many good things to say about vim or emacs's window/frame/buffer management... too used to VS Code/Chrome style tabs. Let me see what I have open damnit.

...turns out I just need to google it. Its `set showtabline=2` for vim and `M-x tab-bar-mode` (or `M-x tab-line-mode`) for emacs. Derp.

Re:Advent of Code Surveys: Results by johnchristopher on Friday December 24, 2021 @02:27PM (#29676911)
I just use, hmmm:

  `tt` binds to `:tabnew`
  `gt` binds to `:nexttab`
  `gT` bindts to `:prevtab`
I can `vsplit` (yeah diff!) and `vsplit` again and I can do `split` and I can do hmmm, `ctrl shift hjkl` to cycle. Anything more I can't. I am bad at managing and mentally mapping buffers. Ditto for `tmux`. It's easier for me to manage multiple windows (yeah tiling manager!) than vim/tmux's buffer. Aaaand I can recycle that knowledge for any apps.
Re:Advent of Code Surveys: Results by ducharmdev on Friday December 24, 2021 @01:18PM (#29676118)
Have you tried spacemacs with vim keybindings? That may be right up your alley. Personally I still prefer VSCode + vim, but I did use spacemacs for it's org mode for a bit.
Re:Advent of Code Surveys: Results by Dowwie on Friday December 24, 2021 @04:27AM (#29671980)
... By those who visit the advent of code subreddit.
Re:Advent of Code Surveys: Results by keyle on Friday December 24, 2021 @05:51AM (#29672516)
Yep.

3 times more key presses! /s

Re:Advent of Code Surveys: Results by fulafel on Friday December 24, 2021 @12:34AM (#29670607)
Cool that Clojure (1.2%) is this high up, between Ruby and PHP.

Scala and F# also make it to ~ 1%.

TypeScript scored lower than I would have thought - used by 3.3%.

Scala and F# also make it to

Also that the long tail of languages makes up 22%!

Re:Advent of Code Surveys: Results by llimos on Friday December 24, 2021 @03:30AM (#29671583)
I used TypeScript one year, and found that for this kind of problem there are basically no benefits over JavaScript, and because of that it's also not a great way of learning TypeScript.
Re:Advent of Code Surveys: Results by tluyben2 on Friday December 24, 2021 @03:39AM (#29671635)
For this kind of thing JS is actually good as you can do messy things fast without worrying. Like a few of the problems this year benefitted from being able to mutate structures while iterating over them; I would never do that in production code but for fast hacking/golfing it is an excellent footgun. I did a lot last year in Rust and k (the polar opposites?); Rust was really annoying for this kind of thing.
Re:Advent of Code Surveys: Results by ranguna on Friday December 24, 2021 @04:07AM (#29671832)
Yep js is pretty great but I don't think it can best python for this kinda stuff, python has so many helper functions around these kind of problems where you'd have to constantly reinvent the wheel with js. And I shared the same opinion as about the this type of code. Not a fan of python in prod, but typescript all the way
Re:Advent of Code Surveys: Results by jeroenheijmans on Friday December 24, 2021 @02:32AM (#29671262)
Excel+Sheets taken together even >1.2% :-)

And 3 respondents answered they use their own custom language :O

Re:Advent of Code Surveys: Results by tluyben2 on Friday December 24, 2021 @03:51AM (#29671712)
Yes, this year I redid all my solutions in our own language (been working on it for 2 years with a friend) after submitting; to test how will it works for these cases. I must say, next year we'll definitely do it fully in our language.
Re:Advent of Code Surveys: Results by jeroenheijmans on Friday December 24, 2021 @04:26AM (#29671967)
That's absolutely amazing!!
Re:Advent of Code Surveys: Results by not2b on Friday December 24, 2021 @02:02AM (#29671098)
I've gotten through the first 16 problems, haven't had a lot of time to work on it. Mostly used python 3, for a couple of the easy ones at the beginning I just solved them with shell tools (I think it was simple sed or awk one liners). And Emacs.
Re:Advent of Code Surveys: Results by DickieStarshine on Friday December 24, 2021 @07:15AM (#29672988)
I love Julia for AoC, especially for matrices. It's just that good and I'm surprised more python people don't use it.
Re:Advent of Code Surveys: Results by ellisv on Friday December 24, 2021 @09:32AM (#29673870)
Every language has their own conveniences but, I agree, Julia is well-suited for these types of problems.

I’ve used Julia previous years but I didn’t use Julia this year because it’s been more difficult to gain traction with it professionally.

Re:Advent of Code Surveys: Results by heinrich5991 on Friday December 24, 2021 @05:41PM (#29678474)
Python's numpy has great support for matrices and all kinds of matrix operations.
Re:Advent of Code Surveys: Results by swyx on Friday December 24, 2021 @01:25AM (#29670883)
surprised to see Windows users so high in the survey. any selection bias going on here?
Re:Advent of Code Surveys: Results by matsemann on Friday December 24, 2021 @04:27AM (#29671981)
Is the bias perhaps on your side? There is a big world outside the US west coast.
Re:Advent of Code Surveys: Results by nickjj on Friday December 24, 2021 @09:28AM (#29673832)
Windows with WSL 2 is really good for general development. You can essentially use Windows as a shell of an OS to run certain tools that don't work great on native Linux while spending a majority of your time in a terminal treating the experience as native Linux. Docker is also extremely fast with no volume performance issues.

We all know the "other" issues with Windows but besides privacy (which feels disgusting to even say btw), it's really solid, fast and feels ok to use. I do a ton of dev / ops related work on it and don't have too many complaints from a technical standpoint -- lack of a first class tiled window manager is the only big one that comes to mind.

Re:Advent of Code Surveys: Results by tzs on Friday December 24, 2021 @11:30AM (#29674908)
Windows was the most used desktop OS for development before WSL. Here's the 2015 Stack Overflow survey, which also includes the 2014 and 2013 results for comparison [1].

Here's the 2021 survey's OS results [2]. It shows higher WSL usage than the AoC survey, but still only 3%.

[1] https://insights.stackoverflow.com/survey/2015#tech

[2] https://insights.stackoverflow.com/survey/2021#section-most-...

Re:Advent of Code Surveys: Results by flohofwoe on Friday December 24, 2021 @06:31AM (#29672734)
I'm rather surprised that Linux and macOS are so high. Different bubbles I guess.
Re:Advent of Code Surveys: Results by aero-glide2 on Friday December 24, 2021 @02:14AM (#29671164)
I'm surprised to see Linux usage so high.
Re:Advent of Code Surveys: Results by simion314 on Friday December 24, 2021 @02:20AM (#29671200)
Why so surprised? I never had a colleague ever using Linux like myself,everyone uses Windows and one time a person also owned a OSX machine. It is obvious that there is a big bias, people that have the time and still enjoy coding puzzles and probably some other groups of people that I don't know about(I never participated).
Re:Advent of Code Surveys: Results by IshKebab on Friday December 24, 2021 @06:20AM (#29672670)
The selection bias is in the task itself. Windows is far more popular among non-developers.
Re:Advent of Code Surveys: Results by flohofwoe on Friday December 24, 2021 @06:32AM (#29672745)
Game development also happens almost exclusively on Windows. Linux and macOS seems to be more popular with the backend- and web-dev crowd though.
Re:Advent of Code Surveys: Results by rich_sasha on Friday December 24, 2021 @05:07AM (#29672255)
I’m surprised Python is so high and ahead of everything else.

The problems in AoC are quite easy, broadly speaking. So to me the appeal is to use a novel toolset. New language, new platform, etc. Someone on HN mentioned org-mode+CL.

Python is great, but not very novel. Are there that many people learning it on AoC? Or am I missing the point?

Re:Advent of Code Surveys: Results by dogsandcats on Friday December 24, 2021 @06:36AM (#29672766)
Honestly, most of my junior-level coworkers would not even be able to do the first days without help.

Those AOC tasks are training for skills most developers don't really need or train much (except maybe reading comprehension). Most code is quite boring, especially web dev stuff. Most of the interesting stuff is handled by external packages, you are just supposed to pipe it all together. It is still quite complicated work sometimes but in a very different way. It is only few developer that get to work on truly interesting stuff on their day job.

So the great thing is that AOC has something for everyone. A junior can take his programming skills to the next level, flexing some muscle he doesn't otherwise get to use. Advanced people can use it to either get to know a new language or take on code golfing and learn to abuse their favorite language in a new way.

Re:Advent of Code Surveys: Results by globular-toast on Friday December 24, 2021 @07:46AM (#29673158)
> Honestly, most of my junior-level coworkers would not even be able to do the first days without help.

Many of my senior level colleagues can't do them either. This says more about job title inflation than the difficulty of these puzzles, though.

I did it in Python (well, most of it) because this isn't the stuff I usually do. I use Python for moving data around mainly, with maybe once per year I do something more exciting. So for me it's about exercising my favourite language in ways I wouldn't otherwise be doing.

I did actually give up this year, though. When it came to the 3D coordinates puzzle I realised I would have to learn numpy and a bit of linear algebra and I just didn't have the time. Maybe I will pick up where I left off over the holiday period.

Re:Advent of Code Surveys: Results by weatherlight on Friday December 24, 2021 @10:31AM (#29674370)
I noticed this as well. A lot of my coworkers had given up by day 4 this year.

I decided to go outside my comfort zone and do it in a language that I don't work in. (I work primarily in Ruby, did it this year in Elixir.)

I had a blast honestly! I was a great way to learn a language and get some daily practice in.

Re:Advent of Code Surveys: Results by jstx1 on Friday December 24, 2021 @05:20AM (#29672334)
Every AoC problem boils down to the task of "read and parse this text file, write a small script with an algorithm to compute something with the input (maybe doing this for time) and you aren't bound by the performance of your machine or your language". Python is one of the best languages for that task. If you had to do anything similar in the real world, you wouldn't

I also don't think that the problems are that easy. With Python I can focus more on solving the problem instead of trying to fight a new language (or to force a language into a task for which it isn't all that great).

Re:Advent of Code Surveys: Results by sokoloff on Friday December 24, 2021 @09:43AM (#29673961)
I’m using AoC to learn Clojure this year. I found Day 14 part 2 to be performance-bound (the naive solution that worked fast for part 1 didn’t for part 2).

I have to cycle back to it to use a smarter algorithm for part 2.

Re:Advent of Code Surveys: Results by jstx1 on Friday December 24, 2021 @09:59AM (#29674110)
Right but you aren't performance bound by the language - rewriting the brute force for day 14 part 2 in C won't get you anywhere. I think that Eric tries to design the puzzles and the inputs in a way that

- a well implemented smart solution runs in a reasonable time even in a slow language on a slow computer (this is what I meant by not being performance bound)

- some of the exponential growth puzzles can't be realistically brute-forced even with a fast machine and a performant language (like the example you mentioned)

Re:Advent of Code Surveys: Results by sokoloff on Friday December 24, 2021 @10:47AM (#29674530)
Ah. I get what you’re saying and agree strongly.

I mis-read your intended (but clear enough) message the first time.

Re:Advent of Code Surveys: Results by rjh29 on Friday December 24, 2021 @09:20AM (#29673775)
Problems beyond day 10 or so start to get more difficult and take 30-60 minutes to complete. Learning a new language on top of implementing the algorithm would make it take even longer. Not all of us have that much free time.
Re:Advent of Code Surveys: Results by keyle on Friday December 24, 2021 @05:50AM (#29672507)
Learning python might not be the primary reason. A lot of developers spend their life glueing frameworks and APIs together, so they do AOC for practicing/learning algorithms. Python3 allows you to be mostly reasoning about logic at a high level without worrying about much else than the algorithms.
Re:Advent of Code Surveys: Results by iovrthoughtthis on Friday December 24, 2021 @05:08AM (#29672262)
i think for many, they are not easy
Re:Advent of Code Surveys: Results by fulafel on Friday December 24, 2021 @06:57AM (#29672884)
They're not that easy for a daily calendar, lots of experienced people have reported spending hours on many of the tasks.
Re:Advent of Code Surveys: Results by MattRix on Friday December 24, 2021 @09:26AM (#29673816)
Yep, and it’s also worth noting that the tasks get harder over the month. If someone only looked at the first few days, that would seem easy. On the other hand, the past few days from day 19 onward have been quite tricky.
Re:Advent of Code Surveys: Results by fgblanch on Friday December 24, 2021 @07:07AM (#29672932)
Thanks for posting it. Nice stats, it would be great to see the stats by country and developer ternure.
Re:Advent of Code Surveys: Results by mikewarot on Friday December 24, 2021 @05:31PM (#29678401)
The problems heavily push towards a REPL oriented environment if you want to finish in a reasonable time frame. Python comes out on top because that's how you get complex data structures spun up in a few seconds.