- We took a chance and traveled to Boston during the weekend. We met there with Mario Carrión, Mauro Parra and some other friends. It is a beautiful city, we walked on Boston Commons, Newbury St and got up to the Prudential Building, it was a quick visit. We also wandered around the MIT. Boston has the kind of charming touch you (or at least I) cannot find in New York City anymore. Fifteen bucks for each ride on the Fung Wah Bus (a Chinatown one), it was nicely cheap but utterly awful.
- Even though this was Memorial Day weekend, we stayed most of the Monday at our place. It was nice to have a day off.
- I'm traveling to Mexico City again this next weekend to attend the wedding of Christian and Susan in Cuernavaca, who were in NYC two weeks ago. Depart on Friday, back on Sunday (all hungover, I bet).
- My Infinite Pig Theorem blog is back and live again. And lots and lots of pics on Flickr, go watch 'em now, go!
May 2008 Archives
Hay tres casos en la vida de un consultor que expedirá un recibo de honorarios. Digamos que hemos quedado de acuerdo que la programación del HolaMundo.pl va a costar $1'000 pesos.
- Actividad limpia.
2. Cantidad antes de impuestos.
Ésto es lo que usualmente le conviene a las empresas. Al total pactado se le suma el IVA, luego del total pactado se calcula el 10% para retenciones, uno para la retención del IVA y otra para la retención del ISR. Finalmente, al subtotal se le restan ambas retenciones:
- Honorarios: $1'000
- + IVA 15%: $150
- Subtotal: $1'150
- - retención ISR 10%: $100
- - retención IVA 10%: $100
- Total a pagar: $950
3. Cantidad después de impuestos (o «hacia arriba»).
Para muchos de nosotros es mejor acordar que el costo total será, después del cálculo de impuestos. Se hace la misma operación, pero al revés, ahora los $1000 pesos deben terminar como el total a pagar. Primero dividimos esa cantidad por 0.95, para obtener la primera cantidad de honorarios, y luego hacemos el mismo mecanismo usado anteriormente:
- Yo quiero cobrar: $1'000
- David me dijo que divida entre 0.95 y da: $1'052.63.
- Honorarios: $1'052.64
- + IVA 15%: $157.89
- Subtotal: $1'210.52
- - retención IVA 10%: $105.26
- - retención ISR 10%: $105.26
- Total a pagar: $1'000
De cualquiera de ambas formas, a quien le das el recibo de honorarios debe darte un acuse de recibo de que se quedó con tus retenciones, cosa que tú presentarás ante el SAT a su debido tiempo.
También suele suceder que la empresa te requiera el recibo de honorarios antes de que te paguen, precisamente para que el dinero pueda ser comprobado. Aunque este es un paso completamente innecesario es mejor respetarlo, en México las empresas hacen cosas muy raras para "protegerse".
Espero que te sirva.
Recently I had to deal with POST requests on mod_perl 2 on a custom XML-RPC webservice server we have been developing and maintaining over the last year (we are actually moving it to REST some time in the middle future). It was time to move some of our base modules from a couple of CGIs to the power and muscle of mod_perl.
So, while dealing with POST requests (like XML-RPC is actually specified) I faced the issue that I wasn’t being able to get the POST data on the PerlResponseHandler phase. I was probably not reading it correctly, I got deeply into it and even read some libapreq source code. All I was getting was some nifty message like “not supported”. After reading some documentation (and, to my own shame, the Apache2::Request front page pod) I found out that the usual:
use Apache2::Request;
$req = Apache2::Request->new($r);
@foo = $req->param("foo");
$bar = $req->args("bar");
will not work on your POST if the content type is different than application/x-www-form-urlencoded or multipart/form-data. For example, say, XML-RPC! So, in case you actually need to read POST data on your mod_perl 2 handler where it’s not a form or a file upload, you can read the data manually (I didn’t find a simpler way to read the data, actually):
sub handler {
my $r = shift;
return Apache2::Const::HTTP_BAD_REQUEST unless
$r->method eq "POST" and
$r->headers_in->{'Content-Type'} eq 'text/xml' and
$r->headers_in->{'Content-Length'};
my $length = $r->headers_in->{'Content-Length'};
my $xml;
while ($length) {
$r->read($xml, ($length [less than symbol] 2048) ? $length : 2048);
$length -= length($xml);
}
...
And you are ready for booze.
So I wrote an entry on my tumblelog about what’s going on with my life currently. Since Tumblr’s feed doesn’t get pushed immediately, I showed the post to my co-worker and friend Chris, before it hit the planets:
- So, yeah I have my blog since it’s syndicated on Planet Debian and other small feed aggregators -I said.
- But do they really care about your bike, your chess games or you attending that conference? -he asked-, I mean, I do care, but people?
- Well -I replied after a quick thought-, I think that’s how personal blogs work.
After a deeper thought I just realized that indeed no one cares and deleted the entry before it was pushed to the feed, updating it on FeedBurner, etc. It was a nice awakening.
But on a bit more interesting (for people) things, The Perl Foundation is currently requesting comments on the projects they received for grant requests. My proposal is there, “Solidifying and Extending the Blog Normalize project”. I do think there are some other more deeper projects, of course, but I think B::N is also an interesting one and the amount requested is not as big for other projects, so it’d be nice to give it a try.
I believe B::N is a good idea that could be enhanced nicely. I proposed the idea to the TextMotion developers yesterday on IRC (since that’s one of the CMS there would be a connector for -as of the grant proposal-). After deeper discussion, CMSs will not make translators for a lot of projects into theirs, but B::N would, so maybe we could make some sort of webservice that CMSs could call on their installation phases. That, or the user at the end could actually do the conversion himself locally.
Having the proper information, one could be able to get from TextMotion to Wordpress, to Blogger, to Joomla, to Tumblr, to MovableType and to TextMotion again, making a transparent circular transformation.
Some of this is currently possible with the few code I’ve written for it, currently in CPAN (and a bit deeper proof of concept); if you are interested, please leave your comments on the Perl Foundation blog entry. And review others too. At the end, I might end up doing the project myself, but if some money is granted to do so, why not apply to it, that’d just speed it up.
