1 of 39

2024 Hackathon:

Creating a Code Standard

Natalie van Dis & Arthur Rodrigues

Code Club 👩🏽‍💻👨🏻‍💻👨🏼‍💻

2 of 39

Hackathon schedule

06:00 - 06:20 --- Introduction to Hackathon [20 min]

  • SORTEE Code Club & ORT code
  • Hackathon outline
  • How-to Hackathon

06:20 - 06:30 --- Sign-up + Set-up your working directory [10 min]

06:30 - 07:43 --- Hack away at the Hackathon (with breaks) [75 min]

07:43 - 07:55 --- General Discussion & Wrap up [12 min]

--- 07:55 END HACKATHON ---

3 of 39

Introduction to Hackathon

4 of 39

Natalie van Dis☀️🐙�color me now please

Arthur Rodrigues☀️🦜�color me now please

tietokone

computer

computador

5 of 39

SORTEE Code Club🎉

https://www.sortee.org/code_club/

Every third Tuesday of the month

Code Club 👩🏽‍💻👨🏻‍💻👨🏼‍💻

6 of 39

SORTEE Code Club🎉

Code Club 👩🏽‍💻👨🏻‍💻👨🏼‍💻

7 of 39

✨Become SORTEE Code Club Leader 2025! ✨

Code Club 👩🏽‍💻👨🏻‍💻👨🏼‍💻

8 of 39

Best practices for Open, Reliable and Transparent (ORT) Code

SORTEE Open Code Primer

Stefan Vriend, Joey Burant & Freddy Hilleman

9 of 39

Why a Code Standard?

  • More practical how-to
  • Implement ORT practices via coding by example
  • Accessible & Easy

➡️ Simple, real-life examples for common Ecology & Evolution analyses

10 of 39

The “perfect” Open, Reliable and Transparent (ORT) Code for EE

🤝Today = Decide as a community

What edits needed to make the code as easy as possible for someone else to understand, run, and reuse?

11 of 39

Hackathon outline

12 of 39

Poll results

13 of 39

Selected piece of R code

😅/😰

14 of 39

Simple Ecol & Evol analysis:

Estimate fitness curve from experimental data

Fitness measures:

15 of 39

Six groups

  1. Reported
  2. Run
  3. Reliable
  4. Reproducible
  5. Organisation & Structure
  6. Other (opinionated) considerations �for public code sharing

Stefan Vriend, Joey Burant & Freddy Hilleman

16 of 39

How-to Hackathon

17 of 39

Hackathon schedule

06:00 - 06:20 --- Introduction to Hackathon [20 min]

06:20 - 06:30 --- Sign-up + Set-up your working directory [10 min]

06:30 - 07:43 --- Hack away at the Hackathon (with breaks) [75 min]

  • 06:30 - 06:45 --- Self-organise and Discuss; Start Coding [15 min]
  • 06:45 - 06:50 --- BREAK [5 min]
  • 06:50 - 07:10 --- Discuss & Code [20 min]
  • 07:10 - 07:15 --- BREAK [5 min]
  • 07:15 - 07:35 --- Discuss & Code [20 min]
  • 07:35 - 07:43 --- Break-out room Wrap up [8 min]

07:43 - 07:55 --- General Discussion & Wrap up [12min]

--- 07:55 END HACKATHON ---

Breakout rooms

18 of 39

Main documents

Cross pollinate 🐝🌻

19 of 39

How-to work in zoom

Breakout room: Group X (main room)

Breakout room: Group X (side room1)

Breakout room: Group X (side room2)

✏️

HackMD

Task 1: xxxx

Task 2: xxxx

………..

20 of 39

How-to work in zoom

Breakout room: Group X (main room)

Breakout room: Group X (side room1)

Breakout room: Group X (side room2)

Task 2

✏️

HackMD

Task 1: xxxx

Task 2: xxxx

Task 3: xxxx

Task 4: xxxx

🖥️

⌨️

Task 1

