SQLDeveloper Fonts

I like Oracle’s sqldeveloper. It does a nice job and is free. So if someone has to learn Oralce or is working on Oracle DB as a hobbh, investing in Quest’s PlSQL Developer or Toad does not make sense, even if they provide a lot more functionality than Oracle’s SQL Developer.

What I do not like in SQL developer is its look and feel and fonts in it, which look so ugly. You can change the theme of developer to windows in windows which makes a bit better. But, in Linux there’s no choice. You have to work with Oracle theme.

Here is how I made it look a bit better for me.

Modify sqldeveloper/sqldeveloper/bin/sqldeveloper.conf to add below line:
AddVMOption -Dawt.useSystemAAFontSettings=on
AddVMOption -Dswing.aatext=true
AddVMOption -Dswing.plaf.metal.controlFont="Droid Sans-13" 
AddVMOption -Dswing.plaf.metal.userFont="Droid Sans-13"
AddVMOption -Dswing.plaf.metal.systemFont="Droid Sans-13"
Instead of “Droid Sans” you can use and test whatever font you like.

Here is a before and after snapshot of my SQLDeveloper.

SQLDeveloper Before changes
Oracle SQLDeveloper before changes
SQLDeveloper After Changes
Oracle SQLDeveloper After changes

And, here is my sqldeveloper.conf after changes:
IncludeConfFile ../../ide/bin/ide.conf

SetJavaHome ../../jdk

AddVMOption  -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true

AddVMOption -Dsun.java2d.ddoffscreen=false

AddVMOption -Dwindows.shell.font.languages=

AddVMOption  -XX:MaxPermSize=256M

AddVMOption -Doracle.jdbc.mapDateToTimestamp=false  

AddVMOption -Doracle.ide.startup.features=sqldeveloper

AddVMOption -Doracle.jdbc.autoCommitSpecCompliant=false

#Our location for the NLS jars
AddJavaLibFile  ../../jlib/orai18n-collation.jar
AddJavaLibFile  ../../jlib/orai18n-mapping.jar
AddJavaLibFile  ../../jlib/orai18n-servlet.jar
AddJavaLibFile  ../../jlib/orai18n-utility.jar
AddJavaLibFile  ../../jlib/orai18n.jar

IncludeConfFile  sqldeveloper-nondebug.conf

AddVMOption -Dawt.useSystemAAFontSettings=on
AddVMOption -Dswing.aatext=true
AddVMOption -Dswing.plaf.metal.controlFont="Droid Sans-13" 
AddVMOption -Dswing.plaf.metal.userFont="Droid Sans-13"
AddVMOption -Dswing.plaf.metal.systemFont="Droid Sans-13"

Install Bugzilla on openSUSE12.2 with Oracle

Here are the full instructions to install Bugzilla from the BugZilla site. The instructions here are just addition to these instructions, recorded when I installed Bugzilla on my openSUSE12.2 machine. We will just go as per the steps mentioned at the Bugzilla Site and then will see what problems we face.
Install perl and all it’s modules
Check if all Perl modules required by bugzilla are present:
vivek@linux-8shu:~/public_html/bugzill> ./checksetup.pl --check modules
***********************************************************************
* REQUIRED MODULES                                                    *
***********************************************************************
* Bugzilla requires you to install some Perl modules which are either *
* missing from your system, or the version on your system is too old. *
* See below for commands to install these modules.                    *
***********************************************************************
COMMANDS TO INSTALL REQUIRED MODULES (You *must* run all these commands
and then re-run checksetup.pl):

    /usr/bin/perl install-module.pl DateTime
    /usr/bin/perl install-module.pl DateTime::TimeZone
    /usr/bin/perl install-module.pl Email::Send
    /usr/bin/perl install-module.pl Email::MIME
    /usr/bin/perl install-module.pl Math::Random::ISAAC
