Monday, 27 April 2009

Optical discs to offer up to 500GB of storage

General Electric (GE) have just unveiled a new disc, the size of a regular DVD, which can store up to 500GB of data (equivalent to 100 DVDs).

That is quite impressive if compared to Blu-ray discs which can "only" store between 25GB and 50GB.

The reason these optical discs offer so much more capacity is that they store the information in three dimensions, unlike traditional DVDs where the data is stored as pits on the surface of the disc.

In fact these micro-holographic discs could theoretically store more than 500GB as the amount of data depends on the amount of light that can be reflected by the holograms. The General Electric team working on these discs is quite optimistic and believes improvements can still be made, thanks to new materials.

Now I have 2 questions:

  • Do consumers really need that amount of storage space?
  • At how many GB will the îndustry say: Ok that's enough we have reached the ideal storage size?

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

Wednesday, 15 April 2009

Solving: "Must issue a STARTTLS command first" for PHP's mail function (using Google's SMTP Server)

My ISP previously provided their own SMTP Server. The PHP configuration for sending e-mails was then relatively simple (php.ini file):

[mail function]
; For Win32 only.
SMTP = smtp.freesurf.ch
smtp_port = 25

; For Win32 only.
sendmail_from = <e-mail username>@freesurf.ch

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

Unfortunately my ISP switched their e-mail accounts to Google's Gmail. I tried to use a similar configuration:

[mail function]
; For Win32 only.
SMTP = smtp.gmail.com
smtp_port = 25

; For Win32 only.
sendmail_from = <e-mail username>@gmail.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

The problem was that I kept getting the following message from Google's SMTP Server:
"530 5.7.0 Must issue a STARTTLS command first."

The reason for this is that gmail uses secure (TLS) servers to prevent spam.

There are several ways to resolve this problem (one way is by installing a SMTP server on your localhost) but here is the easiest way I found:

As I was using XAMPP I had already installed the "fake sendmail for windows". If you are not using XAMPP you can download it here:
http://glob.com.au/sendmail/sendmail.zip

I then modified the php.ini file to use it (commented out the other lines):

[mail function]
; For Win32 only.
; SMTP = smtp.gmail.com
; smtp_port = 25

; For Win32 only.
; sendmail_from = <e-mail username>@gmail.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"

Ignore the "For Unix only" comment, as this version of sendmail works for Windows.

You then have to configure the "sendmail.ini" file in the directory where sendmail was installed:

[sendmail]

smtp_server=smtp.gmail.com
smtp_port=25
error_logfile=error.log
debug_logfile=debug.log
auth_username=<username>
auth_password=<password>
force_sender=<e-mail username>@gmail.com


The configuration is nearly over but not completely, you will still get the message: "Must issue a STARTTLS command first".

To solve this problem you need to download the following zip file:
http://glob.com.au/sendmail/sendmail-SSL.zip
and install its contents in the sendmail directory. That will make sendmail.exe TLS compatible.

That's it. I hope this will be useful to some people.

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

Tuesday, 14 April 2009

Ant script for renaming Java files to Groovy

At the moment I am starting to study Groovy, which is an alternative language (to Java itself) that can be used on the Java Platform.

It's main advantage (over Java) is its "expressiveness", meaning that the same program can be written using less instructions, hence theoretically increasing productivity. In that regard it is quite similar to Smalltalk.

Groovy is a superset of the Java language. This means that any Java program is by default also a Groovy program (the opposite not being necessarily true). I created a very simple Ant file that enables me to convert all my .java files to .groovy (and back again):

<project name="Groovy" basedir="." default="javaToGroovy">

<target description="Changes Java file names to Groovy" name="javaToGroovy">
<move todir="" file="src">
<mapper type="glob" to="*.groovy" from="*.java">
</move>
</target>

<target description="Changes Groovy file names to Java" name="groovyToJava">
<move todir="" file="src">
<mapper type="glob" to="*.java" from="*.groovy">
</move>
</target>

</project>

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

Monday, 13 April 2009

Easter Eggs

