We need better introductory material

i use codementor.io which has a code editor built in so you can code in the article.

i was checking out nextjournal.com which allows u to execute your code as well.

medium.com is a good platform but it’s coding support is pathetic comparex to codementor.io

1 Like

It would be nice if Coding Games and Programming Challenges to Code Better supports Julia.

You can train certain languages by programming example games. They support so many new languages, but sadly not Julia.:cry:
image

1 Like

Show them how to use some common macros and mention that they have different semantics, but defer writing macros later.

Common Lisp has a different relationship with macros: yes, they are incredibly powerful, but at the same time they are needed relatively early to get some things done. That’s why their syntax just blends in with functions.

In Julia, macros (and metaprogramming) is available and is equally powerful, but since the language has other powerful constructs (eg parametric types) which Common Lisp lacks, they are not needed as pervasively. Their syntax (@) makes them stand out, I think this was a conscious design choice.

IMO the manual is so well-written that it works well as an introduction to the language. I think what you are asking for is, at the same time, an introduction to programming, illustrating concepts with Julia. It is true that there is a great number of excellent tutorials of this kind using languages which have been around longer (eg Python, R), and Julia is behind. I find this understandable and I am confident that the situation will resolve itself.

3 Likes

TBH, I was thinking about something similar: Julia is not a bad choice as a first programming language. It may even be that it’s easier to understand and write idiomatic Julia code when it’s learnt as a first programming language (it happens relatively often to see here on Discourse people getting stuck trying to force OOP design in Julia). Not to mention that it’s much easier to just keep learning and become a developer in Julia than in any other language I can think of.

Many “learn python” books also teach a lot about variables, functions, control flow, dictionaries, classes, inheritance etc… which are very general concepts. I’d like to see (maybe even write at some point) some Julia based beginner material that also includes fundamental Julia concepts such as types, functions and multiple dispatch, arrays, collections and map/broadcast. At least for people with a strong mathematical background but no programming experience, this way of thinking could be very intuitive.

1 Like

The wikibook (linked from the learning page mentioned by @Tamas_Papp) would presumably welcome any help.

3 Likes

Hm, I did not get from the original post that we were talking about USING macros, wasn’t the discussion rather about writing macros? In any case, tutorials are always great, we just need someone to write them. Surprisingly, the beginner can often write a good tutorial. He or she will automatically encounter a lot of the problems other beginners will face, and as such will write something much more relevant (unless the alternative experienced programmer is very pedagogical of course).

Having taught some courses to graduate students (in economics) that involve programing, some of them using Julia, my perspective on the “first programming language” question is the following.

Some people gravitate to programming at an early age, eg during the elementary and primary school years. They find computers fascinating, and they want to learn to program. Initially, a lot of their knowledge is self-taught and not necessarily organized, they can have important blind spots. Nevertheless, they quickly master basic concepts, and can move up to more advanced ones quickly.

Other people realize that they have to program, usually in their senior undergrad years, or during the first part of their graduate education. They are not especially attracted to it, and frequently just want to solve a problem with the minimum programming necessary.

This is of course a simplification, and the age of starting programming may not be the key factor. The point is that the two groups require different approaches. For the first one, Julia can be a source of fascinating concepts and tools (multiple dispatch, metaprogramming, …). For the second one, it can be a collection of sophisticated tools which are overwhelming upon first encounter to the point of incomprehensibility.

When writing introductory material, I find it helpful to keep the above distinction in mind. I think that a carefully chosen subset of Julia can be a great “first programming language”, one that also provides seamless transition into learning advanced concepts later, within the same language. But choosing this subset depends on the target audience, their objectives (eg optimization problems, differential equations, dynamic programming, DSGE models, etc).

This is why I think that metaprogramming, and even the intricacies of types and multiple dispatch can be omitted in a “first programming language” context. I think the place for them is short, self-contained tutorials. But again, the manual is very good for that purpose.

10 Likes

@tim.holy: Will certainly look into that and see where/if I can contribute, it already seems very good!

