That made me wonder, so I went and tested edge cases, like "abc\"d\"ef", which black quite properly converts to 'abc"d"ef'. So it does use single quotes where appropriate.
I understand that. And this is what I like in Black. But the single quotes thing is really up to debate. When you use it with other tools such as flake8 or pylint, you have to disable a bunch of things to make them work together because no one agrees on this point.
Seen from outside, I think the double quotes are just the natural form of strings in lots of other places, at least in those that come from the same family than C (C++, Java, C#, Rust, just to name a few)
Also Prettier.js (which I'd call the "Black of JavaScript") also settled on double quotes. So we're left with a de facto consensus across programming languages as a whole, which kind of feels nice.
> When you use it with other tools such as flake8 or pylint, you have to disable a bunch of things to make them work together
Using Flake8 with Black requires only two configuration options [1], while Pylint requires three [2]. If you prefer to use Black with --line-length 79, then it's down to a single configuration option for Flake8 or two for Pylint.
You can have some basic configurable stuffs in an opinionated tool though, see Prettier. It allows tab/space, quote style, line length etc., to be modified.
Prettier has some options, but they are not happy about it, it's just how things happened and now cannot be "solved", i.e. remove them, albeit they would love being able to do that:
IIRC, the -S only avoid single quotes to get switched to double quotes. What I meant was allowing Black to switch double-quotes to single quotes automatically.
There’s also “blue” which I’m the author of and looks similar: https://pypi.org/project/blue/ would love to get your help and thoughts in the issue tracker or by email.
Great software. I have been using it for a few years now (and even made a few themes for it). The WYSIWYG mode is really the best feature for me and what made me picked this editor. I don't like the "Live Preview" mode on most of the editors because it opens a new window or make the main window really large.
Something I like too (not sure if it exists somewhere else) is the ability to copy/paste an article (let's say from medium) directly in the WYSIWYG mode. You basically get your article just like it is being displayed on medium: h1 detected, paragraphs, bold etc. OOTB. Really nice.
You can use the Network tab of your preferred browser to see the waterfall. HTTP2 did improve a lot, but it can’t magically resolve N-deep transitive imports without additional information. It was originally designed to have that information provided at the server level, but HTTP Push has been dead for a while. There are physical limitations at work, optimizing requests on the wire is still important.
I used this library to get familiar with Go. It is indeed very powerful and really easy to create a scraper.
My main concerns though were about testing. What if you want to create tests to check if your scraper still gets the data we want? Colly allows nested scraping and it's easy to implement but you have all your logic into one big function, making it harder to test.
Did you find a solution to this? I'm considering switching to net/http + GoQuery only to have more freedom.
Wow. I can't believe I've never run across this. Thank you. I gotta figure out how to rewrite addresses to this on Firefox mobile when clicking a link from Google searches.
It's shocking how much better it is. You forget just how many dark patterns have crept in over time.
I feel you. Sometimes I browse projects on GitHub and I'm astonished by what people can do and I can't. Example, OpenCore[0], a famous bootloader in the Hackintosh scene. How can people even start to code this.. Awewome work, awesome people.
Preface: I can't do this (specifically). But I have done many types of software development across two decades. My journey began with LAMP-style web work, took me to C++ and the desktop (apps, GUI toolkits, browser engines), then to embedded - from smart TVs to smart speakers, to network protocols for drone systems and beefy car infotainment ECUs and lower-level microcontroller/borderline electronics work.
My conclusion: You can get into just about anything, and for the most part the difficulty level is fairly uniform. But there's simply a vast sea of domain-specific spec knowledge out there. It doesn't mean that it's too hard for you or you can't learn it. Anything that is done at scale will fundamentally be approachable by most developers. Just be prepared you'll need to put in the time to acquire a familiarity with the local standards/specs and ways of doing things. Knowledge turns seemingly hard things into easy things, and if it's been done before chances are it's documented somewhere.
The truly hard stuff is innovating/doing things that haven't been done before. Novel development happens rarely.
Yeah, this is my conclusion too. I moved from the Oracle platform to embedded, scientific stuff like reading out custom electronics for IR cameras. And now I'm into iOS apps. It's more a question of what part of the stack feels interesting and doable to you, at a certain period in your professional life.
I ve done a bittorrent client, a 3D rendering engine on the PS3 and a printer driver for fun and while clearly not at the levels of a bootloader, I can have a few cookie points in interview for originality.
What I learned starting these daunting task (especially the ps3 which was closed specs), is that it s still done by humans and following familiar patterns. Most of the time you bang your head against unclear doc or go through successive layers of abstraction (to do a ps3 rendering engine, better know your basic openGL on PC, which is only possible if you know matrix and vector geometry) but EVERYTHING is possible to reach at a workable level (expert level I feel comes with money incentive, team mates and repetition). I spent 2 years on japanese, 3 hours a day, and could integrate the meaning of Haikus at the end.
I think the only true talent you must have is insane stubborness. To go through, a doc at a time. Usually after the first insane challenge (for me: learning english at a near native level, reading literature or discussing politics) of your life, you understand it s all pretty much time investment.
It can be daunting to look at a popular project in it's current state. Thankfully with Open Source Projects you can go back in time and see how the code evolved.
Here's [1] the first few commits to OpenCore. Much more approachable and inspiring.