University of Moratuwa has been able to top the Google Summer of Code program, yet again. With 22 participating students university of Moratuwa was far ahead from the second place, University of Campinas Brazil which had 12 participating students. I’m glad i was a part of this success. Here are some stats of GSOC 2009.
Entries categorized as ‘Programming’
University of Moratuwa tops GSOC 2009
September 17, 2009 · 3 Comments
Categories: IT · Programming · Randoms
Tagged: gsoc, university of moratuwa
Debugging in Python
September 7, 2009 · 1 Comment
Python has a simple yet powerful builtin module for debugging called pdb. Using this module you can debug your python code easily even without any IDE.
1. First step is to import the pdb module
2. Next step is to mark the entry point where the debugger would be called in. We use the set_trace() method for that.
pdb.set_trace()
3. When the program is run the execution would stop at the set_trace() method and would wait for debugging commands.
4. To run the next statment enter ‘n’ or ‘next’
5. To print a variable enter ‘pp variable_name’
6. To run until exit enter ‘c’ or ‘continue’
7. To display the current location enter ‘l’ or ‘list’
This would display an appropiate part of the source code with a pointer to the current statement.
8. To step into a method enter ’s’ or ’step’ when debugger is met with a method
9. To insert a break point enter ‘b filename:linenumber’
10. You can also dynamically assign values into variables.
Let’s assume there is a variable called num initialized to 10. You want to see what would happen when that variable is initialized to 20. You just do this. (pdb) num = 20 and then enter ‘n’ to execute next statement or enter ‘c’ to execute program until the end.
An example would look like this
import pdb
def method():
i = 10
name = ‘kasun’
last_letter = name[-1]
last_num = ord(last_letter)
print ‘last_num is’, last_num
if __name__ == ‘__main__’:
pdb.set_trace()
method()
Categories: Journey into Python · Programming
Tagged: debugging, pdb, Programming, python
I am on GitHub
June 13, 2009 · Leave a Comment
Github is a web based project hosting service based on git that has social networking concepts embedded into it. They call it Social Coding. Apart from standard version control facilities github includes social networking features like RSS feeds and followers. Currently I have the GSOC 2009 project hosted in github and hopefully many more in the future.
You can follow my social codings at http://github.com/kasun.
Categories: IT · Programming
Tagged: git, github, gsoc, social-networking
I am selected for summer of code 2009
April 21, 2009 · 8 Comments
I am so happy to announce that I am selected for Google Summer of Code 2009. Over the next 4 months close to 1000 students from over 70 countries would work with close to 150 open source projects to make the world a little better place.
I am selected to work with Maemo and will be using Python. After programming all this time with Java I was planning to move to Python. This will be a great chance for me to learn Python while contributing to an open source project and on the process getting paid by Google.
Thank you very much Google for this wonderful program.
Categories: IT · Programming
Tagged: google, gsoc, python
Sun’s late reply – javaFX
July 24, 2008 · 2 Comments
JavaFX is the latest Rich Internet Applications technology to hit the market. It was first announced by Sun microsystems in 2007 in the JavaOne conference and it seems the javaFX sdk would be out by late this year. Already a beta javaFX script plugin is available for netbeans.
Actually the first RIA technology was a java technology. It is none other than Java applets. Applets never gained any popularity and the word RIA was yet to be suggested. It was Macromedia that first came up with the word RIA.
The aim of Sun is to offer a family of products that could be used to develop Rich Internet Applications across multiple devices. JavaFX would consist of two technologies called JavaFX Script and javaFX Mobile.
So it looks like it would be a battle between Adobes head first start in the RIA technology against the marketing power of the Microsoft against the popularity of the java language.
Categories: Programming
Tagged: javafx
All new Adobe AIR – Cool technology.
April 7, 2008 · Leave a Comment
I have been playing with the newly released version 1.0 of Adobe AIR lately. To say the least it is really a cool technology. It could be used to build rich Internet applications that can be deployed to the desktop and run across different operating systems. To be more clear it is an environment which allows developers to build desktop applications that utilizes the client – server architecture.
One thing thats is a relief is AIR doesn’t have a new language(Another language to learn and i would have said goodbye to AIR). Rather it allows developers to use existing languages or technologies to build AIR applications. There are three options you could use to build AIR applications.
- 1) HTML/AJAX
- 2) Adobe Flex (another cool technology by Adobe)
- 3) Adobe Flash cs3
Here are some sample applications in the official Adobe site
And here are some rapidshare links to some video tutorials to get you started in AIR.
http://rapidshare.com/files/97286863/LC.Ad0be.A1r.part1.rar
Categories: Programming
Tagged: adobe, air, Programming