8,487 karma · joined Feb 1, 2017 (9y ago) · 2,549 submissions
comment 6y ago · link · parent
This alone gives me a huge productivity boost and I can't imagine working without it. It just so happens that anecdotally I see runtime errors inversely frequently to my discipline with using hints (go > python w/ hints > python w/o hints).
I like having some wiggle room for rapidly hacking stuff out. interface{} and Any are nice in small doses. Namely as parameter types and only when I'm the only one using the code and just need to ducktype my way through something.
comment 6y ago · link · parent
comment 6y ago · link · parent
Really, we need more fiber optic everywhere. It's easier to hack on, because cable modems are technically radios, and run into the usual FCC red tape. Plus, fiber is just better.
comment 6y ago · link · parent
I think in part it's because the POSIX-style shell is so tightly wound with the OS, it's extremely proficient at spawning and forking processes, working with files, and communicating, and that experience is seamless. Python feels like a different world, and doing any subproc, pipes, or file i/o always feels like crossing some boundary and back.
comment 6y ago · link · parent
Plumbum is cool, but now I have an extra [""] for every command, and I need python and a lib (which usually means an env as well) to bring an app up.
On the other hand, I try to migrate as much business logic into the app as possible, and increasingly kv as well, so bash is pretty much pointing at config files and commands.
comment 6y ago · link · parent
this·is·variable·one
Vs one two three
Now I just use an ergodox ez (qmk-driven) keyboard with _ in an easy spot and snake_case everything but people says it's "ugly" or some bs (camelCase, especially with initialisms, drives me nuts).comment 6y ago · link · parent
So I've been working on a backup plan. Current incarnation is to use a simple Go cli tool with Shamir's secret sharing algo to break a password into N/M shards. The user can then do whatever they please with the shards, give some to their family, friends, attorney, make a pirate map, get an rfid chip, anything you want.
comment 6y ago · link · parent
That may be still in the range for mercaptan tracer gas olfaction, in which case carbon would decrease the smell, but that's about it.
comment 6y ago · link · parent
I think they are still iterating a fair bit on the micro tractor. But overall it seems there was a flurry of activity around 2014 but then it has tapered off.
IMHO, I think they set their sights a bit too high, with the whole construction set. Would have been better to focus on just the tractor first, getting the documentation really hammered out. It is such an essential piece of farm equipment. But as it stands, nothing on their wiki is really viable to contribute to, because you can't really work off of it.
comment 6y ago · link · parent
Oh, I never thought of it that way, but that makes perfect sense. I guess I just assumed messages would be collections of pointers and buffers living "somewhere" in memory, but of course the actual layout can make a ton of difference.
I guess there is an implicit rule that if you are dealing with inbound structures in a read-only fashion, passing around the serial structure is OK for when the field access cost is minor compared to the copy cost, but if you want to mutate it, or doing lots of access operations where that isn't trivial, it makes sense to copy into your own data structure.
comment 6y ago · link · parent
TODOs should be an adjunct to the issue tracker. An issue could be "Clean up/resolve all TODOs in module qux". but each of those comments on there own are rarely worth the issue on their own.
Also not every project has the FTEs or the scope to hit every TODO in the first pass. Maybe it's all a glorified demo and these are "Road closed" points to be enhanced/hooked in to in the future.
comment 6y ago · link · parent
This applies to surprisingly many tasks in life.
That said, I've been pushing to hit 100 wpm typing with minimal typos for years just because it's a nice round number and I keep ending up just shy. Character typos aren't even that big of a deal, as I find a good chunk of mistakes are actually "thought-os" where I type in the completely wrong giraffe. So being able to recover dynamically from misakes is valuable too.
comment 6y ago · link · parent
Type hints and doctests.
If that doesn't get you to pretty big static typing wins, then you are probably just dealing with a toxic codebase or something.
comment 6y ago · link · parent
Even just a smattering of type hints helps dramatically, as a few well placed hints on the APIs I know the least, gives me a huge boost.
comment 6y ago · link · parent
The thing that my workflow really needs now is a way to organize/focus specific windows (e.g. a particular IDE window or browser). like I want to be able to assign (on the fly) hotkeys like Alt-1 Alt-2 etc to specific windows.
This is Ubuntu 18 though if such a thing is easier on Mac I could make that my main dev environment (I'm thinking of switching soon anyways once I port my workflow)
comment 6y ago · link · parent
Like, yes python constrains package names to the folder names. But why not check a flag so I can let the emitted python structure dominate the folder structure? Or, easier, just let me ignore the folder structure and specify a dang top-level-package in the emitted _pb2.py and let me wrangle it with setup.py?
[0] - https://github.com/protocolbuffers/protobuf/issues/90
[1] - https://github.com/protocolbuffers/protobuf/issues/1491
comment 6y ago · link · parent
Protobufs are the worst (de)serialization format, except for all the others.
My chief complaints are:
- Protoc is very obtuse and tricky to use for anything where you want packaging, especially with python
- The gRPC compiler plugin is even more frustrating in this regard
- It's very optimized for compactness on the wire, at the expense of serving as a useful structure within programs (I can't find the source, I think it's somewhere in the protobuf dev docs, but I've had multiple coworkers tell me this)
- The gRPC server python implementation does weird things with multiprocessing under the hood that I do not understand, which interferes with other modules trying to use multiprocessing.
- I still have not found an ideal way to organize files to work well with importing and still compile correctly with protoc/grpc plugin, and generate python files with correct import syntax. If anyone knows the "correct" way to do this that doesn't require too much setup.py hackery, please let me know.
External schema '.proto' files is a feature, not a bug.
The complaints in the article about the type system are pretty silly to me. I mean, they are great features, but they are not really in the sphere of the engineering goals when Google set out to make pb/gRPC.
Here's what I love about it though:
- Support, in particular gRPC's support across so many languages.
- Language agnostic data structure contracts
- Shallow learning curve to get a smoke test hello world put together - I found it a lot easier than Thrift to get up and start playing
To quote hardwaresofon:
> in combining three solutions (schema enforcement, binary representation and convenient client/server code generation), they've created something that's just easier to use
Specific comparisons:
Cap'n proto looks great on paper but at the time (about a year ago) it had some issues with python2.7 and 3.6, which made it a nonstarter for the application at the time.
MsgPack-RPC might work well but I'm a bit dissuaded by the unhealthy looking repo of the python/go/cpp implementations.
Anything over HTTP - you have the binary-to-text issue. Which, if there are better solutions for this nowadays, let me know.
I believe that XML is dead/dying as a ser/de format (outside of the markup domains it has already demonstrated to be very proficient at). Similar lack of binary support.
That leaves Thrift and Avro, which have juuust enough of a barrier to entry, with my lack of time to dig into alternatives, that I have not been able to research thoroughly yet.
comment 6y ago · link · parent
People are getting savvy to bots (used here to mean all variety of inauthentic social media accounts). The one-track tweets approach doesn't cut it anymore, you need a modicum of authenticness. That's why we are seeing Deepfake profile pics and much more effort going into fleshed out bot accounts, getting friends and followers, and multifaceted story feeds.
It's a classic infiltration technique. Get in, silently grow your roots under the radar, before deploying the payload.
comment 6y ago · link · parent