Posts

Showing posts from 2010

ProjeKent Yazılım Yarışmasına Neden Sponsor Olduk?

Dün akşama doğru aşağıdaki epostayı aldım. ProjeKent kapsamında sponsor olduğumuz yazılım yarışmasına katılmayı düşünen iki değerli arkadaş kafalarındaki tereddütleri bizimle paylaşmışlar. Herşeyden önce birçok insan gibi amaaan bana ne ya diyip geçmedikleri ve canlarını sıkan noktaları bizle paylaştıkları için onlara çok teşekkür ederim.

Yazdıkları epostayı sizinle paylaşmamın nedeni, benzer düşünceleri aklından geçirmiş, sırf bu yüzden yarışmaya katılmayan başka arkadaşlar da varsa, onların da kafalarındaki soru işaretlerini kaldırmaya yardımcı olmak ve belki bir ümit yarışmaya katılmaya heveslendirmek.

Aşağıdaki yazıda tabii ki arkadaşların gerçek isimlerini kullanmadım.

Merhaba Gerger Yazılım çalışanları,

IEEE 'nin düzenlediği Projekent etkinliğindeki projenizle ilgileniyoruz, fakat proje açıklamasını incelediğimizde kafamızı karıştıran bir bölümle karşılaştık.

“Diğer bir olmazsa olmaz ise kodlama sırasında bizimle temasa geçmeniz. Belirli aralıklarla kodunuzu bize gönderme…

Coding Challenge

Image
The IEEE branch in the Istanbul Technical Unitversity (ITU) is organizing an event called ProjeKent which aims to connect the students with the R&D companies around the country. To help them achieve their goal, we are sponsoring a coding challenge in the event.

If you are interested feel free to participate. I don't think the participation is limited to any group or anything. Their web site is in Turkish but if you are interested just contact me from Twitter @yalimgerger and I will do my best to make sure you are in.

The challenge is to write an XML Editor in JavaScript. Below is a half baked specification of what we need. The Turkish text is right below the English one.

So the story is that we wrote an XML editor in Java and then, big surprise , we needed to run it over the Web. We didn't really want to throw all that work in Java away and at one of the brilliant(!) moments in my career I said "Why don't we do it with JavaFX?".  We got to reuse a lot of t…

Installing Oracle 10g R2 Using Oracle Public Yum Repository on 64 Bit Oracle Enterprise Linux

There are a lot of documents about installing Oracle database on Linux systems on the Internet. Most of them are quite complex and the remaining ones do not include Oracle Public Yum Repository installation. Below is a concise document that should get the job done.
Preinstallation Tasks
1. Verify Kernel Version
To start with, your system must be running kernel version 2.6.9-11.EL or later.To verify whether the required kernel is installed, enter the following command: # uname -r or to get more detailed information execute # cat /proc/version

2. Install Missing Packages
Additionally,the following packages (or later versions) must be already installed in your system:
binutils-2.15.92.0.2-10.EL4 compat-db-4.1.25-9 control-center-2.8.0-12 gcc-3.4.3-9.EL4 gcc-c++-3.4.3-9.EL4 glibc-2.3.4-2 glibc-common-2.3.4-2 gnome-libs-1.4.1.2.90-44.1 libstdc++-3.4.3-9.EL4 libstdc++-devel-3.4.3-9.EL4 make-3.80-5 pdksh-5.2.14-30 sysstat-5.0.5-1 xscreensaver-4.18-5.rhel4.2
Missing packages can be found in the RPM…

How to get DDL from Oracle dictionary programmatically

While you are happily developing PL/SQL with your favorite tool be it TOAD, SQL Navigator or SQL Developer, all of a sudden your boss comes and tells you that you have to extract all stored programs in your Oracle Database Schema and save them to the file system. Since you have 45678457 PL/SQL packages out there you know you have to automate this process. You know Oracle saves these stored programs somewhere, but how do you get them back? As most of the time, Oracle has a built-in solution for this need as well: the DBMS_METADATA. package in the SYS schema.
DBMS_METADATA.GET_DDL ( object_type IN VARCHAR2, name IN VARCHAR2, schema IN VARCHAR2 DEFAULT NULL, version IN VARCHAR2 DEFAULT 'COMPATIBLE', model IN VARCHAR2 DEFAULT 'ORACLE', transform IN VARCHAR2 DEFAULT 'DDL') RETURN CLOB;

The function works as advertised but there are some tricks that you might need to know.

First of all, the resulting DDL script is schema…

FormattedTextField (with MaskFormatter) on Javascript

While working on the Formspider framework (which has both Java and JavaScript renderers), we needed to implement a FormattedTextField component. It was easy to implement on Java side by using JFormattedTextField with a MaskFormatter. For JavaScript renderer we implemented a new MaskFormatter class as similar as possible to java.

Here is the source code that also includes an example:
JavascriptMaskFormatter.rar

In handlers.js, you can see event handlers for key inputs (including navigation keys), paste operation and validation on blur.

(###) ###-##-## mask is used in the example. Available masks are { # U L A ? * H }. See Java MaskFormatter page for more information.

Tested on IE8, FF3 and Chrome6.

Öskan Şavlı

Be Careful When Using xmlDom.getElementsByTagName

If you are working with PL/SQL XML DOM API, searching for elements using xmldom.getElementsByTagName may dramatically affect the performance of your code, especially if you are dealing with big XML Documents. Instead of searching for the same element over and over again, you should cache the node returned by xmldom.getElementsByTagName API and use the cached reference in subsequent DOM operations.

In the code below, new elements are added to an XML Document. We get the parent node with xmldom.getElementsByTagName API. In the first example, we get the parent node each time when a new node is added. The code executes in 0.27 seconds. In the second example, we find the parent node only once and reuse it. The same operation now takes only 0.05 seconds.

package test_xml
exec test_xml.initxml; / select test_xml.getxmltype from dual / -- add new action elements (slow way) declare v_doc_xml xmldom.domdocument; v_newActionElement_xml xmldom.domelement; v_newActionNode_xml xmldom.…

Using Code Optimization Software to reduce the size of JavaFX Applications

Image
You may increase the efficiency of your Java applications by applying some optimization methods on the Java byte-code. Shrinking and obfuscation are commonly used for this purpose. Shrinking is the process of removing unused classes, methods and fields, resulting in the processed byte-code having smaller size. Obfuscation is primarily used to make the code harder to debug and reverse-engineer. As an additional feature, obfuscation also reduces the size of the byte-code, since this process replaces the identifers in class files with shorter ones.

Reduction in the size of byte-code often implies an improvement in load time. Applet developers could especially benefit from such optimizations, since the transfer of compiled code accross a network is an important bottleneck.

In this article, I will show the use of optimization methods on a sample JavaFX application. I will use ProGuard 4.5 as the optimization tool. I choosed this tool, because it is available under the GPL free licence, ea…