HackerTrans
TopNewTrendsCommentsPastAskShowJobs

gbuk2013

no profile record

comments

gbuk2013
·19 ngày trước·discuss
Not really, more like succeed without having to do anything.

The key is the perspective of what success is: it’s the state where the resource does not exist, or is the action having deleted the resource. But 200/202 is perfectly capable of expressing the distinction in the latter case as well.
gbuk2013
·21 ngày trước·discuss
> Then you'd return 202 on a request to delete any invalid element, which really doesn't sound right

It depends on your use-case if you care about this or not. If you do care you will have to handle it either way somehow.

But if you want an idempotent API then a success is more appropriate IMO than an error.
gbuk2013
·21 ngày trước·discuss
Response is implementation detail: a 404 on second request is one way to do it, a 202 would be another, or 200 with some sort of response to distinguish (e.g. { changed: boolean }).

Idempotency just means no state mutation on subsequent request.
gbuk2013
·21 ngày trước·discuss
You’re right - it’s not a campaign as such - it’s a set of scenarios (currently 22) in increasing difficulty. I haven’t played for a while after getting stuck but checking now I got stuck on the 5th scenario - even worse than I thought. :)

I played Zero-K several years ago and it didn’t stick in my mind as much but maybe worth revisiting it - thanks!

Reading about it seems to suggest that it’s even deeper in terms of strategy and tactics so I will probably struggle even more. :(
gbuk2013
·21 ngày trước·discuss
I used to play the original TA a lot and BAR is very well done. Much harder than the original though - I had no trouble with TA campaigns but I have not even made it halfway with BAR before hitting skill wall. Not a teen anymore so it’s hard to motivate myself to try and push through. :)
gbuk2013
·tháng trước·discuss
Sound like it’s time for yoga :) https://m.youtube.com/watch?v=txNkzlJ0tc4
gbuk2013
·tháng trước·discuss
I mean there’s nothing stopping you from committing node_modules to git (after running something like https://github.com/timoxley/cruft on it) and reviewing code changes on dependency updates.

I even managed to make that part of the workflow on one team I worked with but several other teams since thought it was a crazy idea. :)
gbuk2013
·tháng trước·discuss
I came across this interesting rant the other day: https://github.com/uNetworking/uWebSockets.js/blob/master/mi...

It does make sense that the right way would be to fork every dependency you use and install from your own repo reviewing and merging from upstream as needed. Would be a giant PITA though. :)
gbuk2013
·tháng trước·discuss
It’s not the async loop - it’s interfacing with the system. JS is designed to run in a sandbox and the only way out in say Node.js is to write C++ addons.

For example you don’t get to see TCP headers with Node out of the box and you can’t craft packets, whereas you can in Python.
gbuk2013
·tháng trước·discuss
I am well aware it supports Linux but the vast majority of work still involves being in Windows-only shops which is a circle of hell I am keen to tread only when I absolutely have to. :)
gbuk2013
·tháng trước·discuss
Sure but that runtime is much more general purpose - JS runtimes are focused on network apps. For example you can write an app like Calibre in Python and QT and it is much lighter than writing something with JS and Electron.

Python is easier to interface with C/C++ libs.
gbuk2013
·tháng trước·discuss
I’m a JS/TS dev (and fan) I don’t think either is a replacement for Python. They are not standalone languages but require some runtime to interact with the world (DOM or Node.js etc) which have limited capabilities for interacting with the system - their focus is network services. It’s not that inaccurate to say that JS is just API for a C++ app. :)

Now if .NET was still not so embedded in the Windows ecosystem that would be very interesting to me to jump from TS. As it is I am learning Go instead.
gbuk2013
·2 tháng trước·discuss
An interesting tangent on this is: how many answers to these (or any number of factual questions) do you (as in anyone) actually know. Not believe you know, but actually know.

Knowing something is different to reading about something, or hearing something from someone. And yet this is often confused as knowledge. In this way are we all that different from AI - we have some data and we regurgitate it as knowledge. Bad data, wrong answer. Except humans can also throw in some emotion to really muddle things up. :)
gbuk2013
·2 tháng trước·discuss
I led a project to (successfully) migrate a Vue 2 to 3 app and while that was painful and expensive, I still find Vue more pleasant to work with than React once it was done. But TBH depending one team code discipline either could be fine or a nightmare. :)
gbuk2013
·2 tháng trước·discuss
Random indeed - I’m also just down the road. :)
gbuk2013
·3 tháng trước·discuss
Me too except I just use rye malt instead of the bread and without making any dough with it. The malt is cheap and easy to get in UK thanks to home brewing suppliers whereas rye bread is super expensive.

My only challenge is controlling the gassiness - it’s so vigorous that the moment I even slightly open the cap the whole thing fizzes up like crazy - opening it normally would result in a kvass fountain shooting up like 30cm. :)
gbuk2013
·3 tháng trước·discuss
If by tourist track you mean several cities each with a population count greater than London then sure. :) But it is true I was there as a tourist to see a few places and China is an absolutely huge place.

I wish the touristy places in the UK were as clean though.

Also, writing this comment on a crowded, dirty and smelly train from Gatwick Airport, which has 2 carriages inaccessible because of broken doors and crawling due to signal failure on the line, I already miss the clean and comfortable Chinese trains I was taking from place to place.

That said I do get to work 945 here for more money so I am grateful for this for sure. :)
gbuk2013
·3 tháng trước·discuss
I’m currently travelling in China and the total absence of graffiti and the wide availability of public toilets as well as the general cleanliness of the place is a stark contrast to London. I am somewhat dreading that part when I return.
gbuk2013
·3 tháng trước·discuss
As someone who runs a such a VPS this is all a non-issue. Running HTTP service is so trivial that once I set it up I don’t even spend an hour in a year maintaining it. Especially with Caddy which takes care of all the certs for you.

And this is also bearing in mind that I complicate my setup a bit by running the different sites in docker containers with Caddy acting as a proxy.

With storage volumes for data and a few Bash scripts the whole server becomes throw-away that can be rebuilt in minutes if I really need to go there.

And for sure any difficulty and ops overhead pales in comparison to having to manage tooling and dependencies for a typical simple JS web-app. :)
gbuk2013
·3 tháng trước·discuss
From the article

> Analysts concluded that 23 sailors survived the initial blasts and took refuge in the small ninth compartment at the rear of the submarine.

> Evidence suggests they remained alive for more than six hours. When oxygen grew scarce, they attempted to replace a potassium superoxide chemical oxygen cartridge, but it fell into the oily seawater pooling on the floor and exploded on contact.

> The resulting fire killed several crew members and triggered a flash fire that consumed what remained of the oxygen, asphyxiating the last survivors.

That does not suggest a possibility of a foreign rescue vessel making it there in time.