Sunday, December 13, 2009

Smb4k "org.freedesktop.DBus.Error.NoReply" problem in Kubuntu Karmic Koala

I was trying to start Sbm4k today and after running the command I noticed that the application was doing nothing besides creating an entry in the task bar that disappears in a while. After executing Smb4k from the console I got the following error:

(4408)/: Communication problem with  "smb4k" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" " 


Well it seems that there is a bug related to this problem in launchpad that has been fixed but obviously doesn't work in my system and after reading for a while I found the following suggestion:

"remove the ~/.kde4/share/apps/smb4k/custom_options.xml"

Smb4k is running on an infinite loop mounting things on startup. In my system I couldn't find such file and I noticed that I have the fixed version of this application as described in the launchpad bug, but since this is the first time I run Smb4k since the update, the old setting that was causing the bug was still being used and it was trying to remount old bookmarked  locations on startup hence falling in the infinite loop.

The solution in my case was to rename the bookmark file before starting smb4k:

"/.kde/share/apps/smb4k$ mv bookmarks.xml bookmarks.xmlBAK"

Then changing it back to its previous name, I hope it helps ;)


Saturday, November 28, 2009

Eclipse button problem with Kubuntu 9.10 (Karmic Koala)

I ran into this issue while installing the Google App Engine... a quick description of the problem is that some buttons in Eclipse were not responding (doing nothing) after I upgraded to Karmic Koala, after checking the log file, network connection settings and some other things that didn't work I decided to ask the oracle (Google) about it and after a while I found a simple and quick solution here.

Just create an executable file with the following content:

 #!/bin/sh  
 export GDK_NATIVE_WINDOWS=1  
 /opt/eclipse-3.5/eclipse  

Now back to coding ;)

Eclipse Galielo and Google App Engine Plugin

I just installed Galileo and I went straight to the update site to install Google App Engine plugin but for some reason after adding the site (http://dl.google.com/eclipse/plugin/3.5) and following the instructions, Galileo simply didn't do ANYTHING after I clicked on the "Next" button, anyway I found the zip files here and it is just as simple as any other plugin.


  1. Download the zip file here for you version.
  2. Unzip it at the "dropins" folder in your Eclipse (Galileo) directory.
  3. Restart Eclipse
That's it ;)

Thursday, November 26, 2009

Windows Task Manager through command prompt

Today I was playing my CSI role as a software developer, also known as: fixing a possible bug, that ended up being a configuration problem. It took a couple of remote desktop sessions to reach the the right environment and finally there I couldn't open Windows Task Manager with the normal shortcut "CTRL + SHIFT + ESC",  so I had to do it through MS-DOS command prompt, this is quite easy but still everyone forgets about it or maybe just don't know it, honestly I will be the first one to forget it, so I decided to share it with the world and at the same time keep the knowledge in a safe place.


Sunday, November 22, 2009

How to disable Kubuntu login sound

I don't know about you, but in my case the login sound can be a problem at home while rebooting the system when my wife is sleeping, so I took a couple of minutes to find out how to disable it and here it is.
 
  1. Go to "System Settings"
  2. Click on "Notifications"
  3. Select "KDE System Notifications" from the drop-down menu
  4. Find the "Login" event
  5. Untick the "Play a sound" option and that's it.
Here you can check the screenshot


Friday, November 20, 2009

Setting Java Virtual Machine memory heap size for your server

Do you need to set the heap size (min and max) available for the java virtual machine being used by your server? well I ran into that annoying OutOfMemoryError message today and I took a couple of screenshots describing how to do it, check it out.

Here you can see WebSphere's console:




In this other case I used Eclipse, you can check how to set the values in the virtual machine parameters at the server connector tab for Geronimo:

 

Thursday, November 19, 2009

Java version being used by your server

Today I was solving an issue on different environments and I had to check the Java version being used in BEA Weblogic, IBM WebSphere and Apache Geronimo, it is not difficult but again I thought it would be useful to share it with everyone.

Here you can see how to check the Java version through the log in the Weblogic console:


In this case for WebSphere, you can see where to find the version by directly checking the log file:

The final screenshot is from Geronimo, with a lot of information about Java:


Wednesday, November 18, 2009

How to get rid of Internet Explorer

I am not a big fan of Microsoft products and using Internet Explorer is one of the most painful experiences I have to go through while testing a UI for a web development or just while browsing the intranet at work, but today I took a look at a Firefox addon that allows you to open an IE tab inside Firefox called (not surprisingly) IE Tab.

The best part of it is that I can add trusted sites just as in IE, something that is not available in the current version of FF, and this avoids having to enter my credentials every time I go to a different page in the intranet! The addon is not perfect, IE 8 sites don’t look exactly the same but still it helps a lot while testing previous versions.

That’s it for now ;)

