Pages

Tuesday, March 9, 2010

Ohh My..the web has ducks - You dont believe me, check out IronPhyton

Google's full of ducks, youtube is also full of ducks, i mean good web apps are ducks. To be more clear, they all use phyton, a dynamic language (am new at this, i guess php guys know better).But Python’s not the only game in town to use dynamic typing. However it did catch my eye and challenged my perspective as a programmer. “What is this? How does one accurately program anything in this fashion? Five hundred lines of code and not one duck! Python’s a liar.

Well the essence of duck typing is simple :
if it looks like a duck and quacks like a duck, it must be a duck
.
In a language that supports DuckTyping an object of a particular type is compatible with a method or function, if it supplies all the methods/method signatures asked of it by the method/function at run time.simple eh? Am not going to go in the details of this, check out this link for additional information on this subject

I know there are those of you who will be tend to raise issue with dynamic languages,
such as "What if it looks like a duck, quacks like a duck, but is really a dragon impersonating a duck? You don’t want a dragon in your pond.” -(Harris,2009). My answer blame pond keeper i.e the developer

Anyway am beginning to love this idea of dynamic languages. So i decided to start learning IronPhyton (i guess i love new tech stuff). Over the past 2 weeks i dug deep into the world of IronPhyton and read the following two books

1.Pro IronPython by Alan Harris -Short and to the point kind of book, good for someone with vb.net/c# background and people who want to code than do theory

2.ironPython in action by Michael J. Foord and Christian Muirhead -Too many stories but good for the reading, the authors try to explain the concepts from scracth (mo words, less coding i figured).
In all the above i would recommend you read Alan's book, although reading both will give u a more clear picture of all aspect you might want to learn about in ironPython

Am now convinced that if am going to adopt a dynamic language then phyton is the way forward and IronPhyton is the flavor that suites me best. I mean i can even program web apps and add scripting features (plug-in) to my c# applications

Below is an Example of a class defined in IronPhyton
class course:
"Contains the details of a given course"
name='course name'
number='0'
description='description'

#methods to set Course data
def setCourseName(self,name):
self.name=name
def setNumber(self,number):
self.number=number
def setDescription(self,description):
self.description=description

#methods to get Course data
def getCourseName(self):
return self.name
def getCourseNumber(self):
return self.number
def getDescription(self):
return self.description
def getCourseDetails(self):
return 'Name: ',self.name,' Number: ',self.number,' Description: ',self.description

Monday, March 1, 2010

100% CPU Usage Overhead running EM DBConsole 11g on Windows 7 64bit

I think am starting to like Oracle DB, Not that i hated the damn thing. I just never thought i would be using anything other than MSSQL, and object databases. But lets face it, Oracle 10g Express was a big milestone for oracle especially with the introduction of APEX.

I just fell in love with this simple to use technology that allowed me to build exceptional, high end online application using only plsql and some java script (my kind of thing)
Nway i finally got the nerve to do the whole installation on my hp dv5 pavilion laptop with intel core 2 duo processor and 4 gb of ram. (a killer machine......i guess). So after a normal restart all hell breaks loose...Oracle RDBMS kernel service consumes upto 1.5 gb of ram and the cup clocks 100

At that moment, i hated Oracle...I finally decided to do some digging on the net and realized that the problem is universal, affecting even linux machines.
100% CPU Usage Overhead running EM DBConsole 11g

Nway according to this blog this is how you solve the problem


emctl stop dbconsole (or stop the OracleDBConsoleSID Windows service)

create table mgmt_job_bad as select * from sysman.mgmt_job where job_name = 'PROVISIONING DAEMON';
delete from sysman.mgmt_job where job_name = 'PROVISIONING DAEMON';
commit;

emctl start dbconsole (or start the service)


You can still check this link and this one for additional details..But what makes me made is that oracle is aware of this and they have released a patch but it is only available to meta-link users

Nway my focus is set the oracle platform......i think its going to be really interesting
.....