Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about Writing

My Git tutorial for people who don't know Git

As part of a book project aimed at al­most-be­gin­ning pro­gram­mers I have writ­ten what may as well pass as the first part of a Git tu­to­ri­al. It's to­tal­ly stan­dalone, so it may be in­ter­est­ing out­side the con­text of the book.

It's aimed at peo­ple who, of course, don't know Git and could use it as a lo­cal ver­sion con­trol sys­tem. In the next chap­ter (be­ing writ­ten) I cov­er things like re­motes and push/pul­l.

So, if you want to read it: Git tu­to­ri­al for peo­ple who don't know git (part I)

PS: If the di­a­grams are all black and white, reload the page. Yes, it's a JS is­sue. Yes, I know how to fix it.

I have written half a book

LIke men­tioned be­fore I am try­ing to write a book and ... well, I may be ac­tu­al­ly mak­ing pro­gress? At least the gen­er­at­ed PDF is about 170 pages long, which means I have writ­ten a bunch in this past month.

I have fin­ished the sec­ond of four planned part­s, which means I have done about half of it. Since I ex­pect the next two parts to be short­er, it's ac­tu­al­ly more than that.

The tar­get au­di­ence are peo­ple who have fin­ished the python tu­to­ri­al but are not ex­act­ly pro­gram­mers yet. They have the syn­tax more or less in their head­s, but how do you turn that in­to an ac­tu­al piece of code?

  • Part 1 is about "pro­­to­­typ­ing", the process of dump­ing an idea in­­­to rough code.

  • Part 2 is about pol­ish­ing that rough code in­­­to ... not so rough code. In­­­cludes a gen­­tle in­­tro­­duc­­tion to test­ing, for ex­am­­ple.

  • Part 3 (to be writ­ten) is about things that are not code:

    • Git / Git­lab

    • Is­­­sues

    • Pack­­­ag­ing

    • Set­t­ing up a we­b­site

    • CI

    • Lots more

  • Part 4 is still to be thought but ba­si­­cal­­ly it will cov­­er im­­ple­­men­t­ing a large fea­­ture from the ground up.

I much ap­pre­ci­ate com­ments about it.

PD: Si, va a haber una tra­duc­ciń al castel­lano. O mas bi­en al ar­genti­no. Una vez que lo ter­mine.

Yendo Para PyCon

This is a short sto­ry, in span­ish, so if you want to read it, click here

Senses

While walk­ing along the riv­er be­fore dawn I laid down on a bench and looked up, and saw the tree, clear and green against the or­ange clouds in the night sky, and thought, hey, that looks cool, and tried to take a pic­ture.

The screen in my cam­era stayed ob­sti­nate­ly black. I changed set­tings, moved ISOs, touched on dif­fer­ent places try­ing to con­vince it to fo­cus and set aper­ture for the dark­est or the light­est ar­eas of what I knew to be there.

And it re­mained black. And sud­den­ly, I had a dis­sent­ing opin­ion, that there was not a clear green tree there, and that the sky was not full of or­ange cloud­s, but that it was all black, star­less and emp­ty, emp­ty of tree, of cloud.

I placed my hand above the cam­er­a, hop­ing to catch a glim­mer of it, and stil­l, the dis­play was a square of dark­ness sep­a­rat­ing my fin­gers from my ar­m, as emp­ty as be­fore, mock­ing me fea­ture­less.

Why was it so black, if I could see clear­ly. If there were lamp­posts giv­ing light, and I could see clear­ly, and there was a tree. I knew the cam­era worked. What was I do­ing, by the river, at 4AM, on a tues­day, lay­ing on a bench, look­ing up, with a cam­er­a?

You ex­pect your sens­es to work. You ex­pect to per­ceive what is there, and not per­ceive what is not. You ex­pect to see re­al­i­ty, to not see ir­re­al­i­ty, to lis­ten to things, to not lis­ten to un­things, to touch truth, to smell shit.

What would hap­pen if you had two sets of sens­es, two vi­sion­s, and they dis­agreed, and you were not sure which one to trust, which one is right, which one is true? What would hap­pen if the cam­era was right and my eyes were wrong, and I was ac­tu­al­ly not see­ing, but imag­in­ing, and the truth was emp­ty, and the tree was not there, and the sky was black.

Then I en­abled flash, and the ug­ly pic­ture con­vinced me to, some­day, get a bet­ter cam­er­a, and nev­er for­get to take my gas­tri­tis medicine when go­ing for trips on iso­lat­ed lo­ca­tion­s.

Smoking 40 cigarettes a day decreases risk of lightning strikes, say statistics!

This ti­tle came to mind when I saw in the news ref­er­ences to an ar­ti­cle in The Lancet about how in 2030 7 out of 10 deaths would be due to car­dio­vas­cu­lar, di­a­betes, can­cer, and chron­ic ob­struc­tive res­pi­ra­to­ry dis­eases.

The les­son most news­pa­pers get out of this is "whoa, we are a bunch of lazy, salt and fat eat­ing mo­rons and we are all gonna die".

Sure, we are all gonna die, and yes, more peo­ple will die of those chron­ic ill­ness­es in 2030. But that's most­ly be­cause we are not go­ing to die of many oth­er things that used to kill us ear­li­er.

So, eat more veg­gies, stop smok­ing and don't wor­ry too much.

Oh, and about cig­a­rettes and light­ning? I must con­fess I don't have the num­bers to prove it, but I would be very sur­prised if that was not the case. Af­ter al­l, smok­ing 40 cig­a­rettes a day should re­duce your life ex­pec­ta­tion, and the less you live, the less like­ly are you to be hit by light­ning. It's even a di­rect causal con­nec­tion!


Contents © 2000-2020 Roberto Alsina