ChaniBlog











{July 3, 2008}   where does the time go?

yesterday I talked about community stuff, washed dishes, bought food, got a little distracted by blogs, recompiled all of kde on my desktop, fixed a few little bugs in my project, puzzled over a weird crash, caught up on email, made dinner with pete, and did some other stuff I’ve forgotten.

today I discussed plans for my august vacation, did the weeding, washed dishes, had breakfast, started laundry, went to the chiropractor, then bought cleaning supplies and a curtain rod for the house, spent a while on the phone with fido ’cause they were overcharging me again, tidied up a little, did more dishes, threw out some bad food, made myself a sandwich, recompiled all of kde on my laptop, and it’s 5:30 now so pretty soon I’ll have to start on dinner again.

I’m supposed to be getting code done… but I still need to clean the bathroom, clean the fridge, finish the laundry, try and fix the broken drawer in the kitchen, buy more plane tickets for my vacation, and maybe at some point exercise or practice guitar. :/ there just aren’t enough hours in a day, and my head feels like it’s going to pop off even though I have all this stuff written down. :P



{April 7, 2008}   interwebs!!1!

so I was kinda without interwebs for a while there. last week pete and his friends unexpectedly got a house that was available immediately - they were planning to move for may. since pete’s landlord was being bitchy, I helped him move last week. the good: we have a 4-bedroom house all to ourselves until his friends get around to moving in. the bad: there’s no unsecured wireless in the area.

I was thinking of asking the neighbours if they’d be willing to share, but never got around to it - and today was the day the cable guy came, so now I have interwebs again, yay. :) life’s been quite busy, so in a way it was kinda nice to not have the internet distracting me. it was incredibly inconvenient at times, though - couldn’t look up bus schedules, couldn’t research things, etc… there are so many little things we take for granted.

so, yeah, busyness. mostly of the small-but-necessary variety. buying things, moving things, fixing things, making a vague attempt at househunting without craigslist access. I’ll be staying here for april, then actually getting a place of my own in may - or at least that’s the plan. between lack of interwebs and being about to head off to italy, there hasn’t been much time to look for a place, so… we’ll see how it goes.

apparently I forgot to mention this on my blog: I’m going to italy for a few days for a plasma sprint. lots of hacking, very little tourism. it’ll be awesome. :) while we’re on the subject, I’ll also be at akademy in august.

now I need to go panic about all the stuff I need to get done online. soc research to do (I haven’t even blogged about my application!!), email to catch up on, plasma stuff I never did…

plasma was a little frustrating last week, actually. I had just started on a ui for multiple desktop containments when I had to put aside that work to write a soc application… then I’d almost cleared everything away, and just had a bit of other code to do before returning to it… then I just had a few RL chores to get out of the way… somehow every morning there was another day’s worth of things in my way, and then I was offline and just as busy. since I spent most of today busywaiting for the cable guy (I’ve read most of the last harry potter book), I doubt I’ll get to it tonight… in fact, it may have to wait until I arrive in italy. there’s just so much to do!

well, at least I’m busy doing stuff I actually want to do. :) being back in canada continues to be awesome. hopefully after I get back from italy I’ll have time to go track down the friends that haven’t dragged me out or run into me at parties. and make some new friends. and… argh, there’s so much to do!! :)



{March 4, 2008}   shanghai

[another long post; wrote it last night]

whew. what a day!
I’d forgotten about the lack of central heating in the south. ohhh the cold. I do not like how cold I am. I do not like it, sam-I-am.

I meant to get up early and wander around, but of course that never happens; by the time I’d convinced myself to wake up and leave the relative almost-warmth of bed, then showered and checked email, it was already lunchtime. I wandered out and gawked at things for a while, and evenutally found myself in some underground shopping area - the standard chinese tourist shops with bags, watches, jewellery and other knicknacks.
I looked around for a while, and remembered that my mum wants another watch (I don’t know how she does it but no watch lasts even a year without breaking in some way or another). I was so surprised to find some watches that actually looked good, I bought two of them. at the price the girl was asking; 30 kuai each. I’m sure they can’t have been worth more than ten; in fact, on my way out I caught sight of some similar watches with marked prices - 28 kuai. yep, I’m a sucker. (at least I had my wits about me when I was buying clothing in beijing).

