HNHacker News
TopNewBestAskShowJobs

kcartlidge

696 karma · joined September 5, 2020

UK Software Engineer (sometimes Lead). C#, Go, Node, Python, AWS.
submissionscomments
kcartlidge··on Ask HN: Is iCloud a viable alternative to Dropbox? Any other alternatives?
I tried most of them over the years. Google lost files, OneDrive took forever, iCloud is too limited. SpiderOak was massively slow. Dropbox was the best for performance and reliability but eventually I tried PCloud and have used it happily for years since (with the encryption extra, which is seamless).

Not had any issues with performance or reliability at all (except with synced Calibre folders, but that's been the case with all the others too). Gigs of stuff are moved around in single digit hours at most; usually less. Smaller changes are almost instant across my Mac, Linux, and Windows laptops.

I don't like their pushing for lifetime plans though - I'd rather they didn't frontload their income as I want them to stay around.

kcartlidge··on Ask HN: Please recommend how to manage personal serverss
Totally.

And whilst I've used most provisioning tools (quite liking packer and terraform), for my own stuff I have a file with notes and snippets. Follow that file and within less than 10 minutes I've got a working server with Postgres, Nginx, and LetsEncrypt, and it's ready for Git push-to-deploy.

Simplicity is what you need, for as long as you can get away with it. Simplicity and backups.

kcartlidge··on NASA Veteran's Propellantless Propulsion Drive That Physics Says Shouldn't Work
Reading the article and skimming the patent, whilst the explanation differs slightly the basic setup seems to just be the Biefield-Brown Effect. A heavily charged electrical condenser tends to exhibit motion towards it's positive pole.

I'm not a physicist and don't know if this is ion wind, if it works in a vacuum, or if this (and the Biefield-Brown Effect) is just dodgy science. Merely saying that the claims seem similar enough that it feels like nothing new.

There's videos of Biefield-Brown devices ("lifters") online, eg: https://www.youtube.com/watch?v=yVVJwObmTAk

kcartlidge··on Ask HN: Node vs. .NET Core (2024 edition)
Fair enough. I always consider Go first, but I do differ in that I'm happy to take .Net second.

Basically I agree with everything you said there, but with just one amendment - the baggage in .Net was sort of reset not too many years ago with the introduction of Core, and how much you bring into your codebase/tooling is often a personal choice now (depending upon your project) rather than it being forced on you. For example a .Net API can be very clean, fast, free of cruft, and run anywhere from a single binary. A .Net MVC website less so unless you're careful (though I still prefer Razor over Go's default templating).

kcartlidge··on Ask HN: Node vs. .NET Core (2024 edition)
It often does require more LOC, but unless the difference is extreme (and whilst it's there it isn't extreme) then I'm not sure why LOC would even be relevant.

What matters is quality and maintainability of code, not brevity of code.

I prefer the expressiveness of C# or Ruby, for example, but do a lot of stuff in Go for the clarity/obviousness of the code and the power of the tooling/libraries/ecosystem.

kcartlidge··on Ask HN: Node vs. .NET Core (2024 edition)
> The correct answer is Go

I use Go, Node, and C# (also Python, Ruby, and PHP currently) and the correct answer is there is no correct answer.

The closest you can get is to use what you know.

If what you know can't do the job, then presumably having reached that conclusion you're armed with the knowledge of the missing functionality that lets you do a proper technical assessment of the alternatives with your specific use case in mind.

kcartlidge··on Ask HN: Node vs. .NET Core (2024 edition)
> Create react app

Okay. How about ...

* dotnet new mvc

* dotnet new api

* dotnet new blazor

* dotnet new grpc

I like (and use) Node, but modern DotNet can easily hold it's own.

kcartlidge··on Show HN: Online database diagram editor
You can use the Export as DrawDB and Import Diagram options to save and load locally.
kcartlidge··on Ask HN: What's the simplest static website generator?
Bottle is soooo underrated.
kcartlidge··on The Great Migration from MongoDB to PostgreSQL
I've used (and introduced) MongoDB in production. Though I much prefer PostgreSQL, SQLite, MySQL, or SQL Server, for some use cases a document database is fine.

However as I discovered myself, once you realise you need to use Mongoose with it you should usually take that as a prompt to consider going relational.