Tuesday, November 17, 2009

Javac OutOfMemory error while compiling with Ant

Did you get this OutOfMemory error message from javac  while compiling with ant:

“The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space”

Well there is an easy way to fix it! first set property “fork” to true, this will allow javac to execute in a separate thread with its own resources, then you can set the values for “memoryinitialsize” and “memorymaximumsize” according to your needs. Here is a sample of how the javac task would look.

 <javac  
     fork="true"
     srcdir="${basedir}/src"  
     destdir="${basedir}/build/classes"  
     classpath="${project.classpath}"  
     memoryinitialsize="256m"  
     memorymaximumsize="256m"
 />  

That’s it! I hope it helps ;)

How to remove dotted lines from blogger (bottom)

Yesterday I removed dotted lines from the top of each post from Google Blogger, but I didn't have enough time to check how to remove them at the bottom, so today I took a look at it and here it goes for anyone else that needs it:

  • Login to you Blogger account and go to Layout -> Edit HTML
  • Ctrl + F "border-bottom:1px dotted $bordercolor;" it should be located in something like this
.post {
margin:.5em 0 1.5em;
border-bottom:1px dotted $bordercolor;
padding-bottom:1.5em;
}
  • Set "border-bottom" to zero
.post {
margin:.5em 0 1.5em;
border-bottom:0px dotted $bordercolor;
padding-bottom:1.5em;

  • Save and check your blog

How to remove dotted lines from blogger

I personally don't like blogger's dotted lines on each post title, so with some help from Greasemonkey and after taking a look at the HTML  template I managed to removed them with a simple line of code:
  1. Login you blogger account and go to Layout -> Edit HTML
  2. Ctrl + F "]]>"
  3. Copy this "a {outline:none;}"  before the result of step 2
  4. Save and check your blog
That's it! I hope it helps ;)

Monday, November 16, 2009

Remove svn folders recursively

Today I was about to zip and send some code folders to a co-worker, at that point what I needed was a simple feature to remove all svn related things from this folder and recursively through all subfolders, I still don't know isn't this included as a feature by kdesvn, eSvn, QSvn or RapidSVN.

I'm a Linux user so this will do the trick:

find . -name ".svn" -exec rm -rf {} \;
 
In case you are using Windows and probably Tortoise you can go this way:

Export the current copy and choose a different folder, it will copy the code there and it will remove all svn things. Beware that if you choose the same folder Tortoise will just remove things without copying anything.

Well I hope this helps ;)

Geronimo Load Balancing database deployment

