Purrfect is the enemy of good

Terrible pun. And the actual aphorism isn’t even that appropriate here. I thought of titling this entry Bad is the enemy of good, but that would be a tad too self-critical.

When I was a week into developing pett.io, I hoped to have a couple of people try it out. I wasn’t looking for testers. I was well aware of what didn’t work, and I knew I’d be working non-stop to try to maximize functionality, usability, and design. I had tackled too large of a solo project for something I was going to need to present to an audience. If I care about what I’m developing, and even when I don’t, every aspect that doesn’t function or look like I ideally want it to is a source of internal strife. So I admit I suffer from Perfect Is the Enemy of Good Syndrome in my work. I deal with it by being blunt about my awareness of the shortcomings of what I’m delivering. I imagine that you would be hard-pressed to find one of the tens of thousands of project-advice-dolers (a new phrase I’ve just coined…PAD’s…Project-Advice-Dolers) who would recommend this strategy. But it’s not a strategy; it’s just my instinctive behavior.

Aside coming…I am certainly walking a tightrope here, blogging about my work process when I’m seeking to present my best self while I go through the process of finding work. Plenty of PAD’s do advise practicing authenticity, but they haven’t necessary met me. (I think I’ve just expanded the definition of PAD to include all advice-dolers. Let’s just call them professional advice dolers.)

So, I’ve got my long preface…I’ve been afraid to tell people, even just close friends, to try out pett.io For weeks, you have been able to create an account, create a pet, upload photos, and link in Flickr photos. And simply having a bunch of real data would have served–and will serve–to motivate me to keep working hard on this project. I get tired of just seeing my pets and my test data.

It’s now ten days post-Demo-Day, and this project serves as my vehicle for continuing learning while I search for paying (and non-paying) work. It would be wonderful if a few people created accounts and added a pet and a photo. I will invite people to do just that.

Speaking of Demo Day, I will toss a link to my presentation here, just for the record. Honestly, I cannot watch or listen to myself, so I offer it with no further comment.

Iron Yard-pett.io from TheIronYard on Vimeo.

Ok, one comment. I’m sufficiently embarrassed just from looking at the Vimeo still, and, yet, I obviously hope someone will see something of value you, or else, I wouldn’t be following through with this whole self-indulgent blogging exercise. Second comment–the app looks and functions a tad better than it did ten days ago, and it should continue to evolve towards the good.

Making muck out of nothing at all

That’s the best Air Supply headline I could come up with with limited brain power remaining and no time to blog.

I just spend valuable time I could be working on presentation preparation–or at least working to fix actual bugs–trying to figure out why an “Add a pet” button wouldn’t center. Obsessively. And I didn’t figure it out.

Must I remind myself…this was from last August? Time flying way too quickly at the macro and micro levels.

On a related note, I just found documentation how to create thumbnail images when saving a new image to Parse. It kills me that I don’t have time to implement that. Perhaps I do, but I have approximately 49 things that would take about an hour or two apiece that I would like to do before Friday.

The Comeback

Not a deep post about rebooting one’s self. Just a confession that I’ve become addicted to Lisa Kudrow’s overlooked 2005 gem “The Comeback” during my final, furious code marathon. If you haven’t seen it, it’s a treat you can see via Amazon Prime.

Code error fixed #7: Returning Parse database class query data via Underscore template

Haven’t had time to note #5 and #6 but skipped to #7 in the hope that I’ll revisit those. But compelled to record #7, because it epitomizes my perseverance in learning this stuff. My project must have a browse feature. The splash page has had one prominent button that says “Browse”, after all. But it was starting to look like it might not, because my attempts at rendering Parse data via an Underscore template were failing, and I got sidetracked by design issues. (I needed to focus on some design issues, yes. But this browse feature got tossed aside along with this unresolved programming dilemma.)

So, I won’t rationalize why I tried each of these, and this is just a sampling. I can’t recall. But I only had so many prior working examples in projects, and the internet doesn’t have a whole lot of examples. And I’m pulling from a Parse database, for whatever that’s worth.

$('#browse-container').append(_.template(browseView),results[i]);

Result:
No error, but no data returned.

$('#browse-container').append(_.template(browseView),results[i].attributes);

Result:
(where petname is one of the properties I’m trying to return from a class called Pet)

ReferenceError: petname is not defined

$('#browse-container').append(_.template(browseView),JSON.stringify(results[i]));

Result:
ReferenceError: petname is not defined

$('#browse-container').append(_.template(browseView),JSON.stringify(results[i].attributes));

Result:
ReferenceError: petname is not defined

$('#browse-container').append(_.template(browseView,JSON.stringify(results[i].attributes)));

Result:
ReferenceError: petname is not defined

Finally…what worked
$('#browse-container').append(_.template(browseView,results[i].attributes));

I never would have went astray with the JSON.stringify syntax had I, days ago, simply realized what was essentially a typo of an errant parenthesis, but it was one of those errors where the parenthesis wasn’t what was throwing any error.

Anyway, moving on…

meta-blogging note: I must get off of this theme and wordpress.com or pay to be able to customize. This looks horrible.

Let’s put this puppy to bed

