Entry tags:
This week in coding
I overestimated how much free time I'd have last weekend, so translations got pushed to this weekend given that large blocks of uninterrupted time are harder to come by during the work week. I did add some dates & data to individual story pages and help out with the redesign and relocation of the people-browsing page. I have a vague memory that there was a lot of fiddling with CSS involved. *g*
We're building up to an update of the archive website itself, so that means the coders stop adding new features for a while to give the testers time to do a thorough evaluation of everything that's changed. The self-imposed deadline was midnight last night EDT, so everybody was very eager to get things in under the wire. I wound up spending about 14 hours each day this weekend coding and talking about code (with occasional breaks for sunshine and sustenance), hence my brain being sprained. I think the appropriate emoticon is: @_@
The process of adding a large-scale new feature goes something like this, using translations as an example:
1. Stare at blank page for about a week, resist temptation to hide under desk.
2. Get basic data to appear on page in more or less the right shape and order. Add pagination so you don't have to sift through it all at once.
3. Hook up forms to backend and make sure data gets saved properly.
4. Customize page to react to user roles appropriately (ie, translation committee members can do/see some things, assigned translators can do/see other things, etc.)
5. Add enough css styling for the page to be usable.
6. Page is working, yay!
7. Except, oops, now that the page is working, I find out that there's a problem with the underlying code: translations can be added & edited, but the actual site pages aren't being translated.
8. Spend most of afternoon fixing bug in plugin.
9. Bug is fixed, yay! Add some javascript so that the page doesn't reload on you every time you make a change, since you're probably translating more than one thing at a time.
10. Waste time trying to make javascript effects snazzier before coming to senses and moving on.
11. Start adding filters to make the page more functional: the first set lets you see only the translations that belong to a certain section of the site. That means adding a form to the page, adjusting the css to keep the form from being squished in or odd-looking, and adding code to the controller to get only a subset of translations from the database based on the submitted form data.
12. Add more filters for seeing only translations you've been assigned to translate or beta. (Repeat steps from #11).
13. Realize that the two different types of filters aren't playing well with each other; fix.
14. Add new forms to page + controller action to allow translation admins to bulk-assign translations to translators. More css tweaks!
15. Add entire new section of site (model, associations, controller, views) called 'translation notes' to allow translators to communicate with one another. Done in about an hour and very rudimentary, but it was important to me to give the users/translators something to try out and give feedback on (it should do this, it should not let you do that), since they'd know better than I would what sort of features would be helpful. Also spent time considering whether or not we could use our existing comment functionality instead of adding something new before deciding that, no, the underlying structure and goals would be different enough to make that a giant pain in the ass.
16. Add links to translation notes from main translations page; more css.
17. Try to figure out how to automatically add paragraph tags to translation notes until someone in the chatroom tells me the answer. Yay! *tips hat*
18. Add a few more handy links to the translations page; more css.
19. Take a break! Go work on and commit a few other things (replying to comments directly from inbox! woot woot!).
20. Go back and add filtering by status to translations page (ie, translated, not translated, English translation was changed and thus current translation may need to be updated).
21. Realize status isn't being tracked properly; go write model code to fix this.
22. Realize there's another significant bug that's just way too tl;dr to need exploring at this juncture. Add temporary hack while considering better ways to deal with it.
23. Fall into coma, unfortunately leaving test-related problem for someone else to deal with. /o\
24. Awaken from coma, start writing more tests. (I still fail at test-driven-development, yes.)
25. Realize code is all crap, start itching to refactor. (Well, to be fair, I knew the code was crappy when I wrote it, but it's a lot like writing anything else - getting something down on paper that you can edit is better than staring at the blank page forever waiting to turn into Shakespeare. And when I say crappy, I mean there are a few things in the controller that should be tidied up and moved to the model and a few things in the views that should be tidied up and sent to helper methods. *g*)
Meanwhile, back at the ranch: oh, so much stuff going on! Lots of small but significant changes which you'll be able to see live not too long from now, and more much-needed and greatly appreciated work on making the entry process for new volunteers a lot smoother.
*falls back into coma*
(I'm not really cross-posting everything yet, but I still haven't decided whether to import my old entries or not, so I'm posting things here that I do want to keep, with an eye to cross-posting when that's more stable. Will try to keep duplication to a minimum! Or a maximum. But not so much in between.)

no subject
I am so in awe of all the work you do, and the way you manage to teach us so effectively in between. Yeay for Beta deploy \0/
Have a rest now *passes chocolate*
no subject
no subject
I love your updates, do keep posting them <3