Don't get me wrong, Mongoose is a good package. But the things it solves could likely be better fixed by moving away from MongoDB - I'd go so far as to say that in most cases Mongoose should only be added to help an existing project; if you need it from the start you probably should go relational.

(YMMV and there will be exceptions.)

kcartlidge··on Nobody Wants to Buy the Future: Why Science Fiction Literature Is Vanishing
Only recent in relation to the classics, but I really enjoyed the following (the years are approximate). There are others, but I've listed these ones specifically because those others have already been recommended elsewhere in the thread whereas these may get missed.

- Adam Roberts: New Model Army (2010?)

- Hiroshi Sakurazaka: All You Need is Kill (2005?)

- Mike Resnick: The Dark Lady (2015?)

- KC Alexander: Necrotech (2015?)

- Gary Gibson: Stealing Light, Nova War, and Empire of Light (2013?)

- Linda Nagata: The Last Good Man (2015?)

kcartlidge··on Nobody Wants to Buy the Future: Why Science Fiction Literature Is Vanishing
Agreed. TOS, Voyager, and DS9 were great (at their best; obviously some awful episodes/seasons mixed in there). The films after Khan were missable. Never got on with the whiny characters in TNG. Discovery is endless noise. Picard looked promising, but ultimately disappointed as (and here we disagree) I wish Q had never been created; can't stand him.

Nothing comparable to the older stuff until SNW - and Anson Mount in particular is very good. Oh, and The Orville is better ST than much recent ST ever was.

kcartlidge··on Motorola spoiled a good budget phone with bloatware
Recently sold my Pixel 7a that I got to replace my Moto G32 (I succumbed to the appeal of shiny) when I realised that the £130 Moto G32, despite being slower and less powerful, was a more pleasurable all-round experience.
kcartlidge··on Motorola spoiled a good budget phone with bloatware
Is this just a US problem? I'm using a Moto G32 in the UK and it's got no bloatware, regular security updates (got one yesterday morning), and an experience that's smoother than the Pixel 7a I got rid of (though a little slower due to the chips etc).

All for £130. Couldn't be happier, I haven't even switched on my iPhone in months. Oh, and Moto gestures for the torch and the camera are great for when out walking the pooch.

There was one thing I disabled which I've never needed to do on previous Motos, but talk of Moto going rogue doesn't match my (UK) reality.

kcartlidge··on Ask HN: Books that gave you different perspective on religion
Quite a few along the way, but in an attempt to minimise:

- "Letters from the Desert" by Carlo Carretto

- "Being the Body" by Charles Colson

- "Fire in Our Hearts" by Mike Farrant

- "Total Freedom" by Jiddu Krishnamurti

- "Muhammad - a Prophet for Our Time" by Karen Armstrong

kcartlidge··on Pandoc
> I was under the assumption docx was simply an XML wrapper in a well known format. MS can't come in and break it without creating a new extension, invalidating deprecation concerns.

Sort of.

It's a ZIP containing a collection of XML files. The actual content is a single file, but you need separate ancillary XML files for things like styles, links, headers/footers, numbering schemes and so on. Each with complicated namespacing and nesting rules and each file referencing items in the others.

The area where it is most at risk (for me personally in practice) is the lax handling of the file by Word itself. As a specific example there are nested XML elements where sibling child elements define properties on the main element, such as properties that define paragraph styles.

Being siblings they should be supported in any order, but in practice generating DOCX files and importing them into Word will fail for no obvious reason, until you reorder them in the raw XML (even though they are still at the same level in the hierarchy). Then they work.

In other words, it's less the 'spec' and more the MS implementation that makes it fragile. And different versions of Word can have different behaviour in that regard.

kcartlidge··on SQLite or PostgreSQL? It's Complicated
> Person who has never used a database before

This 'Person' is Miguel Grinberg. I don't blindly accept that any reputation is earned, but in his case from his writing and his tutorials he knows what he's doing.

> completely unoptimized

And if he's choosing unoptimised, that's fine. After all, you can tell a lot about the general case that way and a surprisingly large volume of installations, whether they should be or not, are in fact exactly that (with a little bit of extra security thrown in). So it's more relevant than it might appear.

> content marketing post for Twilio

It's a corporate blog post, yes. But full of numbers, code, and explanations. Hardly the useless waffle most imagine when they hear 'content marketing post'.

> two years ago