Recently I had the need to deploy a new datasource in Apache Geronimo, usually this would be a five minutes process that will just require a quick update of the deployment plan similar to this one:


 <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">  
   <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">  
     <dep:moduleId>  
       <dep:groupId>console.dbpool</dep:groupId>  
       <dep:artifactId>jdbc.myapp.mydb</dep:artifactId>  
       <dep:version>1.0</dep:version>  
       <dep:type>rar</dep:type>  
     </dep:moduleId>  
     <dep:dependencies>  
       <dep:dependency>  
         <dep:groupId>oracle</dep:groupId>  
         <dep:artifactId>ojdbc5</dep:artifactId>  
         <dep:version>11.1.0.6.0</dep:version>  
         <dep:type>jar</dep:type>  
       </dep:dependency>  
     </dep:dependencies>  
   </dep:environment>  
   <resourceadapter>  
     <outbound-resourceadapter>  
       <connection-definition>  
         <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>  
         <connectiondefinition-instance>  
           <name>jdbc.myapp.mydb</name>  
                          <config-property-setting name="Password">mypass</config-property-setting>  
           <config-property-setting name="UserName">myuser</config-property-setting>  
                          <config-property-setting name="DatabaseName">DB113</config-property-setting>  
                          <config-property-setting name="DataSourceName">mydb</config-property-setting>  
                          <config-property-setting name="ServerName">myserver</config-property-setting>  
                          <config-property-setting name="PortNumber">1521</config-property-setting>  
                          <config-property-setting name="DriverType">thin</config-property-setting>  
           <connectionmanager>  
             <xa-transaction>  
               <transaction-caching/>  
             </xa-transaction>  
             <single-pool>  
               <max-size>10</max-size>  
               <min-size>0</min-size>  
                                    <blocking-timeout-milliseconds>5</blocking-timeout-milliseconds>  
               <idle-timeout-minutes>1</idle-timeout-minutes>  
               <match-one/>  
             </single-pool>  
           </connectionmanager>  
         </connectiondefinition-instance>  
       </connection-definition>  
     </outbound-resourceadapter>  
   </resourceadapter>  
 </connector>  


But in this case I needed to deploy a database with load balancing, since I couldn't find this info online I thought about sharing with everyone the deployment plan that worked for me, it is similar to the previous one and the difference is in the "connectiondefinition-instance" element:


         <connectiondefinition-instance>  
           <name>jdbc.rf2h.mydb</name>  
           <config-property-setting name="Driver">oracle.jdbc.OracleDriver</config-property-setting>  
           <config-property-setting name="Password">mypass</config-property-setting>  
           <config-property-setting name="UserName">myuser</config-property-setting>  
           <config-property-setting name="ConnectionURL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = 192.8.231.8)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 192.8.231.9)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = db313))  
                          </config-property-setting>  
                          <config-property-setting name="CommitBeforeAutocommit">true</config-property-setting>  
           <connectionmanager>  
             <local-transaction/>  
             <single-pool>  
               <max-size>5</max-size>  
               <min-size>1</min-size>  
               <blocking-timeout-milliseconds>30</blocking-timeout-milliseconds>  
               <idle-timeout-minutes>1</idle-timeout-minutes>  
               <match-one/>  
             </single-pool>  
           </connectionmanager>  
         </connectiondefinition-instance>                      


As you can see, all the info about the load balance is in this "ConnectionURL" property, that's it, I hope this helps ;)

PS: for this deployment I used the following library: geronimo-tomcat6-javaee5-2.1.2\repository\org\tranql\tranql-connector-ra\1.4\tranql-connector-ra-1.4.rar

Sunday, November 1, 2009

Upgrade to Karmic Koala (Kubuntu 9.10)

The new version Karmic Koala was just released this week and I took a few hours during the weekend to upgrade my system. The download and install process through the upgrade manager went out perfectly until I had to restart and noticed the following errors:

"init:sreadahead main process terminated with status 1 init"

and

"One or more of the mounts listed in /etc/fstab cannot yet be mounted: 
(ESC for recovery shell)
/: waiting for /dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

To solve the first issue find the follwing lines in your /etc/init/sreadahead.conf file

start on starting mountall
stop on stopped rc”


And replace the first line like this:

#start on starting mountall
start on filesystem”

To solve the second issue edit the following in your /etc/fstab file:

- Disable fsck on vfat by setting to "0" the value in the last column of you vfat entry this way

UUID=XXXX-XXX /media/hda1 vfat defaults,utf8,umask=007,gid=46 0 0”

- Replace all UUID by /dev/sdxx

After this changes the error was still there, then I noticed that during startup my old kernels were the only option in the grub menu and I couldn´t access the one installed during the upgrade. Googling the issue resulted in a forum thread that describes this solution:

- Make your devices writable again:
“mount -n -o remount,rw /”
- Install broken packages (it took a while for me):
“sudo dpkg --configure -a”
- Now you should be able to reboot the system and access 9.10!

