< prev 13 Jan 2015 to 23 Dec 2014 next >

Posts tagged 'backbone'

  • Week 9 Day 1 - What day is it?

    I was actually going to post a partial update about my work over the weekend, but didn't manage to find the time. It might be a worthwhile task to do on my train commute, given that the normal sources of distraction are quite boring lately (although I suspect that others might think the same of my "content" on platforms such as fb).

    Long story short: after running a couple errands on Saturday, I made it to the office by 6 pm, and worked straight through until about 2am, slightly tipsy and having learning a whole lot about how rails and backbone routes interact. There are a couple people who were here when I got here, and I had a very enriching time between talking through errors and feature development. I ended up bouncing a lot of ideas off of one guy in particular, and that helped me nail down a particularly complicated process that had been giving me fits.

    Sunday, I woke up around 10 and started at the office around 2, and worked there for ten hours until the lack of running water in the building (long story) and the late hour drove me home. (I was also running on fumes, energy-wise). It was a long day of debugging, thinking through the backbone object model, and offering moral support to the other people working from the office.

    I, by no means, have the most broken nor the most functional app, but I feel that I'm in a good place right now—which is good, since I'm setting my own pace :P I'm confident in the kernel of my project: every re-factor so far has been on the order of 5-20 lines of code, with a noticeably left-leaning Poisson distribution (i.e. more short patches than long).

    Today, then, I woke up not sure what day it was, and I was somewhat disappointed to realize it was "only" Monday. When you work through the weekend, there's not much point trying to differentiate between each day. Nonetheless, today was better than a typical day at work, from my past life… this feels like just "what I do" now.

    One thing that I like about the approach I've been taking toward development is that at every stage, my app works. I have yet to have a period, once I finished the core view, that adding a feature caused another feature to fail. Part of this is due to my deliberate approach to development, thinking through how the features will interact down the road, but most of it is due to a highly incremental process of grafting features on sensibly.

    I do, however, wonder if I can keep this up.

  • Week 8 Day 5 - A brief pause

    It's telling about my state of mind that I tried using an Atom shortcut, namely cmd-enter, to insert a carriage return below the current line, and ended up instead sending my blog post off into the internets.

    We've all been staring at text editors for nine hours (minus breaks and lunch) and it's been a long, albeit productive, day. I can tell what everyone's up to and no joke I'm behind… however, I haven't asked for technical help or code review in three days.

    … I'm not sure if I should be proud or ashamed of this fact…

    My rails product looks pretty good. The models all work, modulo a couple details that will start to come out in the wash; most of the controllers are up and running well, and many of the views work the way I want. I'm starting to transition to Backbone—normally, we would have been doing three-minute presentations of our progress today, but that's been pushed off to Monday, at which point instead of showing our Rails MVP we'll be showing our Backbone MVP.

    What this means, for me: I have no free time this weekend. Or, more accurately, my free time will be spent in the arms of javascript and, more precisely, Backbone.

    Now that I remember how to rails, it'll be interesting to transition back to JS.

  • Week 7 Day 5 - Trello, ello, ello, ayy, ayy

    Today: solo day

    I think it's just me, and not the time off. Backbone is… opaque.

    Today was our solo project day with javascript/Backbone, and let me tell you, I was struggling. I've been looking forward to having another solo day, but I consistently fail to gain traction on these days. So, I don't know, I'm kind of torn about solo work. All I know is that I'll have to figure it out eventually: how not to struggle the first hour or two after I sit down at the computer, since that's the time I should be "making my money."

    Our project today was to work on a clone of Trello. This is an app that I (thought I) had installed on my phone once upon a time, but I didn't quite realize what it did. Basically, you have boards, lists, and cards. Boards have a name/topic ("trello project"), lists have a topic ("features to add"), and cards have short bits of content that can be rearranged and reordered as needed to describe the list they contain. Additionally, there are collaboration features and a bunch of different varieties of actions that can be done to cards… all pretty cool until you realize that it's topologically equivalent to a tree/outline, and that there are literally a million variations on this theme out there.

    As an aside, how many ways can you have to make an outline? Maybe I'm missing something here, but the main differentiation between say, Trello and workflowy is simply presentation. All these things are supposed to help make you more productive, but if the stuff you need to get out doesn't outline readily, or is topologically distinct from a tree, you'll spend all your time trying to shoehorn it into a broken topology.

    That isn't to say there's no value in the presentation layer. Structurally, there's little difference between OmniFocus, WorkFlowy, any of a number of GTD apps, and a MS Word outline… but functionally, presentation matters. The biggest thing that any of these programs do is to hide junk that's not "in scope" at the present moment, as well as allowing you to manipulate objects and their sublists as a coherent object. I've told people countless times about the power of the MS Word Outline for structuring a document, but where it really shines is when you have a good idea where you want to end up and just need to flesh out concrete topics. It, and others, are not so good at just letting you dump a mess of thoughts and then bucket them as needed—there often is no general purpose "inbox" that can collect detritus that you can in turn process later, despite this requiring little more than a database field and a view. I wonder what all these app developers' workflows look like that this is desirable behavior.

    Anyway, I started today really slowly, and gradually picked up steam as the day progressed. Toward 3 pm, though, I felt my momentum fail as I struggled with some stuff that I can't quite quantify about Backbone. I couldn't think of what I needed to do or what I even would need to do to figure out what needed to happen, and I can't decide whether it was because of Backbone, javascript, the instructions, or what. I still largely prefer ruby and rails, but I understand that JS is the bread and butter of webdev, so it'll pay to overcome my issues, and yet I can't properly decide … much of anything. Guh.

  • Week 7 Day 4 - Have some backbone!

    Today's partner: Ben

    Another Backbone day, another day thinking that I know enough about Backbone already only to realize there's a lot to know. Once again, the book they have assigned is a great resource, and really backbone (and rails, and some other technologies) deserve a full read-through in order to understand what they have to offer.

    Maybe that will be one of my priorities in the new year.

    Resolutions:

    • Get a job
    • Actually read Backbone Annotated Source

    But then again, talking around the water cooler, I keep hearing that other frameworks are much more …expressive? than Backbone. You'll always remember your first, but I shouldn't really pigeonhole myself as someone who's only willing to learn one framework… even though I haven't really learned it, yet.

    In any case, it nice to get some depth. The topics feel much faster paced lately compared to Ruby/Rails, and I really am chomping at the bit to move on, but this time isn't being wasted. Especially not for the class as a whole—pair programming continues to yield educational benefits, due to cross pollination and so forth.

    Our app today was a simple news reader. The coolest thing was using a gem, SimpleRSS, to pull live rss data from various sites around the web. I'm sure that we didn't do any more queries than any other random people during the day, but (for instance) while we were testing the reload button, I did feel a twinge of guilt for smacking their servers around lightly. It's weird to be using real data and not Yet Another Sample Set, because it's a reminder that we're not just messing around.

    Hopefully the New Year finds a couple of us working on Real Problems™ with Real Data™… no matter what, we'll all be up to our ears learning for some time …

  • Week 7 Day 3 - Tumblr.Collections.Posts.add( ...

    Today's partner: Cihangir

    This morning started out with alternating stupid. John and I were both feeling lingering effects of the long weekend, and for the first hour or two before lunch we each had several moments of "wait, what are you doing there?" before we caught up with one another.

    I'm glad to say that I remember more about Backbone than I thought, but it was still a bit humbling to realize just how fragile our knowledge is at this point. Way back at the beginning of the cycle, I remembered seeing requests for assistance pop up from the previous cycle's students in chat, and I thought that it was ridiculous that they, in their advanced state, would need TA help… I thought I was missing something.

    What I was missing is that, while nine weeks in more than enough time to learn a lot of new things, we're not perfect nor are we professionals (yet). There are entire other languages and frameworks to be learned, knowledge to be solidified, skills to be polished… we've barely just begun. I feel like this cycle's schedule has been pretty perfect—we've had breaks when we needed time off, and the hardest assessments happened at times we were prepared for them. The silver lining to this most recent break, then, is the memento mori we all had coming back this morning: any time spent away from these skills reveals just how far we have yet to go.

    I'm reminded of basic training. Everyone was so intent on getting any information that allowed them to pierce the veil of future uncertainty that we'd grill anyone who was as much as two weeks ahead to ascertain what lay ahead. In a new environment a tiny difference in starting point can make a huge difference in perceived knowledge, and we all kind of figured out that the career soldiers didn't have answers that would be relevant to us, yet. However, someone who just graduated basic, whose skills were fresh and memories raw and who could recall just how far they had come from civilianhood could provide much more useful information for us, the recently transitioned, than could anyone else.

    The project today leveraged the anal retentive backbone_on_rails gem, which has a very particular way it wants you to setup your javascript files. It was what I was waiting for after watching Ned's videos introducing Backbone, where I could see each piece going to a very specific and predictable place in the file structure. I like this kind of obsessiveness: rails has its conventions, rspec its own, and now backbone on rails, as well… between all of these, it's good to see a right way to do things, even if it's not the only way to accomplish what we're trying to do.

    I've seen a lot of programmers come out of four-year programs not knowing anything about style or consistency, and I suspect they drift into corporate codebases, uglifying things and driving their team into technical debt while ostensibly meeting their career goals… some, presumably, get the bug for style and consistency, but I fear that many do not.

    There's really not much to say about the project today. It was another CRUD app—posts and titles, and a bit of dynamic rendering—but I feel a lot more comfortable with backbone's paradigms when it comes to generating and manipulating DOM elements, and handling client-side data manipulation. Tomorrow should be more of the same, as evidenced by the complete and total lack of readings, barring the project description itself… I think we're all chomping at the bit to get to final projects. We'll be hearing more about that tomorrow, god willing and the creek don't rise.

  • Week 7 Day 2 - If an event is triggered in the woods, and there's no handler, does it cause a callback?

    Today's partner: Mark

    A lot to absorb today.

    We rounded out the pokedex app, starting from a standardized skeleton again (but this time incorporating a "clean" version of what we accomplished yesterday), and templated the hell out of it, then separated what was once a single Backbone.View into individual views for each task.

    I can't say that it was the most interesting lesson we've had here; I was kind of done with this project yesterday, and refactoring a somewhat broken initial model just wasn't that engaging. I'd rather do it right from the beginning, and actually split out the modules into what should have rightfully been separate files in the first place. Further, since the plural of Pokemon is… Pokemon, it was often difficult to figure out which renderPokemon method we were calling—the one attached to the index, or the one attached to the show route.

    That said, we certainly learned a lot about how Views and (eventually) Routers work on the client side, but it felt like we spent most of our time wrestling with callbacks. I thought I understood them pretty well, but when you have a related view (display requires index to be loaded beforehand) figuring out just how much of your render method needs to live in the callback can be challenging.

    Nonetheless, we figured it out eventually. It's done and behind us… I'll probably want to read the assigned book cover to cover over the holiday break, just to solidify what we saw, so I don't trip over my feet come Monday.

    Speaking of Monday, that's when Jonathan has asked we have our project proposals ready. I won't have as much time as I thought, but since we're required to make a clone of something it'll be easier (and harder) than I thought.

    I would still like to make a clone of something that's at least a bit socially conscious, but then I think of Freshman English class and how some of my best essays were the ones I was least invested in. That is to say, when I can think logically about a problem, without letting my passion cloud my vision, it's often easier for me to make something I can admire.

    Maybe, though, I've changed since I was 13. I'd like to think so.

  • Week 7 Day 1 - Stop trying to make fetch happen!

    Today's partner: Jake

    "Stop trying to make .fetch() happen! It's not going to happen!"

    I spent all weekend trying to make heads or tails of backbone, and apparently either it paid off, or today's assignment was easy/well composed enough that it was tractable well within the allotted time.

    Today's project was the first half of a 2-day project implementing a single-page webapp - a pokedex. (For the unaware, there's a game called Pokemon, and in the game, every time you see a new Pokemon, it's added to your in-game computer index of Pokemans, aka the pokedex… poke poke poke…). The skeletal structure was set up already when we came in, so we started with a rails server with models and routes setup already, and did nothing more than build out the client-side functionality using backbone.

    What started in the morning as a static page without much functionality became, by the end, a templated, asynchronous, pretty cool (as these things go) index of pokemans. We didn't accomplish much, all told, except remove a lot of the opaqueness from Backbone models and collections, but given the overall confusion I was experiencing on Saturday it's very much a relief. Backbone isn't that hard, it seems, once you get a handle on the problem it's designed to solve - removing a lot of the drudgework of making an API-driven client-side single-page web-site. But, like Rails, it really merits a cover-to-cover read-through of the source and documentation to understand what is possible, and what's in good taste/style.

    Like I've been saying, there are a lot of things I'm seeing that would be incorporated into an eventual portfolio-level project, and since Backbone is the last thing we have to learn to make our projects, I'm thinking that maybe I'm ready to start sketching out what I'd like to accomplish in the next month and a half, starting as soon as I get to the airport Wednesday… I think there will be, and ought to be, a lot of pen-time, hovering over a notebook and essentially drawing wireframes of… what, exactly? I know there are tons of different things I could implement with the skills we've learned, but it's all so daunting now. All the projects I have in mind so far are a bit too large in scope, or too personal/bespoke to merit the effort.

    I think.

    Hmm. Time to hit people up for ideas.

< prev 13 Jan 2015 to 23 Dec 2014 next >