I know, right! Both SQLite and Postgres have left the market, and database technology is now massively different. (/s just in case it isn't obvious)

kcartlidge··on BFF, Backend for Frontends
Without commenting on the relative merits of monoliths, microservices, graphql, BFFs etc., as an analogy it's possibly worth thinking of the BFFs as interfaces tailored to specific use cases.

For example the backend may provide a reporting facility. For reasons of screen factor the available options and the resulting response data may vary depending upon if you're on a mobile phone or a laptop.

The backend needs to allow for the most complex use case, so its endpoints will likely support all the options and return all the data regardless of the client. It may include filters to mitigate somewhat, but that is also extra complexity.

With the BFF scenario the small form factor device would have its own backend as would the large form factor. The large form factor one would likely transparently proxy the request/response to/from the original backend whereas the small form factor one would be free to offer a more limited (and hence less complex) request/response definition based on the up-front awareness of what the device will be doing.

With this situation the shared functionality, data access, business logic, etc., all exist in the main backend so you still only have the one main codebase to maintain. The teams working on the various form factors only need to manage a thin abstraction layer suitable for their consumers who, in turn, benefit from a simpler API as it is focused to their use case.

The end result is still coupling, and numerically it's actually increased coupling as instead of backend-to-client it is now backend-to-each-BFF plus each-BFF-to-client. However the extra layer in the middle (the 'interface') removes the kind of coupling that requires changes in the main backend to be done alongside changes in the clients. I'm aware that API versioning exists as another possibility, but again the idea here is to present an API directly suited to the consumer - and you can still use versioning within that context.

Each team responsible for a particular BFF is free to roll out their own version of changes, including either hiding/ignoring them if they are not needed, or simplifying them or merging in relevant context if they are, independently and to their own timescale. This is the decoupling obtained; it simply works at a different abstraction level.

Again, I'm not offering a view on which approaches are superior (personally I don't believe a single approach will ever be the best everywhere). I'm pointing out one main benefit which makes BFF worth considerating in case it suits your needs.

kcartlidge··on Amazon lays off 500 Twitch employees, hundreds more at MGM and Prime Video
Fair point.

I finished the season 2 finale this evening and it just ... ended. Still entertaining but whilst there was a final set-piece showdown and things were wrapped up okay, it felt like loads of episodes of digging around followed by a highly compressed surge of closure in the final episode. Similar to season one, though again I enjoyed both.

kcartlidge··on Electric cars suffer 'unsustainable' depreciation in secondhand market
> small car parks near clusters of houses

This is us. We own two spaces but there's another house between ours and the car park. In front we have a footpath, not a road. Realistically, home charging is out.

kcartlidge··on 2.7M Brits still use a 3G only handset
I suspect the mention of OSs that are still supported implied they weren't talking about non-supported but no longer supported OSs. So nothing exotic, just the normal OS on the device but stuck at the old version which was the final one released for it.
kcartlidge··on Error handling in Go web apps shouldn't be so awkward
There's so much contention over error handling in Go. Over the years I've settled on treating it like gofmt: I may not 100% agree with all the choices, but it is what it is so let's just get on with it.

And to be honest as a majority-C# dev I quite like the break from exception handling.

As an aside, one thing I've found which makes life easier is to invert the check. With convoluted logic it can lead to excessive nesting, but then nobody would write code that did enough in a single function to make that an issue, surely?

Practical example. Here's what you might normally see:

  err := doFunctionA()
  if err != nil {
    handleErrorFromFunctionA()
  }
  err = doFunctionB()
  if err != nil {
    handleErrorFromFunctionB()
  }
  err = doFunctionC()
  if err != nil {
    handleErrorFromFunctionC()
  }
I'd usually just switch it:

  err := doFunctionA()
  if err == nil {
    err = doFunctionB()
    if err == nil {
      err = doFunctionC()
    }
  }
  if err != nil {
    handleErrorRegardlessOfSource()
  }
Of course it only works if the errors can be sensibly handled the same way regardless of their source, but that's surprisingly often the case (eg log, display, and/or return it).

It's just a minor change but it's standard uncomplicated Go, and with multiple sequential operations it reduces the code-waffle even more the larger the code gets.

YMMV and it isn't always suitable, but every little helps.

