GCN Tech Blog

By GCN Staff

Blog archive

Not only the new glitters

Even the most rational info-tech journalist can get caught up in hype. Good thing skinning a few knuckles on an actual project can jolt one into a more pragmatic view. We're just wrapping up a technical feature story on new Web application platforms, a story that will appear next week. We're going to get you caught up on a lot of exciting new technologies'Ruby on Rails, Ajax, ASP.NET, Flex. We're actually excited about all of these new ways of enhancing Web content.

So when we decided to build our own Web application last weekend, a simple page that included a function that would automatically count down the number of days left until an upcoming event, we knew that any one of those technologies could tackle the problem.

The problem was, not being intimately conversant in any of these technologies, we saw that each potential approach as one involving a long climb up a learning curve, not the kind of hike we wished to take on a sunny Sunday afternoon. And we kept looking. Sure, Perl could work, but the technical forums advised installing specialized math modules, and the project would still require digit-by-digit conversions from the Unix timestamp. Plus Perl's dense syntax always gives us a headache ('Write once, read never' one programmer quipped to us). Another forum suggested even writing a C program for the task.

In the end, the software we found could do the job most simply was a trusty old standby, the Unix BASH shell, along with the almost-antique Common Gateway Interface. After a bit of digging, we found that BASH could subtract one date from another, as long as you remembered to convert the strings into actual numbers. Once we figured that out, we then wrote an entire Web page as one long BASH echo statement. We established variables to represent the calculated numbers. Once it all looked pretty, we set permissions and threw a few headers on top of the script so that the Web server's CGI would parse the file correctly when it was called by a Web browser.

Even with our rudimentary scripting skills, there is a lesson here: Look for the best tool for the job, and don't stop searching at the latest and greatest. CGI, which has been kicking around for over a decade now, is offered by just about every Web hosting service in the world. BASH hails back to the late 1980s, and comes with every distribution of Linux. For us, both were readily available, both were free and they both did the job quite nicely.

--Posted by Joab Jackson

Posted by Brad Grimes, Joab Jackson on Jul 10, 2006 at 9:39 AM


  • Telecommunications
    Stock photo ID: 658810513 By asharkyu

    GSA extends EIS deadline to 2023

    Agencies are getting up to three more years on existing telecom contracts before having to shift to the $50 billion Enterprise Infrastructure Solutions vehicle.

  • Workforce
    Shutterstock image ID: 569172169 By Zenzen

    OMB looks to retrain feds to fill cyber needs

    The federal government is taking steps to fill high-demand, skills-gap positions in tech by retraining employees already working within agencies without a cyber or IT background.

  • Acquisition
    GSA Headquarters (Photo by Rena Schild/Shutterstock)

    GSA to consolidate multiple award schedules

    The General Services Administration plans to consolidate dozens of its buying schedules across product areas including IT and services to reduce duplication.

Stay Connected

Sign up for our newsletter.

I agree to this site's Privacy Policy.