23. jul. 2007

Introducing continuous integration

How continuous is your integration and what could your team be doing to improve it?

A JavaWorld excerpt from Continuous Integration: Improving Software Quality and Reducing Risk (Addison-Wesley Professional, June 2007)

Read the article.

16. apr. 2007

1 kilobytes is no longer 1024 bytes...

According to Berlingske is 1 kilobytes no longer 1024 bytes as we learned in school...


It's now 1000 bytes - It's easier to remember, and the old definition can still be used.
1024 bytes is now kibibyte or KiB.

The same goes for a megabyte is now a million bytes (10002). If you want to note 10242 it's MiB.

.. and of course same story for gigabytes, terabytes and so on.

See original post:
1 kilobyte er ikke længere 1024 bytes - Viden og sundhed - Nyheder - Berlingske Tidende

16. mar. 2007

Introduction to Java's Reflection

What is and how do I use Java's Reflection?


Have you ever wondered what is Java's Reflection and how do you use it?
If so, you may have interest in reading this article that gives you a brief introduction on the subject with examples.

15. mar. 2007

Digital Security & Privacy - For human rights defenders

Bruce Schneier posted a link to a pdf with 164 pages about Digital Security & Privacy - For human rights defenders.

The book is written by Dmitri Vitaliev and is about:
  • Security and Insecurity
  • Security awareness
  • Threat assessment and the security circle
  • Windows Security
  • Password Protection
  • Information Backup, Destruction and Recovery
  • Cryptology
  • Internet Surveillance and Monitoring
  • Circumvention of Internet censorship and filtering
  • Encryption on the Internet
  • Malicious software and Spam
  • Identity Theft and Profiling
  • ... and more
  • 13. mar. 2007

    From RAW to print (danish text)

    I have made a colorprofile for my monitor, but the printing of images look different!

    The way you can fix that, is by using colorprofile for the printer as well.
    This article tells you how: (a danish site)
    http://www.digitalmagasinet.dk/%5Cshow.asp?ID=1093

    3. nov. 2006

    Choose (and remember) great passwords

    A secure, memorable password is easy for you to remember, and hard for others to guess.


    This article gives you some good hints on how to create your password.

    • Don't use the same password for everything.
    • Remember 100 different passwords with 1 rule set.

    Sounds too good to be true?
    Actually no - read the article...

    9. okt. 2006

    Debugging webservices

    Nowadays everything in this SOA age (Service Oriented Arhitecture) is developed as webservices.
    There's a lot of frameworks that hides the specific implementation so often you ask:

    What do I send to that webservice, and what do the service return?


    For that sake, there's a fantastic tool called tcpmon, which can be started as Java Webstart.
    Here you make a proxy where you specify a localport where tcpmon listens, and which server/port the real service is implemented. Tcpmon then shows exactly what is transmitted to the service and what is received.

    Right now I have the problem that we're using a proxy, so tcpmon can't see the destination service (it's through VPN).
    I can see the server in my browser, so I looked up the proxy in my browsers configuration (was webproxy:8080) and tried starting up tcpmon with -Dhttp.proxyHost=webproxy -Dhttp.proxyPort=8080, but still it won't work...

    The solution is actually very simple:
    1. Start the application with: -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888 (Now we use tcpmon as proxy)

    2. In tcpmon start a new connection with: (the proxy now uses a proxy :-)
      Port8888
      Server NameProxyserver (in my case webproxy)
      Server PortProxyserverport (in my case 8080)

    You now don't have to change the endpoint of the service, because it automatically routes though tcpmon!
    Voila! Mission accomplished!

    27. sep. 2006

    Fire onChange in Javascript programmatically

    I want to fire onChange method on an object programmatically in Javascript.

    FireFox and Internet Explorer handles this very differently.
    If you for example sets the value on an object you might expect that the onChange method is fired, but sorry... no firering...

    The solution is this in Javascript:
    function newValueForObject {
    var myObject = document.getElementById(nameOfObject);
    myObject.value = 'a new value';

    if (myObject.hasAttribute) { // Firefox
    if(myObject.hasAttribute("onchange")){
    myObject.onchange();
    }
    } else if (myObject.onchange) { // IE
    var newEvt = document.createEventObject();
    myObject.fireEvent("onchange", newEvt);
    }
    }

    23. aug. 2006

    WindowsDevCenter.com -- How to Remove Startup Programs

    This article tells you how to remove Windows Startup programs.
    Please help me speed up my Windows startup time!


    For example look into:
    %userprofile%\Start Menu\Programs\Startup
    %allusersprofile%\Start Menu\Programs\Startup
    Or in the registry:
    HKLM\Software\Microsoft\Windows\CurrentVersion\Run
    HKCU\Software\Microsoft\Windows\CurrentVersion\Run
    HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
    HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
    HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
    HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx

    16. jun. 2006

    HOWTO: Pick an open source license

    This article is about how to choose an open source license.
    It can be boiled down to this decisiontree, but check the link to see examples.
    How should I choose an open source license?

    Do you want to release any control over how your code is used and distributed?
    • YES: Don't copyright it. Put it in the public domain, and you're done.

    • NO: Copyright the code (paste copyright notices all over it)

      Do you want to allow people to use your code in non open-source programs?
      • NO: Release your code under the GPL licence

      • YES: If somebody uses your code in their program and sells their program for money, do you want some of that money?
        • YES: Two choices:
          1. Don't release it as open source

          2. Dual license

        • NO: "Commercial friendly" license

          If somebody uses your code and improves it (fixes bugs or adds features) do you want to make them give you the improvements back so you can use them too?
          • YES: Use a "reciprocal" license.

          • NO: Use a "non-reciprocal" license.



    See:
    HOWTO: Pick an open source license (part 1) | Ed Burnette's Dev Connection | ZDNet.com
    http://www.opensource.org/licenses

    24. apr. 2006

    Regular Expression Examples

    When using regular expressions (a very brief description):
    • .* = (any character)
    • $ = end of line
    • ^ = start of line
    • \1 first group in replacement.
    Example:
    Text: Hello my friend
    Search for: (.*) my (.*)
    Replace with: \2 is \1
    Result: friend is hello

      18. apr. 2006

      Javascript: Show all properties for an object

      I would like to see all the properties of a given object.

      OK - Here you go:
           function popUpProperties(inobj) {
      op = window.open();
      op.document.open('text/plain');
      for (objprop in inobj) {
      op.document.write(objprop + ' => ' + inobj[objprop] + '\n');
      }
      op.document.close();
      }
      Ex.:
      popUpProperties(document.forms[0]);

      Nice...

      Agile Testing: Should acceptance tests be included in the continuous build process?

      The article discusses what kind of test that's needed in a project, and what the differences are between the different kind of tests.


      Here's some hightlights:

      Unit tests run fast. If they don't run fast, they aren't unit tests.


      Other kinds of tests often masquerade as unit tests. A test is not a unit test if:
      • It talks to a database.
      • It communicates across a network.
      • It touches the file system.
      • You have to do special things to your environment (such as editing configuration files) to run it.
      Read the complete article.

      Secure your SOA

      Enterprise-grade SOAs require a plan for addressing diverse security needs


      Summary
      This article is part of a series of short articles that introduce readers to the industry's various Web services standards. These articles provide a quick introduction to these standards, their backgrounds, underlying architectures, benefits, status, and industry adoption. As some of the content may be a depiction of the authors' viewpoints, readers are encouraged to refer to the links provided in Resources to gain a deeper understanding of a particular standard. This article focuses on the XML and Web services security standards that influence a service-oriented architecture. (3,200 words; April 10, 2006)"

      5. apr. 2006

      Wireless Cracking Tools - IT Observer

      Wireless Cracking Tools - IT Observer
      By Bradley Morgan
      Wednesday, 29 March 2006 10:44 EST

      By familiarizing yourself with following software, you will not only have a better understanding of the vulnerabilities inherent in 802.11 networks, but you will also get a glimpse at how a hacker might exploit them. These tools can even be used when auditing your own network as we will see later.

      Another list of wardriving tools

      (For a detailed description - click the link)

      25. jan. 2006

      The Joel Test: 12 Steps to Better Code - Joel on Software

      The quick way to check how good a software team is.

      The Joel Test
      1. Do you use source control?
      2. Can you make a build in one step?
      3. Do you make daily builds?
      4. Do you have a bug database?
      5. Do you fix bugs before writing new code?
      6. Do you have an up-to-date schedule?
      7. Do you have a spec?
      8. Do programmers have quiet working conditions?
      9. Do you use the best tools money can buy?
      10. Do you have testers?
      11. Do new candidates write code during their interview?
      12. Do you do hallway usability testing?
      For every yes you get a point.
      12 points: Perfect!
      11 points: Tolerable...
      10 points or lower: Get startet!!!

      Joel has a good description to every item, so check it out.

      Ajax: A New Approach to Web Applications

      This article gives you a brief introduction on how-to use AJAX.

      The author (Eric Pascarello) has kindly zipped the example:
      http://radio.javaranch.com/pascarello/files/BasicAjaxExample.zip

      Of course a good place to start is by this book:
      Ajax in Action
      See two sample chapters: http://www.manning.com/books/crane/chapters

      2. nov. 2005

      Set classpath the smart way

      Original: http://mindprod.com/jgloss/classpath.html

      Isn't it annoying you have to specify all the jar files needed to run a javaprogram?


      Nomally you would make a:
        SET CLASSPATH=jar1.jar;jar2.jar;jar3.jar...


      But in stead you can simply specify the directory where you have all your jar files:
        javac.exe -Djava.ext.dirs=usualextdir;anotherdir... 

      and
        java.exe -Djava.ext.dirs=usualextdir;anotherdir...


      See the original page for more tips.