In case you want more info about the fstab file you can check this link.

That´s it for now!

Monday, October 19, 2009

Got a problem with a Windows process?

I am not a Windows fan, as a matter fact I only use it at the office,  at home I am a (Kubuntu) Linux user since around two years ago, and I totally love it.

But after running into a problem with Eclipse hanging every now and then (check previous post), I ended up trying the Process Monitor v2.7 tool by Microsoft. Quite useful if you need details about an application that is causing you problems.


Sunday, September 13, 2009

How to migrate from Blogger to Joomla

I migrated my blog to Joomla last week, here you have the steps to do it:

  1. Download Feed Gator for Joomla, you can find the latest release here.
  2. Install the extension (there shouldn't be any problem doing this).
  3. Go to Components --> Feed Gator --> Manage Feeds.
  4. Create a new entry and set the title.
  5. Go to your blog and check the link to your RSS feed at the bottom, it should be something like this: Subscribe to: Posts (Atom)
  6. Set the rest of the properties in the entry and save it.
  7. Select the entry (tick on the left side) and then click on “Import All”.

That should be it, all the entries must be available now in the article manager.

Migrating from Blogger to Joomla

After checking out a couple of articles on the Pros and Cons of keeping my blog on Blogger, I finally made the (a bit painful) decision of moving my things to a Joomla based solution on my own domain before it is too late. If you are wondering why, well three things pushed me to do it:
  1. Google is rich and famous enough, so I don't need to keep using .blogspot.com in my blog, and well the real reason behind this is that you will lose all search rankings and links to your site.
  2. Moving the content from your blog to Joomla can be a problem sometimes, and the more you wait the more content you will have to fix.
  3. Having your own domain for 7$ is not a high price to pay for having all the control on your site.

Other people have other reasons to leave and some people are totally happy staying with Blogger, in the end it's up to you... as usual.

Thursday, August 20, 2009

Gavick Pro Photoslide translation with Joomfish

Recently I was looking for a way to translate slides from the popular Phothoslide GK2 Joomla component and noticed there was not so much information out there about it, after a few minutes I found out that it was quite easy to do it, just follow this steps:

1) In the backend of your Joomla site go to Components -> Gavick Photoslide GK2
2) If you have a group "main_group_EN" then create a group for your translation like "main_group_ES" (Spanish translation) by clicking on "Add Group"
3) Add the translated slides to this new group
4) Go to Components -> Joom!Fish -> Translation
5) Choose your language in the "Languages" combo box
6) Choose "Modules" from the "Content elements" combo box
7) Find and open the "Gavick News Image I" module
8) Find the "Slides group" combo box and choose the new translated slides group you created on step 2 (main_group_ES)
8) Tick on the "Published" option and save the changes

That's it! now you can translate your slide show to any language you want ;)

Monday, August 17, 2009

Removing old Linux Kernels

After a couple of years using Linux as my main operative system I noticed that the size occupied in the hard was growing and growing with each upgrade, also my grub list was including more and more kernel options that I don't use anymore so I decided to remove old kernels to "clean" a bit my hard drive.

First you should check your current available kernel version with this command:

"uname -r"

You will get a reply similar to this one:

"2.6.27-9-generic"

Open "Synaptic" package manager and search for "linux-image" and after scrolling down you'll find options similar to this:

linux-image-2.6.24-21-generic
linux-image-2.6.22-14-generic

Remove kernel versions you are not using anymore, in my case I decided to keep the current one and the previous one just in case I need it.

Just make sure you don't remove the current version otherwise you'll have a long week ;)

Sunday, August 16, 2009

Adding Xmap Joomla plugin to Google

A couple of days ago I had to move one of my Joomla sites to a new hosting company (obviously because of a better deal) and after checking Google webmaster tools I noticed that the xml sitemap wasn't working anymore, so I took a look at the Joomla extensions for something that could help me solve this issue and with a few clicks I found Xmap 1.2.

