Monday, April 30, 2007

Java maturity

See the time this entry was posted. This reflects Java maturity. I decided to post this entry to remind me about some points and facts about the Java Platform and I put the words of another person in my mouth but this line of thought I share.
GPL Java could not have come at a better time to make a run at the Linux desktop, thanks in part to Microsoft releasing Vista. Whatever one's feeling about Microsoft, they are often a trend setter. So far, when it comes to moving away from harder to work with, bug prone, and security hazardous languages like C and C++ for desktop application development, Microsoft has been ahead of the game. The shift away from C++ to Visual Basic was the start of the trend, but with Vista, and Microsoft's movement towards "All new desktop applications should be written as managed code in .NET", the ante is now significantly higher. Developers in the world of Windows desktop applications are now being encouraged to write their new applications in managed .NET code that makes their lives easier and less error prone, as well as avoids major causes of security holes like buffer overflows. Linux desktop programmers, however, are still doing most of their work in C or C++, where they are still managing memory by hand, still getting routine segmentation faults because of memory management problems, and still dealing with the security hassles of C and C++. The time is definitely ripe for a change in the way developers write desktop applications for the Linux platform. In fact, that change is long overdue.

If Linux desktop application developers are going to make the transition to more productive managed languages, like Windows developers are doing, there are only two real platform choices they have: The Novell sponsored Mono project, or Java.

