Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about programming (old posts, page 63)

Random photos from my phone

A few days ago I fi­nal­ly got my 89 cents blue­tooth don­gle (now $1.85, but still with free ship­ping from chi­na!) and got a bunch of pic­tures I had in my phone.

The qual­i­ty is crap be­cause my phone is crap, but trust me, there must be one thing here you have nev­er seen be­fore.

Here they are: weird stuff that made me take out my phone and grab a pic­ture, with ex­pla­na­tion­s.

Titanic

This, from Mar del Plata, is the most badass pop­up book I ev­er saw.

Closed:

Imagen033

And open:

Imagen032

I'm Mark Shuttleworth!

Imagen024 Imagen025

In a free soft­ware event in Buenos Aires, Canon­i­cal's boss and for­mer space car­go was sup­posed to de­liv­er the key­note. He can­celed at the last minute. So Mad­dog Hall of­fered to re­place him... in char­ac­ter.

Some­one found a re­al­ly, re­al­ly awe­some (and/or crap­py!) as­tro­naut cos­tume, and Mad­dog gave a key­note shout­ing "I'm Mark Shut­tle­worth! I'm an as­tro­naut!" and claim­ing to have come from the fu­ture to ex­am­ine some slides re­cent­ly found, writ­ten by some un­known dude named Mad­dog. Re­al­ly fun­ny stuff.

Python vs. Ruby

Same even­t, take a look:

Imagen023 Imagen022

Yes, I swear they are tak­en with less than 10 sec­onds of one an­oth­er.

Butter

Imagen018 Imagen026

I was buy­ing gro­ceries in San Isidro's Dis­co su­per­mar­ket. Yes, usu­al­ly buy­ing a large pack­age of but­ter is cheap­er per ki­lo than a small one. But here, a 200g pack­age cost­ed al­most the same as a 100g! That's just steal­ing mon­ey from those who don't use much but­ter. Me? I'm not at risk.

Visa discount!

Imagen045

This was a shop in Aveni­da Alem in Buenos Aires. It was un­usu­al to see a "VISA is sus­pend­ed, 20% dis­coun­t" sign. Much more un­usu­al was to see the small let­ter­s: "p­re­sent your visa card". I mean, was­n't it sus­pend­ed?

And then I saw the rest:

Imagen046

It says "p­re­sent your visa card and pay us­ing any­thing else".

That guy must re­al­ly have been pissed off at Visa!

I got a bunch more for some oth­er time.

What's wrong with this dialog?

I am writ­ing a book. And I am writ­ing a chap­ter about UI de­sign. And why not use the In­ter­net?

So, go ahead and tell me all that's wrong with this di­alog!

radio-14

For ex­am­ple, I don't like the dead space at the bot­tom-left, the dif­fer­en­t-­size of the "Close" but­ton, and the mis­align­ment of the icon­s.

Are those valid con­cern­s? Are there many more? Would you do it com­plete­ly dif­fer­en­t?

The book is open source, and avail­able at http://no­muerde.net­man­ager­s.­com.ar (In span­ish, sor­ry!)

I am posting very little because I am writing a lot.

I am just not writ­ing here. I am writ­ing a book in­stead.

What book am I writ­ing? A book about python pro­gram­ming, of course! It's called "Python No Muerde" (Python Does­n't Bite) and it's in span­ish.

Now, I am the first to ad­min: I am not a great pro­gram­mer. And I am not a great writ­er. But I have lots of things to say. If I can or­ga­nize them cor­rect­ly, they even make sense some­times!

So, I am giv­ing this write-­long-stuff thing a try.

Of course since I am an open source nerd, I can't do things the usu­al way, there­fore, the book is un­der Cre­ative Com­mon­s. And be­cause I am a pro­gram­mer, I hacked to­geth­er a (if I may say so my­self) de­cent struc­ture to han­dle book-writ­ing.

  1. I write in re­struc­­tured text

  2. I use rst2pdf to cre­ate PDFs both of in­­di­vid­u­al chap­ters and the whole thing.

  3. I use rest2web to cre­ate a we­b­site

  4. I use mer­cu­ri­al (at google­­code) to han­­dle re­vi­­sion con­trol and his­­to­ry.

  5. I use make to con­trol re­build­ing of chap­ters when code changes, or im­ages get up­­­dat­ed, etc.

Of course it's more com­pli­cat­ed than that, the PDFs are in the site, the site is up­load­ed via rsync, the up­loads and re­builds are trig­gered by hg push, and so on.

In any case, I may post a few times about how this whole thing work­s, here is the out­put of the ma­chin­ery:

http://no­muerde.net­man­ager­s.­com.ar

The day we saw the dinosaur (an Ada Lovelace Day story)

