Posts

Are DSLs simply XML Hell?

DSL : what is it ? You have used a Domain Specific Language. Trust me. Demystify DSL: it simply a narrowed and specific semantic problem that solves a narrow set of problems. Model-View-Controller (MVC) is a common pattern for Web development, Apache Struts has come to the rescue in the past. Each Struts application uses a configuration file (XML). The language (dialect) of the XML specifies exactly how the MVC pattern would be implemented for the specific implementation this is DSL. Object Relational mapping was a common problem made worse by general purpose languages and APIs(e.g. Java and JDBC), along came the a natural ORM (e.g. Hibernate) with specific configuration files that mapped POJOs to Tables. The configuration file (XML) supported a dialect (ORM DSL), of course it was not called DSL back then they were simply configuration files (aka XML Hell). DSLs don’t necessarily mean XML. For example, running rules in Java was ‘simplified’ by a Rules Engine implementation e.g. J...

EJB 3.1 (Asynchronous Beans)

Image
Enterprise Java Beans specifications have finally matured to a point where it may actually help with performance: container-managed Asynchronous beans. You can now specify a Session Bean (and/or a method) to be asynchronous. End-user perceived wait times can be significantly reduced with an asynchronous programming model that doesn’t force the complexity of AJAX, MoM or application-managed server threads. With EJB 3.1 when you call the method from your client, the container will take the request and return immediately. Then it will dispatch the request to a bean instance within the pool of SLSBs. The return type for async methods is either void or Future. The Future interface provides methods to check whether the operation has completed, gets the result – with options for a timeout and also cancel the operation. A concrete implementation of Future is AsyncResult which is available in the javax.ejb package. Stateless EJBs may choose to return the AsyncResult object with any typ...

Google Chrome @ 5% (almost)

Image
Google Chrome is now the 3rd most popular browser in the world. According to recent reports here and here , Google's Chrome has overtaken Apple's Safari in the browser wars. While still at less than 5% chrome is no match for Microsoft's Internet Explorer which is slightly above 62%. Chrome is gaining strength quickly mostly due to two quality attributes: speed and reliability. Chrome is noticeably faster than Opera, IE, Firefox and Safari. It's reliability is unsurpassed due to its multi-process architecture. Coming in at #3 just months after it's GA release is commendable. With new features like bookmark sync and support for themes and plug-ins it will rival the # 2 spot in a couple years, eating away Microsoft's and Mozilla's share.

SSH and Strawberry Perl

Image
Strawberry Perl doesn't come with SSH modules pre-installed. Here is how to insall C:\>perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9304) ReadLine support enabled cpan> install Net::SSH Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (connect: timeout)] As a last ressort we now switch to the external ftp command 'C:\WINDOWS\system32\ftp.EXE' to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp3104'. Doing so often leads to problems that are hard to diagnose. If you're victim of such problems, please consider unsetting the ftp config variable with o conf ftp "" o conf commit I would like to connect to one of the following sites to get 'authors/01mailrc.txt.gz': http://www.perl.org/CPAN/ ftp://ftp.perl.org/pub/CPAN/ Is it OK to try to connect to the Internet? [yes] yes Fetching with LWP...

ADSL on Ubuntu 9.10 (Karmic Koala)

Image
Working with ADSL modems on Ubuntu 9.10: Configure: pppoeconf sudo pppoeconf Check: rohit@lenovo:/etc/network$ more interfaces auto lo iface lo inet loopback iface dsl-provider inet ppp pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf provider dsl-provider auto eth0 iface eth0 inet manual Start: pon rohit@lenovo:/etc/network$ sudo pon dsl-provider Plugin rp-pppoe.so loaded. RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5 Stop:poff sudo poff Log:plog rohit@lenovo:/etc/network$ plog Dec 8 16:37:45 lenovo pppd[11102]: Plugin rp-pppoe.so loaded. Dec 8 16:37:45 lenovo pppd[11102]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5 This method works well for BSNL's ADSL lines in Kolkata.

Download HD Trailers from Apple Trailers

Apple movies now 'stream' mov files, they cannot be saved (like they us. for example, if you view the HD movie trailer for the movie "GOOD" - the URL on the page leads to this stream: http://movies.apple.com/movies/ifc_films/good/good_1080p.mov Saving link creates a mov file of 75k - not the movie. In order to download, add the letter 'h' (Hidden) to the movie file name: wget http://movies.apple.com/movies/ifc_films/good/good_ h 1080p.mov HD-Trailers.net has an article on this and a tip for Yahoo HD Movie Trailers - which I've never used...

The Green Way to Fax (paper-less)

Image
If you are like me and work with PDFs a lot, often times you get PDFs that you may need to PRINT and sign, then fax - because they can't accept e-mails etc. PRINTing and Faxing wastes Paper on both sides.  There are many FOSS tools in Linux that allow you to edit PDFs, insert Text and images. Use PDF Editor to open a PDF document, and open it for editing  You can insert text and/or images (like a scanned ink signature) Once done, simply save it as a PDF, or JPG image. Now you have an electronic document filled out and 'physically signed' to be faxed away PDF Editor provides a very good interface to open a PDF and edit it in multiple ways, repackage and save it as a PDF. Go to Ubuntu Software Center and search for 'PDFEditor' Related articles: http://koan.studentenweb.org/software/jpeg2pdf.html Edit PDF Documents In Linux With PDF Mod 2 Ways To Annotate Your PDF Files Online