Archive for the ‘programming’ Category

review – programming collective intelligence

Monday, January 12th, 2009
Cover - Programming Collective Intelligence
copyright O’Reilly Media, Inc.

Programming Collective Intelligence: Building Smart Web 2.0 Applications
by Toby Segaran
2007 O’Reilly Media

Rating:

Late last spring, maybe early summer, I picked up a copy of this book. I didn’t really have time to engage it until a little before the fall semester started as I included it in a class. The more I worked through the text, the more I realized that this book is a lot of fun. It’s not for the novice or those who want things more fully explained.

Still, if you want to learn a great deal about how to perform mining on data openly (mostly) accessible on the web with the understanding the technical details are often left to the reader which may mean much investigation outside the text, I highly recommend it. As I said, it’s fun.

(more…)

learning java

Monday, January 21st, 2008
Cover - Learning Java
copyright O’Reilly Media, Inc.

Learning Java, 3e
by Patrick Niemeyer and Jonathan Knudsen
2005 O’Reilly Media

While looking for a different text to use in IST 240, I found the text Learning Java by Niemeyer and Knudsen. This book has done nothing but impress me. While in the end it might make for a difficult text to begin programming in Java for the lesser experienced, as many O’Reilly texts can be, it is going to be a solid addition to the bookshelf of an aspiring information technologist. Hopefully this title will continue to evolve.

For a few semesters, I had been using Java in 60 Minutes a Day by Rich Raposa. That text was well received by the students and the content spanned the core material I needed for the class as well as advanced topics (Swing, network programming, JavaBeans, database programming) that interested students could engage if they so desired. Unfortunately, the book has become significantly dated. It is based on Java 1.4 and so is missing topics introduced in Java 1.5, generics being one of more important topics.

(more…)

desktops no longer on the desk

Monday, September 10th, 2007

I recently ran across a rather significant AJAX application. Perhaps “meta-application” is the better term. Ajax13, a company that has pushed the envelope with what is possible with Ajax and web-applications, has developed an Ajax-based desktop environment called ajaxWindows. There is a demo mode that is accessible and is worth checking out.

ajaxWindows provides a virtual desktop. Ajax13 describes it as a virtual operating system, as well as webOS, but I’m not sure I would agree with that description. From the point of view of needing to describe what it is to the general public, it is probably a reasonable moniker but it is rather misleading. An OS has so many more responsibilities than providing a user interface. It is missing many of the elements that make up an OS such as process/thread management, memory management and hardware management.

What I would call ajaxWindows is a framework. It enables (certain) web applications to work within its context. In addition to displaying the user interface in the virtual desktop, the application can access the virtual file manager to let the user organize and save files.

Whether you view ajaxWindows as an OS or a framework does not diminish it’s capabilities. For the most part, users will not be interested in anything more than being able to access and manage their space and applications from anywhere. And it is certainly an insanely extraordinary demonstration of what the web can be. Below I give some thoughts on the features and behavior of ajaxWindows.

(more…)

moore’s law and more

Tuesday, July 3rd, 2007

In April, I attended CCSC-NE 2007 and the keynote on Saturday was given by Dr. Mary Jane Irwin who is currently the Chair in Engineering in the Penn State Department of Computer Science and Engineering (among other things). Her talk was titled, “Impacts of Moore’s Law: What Every CIS Undergraduate Should Know About the Impacts of Advancing Technology” which essentially discussed three basic issues: the use and advancement of multi-core processors, the supplying and conservation of power and the “inevitable increase in hardware faults”. (The talk’s abstract on the main conference page as well as access the presentation slides.)