To­day, March 24th is Ada Lovelace day, a day of blog­ging to cel­e­brate the achieve­ments of wom­en in tech­nol­o­gy and sci­ence.. I am tak­ing the lib­er­ty to tag this as python so it ap­pears in the right plan­et­s, but that's just to pro­mote Ada Lovelace day. Sor­ry 'bout that.

I will write about the on­ly per­son who ev­er taught me pro­gram­ming, Clau­di­a. I was young, so the earth was still luke­war­m, the day we saw the di­nosaur.

I was just a green sopho­more in the School of Chem­i­cal En­gi­neer­ing where, para­dox­i­cal­ly I would nev­er take a chem­istry class, be­ing an ap­plied math stu­dent and all that, and at the time "per­son­al com­put­er­s" were a nov­el­ty, a toy of the up­per mid­dle class.

We had spent the first two months of the se­mes­ter learn­ing how to pro­gram the ob­vi­ous way: writ­ing as­sem­bler for a fic­tion­al ma­chine on pa­per by hand, when Clau­dia broke the news, we were go­ing to see a re­al com­put­er.

No, not a PC, not even an XT, but a re­al com­put­er, the one re­al com­put­er in all the uni­ver­si­ty, and you could hear the type switch­ing to bold as she spoke about it. Sad­ly it was not as re­al as the one at the re­search fa­cil­i­ty (A Mini­VAX!) but it was a re­al enough PDP.

We would not be al­lowed to ac­tu­al­ly use it un­til the fol­low­ing year, but ... well, it was still some­thing spe­cial.

I had been programming for years, even for a year before I saw my first (seriosuly not real) computer, I had followed BASIC programs in my head for days, imagining the space invaders float on the screen of my mind, and stepped into writing machine code inside REM statements in my Timex Sinclair 1000 onto the luxury of a C64, but never noone had taught me anything.

Our small class (maybe 10 stu­dents) spent end­less hours do­ing things like tra­verse a ma­trix, first by rows, thn by column­s, then in a spi­ral from the top-left, writ­ing pro­grams that fol­lowed our end­less source of al­go­rithm­s, the nu­mer­i­cal so­lu­tions guide.

First as­sem­bler, then For­tran, we learned.

She was my Mr. Miyag­i, I was a het­ero­sex­u­al Ralph Mac­chio, and I fig­ured out the most im­por­tant thing about pro­gram­ming: I was aw­ful at it.

Over the next 20 years that sit­u­a­tion has been slow­ly im­prov­ing, but I nev­er again had some­one teach me pro­gram­ming. Clau­dia had al­ready taught me ev­ery­thing I need­ed to know, that code can al­ways im­prove, that there's more than one way to skin a cat.

That the di­nosaur was re­al and that some day soon my com­put­er would be faster and nicer than the di­nosaur was then, and that pro­gram­ming was cool, and that if I could find a way to draw a poly­no­mi­al graph hor­i­zon­tal­ly on a print­er with­out ev­er hav­ing the whole graph in mem­o­ry (it did­n't fit), those fu­ture com­put­ers would do awe­some things, and that I was one of the many who would help bring that to re­al­i­ty.

That talk­ing about code was fun in it­self, that you could make a mod­est liv­ing and be hap­py about it, that you could in any case make jig­saw puz­zles in your spare time and keep on teach­ing or what­ev­er.

And lat­er the di­nosaur's bones were scav­enged in­to a line of racks hold­ing router­s, and its glass ter­mi­nals are de­stroyed, and the gold in its teeth was stolen and the rare bus ca­bles sol­d, and its cir­cuits scrapped, but I saw the di­nosaur alive, and Clau­dia taught me how to make it jump, and for that, I will al­ways be grate­ful.

Grok 1.0 Web Development

The peo­ple at Packt Pub­lish­ing has been kind enough to send me a copy of Grok 1.0 Web De­vel­op­ment by Car­los de la Guardia.

I have now read it (sor­ry it took so long!) and here's my re­view.

It's a well-writ­ten book. The ex­po­si­tion is clear and the au­thor knows the sub­ject and what he wants to say.

I was im­pressed by the straight­for­ward ap­proach of Grok when com­pared to what I dim­ly re­mem­ber of an­cient Zope ex­pe­ri­ences. The idea of a mod­ern, ag­ile, sim­ple frame­work over Zope's ad­mit­ted­ly pow­er­ful foun­da­tion has a lot of mer­it.

OTO­H, I am not re­al­ly con­vinced that I should drop Djan­go for the small web projects I have sched­uled, but if you are look­ing for a frame­work, and are not heav­i­ly in­vest­ed in an­oth­er, Grok is cer­tain­ly worth check­ing out.

And, if you want to learn Grok, this book does the trick.

You can read a sam­ple chap­ter or get more in­for­ma­tion about the book


Contents © 2000-2020 Roberto Alsina