🖥️

⌨️

21 of 39

How-to work in zoom

22 of 39

How-to work in zoom

23 of 39

How to work with Git and Github

24 of 39

Git commands (command line)

cd <project location> # change directory to your project folder

ls # list folder contents

git clone <https to your Github repo> # clone a repository from Github

git switch <branch name> # switch to another branch

git branch # check in which branch you are working

git status #Your best friend! Check the status of your project files

git add <your_file.name> # add untracked files/changes to Git

git commit -m “Your message” # commit your changes with a descriptive message

git push # push your changes to Github

git pull # pull any changes made on Github to your local folder

25 of 39

Git commands (command line)

cd <project location> # change directory to your project folder

ls # list folder contents

git clone <https to your Github repo> # clone a repository from Github

git switch <branch name> # switch to another branch

git branch # check in which branch you are working

git status #Your best friend! Check the status of your project files

git add <your_file.name> # add untracked files/changes to Git

git commit -m “Your message” # commit your changes with a descriptive message

git push # push your changes to Github

git pull # pull any changes made on Github to your local folder

26 of 39

Sign-up + Set-up your working directory [10 min]

  1. Sign-up sheet
  2. Clone Github repo
  3. Download the paper and the dataset

27 of 39

28 of 39

Sign-up + Set-up your working directory [10 min]

  • Sign-up sheet
  • Clone Github repo
  • Download the paper and the data
  • Read the Github repo README file
  • Accept Github repo invite

29 of 39

Sign-up + Set-up your working directory [10 min]

❕➡️ All links and instructions can be found on Github� 📑Please bookmark the Github repo

Time left? Break time ☕

30 of 39

Hackathon schedule

06:00 - 06:20 --- Introduction to Hackathon [20 min]

06:20 - 06:30 --- Sign-up + Set-up your working directory [10 min]

06:30 - 07:43 --- Hack away at the Hackathon (with breaks) [75 min]

  • 06:30 - 06:45 --- Self-organise and Discuss; Start Coding [15 min]
  • 06:45 - 06:50 --- BREAK [5 min]
  • 06:50 - 07:10 --- Discuss & Code [20 min]
  • 07:10 - 07:15 --- BREAK [5 min]
  • 07:15 - 07:35 --- Discuss & Code [20 min]
  • 07:35 - 07:43 --- Break-out room Wrap up [8 min]

07:43 - 07:55 --- General Discussion & Wrap up [12min]

--- 07:55 END HACKATHON ---

Breakout rooms

Find your group in the Sign-up sheet

31 of 39

General Discussion & Wrap up [12 min]

Each group: please share your main code edits � [max 1min per group]

If have time: Anything else you would like to share?

32 of 39

Where do we go from here?

  • We will incorporate your code edits into one Code Standard + list all contributors

  • Continue writing Code Standard in upcoming SORTEE Code Clubs
    • Finish/ additional tasks
    • Conflict resolution

Any feedback about today? Let us know in the HackMD

keep an eye on Slack

33 of 39

💗Thank you for participating!!

We will keep you updated on Slack

#conf2024-h07-creating-a-code-standard

#code_club

✨Become SORTEE Code Club�Leader 2025! ✨

Code Club 👩🏽‍💻👨🏻‍💻👨🏼‍💻

34 of 39

Git help

35 of 39

Common error when collaborating in the same repository

Workflow: pull -> modify the file -> add -> commit -> pull -> push

solution

36 of 39

Common error when collaborating in the same repository

Workflow: pull -> modify the file -> add -> commit -> pull -> push

Some of you will get an error when pull

37 of 39

When git asks you to write a merge message…

How to write a merge message, save, and exit in Windows git bash:

Alternatively type: :wq # write and quite

38 of 39

Solving conflicts

To solve the conflict you should edit the section with conflict.

Edit the conflict lines and save the file

Current commit

Previous commit

Conflict section

39 of 39

Solving conflicts

After edit and save: add -> commit -> push