@Tamas_Papp : That’s a very interesting perspective. So far I only had to explain Julia to type 2 students (late learners). I also happily belong to this second group (had to learn how to code when moving from pure mathematics to an applied field) and for me Julia made a lot more sense than Python: it almost feels like writing math and thinking in terms of functions from one domain (type) to another. The key question is which materials belong to an introduction. I fully agree on metaprogramming not belonging there, whereas other Julia’s unique features certainly do (native Arrays + dot broadcasting). Already figuring out this list would be a pedagogical step forward. As far as multiple dispatch is concerned, I think some version of it should be considered “basic” (of course the intricacies of parametric types could be a bit too much). Any user will probably encounter it in some way or another while coding (something as simple as * for Strings or Numbers doing different things). It’s nice to explain that they can (and sometimes should) use it in their own code. I was checking out the example in the wikibook about a function that can take both a string and a real number as input and it seems very intuitive.

Shameless self promotion – I’m working on lessons on scientific programming for people with little requirements (and even less background), which uses Julia (on binder): https://github.com/tpoisot/ScientificComputingForTheRestOfUs

It’s not an intro to Julia itself; this will be part of a graduate class on modelling in biology I’ll be debuting this winter.

Anyways, feel free to contribute.

12 Likes

This is well done and very nice!

It makes me think that the real “problem” is discovery and curation, rather than lack of material.

4 Likes

One issue is that the books, videos, introductions, etc. in (almost all of) Get started with Julia are for older versions of Julia. Sometimes much older, where notation has evolved significantly.

Would people be willing to consider rearranging these by Julia version rather than the current structure?

Very cool. How far do you plan to get on these lessons prior to January 1st? I am considering having a class using Julia this winter and would love to point them to this.

I guess that most people would consider tutorials that use earlier syntax not worthy of preservation per se in that form. If they are useful, they should get updated to the current version, if not, then removed from the list. It is hard to make a good case for the collection of outdated code for pre-1.0 versions in this context.

3 Likes

I agree. The practical problem is that if we set 0.6 as the current bar, then I think there are very few ones that survive. http://quant-econ.net/jl/learning_julia.html is up to date, https://github.com/bkamins/The-Julia-Express as well, probably none of the books, virtually none of the videos, etc.

My preference is that if I am sending me students to the: Get started with Julia page to learn, I don’t want them confused by outdated material. If we want an archive of older videos and books, then the page has the wrong title.

A proposal might be to categorize them as: 0.6, and 0.5… move things up from 0.5 to 0.6 if they end up ported, and then when 0.7/1.0 is released, retire the 0.5 section (and ‘upgrade’ the 0.6 as they are ported over).

5 Likes

Thanks! I hope to have the 5 lessons done (or at least drafted) by January 1st, as I will use them for the first time in a class starting Jan. 15. Then I’ll spend some time revising them after the class.

4 Likes

Great, and thanks for the open license! :slight_smile:

Hey guys,
Here are my 2 cents on using Julia for Data Science

All feedback is welcome :slight_smile:

Cheers,
theuchiha

5 Likes

I’ve written a series of blog posts here: chapters 1 to 8 are a sequence of posts introducing Julia to a beginner in programming. I really don’t go in very deep but I try to keep it pleasant to read / easy to follow along. If you know of somebody who is just starting, it may be useful to get an overview of the basics.

Next, I plan to add slightly more advanced material (starting with a JuliaDB tutorial, which is up already).

A big thank you to @tpapp for his explanation on Hugo plus Markdown (and if needed Weave) to blog about Julia, it was very useful.

11 Likes

This is really awesome. One suggestion for the JuliaDB post: make the Getting the data a header as well , cos when I saw Loading the data I naturally thought where is hflights.csv from. Skipping the intro is a fairly common reading style… I hope. And I had to really read the intro to find where to download the data; so I thought a heading would be nice.

One gripe I have with some of the tutorials is that they focus on fairly “trivial” datasets by today’s standards. It doesn’t really matter which tool you use for such a small dataset, and when you apply the same techniques to larger datasets, things to start to break and/or performance issues start to surface.

I am in the processing of writing a Julia vs R vs Python posts on Fannie Mae data which should take a couple of months to produce.

8 Likes