Live data from Hacker News

Ask HN: Tutorials written with heavy dependencies

news.ycombinator.com

21–30 of 53 posts

Re: Ask HN: Tutorials written with heavy dependencies

#21
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 abstraction layers which you'll then use in practice.

Like, in ML there are books which work through a basic implementation of all the algorithms using just the matrix multiplication primitives of matlab or numpy, and that works well as a learning exercise, but in practice everyone would rather use a highly optimized (but thus complicated less understandable) library maintained by others.

Similarly, in cryptography, there are textbooks which will work you through an implementation of the core algorithms, but again, a tutorial teaching how to do stuff in practice would not (and definitely should not) cover making your own implementations for cryptographic operations, but rather describe how to use a properly verified library.

Re: Ask HN: Tutorials written with heavy dependencies

#22

I remember attending a meetup, once, where it was supposed to be a tutorial on GraphQL. I was barely familiar with GraphQL, when I went in, and left, almost exactly the same. The tutorial was actually all about a couple of JS libraries that you could use as GraphQL abstractions. I am a Swift programmer, and was a lot more interested in the actual GraphQL interface, which was barely mentioned. Lot of that stuff, going…

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 ?

Re: Ask HN: Tutorials written with heavy dependencies

#23

> A great example is the machine learning: An immediate google gets you as far as 'install these 10x libs' then write this. This is because ML mostly uses Python. And Python is an absolute clusterfuck of dependency hell. https://xkcd.com/1987/

I was a HPC system admin for years an I still avoid python because of this and having to manage 2-3 different versions for everyone that never updated their scripts. I hated it and to this day I do my best to write my own support routines in my programs to minimize pulling in anything but the most common libraries or packages.

Re: Ask HN: Tutorials written with heavy dependencies

#24
This is one of the reasons I still use LiveCode despite middling performance, near-zero library support, and a language spec that was reasonable in 2000: it has zero dependencies. You can:

    Go to the web site
    Download a single installer
    Run that to produce a single file executable
    Run the app
    Create a new project (you get a window for free)
    Drag a text box from the tool palette onto the window
    Switch to the arrow tool
    Click the text box
    Type "Hello world"
    Save the project to disk
    Select Standalone Application Settings on the File menu
    Check mark to build for MacOS, Windows, and Linux
    Select Save As Standalone Application on the File menu
...and you get single-file executables for three platforms. That was maybe 13 steps from nothing to multiplatform Hello World. It stuns me that other environments/languages make it harder than that.

Many years back I used to do demos for LiveCode at trade shows where I would build a stopwatch timer while holding my breath.

These days it would be much better in so many ways to be working in Python. But the lack of an environment like LiveCode is a major pain point.

https://livecode.com in case anyone is curious.

Re: Ask HN: Tutorials written with heavy dependencies

#25

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…

> 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.

Great point, I used ML only as an example, GraphQL was another that came up in comments.

Books are a good resource, or college literature for example, but from an approachable point of view, without knowing the 'basics' it's hard to consume.

Re: Ask HN: Tutorials written with heavy dependencies

#26
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 ?

GraphQL is a spec, not tech. The implementation of it (Apollo for example) is what you are probably after. GraphQL can exist on a multitude of services that support queries with the GraphQL spec. Like SQL, there are many databases that support SQL (in various forms).

Re: Ask HN: Tutorials written with heavy dependencies

#27
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 ?

Raison d'être: https://graphql.org/

Assumes you’ve done some API design, maintenance, and/or usage, to grasp benefits.

Re: Ask HN: Tutorials written with heavy dependencies

#29
In general, most documentation is infamously:

1. outdated, and filled with deprecated syntax or abandoned bugs

2. version dependent, and thus pointless to read or write

3. platform dependent, and thus also falls under point #1 or #2 with time

4. poorly written, as most rarely read/update the documentation

While tools like Doxygen attempt to fill the reference holes, in general a lot of effort is made to create unit-tests/examples of how software should be integrated.

The experience can be unpleasant if you are new to a large library. The major downside of Open-Source projects is usually the RTFM dismissive attitude, as many people are not here to provide "free" support rather than solve/share there own use-cases. If you can show a unit-test that highlights a specific issue, than there may be mutual interest from project members... but you need to prove you are not asking people to search google for you.

In general, if you are at the "trial-and-error" stage, than looking at another active/well-documented project that uses the same key library in a similar use-case to your own will often be faster (example: search deprecated kernel api calls in utilities for compatibility details).

Another point I will mention, is thinking about the long-term sustainability choices for a project. In general, splitting up dependencies into small piped/ipc/rpc/ClMPI/AMQP utilities is wise. That way when someone unwisely permutes a library API like they often do for various reasons (rarely good reasons for a shared object), the affected area needing maintenance is minimized (i.e. the next person only needs to read 3 or 4 familiarly structured documents to securely refactor the module.)

If you are more interested in the algorithmic side, than an optimized library is probably the wrong place to start. Rather, pull the published paper(s) for the algorithm, and look at the published history (i.e. the datasets and ROC curves especially detail what to expect). Prototyping languages like Python/Julia/Octave/MatLab are often the language of choice in this area.

Best of luck =)

Re: Ask HN: Tutorials written with heavy dependencies

#30
post #15

I remember attending a meetup, once, where it was supposed to be a tutorial on GraphQL. I was barely familiar with GraphQL, when I went in, and left, almost exactly the same. The tutorial was actually all about a couple of JS libraries that you could use as GraphQL abstractions. I am a Swift programmer, and was a lot more interested in the actual GraphQL interface, which was barely mentioned. Lot of that stuff, going…

Please... I've already come to the belief that graphQL is black magic. I use it daily. You do raise a another great example with graphQL & sparQL .. I gave up trying to find any low level documentation on it because it was its so abstract from something I knew before, so I just learnt the triplets and felt comfortable to query 'enough'. I use a library now https://github.com/giacomociti/iride because I know the owner…

The source code of the black box is open, you can read it. And its tests.
Post reply on HN