I wandered along the street a bit more, and some chinese guy started chatting with me… he had a standard phishing story about being only 15 years old, running away from home and looking for work - all bullshit I’m sure, but I bought him a cheap lunch anyways ’cause he was fun to talk to.

not long after getting rid of him, two girls came up - their story was that they were students doing an art exhibition. :) I let them pull me along to go see their ‘art’ - the standard scroll paintings that everyone swears they made themselves. they did have some silk paintings I hadn’t seen before, though, and those were pretty. I ended up buying one ofthem for 55 kuai - a ridiculous price I’m sure, but they were asking 50 for the cheapest paper scrolls that I know areworth under 10 kuai, and I made the mistake of saying I’d pay 50 for the nice silk painting not the little paper one… luckily 55 was all I had in my wallet at the time. :) they were fun to chat with, though. everyone’s been fascinated by my water thingummy today - I can never remember what to call those plastic water-sacks with the tube, but I dunno why everyone doesn’t buy them. they really are convenient.

After that I wandered until I reached the small strips of flowers and grass that were marked as a big green area on my map :P I was just turning around to wander back when some people saw me juggling and were quite interested… turns out they were tourists from some other part of china, around my age. it was a while before I convinced myself they really were just tourists and not part of some elaborate plot to part me from more of my money. ;) they were about to go buy tickets for some acrobatics show, and I decided to tag along. unfortunately the tickets cost a bit more than what I hadon me (minus the money tagged as ‘needed for survival’) and there was a charge for using plastic, so one of the guys paid for all four tickets and we headed to an ATM to pay him back. That was kinda.. very stupid. I’d already had to go to three ATMs in beijing to get my card to work. this time we went to… I think four ATMs, and then we went into a bank, where there was a minimum withdrawal of 1000 plus a 30 kuai service fee… which didn’t matter, because there was some kind of error again. I even tried my visa in an ATM, guessing at the pin # (I remember 3 of the 4 digits). we went back to the ticket-selling place and got them to try charging the ticket to either of my cards… while they were fiddling I realised the tickets were nonrefundable, and started to stress out. strange thing was, when they tried my debit card they never asked for my pin and said that the machine said there wasn’t enough money, so they must’ve been outright doing something wrong htere… anyways, they said there was an atm across the street that would surely work - I didn’t believe that, but we went anyways… and it actually worked. I have no fucking clue why, but I finally managed to get money, thank god.

and then one of the guys realised he’d left his bag back at the ticket office. doh. :) he ran back to get it and I headed off to the hostel.

I have a feeling that either my bank is having network issues, or my cards themselves are messed up, because that was pretty fucked up. never again will I buy something with someone else’s money. :P

anyways, I had just enough time to walk back to the hostel, get some food and head to the acrobatics show. I took the subway.. oh god. shanghai subways are madness. utter madness. also, the street maps down there don’t always have north pointing up… anyways, I survived, and even arrived a bit early. no sign of my new friends, though. :/ I sent them an sms and they said they were on their way, but I’m not sure if they ever made it. how odd. in any case, the performance was awesome :) lots of flips and guys standing on shoulders and jumping from one pole to another and swinging around, and girls doing weird ballet-like things, and even motorcycles in a ball… definately worth the money. :)

I’m gonna go collapse now. I have to head back to hangzhou tomorrow - I still can’t quite get my head around the fact that I’m really leaving china. :)



{March 3, 2008}   xi’an and beijing

[warning: big long rambling post]