I saw an interesting feature about "easter eggs" on BBC's "Click".

Easter eggs are hidden bonuses or extras available on commercial products (Software, DVDs, etc.) and usually accessible using a "secret" key combination. Easter eggs are created by a member of the development team trying to escape from the monotony of his usual day to day tasks. It also adds a "fun" part to the product.

The trend is however heading towards a reduction of easter eggs because they add to the overall size of software, which is usually already quite big nowadays.

To see an example of an easter egg go to:
http://www.google.com/

Type "Google easter eggs" in the search field then click on "I'm Feeling Lucky".

You will then be able to play a fun game created by Ken Perlin :-)

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

Sunday, 12 April 2009

Problem logging into Magento after installation

If you have just installed the Magento online-shopping cart system onto your "localhost" and are having trouble when you log into the backend-part:

Try replacing:
http://localhost/<path_to_magento>/index.php/admin/

with:
http://127.0.0.1/<path_to_magento>/index.php/admin/

The reason for this bug seems to be that Magento does not recognise "localhost" as being the equivalent to "127.0.0.1" (the localhost's IP Address) and only "127.0.0.1" seems to work. This seems to be a strange bug that I have never experienced in other applications.

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

Friday, 10 April 2009

Choosing between PDF Clown and iText

I was looking for a Java library to manipulate files using the PDF (Portable Document File) format. The two obvious possibilities seemed to be:

BTW This isn't a detailed comparison but a general impression of the two products (a gut feeling)...Hmm decisions, decisions....

I downloaded both JARs and checked out the documentation. I soon realised that there was a big difference in the quantity of documentation available (iText has a lot more). Which makes sense since Bruno Lowagie (iText creator) has been working on the library since about 1999 while PDF Clown is relatively new.

I started out by installing the Jar files in Eclipse and trying out a simple example. Unfortunately I seemed to have a small problem with the PDF Clown example (SerializationModeEnum.Compact mentioned in the UserGuide didn't seem to exist) while the iText example worked fine.

I also then read the following note about PDF Clown: "This project is young, so that it's to be considered UNSTABLE. Feel free to experiment with it, but DO NOT use it in a production environment (so: beware!)" at: http://www.stefanochizzolini.it/en/projects/clown/downloads.html#License Needless to say it didn't really fill me with confidence for PDF Clown ;-)

On the other hand iText has been used successfully by numerous commercial and open source applications: Macromedia ColdFusion (now belongs to Adobe), Jasper-Reports, Eclipse/BIRT, Google Calendar, etc.

For these reasons I decided to go with iText.

The main inconvenient with iText is that it doesn't properly implement the MVC (Model-View-Controller) pattern, meaning that it doesn't give the possibility to properly separate content and presentation.

The fact that I chose iText does not mean that PDF Clown is without merit: I like the object-oriented approach Stefano Chizzolini has taken. I simply feel that the library needs a bit more time before truly becoming mature.

If following this article people are interested in using iText I would advise to get Bruno Lowagie's book "iText in Action": http://www.1t3xt.com/docs/book.php which is pretty much a definite guide.


Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

Open Source Software to open PSD files

I am working for a webdesign company, creating Joomla templates. The problem we had is that they do all their web design in Photoshop and then export it as .psd (Photoshop Document) files. Unfortunately I don't have Photoshop and it didn't really seem worth it to buy Adobe's (expensive) product just to edit PSD files. So I tried looking for open source (or freeware) alternatives.

The best option I found was GIMP (GNU Image Manipulation Program):
http://www.gimp.org/

which is not only a nice .psd editor but also a good image manipulation program available under the GPL (GNU General Public Licence).

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share

IT Curious Blog opening

Hi

My name is Martin McNulty. I live and work in Zurich (Switzerland). I am a Java Developer/PHP Freelancer and have decided to start this blog in order to address small problems I encounter (or small choices I make) when working on projects.
Hopefully this blog will be useful to other people having the same problems or facing the same decisions.

Please bookmark, your votes are noticed and appreciated:
Bookmark and Share