HNHacker News
TopNewBestAskShowJobs

james_s_tayler

2,220 karma · joined October 30, 2018

submissionscomments
james_s_tayler··on Mathematics all-in-one cheat-sheet (2013) [pdf]
Just start with one small section :P
james_s_tayler··on Removing duplicate lines from files keeping the original order with Awk
Naturally, you use curl. You just instruct curl to save the cookies that the login process sends back to you. Then you reuse those cookies on the subsequent request.

Found an example here.

https://gist.github.com/d48/3501047

james_s_tayler··on Removing duplicate lines from files keeping the original order with Awk
I just tried running curl on it now and it came back fine without redirecting me.

For a private repo you just need to set the correct options to curl.

curl -Lk --cookie "user_session=your_session_cookie_here" https://github.com/your_org/your_project/pull/123.patch

james_s_tayler··on Removing duplicate lines from files keeping the original order with Awk
If you're getting a bunch of stuff with curl from GitHub can't you just use curl to get the patches directly from github?

Append .patch to the end of a pr or commit and it spits out the mbox formatted patch.

https://github.com/jiphex/mbox/commit/f139c575e306a1691a31d8...

james_s_tayler··on Angular v8.0
So millions of developers then?
james_s_tayler··on Removing duplicate lines from files keeping the original order with Awk
can't u just process JSON data with jq?

https://stedolan.github.io/jq/

james_s_tayler··on Ask HN: Should I quit my job?
Anecdata: I did it because I just really had an itch to scratch. Did it work out? Well, no. But it was the best experience. I gained much deeper self-awareness and I don't feel the need so much to do those things anymore. I'm a lot more at ease. I didn't necessarily accomplished what I wanted, but taking the plunge and doing it helped me to get to a new place and that made it all worth it.

edit: also, I can't emphasise enough how much less energy, time and tolerance for risk you have once you are over 30 and have a young family plus mortgage.

Do it while you don't have that.

james_s_tayler··on Using Anki and Spaced Repetition
My experience attempting math with Anki was similar even though it was just a few undergrad papers. It can still have its place, just it won't get you nearly as far as it gets you when learning a language or history or other more easily digestible things.

It's exactly as you say. Small, quick to review facts. Anything else makes reviews unbearable.

In a somewhat related experiment I'm trying to use it to learn codebases. Important classes, outline of code paths etc. It's challenging. It sort of works and sort of doesn't. I'm finding a similar thing to how you mention learning milestones in a proof. Kind of memorizing hints that can help you rather than full sequences of things.

james_s_tayler··on Using Anki and Spaced Repetition
I did just over ~ 17,000 vocab all J -> E. Worked like an absolute charm. Active vocab comes through output. Your method sounds right on point.
james_s_tayler··on Using Anki and Spaced Repetition
> This is one of many, many reasons why spaced-repetition systems should support dependencies - as in, "delay card X until after cards A, B, C have been solidly learned.

I half agree, but I think it works as is. You just manage the dependencies yourself. It's kind of an art, but you get a feel for how to do it. I find in practice it works without having to have the delay, though perhaps a delay would eek out marginally better performance. It's mostly just up to you figuring out the total set of things you need to be able to recall and whether to include any bi-directional facts or any meta-facts to aid the recall.

As for the L1 -> L2 vs. L2 -> L1 debate:

L2 -> L1 all day, every day.

james_s_tayler··on Ask HN: Do you keep a personal knowledge repository?
This and Workflowy are my go-to for personal knowledge repositories. Anki is such a secret weapon. I'm finding Workflowy to be another.
james_s_tayler··on IQ rates are dropping in many developed countries
That's exactly why sports stars and rappers with many millions of dollars often go broke and college kids eating ramen start billion dollar companies.
james_s_tayler··on Terraform 0.12
What about setting up and tearing down EKS clusters? I haven't used terraform but I learned about it through looking at this:

https://learn.hashicorp.com/terraform/aws/eks-intro