I don’t quite remember what my last blog post covered - I’m writing this offline. I think the last one was before nornagon arrived - the two of us did some touristy stuff in beijing, then went to xi’an for a couple of days, then had to hurry back to beijing so he could fly home. :( we didn’t have time to see the Great Wall, unfortunately - someday we’ll have to come back, ’cause there really wasn’t enough time.

xi’an was pretty nice - it’s a shame we had less than two days there. the hostel room was like a frigging hotel - actually, it looked like they really were sharing hte building with a hotel :) hehe. we ended up in a double room with ensuite (although I think we actually booked something a little cheaper) and it came with toothbrushes, shampoo, even towels! :) it’s a good thing it did, ’cause I used my own towel to mop up spilt tea.
the first day in xi’an we decided to just relax, enjoy the nice hostel room, hack a bit… then in the afternoon we went to buy train tickets for hte next day - there’s no such thing as return tickets in china, it seems. :/ the person at the regular ticket booth just kept repeating ‘没有’ - she didn’t have any. so we went back to the hostel and paid them 45 kuai commission to get tickets for us. after that I was stressed, worrying about whether they’d actually be able to get us tickets… I shouldn’t have worried, really, since that doesn’t change anything, and we did get our tickets after all. :)
in the evening we went out to the ‘muslim quarter’ - a couple of streets that were fairly touristy, selling lots of stuff, mostly food… we ate some pineapple rice cake thing that was yummy, then had dinner at an interesting restaurant - there was a big hot pot in the middle of the table, and all sorts of food on skewers along the wall. each skewer is the same price, so you gather up a trayful, start putting them in your pot to cook them, and at the end they count up the skewers for your bill… I really liked the peanutty sauce we got with it. yummy yummy food. :) I bought some snacks on the way back, too.
back at the hostel, we remembered they’d given us tickets for a free beer each - turns out it was a free chinese-size beer each :) so we drank and talked for the rest of the night.

in the morning we packed up and headed off for the standard teracotta warriors tour. one complication - there was no power or hot water in the morning. we’d missed the notice about construction somehow… good thing we’d showered before bed anyways.
the tour wasn’t too bad - they didn’t hurry us too much, and we stopped for lunch at an okay restaurant… of course it was only *after* we ate that they told us the food wasn’t included in the tour price and we had to pay an extra 40 kuai each. :P we weren’t happy about that, but since it wasn’t an unreasonable price for a tourist area we just grumbled a little.
the tour ended a bit earlier than expected, so we had a bit of free time. since no power at the hostel meant no internet, we went off in search of a starbucks - and found one, around the right side of the mall. :) once again we got a bit distracted hacking, then had to hurry to get food before it was time to leave. that evening we found a lovely little restaurant nearby - standard good-quality chinese food at chinese prices. just across the street from the starbucks, it was the second restaurant; the guy came out offering an english menu, so we went in (I can handle chinese menus now, but nornagon has only studied japanese).
on the train back to beijing, we wanted to watch a movie - but were sharing the cabin with two other people, and didn’t want to disturb them. so, we decided to splice two pairs of headphones together. :) we had one spare pair of cheap headphones, so we cut it open. unfortunately, the signal wire inside was insulated, and so fine that scraping off the insulation often broke it. :/ once we got some bare wire, trying to actually do anything with it broke it, so eventually we gave up and just shared one pair of headphones. ah well, at least it was fun to try :)

I was kinda having trouble enjoying myself in xi’an ’cause I’d caught a cough & cold, so I decided to rest for a couple of days back in beijing. that quickly turned into four days of hacking and catching up on email. oops :) it was nice to relax, though. I went out one evening for dinner with BLUG, which was fun, although all the talking and smoke in the air really didn’t help the cough :/
now I’m in shanghai… despite dozing off on the train right after it started (or maybe because of that) I didn’t sleep very well. I was slow in getting off the train, and I think I almost didn’t get off :/ the doors were closed and then some employee jumped when she saw me and opened the nearest door to let me off. then Ihad to find my way out, sincethere was no horde of people to follow. at first I tried to go out the entrance by mistake, but eventually I was pointed in the right direction. :)·
once I was off the train platform, everything was straightforward. I managed to take the subway and walk to the hostel this time, instead of relying on a taxi. oh god was it ever crowded on shanghai subway - they had employees at one point standing by hte doors to make sure people were let off beore the crowds pushed on. they didn’t seem to have that at the station I got off at - I had to kinda push backwards and sideways until I made it to the door, ’cause there was no room to turn in.
somehow I survived, though, and got out into the.. relatively clean shanghai air. it’s kinda disturbing to think of shanghai air as clean. :/
not long after arriving at the hostel, I pulled out my computer and returned to this blog entry (I started it on the train). they still have no wireless here, but they do have power outlets by the beds. pretty soon I was fast asleep - slept away the afternoon. I hope that doesn’t make it impossible to sleep tonight. I think I’ll get up now and go do something so that I don’t fall back asleep. :)



{February 3, 2008}   sleep is for the weak