kcartlidge··on Amazon lays off 500 Twitch employees, hundreds more at MGM and Prime Video
I agree with all of that, except that I really enjoy Reacher. And if you're a fan of the books, then it's good to see the main character played by someone so much truer to the original than Tom Cruise ever was.
kcartlidge··on Brexit has failed for UK, say clear majority of Britons – poll
Return the loot? Totally agree. As do the majority of the British population.

Arrogant diplomacy? Yes, you're right. I should point out that any nation with a history of importance would be daft not to play it up, though I really wish we were a lot less active on the world stage (except as part of a multinational grouping like the EU or UN). As for backing it up, we're still relatively good militarily. That said, even as the 6th or 7th largest economy (depends where you look) we're obviously going down the rankings and our permanent seat and veto on the Security Council for example is a little ridiculous (as is that of France).

Accent? If others still have that perception I'm afraid that's not my fault. Apart from anything I'm a Northener which means my accent is not classical British anyway but, regardless, that's their perception not mine. And even in the US the movie villain is often British. I'm not denying it happens, but again that's on them.

Most other nations? I've agreed on the other stuff but I'm afraid we're not going to agree on this one. But then, we don't have to and discussion is good.

All about the impressions? Yes. Unfortunately short of stopping global adventuring and subsuming ourselves into a positive-looking EU (or similar) I don't know what we can do about that.

And as for England re-joining the EU? Majority England didn't vote Leave (or Remain to be fair), and to my mind the people who failed to vote in the EU referendum effectively said they were okay with the status quo. Which means I personally think the Leave option, the one seeking change, should have required more than 50% of the electorate and not of the vote - and we'd have stayed in. But it didn't, so we are where we are.

It'll take a generation or so but assuming no environmental collapse we'll re-join the EU or something similar. We'll have to, to retain any influence.

And to be blunt whilst I find very few politicians trustworthy at all, the more I've seen over the last decade the more I realise I prefer the EU over my own government so the sooner the better.

Thanks for the interesting reply :)

kcartlidge··on Brexit has failed for UK, say clear majority of Britons – poll
I'm British, and agree with everything you said.

We did what we did, so I understand (to the extent I am able to, not having lived it). All I would say in our defence (and I'm aware it isn't a great defence and certainly doesn't excuse it) is that:

- That wasn't the current us, it was back then and I'd hope we were more enlightened now (despite the dross of our political machine).

- Pretty much every nation at some time in their past has dealt terribly with others. We are in the position of being the most recent old-fashioned empire, whilst having had the technology (Industrial Revolution, coal, guns, ships) to scale our oppression. Most (all?) nations would have done the same thing if they'd got to that point of power first.

I'm not my ancestors. I wouldn't choose the paths they did. But the above points are both true and also excuses, so to the extent that any current citizen is representative of their national history I apologise.

As for the lack of sweetheart deals for re-joining the EU, again I agree but with the added comment that I think that's a good thing. Only by going all in could we ever truly be a part of the EU.

As long as we demanded exclusion from, or preference in, so much we put our national interest first whilst ignoring the wider supranational interest that comes from a united whole. To be part of a union of equals we ought to go in as equals in the first place, thus forcing upon ourselves the incentives to do it properly and build a shared future.

kcartlidge··on Brexit has failed for UK, say clear majority of Britons – poll
Our geography narrows down reasonably easily when you read what follows alongside a map. It's a bit ridiculous having so many names though (and I'm British so this is not intended to disparage), but each genuinely does refer to a different political entity.

From the larger to the smaller:

- The "Commonwealth" is a grouping of nations initially based on countries that were part of the old Empire. This is not an exclusive club, though, and countries are free to leave or join as they wish. Over the years there have also been members who were never part of the Empire. Its mostly a loose trading arrangement with some political and sporting overlap.

- The "British Isles" (a name disputed by many in Ireland as it includes the island of Ireland) is the group of islands containing the UK and the island of Ireland. Basically, the whole mass that sits off the top left of Europe (mainly sea borders with France and Norway).

- The "UK" is the "United Kingdom of Great Britain and Northern Ireland", and so comprises the top strip of the island of Ireland plus Great Britain, so the British Isles but excluding the Republic of Ireland part in the lower bulk of the island of Ireland. This grouping is what the UK Parliament represents, with elected members from each one and with devolved powers to their local assemblies in many areas.

