Skip to main content

Ralsina.Me — Roberto Alsina's website

Quick Nikola Feature: document APIs using pdoc

A us­er asked in the niko­la-dis­cuss if there was a way to use Niko­la to doc­u­ment APIs. Well, there was­n't and now there is. I took pdoc and wrote a wrap­per as a plug­in for Niko­la.

And now you can just doc­u­ment python mod­ules us­ing it in a cou­ple of min­utes.

Here is the doc­u­men­ta­tion for the re mod­ule from stdlib as an ex­am­ple.

Yes, the out­put is not great, and it needs CSS, and many oth­er fix­es, but it's easy to im­prove now that it's there, as long as there is in­ter­est.

So, I had a heart attack

Tl; DR: Yes, I had a heart at­tack, but I am ok.

First, some back­ground.

  • I am fat (~130 kg re­­cen­t­­ly)

  • I have had high blood pres­­sure for a long time

  • I have fat­­ty liv­er syn­­drome

  • I am in­­­su­­line re­­sis­tent

So, a heart at­tack is prob­a­bly not an un­ex­pect­ed thing, but hey, I lived to tell the tale, so here I tell it.

I walk ev­ery­day when I come and go from work, around 20 blocks each way. That is good, and is some­thing I need to do! How­ev­er around au­gust 23 I start­ed hav­ing some chest pains when I did. I walked a few block­s, chest pain start­ed, I stop, pain stop­s. Not a hor­ri­ble pain, maybe a 4 in a 1-10 scale.

Be­cause I am noth­ing if not good at ig­nor­ing mes­sa­ge­sI don't want to get, I blamed in­di­ges­tion, or what­ev­er. It was most­ly some dis­com­fort. Who cares, right?

It turns out at some point be­fore then I had had a freak­ing heart at­tack, and what I was feel­ing was lack of oxy­gen in my heart be­cause of in­suf­fi­cient blood flow. I did not feel the heart at­tack, I was feel­ing the se­quels of it.

BTW: cowork­er­s! That means I went to the of­fice a few days af­ter I had the heart at­tack :-)

In any case: it turns out some­thing be­tween 30% and 45% of those who have heart at­tacks don't no­tice be­cause of what­ev­er rea­son­s, and on­ly fig­ure out they did when they sud­den­ly die (yes) or go for a rou­tine check and the doc­tor says "dude, you had a heart at­tack at some point and did­n't no­tice".

So, I kept ig­nor­ing this, but on the week­end my blood pres­sure was high. How high? Run-­to-the-ER-high. 190 over 120 high.

I took my pill­s, it would go down a lit­tle, but on the next mea­sure­ment it would go back up. So I would take my pill­s, it would go down, and then back up.

So, on mon­day I went to the ER. Got an EKG and tro­po­nine as­say and ... "dude, don't wor­ry about it, let's call an am­bu­lance and take you to a hos­pi­tal that has a coro­nary unit. You know, be­cause you had a heart at­tack. In the mean­time, here is some IV ni­troglicer­ine"

I get car­sick a lot. Rid­ing an am­bu­lance, ly­ing down and look­ing back­wards ... not good for me. But any­way, they took me to the Sana­to­rio de la Trinidad in San Isidro.

There I got more EKGs, more blood test­s, and in­deed it looked like I had had a heart at­tack, so they told me I would need a pro­ce­dure. "It's not surgery it's just a pro­ce­dure" ... and dou­bled the amount of ni­troglicer­ine.

Fun­ny thought: who was the first guy that de­cid­ed to see if in­ject­ing un­sta­ble ex­plo­sives in­to your veins may have a good ef­fec­t? Be­cause it does! It does a kick­ass job of open­ing your ar­ter­ies thus less­en­ing the chance of you dy­ing right away. Al­so gives amaz­ing headaches.

I got a nice room, got hooked up to mon­i­tors, IV, BP cuf­f, Rosario got a nice couch, and got put on hold.

If I were hav­ing a heart at­tack right then, then they would have done the pro­ce­dure right away. Be­cause I was­n't, it could wait a day or two. I will not go in­to the in­dig­ni­ties in­volved in bod­i­ly func­tions when you can't move. There are a bunch of them.

I was hav­ing a killer headache, they were in­ject­ing an­ti­co­ag­u­lants in my bel­ly, my hand had a IV hang­ing (which hurt­ed), and they were draw­ing blood ev­ery 4 hours, so my OTH­ER arm was hurt­ing, and the BP cuff was in­flat­ing ev­ery 15 min­utes ... so, not a very rest­ful night.