not much time to blog recently. I’ve regained my motivation somehow - it’s in a bit of a fragile state, though. haven’t actually got much code done, too much other stuff. half the week was spent doing stupid RL stuff, plus I ran into a guy moving in here and was helping him get internet n’stuff… oh, but that’s not what I was talking about. I mean on my computer there’s too much other stuff.

lots of small issues to get in my way - a few days ago I compiled a new alsa-lib and got amazing wonderful sound, better than I’ve ever had. mixing worked, just worked. I had amarok from kde3 running as my kde3 user in my kde4 user’s session, and phonon still played kde4 sound effects at the same time as the music. skype works again too - so amazingly well that I may as well have been using a real phone. lucky that I discovered this on my mum’s bday - got to chat with her for a while :) but then yesterday the sound just stopped, and I had to reboot to get it back, so things are not perfect.

there’s other issues to work out too, which I would have reported if bugzilla didn’t fall over (it came back today but now I’ve no time). there’s plasma emails to deal with, people on irc asking questions, ideas to write down, techbase stuff to work on… I’m trying not to spend too much time on irc and email, but it’s hard. I’m generally either distracted incredibly easily or totally lost in my code. I was up ’till 6am last night because I got the urge to write some stuff down at 3am and just kept wanting to do one more thing. :) I’m going to put down the computer after this blog post, really.

sleep deprivation is bad in that it makes me act kinda drunk, but good in that it makes it so much easier to do certain things that I just normally hate doing. like reporting bugs. anyways, none of that tonight.

I don’t really remember today - another downside of not sleeping normally. but it seems I finally committed that patch for dragging applets to the toolbar, and I *think* kwallet has a bug :( bugs that only show up on login are a real PITA to test when you’ve only got one computer and your graphics driver dislikes running more than one X.

I spent most of this evening watching that video of aaron’s presentation/tutorial at linux.conf.au :) it was quite inspiring - I had to keep pausing it to write notes, and I think I had an important bit of inspiration about the twitter data engine. it was pretty amusing too - plasma is all about the c(l)ocks, eh? ;) rofl.

now I just have to actually make time to implement some of the things I thought of. having paused the video so often, it took me a long time to finish watching it. past time to sleep now. hopefully tomorrow will be a coding day.



{January 11, 2008}   china, computers, and other randomness

it seems I haven’t been writing about china much lately. funny that - my nonkde posts aren’t on planetkde any more, and suddenly there are hardly any of them anyways. maybe because I don’t expect anyone to read them now.

anyways, my brain is going a mile a minute tonight for no apparent reason, so I need to braindump again. normally I’d be quite happy about this, but I was just starting to get into study mode and now I fear that this will derail that by switching me into creative mode. I want to write about plasma, I want to figure out what I’m gonna be working on, I wanna fix bugs, I wanna play go - but no, I should study, because I’m horribly behind and chinese requires actual studying to pass.

I’ve been spending far too much time alone in my room lately. it’s not good - but now it’s exam season, so everyone else is busy too, so it’s a bit late to deal with that. just gotta hold on to some form of sanity until exams are over :) although when they’re done I might want to dive back into plasma anyways, which reduces the socialization time… on the other hand, I might not, and then I’d be sad about not wanting to code when there’s so much to be done.

sometimes it seems like I have a social life here, sometimes it doesn’t. there are a couple of chinese comp sci people who were assigned to me and pete back in summer, and I enjoy hanging out with them, but they’re often busy with school and of course they’re way out at zijingang. I still haven’t got around to making them teach me to play mahjong - damn, I’ve forgotten the proper characters for it too. pronounced something like ma jiang, but of course I’ve forgotten the tones…

anyways, there’s also a 2nd cohort ddp guy I hang out with sometimes (he introduced me to the restaurant that puts potatoes on its pizzas - yum!) and there’s a german girl here at my campus (although our taste in food is almost completely different, so we can rarely agree on somewhere to eat) and just before new years I met some fun people at another campus who I haven’t talked to since their awesome new years party… it was really nice to be at a good party; hadn’t actually enjoyed one in china before that. can’t remember if I blogged about it. they had all sorts of food, including potato salad, and they had music and dancing, and even a few fireworks that supposedly were quite hard to get :)

maybe I shouldn’t be swatting away rsibreak. not good for my wrists, but I don’t wanna stop typing :P