- It follows from the above, therefore, that "Great Britain" is the UK minus Northern Ireland. So that's the countries of "England", "Scotland", and "Wales". There are theories about the name Great Britain, some claiming to be fact, but I like to think of it as either being "the greater part of the British Isles" or "greater Brittany" (an area of France that has many political/military contacts over the centuries). It isn't about being "great" in terms of wow look at us.

- Then you've got the aforementioned three 'mainland' UK nations of "England", "Scotland", and "Wales". Whilst being in the UK and controlled by London, they have distinct identities and often legal differences (especially Scotland). They also are often represented individually in various sports such as football or rugby.

- England's capitol city, London, contains a small (and ancient) area within it called the "City of London". It is legally distinct from the rest of London and has many of its own institutions and laws.

---

To answer the main question, the word Brexit implies the exiting of Great Britain however it was actually the UK that left, so that's Great Britain (England, Scotland, and Wales) and Northern Ireland.

This incidentally also reveals one of the major issues of it all - by the UK leaving as a whole, it took Northern Ireland with it. That meant a land border between the UK and the EU for the first time (separating Northern Ireland and the Republic of Ireland).

Given the many decades of rumbling conflict of various degrees of brutality between the factions in Northern Ireland, re-introducing a land border at that point would risk derailing Irish peace. So a large part of the discussions involved a border in the Irish Sea between Britain and Ireland, which gives Northern Ireland a special status within the EU (enhanced compared to the mainland UK).

kcartlidge··on JetBrains forces AI freemium plugin that cannot be completely removed into IDEs
For background, I have no skin in this game. I use JetBrains IDEs and have the AI plugin disabled, but only because I haven't found it to be helpful.

The issue is simple, though. By making the presence of the plugin mandatory, regardless of its enabled/disabled/active/inactive status, the IDE falls foul of corporate rules against the installation of AI at many organisations.

It doesn't matter how easy it is to deactivate; if an InfoSec rule states no AI software then the whole IDE becomes untouchable.

The response that the installation is mandatory because it is a bundled plugin is both irrelevant and a choice by JetBrains. As long as the AI plugin is installed the IDE is forbidden by those corporate rules. There's no leeway, no persuasion possible, and no mitigations that will satisfy. It really is black and white.

kcartlidge··on The day I started believing in unit tests
I find the easiest way (for me) to identify what type of test is running is by looking at responsibility.

- A unit test is single responsibility. It tests just that one bit of code with all dependencies stubbed, abstracted, mocked, or removed from consideration in some way.

- An integration test is multiple responsibility. It tests just one bit of functionality as a vertical slice through the stack (including [only] relevant dependencies) with all other aspects of the code base eliminated from consideration.

- An end to end test is full responsibility. It tests a complete path through all the functionality necessary to complete a 'journey' as a user/consumer of the app/tool.

So for example VAT calculation is unit tested as isolated code, invoicing is integration tested as a vertical slice including database etc, and order processing is end-to-end tested from placing the order through to its completion.

That's a simplified example and not always accurate depending upon the system and the team perspectives/opinions, but the principle of looking at responsibilities is a very useful rule of thumb.

kcartlidge··on Why You Should Write Your Own Static Site Generator
I've written my own in (over the years and in order) PHP, Delphi, Ruby, Python, C#, Go, then C# again (after moving from Framework to Core) for serving my blog [1].

- It's fun

- It improves with each iteration due to experience gained

- It's great to have a sample project to create in any language you consider using as it's a small yet realistic way to discover how that language works and what the ecosystem provides

[1] https://kcartlidge.com

As an aside I also quite like yak-shaving - which is why for my latest C# iteration and just for the pleasure of it I've written my own Markdown parser and am working on my own templating engine (bit like Razor, ERB, or PHP).

kcartlidge··on Marked by Stars – Agrippa's Occult Philosophy
If you want the Lovecraftian mythos to be a thing, then the field of chaos magic (popularised largely by Peter J Carroll in Liber Null and Psychonaut) is an interesting one.

For traditional ritual/ceremonial magic The Heptameron is possibly the easiest of the old grimoires to read, and whilst he has his detractors Joseph Lisiewski's Ceremonial Magic & The Power of Evocation is pretty readable as a modern take.

(None of this is to comment on the truth or practicality of the belief systems and practices, it's just a pointer to possibly interesting early stage sources.)

← PreviousPage 3 of 19Next →