h1

Looking forward to it

April 27, 2009

It’s interesting, coming back around here and reading my old posts, especially the latest ones: so random, and yet so full of enthusiasm. I’ve started my grown-up life a few months back, out of University and all tidy in a very corporate environment and… yeah. Not doing much outside of work in terms of coding and stuff and wondering if that’s all it’s about and all it’s gonna be about, forever. I need that bit of my soul back and remembering how much I used to do and how much fun it used to be, all of it, from discovering a problem to trying to solve it and learning all sort of things along the way and sideways while getting distracted… So much fun. Hopefully the next post will be about problems and solutions and the pain the solutions brought with them!

Advertisements
h1

Mail::Thread

August 17, 2008

The Mail::Thread created just as many threading issues at it solved, as some more testing proved. I got a bit bummed out about it (one step forward, three steps back), and I was wondering if I should still use it or try to fix the problem of the other module.

In the end, the truth is that for all the problems it creates, Mail::Thread makes it much simpler to find out about them as well, because there’ll be a empty contained as a top post, all the time. The threading problem I found with Mail::Box::Thread::Manager simply gave back a wrong threading order and I only noticed because I was reading in details my script output (I’m parsing interesting stuff!). So, well, that would mean I would have to DETECT and SOLVE, and “detecting” threading problems would basically mean rewriting a whole threading library, which is not something I’m so keen to try anymore. So I rewrote the script using the Mail::Thread, and I wrote a embarrassingly rough heuristic to try to find what may be the top post. The results look acceptable, I think. I’ll have to check more closely of course, and try to find out whatever New Obvious Problem I Missed this time! Stuff like disappearing messages is pretty annoying to try to discover, but I’m making progress 🙂

h1

And all the threading problems were solved, and all was good

August 12, 2008

OTOH, there *is* something to be said for avoiding the Not-Invented-Here syndrome and reusing great work done by smart people. Hey. So the jwz algo Perl implementation works and solves my problem, of course 🙂

Then my crappy, painfully limited, excruciatingly expensive 3G connection decided that I wasn’t deserving of an IP anymore after making this discovery last night, so I can only post this morning rather than adding a simple edit.

I still have to adapt some stuff to deal with Mail::Box::Thread::Node and Mail::Message in parallel (…or remove the former completely) but that’s gonna be ok. I see the light! And well, I’m sure there’ll be other future opportunities to become an expert at handling mail header issues 🙂

In the sweet light of morning I can’t believe that I thought for even a second that there was something NOT on CPAN. Maybe I should get my brain checked.

UPDATE: Not so perfect.

h1

Perl Mail::Box thread manager disorder

August 11, 2008

Ok, so the problem isn’t due to crappy code from my side but to a malformed header References field in one of the messages in that particular thread. To check I actually just removed the offensive reference, 2/3 of a line and bam, everything is threaded and in the right order and all are there. Hey. So easy.

Of course it’s not *correct.* It’s a messed up header but modifying the input to get my script to work as I want is just not right. And this is just one post that I noticed, I’ve got a huge heap of mboxes to process as well, what if there are others in there? Don’t they deserve to be well-threaded as well?

I’ve tried to think up a few dirty workarounds to bypass the problem but really, at the heart of this is the first threading call I make, $threads->sortedAll (or ->all, all the same) so I don’t have so much space and I can imagine how any fix could create just as many problems as it solves.

So I’ve decided to try it the “Let’s use a sledge hammer to knock a pin” way. I’m going to implement jwz’s threading algorithm and I think Step 1-B-2 and 1-C will take care of that particular issue. Step 4 should deal with some other problem I noticed today with the way dummies are currently handled in my side of the code — easy to work around, that one, but if I can knock 2 pins with one big fat huge sledge hammer, I’m gonna try that first 🙂

[EDIT: Of course as soon as I wrote this I realised there was already another Perl module that implements the algo, so all the sledge manoeuvring fun will probably not occur tomorrow as expected 😦 Ah well, if I can solve the problem and get on with it…]