oh god, am I ever sick of the konqueror wordpress bugs. I had to go back to kde3’s konq because of the proxy breakage (hey Andreas, how’s that going? never got a reply to my email) and it seems I’ve still got 3.5.7 here; I wanna get off feisty, but gutsy has too many breakages that would affect me, and I’m not in the mood to try new distros right now. when I get home I’m definitely gonna use my desktop system for testing out some other distros; I’ve had quite enough of this. I just hope I can actually find something that works better for me than kubuntu feisty.

but enough about my poor dying laptop. um. where was I? I still have too much in my head. a lot of it is about plasma. looks like people are going to be actually doing some planning soon, so I wanna do some too. however, I’m reluctant to commit to anything. I’ve just been bouncing around too randomly. maybe committing to something would help stop that now actually, since I soon won’t have to worry about school. march - august will be 6 fun months of mostly programming, if all goes well. :) …I still worry about the ‘if’ part, though. I have these fears that one of the universities is going to screw me over somehow. they’re already saying they’ll still charge me for the spring semester than I’m in the process of withdrawing from.

there’s gonna be a hell of a lot for me to do soon. that’s good and bad, I suppose. mostly good. I need to plan out where I’m going to travel, organize some kde materials in case these crazy chinese actually really *do* expect me to speak about it in beijing, book a flight back to canada, look into housing… also have to do some maintenance on the poor old laptop so that it stays usable until I get home, and track down a really annoying elusive bug… oh yeah, and I was kinda planning to do coding and socializing once exams are over :P

when I get back to canada I’ll be busy too. I’ll have to do apartment-hunting for real (I’m hoping to get into a really nice co-op in new west, but they seem unlikely to have space by then, so I’ll probably have to find other co-ops and see if they have fun people). I’ll have to revive my social life (yay, one thing that’s guaranteed to be fun). I won’t have to get a new phone, yay, because robin uncancelled my old one. although I might anyways, when other things are dealt with. I’ll have to write a soc proposal. I’ll have to figure out travel plans for akademy. I’ll probably have to do a bunch of tech support for my mum. I’ll have to get back in shape, because with the price of bus fares these days i’ll probably be riding my bike a lot - not having a upass until september will suck. :( and I’m also hoping to do lots of reading, and learn more about qt, and permaculture stuff (I really, really wanna grow some raspberries), and get better at playing go and juggling and a bazillion other things. :) no idea how I’ll fit all that in, but I guess I’ll have to figure that out later. and then of course there’s still plasma. and certain people that I’ll need to spent a lot of time with. :)

whee, so many exciting things coming up. I just hope I can keep the enthusiasm and not sink back into apathy.

lately I’ve taken to practicing juggling while I wait for food. I can’t do it everywhere, because some places have too much food nearby or don’t seem clean enough, but it often seems to impress the staff :) at one place it turned out that one of the guys could juggle, too. I’ve also been trying to practice playing my harmonica a bit more, although I really need to find a c# one so that I’m not stuck in the key of C :P

aand my train of thought just got derailed by someone on jabber adding me and trying to talk to me in a language I don’t understand. huh. second time that’s happened to me recently. they start with english, but then go off into something else, and I never know who they are or how they found me.

mmm, nutella. I brought back a second jar of nutella in september, because real chocolate here is rare and the same price as in canada (snickers bars use the fake waxy stuff). originally I was saving it for spring semester, but since I’m now leaving soon, I’ve suddenly got this big jar that needs eating! :)

my mind appears to be slowing down a bit, now. bit of a shame, but maybe it means I can get some food and study a bit. or maybe I’ll return to irc procrastination - I’ve been doing far too much of that. :)

the first sentence of this paragraph seems to have vanished. huh. it was something about plasma planning, I think. I already organized my plasma basket yesterday (free layout is fun at first but gets so messy!). I think I need to sort out which ideas and bugs in there are actually being worked on by others, which I’d like to work on, and which I actually expect to work on. and get the ones I expect to work on onto techbase, along with a clearer version of my plasma braindump. maybe I can make up some private pages and mess around on those. I wish I could be at the release event… but I’m looking forward to akademy already :)



{January 5, 2008}   what I’ve learnt about plasma

