Tuesday, July 24, 2012

My Favorite Programming Tools

As a programmer I am using almost every day a number of tools that help me achieve various programming tasks. I would like to share them here with the people interested and of course any feedback about other tools is greatly appreciated.

I use a number of utilities like:
  • Notepad++  - this is a very popular open source text editor for fast editing and file comparison, I find it extremely useful and I use it almost every day. It comes with a number of pluggable components and it has a good community.
    More information at: Wikipedia Notepad++.
  • Putty - I am using this utility mainly for remote access. PuTTY is a free and open source terminal emulator application which can act as a client for the SSH, Telnet, rlogin, and raw TCP computing protocols and as a serial console client.This is the place were one can find this tool: Download Putty. Here are some tips on setting up your Putty options. And here is a tool to wrap multiple Putty sessions in tabs: TTY Plus. 
  • WinSCP (Windows Secure CoPy) is a free and open source SFTP, SCP, and FTP client for Microsoft Windows. Its main function is secure file transfer between a local and a remote computer. Beyond this, WinSCP offers basic file manager and file synchronization functionality. For secure transfers, it uses Secure Shell (SSH) and supports the SCP protocol in addition to SFTP. This is the place to find this utility: Download WinSCP
  • VirtualBox (Oracle VM VirtualBox) is an x86 virtualization software package. I use this tool to create quick development testing environments. To obtain VirtualBox visit the VirtualBox website's download page.
  • soapUI - is an open source web service testing tool for service-oriented architectures (SOA). I use this tool for service testing during development. This tool can be found at: Download soapUI
  • SFK (Swiss File Knife - Windows cmd utility) - is a command line tool for daily tasks. Find and extract text in binary files, list dir tree sizes, filter and replace text, run an instant ftp or http server for easy file transfer, find duplicate files, join many text files into one, create and verify md5 checksum lists, run a command on all files, detab text, create hexdumps from files, trace contents of a tcp connection, find dependencies between files, print colored text to terminal, locate commands in the path, print last lines of a file, convert CR/LF, hex to binary, binary to source code, split and join large files, list the contents of all .zip, .jar, .tar, .gz, and .bz2 files. One can download this utility at: Download SFK
  • QuickPHP - Useful utility for quick PHP UI mockups. It is very easy to install and configure. One can download it from here: Download QuickPHP.
  • GIT - this is my favorite distributed revision control system; fast, simple to use and install.
  • Eclipse - free development environment. I use this application for complex projects.
  • JIRA - this is a great issue tracking system. 
  • Confluence - great collaboration and wiki software. I use this application for all purpose documentation.
  • TeamViewer - software used for remote control, desktop sharing, online meetings, web conferencing and file transfer between computers. This is a great tool. I use this tool for desktop sharing when I need to help members of my team.
  • Dropbox - is a file hosting service that offers cloud storage, file synchronization, and client software. This is a great tool, it is free for 2GB storage and I use it as a virtual USB. I move files between many computers and systems that I use.
I am going to improve this list as I come over other tools that I use every day and I find very good.


Friday, July 6, 2012

Developing applications with OfBiz (Part 1)

I've adopted two months ago OfBiz framework (version 10.04.02) for the company that I am currently working for. We needed a fast eCommerce solution with a billing system.
I've chosen this solution after I've analyzed a large number of frameworks (open source and proprietary) - ERPs, CRMs and billing systems.
This framework was the most attractive to me as it had most of the functionality that we needed and the internal architecture was pretty nice and modern. It was easy to install the demo and play with it.
It provides support for typical three tier architecture applications: presentation (MVC), business logic and persistence. The design is very modular with components and applications. It is very easy to override, extend or even rewrite parts of the framework. It is very easy to plug-in other engines like; templating engine or workflow engine if desired.
I knew before I've started that this framework is huge (its data spans over 850 tables) and it will require a steep learning curve on my side. This framework was developed over 10 years and it is very complex. It had various redesigns at various stages.
I've started by trying to change the eCommerce application that comes with the framework as I hoped I can get some fast results (sort of hacking approach to show a quick prototype). This was such a bad idea; this application is so complex that unless you are familiar with this framework you will get lost. By just looking at the code and searching documentation I could not understand properly the entire mechanism. Besides, the default UI design and styles are so ugly, outdated and poorly implemented that it made me reconsider my approach.
My next approach was to read as much documentation as possible (of course I didn't have time to read all the existing documentation) and try to develop a very simple application by looking into the provided examples (cover implementation at all layers and try the engines provided with the framework). In the mean time I had prepared the requirements document, high level design, UI design together with my team mates.
This was a constant struggle as the documentation is not up to date, cannot be found in one place and some parts are older or newer than others.
I've found these tutorials which contain three hello world applications; none of them worked for me without struggle. The tutorials are otherwise good but one cannot download the code so it is easy to mistype some code and have many errors and exceptions (I've found this stupid). I could not even find blogs or comments on why various parts did not work, I was left on my own devices... After some days of struggle (almost 1 week) I was able to show to my team a simple application, far from being a perfect example of how we should implement in practice and less than I wanted to show them.
I've tried to implement services using OfBiz minilang. Although it is very simple to create a service if something goes wrong the errors are so cryptic that it is impossible to tell what the problem is. I also could not find much documentation so far. The service implemented in Java although are very verbose it is so simple to handle errors and to trace specific actions.
The entity engine is very nice, as it removes the need to work directly into the database. Any change to the database is done through a configuration file and a restart of the application. It sounds easy but now, instead of SQL language one has to deal with the specifics of the entity engine and is quite a steep learning curve.
I discovered some good documentation in regard to the framework architecture hidden into the actual code (that I recommend):
To be continued...

Tuesday, July 3, 2012

Predicting the future

"While we have sci-fi visions of room temperature superconductors like in the movie Avatar, the question still remains: How would the discovery of a such a material impact our everyday lives? How would the nature of warfare change? How would the global economy react? What are the cultural pros and cons of such a technological shift?"

I like this unorthodox answer:

"The most realistic answer, but not the one you want to hear, is: Nobody really knows.
If history teaches us one thing than it is that we are horrible at predicting the outcomes of anything major. In hindsight, we can "explain" things, but our predictions suck so badly, it's a surprise we haven't given up on the subject. And that's for both experts and non-experts.
Nobody came even close to predicting the impact of computers. Or electricity. People didn't think WW1 would become the slaughterhouse it did. There are refugees around the globe who are living in "temporary" shelters, waiting to return home because the conflict will surely be over any day now. Some of them have been waiting for a decade and more.
The real impact of this technology, as most, will most likely not be anything that anyone today predicts, but something that someone in the future comes up with that nobody thought of before. That includes the inventors. I don't think Graham Bell ever thought that "please turn off your mobile phones" would be a screen shown in these newfangled movie theaters that just came about in his time."