*** Installation aborted. Read the messages above. ***
                
  You may get a lot more,less or none requirements than the above, If you have some requirements listed, then go to YaST or zypper and search for the perl package and install it. All the packages will not be present in the openSUSE oss,….. To install all required Perl modules, you need to add Perl development repo to the zypper/YaST. Here is the repo link Select your distribution and add that repository, or you can do “Install/Remove Software” –> Configuration –> Repositories –> Add –> Community Repositories and then select “openSUSE BuildService – devel:languages:perl” there. Select and install all modules required for Bugzilla. Then run
./checksetup.pl --check-modules
again and make sure that all the required modules are installed.
Database Engine
I am using Oracle as a Bugzilla DB and got Oracle 11gR2 XE installed on my system. Make sure that the database is up and running. Also make sure that Perl module for database you are using is installed. For oracle it is DBD::Oracle. I couldn’t find it in the repos. So, did what the
checksetup.pl
told me to do. Run
su -c "/usr/bin/perl install-module.pl DBD::Oracle
, and make sure $ORACLE_HOME and $LD_LIBRARY_PATH are set properly before running this command.
Web Server
I will be using Apache web server, which is there in the openSUSE repositories.
Perl Modules
Already taken care of here.
Mail Agent
I will be using the default mail agent on by openSUSE12.2
Installing Bugzilla
Run ./checksetup.pl. If everything goes fine, it will create a file localconfig. Modify the parameters in it, here is my localconfig

# If you are using Apache as your web server, Bugzilla can create .htaccess
# files for you, which will keep this file (localconfig) and other
# confidential files from being read over the web.
# 
# If this is set to 1, checksetup.pl will create .
htaccess files if 
# they don't exist.
# 
# If this is set to 0, checksetup.pl will not create .htaccess files.
$create_htaccess = 1;

# The name of the group that your web server runs as. On Red Hat
# distributions, this is usually "apache". On Debian/Ubuntu, it is 
# usually "www-data".
# 
# If you have use_suexec turned on below, then this is instead the name
# of the group that your web server switches to to run cgi files.
# 
# If this is a Windows machine, ignore this setting, as it does nothing.
# 
# If you do not have access to the group your scripts will run under,
# set this to "". If you do set this to "", then your Bugzilla installation
# will be _VERY_ insecure, because some files will be world readable/writable,
# and so anyone who can get local access to your machine can do whatever they
# want. You should only have this set to "" if this is a testing installation
# and you cannot set this up any other way. YOU HAVE BEEN WARNED!
# 
# If you set this to anything other than "", you will need to run checksetup.pl
# as root or as a user who is a member of the specified group.
$webservergroup = 'www'; #File created by bugzilla has "Apache" here. Make sure to change it to what is your webserver group, mine is "www"

# Set this to 1 if Bugzilla runs in an Apache SuexecUserGroup environment.
# 
# If your web server runs control panel software (cPanel, Plesk or similar),
# or if your Bugzilla is to run in a shared hosting environment, then you are
# almost certainly in an Apache SuexecUserGroup environment.
# 
# If this is a Windows box, ignore this setting, as it does nothing.
# 
# If set to 0, checksetup.pl will set file permissions appropriately for
# a normal webserver environment.
# 
# If set to 1, checksetup.pl will set file permissions so that Bugzilla
# works in a SuexecUserGroup environment. 
$use_suexec = 0;

# What SQL database to use. Default is mysql. List of supported databases
# can be obtained by listing Bugzilla/DB directory - every module corresponds
# to one supported database and the name of the module (before ".pm")
# corresponds to a valid value for this variable.
$db_driver = 'oracle'; #Database you are going to use

# The DNS name or IP address of the host that the database server runs on.
$db_host = 'localhost';

# The name of the database. For Oracle, this is the database's SID. For
# SQLite, this is a name (or path) for the DB file.
$db_name = 'XE'; #Database server instance

# Who we connect to the database as.
$db_user = 'bugs'; #Database username

# Enter your database password here. It's normally advisable to specify
# a password for your bugzilla database user.
# If you use apostrophe (') or a backslash (\) in your password, you'll
# need to escape it by preceding it with a '\' character. (\') or (\)
# (It is far simpler to just not use those characters.)
$db_pass = 'my_Password'; Database password

