Archive for the 'Summer of Code' Category

Summer of Code II: Code Harder

Hey look, I’m on Planet AbiSource. If you’re the type of person or poorly programed bot who clicks every link they see, you now have a slightly higher chance of endless recursion. Huzzah.

It’s been slow going recently; there were thunderstorms all last week. In between frantically unplugging every electronic device in the house and being bored listening to thunder and watching the lights flicker, I spent a lot of time using GDB looking for the source of a mysterious drawing glitch which turned out to be the margin of the first column drawing over all the other pages. Whoops. My debug-fu is still somewhat weak.

Here is le current running changelog for the past week or so, which is accompanied by rather meager source edits. (I hate it when that happens.)

  • Smooth scrolling is disabled with multiple pages due to jerkiness.
    • It also fixes an auto-page-tiling bug, which I didn’t actually know existed until I was seconds away from tweaking the line of code which corrected it. Convenient!
  • Multiple horizontal pages should only show in VIEW_PRINT
  • Margins now draw correctly, not over other pages. (I’m an idiot; took way, way too long to figure that out)
  • Made FL_DocLayout::getHeight() slightly easier to read; the output is identical.
  • Page height fixed. Again. No, seriously, it works this time. I think.

Stuff I need to fix:

  • Scrolling is really messed up when in single page mode; it’s all jerky and slow. I suppose I brought this upon myself by running all the multipage algorithms with “1″ as the number of horizontal pages, but I didn’t expect this huge of a slowdown. It popped up in my last SVN submission, so I should probably backtrack and see if there’s yet another obvious thing I missed.
  • Scrolling is funky. Stuff just isn’t being drawn consistanly when you scroll up or down. Figuring this out is a rather high priority right now.
  • The cursor jumps up a page when you use the up arrow key. IIRC what my mentor said, this is apparently being caused by a preexisting bug. The easy fix is to just duplicate the functionality of a particular function I’m calling. I don’t much like this solution, but it’ll work for now.
  • No text is drawn on the 3rd+ rows. It’s like this in all AbiWord builds, so while I’d like to fix it, I’m not going to sweat it too much if I don’t locate the cause before things end.
  • The pretty blue selection rectangle is not being shown on second+ row of pages, and on random letters on the first row.
  • Auto page tiling doesn’t update until _draw(…). This can be an issue as when the zoom is changed, the tiling doesn’t update.
  • Now that the page is approaching being drawn properly, the top ruler is starting to look tempting. I was overjoyed to discover that the left ruler requires no modification at all; I leave rulers turned off pretty much all the time. I wonder how much code is
  • Left to right tiling. I haven’t actually explicitly coded anything which sets this up (following the popular “get basic functionality first” philosophy), but it’s been in the back of my mind while I’ve been coding. I don’t anticipate having a really hard time with this
  • After that, interface stuff to actually use this feature. Then it’s over? Wow.

In conclusion, I have now drifted into Honolulu, lost all productivity, and should seriously consider sleeping. James out.

In which I draw a line on some screenshots

Nothing visible happened today. Oh, did did figure out why the text was “jumping” when one tries to edit after the initial draw. Lookit! The window on the right is my dev build, window on the left is 2.6.2. The selected text is whats initially drawn to the screen all pretty. The text underneath it, overlapping somewhat, is what is drawn when you edit.

Note my dev build lacks the upper gray area outside the page, and note the line I drew to compare the text height. Exactly the same! “All” I need to do to fix it is to find whatever it is I ripped out that draws the upper gray area.

I’m mostly writting this to myself so I remember where I am tomorrow. I suppose I could jot it on the slowly growing stack of scratch paper next to my laptop, but I’m making the (likely pompus) assumption that it might be interesting to someone. Or am I being even more egotistical by assuming that about my assumption? I’d never survive as a diplomat.

Edit: Oh, also, just in case you were wondering, in C++ when you run into a form like (a || b && c), the && is always evaluated first, even if it’s reversed like (a && b || c). Dispite what my handy refrence says. Look, just put parentheses to indicate order of operations with expressions like that. It gets rid of warnings and makes it slightly easier on the next person to go through your code. I saw a Repulsive expression of Unusual Size earlier today that I don’t even want to think about working on without a truth table, or linear algebra, or whatever. Good thing it’s not related to any of my code. ^_^

Well, technically it’s not Wednesday anymore…

…But I did eventually get that text fixed. Tada!

Err… Not quite sure why exactly the outline from page five is being drawn off the bottom of the screen down there. And the whole thing is still corrupted when you actually click on it. When you start editing, text is suddenly being drawn about a line lower than initially pictured; I’m probably returning a value one-off someplace. Yay