warning: the majority of this post is basically just a braindump of random data. it may or may not make any sense. if it looks too long, then just don’t read it.
[this post was written over several weeks. if it sounds a little disjointed, that's why.]

I feel like I’ve been learning a lot about how plasma works recently. it’s like some tipping point has been reached, and suddenly I *get it*. I see code that’s kinda ok and working, but really doesn’t look Right - and find out that my feelings about the code are correct.

in the interests of not forgetting what I’ve learnt, and helping other people to learn it with less pain, I’m gonna just kinda braindump here. some of this is random trivia, some of it is really important concepts that affect whether your applet is a buggy mess or a nice happy simple thing.

this information really should get onto techbase or something asap, but I feel like I need to have it written up more nicely before I put it there, and if I wait until I can write it up nicely I’ll have forgotten half the stuff; I need somewhere I can do a few drafts first.

sizing: when you’re an applet doing your own stuff, you want to use functions with Content in them, so that you don’t have the borders added in. when you’re acting on another applet, you use the ones without, so that the border is taken into account. other than that, I’m really quite confused. I feel like we really shouldn’t need two functions for every type of sizing. but I don’t have time to investigate that right now.
If you need to be notified when your plasmoid is resized, then implement constraintsUpdated() and check for a sizeconstraint. your new size is given by contentSize().
avoid reimplementing functions that return a size. only override contentSizeHint if you really need to (eg. controlling the aspect ratio).
if you know you’ll always need a certain amount of space, then setMinimumContentSize

when creating an applet, do as little as possible in the constructor. set a default size, and preferably no more. your ui creation, config reading, etc. should all go in init() instead. don’t read your size from the config, it’s done for you.
if your applet is useless without some configuration, then there’s a special thing you should set, but I forget what it is; I should do this for twitter at some point.
however… layouts may not like not being in the constructor. can someone explain how these two bits of information fit together?

don’t sync the config; that’s plasma’s responsibility. you can, however, emit configNeedsSaving().

there’s stuff to be done when accepting mouseclicks so that the event doesn’t get completely swallowed all the time - but I’ve forgotten the details and just can’t find the information any more.

setVisibility() does the same thing as show() and hide() - so don’t use both at once :P

if your function name starts with “got”, or you’re having trouble commenting the function in the header, chances are your design is suboptimal.

if your applet gets data regularly, don’t use a qtimer to poll the data engine. have the data engine alert you when it’s got stuff, and set an update interval when you connect to the source. reducing the number of timers makes laptops happy. :)
there’s no need to worry about connecting to the same source twice, it won’t hurt.
if you use Plasma::AlignToMinute, you won’t get any updates until the minute rolls around - if your first update was a fake empty one and the actual data was downloaded 5 seconds later, you’ll have to wait another 55 seconds for it.

if you were trying to work on a dataengine in the past, and wondering why the update interval wasn’t always updating - it was probably the timing bug that I just fixed, so you can go revisit that code now :)

remember that if the dataengine creates a source, it hangs around until it’s explicitly killed off, but if an applet requests a source it only stays as long as something’s connected to it.

if you really really want to send data from an applet to an engine, the current awful hack is to abuse Q_PROPERTY… but please don’t. hopefully we’ll have guidelines on a non-awful way to deal with this for 4.1.

I think I know enough about dataengines that i could write something on how to use them, but figuring out what to say is hard.

The general idea of the dataengine is that it provides data in a nice, easy-to-use way, so that writing applets is easier. if you have 5 different clocks on your desktop, they’re not all polling for the time individually; they just connect to the time dataengine, tell it how often they want updates, and it’ll send them a regular signal with the data they need (in this case, the time). this means the clock applets don’t need to each have their own QTimer. reducing the number of timers is always a good thing.

if you just want to make use of an existing dataengine, it should be fairly straightforward. the documentation of DataEngine is good; read it. First off you’ll want to create a dataengine with Applet::dataEngine() - this goes through the engine manager, which makes sure there’s only one of each engine running, and kills it off when nobody’s using it any more.
you should probably check that you actually got a valid engine back before doing anything with it, just in case something funny happened.