# Sometimes the database server is running on a non-standard port. If that's
# the case for your database server, set this to the port number that your
# database server is running on. Setting this to 0 means "use the default
# port for my database server."
$db_port = 0;

# MySQL Only: Enter a path to the unix socket for MySQL. If this is
# blank, then MySQL's compiled-in default will be used. You probably
# want that.
$db_sock = '';

# Should checksetup.pl try to verify that your database setup is correct?
# With some combinations of database servers/Perl modules/moonphase this
# doesn't work, and so you can try setting this to 0 to make checksetup.pl
# run.
$db_check = 0;

# Most web servers will allow you to use index.cgi as a directory
# index, and many come preconfigured that way, but if 
yours doesn't
# then you'll need an index.html file that provides redirection
# to index.cgi. Setting $index_html to 1 below will allow
# checksetup.pl to create an index.html for you if it doesn't exist.
# NOTE: checksetup.pl will not replace an existing file, so if you
#       wish to have checksetup.pl create one for you, you must
#       make sure that index.html doesn't already exist.
$index_html = 0;

# If you want to use the CVS integration of the Patch Viewer, please specify
# the full path to the "cvs" executable here.
$cvsbin = '/usr/bin/cvs';

# If you want to use the "Difference Between Two Patches" feature of the
# Patch Viewer, please specify the full path to the "interdiff" executable
# here.
$interdiffbin = '/usr/bin/interdiff';

# For the "Difference Between Two Patches" feature to work, we need to know
# what directory the "diff" bin is in. (You only need to set this if you
# are using that feature of the Patch Viewer.)
$diffpath = '/usr/bin';

# This secret key is used by your installation for the creation and
# validation of encrypted tokens. These tokens are used to implement
# security features in Bugzilla, to protect against certain types of attacks.
# A random string is generated by default. It's very important that this key
# is kept secret. It also must be very long.
$site_wide_secret = '################################################################';

  After modifying localconfig , run checksetup.pl again, if everything goes fine, it will ask you for Bugzilla admin user details. Here is what it will look like
Initializing "Dependency Tree Changes" email_setting ...
Marking closed bug statuses as such...
Creating default classification 'Unclassified'...
Setting up foreign keys...
Setting up the default status workflow...
Creating default groups...
Setting up user preferences...

Looks like we don't have an administrator set up yet. Either this is
your first time using Bugzilla, or your administrator's privileges
might have accidentally been deleted.

Enter the e-mail address of the administrator: vivek@linux-8shu.site
Enter the real name of the administrator: Vivek Bhat
Enter a password for the administrator account: 
Please retype the password to verify: 
vivek@linux-8shu.site is now set up as an administrator.
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.
  Finish it, and you will have bugzilla running.

Linux – Know network usage by applications

A few days back, the network monitor was showing very high download speed in my openSuSE 11.4… even though I had no downloads or browsers running. This got me worried and a search began to find out the applications using network. Here is what I did. Install “iftop” from the repos. Just like “top”, “iftop” lists out the applications by their network usage. The command is:
sudo /usr/sbin/iftop -i wlan0
“-i” is for interface to use, I was on the wifi network so used “wlan0′. To check network usage for LAN or Cable network, the interface most probably will be “eth0”. [/caption] You can use “p” to toggle ports. Here the port used by first application is 25747. We will use this port to find out the application which is using network with the command “lsof”.
vivek@linux-og8s:~/Misc/downloads> lsof -w -n -i tcp:25747
COMMAND   PID  USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME                                                                                                                                                                                                                     
java    32504 vivek   68u  IPv6 1231661      0t0  TCP 192.168.1.2:25747->85.118.229.164:vce (ESTABLISHED)        
Here below the “COMMAND” application name listed is “java”. Right now there is vuze running on my system which is downloading the latest openSuSE 12.1 DVD. This way you can check if there is some application using guzzling your network unnecessarily.

ORA-12541: TNS no listener

