Wednesday, January 25, 2012

Why don't you run Linux? An absolute classic

Steve the super villain

Software testing

Lately I've been involved in a lot of software testing and came across this awesome article about it:

Top Five (Wrong) Reasons You Don't Have Testers

I find this guys blog very insightful and like the list of checks he recommends for software development:

Do you use source control?
Can you make a build in one step?
Do you make daily builds?
Do you have a bug database?
Do you fix bugs before writing new code?
Do you have an up-to-date schedule?
Do you have a spec?
Do programmers have quiet working conditions?
Do you use the best tools money can buy?
Do you have testers?
Do new candidates write code during their interview?
Do you do hallway usability testing?

Tuesday, January 24, 2012

My WSDL Cheat Sheet



Service -> ‘Java Class’

Operation -> ‘Java Function’ The Operation defines the name of the Operation and ties the request response messages together.

Port -> A service is assessable on a Port.  A Port has a unique name space and binding attribute. The Port specifies the service address. Web service can be exposed as SOAP or HTTP. The same web service can also be exposed by multiple Ports.
SOAP example:
<port name='WeatherSoapPort' binding='wsdlns:WeatherSoapBinding' >
<soap:address   location='http://localhost/demos/wsdl/devxpert/weatherservice.asp' />
</port>

HTTP example:
<port name='WeatherSoapPort' binding='wsdlns:WeatherSoapBinding' >
<http:address location="http://localhost/demos/wsdl/devxpert/weatherGET.asp"/
</port>

Message -> Normally two messages required i.e. input message and output message. Messages contain zero or more <part> elements. Sample messages below
<message name='Weather.GetTemperature'>
    <part name='zipcode' type='xsd:string'/>
    <part name='celsius' type='xsd:boolean'/>
 </message>

 <message name='Weather.GetTemperatureResponse'>
    <part name='Result' type='xsd:float'/>
 </message>rt name='WeatherSoapPort'

Binding -> ‘Ties it all together’ - specifies binding(s) of each operation in the PortTypes section

Sunday, January 15, 2012

More Holiday Photos

Cartoon effect on my camera

Dam on Table Mountain

Dam water

More dam water

Some people choose to ignore warnings

Nice bird

uShaka

uShaka
Swimming at Silvermine


Holiday Photos December 2011

Table Mountain

St James Beach - 26 December 2011
View of Constantia wine farms

View of Table Mountain from Milnerton - I like the panorama mode on my camera phone :)

Out at the Baxter for 'Some like it Vrot'

Sea Point

View from Hillcrest Berry Farm



Beware of the Prawns (only in Joburg)

Tuesday, November 15, 2011

Novell IDM (dirxml) - How to get the user DN in LDAP format

You can use the following Dirxml script to get the user DN in standard LDAP format:

<do-set-local-variable name="SlashDN" scope="policy">
<arg-string>
<token-src-dn/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="userDN" scope="policy">
    <arg-string>
        <token-parse-dn dest-dn-format="ldap" src-dn-format="qualified-slash">
            <token-xpath expression='query:readObject($srcQueryProcessor, "",$SlashDN,"","")/@qualified-src-dn'/>
        </token-parse-dn>
    </arg-string>
</do-set-local-variable>

Tuesday, September 13, 2011

jQuery and IE8 not the best of friends

So I've been pulling my hair out with IE8 ... again. I wrote some code that was working like a charm in FF and Chrome:

$(this).val().trim().match(match)

Sadly this code did not work in IE8 and I got the following error:

"Object doesn't support this property or method"

Changing it to the below did the trick:

jQuery.trim($(this).val()).match(match)

Another part of my life wasted debugging IE issues :(

Wednesday, August 3, 2011

Some of my old IT Textbooks

Wow what a find! Was digging around the house and found some really old textbooks. Check this out. Love the story about the CPU.









Tuesday, June 28, 2011

My Favourtie LDAP Tool

Just had to post this one, else I land up Googling between 1000s of LDAP tools.

http://www.novell.com/communities/node/8652/gawors-excellent-ldap-browsereditor-v282

Saturday, June 25, 2011

One of my best CDs


http://www.kalahari.net/music/All-Comes-Round/19738/120249.aspx

Wow I forgot how good this CD was. It's really good to enjoy some old school SA music :)

Tuesday, June 14, 2011

Oracle Regex

Needed some regex to only leave a-z values.

This seemed to work for me:


select regexp_replace(ent_val,'[^a-zA-Z]','') from ac

Friday, May 20, 2011

Novell Null Driver vs Loopback Driver

FYI a loopback driver can perform a query operation. A null driver returns nothing to a query operation.

Also they are different drivers as they use different Java classes:

com.novell.nds.dirxml.driver.nulldriver.NullDriverShim

vs

com.novell.nds.dirxml.driver.loopback.LoopbackDriverShim

ldapsearch strange results

Always make sure you use the -h option when using ldapsearch on Linux. Else it defaults to what's in the local ldap config (/etc/ldap.conf) which can result in some strange and unexpected results.

Wednesday, May 18, 2011

Clearing a lock in Oracle

I've been using Oracle's SQLDeveloper now for a while and found you can easily lock a table by not committing an update. Coming from a MySQL and MSSQL world I'm pretty used to updates committing by themselves. Here is how I cleared the lock:


Run this SQL to see what's locking what:

SELECT SUBSTR(TO_CHAR(session_id),1,5) "SID",
       SUBSTR(lock_type,1,15) "Lock Type",
       SUBSTR(mode_held,1,15) "Mode Held",
       SUBSTR(blocking_others,1,15) "Blocking?"
  FROM dba_locks


Use this command to get the serial number of the session:

SELECT s.inst_id,
       s.sid,
       s.serial#,
       p.spid,
       s.username,
       s.program
FROM   gv$session s
       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE  s.type != 'BACKGROUND';



Use this command to kill the session that's holding the lock:

ALTER SYSTEM KILL SESSION ',';
e.g.
ALTER SYSTEM KILL SESSION '126,19703';

Some good references:

http://www.oracle-base.com/articles/misc/KillingOracleSessions.php
http://www.broadh2o.net/docs/database/oracle/oracleLocks.html

Followers