Next day they tell me I will get "the pro­ce­dure". It in­volved open­ing the ra­di­al artery in my writ­st, slip­ping a hose in­to it, wig­gle it all the way back in­to my heart, in­ject a liq­uid that would make my blood opaque to X-rays, then look and see where it wen­t. If there were ob­struc­tions and they could be treat­ed, they would do it right away.

A nurse gave me a quick bath (there was a chance they would go through my groin in­stead, so it was the po­lite thing to do).

I wait­ed a few hours, and they took me to the hemo­dy­nam­ics room. Fan­cy mon­i­tors hang­ing off ro­bot arm­s, nice chat with the anestesy­ol­o­gist, and then they gave me the pa­per­work.

It's a huge list of bad news.

  • The pro­ce­­dure in­­­volves con­t­in­u­ous X-rays and it may be nec­es­sary to use high in­­ten­si­­ty.

  • All that ra­di­a­­tion has side ef­­fec­t­s, so let us do it

  • Pos­si­ble side ef­­fects in­­­clude per­­ma­­nent de­pi­la­­tion of the chest (re­al­­ly)

I signed off (be­cause what's the al­ter­na­tive?) and they tell me "move a lit­tle to the left in case you fall asleep you don't roll of­f". Be­cause yes, you are awake. Ok, awake-ish, at least I was in a drugged haze all through it.

I seem to have fall­en asleep at some point and woke up just to tell them "my arm and my chest hurt a lot!" which they an­swered with "well, yes, we are pok­ing in­side your heart, dude" and sme ges­ture which I in­ter­pret­ed as "just put this guy to sleep al­ready" be­cause I woke up in my room.

They put three stents in my heart, be­cause I had a bunch of ob­struc­tion­s, in­clud­ing one in the main car­diac artery, so, good thing they in­vent­ed those.

Back in the room, I feel awe­some. Re­al­ly. I blame the drugs.

They slow­ly start­ed cut­ting down on the ni­tro, so no more headache.

By that night I was well enough I could start play­ing canas­ta with Rosario (via an An­droid ap­p: no need to deal a ton of card­s, no way to cheat by mak­ing up rules, so awe­some), watched a cou­ple episodes of Forged in Fire, slept on and of­f.

Next day, wednes­day, bor­ing.

Next day, thurs­day, I was al­lowed a bath! I could walk to the couch and sit down! I could wear un­der­wear! Al­most civ­i­lized.

Thurs­day af­ter­noon I was dis­charged. The dol­lar had gone up 30% while I was not look­ing.

Spe­cial note for my US read­er­s: there was no hos­pi­tal bil­l. My job's health provider (OS­DE) took care of ev­ery­thing, I need­ed not pay a dime. I was just put in a wheelchair, wheeled to the door and told to have a nice day.

We went to buy all the medicine for my new regime (12 pills a day).

There is a an­ti­co­ag­u­lant pill I need to take for a year, and if I skip it I die. There are pills to con­trol the BP, which if I skip I may die, there is a pill for the pain, which if I mix with an­oth­er pill I wil die, and there is as­pirine just be­cause they need­ed some­thing a lit­tle less dra­mat­ic.

Went home, and in the next cou­ple of days had a cou­ple more checks with a hos­pi­tal car­di­ol­o­gist and with my car­di­ol­o­gist, a nice and wise la­dy who I should pay more at­ten­tion to.

All through this my wife was by my side, a friend took care of our kid, and ev­ery­one at work was cool about it, ask­ing how I was do­ing and in gen­er­al be­ing their usu­al awe­some.

So, those are the events. What hap­pens now?

I need to stop be­ing fat, so I sup­pose I will try.

I am in sort of the same sit­u­a­tion as Aeschy­lus. There was a prophe­cy that he would be killed by a fall­ing ob­jec­t, so he tend­ed to stay out­doors. Then he was killed by an ea­gle drop­ping a tur­tle on his head, be­cause it looked like a shiny stone.

I sort of know I will die of this. But there is no rush, and I will do my best to avoid it for many years. I will try to avoid the ob­vi­ous ways, like Aeschy­lus. And if fate deems it nec­es­sary that an ea­gle drops a tur­tle on me, at least it will be a fun­ny sto­ry.

The Rise and Fall of D.O.D.O. (D.O.D.O. #1)

Cover for The Rise and Fall of D.O.D.O. (D.O.D.O. #1)

Review:

Best Stephen­son in years.

Looks like hav­ing Nicole Gal­land as a co-au­thor has done won­der­s.

Plot is tighter, writ­ing is even, and the book even has an end­ing! Yes, an ac­tu­al end­ing!

So this is prob­a­bly more of a Gal­land book? I need to read more of what she has writ­ten.


Contents © 2000-2024 Roberto Alsina