Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about Writing (old posts, page 6)

Thinking about this blog.

I sup­pose it hap­pens to ev­ery­one once in a while, and it has hap­pened to me of­ten in the past, but I am think­ing if I should keep on writ­ing this blog, or if some large change is need­ed.

Here are some ran­dom things from my head:

  1. Al­­most noone reads it. Re­al­­ly. It has less than 40 sub­­scriber­s. That's pa­­thet­ic for a blog that has con­­tent for over 7 years :-)

  2. Maybe I should post in span­ish, or at least bil­in­gual­­ly.

  3. Maybe I should write more fea­­tures. When I write a longish piece and an­­nounce it, there is a re­spectable traf­f­ic surge.

  4. On the oth­­er hand, I en­joy writ­ing it. And it's re­al­­ly very lit­­tle ef­­fort (spe­­cial­­ly now, with Bartle­Blog ;-)

  5. Maybe it should be more fo­­cused in one area, make it a python pro­­gram­ming blog, or a tu­­to­ri­als blog, or some­thing like that.

  6. But I am not a fo­­cused per­­son. I am a gen­er­al­ist. This week I have worked in the fol­low­ing things:

    • VoIP

    • Djan­­­go

    • PyQt

    • Lin­ux sysad­min­ing

    • Fire­wal­l/Proxy in­­­te­­­gra­­­tion with win­­­dows clients

    • Con­­­sult­ing in the most gen­er­ic sense, sit­t­ing with a com­­­pa­ny's IT staff and think­ing about their sit­u­a­­­tion.

    • Learn­ing PyGame

    And this was in 5 days of work. If I list­ed what I have done this year, it would take me 500 item­s. I am broad, how could my blog be nar­row?

  7. Maybe it's just not in­­ter­est­ing? Or bad­­ly done?

  8. Is it too nerdy? Is it not nerdy enough?

  9. I have had a blog with a small read­­er­­ship for 7 years, why is it both­­er­ing me now?

  10. If I stop, it does­n't mat­ter, I can al­ways pick it up again lat­er when I feel like writ­ing.

So, there. You, the 40 guys, com­ment on it if you want ;-)

An experiment

I stum­boed on­to a site where you write and they are sup­posed to share the ad­ver­tis­ing rev­enue with you.

So, I de­cid­ed to do an ex­per­i­men­t. I cre­at­ed an ac­count and am post­ing there us­ing a char­ac­ter.

This char­ac­ter is the most an­noy­ing, cranky, acid guy I can be. It's my evil side. For ex­am­ple, my first post was about how ev­ery­thing on the site is garbage. My sec­ond one is a spe­cious ar­gu­ment about how noone is spe­cial.

Let's see where it leads...

BartleBlog change: Mako Templates

Since the very be­gin­ning, Bartle­Blog has been us­ing Cher­ry­Tem­plate for its out­put for­mat­ting need­s. I like it, be­cause it's very sim­ple.

How­ev­er, it had grown rather cum­ber­some.

Specif­i­cal­ly, most pages in a blog are sort of a page tem­plate with a body tem­plate in­side (the main con­tent).

To do that on Cher­ry­Tem­plate, I used a two-­pass ap­proach: gen­er­ate the body, then pass it as pa­ram­e­ter to the page tem­plate.

Which is a pain in some cas­es be­cause you end ba­si­cal­ly hav­ing to do a ren­der­ing func­tion for each kind of page, or some crazy-evil func­tion (what I did).

Ex­plor­ing the dif­fer­ent python tem­plate en­gi­nes, I ran in­to Mako and de­cid­ed to give it a whirl. It looks good.

The ap­proach is a bit dif­fer­en­t, it is much more pow­er­ful, but you can still use it sim­ply if you can.

And the main fea­ture was tem­plate in­her­i­tance. Us­ing that, no more in­ner and out­er tem­plates, baby!

Oh, and per­for­mance is bet­ter:

Cherry

real    31m44.732s
user    21m18.336s
sys     2m7.628s


Mako

real    24m54.472s
user    19m9.508s
sys     1m56.375s

This is for com­plete­ly reren­der­ing the whole 7 years, 574 post­s, 40 stat­ic ar­ti­cles, 14 cat­e­go­ry blog, and there is tons of op­ti­miza­tions to be done.

BTW: this is how you reren­der the whole blog:

from BartleBlog.backend.blog import Blog
Blog().renderFullBlog()

New Bartleblog Feature: Menu Editor

Took a while to im­ple­men­t, but Bartle­Blog fi­nal­ly got a func­tion­al menu ed­i­tor:

bartleblog12.png

Right now, it on­ly works with the mootool­s-based menu gad­get, but I will start work­ing on the ya­hoo menu ver­sion in a mo­men­t.

The on­ly thing not work­ing is the pre­view but­ton, be­cause it needs more sup­port on the back­end side.


Contents © 2000-2020 Roberto Alsina