From zero to a fun Julia project in 4 days?

I’ve been asked to mentor a group of 2-3 students (aged 16+) for a week-long coding camp this summer. The idea is to help them discover computer science through a research-adjacent project, with a public presentation at the end. The students probably won’t know any Julia coming in, but I hope they will at least have some notions of programming.

In my opinion, the best way to get hooked is to do something that actually matters, for instance contribute code to a package that other people use. Which leads to my questions:

  1. Can I get students from zero Julia skills to a opening a useful pull request putting together a fun project in 4 days?
  2. If so, what kind of topic / package / problem would you recommend they tackle?

I am relatively free domain-wise, as long as it falls within either of these broad categories:

  • “Graphics and visualization” (including video games)
  • “Simulation” (physical, stochastic)
  • “Artificial intelligence” (machine learning, optimization)

I think the Julia part is easy. Working with git and github is more challenging. (My experience.)

6 Likes

A pull request does not appear like a necessity for this, or even relevant at all I would say. I would +1 Cormullion and perhaps consider leaving git out of this, especially given the age of the students (I only started using git well into my PhD - before that I’ve never even heard of it).

Instead, what about “to a interactive GUI application” in 4 days? I think this is very possible and can be tied easily to your “simulation” category. Have you seen the brief tutorial I’ve made on interactive GUIs with Makie? Have a look and perhaps you can judge if something building on this is feasible? (https://www.youtube.com/watch?v=L-gyDvhjzGQ)

2 Likes

Also I want to say that it is very nice of you to do this! Sounds like an interesting project, although surely a lot of preparation work!

1 Like

That is nice.

What about the main idea stated above? They could contribute their presentations as tutorials/docs to existing packages. This is more feasible (and useful in the context of Julia) than trying to contribute PRs with actual code.

1 Like

That’s a good point indeed, Git is a nightmare to get a handle on.

Interesting suggestion, I’ll have a watch!

Another good point! I know for a fact that @fonsp is always looking for new featured Pluto notebooks, so that could be a cool goal. Or contributing new examples to ecosystems like Agents.jl maybe.

4 Likes

Another alternative is to use existing GUI tools such as that of Agents.jl to make an analysis of models such as COVID-19 spreading and impact of interventions. Make a short presentation of some background on modelling the disease, how they modelled it in code, and how they processed the data to reach conclusions, while having the GUI as “eye-candy” for the presentation and of course as the main analysis tool of the students to understand the impact of parameters.

(Agents.jl used as an example here because I know it already has some sorts of GUI that one could use out of the box. Whether a highschooler can learn Agents.jl in 4 days I unfortunately do not have knowledge on!!!)

2 Likes

I want to start a community effort soon to fill up the Makie docs with simple examples for all the plot and block attributes that exist. That could be an easy thing where you try the whole workflow in a mini task. Clone a repo, get the package to run in dev mode, find an attribute without example, design a simple example in like 5 to 10 lines, file a PR.

1 Like

Keenan Crane at CMU does these fantastic introductory graphics lectures on youtube. The course code is mostly in C++ and js. I suspect that implementing the course material in Julia would be an interesting and valuable project for both graphics pedagogy and building the Julia graphics ecosystem.

1 Like

That sounds great, provided you can oblige the maintainers of the packages in question to do code review and either reject the code with explanations or (rework and) merge it within short time.

2 Likes

Oh… it is really hard to give an advice for such a case. It depends a lot on how intelligent the students are. IMHO Julia is not a good starter for graphics or machine learning like doing MNIST task as of now. The ecosystem is still not developed enough compared to python/etc. (I fully understand that some talented programmers can make Julia some of the best in those areas in the future, but as of now, it’s not happening yet.)

Physical modeling is really good, but I’m not sure how far you can go. You could solve a simple pendulum using some difeq and call it a day, or if the team is a team of geniuses, dive into even things like finite element analysis. I don’t know how it could be done either. It seems challenging, but if the team has a heavy physics/math background and is made of ultra-smart people, maybe it’s possible.

Then, when it comes to optimization, I like this. You can make a sudoku solver, for example. But then, what about using mixed integer programming to make a Civ/Stellaris/etc AI that actually plays well?
Yeah… it depends.

Really strongly recommend Agents.jl and that you try to identify an area of interest to the students before the thing starts.

There are lots of models not only in the Agents ecosystem but in the NetLogo ecosystem which you could use as inspiration.

1 Like

I would keep the goals very modest. One week is very little time to teach a young programmer Julia and do something useful with it. Contributing code to an existing package is entirely out of the question. Contributing tutorials or examples might be feasible, but I’m not sure it’s the best direction to go.

Will they be collaborating on a single project, or will they each have their own project?

2 Likes

That sounds very useful but not very exciting to do for high-schoolers wanting to discover computer science?

Perhaps too ambitious for 4 days starting from scratch?

My thought was to have them do a PR on one of the packages I maintain (there are quite a lot now ^^) or on a package maintained by someone I know and can ping (there are even more of those).
But the Git objections from above are very reasonable.

Having them code a little video game would certainly be fun, or a game AI that solves something simple.

Thanks for the pointer to NetLogo! Is it something of a reference in the field of multi-agent modeling?

They will be working together on the same project.

1 Like

It sure is, been around since the 90s and really focused on agent based modeling. There’s a decent book by Wilensky that provides a resource you could use. “An Introduction to Agent Based Modeling”

Julia offers a number of big advantages, including speed, and a general purpose ecosystem for other computations. For example if your agents need to solve an ODE to decide what their next action is, voila you have that stuff available, if you want to do parallel calculations, voila easy threading etc. you could work on all kinds of topics of interest, from economics to ecology to traffic flow to infection modeling to biological organ formation to crystal structures and glasses to ocean sedimentation and carbon transport… You can get surprisingly far if you yourself have sufficient background on the problem to guide them. Ideally you get them a framework to start off with and then they invent their own variations in the rules to address real world questions.

2 Likes

In this case you are likely need a Git workflow anyway.

You could setup a fork for each student on the Github, and add yourself as maintainer. Then it would likely be your responsibility to do the merging during the course of the project (they’d just look how you do it), and in the end of the day to do the PR.

I fondly remember one of the first exercises we were given in the CS freshmen C class: write a program that reads in a text file that describes a maze (walls, entrance, and exit), solves it, and prints the solution.

This includes both a fun puzzle, some visual element (simple enough to implement in a terminal), and learn topics like graph theory and recursion. Plus, students can compete who has the best maze solving algorithm (shortest path, fastest wall clock compute time,…)

2 Likes

+1 for this approach. Setting up the framework from scratch is likely to be harder than it seems and full of gotchas for beginners, especially in such a short course. They’ll probably get more out of it and have more fun developing their own variations and elaborations on a bare-bones simulation that’s already working.

1 Like