I don’t want any design critiques. It’s not finished yet. Demo Day is Friday. But I’ve got to say for the record that I’ve never worked so hard on anything. And 70% of my time has been spent on Javascript code, things like figuring out how to get dates to save to Parse and arrays to render directly to the page without loops but just a simple space after commas…and promises to deal with asynchronous events…I didn’t really get the latter working as I’d like. Keep mind I’m just team of one, so I’ve been dealing with:

  • Parse database
  • CSS/Sass styling
  • Bourbon/Bitter/Neas styling
  • Javascript
  • jQuery
  • Underscore/templates
  • Masonry/layout
  • Account management view
  • Splash screen
  • Parse pic list mgmt
  • Flickr pic list mgmt
  • Vine list
  • Backbone framework
  • Responsive design
  • Presentation TBD, somehow encapsulating all of this, and my overall background in coding and in life, in 5 minutes, this coming Friday

So…not quite done yet. But I need to at least put myself to bed. Moksha has already gone to bed.

pett.io for the soul

Despite what I posted last night, I am really bleeping proud of myself. Every bit of code I write that works immediately or works three days after I got suck, is a bit I feel good about. If you detect some dissonance here compared to what I’ve previously written, perhaps there is, but there is plenty of room for both immense self-doubt and exuberant confidence to co-exist. Exuberant confidence? There are moments, and I’ll live-blog it right now, that think, even if no one else does, that it is remarkable that I have an app, which I could use to:

Upon seeing the following page in Flickr…

Within 60 seconds…

2. Create a pett.io account

3. Add the pet’s name

4. Add the user’s Flickr accont

5. Add the tag the user uses to tag their pet

6. Click View Page and

I’m not finished yet by a long shot. But I can do this…look at the kitty!

Code error fixed #4: Append Parse query results to a form dropdown

After I’ve done my Parse query of a person’s pets, I need all the pet names in a dropdown field. Leaving out lots of code, but essentially


for (var i = 0; i < results.length ; i++) {
$('\<option\>').val(results[i].attributes.name).
text(results[i].attributes.name)
.appendTo('#pet-names');
}

where pet names is my selection form field. Seems simple, enough, I know, but…sigh…

The final yard sprint

[Wednesday, early AM] Trying to write about my Iron Yard final project at 2:42am from bed using Android voice recognition for the bulk of my transcription of thoughts is not a recipe for a sterling blog post. But I lack the time to write something adequate.

No matter how much I do it’s never going to be enough. There is so much work that is needed to make this a legitimate website. This work could go on forever, and I kind of hope it does, but I have only had 3 weeks, and I only have a week to go.

Most of my classmates are in larger groups. I’m doing this by myself because I wanted this project to demonstrate all the potential that I have, whatever that might be, whatever I could possibly get done with regard to styling and HTML and Javascript and the Backbone framework and the Parse database back end.

But I know no matter how hard I work–I could work 24 hours a day–the design is going to fall short because I don’t know enough about awesome design and don’t have time to implement an awesome design. Integrating with api’s is going to fall short because there’s simply no time to do awesome things with them. The amount of information stored in the database is going to be limited simply because there isn’t time to build out an extensive data model. The CSS isn’t going to be extraordinary because I just don’t have the experience to make it as elegant as I would like.

I should define a scope of what to deliver at a minimum, and, I have, to a degree. However, it’s really difficult because I want this to be a fully functioning app. I don’t want this to be merely a demonstration where I can fake half of it, but rather a demonstration of something very real and functional that was created from nothing.

I am feeling enormous pressure to deliver something that is a fully functioning, particularly because the large groups will be delivering essentially complete web sites that are going to be functional in the real world. I put all of this pressure on myself because I simply don’t know what’s enough, at what point is it okay to say I will work on making this better later and that it does not have to do everything right now.

I know that no matter what I get done, it may not be apparent just how much effort I put into this. But no matter how much work I put into it, if you compare it to an established website by a very experienced developer it’s going to pale in comparison.

[Saturday, early AM] And my thoughts have pretty much been ditto early Thursday morning, early Friday morning, and right now.

I have been told the past few days to focus on design, which has just amped up the pressure, because, frankly, I didn’t spent nine weeks in the program to learn how to be a better designer. I always value good design, I cringe at bad design, and I feel pained when my own design is inadequate. But I came to the program to code–to learn everything I could about building front end applications with Javascript, and I wish that could be the focus of this final project. Instead, I find myself spending time on making buttons looks better. Why?

Because, next Friday, I have five minutes to present three weeks of work, which attempts to encapsulate nine weeks of work, which builds off a couple of decades of other related experience.

You could tell me to stop putting so much pressure on myself, but the audience for this five minute presentation is a group of local employers who are looking to hire developers. And I don’t expect to be employed by next Friday, so presenting my best self is advisable.

Code error fixed #3: Backbone event click on id not firing

Hours gone. It’s 3:37AM. Even though it worked for a couple of days, suddenly clicking on a div called ‘about’ was failing to execute. Turned out I had moved it to ‘main-header’ for stylistic purposes and didn’t put two and two together that I had specified ‘main-container’ as the element for this particular view. Since ‘about’ no longer existed in ‘main-container’, the event wasn’t binding to anything. Duh. It feels as bad as having made a typo. But maybe posting this will save 3+ hours in the life of some other Backbone newbie someday.

var LinkView = Parse.View.extend({
el: "#main-container",
initialize: function(tag) {
blah=tag;
if (!(tag)) {tag = 'blah'};
$('#main-header').append(_.template($('#blah-header-template').html(),({"blahName":tag})));
new blahView(tag);
},
events: {
"click #about" : "showProfile"
},
showProfile: function(e) {
new ProfileView(blah);
}
});

Solution:

el: "#main-header",