HNHacker News
TopNewBestAskShowJobs

cdaven

57 karma · joined October 16, 2011

Web developer from Sweden
submissionscomments
cdaven··on Apple M5 chip
> The battery lasts for days as well, which you can't really beat.

The Garmin Instinct 2X's (and 3) battery lasts for 40 days in smartwatch mode, not counting the solar charging.

The Instinct is an "outdoor watch" with a monochrome display, but it has most features the Forerunners have.

cdaven··on Siyuan: Privacy-first, self-hosted personal knowledge management software
For backlinks, have a look at Andy Matuschak's note-link-janitor: https://github.com/andymatuschak/note-link-janitor/

I wrote my own version of it a few years ago, but have moved on, and currently use LogSeq instead: https://github.com/cdaven/noteexplorer

cdaven··on Introducing Copilot+ PCs
Yes, it's still called "ASP.NET Core", even though ".NET Core" was renamed ".NET" from version 5 -- not to be confused with ".NET Framework 5", which was renamed ".NET Core 1.0" before launch.

Don't forget ".NET Standard" that could be used from both .NET Core and .NET Framework, until version 2.1.

cdaven··on Show HN: Obligator – An OpenID Connect server for self-hosters
You can modify the login flow in Keycloak to make it more or less just pass through the credentials/claims, but that's not the default.

Maybe something like this: https://ultimatesecurity.pro/post/first-login-flow/

cdaven··on Strong static typing, a hill I'm willing to die on
First, Angular uses classes, and React supports class-based components.

Then, if you have converted lots of Javascript into Typescript, you have probably found several type-related bugs.

On one hand, this makes you (me) trust Typescript more, and feel safer knowing that your types are correct.

Later, you discover that a few of the declared types are wrong! You also still get "this" wrong in callbacks.

You could say that Typescript lets you try to get your types right, but you have to do the heavy lifting yourself.

cdaven··on Tell HN: Enterprises spend 10x more to build no-code solutions than coded ones
Yes, I think Zapier is a B2B version of IFTTT.
cdaven··on Age of universe at 26.7B years, nearly twice as old as previously believed
> Where do you stop? If you assume Newtonian time, which extends back to minus infinity... well, what caused time to exist at all?

You stop at the uncaused first cause or the unmoved mover, of course.

cdaven··on Age of universe at 26.7B years, nearly twice as old as previously believed
The principle of sufficient reason states that everything must have a reason or a cause. This is not a principle to lazily toss aside to avoid some more difficult question, it is a foundational idea.

Our understanding of the world (aka science) is largely based on causality, and if things existed without any cause or reason, our understanding of "science" would probably be very different.

