Motivation from legendary Julia people

First, I want to say thank you for Julia and its libraries, without which I wouldn’t have been able to complete many tasks. Thank you for supporting me and forgiving my naiveness. (As for my latest task, I’ve written lots of Julia over the past month or two but I don’t believe it’s something I should talk in public.)

This discourse is full of legendary level people that it’s easy to forget that they’re rare. I believe I am easily in the top 1% of programmers having made a dancing link sudoku solver, tetris game, learned cache and SIMD, and even playing with autograd, as well as trivially solving many problems other people struggle with.

But still, compared to those who contribute to major Julia packages or the language itself, I am nothing.

So, what are motivations can you give me? How can I be that good at programming?

I think maybe I’ve gotten used to easily solving my problems and getting things done easily that I struggle when faced with even slight hardship. Not boasting. If anything, so shameful.

Thank you for supporting me over the years.

1 Like

Oh, another thing is that comparing mindset for me coming to Julia, for me, it’s like… “Oh nice! This problem is easy now! I’m done!”

Whereas others might be like “Let’s tackle more challenging problems we couldn’t have tackled before with it.”

Hi. It helps to follow your interests. What fields attract you?
Best.

Optimizations, problem-solving in general. I’m thinking of getting into real analysis and abstract algebra and then even into things like physics modeling and finite element analysis (These gonna take years.). I thought I liked game development but it’s more like I liked solving challenges in simulation, rendering, etc, and optimizing the game performance than actually writing lots of content for the game. I have a big arsenal of algorithms that I use to solve whatever problems come my way, but sometimes I’m a bit naive. Moreover, I generally don’t know the deep mathematical theory behind things like why the Runge-Kutta method works, so, even when I’m creative in modifying works to optimize it to fit my task, I do not have the background theory to make it work. I’m trying to fix these starting by learning abstract algebra and real analysis (and then likely even things like generating functions, complex analysis, etc), but the progress has been slow so far.

It takes longer to do more with more than to do more with less.

One thing you might enjoy is building in code whatever it is you are learning, as you learn it. Especially for mathematical things, I find this helps me play and engage with the abstract material better. For instance:

  • Abstract algebra: If you are leaning group theory, you could implement a Julia type for representing abstract group elements. Figure out how to encode the group axioms so you have, e.g.,

    julia> a, b = GroupElement.([:a, :b]);
    julia> isone(a*b*inv(a*b))
    true
    

    If that’s easy, try extending this to finitely generated groups, so you could do something like:

    julia> a, b = @generators a b where isone(a^8)
    julia> a^10*b*a == a^2*b*a
    true
    
  • Runge-Kutta methods: Implement a function that solves an ODE using a Runge-Kutta method with whatever Butcher tableau you specify. Use it to implement Euler’s method, the midpoint rule, RK4 and any others. Use Makie or Plots to see how different methods visually compare for an example ODE like a damped oscillator.

    If you’re really interested about the family of explicit RK methods, try implementing a Julia function that generates a valid Butcher tableau from some parameters. You could try generating consistent tableaux of a given order randomly. Do most of them suck at solving ODEs, or do some still perform ok?

  • Generating functions: Try implementing an AbstractVector subtype whose elements are given by a generating function. For an ordinary generating function f(x), the Base.getindex method returns the series coefficient c_n of x^n, which you could compute by approximating c_n = \langle f, x^n\rangle = \frac1{\langle x^n, x^n \rangle} \int f(x) x^n dx in Julia with a Riemann sum.

    Implementing Base.:+ for these vectors would be easy, but what about multiplication by scalars? Or element-wise multiplication? What other methods could you implement?

If you find yourself solving problems too easily:

for me, it’s like… “Oh nice! This problem is easy now! I’m done!”

you might like to challenge yourself to solve the problem “better”, meaning in more generality, or maybe with more elegant code, or more readable code, or with better runtime performance, etcetera — whatever you like most. When I’m stuck with what to do, I like to try to make my old code “prettier” and more symmetrical. Often this leads to simplifications, and to code I’m more proud of.

I think being a good programmer comes from trying out lots of small ideas often, as well as having “big projects”. And most importantly, doing it for fun.

4 Likes

I absolutely support this view! Implementing something requires usually some good understanding and thus trying to implement a concept is a great guide to learning :slight_smile:
That reminded me of a nice blogpost I read quite some time ago which still resonates strongly with me:
https://mikelevins.github.io/posts/2020-02-03-programming-as-teaching/
It compares interactive programming to teaching a student which I think is an excellent picture for the process: You define a new small function extending the current tools a bit, then you test it. Exactly as you would teach someone a small new piece of information and then question them to see whether they understood. And it also makes sense in the context of learning something new: Usually while preparing for teaching or while explaining something, you as the teacher also gain a deeper understanding of the matter. Or discover that there are things you didn’t fully understand :smiley:

6 Likes

This interactive learning process is what I feel Julia shines in well. It doesn’t feel like I’m wrestling with the programming language to get an inplementation in as per an experience in matlab. And it doesn’t hang over my head as a fear that I might not be able to scale it well in Python. And the unicode characters are such a lovely feature for implementing code that looks very close to maths and pseudocode. A provramming session in other languages pushes me away, but Julia has become addictive for me: “I could do this next, and then do that in this way next,” and so forth. And the package ecosystem is quite high in quality at this point, and is open source and free! I can’t just get a matlab package at work when I want to toy around with an idea - I need to request it with a good reason, and then wait for it to become available through the workplace beauracracy.

I have a high respect for Julia developers. Looking at Juliacon each year, there are lots of difficult issues, some extremely hard to solve, all while the Julia programming language community is small and doesn’t have many people. Yet, they don’t seem to ever give up.