Herman gallery using Flickity from Metafizzy

Herman 2000-2014

This will be on the pet profile site soon, but I’ve been playing around with it outside of that. This is more of the clean, crisp pet memorial page I wanted when I started thinking about the pet profile project over the summer. More to come on that. February 14 was the one-year anniversary of Herman’s death, so I thought it was fitting to use him as my test subject. This is working pretty well on mobile devices, though I need to do some mobile landscape view tweaking.

Using library Flickity from Metafizzy.

Advertisements

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.

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…

Wordpress, it is

WordPress, it is

Since I failed to gain mastery of PHP in the decade or so I was dabbling in it–first, with my grand plans for the defunct Toastie Radio site (I miss that), and then with my seven years of WordPress blogging–I thought it might be time to switch to a platform that’s Javascript-heavy. After all, Javascript is at the heart of what I’m working on in front end engineering boot camp this summer, and what I’ll be working on going forward in my career.

Aside…I do myself a disservice to imply I’m learning Javascript for the first time right now. I’ve known enough to get by when it’s been needed for web tweaks in my jobs over the years, and I’ve stuck it on my resume. But there’s a dramatic difference in scale between using Javascript to dynamically update a web page element here and there or pop up some dialog boxes and actually building websites. This is a good example of the very vague statement I made about a month ago in which I declared that I did not want to be a generalist. I did not mean that there is anything wrong with being a “jack of all trades, master of none.” I just never saw myself of much of a jack of anything. How much expertise I have in a skill I claim to possess has always been difficult exercise…

You know, I’m going to table this line of thought for another time. I wasn’t planning a mammoth post, and I’m not going to make one, but I’m also not going to censor myself and delete what I’ve started.

My point in posting this link is that WordPress is becoming more of a Javascript-based platform, and that means any inkling I had to abandon WordPress is probably gone. I obviously don’t follow WordPress closely enough to have known this until now. I’ve basically been on auto-pilot for the past couple of years as far as learning anything more about developing for WordPress. But I hate to abandon this platform I’m so used to, despite my mini-rant about some annoyances I have with the .com site. I’ll probably move this to a self-hosted site at some point, but I have absolutely no time for that right now.

I’m really psyched about this.

Ideally, I’d make some time to get to work on customizing this blog some more. (This theme doesn’t put a YEAR on the post? WAT?) But I already have a custom theme to play with on Top 379. (I need to explain that someday, or look for an old post that explains why I have a countdown of songs by the like of Air Supply and Barry Manilow. Or do I have to explain it? So many tangents, Dave…) And, more importantly, I’ve got a quite complex web page to build over the next three days for class. Any activity that diverges from that should fall under categories such as physical activity, basic chores, and Orange Is The New Black.