Archive | JavaScript

Better as ECMAScript, the client-side runtime engine of the world’s browsers.

Notes from NH Ruby Group, 15-Jan-2009: Jonathan Linowes

Jonathan Linowes was kind enough to drive from “the other side of the Notch” all the way down to the seacoast to present to the New Hampshire Ruby Group on the 15th of January (note that the NH Ruby group has moved their regularly scheduled meetings to the third Thursday of the month). Fourteen members attended the meeting, which started with a round of introductions. Pizza, soda and T-shirts were provided courtesy of EngineYard — thanks!

A typical scene at a Linux user group meeting for the first ten minutes of a meeting to be consumed with the speaker struggling to get his X windows display to sync up with the projector. I’m beginning to suspect that the Ruby group equivalent is for the speaker to discover he’s packed the wrong DVI-mini-DVI-HDMI-Video-VGA adapter and no one else has the right video adaptor for his MacBook despite a half-dozen machines present. I wonder if Apple made a mistake by changing this adaptor in every model.
ReviewRamp is Jonathan’s project – a SaaS web site for a group to bring in documents, route them through their own defined process, and approve/disapprove/select documents. Jonathan offered examples such as business plan reviews, marketing plans and job applications. Designed to look as much like a desktop application as possible, ReviewRamp has a simple GUI, with templates and wizards to make it a couple of clicks to process. Under the hood, Jonathan talked about the architecture, which includes RESTful protocols, and a design intended to scale to thousands of projects, hundreds of submissions and a handful of reviewers per project. Unlike many JavaScript-only sites, RevewRamp works well with JavaScript disabled; sweetened with JavaScript enabled. ReviewRamp is publicly in beta. Jonathan presented some slides of the models: reviewers, projects, pages, subpages, fieldsets. This last was a segue into the 3rd presentation: fields are generated via metadata for each project, but the database tables don’t change for each project, so each project has virtual tables vis Jonathan’s DynamicTable design.

Next, Jonathan had a presentation on “Cucumber: How I Slice It” Jonathan had worked PHP and other languages before, was very attracted by Ruby as a new language and the philosophy of testing, testing and more testing. Unit-testing, test-driven-design, behaviour-driven-design. Jonathan also pointed us to Brandon Keepers presentation as an excellent starting point.

Jonathan showed us some of his Cucumber scripts, which include a lot of pretty cool extensions to the base, like {show me} to actually end a test by launching a browser so he could visually verify a result. It was apparent that Jonathan really took to the testing regime, adding extensions like “He” or “She” instead of always including “The current logged in user” or “the current project”

Should you use RSpec or Cucumber? Both, according to Jonathan: each has strengths and weaknesses. RSpec is more tuned to unit-test individual functions where Cucumber is more tuned to describing behavior and outcomes.
Check out

cap deploy:features

to run Cucumber on the deployed app (typically, you’d do this on a staging server, not a production server)
Shows some example Cucumber scripts. They describe in English the point of the test, and use keywords (“GIVEN” “WHEN” “{actorname}”), an action and an expected result. This is actually parsable Ruby code that defines fixtures and features and processes defined within the story runner. It’s not just a requirement, it’s actually the test as well!

Finally, running out of time, Jonathan jumped into his DynamicRecord presentation, where he had developed a method that was ActiveRecord compatible so that it could be integrated in the rest of a standard rails app, but actually queried against virtual tables that were created on the fly rather than actual tables on disk. Interesting stuff, and I’m looking forward to seeing this code pushed into OpenSource, Jonathan’s eventual goal.

Thanks to Jonathan for the great presentations, to Nick for running the presentation, to Tim for hosting the facilities and attempting to webcast the presentation, to Engine Yard for the pizza and T-shirts, and to all the members who made it to the meeting!

You can download the 3 presentations from the NHRuby site here: ReviewRamp, Cucumber, DynamicRecord, or view them online (Flash/JavaScript required) here.

Catching up…

It’s been busy, busy month, and blogging was one of many things put off. Now, it’s time to start catching up.

I had an awesome month of June. Working on my main client project, we released yet another update on 12 June. After that, I took two weeks “off” — at least away from billing — to do some professional upkeep.

I spent a few days studying and then took the two MySQL 5.0 Developer certification exams on Tuesday the 17th. I went to the Blended Solutions facility in the Mall of New Hampshire, adjoining the PSNH building on Elm Street in Manchester, NH, and took the two exams, back-to-back. The first exam was the simpler of the two. Reviewing all the questions a couple times, I was still done in under an hour. The second exam, though, was a bear! The material was the more advanced stuff, some of the questions were trickier, some of the topics were material I had only book knowledge on. I marked a bunch of questions for review, went back and filled in all the answers, reviewed and debated and over-thought a bunch of questions and then, with three minutes left, decided any answers I changed in a panic were more likely wrong than right, and stopped. I passed both exams with acceptable scores, but nothing I’d brag about. “What do they call the man who graduates at the bottom of his class in med school?” “Doctor.” So, I’m pleased to have the opportunity to establish my level of knowledge, flag a couple of areas I need to learn more about, earn a logo I can display as part of my marketing and gain a listing as a MySQL Enterprise Ready Partner.

