Better HN
topnewbestaskshowjobs
Log inSign up

quickthrower2

24,182 karma · joined Jul 22, 2017 (9y ago) · 14,302 submissions

Contact me at altsearch@altmails.com, which gets forwarded to my normal email.

https://hnbadges.netlify.app/?user=quickthrower2

Submissions

9421.

Uber and Lyft win battle over driver status in California(bbc.com ↗)

3 points · by quickthrower2 · 6y ago · discuss

comment 6y ago · link · parent

I liked 90s Java at the time. ;-) well the alternative seemed to be c++ or vb or Perl and I didn’t know about python.

comment 6y ago · link · parent

By like I mean prefer. So they’d pick Ruby instead of Java for most tasks for example.

comment 6y ago · link · parent

Definitely! I couldn't get my head around why people like untyped languages, but I keep an open mind on it. I won't close off that they could be better, if the right patterns/practices are used (whatever they are!)

comment 6y ago · link · parent

Just buy a decent printer. My brother DCP-9015 colour laser is doing OK, and gets treated a bit rough too!

comment 6y ago · link · parent

Perhaps this is due to people taking the threat level seriously?

comment 6y ago · link · parent

Wow. How does this pass muster?

comment 6y ago · link · parent

Well there could hurt their pride to miss the deadline. They might have an internal metric for this too.

comment 6y ago · link · parent

I want you to succeed and make a dent. I like that you have 20 years experience before doing this, and that it’s mission driven. My memory of school was that the teaching was not inspiring and the system doesn’t mentor kids at all. This was years ago And in the UK but I imagine the same in the US. Everyone chucked in ability “buckets” that are impossible to escape, and I did well where I had intrinsic motivation but no help to do better at subjects where I had fell behind like French.

comment 6y ago · link · parent

I’m saving this article to reread at work a few times. The M word has been mentioned :-)

comment 6y ago · link · parent

Speak for yourself pet lover! I’m setting mine up from a terraform file.

comment 6y ago · link · parent

There is nothing inherently bad about storing unrelated things in the same db, in general.

There might be security issues but good DBs offer security grants that are granular enough to deal with this.

Data sovereignty might be an issue forcing you to split, that depends on the domain and application requirements.

But in general two things being unrelated isn’t a reason to split the DB and splitting the DB isn’t a reason to split into services.

I’m not for or against microservices. I’m definitely for good reasoning though!

comment 6y ago · link · parent

Lookup Google takeout

comment 6y ago · link · parent

Do a google takeout ASAP if you haven’t done so already. This mitigates against data loss through being banned. You then just need to change your email in myriad places!

comment 6y ago · link · parent

The idea of needing a 1-5 compile-time constrained value is rare in any application I have worked with, because either you'd use an enum, or the "5" isn't really known at compile time. (I thought about this when doing some basic Idris lesson.).

It makes me wonder what the constrained type might be that I do need?

A non-negative floating point number would be a common one I think, e.g. for a coordinate. I've not been keeping up with Haskell but can you guarantee this at compile time?

I guess it would be hard to do so, because every assignment to this from a normal floating point would need to be checked, requiring you "prove" that the number is non-negative at compile time, so back to Idris I guess?

E.g. x:Positive, x+5 -> this is now a normal float, or I need to prove x+5:Positive.

I have only haskelled a little bit, but I would think most of the newtypes are mostly to trace the meaning of something. E.g. Latitude, Longitude, X, Y, WeightKg, and so on. These would be hard to constrain (and to what..?) they are just floating points.

comment 6y ago · link · parent

Digger! I found you again!

comment 6y ago · link · parent

Going to show that wealth is somewhat proportional to how much landfill waste you can create.

9438.

The surprising psychology behind being rich(bbc.com ↗)

41 points · by quickthrower2 · 6y ago · 47 comments

comment 6y ago · link · parent

I agree with you on all these points! However the "market" behaves the way it behaves (in general), and we need to try to avoid the 99% of it.