It is a very popular component with lots of downloads and a detailed documentation, simple to install and use:

  1. Download the latest Xmap version version here.
  2. Unzip it and install both files (com_xmap-x.x.x and plg_xmaplink)
  3. In the backend go to the Xmap configuration window at Components --> Xmap.
  4. It is easy to add a new menu or modify default priority options.
  5. Now go to Options --> Preferences and copy the Xml sitemap url.
  6. Click on Add Sitemap on Google Webmaster Tools dashboard
  7. Add the copied url and make it "fit", just copy what's after yoursite.com/ this should be something like index.php?option=com_xmap&sitemap=1&view=xml
  8. That's it!
Now you don't have to worry about your site's xml sitemap anymore ;)

Sunday, August 9, 2009

Google Blogger Label Cloud Widget

Today I decided to "pimp" my blog a bit and found a few interesting widgets, the one that I liked the most was the Label Cloud, it is way better than the ugly and not so useful Label widget provided by Google.

You can Take a look at mine and if you feel like using it, follow the instructions available here.

Ferbar: Autonomous mobile robot control system

The main problem was to create an autonomous control system for a mobile robot in order for him to move from point A to point B avoiding obstacles and making all the decisions without the intervention of a human being.


To solve this problem we used an ultrasonic sensor on top of step-by-step engine in order to take samples from the area and the obstacles surrounding the robot. This information was sent to the motherboard on the robot with a DSL Linux distribution on a usb drive (to avoid using a delicate HDD on our rover robot).

Ferbar was running on that machine, its main requirement is a 1.4 JDK or higher and some libraries included on the zip file, there is a tricky configuration of the comm.jar that allows the software to sent the information of each movement using the serial port, but the details are explained on a txt install file.

The core of the brain is using a SOM neural network trained by JKam. The application includes a simulator with a 2D map on which you can set obstacles of different sizes and shapes and then you can set the point A and B on the map and test the performance of the robot with the current neural network. It's also possible to change the neural network being used.

The software includes two other control systems, one of them allows the user to preset the path that is going to be used by the robot, this is useful in case if you want to take the robot to a presentation and you already know the place and you know the moves you want him to do.

The third type of control allows the user to have live control of the robot, basically is a sort of remote control, this ones is pretty useful in case the scenario is too complex for the neural network and you want to take over the control of the robot.

Ferbar can save paths previously used in case you need to reuse them later, it is also possible to save and reuse training scenarios.

There is a panel not being used right now, it's the vision panel, it was supposed to show the view of a camera on the robot, but usb for java a couple wasn't so popular as it is right now.

Well one more time, if someone is interested on using it just let me know and I will gladly send you the files.

Kohonen Neural Networks and JAVA

Well as you can see on the title of the post, I decided to talk a bit more about what I do 3/4 of my day: JAVA, hopefully to share the problems I have everyday will help somebody else and also I'm pretty sure they will also help me.

My whole Java career started 3 years ago just by coincidence, I was in charge of the development of the "brain" of a mobile robot and the best way to have an OS independent software is using Java, so I ended up buying a Java book and started messing around with my computer and Netbeans.

Anyway, to make a long story short I developed two softwares to create the robot's brain, the requirement was that the robot could be able to move from position A to position B making all the decisions by himself in order to avoid obstacles and reach its destination.

To accomplish this goal I decided to use Self Organizing Maps also called Kohonen Networks, a self-organizing artificial neural network that selects the winner neuron by using the euclidean distance.

The learning process for the SOM is to make that different areas of the network can be activated by similar input patterns, and this resembles a lot to the way our brains work when we receive auditory or visual information and different areas of our brain generate the response.

JKam is the name of the software I developed for this task, its goal is to make easier the training process for Kohonen Networks and it has the following features:
  • It allows you to define the structure of the map (Input Neurons, X Neurons and Y Neurons)
  • Bubble and Gaussian neighborhood functions
  • Exponential, Linear or Inverse Time learning factor functions
  • Training variables such as amount of steps, radius, training sets and initial learning factor rate.
  • It also allows you to save and re-use training sets and neural networks on an XML format.