So, I'd say Kubernetes itself does more heavy lifting but not all of it?

james_s_tayler··on Technical Debt
I've come to adopt the metaphor of Technical Tax instead for this reason.

Technical Debt is something for which you have a repayment plan and a timeline on which it will be repayed and you are making the repayments.

Technical Tax is everything else. And your tax rate will keep climbing higher and higher unless you make a change at the policy level.

james_s_tayler··on Faux Rogan
Yeah, I feel like this has to be a joke compared to the level of quality Faux Rogan is pumping out.
james_s_tayler··on My Git Workflow (2008)
commit --amend is only safe on local commits and should never be used on a commit that has already been pushed, so you can't utilise it as a main part of your workflow.

There really isn't any mental overhead to the index. It's simply the contents of the next future commit. That's all. To understand why you need the index and what it's for you need to understand what a commit is.

Probably the biggest thing that will give you a good intuition on how git works and what it's doing is to understand that git uses content-based addressing. All those funny long ids are SHA1 hashes of the contents of an object in the object database (the stuff in .git/objects). There are only 4 types of objects: blobs (files), trees (directories), commits and tags. In the case of a blob the 'contents' are simply the raw bytes of the file on disk, so it simply SHA1 hashes those. Then a tree is simply an object that effectively contains a list of other items which themselves are either other trees or blobs. They represent a directory on disk that contain files and other directories. So the object id of a tree will be the SHA1 hash of the object ids of all the blobs and trees it contains. Finally you get to the commit. The contents of a commit is just the details of the author/committer, the object id of the tree that represents the root folder of the repo, the object id of the parent commit(s) and then the commit message. So it just SHA1's all that and that gives you the commit hash that you see.

Running git ls-files will show you the contents of the index. As you can see it's simply a list of path/file names. This is what git uses to construct the 'tree' that winds up in the commit.

Do 'git cat-files -p a42f32' where a42f32 is just any commit hash you have lying around. It outputs exactly what the commit is. Notice you see there's a 'tree' object in there.

I feel like once you understand that git becomes quite a lot simpler to reason about.

O'Reilly have a free pocket guide on git gives a phenomenally clear intuition on how git works and allows you to really understand what it's doing under the hood. I highly recommend reading even just the first few chapters. It totally demystifies git and it's a pretty quick read.

https://www.oreilly.com/library/view/git-pocket-guide/978144...

james_s_tayler··on We Are Especially Unfortunate to Die, When Our Descendants Could Be Immortal
You don't want to live forever. Because if you live forever, the probability of you eventually getting trapped somewhere forever is 1.
james_s_tayler··on SAT to Add ‘Adversity Score’ That Rates Students’ Hardships
I feel like a lot of people just don't understand the normal distribution, the central limit theorem and the square root rules.

I don't think it's ever going to work trying to rally against the math the universe is built out of.

james_s_tayler··on Ask HN: What overlooked class of tools should a self-taught programmer look into
Ah OK. Hmm my policy is to always disable force push on master. Force pushing to master should never be allowed.
james_s_tayler··on Ask HN: What overlooked class of tools should a self-taught programmer look into
I don't know. Since git uses content-based addressing, you can't actually alter any commit, only create new ones. And orphaned commits don't get garbage collected for like 30 days even if you explicitly tell git to clean things up. So, the original stuff will still be there. It might just not be obvious how to access it. Part of the commit is the reference to zero or more parent commit object ids. So, if you find the old commit, it still has it's history intact. `git log -g` is a handy command to see a composite git log that travels across branch changes.

I do get what you mean though. You effectively create new commits with an alternate view of history. I don't get quite why/how that causes a situation in which the code can't be merged? I don't rebase much, I prefer merging. Is there any resource that can explain why rebasing might be dangerous like that?

In general if branches diverge too far then you have difficulties merging no matter which strategy you use and sometimes if it diverges too far it just becomes hopeless. Mostly though if you are working in a team, commit daily and merging/rebasing frequently it should present fairly few problems.

