Like others mention, this is inspired by ggplot2, a Grammar of Graphics library.
The whole idea is graphics are composed by adding "layers", not like layers on a canvas, but like pouring paint into a pot, then the library understands the content and paints it to the canvas.
Layers might be pure data, geometry (lines, points, ...), annotations, styles, axis, etc.
When you get familiar with it, it's much more natural way of describing plots, better composition and easier exploration
And a side note, R actually includes a pipe operator (as in Unix `|`), and said if they'd know about it at the time, they would have never used the `+` operator
Because, in the latter case, you have to declare a function argument for /every possible option/ that you want your graphics API to expose, and you need to do this every time you add a new option.
On the other hand, declaring the options through composition means that the API for "plot" remains static, and adding/removing options can be done trivially without an API change.
Composition (rather than parameters) is also more flexible. Let's say you want to divide your plot into three sub-plots, two of which are 200x200, and another which is 200x400. How do you express this as a keyword parameter? In composition, you could do something like:
Isn't this somewhat the point of python's override capability? You can exactly define what addition means here, just like you have to define what addition means for a matrix or another data structure.
Separately you might find this to be smelly design, but then you should remember that this at least has precedence ¯\_(ツ)_/¯
Honestly operator overloading is almost always a bad choice IMO. There are cases (e.g. matrix math) where it's the right choice because of semantic clarity, but the indirection it creates in exchange for readability is costly. It's always obvious when a function is being called, and how to navigate to the implementation, but the same is not true of overloaded operators.
Well, it's like most tools. For this particular use, does it give more than it takes? If so, use it.
Matrix multiplication? Yeah, everybody knows there's a function being called. And, if it was implemented right, the users almost never have to look at the implementation.
Many other possible uses? Nope. Just nope. Not worth it.
Could you elaborate on what exactly does such syntax provide over kwargs? To me it looks like verbatim x=a, y=b replaced by x(a)+y(b) in the argument section.
Seems hard to give an answer to this that isn't just anecdotal. Certainly some died during COVID, but some came back to life!
Perhaps the lesson from seeing a group die is that often the old organisers don't have the capacity for it anymore, but are happy and supportive to see it live on if you approach them with motivation.
Every Meetup happens because a few people decide to make it happen
It's an unpopular opinion, but I swear that cable ties are a far more effective problem solver than Jesus/duct/gaffers tape. I always bring tie, and never tape
I'm basically developing on Linux despite running windows. I just set the terminal emulator to open wsl by default, and have VSCode connect to the WSL instance. This also gives you the "native docker" the author mentions, just ignore Docker for Windows exists and install docker in your wsl.
This does have downsides, and the author lists many. It also has some marginal upsides. For example running multiple distros for testing is trivial, and while the Windows file Explorer might be a shitshow that reached its peak over two decades ago it somehow seems to still be leagues ahead of the options in linux gui land. And of course the situation in gaming and content creation used to be way worse just a couple years ago, so for many switching only became viable relatively recently
That seems to be the preferred path for many devs on Windows - unless you can get your hands on a Mac at work WSL is much better/easier. Most non-software companies may not even offer a Linux laptop.
Both MacOS and Windows with wsl are perfectly fine for development. Especially MacOS.
There's literally nothing special about Linux when it comes to development. And there are quite a few downsides especially when it comes to some specialized tooling because many vendors often only have Windows tools for their devices.
I would have to agree with this. I don't understand people how say developing on Linux is somehow better. I have built C++ software across Windows, macOS and Linux and I can't say one is easier than the other at all. Perhaps it is because of the package management system that makes installing a compiler "easier" than downloading Xcode or downloading/running the Visual Studio installer??
I certainly don't find development tools better on Linux, particularly for C++ debugging. Windows/Visual Studio is the leader in that regard.
I have also done C#, PHP, Java, JS + web development across all 3 and don't see the difference.
I find a Linux host with a development guest OS the best to work in. It allows for snapshots, backups, and sharing development environments. Solution A might need a different environment than Solution B.
Funny enough, the bluetooth stack works better on a bare metal Linux box than a Windows one. Audio starts being played sooner.
This depends entirely on your stack and preferred workflow. MacOS is increasingly hostile to powerusers. If you don't mind following their golden path, all is fine, otherwise... I wonder how long before you have to enable a scary "developer mode" to install software outside the app store.
While that's true, I still don't have any issues running any stack on Mac (I've had Java, Python, C++, some Rust, Erlang/Elixir; previously I also had PHP and Ruby)
I guess I'd argue that "it depends on lot on what you mean by development".
For anyone hosting a product on servers (almost everything web related)... there IS something special about linux: It's where your product is going to run in production.
For folks who are doing work in other spaces, especially development that involves vendor provided physical devices: Then yes, I agree with you. Vendor support is almost always better for Windows, and sometimes entirely non-existent otherwise. I'll note this is starting to change, but it's not yet over the hump.
The only place I'd consider macOS as a "perfectly fine" linux alternative is mobile (and mainly because Apple forces it with borderline abusive policy/terms). Otherwise it's just a shittier version of linux on nice hardware, riddled with incompatible tooling, forced emulation problems, and a host of other issues. It's not really even "prettier" anymore.
> For anyone hosting a product on servers (almost everything web related)... there IS something special about linux: It's where your product is going to run in production.
I've been at several corporations and companies where the target OS doesn't matter in the least, and I've had multiple projects on my own where it was the same.
Most of development is so far removed from actual hardware and actual OS, it doesn't matter if your backend is developed on Mac and runs on Linux.
Before MS really started mucking things up the past few years, I was referring to WSL as my favorite Linux distro... MS took a LOT of the rough edges off in terms of development.
Did you have a particularly bad experience? Things have changed _a little_ since 1992.
I switched from Windows in 2018 because I was trying to install some Python packages, and it was hours of work to find the specific visual C++ runtimes that were needed to get them working.
As I understand it, it's somewhat the opposite for internal resistance. You need to have current limiting in place because the internal resistance of the cell is turning that current into heat, and heat is the enemy of batteries.
(Probably there's also a complicated chemical reason for current limiting that I don't fully grasp)
The correct solution here is to give credit for the problem to acknowledge genuine clever problem solving, and then offer extra credit for doing it the pedagogical way.
There is no correct solution here. A classroom is not a test environment.
The goal is to learn, and the point of the exercises is to teach a specific concept. If a student finds a different way around the problem, that may show that they're already proficient in other skills, but they haven't necessarily learned the concept being taught in this class yet. A good instructor would probably acknowledge the solution, but add extra boundaries to the task to get the student to explore the problem in a way that lets them encounter the testing difficulties discussed here.
It's like smuggling a calculator into a class about mental maths strategies: you'll probably do very well in the final test, but you won't have learned anything!
So soon the world forgets the words of President Thomas Whitmore:
We are fighting for our right to live. To exist. And should we win the day, the Fourth of July will no longer be known as an American holiday, but as the day the world declared in one voice: "We will not go quietly into the night!" We will not vanish without a fight! We're going to live on! We're going to survive! Today we celebrate our Independence Day!
Yeah . . . big news in the Congo as I recall, endlessly lauded in East and West Papua, nobody could shut up about it in Patagonia, a cause célèbre in the Chatham Isles.
The next day, everybody forgot about the 8 year civil uprising in the British colonies that kind of paled against the French Revolutionary Wars, the Napoleonic Wars, and all the other biffos of that time that went on longer and killed more people.
I have a hard time listening to him knowing how unsavory he tends to be in response to GitHub comments and issues. He has made some good tools for sure but his interpersonal comportment is quite off putting.