To me, Java seems like a much more solid choice for several reasons. For one, it has a substantial head start on Mono, with over five more years of development behind it than Mono. Java is already a very stable and mature platform, where as Mono is still evolving quite rapidly. Also, Java has a vast collection of open source tools and libraries available to help with just about any type of development that one might want to do--something that Mono can't even begin to match yet. Furthermore, Java has a much larger development community in place already, and remains the most popular language for open source projects on SourceForge, as well as on FreshMeat.net, where Java has 5383 projects compared to only 284 for C#--making Java nearly 19 times more popular than C#. And finally, Mono is doomed to always lag behind the official .NET implementation due to the fact that Microsoft's actual implementation is completely closed source. Now that Java is open source under the GPL, the open source GPL version will always be up to date, since it will be the "official" implementation. Mono also has a hidden licensing trap that Java does not. Because the class libraries are licensed under the MIT license, which has virtually no restrictions on what can be done with the software, companies can conceivably patent their improvements or modifications on the libraries and then enforce those patents on anyone else making use of of the improvements or modifications. There is an interesting article on NewsForge about this problem. It's a little old, but still good reading.
(http://www.newsforge.com/article.pl?sid=02/02/19/1651244)

OK, granted I may be a bit biased in favor of Java. But I think my above points were at least reasonably objective as to why Java makes the best choice for the future of the Linux desktop. With the open sourcing of Java under the GPL, Sun has removed that final barrier to entry, since all of the performance, or "it doesn't look native" arguments are no longer valid.

And finally, both Linux and Java benefit from using Java on the Linux desktop, since both of them want the same thing, and can mutually contribute towards the same goal. Both Linux and Java want greater desktop market share. Java can give this to Linux by providing a more productive, more secure, and easier to debug platform for writing applications, as well a platform so that applications written in it can also run on Windows. This helps protect the developer's investment in a minority platform when it comes to the desktop. And Linux has something to offer Java as well: a second chance at becoming a major player in the desktop application arena. Linux is slowly but surely gaining desktop market share. Java can help it grow, and also grow with it. It could be that desktop Java and desktop Linux are a match made in heaven.

I read this commentary in a Javalobby.org eMail sent to me on Tuesday, March 06, 2007 from Mike Urban and if you want to read all of that entry by yourself link to this

Thursday, April 12, 2007

On Spring Framework

When I started to study Java back on 2002 I attended a course on Websphere Application Developer or a name like that based on the version fourth of the product. Since then I spent many hours surfing the internet in search for information about the J2SE and documents about Java in any category. From the course I was linked to www.theserverside.com, and this was my first source for news on the Java platform, and this led me to another sites as well. Soon I acquired a book named Expert One-on-One J2EE Design and Development by Rod Jhonson on Mar.23/2003 which became a classical book. Based on the ideas exposed on this book and the source code included for this book, a new framework was born, named Spring Framework and a site is devoted to this one found at www.springframework.org and the final release for version 1 was due on March.24/2004 more here. And now I am fond of this framework and it is directing my thoughts in the Java space, which has led me to collect many resources for this fabulous framework which I will post here on the Spring Framework tag, coming soon to a blog near you. Now the spring framework is in the version 2 series. Have a look here. And a good blog about spring issues maintained by Craig, Walls writer of the Manning book Spring in Action.

Monday, February 05, 2007

Do you know the meaning of OOP, RAD, ORM, DRY, KISS, TDD?

Do you know the meaning of OOP, RAD, ORM, DRY, KISS, TDD? Again! Well, if you are a technician as I am and specifically for Software development you should be familiar with these terms, but if you don't then take a look a this article

  • OOP: Stands for Object Oriented Programming or as of Wikipedia http://en.wikipedia.org/wiki/OOP
  • RAD: Stands for Rapid Application Development or as of Wikipedia http://en.wikipedia.org/wiki/RAD
  • ORM: Stands for Object Relational Mapping or as of Wikipedia http://en.wikipedia.org/wiki/ORM
  • DRY: Stands for Don't Repeat Yourself (also known as Once and Only Once or Single Point of Truth --SPOT-- or as of Wikipedia http://en.wikipedia.org/wiki/DRY
  • KISS: Stands for Keep It Simple Stupid or as of Wikipedia http://en.wikipedia.org/wiki/KISS
  • TDD: Stands for Test-Driven Development or as of Wikipedia http://en.wikipedia.org/wiki/TDD
NOTE: All entries to Wikipedia are typed in the search engine, thus you may encounter many definitions thus openly knowing other meanings to the acronym being referred to here.

I hope you had refreshed your memory, don't you?

Well, It has been a long time since....

Well, since Aug.26/2006 I have not fed this blog with another entry. I intend to use more and more the blogging system and as such I intend to publish more articles. I am getting to the point in my life where this is necessary as a full structural life-planning is on the way. My last 2 to 3 years have been spent fulfilling many unfinished task such as my College Grade and this year is the culmination in that effort as this is the last semester taking classes and continuing the graduation process which consists in making a thesis proceeding and other stuff. Last year I met a wonderful woman and other parts are beginning to evolve. I am unemployed up to date but many opportunities are on the way and I feel more and more tied to God. But this blog is about me and my technical affair (if you want other material in my natural language use my cousin blog -- see about me entry for details).

More entries are to come on the way, keep in touch.

Friday, August 25, 2006

A very simple cite to muse about.

Today in my readings I came to the site Open Source live and maybe in the future the following cite is taken out of this site but I wished to have here in my blog to remember once I saw it and to muse again on its meaning. I don't know the owner or who wrote the cite.
Here it is
I HEAR and I FORGET.
I SEE and I REMEMBER.
I DO and I UNDERSTAND.

Friday, August 11, 2006

See for yourself

Well, here is a funny image that requires no explanation whatsoever.


So think an stupid question and go to the society, perhaps it gets answered.

Say no to sending MS-Word documents over eMails

This is an article as Tom Kyte points out to this just say no to send MS-WORD where the author for the article gives many reasons not to send ms-word documents inside an e-Mail message because the format is fixed, not everyone has the correct version, etc, so, I encourage you to read the article to learn what is actually happening with this reasoning.

Thursday, August 10, 2006

My Chinese Name spelled

Recently a friend of mine pointed me a site where I could find my name written in Chinese characters. You can go to that site here and if you want to see my name there point to this link, but if you are lazy at going there, here it is shown below:
First is the Carlos part



Then it is for Adolfo part


Well and if you want to see my new site to see my photos you can link to here enjoy.

Sunday, July 30, 2006

My ICQ Test

I recently took a Tickle for the classic IQ test (click here to get one) and got a grade of 113 or as they quote:
"Your Intellectual Type is Precision Processor. This means you're exceptionally good at discovering quick solutions to problems, especially ones that involve math or logic. You're also resourceful and able to think on your feet. And that's just some of what we know about you from your test results."

It is interesting my result provided that some questions were guessed, what would have come about if a hard reasoning to those guessed questions would have been made, perhaps a higher grade, or lower grade. I think this is good to me.

Monday, July 03, 2006

On Asimov's rules of robotics

I have always been amazed by Issac Asimov's literacy. He coined what in scince fiction are called the three laws of robotics.
  1. A robot may not harm a human being, or, through inaction, allow a human being to come to harm.
  2. A robot must obey the orders given to it by human beings except where such orders would conflict with the First Law.
  3. A robot must protect its own existence, as long as such protection does not conflict with the First or Second Law.

You can find the complete explanation at the wikipedia here. He was a wise man, he wrote more than 700 books and was an encyclopedic wisdom. And after these rules some other things are patterned. This note is inspired by having read the following article posted in www.onjava.com named What's New in Eclipse 3.2 Java Development Tools which states as in the following quote
The JDT compiler was originally written for VAME, and modified for Eclipse. It was built on what the developers call "The Three Rules of Compilation," patterned after Asimov's rules of robotics:
  1. Correctness: A compiler may not harm a source program.
  2. Efficiency: A compiler must be fast, except where speed would conflict with the first law.
  3. Friendliness: A compiler must assist the user to correct programming errors, as long as such assistance does not conflict with the first and second laws.

Thus this is to me a way to apply wisdom to extend knowledge.

Thursday, April 27, 2006

Colombia Needs an Irish-Style Economic Tonic

This seems a perfect place to reproduce this magnific article by MARY ANASTASIA O'GRADY, hope you have time to read on. Comments if you wish are appreciated.

By MARY ANASTASIA O'GRADY
April 8, 2005
BOGÓTA -- In an address to a mournful nation here on Saturday, Colombian President Alvaro Uribe likened His Holiness Pope John Paul II to a "gladiator of democracy." Mr. Uribe recalled an audience he once had with the head of the Catholic Church. Colombia , he said, with "its difficulties and tragedies, its possibilities and unique people, occupied a special place among the concerns and affections of the Pope."

Surely, the feeling was mutual. It's hard to think of another country in Latin America where the Pope's message to "be not afraid" in the face of tyrannical terror so powerfully resonated. Colombian security has been greatly enhanced under Mr. Uribe's courageous leadership, and though the war is far from over, he must now address another of the Pope's great concerns: the poor. Indeed, as the president himself has said, the resolution of the conflict is not purely military. To secure the gains of democratic security, Mr. Uribe needs to deliver free-market capitalism.

To that end, Mr. Uribe need look no further than Ireland, a Catholic nation once hopelessly mired in poverty, dominated by socialist thought and somewhat fatalistic toward what seemed a hopeless plight. It is true that Ireland wasn't fighting a guerrilla war in 1987 when it began to think outside the box of conventional wisdom, but its fiscal picture was no less grim. Spending cuts helped, but it was the adoption of a rather unorthodox approach to tax cutting that gave the country an almost surreal boom. At the end of the 1990s, Ireland had a higher GDP per capita than Great Britain or Germany.

If Ireland can be the Celtic Tiger there is no reason why Colombia can't become the South American Puma. It is the perfect Latin American candidate for the job, with a popular democratic leader, a sophisticated business community, and a prime location in the region. It is equally distressing to note that if Colombia loses the opportunity it has to make big changes with this president, a return to left-wing populism and guerrilla domination is almost certain.

Mr. Uribe has already put the country on the right path by greatly improving security. Moreover, the World Bank report "Doing Business in 2005" ranks Colombia among the top performers world-wide in deregulatory reform at the micro level. The president's proposal now in congress to cut entitlement spending through pension reform is also constructive.

In 2004 Colombia grew at about 4%. Yet that pace of growth is not sufficient to seriously reduce the ranks of the poor and secure the president's other gains. To do that Colombia needs to bring down its debilitating tax rates. Mr. Uribe has been discouraged from doing this by both the local "experts" and by the U.S. government. The U.S. ambassador here is known to complain that Colombia's effective tax burden of 21% of GDP means that Colombians are not paying enough for government.

This is ridiculous. The Colombian tax burden is roughly equivalent to Chile's. If the U.S. wants to be constructive, it should point out that a top marginal rate equivalent to more than 38% on corporate profits and individuals, and a 16% value-added tax, are impediments to growth. It is doubtless true that these rates and the complexity of the Byzantine tax code, some of which Mr. Uribe has made worse, invite enormous evasion and discourage economic activity. A lower, flatter code would most likely expand revenues.

U.S. pressure on tax collection is of a piece with the standard static analysis that says that since Mr. Uribe has been unable (some say unwilling) to cut spending sufficiently, taxes have to be high and collection methods draconian. But interestingly enough, this is not the path that the Bush administration has taken to deal with the U.S. deficit. Expecting Colombia to swallow this bitter medicine reflects the soft bigotry of low expectations directed at a lesser-developed U.S. ally.

Benjamin Powell, a George Mason University Ph.D. candidate in economics, detailed the Irish experience in the Cato Journal's Winter 2003 edition. The parallels with Colombia are impressive, beginning with the disaster that Keynesian policies wrought in the 1973-1987 period.

Much of what Ireland first tried when it faced budget deficit problems will be familiar to Colombians, including tax hikes that managed to cut the primary deficit in half but also suffocated growth. By 1986 the debt-to-GDP ratio was 116%. "High levels of government debt, interest payments, and expenditures put the Irish government in a precarious fiscal position," Mr. Powell explains.

Unable to raise taxes further, the government began in 1987 to cut spending. The reduced size of government together with a relatively open trade policy produced a welcome return to respectable growth. By 1989 Ireland's economy was growing at 4%. "That level of growth was impressive compared with the 1.9% growth between 1973 and 1986 when the government had been pursuing activist fiscal policies," Mr. Powell explains.

But spending cuts had their limits and Ireland -- like Colombia today -- was still far short of the minimum and consistent 6% GDP growth needed to actually move people out of poverty. From 1990 through 1995 GDP growth averaged 5.14%. But the "tiger" growth came in the latter half of the decade. From 1996 through 2000 the average rate of growth was a mind-boggling 9.66%.

What differentiates those two periods is the change in Ireland's tax regime. In 1996 the corporate tax rate was 40% but by 2000 it was down to 24%, making Ireland a magnet for capital. There was "also a special 10% corporate taxation rate for manufacturing companies and companies involved in internationally traded services," Mr. Powell explains. When the European Union pressured Ireland to eliminate the special 10% rate, it obliged but lowered the standard rate to 12.5% in 2003.

Naysayers will claim this is politically impossible in Colombia . But what's missing in Colombia is an application to supply-side growth of the kind of unyielding commitment that Mr. Uribe applied to security. Should he change course, the Irish miracle would be the best blueprint.

Wednesday, October 26, 2005

Using iText on the new SourceBeat.com Website (Reference)

Today I read an interesting blog post regarding Java PDF interaction with the iText package (I noticed this package for the first time in Rod Johnson´s book Expert One-on-One J2EE Design and Development (Programmer to Programmer) but never had the full time to experiment But I noticed this is a good interesting starting point to check out. The blog URL is http://jroller.com/page/JamesGoodwill on September 21st and titled http://jroller.com/page/JamesGoodwill. Nontheless I copy the same contents as this blog for inmediate reference. Also notice that it is quoted and formatted to fit this blog needs.


Using iText on the new SourceBeat.com Website


I saw a blog the other day about using iText to manipulate PDFs. I have really wanted to take a look at iText, but just have not had the chance. So thanks to this blog, I finally took the time to look at it and really liked it. After checking out the related article, it took me all of 30 minutes to learn iText and replace SourceBeat?s current PDF encryption code (originally pdftk). It was too easy. Below is an example and unit test showing how SourceBeat is now using iText.




package com.sourcebeat.util;

import junit.framework.TestCase;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.File;

public class EncryptorTest extends TestCase {

protected final Log log = LogFactory.getLog(getClass());
protected Encryptor encryptor;
protected String unencryptedFile = "test/unencrypted.pdf";
protected String encryptedFile = "test/encrypted.pdf";

public void setUp() throws Exception {

encryptor = new Encryptor();
}

public void tearDown() throws Exception {

encryptor = null;
}

public void testEncrypt() throws Exception {

// Encrypt the file
encryptor.encrypt(unencryptedFile, encryptedFile, "userPass", "ownerPass");

// Make sure that the file was written
File newFile = new File(encryptedFile);
assertTrue(newFile.canRead());

// remove the file
newFile.delete();
}
}



It is pretty simple. As you can see Encryptor.encrypt() method takes the path to the original unencrypted file, the path to the output (the new encrypted file), and the user and owner passwords. You can see this method below:



package com.sourcebeat.util;

import com.lowagie.text.pdf.PdfEncryptor;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfWriter;

import java.io.FileOutputStream;

public class Encryptor {

public void encrypt(String inputFile,
String outputFile,
String userPassword,
String ownerPassword) throws Exception {

PdfReader reader = new PdfReader(inputFile);
PdfEncryptor.encrypt(reader,
new FileOutputStream(outputFile),
false,
userPassword,
ownerPassword,
PdfWriter.AllowAssembly
| PdfWriter.AllowDegradedPrinting
| PdfWriter.AllowFillIn
| PdfWriter.AllowModifyAnnotations
| PdfWriter.AllowPrinting
| PdfWriter.AllowScreenReaders);
}
}

Easy enough?you first have to create a PdfReader using the passed in input file path and then invoke the PdfEncryptor.encrypt() method. The parameters passed to this method are relatively self-explanatory, with the exception of the third parameter, false. The third parameter is a boolean, which represents the encryption strength (true for 128 bit key length, false for 40 bit key length). That is it. It is now part of the, soon to be released, new SourceBeat.com site.



I hope to take enough time to test this and perhaps it could be invaluable in my near future Java projects.

Monday, October 24, 2005

An example of Firebird using Mono

Today I read an article I found in www.ibphoenix.com news in entry "05-Oct-2005 Miguel de Icaza's web log provides a set by step description of setting up classic Firebird on Linux for use as an embedded database with Mono.", then I followed the link and seemed to me very interesting. You can link to the Miguel de Icaza's web log by clicking here. There you can notice how to use the embedded Firebird SQL server to use inside the Mono project (.NET for Linux). More links are there for you to follow.


By the way, Firebird is to me the best Open Source SQL server as it is very simple to administer and use, and it supports the full ACID database model. Other competitor like MySQL is about releasing this functionality. In my opinion, Firebird has very solid enterprise features.

Friday, October 21, 2005

My blogsphere site

This is my first post ever to the blogsphere. I am from a Spanish background, in fact I am from Medellin, Colombia, South America, but preferred to post in English as I like the language and in fact English is the universal one. But sometimes when it is necessary to do I would post Spanish items.

Hope this is a stop for the ones who land here.