In today's thread we're going to learn how to work with git. I'm an expert in git because ten years ago I watched a @chacon talk, realized there's a LOT of complexity to it, gave up, and focused instead on shitposting. This is very much the spirit of git.
Before git we used alternate forms of version control: svn, cvs, perforce if you're @jpaulreed, "Copy of Copy of pythonscript_ ver1c3333 (Repaired)v2_AA-zz - Final Draftver5_FINAL (Autosaved) AA_v2-ZZ use this one_AA-zz_AAoldver-zz_AA-zz Feb24.rb," etc.
In Subversion, finding out who changed a given line of the file was done via either `svn bless` or `svn blame`, which both did the same thing. In git it's just `git blame` because in this era we're a lot more honest with ourselves.
What is git? It's a distributed version control system, which means it's basically hypeless blockchain.
Git was written by Linux author Linus Torvalds, who's a brilliant engineer who talks so condescendingly to people that it's basically "the subtext of Google engineers' 2010 conference talks."
Git was fully decentralized--everything was peer to peer. No one repository was "central;" all copies had a full history.
The industry saw this, freaked the hell out, demanded a centralized option, and then @GitHub was built and acquired for $7 billion or so.
`git init` creates a "hidden" .git/ directory. If you cd into it, you'll see a lot of strange files and folders. They're arcane, but important.
It's best to back these up, so run `git init`.
You can configure git with the --config flag. "local," "user," and "system" are the three places that it can store things--namely for a specific repo, your user account, or /etc/gitconfig.
The latter is a best practice to confuse the living hell out of your peers.
Other competitors include mercurial (hg), CVS (dead), RCS (wow I'm old), a bunch of proprietary options nobody uses, or "simply writing your shit properly the first time so there's only one version."
Every git commit is a snapshot of the current state of files that git is managing.
You can use 'git pull' as a code deployment system to production, but it's often faster to stand atop a mountain with a metal rake during a thunderstorm and curse god.
I know I joked upthread, but you can indeed have a git repository within another git repository. This is accomplished via either git submodules or git subtrees.
Which is best? Neither. Absolutely never use these things. Most of git is written in C; these are written in pain.
Have you screwed up in git and are afraid you've lost data? `git reflog` is your friend, but it's the second thing you do.
The first thing is recursively copy the directory elsewhere as a backup because when you find yourself in a hole, stop digging.
Did a thing used to work and now doesn't? When did it break and why?
Have you accidentally committed credentials (like @awscloud keys) to your repo and then pushed? There are ways to fix this; git filter-branch is finicky, `bfg` is Java. Then you get to force push and spend the week hiding from your colleagues' retribution.
Alternately use this to your benefit. Is there an @awscloud service you can't figure out how to configure? Scope an IAM role to the service in question and commit creds to a public repo.
Soon, people will configure it to mine bitcoin. Turn that off, then use what they built.
I have been informed that unlike the contents of that Texas textbook, git itself does evolve. TIL; thanks for the tip!
Many common "github-isms" aren't actually part of git itself--including forks, pull requests, issues, public vs. private repos, or support that is in any way supportive / friendly.
You can also use commit hooks--scripts that fire off at different part of the git lifecycle.
They live in .git/hooks so they're outside of the working tree and not part of the upstream repo; this is a design decision focused on increasing workplace collaboration by force.
The cloud providers all offer git hosting: Microsoft owns @github, @awscloud runs CodeCommit which has no customers, and @Google offered Google Code, killed it in 2016, and now offers GCP Cloud Source Repositories because it hopes we have the collective memory of a goldfish.
Not kidding: years ago I had to use this to copy data (open source code) *into* a company's environment due to a hilariously overzealous infosec posture.
you: 'git push origin main'
git: whines about upstream branches, doesn't offer to do it for you
you: git config --global push.default current
you from now on:
Need to integrate with a version control system that isn't git because either you or your company are engaging in some "the earth is flat" / "IBM has a real cloud" level denialism? Git still has you covered.
I will now field questions. I've already learned some things from the comments so far!
Git confuses *everyone*. Let's learn together!
I’m near-certain that @ksylor built this during a conference in Zurich we were both speaking at—or am I misremembering the timing?
Since VCs love nothing better to tell us unsolicited what they think about everything, allow me to return the favor.
I do have additional thoughts on VCs, but I worry I'm punching down at a bunch of people who invest others' money, gloat about their wins, then shit on various cities they don't like while somehow remaining "respected."
"That's not most of us, that's one particular douchecanoe!"
So today's thread is on how to apply for jobs (beating out "the horrors of git" by a nose).
Scenario: you're on the job market for one reason or another. Let's begin.
Probably the dumbest possible way to go about this is to fire up some job board or another, find a job posting, slap your résumé into the system, click next, retype your entire résumé into the system by hand, hit submit, and then get auto-rejected by a robot.
You can do a LOT of those applications in a day, but it doesn't get you where you want to go.
Stop a minute. Be intentional. Pick a company you'd honestly like to work for.
Name it! I'll pick one of the responses and continue.
Clubhouse is Not For Me for a few reasons; some of them are about me, while others aren't.
First and most important: It's not an accessible platform. That's a hard pass from me.
Now, onto the "me" parts.
It's ephemeral content. If you're not in the chat room, you miss the entire thing. There's no playback, there's no content reuse. I can't use the content I put out there to build a platform elsewhere.
Simply put, what people will pay you have you work for them. Note: you must create more value than you cost, and you cost more than just your raw salary. Rule of thumb, "double your salary" is directionally what you cost your employer.
"How do I figure out my market value?"
There are a few ways. Talking to your peers. Looking at salary survey data from a variety of sources. Getting managers at other companies blind drunk and pumping them for information.
My handwriting is crap and I don't do a lot of writing as a result, but I do jot notes from time to times. Most of the pens on my desk are pretty standard, except for this thing.
If I bust out my trusty @awscloud scale (it's like a regular scale except it costs 5x more because of Machine Learning), most pens are less than half an ounce.
This huge bastard is over three times heavier. It's a *weird* pen.
Since people are already melting down at an engineer’s salary, let’s pour fuel on the fire with a Hard Truth:
Engineers are almost never the most highly compensated employees in a company.
"Who is?"
Sales.
The high performing salespeople will make magnitudes more than the average. Sales directors and heads of sales will often get paid shockingly large amounts of money. And it's usually all or mostly cash compensation.
"How much does a top performer in B2B sales make?"
You give the rainmakers what they want.
This is also why you see toxic shitty people as "head of sales" who still have a job. It's hard to fire the person who closes $20 million a year. (Not defending this pattern!)