Live data from Hacker News

Ask HN: Tutorials written with heavy dependencies

news.ycombinator.com

31–40 of 53 posts

Re: Ask HN: Tutorials written with heavy dependencies

#31
OP, An analogy for your question/concern:

You want to add 2 numbers.

So, I hand you a calculator.

That calculator has about 1000 dependencies.

I didn't hand you petroleum oil and copper wire, and say "Oh, first, do all these prerequisite processes to manufacture the inputs you'll use to build a calculator. Next, build a calculator. Ok, now you can add two numbers together"

(We could even go a step back from that-- I hand you some steel components, a forge, and some people (labor and engineers), and give you a tutorial on how to make a foundry to create the parts to create and oil rig, and to use to create components for bull dozers, which you then manufacture and use to mine copper ore, which you then process into wire... and so forth)

Do you want to:

- build a foundry to build tools for mining

- mine minerals (iron for tools to make other tools with, oil for plastic, copper ore for wires, etc.)

- build a factory for making calculators

- manufacture a calculator

Or do you want to

- Take this calculator, and add 2 + 2?

Perhaps you'd rather build the tools. Or perhaps you'd rather use the tools to solve a business problem.

Personally, I'm the developer who prefers to solve the business problem, as business strategy & product management interests me more than hardcore science/engineering.

Re: Ask HN: Tutorials written with heavy dependencies

#33
For ML tutorials, I feel like I do see quite a lot of tutorials in pure numpy. A fun thing I've been doing with ChatGPT is to ask it to show me some starter code for some topic. Usually it shows me some code that imports sklearn and then I'll followup asking it to give me everything written without these dependencies. It's worked out pretty well so far.

Re: Ask HN: Tutorials written with heavy dependencies

#34

In many fields you're expected to work at some higher abstraction level above "how things really are working", in which case all the tutorials will use the primitives of that abstraction level. In this case, if you want to understand how stuff works, you should explicitly look for things that are not labeled "tutorials" - often textbooks will be a decent example, covering the principles and theory behind these abstra…

Which is kind of a shame, to be honest. I would dare say that even x86 assembly is less complicated to understand than many of these libraries, where time is spent trying to memorize their semantics rather than understanding how data is modified and how systems communicate with each other.

It is true that a lot of platform specific nastiness and complicated math occurs in some of these libraries which is not necessary for a user to learn. But for those desiring to learn "what's happening under the hood", the code should not make an effort to needlessly obscure this from them by way of complicated syntax, poor interface design, academic naming practices, and big unwieldy spaghetti classes.

Re: Ask HN: Tutorials written with heavy dependencies

#35
post #22

Earlier quoted context omitted.

You’ve probably figured it out by now, but for others who may be in a similar position; GraphQL is a specification (with various implementations) and you can read up on the spec here: https://spec.graphql.org/

Can you explain it like I am 5 ?

Explain the spec, or the tech? Well the spec basically exists because some people at Facebook noticed that it's more efficient for the client to request exactly the data it needs than to have the server send everything and the client has to transform it. Yes, REST could work, but once you have more complex data structures, it becomes harder.

For example with a todo list app, if you want a user's todos that are complete, your request might look like

    /api/todos/$userId/$completionStatus
Now if you want the todo titles, completion status, and description, but don't want a field like subtitle, you could send the entire todo from which the client could extract the necessary fields, but why? That's extra data sent over the wire and extra computation done on the client, for basically no real reason. So maybe in your api, you do something like

    /api/todos/$userId/fields=title&$completionStatus&description
Congratulations, you reinvented GraphQL.

Re: Ask HN: Tutorials written with heavy dependencies

#36

In many fields you're expected to work at some higher abstraction level above "how things really are working", in which case all the tutorials will use the primitives of that abstraction level. In this case, if you want to understand how stuff works, you should explicitly look for things that are not labeled "tutorials" - often textbooks will be a decent example, covering the principles and theory behind these abstra…

Can you link some examples? Appreciate it.

Re: Ask HN: Tutorials written with heavy dependencies

#37

In many fields you're expected to work at some higher abstraction level above "how things really are working", in which case all the tutorials will use the primitives of that abstraction level. In this case, if you want to understand how stuff works, you should explicitly look for things that are not labeled "tutorials" - often textbooks will be a decent example, covering the principles and theory behind these abstra…

Which is kind of a shame, to be honest. I would dare say that even x86 assembly is less complicated to understand than many of these libraries, where time is spent trying to memorize their semantics rather than understanding how data is modified and how systems communicate with each other. It is true that a lot of platform specific nastiness and complicated math occurs in some of these libraries which is not necessar…

idk man I already got a couple hobbies and one serious domain of expertise I'm just tryna get work done and get paid here. might be a shame to you but I'm so grateful I don't have to dig through a compiler manual or whatever to do my job.

Re: Ask HN: Tutorials written with heavy dependencies

#38
I can certainly relate to it. I used to follow tutorials and stuff on ML when I was near end of high school but I just could not shake the feeling that I don't know lot of things going around

It's been 2.5 years into college, and yeah I did laze at many times (college standards here are not particularly rigorous), and I am nowhere nearly capable to reason about numerical calculations considerations, Statistical methods, architectural development at the hardware level for scientific computation, etc. There's so much that goes into it, there's so many layers, components, theories, etc that you get lost very soon

At end all you can really do 1. Grab a statistics book and get into ML theoretically

2. Learn about numerical computations, I particularly enjoyed the Handbook of Floating Point Arithmetic, but I never really finished it

3. Libraries have lot of optimizations in it pertaining to the specific architecture, and in fact, I remember that someone gave a demonstration of using numpy and he faced an error, which had to do Windows itself : ) You will get to see lot of such exceptions of course in the code too... idk what to recommend here really, just, read more?

4. Documentations can be wrong at times, or fail to mention some assumptions, or there might not be one at all really. Software just didn't see massive adoption of rigorous frameworks, like in many other disciplines, and soon got surrounded by business needs and customers' complaints. But even if you can somehow get an insight to philosophy, the values they put into their code, etc., it's a huge help imo. Books provide it at times, for example I was struggling with SYCL specification, so I grabbed this "Mastering DPC++", tho it also assumes a bit of experience

Re: Ask HN: Tutorials written with heavy dependencies

#40
For ML not in python: maybe these videos will help [0] the datasets are here [1]

The author walks through the basics (Linear regression, Naïve Bayes, etc) using Julia. The parameters and output are better explained than what I have found with python equivalents.

[0] https://www.youtube.com/playlist?list=PLhQ2JMBcfAsi76O13sJzk...

[1] https://github.com/fabfabi/julia4ta_tutorials/tree/master/Se...

Post reply on HN