Posts Tagged ‘code’

Announcing BD-review, a free platform for music reviews written using JavaEE

Wednesday, July 29th, 2009

BD-review is a dynamic website to allow people to review releases (albums, demos, EPs, singles) of (young, unsigned) music bands. The project is the outcome of the Internet Technologies course at the Faculty of Computer Science of the Free University of Bolzano. The requirements of the project were to build a website using a small subset of JavaEE technologies, without the use of web-frameworks.

A screenshot of a Review

A screenshot of a Review

The project is not really meant for production use. It was made as a strong, working and correct base for studying JavaEE academically. It should be useful for every student (also non-student) willing to have an overview on JSP and study it. The code is well-written, uses MVC, and the whole project is documented in detail in a 20+ pages report.

Read more on the project page, download the sources and play with it! Please let me know about your experience with BD-review code.

BD-review

Wednesday, July 29th, 2009

BD-review is a dynamic website to allow people to review releases (albums, demos, EPs, singles) of (young, unsigned) music bands. The project is the outcome of the Internet Technologies course at the Faculty of Computer Science of the Free University of Bolzano.  The requirements of the project were to build a website using a small subset of JavaEE technologies, without the use of web-frameworks.

Therefore, this project is not really meant for production use. It was made as a strong, working and correct base for studying JavaEE academically. It should be useful for every student (also non-student) willing to have an overview on JSP and study it. The code is well-written, uses MVC, and the whole project is documented in detail in a 20+ pages report.

A screenshot of a Review

A screenshot of a Review

I encourage to read the PDF report of the project. It contains detailed information about the analysis and design phases, as well as the architecture description, screenshots, problems found etc. Please read also the README file. It contains configuration instructions.

There is a running demo located on the evaluation server of the course, but I think it will be removed soon.

Quick Jump:

Vision

Requirements Implemented

Technologies Overview

Download

License

Vision

The aim of the project is to build a dynamic website to allow people to review releases (albums, demos, EPs, singles) of (young, unsigned) music bands. Users will be able to signal interesting materials and review them, while other users will be able to comment the reviews, too.
This web 2.0-oriented application should allow unknown talented musicians to achieve a higher notoriety but also to improve their productions.

Screenshot of the personal user page

Screenshot of the personal user page

Requirements Implemented

I report here the requirements of the course, all implemented by BD-review:
What BD-review implements is:

  • User Management
    • List existing users of the system
    • Creation of a new user
    • Deletion of the existing user
  • List and modify access rights of the users
    • check boxes with some capabilities (min 3)
  • User registration and login to the system
  • Items management
    • Users add, edit or remove items
    • Users comments or reviews items
    • Administrator can manage the comments (edit,remove, add)
  • Personalization
    • Salutation for a returning user
    • List resources that are new from the last visit
    • Customization of the layout for a class of users.
  • Techniques – MUST be used
    • Static HTML
    • CSS: all the look and feel must be in CSS files
    • Javascript: check input and manage menus
    • Servlet: Reading (parameters and headers) and writing headers and resulting page
    • Servlet: Session management with cookies and session object
    • Servlet: Redirect the client
    • Servlet: Forward to another page or servlet
    • JSP: Expressions, scriptlets and declarations Beans
    • DBMS access trough JDBC
    • Integration of JSP and Servlets (forward and include) using MVC pattern.

In addition, BD-review implements two Filters and plays with Regular Expressions.

Technologies Overview

  • J2EE technologies (JSP, Servlets and JavaBeans)
  • Database support (PostgreSQL 8.3) through JDBC 4
  • XHTML Strict 1.0 + Cascading Style Sheets 2.1 for presentation
  • Apache Commons for conversion and Bean population routines
  • Some utility methods found on Books and Internet (their provenience is cited in the sourcecode)
  • Javascript for confirmation system and form validation
  • Regular Expressions
  • TinyMCE rich WYSIWYG HTML editor
Screenshot: modifying a Review

Screenshot: modifying a Review

Download

PDF report of the project
Complete Source Code and Documentation (as Netbeans Project)

The Future

There will not be future developments for the project. It was not a real-life project but I will be very proud if you find it an useful example for learning JSP. You can also use it as a basis for developing a real project (also a University Project). You can do anything you want with BD-review, but please respect the license. I would be happy if you send me an email about your experience in using BD-review.

License

BD-review is released under The Gnu Affero GPL version 3! This is different from the license of the contents of the blog

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see < http ://www.gnu.org/licenses/ >.

BD-incollo 0.9 is out!

Sunday, July 26th, 2009

It took me about one year to find some time to enhance my project BD-incollo. I worked hard for 5 days and to add new features and fight the (huge) amount of spam that was wasting my database space. Now I'm very proud to announce bd-incollo 0.9, a free, light, speedy, anonymous Pastebin clone written in Python Django. This version introduces a lot of new features, including the possibility to make diffs between pastes, and fights spam using Akismet. Read more about the features on the project page and on the new News section on the website that makes use of BD-incollo, incollo.com .

BD-incollo 0.9 is free software as always, under the Gnu Affero General Public License 3.