Progress!

So, this is what my Google Summer of Code MultiPage project looks like so far. Not (absolutely horribly) bad, eh? Well, as of roughly thirty seconds ago, it was a complete mess. Then I looked back and realized that I was passing the row number, not the page number to my function that calculated the width of previous pages in a row. Easy fix, looks much better. God is good!

You’ll note that pages five and six are being drawn too high (covering pages two and three). What you can’t see is how the blinking cursor line is flipping insane and un-synced from reality, how the pretty white page filling and drawing messes up when you type stuff, and how the whole thing locks up whenever you scroll. All in good time!

Anyway, I’m starting feel a bit more comfortable hacking on this particular chunk of AbiWord, despite lots of stupid mistakes. I think I’ve worked on it about two and a half weeks on this point? Grrr. I’m going too slow. My goal for the next coding session is to sort out the overlapping text stuff (should be easy, even by my standards :-P ) and get this polished enough for a new SVN submission. The one I should have made a while ago. Yay.

Summer Day Two: slow decent into madness

Woah, so this is what sleep is like. *ahem*

Everything is all over the place in room. Most of my textbooks are about a fraction of a centimeter too tall to fit anywhere in my bookcases neatly. Random books I never use, various burned CD-Rs, and paper scrap litter various elevated surfaces; this is partially due to my philosophy that the easiest way to clean up a book case is to take everything off it, then put everything back on. The other part is due to the current complete lack of floor space. >_<

Summer of Code marches on! Except not. The new router I set up for family which seemed to work so nicely over Christmas break now seems barely capable of transmitting a signal which I can receive consistently. I get disconnected from our home network and reconnected to our neighbor’s stupid “linksys” signal every ten to thirty minutes. And just forget about it if someone is using the cordless phone or the microwave. A reconnect every ten to thirty minutes doesn’t seem too bad- and I keep telling myself this. And [sic, don't care] it woulden’t be, if I didn’t happen to be conversing with someone about how to fix it, or downloading an eclipse update, or something of that nature every time it happened.

Seriously! NetworkManager is driving me crazy. Why on earth can’t I easily blacklist this “linksys” network? It’s freaking weak, weaker than the signal I want to stay connected to. Wicd won’t connect to my network at all. It’s really rather messy. To compound the frustration, the wifi tool in XP seems to have a slightly longer timeout that NM, so I can stay connected in Windows but not Linux. The irony!

Also ironic: the IDE situation on Linux, which is usually my development platform of choice. I installed Arch Linux half way through this past semester because of issues with Ubuntu, and I’ve been absurdly busy since then. Thus, I’ve just been using Gedit and a terminal window with gcc, guile, or whatever compiler/interpreter the situation called for. No sense mucking around with a full fledged IDE for 200 line homework assignments. However, AbiWord has a lot of code. This is by far the most complex project I’ve worked on.

So, after getting thoroughly overwhelmed (and reminding myself that this was the planning/research phase and I didn’t have to start coding in earnest for another three weeks), I decided to take Eclipse for another spin. Problem: it won’t spin. After figuring out how Subclipse worked and getting things syncing off the AbiWord SVN, my wifi connection died, taking Eclipse with it mid-checkout. Now Eclipse freezes on the loading splash screen.

In between the lack of IDE and lack of stable internet connection, I’m getting pretty frustrated. So, I need a plan.

  • Teh Internets
    • Construct a Pringles ™ antenna, slap it on the router and point it in the general direction of my laptop.
    • (Plan B) Install OpenWRT (or something similar) on the WRT54G router, then pump up the transmitting power. Pray that the router doesn’t overheat, the FCC doesn’t show up at my door, and that the router doesn’t brick. Any of these are bad as they mean potentially making the internet situation worse. Gah!
  • Eclipse (Ideally, after fixing the wifi situation. It’s hard download packages and/or to flame people on IRC when one’s connection drops every other thing.)
    • Visit #archlinux. Complain. Get connection dropped. Be ignored by everyone. (Accomplished)
    • Run Eclipse and get some sort of terminal output. There must be a console debug argument or log or something somewhere.
    • If Eclipse won’t run at all, I’ll fall back upon the “pencil and paper” approach and try drawing out the relationship between things. You laugh, but it’s worked before.
  • General Sanity
    • Unpack from school and get boxen out of room.
    • Find mouse. Battling my laptop’s touchpad is not aiding my mood.
    • Unruly mob! Unruly mob!
    • Get something done on AbiWord. Seriously.

That said, I’ve got quite enough to keep me busy right now. Over and out.


Del.icio.us

Categories

Creative Commons License
This stuff is licensed under a Creative Commons License.