I stopped working with this software a couple of years ago but I think it can be pretty useful on different fields so if anyone is interested on using it, just send me an email and I will gladly send you the files.

Well that's it, on the next post I'll talk about the software using a SOM trained with JKam, the brain of the robot: Ferbar.

Tuesday, June 2, 2009

JavaFX @JavaOne 2009

Now that the JavaOne opening presentation is over my guess is that most JavaFX developers are thrilled with all the news presented in just a couple of hours and jumped back on their keyboards trying to code the newest coolest application out there, on my side I decided to post a summary of the news that interested me the most:
  • Oracle CEO Larry Ellison giving his support to JavaFX and talking about Oracle's interested in this technology.
  • JavaFX SDK 1.2 available on Linux even though is a beta version it is still good news.
  • An enhanced version of the plugin for Eclipse is available for those that are not so keen to use Netbeans that much. You can read more information about the release on Neil Bartlett's blog entry here.
  • Finnally a reasonable good UI tool is available, take a look at JFXBuilder here, it is still in the early stages but it offers a few cool things.
  • Verizon revealing that will open an application store based on Java ME and also making available APIs for developers to write rich applications.
Well it has been a very good day for Java developers, and let's hope that all (or at least most) of the doubts about the future of JavaFX is clear after these annoucements, I guess the time will tell.

Saturday, May 30, 2009

Removing files in Linux

The best thing about Linux is the console, one of the many useful uses is the way you can handle (find, move, create, delete) files, a quick example of this is removing all hidden .svn directories:
rm -rf `find . -type d -name .svn`

Make sure that you use "`" and not "'", you can also try removing all java files in a
folder using this one:

rm -rf `find . -type f -name *.java`

Simple and painles ;)

Thursday, May 7, 2009

How to turn Linux bell off

This is quite simple but yet pretty annoying, if you tend to work till late or early in the morning and you don't want to wake up people, is useful to turn off the default Linux bell sound, do this with the following command:

lfbarragan@theanswer:~$ xset b off

In case you want this to be the default behavior every time you turn on your laptop add this line to your /etc/profile file, check the xset documentation in case you want to customize more things.

Saturday, April 18, 2009

How to generate a wsdl2 file using Axis2 java2wsdl

If you are not familiarized with WSDL 2.0 creating one of these files from scratch for your web service can be a daunting experience. Axis2 provides a java2wsdl tool that can make this task easier by automatically creating the file for you.

Download the latest version here and after decompressing the file, set a system variable pointing to the installation path by adding the following line to your Linux "/etc/profile" file:

export AXIS2_HOME="/opt/Programs/axis2-1.4.1"

The command line tool has the following options available:

-o output directory
-of output file name for the WSDL
-sn service name
-l address of the port for the WSDL
-cp list of classpath entries - (urls)
-tn target namespace for service
-tp target namespace prefix for service
-stn target namespace for schema
-stp target namespace prefix for schema
-st style for the WSDL
-u use for the WSDL
-nsg fully qualified name of a class that implements NamespaceGenerator
-sg fully qualified name of a class that implements SchemaGenerator
-p2n [,,] to assign all types to a single namespace
-efd setting for elementFormDefault (defaults to qualified)
-afd setting for attributeFormDefault (defaults to qualified)
-xc class1 -xc class2... extra class(es) for which schematype must be generated.
-wv <1.1/2.0> wsdl version - defaults to 1.1 if not specified
-dlb generate schemas conforming to doc/lit/bare style

Here is a sample of how to use the command to generate a WSDL 2.0 file for "MyService":

/axis2-1.4.1/bin/java2wsdl.sh -wv 2.0 -o /workspace/myApp/src/META-INF/ -of MyService.wsdl -sn MyService -cp:/workspace/myApp/target/classes -cn sample.package.MyService

Notice how the classpath is specified, each location is separated with a colon, in case you have multiple entries it with look like this:

-cp:/location1/classes:/location2/otherClasses

This command also has an Eclipse plugin but it doesn't generate files for the WSDL 2.0 version, in the mean time it can make your life easier, just bear in mind that in case you have a complex service it is possible that you will have to tweak the file a bit to make it work, but for a simple test it can work like a charm ;)