So you have bumped on this error. You have started your database, you have started your listeners… successfully, but still the client is adamant that there is are “no listeners”.

All the website will ask you politely, just to “start your listeners”(lsnrctl start). You can ping the host machine but tnsping gives error. tnsnames.ora, listener.ora and sqlnet.ora are as perfect as they can get… but still “ORA-12541: TNS: no listener”. There is one precaution you need to do. The sequence of starting your database should be:
  • Start the database
  • And then start the listeners
Because listeners register with the database you have started. If you have not started the database, or started listeners before starting the database… listeners do not know which database to register with.

Hold on, you do not need to shutdown your database. If you have already started the database and then the listeners, then go to sqlplus and issue the command
 ALTER SYSTEM REGISTER
 
This should make your client listen to your database 🙂

Software Developers in India

Today, it will be my five years in the Information Technology. So, I think this is the right time to put my thoughts on the state of IT in India – mainly from the perspective of a “Software Developer”

A few days ago I came across this website where the author was wondering why the life of “Software Developer” is just about five years in India, when software developers in West are coding for 20 or 30 years and are still happily developers.

So, what is there in India that we have developers yearning to go into the management since the day they join the corporate world. Hmmm…Well, Let us first go into the kind of work that software developers in India are doing on day to day basis, what kind of work is going on in world class Indian IT companies. The IT in India, is mainly a back office job as of today. Barring a few companies(very minuscule) and projects (much more minuscule) what we in India do is more or less of a support.. Some call it maintenance also :P. Yes, support and maintenance (mainly). Not that much of developing systems(SDLC, from beginning to end- No way!!). We are just the back office guys of the real IT in the west, or better – back office developers. Some guy in UK or USA asks us to put some “.” somewhere in the code, we oblige him by just doing that, no more no less. Every code change we want to do has to be okayed by someone sitting at “on site”.

And the IT guys sitting and coding in Europe and USA just know that. I have come across many instances where the people there just refuse to handover some chunk of work as they do not consider “offshore” as competent enough. Sending work to India, does mean compromising on quality. Do not believe me? Just check this popular web hosting site HostMonster, one of the points they boast about is 100% support based in USA. But, I will not blame the Europeans or Americans for nurturing this perspective of Indian software engineers. It is we Indians, who have nurtured this perspective and that too with so much of dexterity. In a job which just needs nice working logical brains in your head, we Indians have managed to create a class hierarchy. From “junior developers” to “Delivery Managers” and beyond. Why are we so obsessed with creating slaves and masters.. I wonder why! Right now, I am working in Agile software methodology… Which specifically asks that every member in the team should be an expert, does not matter if s/he has 1 year experience or 20 years experience. I remember when I was in my induction and our trainer was telling us explaining this, one of the experienced colleagues pointed out that Agile does not take hierarchy into consideration and is bound to fail in India! He wanted “respect” from his “junior” colleagues and just could not live with the fact after working so many years in IT, he will be just another “expert” in the team.

And, the higher you go into the hierarchy, the less you are supposed to code and the more time should be spent in adding eye candy and bing to your Microsoft excels. That’s when you stop being a developer.

Unfortunately, the kind of management in India also does not inspire good “software developers”. What managers want is “Deliveries”, plain and simple, that he can show to his bosses and in-turn boast about his revenue generating capabilities. Least is he interested in technical or domain expertise of “his” developers who actually are making “deliveries”, as long as they are delivering something on day to day basis(Or at least weekly basis). A developer in turn becomes totally ninsensitive to the quality, as his reputation(in turn ratings which in turn convert to appraisals and/or bonuses) depend more on quantity rather than quality. Delivering more is important than “wasting” your time in increasing your domain and/or technical knowledge. A developer stops digging further, s/he stops learning as the only thing that seems to take him/her further “up” is how well he able to add bing to the excel documents.

In short-term, everyone is doing good to himself or herself. But we are doing a great dis-service to the brand India. Better stop acting like slaves and start living like humans who can “think”.
1 2 3 4 5 6 9