blog.humaneguitarist.org

discoveries in digital audio, music notation, and information encoding

Archive for the ‘programming’ tag

NCDevCon 2011

one comment

I attended NCDevCon a few weeks ago and just wanted to post my notes and provide relevant links for later use/study.

I'm only going to jot down the major takeaways I had from the sessions I attended (listed in alphabetical order). Undoubtedly, the link to the session information might be irrelevant when the 2012 event nears. But videos of each can be seen for free (I think) at NC State's College of Textiles' page here.

AngluarJS – What HTML Would Have Been If It Had Been Designed For Building Web Applications (Tim Cunningham)

The AngularJS session was a great and the speaker also makes great (and strong!) beer than he shared with attendees after the sessions.

There's not too much to say here except this is something for me to keep an eye on.

Notes:

  • Client-side scripting is like the "Wild Wild West".
  • AngularJS is MVC: JSON is the model, HTML the view.
  • Built for testing.
  • jQuery is good for DOM manipulation; AngularJS increases the level of abstraction.
  • Not yet at 1.0, so maybe don't rely on it just yet.
  • Look up "dependency injection".

HTML5 vs Flash Video: Choose Wisely (Ben Farrell)

This was a basic intro to HTML5/Flash video. I think it's too soon for people to get on either side of the fence, not to mention there's too much money to be lost if Adobe doesn't figure out how to play well with certain devices (i.e. Apple). And it looks like they are doing just that.

Notes:

  • Use Modernizr to test for codec support.
  • Apple's HTTP Live Streaming is a "bait and switch" as the Quicktime plug-in is required.

Introduction to jQuery Mobile (Ray Camden)

This was really helpful to me since I wouldn't mind doing something mobile compatible but I hesitate to write mobile apps and have to compile them for particular devices even with a cross-compiler like PhoneGap.

I'll definitely have a look-see at jQuery Mobile as it has a lot of out-of-box features that can ease the task of writing effective, easy-to-navigate pages.

Notes:

  • Takes advantage of HTML5's "data" attribute from <div> tags.
    • Lists: <data-role="listview">
    • Filtering support: <data-filter="true">
      • The filter only works on the data on the current page, not the entire set of data.
  • Check out: Search, Slider, Collapsable Blocks, swipeable events, etc.

Geolocation 101 (Andrew Powell)

This tied in well with the jQuery Mobile class. We talked about the HTML5 Geolocation API, the history of geolocation technology and presidential executive orders, and its role in "Tomorrow Never Dies".

Notes:

  • You must always ask for user permission; some browsers make sure the user agrees.
  • Don't write geolocation intensive apps; they drain batteries.
  • Cell phone tower location is the least accurate but fastest, followed by Wi-Fi, then GPS (slowest, most accurate).
  • Not all devices/OS' support altitude reporting.
  • Look up "GeoFencing".

Tame Your CSS3 With Sass (Les James)

This was a really helpful class as I'd never heard of Sass, which the presenter described as a "CSS metalanguage". There really aren't any notes that need writing, I simply need to use it.

BTW: there was one fellow there who worked for the government and had a CSS file over 2k lines long that he inherited from his predecessor. He will definitely be using Sass in the future!

QR Code Crazy (Shawn Dunning)

This was a great overview of the history and uses of Quick Response, or QR codes. In addition to seeing some examples, we talked about how the smartphone/QR code bit presents accessibility issues (more Digital Divide, if you believe in that). And a week or so later, I also heard this on NPR which asked if by the time QR codes could become more widely adopted they might already be obsolete.

Notes:

  • Uses position boxes and, per the standard, white/black should be switchable.
    • I wondered about putting QR codes on archival scans to verify the image's orientation and color balance, i.e with some metadata embedded in the code itself.
  • Smartphones use regular expressions to determine that a URL string exists and subsequently points a browser to the site. The code itself is simply a string.

What Is NodeJS And Why You Should Care (Garrett Johnson)

