Naming things in programming is pretty hard. It's not impossible, though. Here are some guidelines I usually follow.
Wikipedia's article about weasel words is incredible. In this context I mean words like this:
- Data
- Process
- Run
- Do
$ curl --help | |
Usage: curl [options...] <url> | |
--abstract-unix-socket <path> Connect via abstract Unix domain socket | |
--alt-svc <file name> Enable alt-svc with this cache file | |
--anyauth Pick any authentication method | |
-a, --append Append to target file when uploading | |
--basic Use HTTP Basic Authentication | |
--cacert <file> CA certificate to verify peer against | |
--capath <dir> CA directory to verify peer against | |
-E, --cert <certificate[:password]> Client certificate file and password |
package main | |
import ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"io" | |
"math/big" | |
) |
import { createTeleporter } from "react-teleporter"; | |
const HeaderTitleSlot = createTeleporter(); | |
const HeaderActionsSlot = createTeleporter(); | |
const AppLayout = ({ children: content }) => { | |
return ( | |
<> | |
<Sidebar /> | |
<Header> |
Naming things in programming is pretty hard. It's not impossible, though. Here are some guidelines I usually follow.
Wikipedia's article about weasel words is incredible. In this context I mean words like this:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
#!/bin/bash | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
Github Actions is a CI/CD platform that gained a lot of popularity recently. I participated in building ⭐️ Lighthouse CI Action and was curious how well it performs.
But Github Marketplace UI shows no ranking information. Essentially, It's a search with random results; at least, I don't understand the order. I couldn't find ⭐️ Lighthouse CI Action in Continuous integration category after browsing 50 available pages (Each page shows 20 results, so it's possible to see only 1000 results, but CI category has 1469 😐).
I decided to build a custom script that crawls all categories and use Github Search (example query) to estimate usa
$ FILE=/some/path/to/file.txt | |
################################### | |
### Remove matching suffix pattern | |
################################### | |
$ echo ${FILE%.*} # remove ext | |
/some/path/to/file | |
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |
void main() { | |
const sampleMap = <String, dynamic>{ | |
'key': 'value', | |
'anotherKey': 6220119, | |
}; | |
print(sampleMap is Map); | |
// [output]: true | |
print(sampleMap is Map<dynamic, dynamic>); | |
// [output]: true | |
print(sampleMap is Map<String, dynamic>); |
- final data = platformChannel.invokeMethod<Map<String, dynamic>>('getData', arguments); | |
+ final data = platformChannel.invokeMethod<Map>('getData', arguments); | |
or | |
+ final data = platformChannel.invokeMethod<Map<dynamic, dynamic>>('getData', arguments); |