h1

Git and Mail::Box thread issues

August 9, 2008

I’m touching to a lot of stuff lately. I’ve become a huge, MASSIVE fan of Git, to the point where I’m pulling out old projects with joy because now they’re hosted somewhere on Git and it means I get to use it whenever I commit. Eh. Nuts. I’m also tip-toeing around the idea of looking closer at Git’s code and perhaps try to contribute a little, sharpen my crappy-crappy C skills but… er, there’s one mailing-list with 100 messages/day and I can’t deal with it at the moment, the Contributing documentation all link back to messages on the ML and the Documentation in the code doesn’t help me a lot. I have to look harder. I’ve started using Mutt (absolutely not proficient at all with it ATM, but as I become more and more reluctant to touch a mouse or a touchpad that’s my way of dealing with hand-moving laziness). When I’m better at it and learn how to filter well, I plan to subscribe to the ML and get a feel for the community and how things are done. Maybe it’ll go nowhere, maybe it will, I look forward to it in any case.

Otherwise I’m also working on a Perl script dealing with Mailboxes that’s giving me a bit of trouble with threads. From what I can tell, although the box is well-formed (and god knows that by now I’ve read a lot of mail RFCs and seen a fair share of properly and improperly formed mboxes) sometimes the parent message in a thread shows as a reply to one of its own children. There’s no reference, no reply-to in the parent, and there *are* reply-to and/or a reference field in the child, but still it shows first. Even when I don’t use my code but the theadToString method of Mail::Box::Thread::Node, the parent appears as a child so I’m tempted to think “Not my fault!” but I’d still like to deal with it, one way or another and er, the Mail::Box module is robust and strongly tested so it’s more likely there’s something obvious I’m missing. Irritating, been smashing my head against this one for a quite a few hours now.

And with no solution, I can’t give myself the reward of going through another round of the Git Experience 😦 (I’m like an addict, it’s crazy.) Sometimes I feel guilty I get so enthusiastic about stuff… Other times I think, why not? It seems this is how I learn best and most, and sane people can stay away if they’re afraid it’s contagious.

Ok, one last round of skimming through RFC 2822 and I give up on this one for the day.

h1

GUIs

March 2, 2008

I’ve got this Postgres database, created during the LinuxChix Postgresql course, that’s all nice but would be more useful with a GUI or some other way to interact with it. I remember sucking at Java GUIs so I thought here’s an opportunity to suck less.

But urgh. Don’t know if I’ve gotten spoiled by Perl or if it’s just Swing and desktops GUIs in general that work like that but the busy work is driving me nuts. It feels like I’m spending 10x more time on setting up things to please the JVM than actually writing code that does something to help me reach my goal.

As long as I have some hair left to pull, I won’t give up, but writing a CLI is getting more appealing by the minute. 😉

h1

Girl Geek Dinners

March 2, 2008

I went to the first Ireland Girl Week dinner last Wednesday night and I had a great time, although I wasn’t really able to talk about tech stuff, since the 7 people around me were working at Microsoft and I wasn’t in the mood to fight/argue. There was a couple of gasps when I mentioned I used Linux, and the temperature dropped a few degrees after I said something about OpenOffice (answer: “It’s just a copy.” — I need to prepare a neutral way to present my opinion next time this happens), but the people I spoke with were all very cool and it’s a good way to put things in perspective.

Overall a great night and I’m definitely looking forward to the next event.

What I have problems coming to terms with, is how hostile the reactions of people around me have been. I’d expected some teasing, since I’ve given up on my classmates sharing my passion for programming and other geeky things, but I was surprised by the harshness of the slagging. The looks and remarks… I don’t get why people would feel so strongly about something they obviously don’t give a damn about. Or maybe they just don’t care how their comments are received.

Anyway. I’ll keep trying to make sense of that piece of human behaviour in the background, but for now time to go back to Perl, and do the exercises of the latest chapter I read!