I find I never run the actual command git bisect. I just do `git log --decorate --oneline --graph` and eyeball a good commit to start from and then basically do it by hand using commit messages to aid in making reasonable guesses as to where to try but following the basic binary search philosophy. Works well enough even with a complex history.

james_s_tayler··on Ask HN: What overlooked class of tools should a self-taught programmer look into
O'Reilly have a free book on Git that is amazing. I find this to be the perfect level of detail. Easy to enough to read in a short enough time, detailed enough to grasp the magic under the hood.

https://www.oreilly.com/library/view/git-pocket-guide/978144...

james_s_tayler··on Audit suggests Google favors a small number of major news outlets
people themselves also tend to favor a small number of major news outlets?
james_s_tayler··on Ask HN: Which books teach mental models?
I recently read Shortcut, which is another book about analogy/metaphor and the role it plays in thinking. Highly recommend anyone to read one or two books on this topic.
james_s_tayler··on Ask HN: Which books teach mental models?
I'm reading The Model Thinker at the moment. +1
james_s_tayler··on Strategies, Tips, and Tricks for Anki
For one thing, it was the first tool I discovered that just goes infinitely deep and I can zoom in an out. I was sold instantly. I haven't tried org-mode, but certainly in the year or so I've been using workflowy I've found the mobile app (I use Android) to be an excellent compliment to the web app and I've found the sharing features really handy too when I have a great node in the document I want to share in either a read-only or collaborative way. I've always got very easy access to it and the speed of navigation is fast.

I recently took the time to learn the keyboard shortcuts. That was surprisingly quick, but I'm faster in it already. The search feature just works amazing I reckon. Especially in combination with using tags. Recently I've also taken to putting things in any node where they are relevant and not just in a single place, but the information will be housed in one node as a source of truth and the other nodes just link to that node as each node has a link that you can copy for internal linking within the document.

I just love it. The whole thing just works for me. The only thing I really want as a built in feature is the ability to display images. I read on their blog you can do it by essentially using markdown image tags and a browser extension which parses them and inserts an <img> tag. I think that could be pretty sweet.

james_s_tayler··on .NET 5
But that article says:

"Both .NET Framework and .NET Core will move forward, and both will be fully supported"

???

Which is why I found this one confusing... because it essentially says the opposite.

james_s_tayler··on Ask HN: How common is it to work on projects with no testing?
I like that way of thinking about it.
james_s_tayler··on Strategies, Tips, and Tricks for Anki
You've inspired me to kick back into high gear with Anki, but this time focus it on my software career. I was a hardcore Anki freak back from 2008 to 2011 when I used it to master Japanese.

I found hacking on a lot of systems that my software career was going well enough, but lately after just having switched stack and feeling very behind where I ought to be my thoughts have been turning to Anki again.

I've made a decision this year to stop building random projects and to start building my fundamental knowledge down to a scary deep level. So far I've gotten kind of distracted and started building a random project again (the perils of being a low-c individual), but this time I'm approaching the learning side of things different.

Currently I'm using Workflowy to learn particular technologies. Outlining each technology starting with a particular template that breaks things into executive summary, concepts, components, installation, configuration, operation, debugging, questions, links. I'm finding this to be a fantastic way to over time flesh out a solid mental model and from there I want to Anki the shit out of the entire mental model.

I'm definitely finding Workflowy to be a secret weapon for learning. At a glance I can see which branches of the tree are lacking detail, so that informs me how deep my mental model on a particular aspect of something goes and where I need to work on it.

Anki is just ridiculous when you're committed. You feel truly unbeatable. It'll kick your ass but in the end you systematically claw your way to the top of the mountain.

james_s_tayler··on Negotiations Failed: How Oracle Killed Java EE
Yeah unanimous is ironic in that actually a single actor controls the outcome.
james_s_tayler··on Manifold: Java Type-Safe Metaprogramming, Structural Typing, Extension Methods
at that point why not use C#?
← PreviousPage 26 of 34Next →