once you’ve got your engine pointer, you can query the list of sources, connect to sources, etc - all the stuff mentioned in the DataEngine API. what the API doesn’t tell you, of course, is what kinds of sources are offered by the particular engine you want to use. the sources may not be created until you request them, the engine may expect source names to follow a certain format, etc… these things depend on the individual engine, and I don’t know whether there’s a standard way to document them yet. twitter has a big comment in the .h file right before the engine class; otoh, the time engine only has this mysterious comment: “This class evaluates the basic expressions given in the interface.” I had to read the source code to see that it has sources named by timezone.

so, what if you want to actually *write* an engine?
well, you’re going to have to provide data to the applets requesting those sources. there’s two general concepts here: data that can be returned immediately, and asynchronous data that has to be downloaded or something. the first is, of course, easier.
here, again, DataEngine docs come in handy.
updateSource is called whenever it’s time to update a source. pretty straightforward, right? so, this function is generally where you figure out what your data is, and setData() on the source. if you’re doing something asynchronous, you’ll want to set that in motion and return false (to show that you don’t really have anything useful yet).
sourceRequested generally wants to call updateSource(), to get the ball rolling on the new source. asynchronous engines don’t want to bilndly return the return value from updateSource(), because here returning false means that no source was created at all (something you might want if you’re expecting, say, a timezone, and the applet requests “mars”).
also, for asyncronous engines, when the data finally does come in you should just need to setData() (you remembered to keep track of what source it’s for, right?) and… well, that’s it. see? sending data to applets is easy :)

oh, and you might also want to give some thought to how long information is held in the engine. do you want to clear out all the old data from a source when you update it? or would you be better off just appending to it - and then making sure that it doesn’t grow too big, of course. :) sources created for an applet request are removed when nobody’s using them any more - but if your engine creates new sources on its own, should it remove them on its own eventually, or let them hang around until it’s deleted?

if you want data to go the other direction… well, best to wait until that’s been figured out properly.

strange, I was quite opposed to the thought of writing tutorials a week ago, but now that I have some paragraphs together it’s starting to look like a tutorial anyways.

detour! let’s talk about *using* plasma.
keyboard shortcuts: ctrl+f12 brings up the dashboard. this brings all the desktop widgets to the front. whether or not panels should also be raised hasn’t been decided afaik.
new thing in today’s plasma: thanks to Alex, holding ctrl while resizing allows you to change the aspect ratio. dunno how this actually works in practice since I haven’t svn upped yet.

I think that’s it for keyboard shortcuts. someone needs to add more someday. preferably in a sane manner, not just at random. :) apparently such information belongs in kdebase/workspace/doc - but I’m just dumping raw information right now, I’m not gonna write actual real docs unless someone tells me how :)

oh, and if you right-click on the little gap between two tasks in the taskbar, you get the standard applet contextmenu. this was supposed to also be added to the menu you get when you right-click any task, but I think that turned out to be harder than expected and isn’t done yet.

wow, it’s amazing how much I get done when I’m avoiding studying. :P



{April 19, 2007}   [no title]

wordpress and konq do not get along lately. grar. I reported the problem a while ago. oh well.

the last two weeks have been exam time. except that the chinese course kept going through the beginning of exams. during the easter weekend, when I wasn’t fiddling with voip I was studying for math. ended up doing fairly well on the exam, although I wish I could’ve got the bonus question :)
I’ve not been paying so much attention to chinese though. burnt out. a bit more concerned with doing the things needed to actually *get* to china, too. I have plane tickets, I have vaccinations - pretty much everything except insurance at this point. and still I seem to have a zillion things to do. my chinese final was on monday, and I was kinda hoping to get to relax after that… but I underestimated the number of things that need to be done when leaving the country for two years. I’ve got less than a week left, now… have to pack up, move out, sell things, see friends, etc, etc…

had a bit of an adventure the night before the final, though. :) I decided that I wasn’t going to accomplish much by trying to study, and I’d rather take a chance to see friends before leaving. so I went out to a fun bbq, and lost track of time. a bit after midnight I realised how late it was, and sunday the skytrain stops early… I checked the schedules, and was just too late to get back the way I came. it looked like I could catch the last skytrain from commercial drive, though, if I went really fast. so I hopped on my bike and rushed down there… and arrived at 12:34. the skytrain left at 12:30.
so then it was either wait 2 hours for the nightbus to start, or bike all the way home. I had lots of energy, so I decided to try biking :) I followed the bus route in case I got too tired - it also happened to be a nice straight line. discovered that my bike light is only for letting people see me, not for lighting up a dark road. :/ that was spooky. luckily I didn’t hit anything sharp. I did have to deal with a damaged pedal, though. my bike has straps on the pedals, and part of the plastic broke on one so that it didn’t hold my foot properly. I need to stick a roll of electrical tape or something in my backpack.
I got home right at 2:30, exhausted but happy :) it was fun, and a nice feeling to not be so dependent on the buses. as for the exam on monday, well, I survived. with lots of caffeine.