Wednesday the 18th of June was the first day of the Red Hat Summit in Boston. I attended all three days, commuting from Contoocook to the Anderson Rail Center in Wilmington and taking public transportation from there. While it made for a lot of hours on the road, the savings over staying in town were significant (total parking and rail for the week: $84 for 6 days), and sleeping at home in my own bed very much appreciated. The Red Hat Summit was a fascinating event. I wasn’t that familiar with the corporate structure or the market focus of Red Hat and I got much better insights into who they are and what they do. Here’s a slew of links on what went on, Red Hat announcements, and links to presentations.

Parallel to the Red Hat Summit was the Fedora Users and Developers Conference, FUDCon10 for short, that shared the Hynes Auditorium facilities on Thursday and Friday, and met at the Photonics Center at Boston University on Saturday. Even though many Fedora participants are Red Hat employees, the tone and structures of the groups are dissimilar. I missed a lot of the last-minute organizational notes the FUDCon’ners put together to organize their HackFest, so I tended to attend the Red Hat sessions instead. In the future, I’m more likely to put more effort into the HackFest side of things. Saturday was a BarCamp, a one-day self-organized conference. As I noted at last year’s conference, the means of pitching sessions, voting, scheduling and running the show are put together on the fly, and the results are startlingly good. Having pretty much had my brain filled of tech at the Red Hat Summit, I chose instead to focus more on process sessions, and learned about bug triaging, web site usability issues, and Fedora structure. A great use of a day, and a great chance to attach faces to the name and shake a few hands.

Sunday was a day of rest for me, and a day of washing laundry for Laura. Thank you!

Monday found me back on the Commuter Rail, this time attending An Event Apart just across the street from the Prudential Center where the Summit had been. Two long days of sessions were focused on the web, primarily design and usability, very different aspects from the two previous conferences. Like the Red Hat Summit, this conference was a little outside my comfort zone, in this case, designers rather than developers. Jeffrey Zeldman puts on an incredible show; facilities were superb, speakers knowledgeable, swag cool. Eric Meyer is the authority in the field of CSS, and it was his sessions I got the most practical tools from, but all of the sessions were well-presented, informative and thought-provoking. Jared Spool of User Interface Engineering had a very funny and very insightful session on analyzing clickstreams for success that will have me restructuring some of my client’s web sites. All of the speakers had great observations on the state of the art and future directions. Great stuff! Several other people took great notes I can share with you.

Arriving back to work on Wednesday, there was no time to decompress; a day of meetings lead to a couple frantic days of shipping yet another release and picking up another couple of projects. Thirty billable hours later, my super-contractor did a high-five tag-team tag and was off on his own adventures, while I took over sheparding a release out the door on Friday with some new features, new team members, new procedures and new prototcols. Whew!

It’s been an exhausting three weeks, but an exhilarating time, too. Hope to blog more details as I catch up on all the other projects.

Continuous Learning Curve: Javascript

I’ve avoided spending too much time delving into Javascript. My four-year switch from Windows-uber-alles (including VFP, VSS, SQL Server, Ingres, Oracle, HTML, OLE, ODBC, SCC, COM, XML, MCSE, MCSD, XSLT, DCOM, RSS, MS Office, Exchange, MAPI Bad, SMTP Good, MVP and more acronyms!) to Linux-Apache-MySQL-Postgres-PHP-Python-Ruby, not to mention XHTML, CSS, bash, Smarty, Django, TWiki, dojo, et al had kept me busy enough. But a new client assignment needs a highly-interactive web site and dropping in great big globs of someone else’s Javascript is not going to solve all the problems; at a minimum, I’ve got to be able to read it, debug it and tune it for the client’s particular needs.

Did you know that a limited version of Safari, the O’Reilly online library, is included with a membership to the Association of Computing Machinery? I’ve been an ACM member for years and been meaning to get around to trying this out. My Javascript studies seemed the perfect occasion. I’m reading Shelley Power’s Learning Javascript online and getting quite a bit out of it. I love when you settle down with a book and start going “Oh, is that what that meant?” or “Now I get it!”

Check out NetVibes!

In searching for Prototype Windows and related JavaScript libraries to let us create portlets for a portal, we’ve run into a couple of pretty impressive contestants. The most recent is NetVibes, which appears to be both the name of the web site (“Build your own portal!” “Share it with your friends!”) and the underlying libraries and Universal Widget API specification. Very slick web site, very slick GUI libraries!

State of the Computer Book Market, Part 4 – The Languages – OReilly Radar

Over at O’Reilly, Mike Hendrickson posts State of the Computer Book Market, Part 4 – The Languages – OReilly Radar. Bear in mind in the world of lies, damned lies and statistics, these are statistics. Like measurements of job posting vs. languages, or web pages vs. languages, these aren’t an indication of what languages are in use out there, or what languages are suitable for use. This is just a measurement of what book titles sold the most, grouped roughly by language. If the best book on your favorite language is years old, it’s probably shown as small here. If a bunch of crappy books got published on the language-of-the-week, and the authors and publishers did a good job of getting a buzz going, it’s probably scoring high. Don’t use this to decide whether to use vi or emacs, tabs or spaces.

