Archive for the 'Software Development' Category

jconsole: “Connection Failed: Retry?” #SOLVED #java #jmx

Sunday, November 21st, 2010

So you wrote a piece of server software and you found out about JMX and the jconsole tool to remotely monitor all sorts of interesting metrics remotely, all without adding a single line of code to your project.

Say you want to run it the simplest way possible with no authentication, the tutorial says that these are the options you need to pass to the remote virtual machine to enable JMX remote monitoring on some port (let’s put 9595 for illustrative purposes).

-Dcom.sun.management.jmxremote.port=9595',
-Dcom.sun.management.jmxremote.ssl=false',
-Dcom.sun.management.jmxremote.authenticate=false

right?

But when you open your jconsole on your local computer to connect to the remote server…

jconsole myserver.com:9696

You get this fucking error no matter what you do.

You’re just missing one more option they must have forgotten to mention in the retard tutorial at oracle.com

(let’s use IP address 72.14.204.147 as the remote server IP)

-Dcom.sun.management.jmxremote.port=9595',
-Dcom.sun.management.jmxremote.ssl=false',
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=72.14.204.147 #ip of the remote machine, yes the ip, not the name

Voilà

[SCREENCAST] How to do Unit Testing on Android with Eclipse

Sunday, May 2nd, 2010

I was going to make a tutorial, but then I figured that making a video would be a much better way to show this.
As for the code that you could grab from a tutorial, there’s a link at the end of the post with all the code shown in the video demo.

The video demo covers how to create and run Unit Test classes for regular Java classes on Android, and also how to create and run Unit Test classes that test classes that depend on Android “Context” or “Activity” objects.

If your Android unit tests are not running because of frustrating error messages, the time spent watching this video will save you a lot of reading and headaches.

Check the screencast after the break

(more…)

Droid vs Nexus 1 – SunSpider JavaScript Benchmark showdown

Sunday, January 10th, 2010

Nexus One runs JavaScript 2.32 times faster than the Motorola Droid.

The SunSpider JavaScript Benchmark was run several times on both phones and results were consistent.

It’d be great to compare with the iPhone 3Gs, If someone has an iPhone 3Gs, please run the test and send me the results to update this post.

MOTOROLA DROID NEXUS ONE
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total:                 34157.4ms +/- 2.8%
--------------------------------------------

  3d:                   4277.6ms +/- 3.3%
    cube:               1212.4ms +/- 9.6%
    morph:              1680.0ms +/- 12.5%
    raytrace:           1385.2ms +/- 5.2%

  access:               4350.8ms +/- 7.1%
    binary-trees:        473.2ms +/- 7.6%
    fannkuch:           1959.4ms +/- 9.7%
    nbody:               985.2ms +/- 9.6%
    nsieve:              933.0ms +/- 39.8%

  bitops:               2921.4ms +/- 3.4%
    3bit-bits-in-byte:   545.4ms +/- 4.1%
    bits-in-byte:        735.6ms +/- 16.3%
    bitwise-and:         539.8ms +/- 9.9%
    nsieve-bits:        1100.6ms +/- 3.0%

  controlflow:           414.2ms +/- 8.5%
    recursive:           414.2ms +/- 8.5%

  crypto:               2064.4ms +/- 4.5%
    aes:                 859.8ms +/- 3.4%
    md5:                 638.8ms +/- 4.6%
    sha1:                565.8ms +/- 8.1%

  date:                 4434.2ms +/- 9.0%
    format-tofte:       1663.6ms +/- 6.7%
    format-xparb:       2770.6ms +/- 12.7%

  math:                 3223.6ms +/- 3.0%
    cordic:             1110.8ms +/- 6.2%
    partial-sums:       1264.0ms +/- 3.4%
    spectral-norm:       848.8ms +/- 3.2%

  regexp:               3980.0ms +/- 1.3%
    dna:                3980.0ms +/- 1.3%

  string:               8491.2ms +/- 3.8%
    base64:             1108.4ms +/- 7.0%
    fasta:              1683.4ms +/- 1.6%
    tagcloud:           1500.2ms +/- 9.5%
    unpack-code:        2456.2ms +/- 8.7%
    validate-input:     1743.0ms +/- 4.5%
============================================
RESULTS (means and 95% confidence intervals)
--------------------------------------------
Total:                 14706.8ms +/- 4.8%
--------------------------------------------

  3d:                   1593.6ms +/- 6.0%
    cube:                474.8ms +/- 17.2%
    morph:               566.2ms +/- 2.6%
    raytrace:            552.6ms +/- 1.0%

  access:               1885.0ms +/- 10.3%
    binary-trees:        202.8ms +/- 25.7%
    fannkuch:            819.4ms +/- 1.1%
    nbody:               406.2ms +/- 20.7%
    nsieve:              456.6ms +/- 28.1%

  bitops:               1640.8ms +/- 29.2%
    3bit-bits-in-byte:   300.8ms +/- 30.9%
    bits-in-byte:        390.0ms +/- 44.9%
    bitwise-and:         372.0ms +/- 55.7%
    nsieve-bits:         578.0ms +/- 36.8%

  controlflow:           200.8ms +/- 4.5%
    recursive:           200.8ms +/- 4.5%

  crypto:                880.8ms +/- 2.1%
    aes:                 385.6ms +/- 4.6%
    md5:                 254.4ms +/- 5.3%
    sha1:                240.8ms +/- 9.0%

  date:                 1843.6ms +/- 20.6%
    format-tofte:        840.0ms +/- 45.9%
    format-xparb:       1003.6ms +/- 1.3%

  math:                 1250.8ms +/- 1.6%
    cordic:              464.0ms +/- 1.1%
    partial-sums:        450.2ms +/- 3.0%
    spectral-norm:       336.6ms +/- 3.6%

  regexp:               2003.4ms +/- 15.2%
    dna:                2003.4ms +/- 15.2%

  string:               3408.0ms +/- 7.7%
    base64:              387.6ms +/- 2.4%
    fasta:               729.8ms +/- 3.7%
    tagcloud:            605.8ms +/- 4.2%
    unpack-code:        1019.8ms +/- 29.1%
    validate-input:      665.0ms +/- 1.1%

Crónicas del Buen Programador: Invierte en Conocimientos

Sunday, January 3rd, 2010


“Una inversión en conocimiento siempre paga el mejor Interes” Benjamin Franklin

Tus conocimientos y tu experiencia son tus mejores bienes. En 1999 recuerdo que compre un libro llamado “Java In A Nutshell“. Era un libro de referencia completa al lenguaje, en aquel entonces la API era Java 1.1.8. Lei el libro de la primera pagina a la ultima pagina. En unos cuantos meses empece a ganar reputación en la escuela de Ingeniería Informática porque sabia programar (muy poco en comparación a hoy en día) en Java.
(more…)




  • Categories

  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • October 2009
  • September 2009
  • July 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004
  • October 2004