Friday, July 9, 2010

In Google DevFest 2010

Currently I am attending the Google DevFest 2010. Timothy Jordan and Bob Aman in their presentation on Open Social.

Today the registration was pretty crowded, and they differentiate based on the first letter of your first name. I was in the "A-F queue". The queue was long and the registration process was draggy.

They changed the schedule a bit, Daniel Lee presented the Google Maps as opposed to the initial schedule on the web site: Google DevFest 2010 in Singapore. He showed us how to create a coffee shop location based informative web site as an example.

After the first session, Jeremy Orlow, an engineer working on the Chrome team, explained the HTML5 and the Chrome. They skipped the Q&A for HTML5 and Chrome. May be they pushed forward because we're late because of the registration, so in order to finish during the lunch time, the organizer advised to ask in person to Jeremy during lunch time for anyone who want to ask questions.

Then here comes the third session, and its about  Open Social.  Tim was of more lively presenter than others I think. More like MC may be? Google Buzz API stuffs, atom, OAuth, Salmon, Pubsubhubbub etc.

Tuesday, June 29, 2010

PyDev 1.5.8 is out: Eclipse IDE + PyDev == Cool Python IDE

PyDev 1.5.8 is out now. Eclipse update site: http://pydev.org/updates

  • Support for Eclipse 3.6 Helios
  • The PyDev jar is not signed out (no more confirmation message that you are installing from untrusted source during the Eclipse plugin installation)
  • DoesNotExist and MultipleObjectsReturned recognized in Django
  • Some issues fixed

PyDev is a plugin that enables users to use Eclipse as an IDE for Python, Jython and IronPython development. It has the syntax highlighting, refactor, syntax analysis, debug, and code completion.

Monday, June 14, 2010

Mercurial Server 1.0.1 Installation on Ubuntu

When we are working using Subversion, we can expose the Subversion repository using svnserve (open the default port 3690 and svn:// protocol) or leverage the Apache WebDav to expose your Subversion service in HTTP (the web protocol -- I've always tempted to write it as HTTP Protocol which is incorrect as the last P letter stands for 'protocol').

And of course if you are just as lazy as I, you will use the CollabNet Subversion or Edgewall Trac.

Mercurial Server from Lshift is one way to achieve similar thing. Though it is named Mercurial Server, it is not a server in traditional client/server perspective. It leverages the SSH authentication to make it like a central repository where multiple user can access and serves the same purpose.

Surprisingly, it is very easy to install in an Ubuntu box.

[sourcecode lang="shell"]
$ sudo apt-get install mercurial-server
[/sourcecode]

Gotcha! You have it now.
With this Mercurial Server, you can access the server using:
hg clone ssh://<ssh-user>@<host-name-or-ip-address>[:<ssh-port-num>]/<folder>

[sourcecode lang="shell"]
$ hg clone ssh://mercurial@192.168.0.1/projects
[/sourcecode]

Saturday, June 12, 2010

Attending Singapore Google Technology Group Meetup

 

Today I attended this Singapore Google Technology User Group Meeting. It's my first time to attend such a Google meetings. Some of previous meet ups had always fallen on the wrong days -- on the day that I have something else to do. Today I am glad to be able to make it, attended the meeting, and Wesley Chun, was the speaker. He presented 2 sessions, one about Python and the other one about Google App Engine.

This guy's a hardcore Python guy, wrote the Core Python series of book, and was a presenter in the PyCon Asia Pacific 2010, Singapore -- an event that has been held last 3 days. Awesome in depth knowledge, vast industrial experiences, and keep the talk flows fluent.

The rest about the meeting can be found here: http://www.sg-gtug.org/2010/05/sg-gtug-special-tutorial-session-june.html

Tuesday, May 18, 2010

Playing with IronPython again

It's been quite a while I haven't posted anything on this blog. I was too lazy to write. Now that I regain the composure, try to write again.

I have tried IronPython 2.6 before. It was presented in Python User Group Singapore somewhere last year which captured my attention. The IronPython made it easy to play around with .NET and Silverlight stuffs -- which not easy for me as I haven't play with .NET stuffs for quite sometime. It worked well that time. Recently when I want to run the ipy.exe interpreter, I came into certain problem. I was running it on Vista box, but the application crashed after I started, after around 30 seconds waiting for nothing. I try to do some ordinary "dance" like unistall-install, with no luck.

Today I gave it a try again, and eventually it worked after I installed the .NET framework 4 and Silverlight 4 from the download site. I wasn't sure what I missed, nevertheless now it works.

I tried some stuffs with Silverlight only to remind that I need a XAML editor to edit forms. I tried to download and use kaxaml from http://www.kaxaml.com, but haven't had much luck. It installs well, but didn't run quite well.

Thursday, April 22, 2010

PyCon Asia Pacific 2010 has been firmly announced

Now they announce the PyCon Asia Pacific 2010.

http://apac.pycon.org/

9-11 June 2010, at Ngee Ann Kongsi Auditorium, Singapore Management University.

SGD 250 for corporate.
SGD 200 for early bird individuals.

Highlights:

  • Steve Holden, Chairman of the Python Software Foundation (PSF) will be coming  as one of the keynotes
  • Mark Hammond, author of "Python Programming on Win32"
  • Wesley J. Chun, author of "Python Core Programming", now software architect at Google
  • Martijn Faassen, a long standing member of the Zope Foundation

Friday, April 16, 2010

Missed PUG monthly meeting, exploring Java byte code and BCEL

I missed yesterday's Python User Group Singapore monthly meeting. I had to finish certain document before leaving office yesterday, I couldn't make it.

Last night I was exploring this Byte Code Engineering Library (BCEL) from Apache. This library gives us a way to analyse, create and manipulate binary Java class file. This library has been used by a lot of Java frameworks and containers, as those frameworks need to add some instrumentation when deploying those components in those frameworks and/or containers.

Well, this is considered an advanced thing in Java. Java classes are stored as Java byte codes. When you compile a Java source code, you will have .class file which is a Java byte code file. Java byte code is a form of machine instruction (in this case Java Virtual Machine or JVM). So it's executable binaries for JVM. Java byte code also have opcode like assembly language.

There are 2 type of instruction sets:

  1. stack machine
  2. register machine

Stack machine operates on stack. Operands are the stack only. The first programmable scientific calculators released by Hewlett-Packard are stack machines (http://www.hpmuseum.org/). They operate in a Reverse Polish Notation. I remembered that my first one of my first Java programming assignment was to implement GUI application for a Reverse Polish Notation calculator. My Dad has his own story of owning one of these calculators and he used to be very proud of the magnetic stripe stored Moon Lander game. It's just a number only Moon Lander, but it's a game running on programmable HP calculator!

Other sample of stack machines that most of us still use is the Intel x86 math coprocessor instructions set. It uses registers that are organised as stack, which will rotate back when overflowing the boundary (of 8 registers).

Stack machines, because it's only operate on stack and usually only the last few data in stack, may have shorter instruction bits. Unlike register machines which usually take some of the bits to specify from which and which register the data is from, and to which register the result goes, stack machines enjoy the benefit of default operands, that is top 1 or top 2 of the stack. The result is always in the stack.

I think one of the main considerations why JVM uses stack machine is to pack as few numbers of bits in the opcode. As most JVM runs as virtual machine, there will be no performance advantages of having a lot of register which anyway stored in RAM by the virtual machines.

Ok, enough for the stack machine, now back to the BCEL it's exciting to touch back the assembly language, byte code, opcode, operand, and stuffs if you are really into  it. I try to code a bit and will share the code later.