pancake theorem a tech blog by jenn schiffer


Skillcrush: daily tech terms in your inbox

Skillcrush is a “soon-to-launch online learning community for female creatives, thinkers and makers.” You can sign up for their daily “Tech Term of the Day” email, where they give little snippets of info about a specific tech term, along with clever illustrations appropriate for little ones and us older gals.

I think it’s a great techie word-of-the-day for young girls, and I look forward to seeing what else the company has planned for the future!

Techlaunch →

Techlaunch is NJ’s first startup accelerator and it’s living on Montclair State University’s campus. They just launched their site and are taking applications until the end of May. If you have a team, an idea/product, and are up to the challenge of a 12-week intense startup bootcamp, apply today!

This is a great opportunity for the local tech community and for MSU, and I’m excited to be on their roster of mentors for their inaugural cohort.

What to do if your Tumblr theme "does not allow" ask boxes.

All Tumblr themes allow ask boxes, folks. The issue is that not all themes have the link to the Ask Box – which is always http://example.tumblr.com/ask (replace example with your Tumblr username).

In order to add the ask box link to your theme, you need to actually edit the HTML code. Don’t worry, though, it’s quite simple.

{block:AskEnabled}
   <a href="/ask">Ask Me Anything</a>
{/block:AskEnabled}

Not to get too in-depth about Tumblr theme development, the {block:AskEnabled} block tells Tumblr that anything between that and the ending {/block:AskEnabled} block should be visible only if you have the Ask Box enabled in your settings. In this snippet, the HTML for adding a link to the ask page is what will be visible. If you don’t have the Ask Box enabled in your settings, then none of this will show.

Put this code in your template wherever you want the link to show up in your theme, and you’ll be good to go. It’s a good idea to copy and paste your theme code into a text file before you make changes – that way you have a backup in case you royally screw up (lord knows I have before).

Prevent users from prematurely submitting data in your form using jQuery

I developed a site that was just released to a small number of beta users. It required the collection of data, and some users would prematurely submit the form by hitting their enter key – which triggers the form’s submit button. Proper validation made sure that we received the required data, but it didn’t give the user a chance to provide non-required data.

For example, let’s say you have a form with one text area and a submit button.

<form>
   <label for="name">Enter your name:</label>
   <input type="text" class="text-input" name="name" />
   <input type="submit" value="Submit your name!" />
</form>

If you have one text input, then preventing a premature submit is not a problem. Let’s say you have 10 text inputs, not all required, though. Even if data is not required, you don’t want to take away the user’s chance of entering it. Non-required doesn’t necessarily mean not useful; in that were the case, we wouldn’t even have those fields in the form.

Fixing this is easy, though. You just prevent the default action of the carriage return key (character code 13) from happening.

$('input.text').keydown(function(event){
   if(event.keyCode == 13) {
      event.preventDefault();
      return false;
   }
});

I made sure to do the keydown() call only on items with class=”text” because I don’t want to take away the keyboard’s ability to submit the form if the user tabbed over to the submit button. I want to make the form more accessible to the user, not less!

Here is a nice, clear list of character codes, such as the 13 I used for the carriage return.

SimpleSlides

This week I gave a presentation to students on advising and other info. During my lunch hour the day before (the only time I’ve had to breathe all week since we have faculty candidate interviews for what seems like forever) I built a simple HTML/CSS/jQuery slideshow framework. I mean, I guess you can call it a framework – it’s a single html document.

Because of its simplicity and its being a set of slides, I call it SimpleSlides.

It has everything: click navigation, numerical slide tracking, ← → keyboard shortcuts, subway sleeping bags, and the natural ability to fully customize it – it’s just a web page!

Get it on Github.
View the source for documentation.
Make some slides.
Present said slides.
Bask in thunderous applause.

I’ve tested it on Chrome Canary on Mac, IE8/9, and gave a presentation built on SimpleSlides using my iPad. Let me know if you run into any issues; at its original state, there isn’t much old-browser-unfriendly elements.

Update: Version 2.0 released on May 9, 2012. You no longer need to add slide position numbers to each side’s id attribute!