Continued:

The reason they are worse than spaghetti code is that, even code that is difficult to read can usually be deciphered if it's well tested or given enough patience.

Bad comments can become so detached from their original context that even their original author might no longer be able to explain them after enough time passes.

You cannot write static code inspection for comments, or unit tests, or expect that people who update code will always find the related comment.

In , one thing that's worse than spaghetti code is misleading/outdated comments!

I've been in interviews where I've mentioned I avoid comments as much as possible, and people seemed to obviously disapprove.

Docstrings are mistakenly conflated with comments. Docstrings are not comments. Comments should be primarily about exceptional things like unavoidable implementation hacks/optimisations. Comments are almost impossible to efficiently maintain and should be used sparingly.

Amazing work on explaining ML so that normal humans can begin to understand it.

vas3k.com/blog/machine_learnin

Day 35:
Catching up with my NN course, I am now convinced deep learning is just dark maths magic. Direct Andrew Ng quote:

"... I have to admit, I think the main reason people use max pooling is because it's been found in a lot of experiments to work well, and the intuition I just described, despite it being often cited, I don't know of anyone fully knows if that is the real underlying reason."

If Andrew Ng doesn't know, nobody knows... At least I feel a bit less stupid now.

Eleni boosted

Small tip:
No need to import `pprint` in pdb, to make things easier to read!

pdb supports pretty printing out-of-the-box with the `pp` command!

Thought of the day:

's "Fat Models" seem to also be a consequence of dependency injection not being "a pythonic thing".

So when writing extensible apps, it's easier to just put all logic in models and then let the user subclass and override then, than putting logic in separate modules that are more backend-agnostic.

Day 17

In the last week I did lots of little things, some code reviewing for mentoring, not as much as I wanted, but got back to it finally. Currently playing with `electron` and requests with native promises.

I was building a dependency diagram in DOT/graphviz. Naturally, I accidentally made a crown 👑 ✨

Noob Mastodon question: Does moving instance mean that all your followers will stop seeing your posts and will need to re-follow you? (and the opposite)?

In the land of , today I'm finally done with the first course in Memrise, ending with the days of the week, so I now know how to say stuff like "Sonntags gehe ich gerne in meine Lieblingskneipe", to highlight how much I've overstayed in the UK.

Second course is supposed to be about "expressing feelings", I wish this was taught using memes...

Days 5-7: Some and some .

Done with converting the JS interview app from work.

I had started a python application to help me build flash cards through the fantastic leo.org platform, but it's not teaching me that much, so I'll try to convert it to TS.

Starting off as cli-only and will then try to evolve it into something with a GUI (maybe Electron?).
I'm not sure what to use for local storage, maybe a non-rel DB will suite this case?

Imo these are significant obstacles that hinder adoption and attempts to create stubs for popular libraries, especially when they involve a lot of metaprogramming (ex. )...

Show more
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!