• 5 Posts
  • 9 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle
  • The idea is to develop keen instincts so your code comes out nice on the first try, without needing rewrites. To do that, you have to start out by rewriting a lot. You are after a fluency of style, which is somewhat independent from deep thinking. Compare being a profound musical composer who sweats blood over every note, with being a competent (not necessarily great) improviser who, given any request, can bang out something listenable immediately without too many bum notes, without thinking too hard.

    Ideally you want both. Computer science education gives you the profound compositional knowledge. Improvisation needs lots and lots of practice at the basics. So code a lot. It makes everything else easier.


  • I don’t like the current landscape of python type checkers.

    I figure that Python itself is at the bottom of this. It simply wasn’t designed for static types. Mypy is still of some use but if you want a statically typed language, trying to graft a type system onto a unityped language hasn’t worked out well as far as I know. See also: the Erlang dialyzer, Typed Racket, and whatever that Clojure extension is called. Even Scala has its problems because the JVM has its own type system that isn’t that great a fit for Scala.

    Also, why Rust as the implementation language? Just for speed? It seems a shame to not use Python/PyPy.






  • If the drive has bad sectors that it can’t read right now, it likely had other sectors that were marginal and got copied (remapped) to new spare sectors before they became unreadable. So there is still potentially recoverable data in the remapped sectors, and not much you can do about it.

    Basically, writing zeros to the disk is about as good as you can hope for. If your data is s00per seekrit to the point where you can’t stand the possibility of any bits at all being recovered, you basically have to melt the drive. Otherwise, zero it and send it in.

    Next time, set up encryption ahead of time, so your new drives never see plaintext. Some drives have a “secure erase” feature that is basically a crappy version of this built into the drive.




  • It doesn’t and can’t exist, because the networks keep changing. You could have a 2005 phone that still is perfectly solid, but it’s a 2g phone and the networks now are all 4g and 5g. Also, the idea of a smartphone is to use internet services or at least web pages, and those invariably want you to use recently made phone hardware to deal with bloat. If you can get 5 years from a phone you’re doing ok.