Friday, April 17, 2009

How to create a profitable business

Great presentation from David Heinemeier at Startup School 08 about how to create a profitable business without dying in the attempt:

&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;div&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;a href='http://www.omnisio.com'&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;Share and annotate your videos&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; with Omnisio!&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;

A few simple but useful Eclipse tips

Eclipse is the most popular Java IDE in use by developers, and there are many of them spending hours and hours in front of it everyday trying to solve issues, create new functionalities and such, here goes a couple of simple but very useful tips to make those hours more productive:
  • Use "Ctrl + Page Up / Down" to walk between opened editor tabs.
  • Try "Alt + Left / Right" to go backwards and forwards in your editing history.
  • Finnally use "Ctrl + F6" to cycle through opened files.
Hope this helps ;)

Saturday, April 4, 2009

KDE 4.2 updagrade & install

After installing KDE 4 a couple of months ago I wrote a post about how many flaws were released with that version, it took me a month or so to get used to the bugs that came with the upgrade, probably the worse one was that some tray icons, like the Wifi manager or Amarok, were not being docked at all and they were just behaving as a separate program.


Finally in April KDE officially released version 4.2.2, a more stable version including bug fixes and performance enhancement worth trying.


First step was to try the KDE upgrade instructions available on this site. After rebooting KDE wasn't working anymore and the only available option was Gnome, it took me a while to understand what went wrong but after checking a couple of forums and googling for a while I made it work by doing this:

-Using Synaptic, add "deb http://ppa.launchpad.net/kubuntu-experimental/ubuntu intrepid main" at the "Third-Party Software" list. Enable this one and disable all the others in the list.
-Go to the "Updates" tab and tick on the option "Unsupported updates (intrepid-backports)"
-Close the "Software Sources" panel and reload the packages list.
-Find and install "kubuntu-desktop" from the packages list.

After this you'll be able to follow the normal installation process and the KDE 4.2 desktop will be available after reboot.

Enjoy ;)

Monday, March 23, 2009

Pimping Eclipse Ganymede

Today I decided to try the new Eclipse Ganymede (3.4), but honestly after setting up Eclipse with all the plugins that I am used to have at hand right away, upgrading it to a new version doesn't seem so appealing to me, on the other hand, I'm open to new functionalities and enhancements and I was curious about javaFX (it requires the new Eclipse) and its possibilities to use the same code for a RIA in a browser, mobile or desktop, so this was enough for me.

As usual downloading and installing Eclipse couldn't be easier, so after doing it I started thinking about my favorite plugins and noticed how it is always a problem for me to remember them , so it seemed useful to create this list and share it with the world.

  • Eclemma: is a Java code coverage tool for Eclipse that allows the user to adopt EMMA's philosophy in an easier and more graphical way.

    • Update site: http://update.eclemma.org/

  • Jar Class finder: allows the user to find Java classes and solve NoClassDefFound exceptions, specially useful while searching for a class inside a group of jars.

    • Download site: http://www.alphaworks.ibm.com/tech/jarclassfinder/download

  • DBviewer: this plugin lets you view the database structure (schema/tables/column), execute queries and includes content assistant, among other features.

    • Download site: http://sourceforge.jp/projects/dbviewer/releases/

  • Subclipse: an open source plugin to provide support for Subversion inside Eclipse. A great asset for Linux users since there is no equivalent to Tortoise yet.

    • Update site: http://subclipse.tigris.org/update_1.6.x

  • m2eclipse: is the Maven integration for Eclipse, takes care of the dependency management and automatic download, plus launching Maven builds.

    • Update site: http://m2eclipse.sonatype.org/update/

  • Origo Mylin connector: if you are working on a task-focused project using Mylin, this connector will let you use Origo as the open/closed source hosting site.

    • Update site: http://download.origo.ethz.ch/mylyn/update-site-2.0.0/

Saturday, March 21, 2009

Joomla 1.5

This weekend I had the time to play for a while with the new version of the award winning content management system (CMS) Joomla 1.5. It was the first time ever I used this app, so I tried the installation wizard available at the hosting company's server and the first step was painless and quick.