{April 19, 2007}   forgotten posts

seems I entered some stuff in my kontact journal and forgot to ever post it here. I think I’ll break this up into more than one post… err… if I can remember what else I was going to post about.

over the long weekend, I was messing with voip. I can’t remember what happened when any more, but initially I was expecting to be disappointed. lots of cheap sound cards have this nasty ‘feature’ of recording whatever they’re currently playing - so if you’re trying to have a conversation with someone, their voice gets picked up and echoed back to them. even if you’re wearing headphones. this makes voip unbearable. you really don’t understand how much it breaks your mind until you’ve experienced it.
so, I was happily amazed when I found out my laptop does not have this problem. the sound… just… works. and the mic volume is great, even the builtin mic is usable. I installed skype, and once I got past the segfaults from it hating scim, and restarted it once because it only showed two of my contacts at first, the actually calling part worked fine. :)

so then I figured I’d push my luck by trying to get something non-skype working. I already had a SIP account with wengo from my failed attempts to make SIP work on the home comp, so I installed a handful of SIP proggies and got to testing. it didn’t take too many tries to get the right settings for logging in, and so long as I made sure to suspend artsd the sound worked, but I couldn’t make calls. when I tried the official client, sound wasn’t working at all. eventually I did get sound to work, but there was a lot of crashing, and it was way too late at night for me to be thinking straight. the end result was that the wengo client works fine when it’s not in the mood for constant crashes, while twinkle and kphone are nice and stable but can only call the echo service.
the people at wengo seem to have given up after I gave them logs of all three clients attempting calls. *sigh* guess it’ll be a long time before I can just click a button in kontact to call someone. but hey, at least my lovely little laptop is more than capable.

oh, and zander: I wanted to comment on your post about searching for a laptop, but kdedevelopers.org insists my password is wrong and won’t email me a new one or let me re-register.



{April 6, 2007}   oh yeah, I have a blog

[if this shows up on planetkde, it's not my fault! I asked for my blog settings to be changed but the guy in control seems to be away at the moment or something.]

I haven’t been as insanely busy as usual lately… just haven’t felt like blogging much. :)
stuff has happened - I got a bike, for one thing. have to relearn how to ride safely before going to china. sounds like the traffic there will be madness - and the relatively calm, sane traffic here scares me quite enough :P I only rode on sidewalks n’stuff as a kid, so I know almost nothing about riding on the road, but I’ve been learning. I’m even in a few seconds of the march 07 critical mass vid on youtube. :)

I’m quite possibly the second most disorganised pizza ambassador ever, though. with my evil schedule I haven’t seen much of the students outside my class, and haven’t been able to attend any CSSS meetings. makes it kinda hard to buy pizza (or any food) for people. I tried to organise something with my classmates, but they were always too busy for free food, so I gave up on that. for the last csss meeting of the semester I delegated my pizza job to the president - yay jenn! so they got pizza, and the meeting took so long I was able to pop in after class and grab a slice for myself. :)
then on thursday, the last day of classes for everyone except my crazy chinese class, I found myself exhausted and starving and sitting around in hte common room too tired to bother going home. then realised that there were people there, and I should spend some of the pizza money while I had the chance… well, I was halfway through dialing the number of our usual pizza place when my phone died completely. then someone told me that it wasn’t even open yet (although I’m not so sure that’s true). so I gave up on that and wandered over to cornerstone to see where I could get large amounts of food on short notice. ended up with two big plates of sushi :) yum. I just hope the guy taking photos remembers to send them to me before I forget who he was…

I think I still have some google money left, too. maybe I’ll buy some easter candy next and give it to whichever comp sci students are on campus during exam time.

I’m sure there’s more stuff that happened, but my memory just gets worse and worse.
19 days left until I leave the country, now. gosh. time’s going by so fast :) so much to do before I leave!



et cetera