Currently, you can:

  • Copy, Paste and store a text / source code snippet to the system
  • NEW! Give other people the possibility to discover your Paste (make a Paste either public or private)
  • Decide to colorize the syntax of the Paste
  • Share it using its URL
  • NEW! Enhance Pastes! Create a Paste starting from an old one
  • NEW! View differences! Makes use of the powerful diff-match-patch by Neil Fraser to see differences between two Pastes
  • NEW! Antispam protection using Akismet and akismet.py by Michael Foord
  • Download it as plain text
  • View it as plain text
  • Search something interesting through other pastes!
  • Report abuses to site admins

It also uses a very smart hash system that automatically re-computes a hash key in case of collision.

Here is an example of Paste: http://incollo.com/f341e6a4b
Here is an example of enhancement of the Paste: http://incollo.com/ba22929ac
Here is a full-screen diff of the Pastes: http://incollo.com/compare/f341e6a4b/ba22929ac

Play with them! Use incollo.com, spread it!

Road to 1.0

1.0 development will start after my next examination session (on September) and will surely include:

  • Some asynchronous improvements
  • The possibility to teach Akismet about Spam and Ham in Pastes (when admin user is logged in)
  • More cleaner code
  • The possibility to associate a user to its Pastes via a Cookie (always anonymous) and let him delete them
  • Comments to snippets?
  • What else? Contact me if you've got ideas!

Introduction To Software Testing

Sunday, July 19th, 2009

Elements and Concepts - A brief overview


Download PDF version of the whole document. You can browse the article online but I encourage the download of the PDF since it is written with accuracy.


Introduction

This document contains some basic concepts and definitions about software testing. It has been written for studying a part of the Software Engineering Project course at my University. It is composed by a summary of the intersection of more than 10 different sources, all of which are cited. If you feel that some contents of this publication belong to your intellectual property and it is not cited, please contact the author who is willing to correct any mistake.

The first part of the paper focuses on the definition of the most important key aspects of software testing. Then some information about input partitioning are given. What follows is a research about code coverage and two useful and famous tools, Control-flow coverage and Data-flow analysis. A complete example on using those tools is then given. The second half of the document also contains the definition of the most important software testing practices.

The goal of this tiny document is to clarify key terms and therefore become a base start for the reader to go in deep with the interested topics. Another goal is to give a simple but clear example about data flow analysis, as I realized that not all the people understand the examples around the Net.

Software Testing

Software Testing is an empirical investigation conducted to provide stakeholders with information about the quality of the product or service under test, with respect to the context in which it is intended to operate. Software Testing also provides an objective, independent view of the software to allow the business to appreciate and understand the risks at implementation of the software. Test techniques include, but are not limited to, the process of executing a program or application with the intent of finding software bugs. It can also be stated as the process of validating and verifying that a software program/application/product meets the business and technical requirements that guided its design and development, so that it works as expected and can be implemented with the same characteristics. 1

(more...)

Intel Graphic cards, Linux, Xorg and UXA performance boost

Sunday, June 21st, 2009

For people having Intel graphic chipset under Gnu/Linux, performance using 3D applications or Compiz-* window manager effects has always been a problem. Intel drivers for Xorg never gave problems but have also never been brilliant. I always looked around searching for xorg.conf tuning configuration entries.
Today I was simply browsing Ubuntu Wiki and discovered the UxaTesting page. I wanted to know something about UXA and Intel drivers, so I found a Wikipedia definition:

In computing, UXA is the reimplementation of the EXA graphics acceleration architecture of the X.Org Server developed by Intel. Its major difference with EXA is the use of GEM, replacing Translation Table Maps.

Yeah cool, the official Xorg Wiki Intel Graphics Driver page Gives also some more information, so if you've got one of these chipsets (you can verify using lspci | grep VGA ):

  • i810 and variants thereof
  • i815
  • i830M
  • 845G
  • i852GM
  • 855GM
  • 865G
  • 915G and variants (GMA 900)
  • E7221
  • 945G and variants (GMA 950)
  • 946GME
  • G33
  • Q33
  • Q35
  • 965G/Q
  • G35
  • G41
  • G43
  • G/GM/Q45

You may want to try out the new acceleration method by adding this line


Option "AccelMethod" "uxa"

To your /etc/X11/xorg.conf file, in section "Device".

Please note that:

  1. UXA is not yet stable as EXA. Try it out, signal your experience on the Ubuntu wiki page and fill out a bug if necessary
  2. You will need at least Xorg server 1.6.0
  3. You will need at least xf86-video-intel-2.6.2 drivers
  4. I don't think this is mandatory, but please tell me if you encounter differences when updating to 2.6.30.x kernel. I already have 2.6.30.0 on Sid so I don't know if with a previous version this is working

On Debian Sid I just had to add the Option line to my xorg.conf file.
The performance differences are noticeable and incredible. Everything runs faster and smoother.
My glxgears output went from 60 FPS (using EXA) to 425 FPS (using UXA).
This is a 700% performance improvement!

Some little updates

Friday, June 12th, 2009

I am so busy in these days. Today I was sick to study Mathematical Method For Physics, so I took the time to fix some pages of the blog.

First of all, I finally created a page for the Unipoli project to our Programming Project Java opensource Monopoli game. Give it a try, it's funny and free! You can obviously download the binaries and the code, as well as all the documents we wrote during analysis and design phases. You can even download or browse the Javadocs! Here is a screenshot:

Unipoli - Board Overview

Unipoli - Board Overview

Then I also updated my CV that unfortunately remains in Italian. I am a bit confused about which language to use  everytime I write something, sorry!