After checking Joomla's site I noticed that the project is very well documented and found out in a few minutes how to use the basic features. This CMS seems to take away some of the common headaches for website developers with the variety of solutions that includes, since it's an open source application based on modules and plugins developed by a big community that is backing up the project.

I created categories, sections, menu items and a couple of articles, disabled some unnecessary modules and activated some others, then I started googling for some more components and extensions and ended up amazed with the huge amount of products available.

Fireboard was the first thing in my list, once again the installation was very easy, probably the only trick is to enable "System - Legacy" at the plugin manager, and just like that I had a complete forum ready to use.

The second component installation wasn't as easy as with Fireboard, after reading why an SEO was important for my site, I decided to try sh404SEF. Seems logical to install it in case you want to improve the possibilities for people to find your site by making the urls search engine friendly, in the end sh404SEF will replace the default Joomla urls that look like this:

http://www.yourdomain.com/joomla/index.php?option=com_content&view=category&layout=blog&id=34&Itemid=55

for something understandable for the search engine like:

http://www.yourdomain.com/why-seo-matters.html

It seems that a common error after the installation is to access the main page of your site www.yourdomain.com and get an access error, you can solve this pretty easily by creating an index.html file at yourdomainfolder/httpdocs/index.html redirecting people to www.yourdomain.com/joomla/index.php like this:

<meta equiv="REFRESH" content="0; url=http://www.yourdomain.com/joomla/index.php" >

After installing and setting up these plugins the options to create a professional site in a few days are huge an easy, you can check for more extensions here and knock yourself out.

JavaFX 1.1 on Linux using Netbeans 6.5 or Eclipse 3.4


If you are looking forward to try javaFX and you are a Linux user, probably you already know that the released versions are for Windows and Mac, fortunately there are already some hacks available to make the Mac version work on Linux. Not all the features are available and we'll still have to wait till Sun releases the official version, but in the mean time you can give it a try in Netbeans this way.

If while trying to install the linux sdk .nbm file in Netbeans, you get the following error "Some plugins require capability javafx.sdk.v1_1 No plugin providing the capability javafx.sdk.v1_1 could be found", check the content of the file org-netbeans-modules-javafx-sdk-lin.nbm (using unzip -l), probably the zip process failed and some files are missing.

To use it in Eclipse, first download and install the plugin here using the update site. Then unzip the file org-netbeans-modules-javafx-sdk-lin.nbm used previously for the Netbeans installation. Inside you will find the follwing folder "netbeans/javafx-sdk/", move the folder to your preffered location. Now in Eclipse edit the new classpath variable JAVAFX_HOME in Eclipse at Preferences -> Java -> Build Path -> Classpath Variables by pointing to the javafx-sdk location.

That's it, now you can use javaFX 1.1 in both of your IDEs, as I told you before, is not a complete version but it's a good way to start working on it until the new version is released.

Saturday, February 21, 2009

Basic software development principles

There are basic principles that every software developer follows in our profession everyday, some of them are known by the whole community and they seem to be pretty obvious by some people but still I think is a good idea to spread the word about what's right and what's not, so take a look at this link to an infoq presentation by Robert C. Martin (Uncle Bob) recorded at JAOO on Septemer 2007.

Here is a summary of the principles described on the presentation, I think they should be printed and posted on the wall at every developer's team room, even if it's a group of senior developer's this list is a nice reminder of the basic rules to follow on any project and with a little bit of work they can even be exported and implemented on different areas far away from IT:

  • Short iterations
  • Don't wait for definition
  • Abstract away volatility
  • Decouple from others
  • Comission > Omission
  • Never be blocked
  • Avoid turgid viscous architectures
  • Incremental improvement
  • No grand redesign
  • Progressive widening
  • Progressive deepening
  • Don't write bad code
  • Clean code
  • TDD
  • QA should find nothing
  • 100% code coverage
  • Avoid debugging
  • Manual test scripts are immoral
  • Definition of done
  • Test through right interface
  • Apprenticeship