comment 6y ago · link · parent

Twitter's UI is hostile to conversation. It took me ages to figure out how to read replies (vs. make a reply myself) and on mobile navigating around different replies is horrible, even worse than Reddit's attempt to make this hard.

comment 6y ago · link · parent

You might want to watch this https://www.youtube.com/watch?v=i__969noyAM (2014) to see why React exists and the sort of problem it solves.

But now in 2020 you have 2 reasons to pick React. One is because it's the right tool. The second is to do with the JS tech battlefield - you pick React because it won the front-end popularity fight, and is probably safe for the next 5 years, and you can hire React developers, and you can hire them knowing they will want to stay React developers etc. Yes all that BS!

Also you might pick React for your own CV!

Let's be honest!!

comment 6y ago · link · parent

I've read a bit about algebraic effects in the past (independent of React), but I think they are much harder to grok than hooks. I tried many times but I never really got it. Like Haskell has this way of making you think you've got it for a split second, then you try to do something and you realise you don't have a clue. The effect systems using free monads seem to keep applying a functor to itself an unlimited amount of times and I really didn't get it. I even did that category theory youtube course for programmers. Still don't get it. I could probably get it if I went full time on just that for 2 months or so, then coded in that style for a year to really bed it in.

Anyway...

However I don't find hooks that hard to understand. I don't think you need to touch algebraic effects to get it. It's yet another view system (like having done windows forms, wpf, asp.net webforms, mvc, knockout js, RX, etc.) to get your head around how it works.

In this case you have a function that returns the desired state and with useEffect you can set up actions to be run after that view gets rendered and added to the DOM, with some conditions on which renders you are interested in (all of them? just when foo changes?). And another callback for when you are "done" so you can clean up.

comment 6y ago · link · parent

Ha ha want to see the look on the teachers face when this answer is handed in!

comment 6y ago · link · parent

How do you pick the “one” for the day? Guessing this is curated

comment 6y ago · link · parent

I agree to some extent. When I see this in imperative code-bases, it can be used as a way to reduce lines of code and save having to define a new class. But when debugging or trying to make sense of the code it can be awful. However it's not the passing functions to functions that is the problem, it is the division of responsibility not being though through while doing so.

As a silly made up example, you pass a callback to an XML parser to tell you when a node has been parsed, so you can pass in a callback to call an API to let it know. Doing something like that just pollutes the XML parser code for no good reason, and you then debug and find you get a 400 error when trying to parse something and 'wtf' and you have to untangle the callbacks.

I'm having a hard time summing it up right now, but I think if you try to "libraritize" "specific code", i.e. make something that does a very specific job, too generic it causes confusion.

That example has 1 callback but believe me some developers want to stack 'em high.

comment 6y ago · link · parent

And also what is an 'object'?

Haskell has a decent system for building up complex data structures. You can write functions for those. Those data structures + those functions are kind of "an object" from the OO world (data + methods).

The differences are:

* Inheritance - well Haskell has many kinds of polymorphism so it doesn't need it.

* Hiding data - well Haskell can hide data using smart constructors, you don't need an explicit private keyword

* Interfaces - covered by typeclasses but they do a lot more!

Also without any of the above you can create object-like things with just closures. If a scope has access to 3 variables in scope, it's "kinda" like an OO object with 3 member variables. You can create new scopes in a for loop, which is like creating many new object. It's a stretch but the underlying concept of something owning other things is still there.

comment 6y ago · link · parent

Tendies

9448.

Why I Prefer Functional Programming(haskellforall.com ↗)

202 points · by quickthrower2 · 6y ago · 117 comments

9449.

Cycling through all the streets in central London(davis.vilums.me ↗)

2 points · by quickthrower2 · 6y ago · discuss

comment 6y ago · link · parent

Ah makes sense if you think of it as 1 / (100 - 10 - 1)

89 being a fib itself is quite a coincidence though?

1
314315316
477