< prev 16 Jan 2015 to 18 Dec 2014 next >

Posts tagged 'jquery'

  • Week 9 Day 4 - Down to the wire

    Spent most of the day today trying to make up for lost time, which doesn't really work but most of the day I had that level of speed. I left the office at 11:00 last night and midnight tonight, and got in a half-hour late this morning because there just isn't enough time.

    A benefit to overthinking everything and going down blind alleys is that my bug-hunting skills are only getting better. After three productive hours prior to lunch doing… I barely remember, but something… I tried doing something a bit too clever (having to do with separation of concerns again), and didn't come up for air until after 6. From 6 to midnight I was plenty productive, but messing up like that still stings.

    In brief: I monkey-patched the Backbone Router prototype to offer callbacks before and after routing, and then tried using those hooks to grab a user who wasn't logged in and redirect them to the login page (while preserving state). Once again, on my way home, I think I understand what I was doing wrong, and can see how to fix it, but I ended up ripping most of that code out and leaving it basically exactly how we were taught in the auth demo.

    I still don't like having a currentUser global, but for my app it's not a terrible idea, since you need to have some purpose coming to a blackboard-like site. It's not like your typical modern website, where there's generally some functionality that's meaningful even without an account, so… whatever.

    Oh, so I remember now—one of the fastest ways to make me hate your website or app is to have data entry be painful. So I spent three hours making syllabus creation absolutely beautiful, modulo a couple tweaks, and ran into a bug that I couldn't figure out even with Tommy's help. Basically, I had the event creation success callback call a JQuery focus() event on the first field in the form, and it kept losing focus after render. So I said to hell with it, and installed a setTimeout call that waits 50ms then focuses back on the first field. Hacky, but resilient.

    No matter what I do, more of these sorts of hacks creep into my codebase. But then I see things like when iOS autocompletes a word, then you press punctuation, it backspaces and writes the punctuation and a space instead of just inserting it at the previous position.

    I can't decide if this says more about the UX rot of iOS or the inevitability of hacky solutions.

    Tomorrow we're presenting again and I think I'm going to bum rush the core features, no matter how they look, rather than polish anything. I have a TODO.md full of broken things, but that's just going to be the nature of the beast.

    Wanna know what kind of day it's been? I just remembered that I didn't eat my breakfast. I packed it in my bag 16 hours ago.

  • Week 6 Day 4 - It's a miracle anything on the web works at all...

    Today's partner: Jonathan

    Today was all about JQuery plugins.

    Once we got into the rhythm of writing the html boilerplate and CSS resets and JavaScript namespaces… well, then we had a bunch of trouble trying to write event handlers. God. I don't know how anyone did anything before JQuery, and yet we spent most of the day smashing our heads against JQuery, trying to figure out what it was actually doing. I blame Brendan Eich, frankly. :)

    By the end of the day, we had picked up some real speed, but it wasn't nearly as exciting as some other days have been. That said, JQuery plugins probably do more for the web than CSS snake games. I was learning all day, even when we weren't making progress on the specific task in front of us, because we were constantly flipping between APIs, HTML, CSS, and JS/JQ, learning about how they interact. Short of creating specific toys for playing with each component separately (I'm very interested in playing with the Safari inspector's snippets, for instance), there's not a really good way to learn these syntaxes.

    From a pedagogical standpoint, then, we return to the problem of unit and integration tests. Today was a lot of integration testing, but our unit tests (building out the basic HTML page, etc) were not well developed enough to truly focus on JQuery. I don't know if there would be a better way to do this—it's possible that, by the time you polished such a curriculum, the technologies of the web would have moved on, and frankly the time (and cost!) of developing such a curriculum is not something you could easily recoup… but it might be fun. That seems to be the main purpose of the web, after all: having fun.

< prev 16 Jan 2015 to 18 Dec 2014 next >