Moore’s Law was a conjecture that the number of transistors contained on a processor chip will double every two years. This has essentially been the case and has further been extrapolated, by Ray Kurzweil, to identify the “quadrupling of computational power” (see Kurzweil’s “The Law of Accelerating Returns”, which is an interesting read itself). As is probably quite obvious, and has been explicitly noted, the shrinking of transistors can only progress so far since atoms are only so big. (Kurzweil, in his article, identifies 2019 as the target date.) The inclusion of more transistors gives rise to power and heat problems. As Irwin points out, developing multi-core processors is one alternate way to make improvements.

(more…)

learning languages

Tuesday, March 13th, 2007

It looks like I might have a busy summer. A recent article on InformIT.com discusses what languages are worth knowing – if you are out to know languages. The premise being that you will become a better programmer, and learning new languages will become easier, as well as it provides you better framework for understanding how systems are built and why they work they way they do.

I’ve often explained in classes (remember that most of my students are IST students and not necessarily heading towards software engineering) that learning how to program is imperative to their ultimate success. It’s hard to imagine that any position they take wouldn’t require some level of programming – even if it is in the form of configuring – since computer science, and programming in particular, has been the foundation on which systems have been designed.

While languages don’t explicitly give rise to the machines, nor do machines explicitly give rise to languages, there is a natural cycle to their relationship: A language enables a machine to do specific types of tasks. We observe that the machine could do the tasks better (e.g., multitask) but there is a shortcoming in the language. Languages are created -or evolve – to solve the shortcomings and, in turn, machines are designed to better accommodate the new features of the language.

(more…)

friends in c++

Saturday, March 3rd, 2007
“… much as in real life, friends are often more trouble than they are worth.”
Scott Meyers
Effective C++

Friend classes in C++ are one of the oddest constructs. Despite their existence in the language, pretty much every discussion you encounter on the topic says it is best to avoid them. In fact, as other object-oriented languages have demonstrated, you don’t need them. Consider SmallTalk whose purist approach to object-orientation prevents objects of the same type from accessing each other’s private data. This, however, can result in rather awkward interfaces. As a simple example, if this were the case in C++, the following class could not be implemented as it is defined

class Audio {
private:
 
    AudioStream audioStream;
 
public:
 
    Audio(String audioFilePath);
 
    // Assume the obvious.
    //
    void moveTo(double timeInSeconds);
 
    void splice(Audio &source, double atTimeInSeconds) {
        moveTo(atTimeInSeconds);
        
       // Assume an AudioStream has an insert() operation defined.
       //
       audioStream.insert(source.audioStream);            
    
    }
        
}

The problem would be that the operation splice() attempts to access the private attribute audioStream of the incoming source object. To solve this, the Audio class would need to define an
accessor to access the raw audio stream. This is probably not the intention of the designer since it doesn’t make sense to publicly make available such information.

For the most part, when explaining object-oriented programming, we make a big fuss about information hiding and designing for objects that expose only the bare essentials to the world, zealously protecting their personal memory. We try to use every conceivable metaphor and picture to illustrate the concept. Friends completely circumvent these ideas.

(more…)

my other clock is custom

Sunday, February 18th, 2007
Clock screen capture

Post title credited to my brother-in-law.

I’m a little overdue for a post but I’ve been working on and off with trying to create a clock for my desktop. Sure, I could use Yahoo! Widgets. They are very visually appealing but I’ve had problems with the Widgets in the past. They’ve probably improved things since I last used it. Aside from the issues I had with the engine, I like to tinker. I want to know how the widget engine gets the job done. So, with a pot of strong coffee brewing in the background and metaphorical rolling up of my sleeves, I engaged the problem. Besides, with my obsession to know what I don’t know it means I get to avoid other pressing tasks like taxes, laundry and finding a local place to get good bagels.

Why do I need a desktop clock? Recently I decided to remove the clock from my system tray. It takes up valuable real estate on the task bar and I only use it here and there. Plus, the desktop clock has both aesthetic and utilitarian appeal. In the end, to solve the problem I used C# for raw graphics rendering and Gimp 2 to create the clock face. Along the way I encountered a number of issues which I will address here.

(more…)