But it’s interesting data.

Notes from DLSLUG, 6-Dec-2007

Fourteen people made it to the December meeting of the Dartmouth – Lake Sunapee Linux User Group, held as usual on the first Thursday of the month and in what appears to be our new place, Haldeman 041, in the lower level of the building next to our previous meeting place.

“Nifties” was the theme, for any presentation that might elicit the reaction “Nifty!” from the audience, and they all did.

Roger Trussell presented a firefox extension using Javascript, XML (“XUL”) and SVG (Structured Vector Graphics, yet again more XML, but rendered by Mozilla as graphics) to create graphically complex interactive structures in Mozilla browser. Nifty!

Glen Page, newly appointed leader of the New Hampshire Society for Technology in Education talked about the happenings at the Christa McAuliffe Technology Conference (which also included presentations by well-known GNHLUG activists Ed Lawson, Bill Sconce and Matt Oquist)

Doug McIlroy showed us some tricks with qsort: qsort is an interface under which each developer could implement their own sorting algorithm, a common homework assignment. Doug argued that a properly designed data set could disappoint anyone who thought they’d created the cleverest quicksort EVER by always returned quadratic (slow) results. You can read the code here. Nifty!

Nick Sinnot-Armstrong: One Laptop Per Child XO-1 laptop: show and tell. A local developer experimenting on a pre-production model of the OLPC with the very capable microphone input (accepts both analog and digital for standard audio as well as measurement data). Nick gave us a tour of the laptop, passed it around for people to get a sense of the size and capabilities. Note that the OLPC charitable project “Get One, Give One” is going on through December 31st. Nifty!

Mike Diehn showed off some very powerful tips and tricks in bash and vi, and pointed to some handy resources at http://pixelbeat.org/ – Nifty!

Bill McGonigle demonstrated Munin, a monitoring and recording tool that’s a great add-on for a facility that’s trying to pick up on problems occuring over time, Built on top of RRDTool, it can record and remember a set of measurements over time. Bill showed how one of his web sites was experiencing a surge that was hurting performance and setting off alarms. By picking a set of parameters to monitor, Bill was able to work out that… well, you should have been there. Nifty stuff!

Bill has an interesting pointer to a project called FON. I’ve been reading through the web site on the FON system. Here’s how I read it: Home/businesses with the proper rights granted by their upstream suppliers can post this access point on their network. Internally, the host can use a private wireless access, encrypted with WPA2 or less. Externally, the WAP advertises itself as FON_AP, an open (no key) wireless access point. Other ‘Fonistas’ – registered members who are actively operating their own FON WAPS – can access the wireless for free. But the great unwashed masses do not get to access it for free. They get to pay for access. A FON pass will apparently let them use any FON WAP for a day. They can purchase it on the spot, or buy a bunch of passes and use them as needed. Not sure of rates or the fine print. The host seems to be able to set it up as a “Linus” and collect no fees themselves or as a “Bill” and share in the dividends that FON makes from paying access. It’s an intriguing business model.

Apparently, on Thanksgiving FON offered their WAP for free for a limited time, and Bill was able to get one, which he raffled off at the meeting.

And last, but certainly not least, Bill McGonigle demonstrated a pair of carol-playing, wireless, dueling-banjo penguins. Nifty!

Thanks to Bill McGonigle for organizing the meeting, to Dartmouth College for generously donating the use of the facilities, and to all who attended and demonstrated Nifties!

Should you buy software from a web-storefront-only operation?

A client had a demo web site developed by someone else and they were really excited about the interactivity. It was a very rich client application, with drag-and-drop and sizers and interactive widgets. The client wanted my team to use the same platform, which they thought was something-Dot-Net. Once we were finally able to chase down the developer, it turned out to be a commercial Javascript library. We looked up the vendor, and it is a curious site.

They have an online store, one of those generic things with box-shots of a product that’s download only (there must be an add-on for Photoshop or GIMP to make these fake boxes, don’t you think?), an “About Us” page that has the usual mission-statement-ish stuff, but no “Who We Are” or where they are, a “Customer Support” page that lets you submit a ticket online, no history, no searching. The only contacts are email addresses (generic, “marketing,” “legal,” “info” not “bobsmith@example.com”) and an 800-number I have no doubt is an answering service. There’s no online forum. It looks like no one’s home.

Searching about them in Google, there’s their web site, of course. There are a couple of mentions about XSS (cross-site scripting) and a few other exploits posted to the usual security sites, a good sign that someone is actually using the code. A couple of echos of their press releases. And… nothing. No user communities, either a forum on their web site or an ad-hoc third party set of posts. No additional information. No one posting anything, anywhere from @example.com. This is pretty strange.

So, what’s the deal? My best guess is that this is an off-shore operation without any US representation nor tech support, perhaps even no ability to provide support in English. Between a proprietary license and questionable support, I’ve recommended we do some more research and see if some of the open source or openly-available Javascript libraries can fulfill the client’s needs.

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.