A little over my head, but that's why I went right?

:P

Notes:

  • Research node.js; possibly use to serve up a website.

Writing JavaScript That Doesn't Suck (Bucky Schwarz)

If you watch only one video online, watch this one. Useful and highly, highly entertaining.

Notes:

  • Consider using strict equality in JavaScript (===).
  • jQuery "leads to one-off scripting … ".
  • Selector speed (fastest to slowest): id, element, class.
    • Don't search for a single class unless you have to.
  • Don't declare new variables inside a loop (doh! I do this all the time).
  • Look up "dirty bit".

This was the last session I attended and afterward I talked to the speaker. He recommended "JavaScript: The Good Parts" as a quick, no-nonsense read to help improve my JavaScript.

--------------

Related Content:

Written by nitin

October 9th, 2011 at 12:00 pm

programming and LIS students: caffeine free anyone?

3 comments

Last week I posted a simple Python script and alluded to what I feel is the need for LIS programs to address computer programming.

The LIS field – or industry? – is so immersed in the usage and advocating of technology that it seems logical, per my logic at least, to offer library students an introductory class that allows them to learn about what lies behind the surface.

That said, I think LIS programs that do offer such classes need to really think about what language(s) should be taught to students who will – perhaps more often than not – have virtually no prior programming experience.

And while it would be neither professional – or perhaps even nice – of me to get into specifics, let me just throw out this question:

Why Java?

Sure, it's critically important as a language, but that isn't the point. The point is "is it appropriate for what will likely be a class of beginner programmers majoring in library science?"

Now I'm not a real programmer, an educator, or even a 'librarian' but I'm going to answer the question anyway.

No.

Why?

For starters, library students – who are not computer science majors – need to learn a language that is syntactically simple enough to more or less stay out of their way as they learn to think about design – knowing where you want to go and figuring out how to get there.

For an example of the problems in wading through syntactical issues when you're starting out, here's an excerpt from John M. Zelle's Python as a First Language regarding the ubiquitous "Hello World!" that constitutes many people's first program.

Python supports the use of functions and classes but does not force it. Simple programs really are simple. For example, consider the ubiquitous “Hello World'' program in Python:

print "Hello World!"
 

C++ requires this program to be wrapped in a function and preceded by a preprocessor directive:

#include <iostream.h>
int main()
{
   cout << "Hello World!";
}
 

In Java, the situation is even worse, as all code must be inside of a class:

public class helloWorld
{
   public static void main(String [] args)
   {
     System.out.println("Hello World!");
   }
}
 

Sure you can find plenty of Java advocates too, but keep in mind that Zelle is writing in terms of appropriate first languages for computer science majors, not librarians. That seems to only bolster the notion the Java might not be the best thing for LIS students – at least not for a first programming class.

Secondly, I think one needs to also consider the execution environment. PHP, for instance, can be executed via the command line, but also can so easily be executed in the most widespread GUI we've ever known: the web browser. All one needs is something like XAMPP, an Apache distribution with PHP that installs in minutes if not seconds. From there one can make web forms and database queries to their heart's desire in addition to running backend programs that manipulate files and folders, etc.

Lastly, there's the matter of salability. I'm not saying Java skills aren't salable – that would be ridiculous – but will people really develop salable skills in one semester? PHP is salable, I think, in the library world just because it has, I'd argue, a lot of name brand recognition even amongst administrators who are less familiar with a lot of technologies. I see it on library job descriptions all the time (preferred qualifications).

By the way, here's "Hello World!" in PHP; it's almost as simple as Python.

<?php
echo 'Hello World!';
?>

I guess what I'm saying is that for a beginner what matters isn't the language itself, it's the language behind the language and I'm not sure Java is the best way for LIS students to become conversant in the latter.

--------------

Related Content:

Written by nitin

October 4th, 2009 at 5:15 pm

Posted in opinion

Tagged with , , ,

Switch to our mobile site