(I'm not a physicist, but this is how I understand things.)

cdaven··on Microsoft fixes 5-year-old Defender bug, reducing Firefox-related CPU use by 75%
For those people unfamiliar with this joke, watch the TV show Seinfeld.
cdaven··on IKEA made a smart air quality sensor to track indoor pollution
There's also the lamp VINDKAST, which in English is "wind throw" or "flurry".
cdaven··on Script Kit: cross-platform, scriptable, automatic shortcuts to everything
"The ultimate glue and scripting language" is taking it too far, I think.

I have loved Python too, but fell out of love a long time ago. Julia is much better in many ways, _in my opinion_.

Lua is a language that I have no experience of myself, but which is often embedded in things like this, because the interpreter is very small (if I'm not mistaken), which makes it convenient, and therefore in some ways superior to using either Javascript or Python.

Just saying that there are many opinions and ways to think about this.

cdaven··on Idiot Proof Git
When picking a git workflow, you should start with your system's and your team's requirements in mind. Don't just copy git-flow or GitHub's simplified version.

Not every team or system uses pull/merge requests at all. Some do pull requests to the development branch, and to master when releasing a new version.

In some teams, code review is the bottleneck, and a developer may have to create a new branch from a PR to keep developing while waiting for code review, then create a second PR that builds on top of the first.

This last workflow is the main reason why I'm opposed to squashing PRs. It just doesn't work.

Also, squashing my carefully composed commits with individual references to DevOps backlog items is insulting.

cdaven··on Idiot Proof Git
Commit messages should describe the change, not the code. This explains why the code was changed from whatever it was before, but not what the code does.

This can be important information e.g. when troubleshooting bugs, since it could explain the developer's thinking. Like in Chesterton's Fence; why on earth would you do something like this?

cdaven··on Feelings of guilt may signal leadership potential (2012)
> Are "high-ranking managers" not classed as "leaders"?

You can be a leader without being a manager, and you can be a manager without being a leader.

> Ideally I'd want the team to be feeling guilty, because I'd argue it's the team as a whole that should have been responsible.

I don't agree at all, and this is probably where we think differently about leadership, and why you don't like the article's conclusions.

When the team fails, it's the leader's fault. When the team succeeds, the leader lets the team have the praise and the glory.

Listen to Jocko Willink's talks about extreme ownership on Youtube. He talks about this.

cdaven··on Feelings of guilt may signal leadership potential (2012)
> Good "leadership" decisions in my opinion are really about good delegation and organisation of a team's resources, you shouldn't really be taking "lead" in any actual decision making

You're not talking about leadership, you're talking about "decision-making high-ranking (?) managers in the business world".

A good leader is someone who you want to follow, because you trust that they will do their best in guiding you (the team) towards your goal.

Wouldn't you rather follow someone who would feel bad/guilty for letting the team down?

cdaven··on After Obsidian and Logseq, I give Dendron a try
Yes, I switched to TiddlyWiki a year ago, and haven't regretted it. I tried Evernote, Notion, Org-mode, Dynalist, Zettlr -- and looked at Dendron, Roam, Obsidian and so on.

I think what separates TiddlyWiki and Org-mode from the rest is that they are easily "hackable" and have more powerful syntax, but are also more demanding on the user.

You can modify the UI and add features inside TiddlyWiki itself, using only TiddlyWiki syntax and Javascript. Like if you want backlinks to be displayed at the bottom of every note in a certain way, you can do that.

Markdown is a very limited language when you think about it. (Most of these tools would be better off using AsciiDoc.) TiddlyWiki's WikiText has macros and widgets that let you do things Markdown never will, and your "notes" can become interactive and dynamic.

See e.g. <https://groktiddlywiki.com/static/Macros.html> and <https://groktiddlywiki.com/static/Widgets.html>.

TiddlyWiki allows you to create a very sophisticated, tailored system for managing lots of different things. But when you begin, it's a pretty steep learning curve, and you'll need to put in more work than when starting with Obsidian, of course.

cdaven··on Why I still recommend Julia
The more code is used, the more bugs are found. So new code is expected to contain more unknown bugs than old, well-used code. But this is a function of usage, not of time itself.
cdaven··on Diet Coke probably isn't a cognitive performance enhancer
Yep, me too! There is actually a link between high GI and sleepyness; orexin. It's a chemical messenger in the brain, and if you have very little of it, you have narcolepsy. If you have been injected or sprayed with a lot of it, you stay alert without sleep. Oh, and glucose inhibits orexin production!

My personal theory is that I have inherited a low base level of orexin, which makes me react with sleepyness to carbohydrates. I have no idea if this is accurate, though.

cdaven··on Emerging evidence that mindfulness can sometimes increase selfish tendencies
You skipped some parts.

God has always wanted humans to "be perfect", if by that we mean without sin. We have always failed at this, and God has always gotten angry. This starts in Eden, and even Jesus told us to "be perfect" (e.g. see Sermon on the Mount), and was really upset at sinners _who did not want to change their ways_.

Romans 3: "... for all have sinned and fall short of the glory of God." Yeah, it's humanly impossible not to sin.

It is crucial to Christianity that humans are saved "freely by his grace through the redemption that is in Christ Jesus" (Rom 3), "and this is not from yourselves, it is the gift of God" (Eph 2).

cdaven··on VSCode – Markdown Edition
Have you tried Zettlr? I used and liked it for a while, before moving on to TiddlyWiki; https://www.zettlr.com
cdaven··on VSCode – Markdown Edition
You can e.g. sync with Syncthing and write notes (on Android) with QuickEdit. Or use Dropbox and some Markdown editor with Dropbox support?
cdaven··on VSCode – Markdown Edition
Not the same extension, but Dendron actually has one:

https://marketplace.visualstudio.com/items?itemName=dendron....

cdaven··on Managing People
> Why are any of these things true?

Since you challenge the post here instead of flat-out ignoring it, I believe you think at least some of it may be true, and you want to know more.

To me, the bullet points read as titles in a Zettelkasten or personal wiki, or maybe chapter headlines in a book.

I'm conviced that there's depth to these points, and the author could write a lot more about everything. (Please do!)

Even though the article seems very superficial, I took away at least four points in my personal notes, for further reflection and whatnot:

* Trust through transparency

* Processes are expectations made explicit

* Make true what is real

* people x context = output

YMMV.

cdaven··on Reflections on 10k Hours of Programming
And probably because you work with one of the most popular languages and frameworks in the world? Try an old, obscure niche language, and the experience will change completely.
cdaven··on Reflections on 10k Hours of Programming
The "10k hours rule" is of course just a rule of thumb, with a lot of exceptions depending on the skillset. I believe the number of hours required for mastering the violin was 25k.

I think the programming field is large enough to learn and improve your whole life. You probably have to change domains, programming languages, frameworks, architectures, companies, and switch from web to mobile, from frontend to backend, from serverless to embedded -- but there are always new ways of experiencing the beginner's mind.

cdaven··on The Greatest Regex Trick Ever (2014)
Sub-expression or capture group: (foo)

Named capture group: (?<name>foo)

Non-capturing group: (?:foo)

Lookahead: (?=foo)

For negative lookahead, change = to !: (?!foo)

For lookbehind, add <: (?<=foo)

For negative lookbehind, change = to !: (?<!foo)

(Not from memory, had to look everything up...)

cdaven··on DOJ seizes $2.3M in cryptocurrency paid to the ransomware extortionists Darkside
"Randomware" sounds much more fun. Like Bertie Botts Every Flavor Beans, but for software. :-)
cdaven··on We deleted the production database by accident
Sure, intent is relevant, but the example was "a suicidal pilot flying the plane into a mountain on purpose". Isn't killing all those passengers a crime?
cdaven··on We deleted the production database by accident
The criminal has to take the punishment for his actions (and extenuating circumstances are taken into consideration), but at the same time, people, companies and society, have learned that we need protection and prevention.

So you could argue that there have been a lot of post-mortems through the ages, with great ideas thrown around on how to avoid crimes being committed (at least against me/us). It's not just about locking people up.

cdaven··on Python 3.9
Have a look at Typescript's hectic release schedule:

- 3.1 in September 2018

- 3.2 in November 2018

- 3.3 in January 2019

- 3.4 in March 2019

- 3.5 in May 2019

- 3.6 in August 2019

- 3.7 in November 2019

- 3.8 in February 2020

- 3.9 in May 2020

- 4.0 in August 2020

I'm not saying that this doesn't cause headaches, but do we really want less progress?

Page 1 of 2Next →