Fan Chart
Posted on Thu, 9th March 2006 at 19:33 under Software, Life, Coding, Pictures, PublicityAnother Libertus-brand mini-project, inspired by Andy Coltman, this time to draw
I shall be using this post as my work notes, so expect many large comments full of nonsense. However, I welcome discussion during this project, so if you can cope with the verbiage, feel free to participate.
I don’t do genealogy at all, so I have no idea what anyone could possibly want from a program that draws fan charts, or
A picture tells a thousand words.

Introduction
A fan chart is a fancy yet efficient and compact display model for a personal family tree, up to about 5 ancestor generations. Andy designed this one, printed it out and wrote his ancestor’s names and dates on by hand. I reckon I can write a program to do that, as it is a perfect use of the computer, and the generation of such output requires the use of modern techniques that I could do with learning, such as vector graphics, PDF output and the like.
The chart is naturally a scalable line drawing, so unlike photographs does not have any inherent size, but no matter the output size chosen, the outer rings of the model afford very little space in which to fit the text, imposing a resolution limit upon raster output in order to retain readability.
Requirements
- Brainstorm Really Really Fucking Seriously
- Investigate output technology
- Design program
- Design database
- Design user interface
- Review progress
- Feasibility study
Libertus said: March 9th, 2006 at 20:43
^ Brainstorm
First things first. Fix that awful WordPress bug where submitting a comment returns you to the top of the post instead of the comment. That is really irritating.
I: Come on! Come on! I don’t have all night. Get your asses in here, pronto!
L: What? At this late hour? I have better things to be doing than listen to your big ideas.
P: Yeah! What’s all this crap about fan charts? What have fan charts got to do with the blog?
L: Yeah! How am I supposed to moderate a fan chart? What do fan charts have to do with me?
I: Nothing.
P&L (in unison): What?
I: Nothing. Fan charts are nothing to do with the blog. That’s why they are a great idea!
L: I’m not getting this. You think something else other than the blog is a good idea?
I: Yes.
P: Odd.
I: Yes.
L: Too odd. What’s going on, Responsibility?
I: I can’t tell you.
P&L (in unison): Groan. Not again!
P: You never tell us anything!
L: Yeah! We have to do all the work, but we never get to find out why! What’s the deal with that?
I: Look, I just can’t talk about why. Now shut up and listen.
There is a moment of silence.
I: Ah… perhaps I should rephrase that. Tell me about fan charts, guys.
P: I don’t know anything about fan charts.
L: Neither do I. Responsibility, you know for sure we don’t know anything about fan charts. They’re entirely your idea. How are we supposed to tell you anything about them?
I: Easy! Brainstorm! Read what I’ve written and tell me about fan charts.
P: Uhh… ok… I guess.
L: Why the hell not? I still don’t know what I have to do with any of this. I’ve just been moderating - I haven’t actually read what you’ve done yet.
There is another moment of silence as P and L read the post on fan charts.
L: Who’s Andy?genealogy and he’s been tracing his family tree for ages. He has documented several generations of his ancestors. He uses fan charts to visualise his family tree.
I: andyC on the blog. Good friend of mine.
P: Why does he use fan charts?
I: He’s into
L: Cool.
P: Boring.
I: Genealogy isn’t , Libertus, and it’s definately not , Paul. You’re both totally misunderstanding the importance of family.
L: Eh? Why isn’t it cool? I’d love to trace my family, if I had one.
I&P (in unison): HEY!!
L: Joke! Joke! You know I love you guys like my family.
I&P (in unison): HEY!!
L: OKAY! You guys are my family. Alright. Geez. I was just having a laugh.
P: You know my feelings are easily hurt! I’m very black and white. I don’t think your sarcasm is all that funny.
I: And you’re pissing me off because you’re not taking this seriously. Libertus, just because this isn’t your idea, and you don’t think it is anything to do with you, doesn’t mean you can make light of it. Please behave yourself and stop distracting us.
L: OK guys. I’m sorry. You’re right. Responsibility, if you say this is serious, I’ll take it seriously. And Paul… fuck you.
P: Pah! If you weren’t needed here, Responsibility wouldn’t have asked you to come, so your being here isn’t to insult me, as you can do that any time you wish. Responsibility, why is Libertus here?
I: I can’t tell you.
P: Oh come on. Please. How am I supposed to work with someone whose function is a complete unknown to me? You know that’s impossible.
I: OK. I need Libertus here for his marketing skills.
L&P (in unison): WHAT?!
I: Shhh! That’s all I’m going to say on the subject. Get back to reading.
There is a moment of silence as everyone reads on
ReplyLibertus said: March 9th, 2006 at 21:48
Google sells:
Spot on!
ReplyLibertus said: March 9th, 2006 at 22:32
Brainstorm, Seriously This Time
L: OK, I have a serious question. What the fuck has this to do with me? I appreciate you want to do something to help your friend and all, but this appears to be a solid, square-bashing, bona fide, complete and utter waste of time.
P: Indeed! To what possible use could you put these ?
I: Good questions.
There is a moment of silence
L: Yes? And?
I: Well, I’m thinking about what I can tell you.
P: What? Don’t you trust us?
I: Yes, of course I trust you, both of you, completely, otherwise I wouldn’t be saying anything at all. Like I said before, neither of you appreciate the importance of family. I need you both to learn, pronto.
L: Oh!
P: Oh indeed! Learn about family?
I: That’s the idea. That’s why we’re all going to do this. We’re all going to learn to appreciate the importance of family.
L: From whom are we going to learn?
I: From each other, of course!
P: OK, now this is getting stupid. Responsibility, you’re not making sense. How can we learn from each other something none of us know?
I: By doing this fan chart project.
P: Oh.
L: Oh indeed. That still doesn’t explain my involvement. You said I’m here for my marketing skills. That doesn’t make any sense. I don’t have any. And besides, what do marketing skills have to do with learning to appreciate the importance of family?
I: Nothing at all. I just thought you’d enjoy the challenge.
L: Oh. Will I?
I: How should I know? If you’d just read the stuff instead of fretting about why you’re reading the stuff, and questioning why you’re here, this would go a lot smoother.
P: I know why I’m here. I have to do the programming.
I: Of course. Libertus is confused but I knew he would be. Quite funny to see him question his own existence, don’t you think?
L: No, I don’t think that’s funny at all. I do a job. I enjoy doing a job. I don’t know what my job is here. I may as well spend the time masturbating for all the good this is going to do me.
I: Ahhh… actually, I’d prefer you didn’t do that. We’ll need the keyboard.
L: Ha ha. OK, so I’m going to be the butt of all the jokes this time, am I?
I: Unfortunately yes. Sorry, just the way things have to be. I simply cannot tell you that you’re job here is anything but to have fun being here.
L: Am I getting paid for this?
I: Maybe.
L: So I have no responsibilities here whatsoever, and you’re maybe going to pay me for it?
I: Yep.
L: May I have a moment to think about it?
I: Sure.
There is a moment of silence
ReplyLibertus said: March 10th, 2006 at 00:02
Brainstorm, Really Really Seriously This Time
L: OK. A fan chart is a representation of a family tree.outchill and we’ll have some more fun.
ReplyI: Yes.
P: Gotcha.
L: People like to know about their families.
I: Oh yes.
P: Gotcha.
L: People are prepared to pay good money to dodgy American companies to search databases of something. Gotcha.
I: Oh yes indeedy.
P: Gotcha. Unbelieveable as that may sound, I’ve seen it with my own eyes. I cannot believe the trick those fucking cheating bastards tried to pull. That was so fucking devious I cannot believe people would stoop to …
I&L (in unison): PAUL!!
P: What?
L: You’re ranting to the madhouse. We know.
P: Sorry. My feelings are easily hurt.
I: Precisely why you are just the programmer for this job.
P: I don’t understand.
I: No worries. I trust you would simply refuse to design a website that would do that.
P: God yes. You’d never, ever get me to try to trick people like that. Never.
I: Good. Now, calm down and let Libertus do his job.
P: OK. Sorry Libertus. Do carry on.
L: No worries. I know people are prepared to pay money to charlatans and I know it upsets you, but you gotta learn to have a thicker skin. There are no such things as free lunches. That one nearly got me, and I’m wise to most scams. So
P: I cannot imagine how you can find such dastardly behaviour entertaining.
L: Did it hurt anyone?
P: What do you mean?
L: Simply that. Did anyone get hurt?
P: I got upset.
L: Are you bleeding?
P: No, don’t be stupid.
L: OK, so you didn’t really get hurt, did you?
P: No, I suppose not. Now I’ve had a chance to calm down, there’s no damage done. No transaction was confirmed. No bargain was made. Nothing really happened.
L: Exactly. But you felt something, didn’t you?
P: Yes! Blooody outrage!
L: Indeed, but no-one got hurt regardless. So you felt something not at any actual harm done, but the potential of harm being done to other people.
P: I suppose so. It felt pretty darned personal.
L: Of course, but that’s because you’re a nice guy. You gotta get a thicker skin so you can enjoy feeling bad while no harm is being done.
P: I don’t understand.
L: No, I don’t suppose you can. Anyway, I have a job to do, and whilst this emotional intelligence stuff is all well and good, it isn’t helping me define fan charts.
P: OK. I think I know something new, but I’m not sure.
L: Don’t thank me. I’m just doing my job.
Libertus said: March 10th, 2006 at 00:31
Brainstorm, Really Really Fucking Seriously
L: You tricky bastard!morbid interest in such things, and it’s not bad. Quite the contrary. It is a celebration of their identity, a sense of self that transcends time and space. A small piece of immortality.not thinking about tricking people . In this case, fan charts are not designed to trick people. They are designed to help people visualise their family, and provide a reminder, through blank spaces, of wonders of family history yet to be discovered. You’ll note the exponential growth of the ring segment count as they get distant from the centre. This is the grains of sand on a chessboard problem .
P: What?
L: Not you. I.
I: What?
L: I know why I’m here.
I: Oh really. Do tell.
L: . Very funny. You nearly had me there.
I: Oh really? Do tell.
L: The truth is, I’m here because I can see through every trick in the book. I’m here to make sure you don’t rip anyone off. Paul can’t rip people off. That has fuck all to do with fan charts.
I: whatever you say. I think you’ll be very useful while we do the fan chart project. Now, will you please get on with it?
L: You betcha. Paul, are you listening?
P: Yes.
L: Then shut up.
P: OK.
L: We’re going to write a program to allow people to store information about their family history.
I: Yes.
L: And you’re absolutely desperate to ensure that there’s no .
I: Fuck yes. There’s no point drawing a fan chart if it can also be used for mischief. It’s just a fan chart after all.
L: OK, that’s what I don’t get. Never mind. Everybody on the chart is a real person, living or dead, male or female, mother or father or child, not necessarily genetic.
I: I beg your pardon?
L: Of course. There are plenty of people whose mother and father are not their genetic parents. Family isn’t about genes, it is about identity.
I: That’s exactly right.
L: I guess there’s nothing more personal than your hatching, matching and dispatching.
I: People have an unusually
L: It’s enough to make you cry.
I: For sure! Can you understand why this is so serious?
L: For sure! You want to build a time machine.
I: Stop that! You are not to engage your marketing skills during this project. DO I MAKE MYSELF CLEAR?
L: WHOA! Yeah! OK, whatever you say, boss. Outchill, man. Identity is important. I know that because someone just tried to steal mine, which is ironic as I don’t have one. I must admit to a fascination with my available family tree records given my total lack of identity, but not at the price they were charging. was way too expensive for something I can surely get cheaper by another route.
I: Exactly. If you have something worth selling, there’s no need to trick people into buying it. You don’t need to give them anything for free. To do so is an admission that your product is not all it seems.
L: Oh yeah. I hadn’t really thought about it that way before. A free lunch is likely to be of poor quality I suppose. You get what you pay for.
I: Yes. Now, tell me about fan charts. I am aware that do far I have paid you nothing, and that I should therefore expect poor quality by your logic. Nonetheless, please continue.
L: Sure. Now, the fan chart is just a pretty graphic.
I: Yes. The family history is the source data. It is the important thing.
L: Well yeah. You can draw a million graphs from a set of data.
P: That’s not true!
L: Shut up! You’re
I: OK, I see what you’re getting at, but capacity isn’t really a problem, is it?
L: No, I suppose not. Besides, the exponential growth is actually an illusion.
I: What?
L: Oh yes. Didn’t you spot that?
I: No, not really. What do you mean?
L: You’ve been worrying about capacity. You think that because every family tree grows exponentially from the centre, that the more users you have with such family trees, the more exponential the growth. That’s not how it works.
I: Explain.
L: Well, there are a finite number of people, and fewer into that past than in the present. There is a lot of intersection in the sets. One may appear to be on many different family trees, depending on how you look.
I: Oh yes. OK, good point. So capacity isn’t really a problem. The more people we add, the more likely we are to already know them. I know that sounds odd, but it makes some sense.
L: Quite. You intend to draw more than one fan chart, don’t you?
I: Well of course.
L: From many different datasets?
I: Yes. What’s your point?
L: Nothing. Just asking.
I: Damn you! I’ve been talking, you bastard! How do you do that?
L: Don’t thank me. I’m just doing my job.
I: And you’re very good at it. Please continue.
L: Every segment on the fan chart is someone at the centre of another fan chart. Everyone is a member of a family or has been at some time.
I: That doesn’t make sense. Either you is or you ain’t.
L: You forget the effect of time. Things change over time. One may not have a family, yet have people with whom you identify strongly enough that there is no perceptible difference between their genetic identities - total strangers - and their actual identities - mother and father. That is a bond forged by everyone.
I: Everyone with a credit card at least.
L: What does that have to do with anything?
I: Nothing. Just thinking aloud.
L: Whatever. People are born, at a time and place, to a mother and father, and are given a name.
I: Yes.
L: During their life, people get married, at a time and place, with other people present, and presents, and pictures, sometimes priests, always parties, pretty paper, it’s a big event.
I: In one way or another, yes. Having children is the usual reason.
L: Yielding yet more births, mothers and fathers. Then the less than nice bit.
I: Yes! Paying for it all!
L: No! Death. People die. At time and place rarely, but occasionaly chosen, of causes rarely, but occasionaly chosen. Death is a big mystery, until it happens. Then you know all about it.
I: That’s life. There’s no point in being coy about it. Besides, death is big business.
L: What?
I: Nothing. Just thinking aloud.
L: Yeah, that’s getting scary. Anyway, the lack of statistical information about a person’s death is good reason to suspect that they are still alive. People who are alive can be quite demanding, can’t they?
I: Yes. And profitable.
L: Will you stop that?
I: Well it’s the truth. Why should I be coy about it?
L: You’re stating the bleeding obvious!
I: Is that a problem?
L: It’s redundant.
I: Like you will be in a minute if you don’t get on with it.
L: Oh ha ha. Libertus, nil points once again.
I: Hey, Perry wants to tell us something.
L&P (in unison): Perry! Yay!
There are several moments ofsilence
L,I&P (in unison): Oh! Perry!That was silly.
L:
I: Very silly.
P: Silly.
L: Back to the job at hand then?
P: Do I still have to shut up?
L: If you don’t mind.
P: No, it’s OK. I’m enjoying this in blissful silence.
I: I thought you would. Dreaming of code?
P: Actually no.
L: Wow. OK, we’re learning about the importance of family. And drawing fan charts.
I: We’re drawing fan charts.
L: OK, to do that, you need to store names, places and dates.
I: Yes.
L: And I take it there isn’t much point if the information isn’t accurate.
I: Not really.
L: And you’re also going to record the relationships between people?
I: Of course! You can’t draw a fan chart unless you know a person’s mother and father.
L: And their dates of birth, marriage and death.
I: Yes. That information has to go in each segment of the fan chart.
L: That’s some pretty damned personal information, Responsibility.voodoo doll . Fucking read about them.
I: A family tree is a personal thing, Libertus.
L: As you said,
I: I did. Beautiful, isn’t it?
L: And profitable?
I: I hadn’t really though about that.
L: You hadn’t given one moments thought to the profitability of offering people a small piece of immortality?
I: Libertus! I told you not to do that!
L: But those are your words.
I: Oh yes.
L: Did you?
I: Did I what?
L: Did you give that a moment’s thought?
I: Did I give what a moment’s thought?
L: That thing you said.
I: What thing?
L: I’m not going to repeat myself. You know what I’m talking about.
I: No, I don’t. You’ll have to repeat yourself.
L: And make myself redundant? Uh. No, thanks.
I: Damn!
L: You are one tricky bastard at times. I’m going to have to keep an eye on you.
I: That is why you’re here after all.
L: Oh yes.
I: Now, did you have a point?
L: Oh yes! Personally identifying information! You’re going to need tons of it.
I: Well, yes. Of course. That’s the source material for a useful fan chart.
L: Where are you going to get it from?
I: I beg your pardon?
L: Where are you going to get all this hatch, match and dispatch information from?
I: Umm…
L: Aha!
I: Well, my own family.
L: Myself and Paul?
I: Umm…
L: GOTCHA! YOU’RE REAL!
I: Err… yes.
L: Well, that makes all the difference, doesn’t it?
I: I don’t understand.
L: Oh I think you do. The only fan chart you can draw on here has you, me and Paul on it. If it contains anything else, it’s real, isn’t it?
I: Not necessarily. I could just put in fake data.
L: BZZT! WRONG! I asked to which you responded So if you’re not putting in real data, it isn’t a fan chart, is it? It can’t be.
I: I guess.
L: And if you draw your real fan chart on here, you expose information like your parent’s date of birth, names, all sorts of stuff that form your identity.
I: I guess. What’s the problem.
L: Pay attention. I will only say this once.
I: What.
L: IDENTITY!!!
I: Whoa! Okay. Identity is important, I know that. What’s your bug, man?
L: OK. You’re asking for this.
I: Asking for what?
L: Your mother’s name is Anne.
I: HEY! STOP THAT!
L: No! Your father’s name is John.
I: HEY! STOP THAT!
L: Are you following me?
I: OKAY! OKAY! Yes. I get your point. Just stop doing that. It hurts.
L: GODDAMN RIGHT IT HURTS. That’s what I’m trying to get through to you. Your identity in a skilled person’s hands is like a
There is a short pause.
I: You have oneHell of a way of making your poinr. You are worth every penny I pay you. Quote Wikipedia on voodoo dolls. I have no idea what that means, but I know it is important somehow.rude awakening . I’ve made you feel how someone else would feel if you did the same thing to them.
L: Are you bleeding?
I: Umm… no. Actually, I’m not.
L: Do you know why?
I: No. Actually, you really hurt me badly then, yet I’m not bleeding in the slightest. That is a little odd. I distinctly felt a sharp prick when you mentioned my mother and father’s names.
L: But I didn’t mention your mother’s name, nor your father’s name.
I: Oh yes.
L: Clever, eh? You thought I did, but I didn’t. Yet the information is perfectly accurate, is it not?
I: Well, on closer examination, not really. It is deviously incorrect. It hurt nonetheless. I would have paid you to stop.
L: Beautiful, isn’t it. Do you know how much I have dreamed of profiting from that little talent? People out there should be fucking glad you’re the real one and I’m a complete figment of your imagination.
I: I have to sleep at night.
L: Indeed. So let’s get back to the fan chart. Finish the brainstorming session.
I: I don’t feel well.
L: I know. You’ve just had a
I: Will it pass?
L: Yes, so long as you never, ever try to do to anyone else what I just did to you.
I: What did you just do to me?
L: I deliberately hurt you with the truth.
I: That’s horrible.
L: You cannot allow anyone to do that with your fan charts, Responsibilty, least of all your own real family. You want to help people, remember, not crucify them.
I: Stop it. You’re being really nasty.
L: Yes, and you’re the Responsible One. You need to know if your fan charts are going to have sharp edges. They’ll be far more nasty to you than I ever could be. Look, I just hurt you, and you’re not bleeding. Fan charts have real people on them, just like you. You can hurt real people, and they will make you bleed, if not physically, at least financially. That is the burden of Responsibility. If your fan chart program is to be successful, even feasible it must not also be a weapon in a skilled practicioner’s hands.
I: I think we’ve had this conversation before.
L: We have, but this time it’s serious.
I: I need to think about this.
L: You do. I cannot show you any more examples. It’s your choice. Go or no go.
There is a moment of silence.
I: I’ve thought about it. Go. I trust the technology to keep things secure.
L: Whoa! Now, you have to slow down there, cowboy!
I: Why?
L: You don’t know anything about internet security.
I: What the fuck has my knowledge of internet security got to do with fan charts?
L: Oh, nothing and everything. You’re going to put your own family’s chart up on here?
I: Yes. I think we can keep it secure.
L: But you don’t know.
I: Ah. Well.
L: You don’t, do you? Do you know why?
I: I’ve never tried to break it.
L: Exactly.
I: I can’t. It is against the law.
L: Only breaking into someone else’s property is against the law.
I: Good point. I can only gain authorised access to my own property. You’re a genius!
L: But of course.
I: I may pay you for this.
L: Don’t thank me. I’m just doing my job.
There is a moment of rather more smug silence than is normal. Libertus decides to go for a while, whatever that means.
ReplyRach said: March 11th, 2006 at 15:07
sorry if you covered this in your schizophrenic converstation (I didn’t read it) but something occurred to me when I saw the graphic. It’s great for putting in parents, grandparents etc. But what about siblings? If I understand the fan correctly there is no space for eg your aunts and uncles, or your grandparents aunts and uncles. Isn’t tracing these people part of the point of tracing your family tree?
ReplyLibertus said: March 11th, 2006 at 15:19
No, no, that’s a very good point! Don’t worry about reading the text, it needs time and effort that most people don’t have spare. The graphic is the important thing.
There is no difference between the family trees of your genetic siblings and yourself, so the circle at the centre may have your name in, but represents all offspring of your parents, and so on through the rings and segments.
There are quirks, such as adoption, where a person may have four parents and trace them all, half-siblings, with one extra parent, and lone-parent, where one parent, almost exclusively the father, is unknown. Ancestry is not exclusively genetic, but the fan chart model is strictly limited to the two-parent model. I have no plans to deviate from that.
I’ll think about siblings of ancestors. It isn’t directly relevant to the fan chart as such, but does seem to be an important apect of family. I’m sure they can be incorporated into a computerised fan chart in a way that the paper version cannot.
ReplyLibertus said: March 11th, 2006 at 16:39
^ Investigate Output Technology
Paul, the Programmer, is sitting in front of the computer, waiting, as usual, for the others to arrive. Several minutes too late, stillgibbering and gesticulating wildly to each other, Libertus, the
MarketerModerator and I, the Responsible One, arrive.P: Late as usual guys, and still fretting about something, as usual. Don’t you two ever outchill?
L: Don’t you ever take anything seriously?
P: Of course I do! My feelings are easily hurt. I just want to do some programming and, as usual, you guys argue into the night about totally irrelevant things, totally missing the point, and totally forgetting about me. Responsibility, do you want a fan chart program written or don’t you?
I: Yes. That’s all I want. A program to do fan charts.
P: Right. Not a problem. I can go at any time.
I: What? You barely participated at all last night. How can you go if I haven’t told you what to do?
P: I know everything I need to know. I may not have spoken much last night, but I do have eyes and ears. I can see the graphic and read your ravings, which gives me absolutely everything I need to go on to build the program.
I: I don’t see how.
L: Neither do I. You just got upset last night.
P: Well yes. I don’t like trickery, and there’s a lot of it going on around family, which means to me that no-one is actually getting the importance of family.
I: Which is what?
P: Nothing.
L&I (in unison): WHAT?!
P: Family is nothing. From the point of view of building a fan chart program, family is completely irrelevant.
L: Here he goes again.
P: No, look. I’m pretty sure I can prove that by just doing the work. You guys fret about the effects of putting real names into the chart. I don’t give a monkeys. I need to make shit up just to be sure everything is working OK.
I: Oh yes. Test data.
P: Test data. I’m pretty obscure with my test data because I like to test the sharp edge cases, where things usually break easiest. You won’t have to worry about offending anyone.
I: Are you sure?
P: Of course! I am absolutely certain that no-one will be offended by my test data. It may be recognizable though. Is that a problem?
L: Recognizable? As in, popularly known?
P: Ummm… maybe.
L: Maybe is good enough for me. If I get complaints, I can always shut the post down.
P: I won’t offend anyone. I promise.
I: Damn. On the one hand, conventional wisdom is “never trust a programmer”. On the other hand, if you already know what you’re doing, there isn’t much point in me repeating it all to you, is there?
P: Not really. It’s just a fan chart program, after all. That’s my domain.
I: I guess. Just be careful, OK?
P: You have my word.
There is a moment of silence.
P: So tell me about output technology.SVG and PDF .GIF .RAM to play with, in total.
I: OK.
P: I’m assuming the delivery technology is the web.
I: It is.
P: You mentioned vector graphics, which I assume to mean
I: Yes, they are both important.
P: And relatively easy to deal with. The image you posted is a nicely compact
I: Indeed. My source image was significantly higher resolution.
P: Well, if you want high-resolution raster image output, I have to warn you about something.
I: What?
P: They’re a bitch! I only have eight megabytes of
I: I don’t understand. The computers this will run on have way more than that.
P: I know, way way way more, but my program will still be limited to eight megabytes.
I: OK, I still don’t understand, but can you explain why that is a problem? I do want people to get bitmap images, and preferrably with high enough resolution that the names far from the centre can be drawn legibly.
P: Of course. What kind of image size did you imagine?
I: Well, 2000 pixels across.
P: THAT’S MASSIVE!
I: No it isn’t! Most digital cameras do that these days. Even the cheap ones.
P: Yes, but they all have a lot more than eight megabytes of RAM to play with.
I: Look, that’s the third time you’ve said that and I still don’t understand why.
P: I did emphasise myself the first time.
I: Indeed, but emphasis alone does not aid my understanding. Why is your program limited to eight megabytes of RAM?
P: It is a limitation imposed by the PHP interpreter on the internet web server.
I: I don’t understand.
L: I do.
I: You understand that nonsense?
L: For sure. Very important when managing an internet site on a shared server.
P: Can you explain it then?
L: Yeah. If you want to deliver something on the web cheaply, you have to do it economically. If you want to run thousands of websites off a single server, each website cannot consume more than its fair share of that server’s resources. Follow?
I: Fair sharing. No, not really. I pay a lot of money for my web hosting.
L: No you don’t. You only think you do because you’re a cheapskate.
I: I resent that!
L: Don’t! Most web hosting companies are cheapskates too. That’s why Paul only has eight megabytes of RAM to work with. Fair sharing by cheapskates. It is a marvellous system. The very foundation of the web.
P: You don’t often wax lyrical about technology.
L: The technology is just an enabler. Stuff like this has been going on for years. How do you think subversive pamphlets got printed and distributed in the early days? Do you think they paid for an entire print run, or were they cheapskates, and used contacts to hook themselves in at the end of someone else’s long print run?
I: Do you have any clue what Libertus is talking about?
P: None whatsoever. I don’t think Libertus has either.
L: Oh yeah. Sorry. Just thinking aloud. Anyway, the server on which the blog is hosted, and on which Paul’s program is inevitably going to run, also hosts an unknown number of other websites. In order for each website to be treated fairly, they must all be able to serve at least one visitor simultaneously.
I: That makes sense. I’m not paying for my website to be unavailable.
L: Of course, and there is no reason it ever should be, so long as no one website can consume more than its fair share of the host server’s resources, such as power, bandwidth, disk space and memory. The RAM that Paul mentioned.
I: But the host says the server has loads of RAM. Gigabytes.
L: I’m sure it has.
P: It has.
I: So why do we only get eight megabytes? That’s several orders of magnitude less!
P: It has to do with the number of sites being hosted.
L: And the number of simultaneous connections allowed to each site. The number of visitors each can handle at once.
I: OK, so without going into too much detail, my fan chart program is limited to eight megabytes of memory, because it is going to be running on a hosted web server, and because I want to deliver high-resolution raster images, that is going to cause problems?
P: A BITCH of a problem.
I: I still don’t understand.
P: How many pixels are in a high-resolution image?
I: Millions.
P: How many millions?
I: Well, a few at least. 5 megapixels.
P: Five million pixels. You’re aiming for a resolution of 2000×1000 or thereabouts?
I: I’d say that’s about right.
P: And how many colours?
I: Ah well, that’s the beauty. Not too many. You can see from the graphic that there’s a white background, black separating lines, soft pink background for the female line and powder blue background for the male line. I make that four colours. And if there are only four colours, you can store that in practically no space, can’t you?
P: No.
I: What? My GIF image was only a few hundred kilobytes!
P: Yes, but that is compressed. I cannot write a program to draw text into a compressed image. I have to work with it raw in memory.
I: Raw?
P: Yes. A raw, naked grid of 2000×1000 pixels. Yes, I can make it smaller if the number of colours is limited, but I can’t be sure the technology I’m about to use can do that. I’m looking at needing up to four bytes per pixel, and maybe wanting more.
I: Oh shit.
P: Yes. You can count at least.
I: That’s a little more than eight megabytes.
P: No. It is exactly eight million. Leaving me only a few hundred kilobytes for the rest of the progam.
I: Will it fit?
P: Ah. No.
I: Oh. So what can I do?
P: You can go and think about whether you need to deliver high-resolution raster images at all. Vector graphics are easy because that is the natural form of the model. Rendering that into a high-res image will break our memory quota, for certain.
I: Can we raise the memory quota?
L&P (in unison): NO!
I: Oh. Well, we can limit the size of the output image.
P: Yes, of course, but that defeats the purpose a little, as far-flung ancestors will be illegible, or at least clearly pixellated.
I: Let’s say high-res raster images are a necessity. What then?
P: I’d say this is going to take a LOT longer than you anticipated.
L: Uh oh.
I: Damn. How much longer?
P: Depends.
L: Knew it! Programming has you by the balls, again! He does this every time, you realise.
I: I’m used to it. What do you need, Programming?
P: Just time. Essentially, I’ll need to find or write a low-memory image rasterisation engine.
I: I sure hope you can find one.
P: So do I. Much as I would enjoy the latter, it doesn’t really help with the fan chart project. Besides, raster output can come last. I can get going without resolving the problem. I just thought I would raise it up-front.
I: So if I say go, you’ll go?
P: Yep.
I: Well what the fuck are you waiting for? GO!
P: Your wish is my command.
There is a moment of silence, some shuffling of feet, and the sound of a distant kettle.
ReplyLibertus said: March 11th, 2006 at 18:03
As Usual, Something Distractingly Wierd Happens
I just got a letter in French. I don’t read French sufficiently well enough to understand it. Perhaps Google can make sense of it for me. I think someone wants me to join a Yahoo group.
I shall decline. I know nothing ofAlgeria . Maybe I’ll visit someday.
ReplyLibertus said: March 11th, 2006 at 18:07
^ Design The Program
At last! Start with a review of the data. There are people and places. People appear at a place and time, become related to other people over time and at places then disappear at times and places. Nothing to do with family. Just time, things, names and relationships. Easy.
What’s In A Name?
Certainty and uncertainty. Everything of importance has a name. Actually, that isn’t true. Anything of any importance has many names, usually proportional to its importance. It is odd, but true, and I’m not about to design a program that defies rock-solid empirical evidence.The most important thing in the world has 216 different names. What’s with that?
The point is, that all these many and various names all refer to absolutely the same thing. Something of the most miniscule importance still has to have one name, the name by which the computer at least can identify it alone, and tell it apart from everything else. So perhaps importance is not the correct word.
In order to be distinctive, something must have one unique name. What that name is doesn’t matter, so long as it is different from everything else.
Here’s where the trouble brews, because computers and humans do not agree on this point. There are, occasionally, instances where humans use the same word to mean two or more entirely separate things.Zero , for instance. Computers find this very confusing. A computer can store zero, but cannot tell you what it means. Zero what?
As soon as a collision like this happens, and a name stops referring to one unique thing, the computer can no longer tell you where you are, if you happen to be on that name and don’t know how you got there. So names, being a form of identity, are important. In a computer, they are everything.
All that aside, storing names in computers these days is pretty easy. What’s in a name, anyway?
Letters. One or more letters. A name is a single word. The more letters a name can contain, the larger the number of things that can be uniquely named, which is multiplied by the essence of the character itself, which can individually express one or more unique things.
If I may choose any letter from the roman alphabet to name my things, I am limited to 26 unique things, or 27 if you are a gambler. 26 is a fair few, but I can see from the fan chart graphic that there are many more than 26 segments to be filled, so I cannot just name by letter. It is too restrictive.
And silly. It’s just an illustration. Modern computers are capable of dealing with names that are very long written in letters that are very expressive. Indeed, expressive enough to represent all known human scripts.
I am, of course, talking aboutUNICODE .
What Is A Name?
Knowing what a name contains does not quite solve the problem. It solves half the problem to be precise. A name only represents something. There is still the thing that is named, whatever it is. The nature of a computer, what a name is to a computer, has to be clearly defined. Up to 216 UNICODE characters is just a bunch of meaningless gobblegook to a computer, no matter how obviously meaningful it may be to any human. The fundamental language of the computer demands that the one true name of anything must take a particular form. Letters and scripts are a luxury only humans can afford. The computer needs a number. One number, preferrably, for each thing you want it to remember.
You Are Not A Number. Yet, Strangely, You Are, Somewhere.
I have no choice but to decide on a system for numbering the things the computer must deal with, whether they are names, or have names. I know for sure that the number of things that can possibly be represented by up to 216 UNICODE letters is vastly more than the number of things that possibly can be, or will be with repect to fan charts at least. I mean seriously, there aren’t that many people likely to appear on one, are there? What’s the maximum size of a family, anyway?
Engineering Decisions
I could ask. I should ask. I know I should, but I also know the ensuing discussion and debate would go on for days, and in the end, the answer would be the same. 32 bits. Nobody ever needs to store more than four billion things at once. I mean, that’s just silly. How many people do you know?
relationship, time.Stop! You’re Being Silly!
Relationship type doesn’t belong there. I can conceive of four billion of person, place and time, but not of relationships. Relationships are not that complicated. There are only a few, not a few billion.
What Is A Relationship?
The program draws a fan chart, so the meaning of relationship must at least be able to represent that. Now, no matter how hard I look at that fan chart, I can only see one type of relationship;
is-parent. It has to be more complicated than that. I’ll stare harder.Nope, I do believe this is a bona fide one-dimensional cellular automaton. Cool. One relationship only, but how many of the one type of relationship per thing?
How Many Parents Can You Have?
Isn’t that a difficult question? Andy’s picture shows a constant two, but it’s just a picture. I have to build a model. I’ll have to think about it.
There is a moment of silence.
You May Have Zero To Four Parents
I’ll leave observant readers to work out the ramifications of that. The devil is in the detail as always. The detail here is that I can cheat. I only need 2 bits to represent that, since zero doesn’t exist.
So, in order, your parents may be; genetic X, genetic Y, non-genetic 1, non-genetic 2. All optional. Genetic parentage is not known to bemutable , non-genetic parentage by defintion is. The time at which a person becomes a non-genetic parent may be anytime post-birth.
What About Godparents?
I intended the phrase “non-genetic parent” to mean adoptive parent, but the concept ofgodparent springs to mind. No. That just confuses things. A maximum of four parents, that’s all the fan chart can deal with, and anything beyond two parents is on the sharp edge.
Optional Parents?
Optional meaning rather than . It is possible to not know anything about a genetic parent, save the certainty that the relationship exists. Anything characteristic of something that is a certainty, or is constant, can usually be elided from the data, that is, not stored at all. That a person has two generic parents it is not necessary to store. For how many parents one has data is the appropriate measurement. I’m setting an upper limit of four.
ReplyLibertus said: March 11th, 2006 at 20:26
Time and Place
My engineering decision to limit the number of things to a 32-bit quanitity has consequences, specifically on the concepts of time and place. Again, the total number of distinct times and places that will be stored for a fan chart will be many, many times smaller than the total number of possible times and places, but I don’t like to put unnecessarily arbitrary limits on things unless I have to.
What Is Time?
In terms of the fan chart, there are three important times; hatch, match and dispatch. Birth, marriage and death. Most segments on the chart are likely to contain all three, but may contain none at all, or at least none with any certainty.
Modern humans can have their vital times accurate to the second, if they want, and it seems unfair to disallow such accuracy from being stored, even if not visualised, should it be known. Conversely, distant ancestors may only be known to the accuracy of decade, or perhaps a range of possible times if there is dispute in the source records.
One thing for sure, is that there cannot be more than a human lifespan separating the birth date from the death date. Or can there? I’ll cover that later.
What Is Place?
In terms of the fan chart, place is related to the three vital times. One has a place of birth, marriage and death.
Hang On. Marriage Is Becoming Oddly Out-of-place.
I don’t think marriage is the correct word, as the only relationship on the chart is
is-parent. Marriage is an important concept, but not all marriages result in one becoming a parent, nor does one exclusively become a parent as a result of marriage.What is Time, Again
Whatever may be said about time in general, in terms of the fan chart, some times are shared between things, specifically the time at which the
is-parentrelationship is established between two things. Genetic mother and father must share a unique time with each child. Time of birth is the time the parent relationship is established. It need only be recorded once.Each thing needs a time of death, which although may be shared in value with others, is logically unique to the thing itself. There need be no relationship between things that die at the same time.
What is Place, Again
Place of birth and death may be known, and may be the same. Place and time and spouse of marriage are essentially accidental, and nothing to do with fan charts, so they can be disregarded.
Place, like time, can be known to minute detail in modern times, and again this detail should be stored if it is available. Place, like time, can be known to differing accuracy. Where time can be known as to a range, so can place be known, as an area.
Accuracy and Uniqueness
Here’s a cool problem! Just because something is not known with accuracy does not make it differ, in any way, from the same thing known to greater accuracy. A person is born at a time knowable to infinite accuracy, but never known to infinite accuracy. 1968 is a perfectly accurate time of birth for me, unless you want to send me a birthday present, or calculate my precise age in seconds since midnight, 1st January 1970*.
How does one store time?
ReplyLibertus said: March 11th, 2006 at 21:30
Ask A Stupid Question…
Duh! , indeed. That question cannot be answered. One can either store a time or the time, not both at once. The fan chart needs the time something happened, births which are shared and deaths which are individual. So there is a zero-to-one relationship between deaths and things, and a one-to-many relationship between births and things. There is also a natural order; birth must happen for something to exist, birth must precede death which does not exist until it happens, one parent’s death, by inference the genetic mother’s, may not precede child’s birth by much.
Who Buys Their Own Coffin?
Keeping a blank death certificate around is morbid, like buying your own coffin. Everyone has a birth certificate, maybe partially complete. Every birth certificate has at least one name on it, the name of the thing born, which need not be at all unique, or in any particular form. Names can be any sequence of one to 216 UNICODE letters. Every birth certificate has a time of issue, and at some later time has a death certificate stapled to it, not necessarily containing the same information at all, not even the name.
ReplyLibertus said: March 11th, 2006 at 22:11
Don’t Confuse Things
Things get complicated when things are not kept apart. The fan chart has a specific purpose, to visualise parentage, through birth and death, over place and time, in the form of a chart, and delivered as a bitch of a high-resolution bitmap, amongst other forms, on the web.
I have a clear enough idea of the data now to perfect it in the database design.
ReplyLibertus said: March 11th, 2006 at 22:48
^ Design The Database
Much program remains to be designed, for sure, but at this stage a structure for the data will form a secure foundation for everything else.
Births are the core information. No thing exists until born. A thing is born in time. It is assigned a name. The bonds between itself and its known parents are formed. A record of place may be kept. Everything that is born eventually dies.
objectIt is a little odd, definately weak-looking in places, but that’s ok. Sleep on it.
Mental note: The page style seriously needs work. Those tables are shocking.
ReplyLibertus said: March 12th, 2006 at 14:49
Why Is The Time Not Stored With The Birth?
And other such questions arising from scrutiny of the database design.
Q: Why is the time not stored with the birth?
A: Because time is standalone. Events like births only reference a point in time. They do not aggregate or absorb that moment.
Q: What is the purpose of the birth
bondscolumn?A: To express knowledge of parentage at birth, with uncertainty, as a guide to examining the real bonds table.
Q: Can this model our data?
A: Let’s see.
Test Data
Memories ofLISP and Prolog .
The data looks right. There are things, all born and named at a time and place, with bonds between them, and deaths for some. What do the tables contain to represent this?
Times; 1968, 1945, 1943, 1918, 1997, 1922, 1998, 1924, 1999, 1916
Names; Paul, Anne, John, Mary, George, Elizabeth
Places; Broch, Kent, England, Scotland, Aberdeen
7 births; my 1, my 2 parents and my 4 grandparents.
6 bonds; my 2 birth parents, my 2 parents 2 birth parents
4 deaths; my grandparents
Data Observation
Not easy to identify people.
ReplyLibertus said: March 14th, 2006 at 11:09
^ Design The User Interface
There remains a lot of program and database to design, but at this point I’m happy with the progress on both, so I turn my attention to the user interface. Or would, if there were such a thing. This is always an odd moment, stepping to the edge of the vast gulf between mechanic and organic, taking a few steps back, a short run, then leaping across in a single bound. Like Morpheus showing Neo the power of mind in , I have to show the computer that humans can be trusted to provide correct information and show humans that the computer can be trusted to act reasonably even when given garbage to process.
The reason I make this scary leap is so that others do not have to. I can hop back and forth at will, building a bridge as I go. If I do well, people cross the human/computer gulf almost as if there weren’t one.
What Is A ?
Don’t you just hate that word? User. Heavily negatively connoted. Apt though, as a human does use the computer and the computer does use the human. I am primarily interested in the personal experience had by a human while using the fan chart program, ensuring it flows smoothly, protects them from mistake, guides them to understanding what input is necessary and what form is required, then producing a kick-ass fan chart to reward them for their efforts.
A user is someone I want to please but don’t know how. Myself, if no-one else, and frankly even I have no clue what I want.
What Is An ?
From my description of user experience above, an interface should be smooth flowing, protective, guiding and most of all rewarding. In general, a good interface is helpful, sensitive and tolerant.
For a fan chart there is a lovely, natural flow to the information. If I design the user interface around filling the database tables, that flow is lost, because the data is not naturally tabular - it just looks that way to a computer. To be helpful, the fan chart interface must inquire of the user’s knowledge of their family tree in the proper order, which is starting with the user.
ReplyLibertus said: March 14th, 2006 at 13:14
The Program Speaks
Hello. I am a program that draws a pretty fan chart from your family history.
ReplyTo begin, I need your name. I have help.
Libertus said: March 14th, 2006 at 13:22
I Have Your Name
Hello my-name. To draw a fan chart, I need your family history, at least you, your mother and your father. For each, I need a name and time of birth. For each I want a place of birth.
I need to know when you were born.
I Have Your Birth
I want to know where you were born.
I Have You Now!
I now have you as born never nowhere.
To draw your fan chart, I need the same for your mother and father.
I need your mother’s name.
Etc. Does anyone remember ?
ReplyLibertus said: March 14th, 2006 at 15:26
MisuseOutreach ? How Dare You!
I’m sorry! I cannot resist corrupting my little gem to do something cool. I am going to implement <is:get>, which can be self-closing or wrap default text. With a bit of twiddling to the above comments, this post will become a program! How cool is that?
ReplyLibertus said: March 14th, 2006 at 15:33
Do A little Bit Of Coding
OK, I know it’s naughty to code during the design phase, but fun gotta take primacy over form, and this is fun, being ever so informal.
The task is to implement a new type of Outreach tag, specifically <is:get>, which will cite the name of the URL parameter to replace the tagged text, if any. As is customary with Outreach tags, if no
citeattribute is specified, the tagged text becomes the citation.There is another little tweak I’d like to make to Outreach while I’m in the vicinity. I want the specified
citeattribute to be the default title.Start With A Clean Sandbox
Now thatmy Linux coding workstation is back up and running , I need to make sure it has the most up-to-date copy of the blog source code. Checking CVS on the laptop I can see that I have some uncommitted changes. Chuckle at . Update on Linux and I’m ready to go.
Find My Place
Open
wp-content/plugins/outreach.php. Oh my! The new monitor is just awesome! I can see so much more clearly now.Looking over the list of outreach tags, it is clear that this one doesn’t quite fit, but that doesn’t matter. It isn’t a core tag, just a play-thing. I think about style, how perhaps I should allow class to be set, but remember that the author can always place a
spanaround the outreach, so a simple textual replacement is sufficient.Might as well tidy up while I’m here and consider this to be Outreach Plug-in v0.3.
Add
getto global list of understood tags.Remove
whyfrom global list of understood attributes is of no meaning.Find the tag rendering loop and add
getto the case.Looks OK. Move to test on local development blog. To the laptop!
No! Wait A Minute! Sneaky Thought!
Why not just test the plug-in? On a nice, clean,WordPress 2.0.2 codebase ? Install one on the Linux machine.
ReplyLibertus said: March 14th, 2006 at 16:15
How Long Does WordPress Take To Set Up?
In my home directory, do
wget http://wordpress.org/latest.tar.gzwhich downloads the latest WordPress tarball. I know it unpacks into a subdirectory which is fine - I’ll change it afterwards. I have to do this in my directory though, as that is where the webserver looks.cd public_htmlthentar zxvf ../latest.tar.gzand WordPress is unpacked. I want the URL to behttp://localhost/~paul/blog/, somv wordpress blog.Configure for my local MySQL. Login to set SQL server. There’s already a database called . Maybe there’s already a blog on here! No matter, I just want one of my own. Let WordPress do all the work.
Browse to http://localhost/~paul/blog/
I click through the link to be met with
No problem. I’ll set the directory to be writable.
chmod ...hang on. I don’t want to make the directory writable! Other local users could just drop files into my blog directory at will. I’ll manually configure by renaming the sample.cd blogthenmv wp-config-sample.php wp-config.php.Browse to http://localhost/~paul/blog/ again.
With instructions on how to fix it manually. Do so. Database
blog, userpaul, password andlocalhostremains the server. Set the table prefix towp_test_, save and try again.Indeed! Click through to the first step introduction page, then click through to the first step, which is to identify the blog. Title is and my e-mail address is
paul@localhost. Submit to second step.I BEG YOUR PARDON?!
paul@localhostis not just a perfectly valid e-mail address, it is the only e-mail address at which I can be reached on this computer! Dear me. Perhaps it needs a dot. Trypaul@localhost.localdomain, which should also work. No, doesn’t seem to like that either. OK, an internet e-mail address. .Wayhey! Underneath are the admin login details, repeated twice. I assume an email with similar details has just been sent to the totally invalid e-mail address it just accepted, rather than the perfectly valid one it rejected.
Login and change the password. Done. I cannot give it my valid local email address. I’ll have to stayDonald Duck . Or is that Mickey Mouse ?
ReplyLibertus said: March 14th, 2006 at 16:41
How Long Does Outreach Take To Set Up?
cp ~/src/libertus/wp-content/plugins/outreach.php ~/public_html/blog/wp-content/plugins/Browse to http://localhost/~paul/blog/wp-admin/plugins.php
Activate plugin .
Done.
Later, after having executed the above command several times, I made the far more clever symbolic link,
Replyln -s ~/src/libertus/wp-content/plugins/outreach.php ~/public_html/blog/wp-content/plugins/outreach.phpLibertus said: March 14th, 2006 at 16:43
Test Outreach Changes
View the sample post. Any breakage? No.
Edit the sample comment to contain a <is:get> tag. Cite . Does it work?
No, the is in the way. Disable it in my options and edit again.
View the post and click from the outreach control panel. Unfortunately, the text replacement doesn’t happen. Oh well. Investigate.
Since the control panel is there, outreach is being applied. This means that Outreach is compatible with WordPress 2.0.2, such joy! Now, why didn’t the text replace? I need to enable debug output from the Outreach plugin to check.
Aha! The tag was voted down, because, of course, the outreach level is
none! Set the tag level to and try again. Tsk! Still two Noes and no Ayes. Tough crowd. I may have to change the voting rules to always allowgetthrough.Commentary from the current outreach code:
I could change the rules, but I’m being silly. Trying to get the tag to replace itself with the current outreach level isn’t going to work, and isn’t necessary. What about instead?
Success! http://localhost/~paul/blog/?p=1&debug=yes responds with
ReplyLibertus said: March 14th, 2006 at 17:16
Other Pending Outreach Changes
While I’m here.
<is:corp>with an implementation synonymous withplaceandperson, that is, link to a Google search on the citation. Also<is:search>which links to a Google standard search on the citation, something I’ve been wanting to express for a while.Also, not forgetting to slide the citation into the link title if no explicit
titleattribute is given. Perhaps the tag name as a prefix would help. I don’t know so I’ll just try it and see.Document The New Tags
Implement The New Tags
Add the tag types to the global list.
Add implementations to render loop. goes in with , and .
<is:search>is coded thusly:Decide to forget about automatic title sliding. Too dangerous. A existence of a title should be a manual thing, chosen carefully by the author, not decided by a computer.
Test The New Tags
Do all three at once, like a kind of search form, except that wait a minute!. What happens if I do <is:corp><is:get cite=’corp’ /></is:corp>? Think about it.
There is a moment of silence. Well, not quite silence. There is the sound of a brain furiously trying not to collapse in on itself.
No, that won’t work. The corp citation will be empty as all the tags are analysed in a batch up-front, then individually rendered. <is:get> should not be an outreach tag, but it should be something. With pre-Outreach substitution, it could be very useful.
However, some tags to test. Change the sample comment yet again.
renders nothing as I haven’t copied over the updated plug-in! Oops. Do so and retry.
Your debug level is unknown.UK Parliament is a corporate body.more than one way to skin a cat .
The
There is
Happy, happy, joy, joy, joy !
ReplyLibertus said: March 14th, 2006 at 17:48
Upload The New Plug-in
Quickly survey the damage in CVS. 9 differences, all accounted for. Commit and run a quick test on the laptop. It runs so upload it, already!
ReplyLibertus said: March 14th, 2006 at 17:59
Now, The Reason For All This OutreachJiggery-pokery
A quick touch-up to the comments above and the computer speaks.
Unfortunately, an interesting has arisen, along with a potential solution in the form of an old piece of commentary. Specifically, .
The <is:get> tags are being rendered into the values of the hidden <form> elements, which is totally screwing things up. A decision I made right up-front with Outreach was not to remove the outreach tags as they were always going to be part of the content. <is:get> is not an outreach tag, or is it? If a tag can be specified as
level='none'and vote itself down, can that level instead indicate removal of the tag from the final content?Have a think about it. Specifying outreach level of for a tag automatically removes the tag itself from the output, after having done its work? Would that work for <is:get>?
No. If a tag is voted down, it doesn’t get rendered. <is:get> tags should not be rendered into the final output, further evidence that they don’t belong in Outreach. So, tactical fix. As the tag already has special rendering, make it evenspecialer .
Mental note: I’m getting pissed with dictionary.com. Make the final Outreach 0.3 link to a Google search, which is fantastic.
Local testing of <is:get> tag removal successful. Switch to Google defintions for <is:word> made, review and upload the changed plugin.
The final implementation of <is:get> was:
ReplyLibertus said: March 15th, 2006 at 14:42
I Need Your Mother’s Name
I have you as born no-birth no-place.
To draw a fan chart, I need the same for your mother and father.
I need to know your mother’s name.
I Have Your Mother’s Name
I want to know when your mother was born.
I Have Your Mother’s Birth
I want to where your mother was born.
I Have Your Mother Now!
I have you as born no-birth no-place.
I now have your mother as born no-birth no-place.
To draw your fan chart, I need the same for your father.
I need to know your father’s name.
I Have Your Father’s Name
I want to know when your father was born.
I Have Your Father’s Birth
I want to know where your father was born.
I Have You All Now!
I have you as born no-birth no-place.
ReplyI have your mother as born no-birth no-place.
I now have your father as born no-birth no-place.
Libertus said: March 15th, 2006 at 17:13
I Have Your Fan Chart
I hope no-one is getting wierded out by this! Start over.
ReplyLibertus said: March 15th, 2006 at 17:20
Drawing A Picture
More delicious design code! To a programmer, design code is like a bit ofPlasticine quickly picked up, moulded into a shape, moulded a little more, then put down. The shape in which the clay is put down, and the force with which it impacts, and any utterances issued during the whole drama, are determining signs as to the likelihood of the project being feasible. Essentially, you’re looking for a grin.
Now, it may not be obvious to you yet, dear reader, but there is an image on the comment above. An image of a fan chart, your personal fan chart, should you so desire.
It is 640 pixels across and 480 pixels down. If you followed the program, the image has text on it. Or it will have, once I’ve figured out how to do that.
Right now. It’s just not there, is it?
Using PHP To Generate Images On-the-fly
I’ve done on-the-fly, or over-the-wire, image generation before. It’s pretty simple, so long as caching is considered from the beginning. Images consume a lot of bandwidth compared to text, even little ones, so the last thing a website needs is to serve several thousand requests for the same image.
Caching is natural for the fan chart image. Because all the parameters are supplied on the URL, there is a one-to-one relationship between URLs and different images. The client-side cache takes care of multiple requests for the same image from a single client. The server-side cache (should one exist) takes care of multiple clients requesting the same image.
So the only issue is creating an in-memory image, drawing onto it according to the supplied parameters, then streaming out the image as a correctly formed HTTP response. Almost too easy, once you know the library names.
I Need A Blank Sheet Of Paper
There is a moment of silent contemplation.
Ah!PHP Image Functions . So I at least need the GD library, locally and on the blog server. I’m sure they’re both there, but just check.
Oh poo! It’s easier to just putFreetype support, which sounds like good stuff for text on images.
<?php phpinfo(); ?>into a file calledphpinfo.php, upload it and browse. Good, the gd library is available withLocally, I cannot seemess about with my PHP configuration , probably to enable the appropriate extension.
gd, so I need toLet There Be A Blank Sheet Of Paper
As
root, browse/etclooking for/etc/php5in which there is a choice;apache2orcli. I want graphics for both, but mostly through the web, so go forapache2and find/etc/php5/apache2/php.ini. I know I want to enable an extension. Scan the file.Mental note: Remember to show the above lines to Responsibility. It’s the default.
Here’s what I’m after…
Specifically…
Remove the semicolon from in front of the
gdextension line, restart Apache, browse to see if I have it.Ah, no. Not convinced Apache restarted. Do it the hard way, as
root,/etc/init.d/apache2 restart.Still no
gdlibrary. Maybe it’s those other libraries. Double-check the config file, then check the Apache error logs for more details, and check for thegd.sofile in the appropriate place,/usr/lib/php5/20041030according to PHP. And sure enough, onlymysql.so. I need to getgd.sofrom somewhere.I runAdept , my package manager on KDE. I do a quick search on and find package
Replyphp5-gdwhich is not installed. Install it. To do this from the command line, I would have typedapt-get install php5-gd. In fact, I’ll do it with the command line.Libertus said: March 15th, 2006 at 19:19
Package Management Basics
Oh dear. I think the computer is fibbing to me again. My recent direct use of Apache kinda implies that the extra modules about to be installed are in fact already installed.
Installing something that is already installed is known as “upgrading”. The package manager does go on to mention this. I will be installing 1 new package and upgrading 4 currently installed packages, directly related to the one I am about to install. Neat.
Answer Yes, the default, by pressing
Enter, and off it goes…Security updates, eh? Good stuff. Always good to know the people you depend on for your computing services take security seriously enough to automatically upgrade your system as necessary, with your knowledge, of course, otherwise it’s not secure.
Moments later, it is done. The packages are downloaded, upgraded, installed, the web-server restarted and I have my blank sheet of paper.
Finally. That took nearly half an hour! 9 packages not upgraded. Better look into them.
There is a moment of silence, while housekeeping is performed.
ReplyLibertus said: March 15th, 2006 at 19:30
How Do I Make A Blank Sheet Of Paper?
Now I can make a blank sheet of paper, how do I go about actually doing so? Now that thehow do I use it ?
gdlibrary is installed,Scan… scan… ah! Examples!
Perfect. Not quite. The example manipulates an existing image file, which I don’t have, but clearly illustrates how the library can be used.Scan more. Look for functions of interest. Note imageantialias, imagearc, imagecreate, imagecreatetruecolor, imagedestroy, imageellipse, imagefill…, imagegif, various font-related functions, imagestring and imagettftext. Nothing exlicitly for drawing text on a curve, but I wasn’t expecting that.
I guess I can begin by creating an image, of the desired size, and output it as a GIF, using the example code as a guide.
Start With A Blank Piece Of Code
I know it looks scary, but it isn’t. This is how all PHP programs start, in the beginning. I know I need to create an image, deliver it as a GIF, then destroy the image. I already noted the likely functions to perform those tasks.
How doesthe PHP imagecreate function work? I don’t want false colour!
How doesthe PHP imagecreatetruecolor function work?
Eagle Eyes
Now, I hate to repeat myself, but… How doesthe PHP imagecreate function work? I need GIF.
Create The Image, Know Its Identity
I need a blank image, 640 pixels across, 480 pixels down.
Deliver The Image As A GIF
How does thethe PHP imagegif function work?
So, just call it with the image identifier, omitting the filename delivers directly to the HTTP datastream, which the browser assumes is text, so needs to be told this is a GIF. The content type needs to be declared beforehand by emitting the appropriate HTTP header. Especially since the URL is going to end with
.php, about which no assumptions can be made!That should deliver the blank image. I’m not ready to run this yet though. It is polite to destroy what you create once you’re done with it. Especially if you’re not absolutely certain someone else is going to clean up for you. Taking control if it is there is usually a good idea. As is being explict about resource management.
Thanks. I’m All Done.
How does thethe PHP imagedestroy function work?
Simple. My completed program to creata a blank image, deliver it as a GIF, then destroy the image, is…
There’s no reason not to run that, so package it into file
Replyfan-chart.phpand upload for testing. If it works, an image should appear in this comment.Libertus said: March 15th, 2006 at 20:42
What’s The Difference Between A Blank Image And No Image?
Not