I started in Python, as a Biologist (hooray for Jupyter-lab, coding so visually, in small steps, with output just there is so great when starting to learn Python). I ventured into other languages every now and then. For example I tried to make an Android app in Kotlin that gets info from some API. I expect something like this but with more brackets everywhere:
import request
data = request.get(https://some.api/get_some_json)
some_value_I_want = data['dig']['into']['nested_structure']
I didn't get it to work at all, I was lines and lines of code into the program when I didn't even get to see any returned values.
Also, say I want to make a nice plot of some tabular data (.tsv), I do:
import pandas as pd
import seaborn as sns
data = pd.read_csv('some_file.tsv', sep='\t')
pd.melt(data, value_vars=['s', 'max_vms'], id_vars=['sample', 'process', 'N'])
g = sns.FacetGrid(data=data, col='process', row='variable', hue='sample', sharey=False, margin_titles=True)
g.map(sns.barplot, 'sample', 'value', order=data['sample'].unique())
Boom, what a plot (or large grid of plots actually), so much information. Can anyone show me how to do this in some other language (but R)? Idk, maybe I'm just not so smart, I just learned to program at 35 after always being a biologist, but any venture into any language has me thinking: Why does this have to be so complicated?
(Btw, I'm putting 4 spaces in front of the code, why is it not rendered as code?)
When I just started I used Python to read, sort and transform images and output them to a PowerPoint file. One can use CSS like synthax to format the slides. Boom PPT with 120 slides with images and data from some Excel file that convinced a lot of people with a lot of data that fluorescent images next to H&E stains + metadata can be nice. Is it the best way to present such data? Meh. But man was it cool and easy and time saving.