Inspirated

 
 

June 9, 2010

Summer of Code Progress: Unit testing and merge proposals

Filed under: Blog — krkhan @ 4:30 pm

Related Links

Summer of Code Archive Inspirated Code
Report Guidelines Ubuntu Wiki
Original Proposal Ubuntu Wiki

Time Spent

20 hours.

Highlights

The process of “presenting” my code to a giant project like Launchpad made me learn a lot about how to plan, execute and test modifications for large-scale open source projects. It’ll be fun to see the final outcome merged upstream.

I am also feeling more and more confident dealing with Launchpad development. It’s gratifying to know that if I need some API calls during the course of my SoC work which aren’t already there, I’ll be able to implement them on short notices.

Concerns

As per the discussion with Bryce, the approach for attachment search needs to be changed a bit. Instead of going through the “Product -> Bugs -> Attachments” route, we need to instead focus on the “Team -> Source Packages -> Bugs -> Attachments” alternate.

Waiting Items

None.

Stalled Items

None.

Accomplishments

  • Patch: Added unittest for bugs collection.
  • Patch: Added unittests for bugs.findAttachments.
  • Written merge proposal for project-bug-collection branch:

    Merge proposal for lp:~inspirated/launchpad/project-bug-collection

    Summary

    As part of my Google Summer of Code project, I had to implement attachment searching functionality in Arsenal. The end-product would allow user to specify a search string which would be searched in all the bug attachments for a project.

    Doing this efficiently required two modifications in Launchpad:

    • Exposing a bug collection for a particular product (this branch)
    • Implement an attachment search method for a particular bug
    Proposed fix

    Export a bugs CollectionField for IProductPublic.

    Pre-implementation Notes
    • The exported field should be read-only
    Implementation Details
    • Bug schema does not refer to Products directly. Therefore, a join was required to query BugTasks which point towards the Product in question and then query the Bugs related to that BugTask.
    Tests
    $ bin/test -vv -m lp.registry.tests.test_product -t test_bug_collection
    Demo and Q/A

    Create a Launchpad instance:

    	>>> from launchpadlib.launchpad import Launchpad
    	>>> launchpad = Launchpad.login_with('just testing', 'https://api.launchpad.dev/beta/')
    	The authorization page:
    	   (https://launchpad.dev/+authorize-token?oauth_token=ppd2bRZDnN6VX94lRqrq)
    	should be opening in your browser. After you have authorized
    	this program to access Launchpad on your behalf you should come
    	back here and press <Enter> to finish the authentication process.

    Load a project:

    	>>> project = launchpad.projects['firefox']
    	>>> project
    	<project at https://api.launchpad.dev/beta/firefox>
    	>>> project.bugs
    	<lazr.restfulclient.resource.Collection object at 0x925c04c>

    Use the bugs collection:

    	>>> for bug in project.bugs:
    	...     print bug.title
    	... 
    	Firefox does not support SVG
    	Reflow problems with complex page layouts
    	Firefox install instructions should be complete
    	Firefox crashes when Save As dialog for a nonexistent window is closed
    lint

    The changes are lint clean.

  • Written merge proposal for implement-Bug-findAttachments branch:

    Merge proposal for lp:~inspirated/launchpad/implement-Bug-findAttachments

    Summary

    As part of my Google Summer of Code project, I had to implement attachment searching functionality in Arsenal. The end-product would allow user to specify a search string which would be searched in all the bug attachments for a project.

    Doing this efficiently required two modifications in Launchpad:

    • Exposing a bug collection for a particular product
    • Implement a attachment search method for a particular bug (this branch)
    Proposed fix

    Export a read operation findAttachment in IBug which returns a collection of IBugAttachment.

    Pre-implementation Notes
    • The search operation is essentially a text-only grep.
    Implementation Details
    • Zope configuration had to be updated to export the method
    • Multi-line searches break the GET request with a “HTTP/1.1 400 Bad Request” response
    • The attachments are all opened as regular file objects and then searched for the target pattern.
    Tests
    bin/test -vv -m lp.bugs.tests.test_bug_find_attachment
    Demo and Q/A

    Open any Launchpad bug in a browser:

    	https://launchpad.dev/bugs/15

    Create an attachment and upload any text file containing the string ‘char buf’.

    Create a Launchpad instance:

    	>>> from launchpadlib.launchpad import Launchpad
    	>>> launchpad = Launchpad.login_with('just testing', 'https://api.launchpad.dev/beta/')
    	The authorization page:
    	   (https://launchpad.dev/+authorize-token?oauth_token=ppd2bRZDnN6VX94lRqrq)
    	should be opening in your browser. After you have authorized
    	this program to access Launchpad on your behalf you should come
    	back here and press <Enter> to finish the authentication process.

    Load the bug:

    	>>> bug = launchpad.bugs[15]

    Search for the attachment containing the string ‘char buf’:

    	>>> results = bug.findAttachments(text=u'char buf')
    	>>> for attachment in results:
    	...     print attachment.title
    	... 
    	Buffer Overflow Intro.txt
    lint

    The changes are lint clean.

Minor Tasks

Around 8 hours were spent trying to find out why on earth my API calls weren’t getting recognized by apidoc or launchpadlib. In the end, Leonard Richardson pointed out that I was missing a make clean for regenerating the WADL cache. Can’t say it feels great to know that overlooking a build command resulted in so many hours of thorough debugging.

I had another issue with Librarian not recognizing the attachment files created during unittests. Luckily it was resolved quickly when Tim Penhey suggested that I need to commit the local transaction in order for the Librarian to see it.

A minor bug with my previous commits was also fixed which resulted in TypeErrors since the arguments weren’t being sent as Unicode strings.

Actions for the Following Report

As outlined earlier on, “Team -> Source Packages -> Bugs -> Attachments” search is the next target.

Tags: , , , , , , , , ,

June 3, 2010

Summer of Code Progress: Bug collections and attachment search

Filed under: Blog — krkhan @ 7:37 pm

Related Links

Summer of Code Archive Inspirated Code
Report Guidelines Ubuntu Wiki
Original Proposal Ubuntu Wiki

Time Spent

11 hours.

Highlights

Storm is by far the most intuitive way I have ever dealt with relational databases. Because of its pretty integration with Zope in Launchpad, I was able to make modifications to the core in a brief, consistent and non-disruptive way.

Concerns

While searching each attachment on the remote server works uber-fast, I don’t think it’ll be easy to have such a feature merged upstream. It may be argued that going through each file at the server side produces unnecessary load. In order to address such concerns I’ll have to generate relevant statistics after testing the changes extensively.

I still don’t understand Launchpad’s branch structure in detail. I’ve noticed that my branches are forked from devel-db instead of devel. I’m confused about the implications this will have on merge proposals and will consult Bryce about it tonight.

Waiting Items

None.

Stalled Items

None.

Accomplishments

  • Patch: Exported bug collection for product.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    
    <rest-client version="2.3">
    <request>
    <http-version>1.1</http-version>
    <URL>https://api.launchpad.dev/beta/firefox/bugs</URL>
    <method>GET</method>
    <ssl-truststore>/home/krkhan/.keystore</ssl-truststore>
    <ssl-truststore-password>rO0ABXQAB2tyYWNrM2Q=</ssl-truststore-password>
    <ssl-hostname-verifier>ALLOW_ALL</ssl-hostname-verifier>
    <headers>
    <header key="Authorization" value="OAuth realm="OAuth", oauth_nonce="FFFF", oauth_timestamp="1275040360", oauth_consumer_key="just%20testing", oauth_signature_method="PLAINTEXT", oauth_version="1.0", oauth_token="MzwdT4XCNCV2D7m9dK5f", oauth_signature="%260RsqWntpzJWLRnLJV8ML5FBw5700d8qVFFRrNP7mvpbLn2mDCX1DTQXRHTGgPBfx34qMn70fZ4r0DDHM""/>
    <header key="Accept" value="application/json"/>
    <header key="Host" value="api.launchpad.dev"/>
    </headers>
    </request>
    </rest-client>
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    
    <rest-client version="2.3">
    <response>
    <execution-time>1055</execution-time>
    <status code="200">HTTP/1.1 200 Ok</status>
    <headers>
    <header key="Date" value="Thu, 03 Jun 2010 13:08:31 GMT"/>
    <header key="Server" value="zope.server.http (DebugLayerHTTP)"/>
    <header key="X-Powered-By" value="Zope (www.zope.org), Python (www.python.org)"/>
    <header key="Content-Type" value="application/json"/>
    <header key="Content-Length" value="8888"/>
    <header key="Vary" value="Accept,Accept-Encoding"/>
    <header key="Via" value="1.1 launchpad.dev"/>
    <header key="Keep-Alive" value="timeout=15, max=100"/>
    <header key="Connection" value="Keep-Alive"/>
    </headers>
    <body>
    {
       total_size         : 4,
       start              : 0,
       resource_type_link : 'https://api.launchpad.dev/beta/#bug-page-resource',
       entries            : [
          {
             users_unaffected_collection_link          : 'https://api.launchpad.dev/beta/bugs/1/users_unaffected',
             latest_patch_uploaded                     : null,
             users_affected_count_with_dupes           : 0,
             security_related                          : false,
             private                                   : false,
             bug_watches_collection_link               : 'https://api.launchpad.dev/beta/bugs/1/bug_watches',
             date_made_private                         : null,
             linked_branches_collection_link           : 'https://api.launchpad.dev/beta/bugs/1/linked_branches',
             subscriptions_collection_link             : 'https://api.launchpad.dev/beta/bugs/1/subscriptions',
             number_of_duplicates                      : 0,
             id                                        : 1,
             users_unaffected_count                    : 0,
             title                                     : 'Firefox does not support SVG',
             name                                      : null,
             http_etag                                 : '"04c8bb0158a201216e08c5d57e91211a2fa81843-fbd7bf01b3db545656a06d258acd96d362499c81"',
             messages_collection_link                  : 'https://api.launchpad.dev/beta/bugs/1/messages',
             self_link                                 : 'https://api.launchpad.dev/beta/bugs/1',
             who_made_private_link                     : null,
             attachments_collection_link               : 'https://api.launchpad.dev/beta/bugs/1/attachments',
             resource_type_link                        : 'https://api.launchpad.dev/beta/#bug',
             date_last_updated                         : '2006-05-19T06:37:40.344941+00:00',
             description                               : 'Firefox needs to support embedded SVG images, now that the standard has been finalised.\n\nThe SVG standard 1.0 is complete, and draft implementations for Firefox exist. One of these implementations needs to be integrated with the base install of Firefox. Ideally, the implementation needs to include support for the manipulation of SVG objects from JavaScript to enable interactive and dynamic SVG drawings.',
             duplicates_collection_link                : 'https://api.launchpad.dev/beta/bugs/1/duplicates',
             tags                                      : [],
             message_count                             : 2,
             heat                                      : 0,
             bug_tasks_collection_link                 : 'https://api.launchpad.dev/beta/bugs/1/bug_tasks',
             cves_collection_link                      : 'https://api.launchpad.dev/beta/bugs/1/cves',
             users_affected_with_dupes_collection_link : 'https://api.launchpad.dev/beta/bugs/1/users_affected_with_dupes',
             duplicate_of_link                         : null,
             users_affected_count                      : 0,
             owner_link                                : 'https://api.launchpad.dev/beta/~name12',
             date_created                              : '2004-01-01T20:58:04.553583+00:00',
             can_expire                                : false,
             date_last_message                         : null,
             users_affected_collection_link            : 'https://api.launchpad.dev/beta/bugs/1/users_affected'
          },
          <!-- entries omitted -->
       ]
    }
    </body>
    </response>
    </rest-client>
  • Patch: Added findAttachment method for bugs.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    
    <rest-client version="2.3">
    <request>
    <http-version>1.1</http-version>
    <URL>
    https://api.launchpad.dev/beta/bugs/15?ws.op=findAttachments&amp;text=char%20buf
    </URL>
    <method>GET</method>
    <ssl-truststore>/home/krkhan/.keystore</ssl-truststore>
    <ssl-truststore-password>rO0ABXQAB2tyYWNrM2Q=</ssl-truststore-password>
    <ssl-hostname-verifier>ALLOW_ALL</ssl-hostname-verifier>
    <headers>
    <header key="Authorization" value="OAuth realm="OAuth", oauth_nonce="FFFF", oauth_timestamp="1275040360", oauth_consumer_key="just%20testing", oauth_signature_method="PLAINTEXT", oauth_version="1.0", oauth_token="MzwdT4XCNCV2D7m9dK5f", oauth_signature="%260RsqWntpzJWLRnLJV8ML5FBw5700d8qVFFRrNP7mvpbLn2mDCX1DTQXRHTGgPBfx34qMn70fZ4r0DDHM""/>
    <header key="Accept" value="application/json"/>
    <header key="Host" value="api.launchpad.dev"/>
    </headers>
    </request>
    </rest-client>
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    
    <rest-client version="2.3">
    <response>
    <execution-time>698</execution-time>
    <status code="200">HTTP/1.1 200 Ok</status>
    <headers>
    <header key="Date" value="Thu, 03 Jun 2010 13:08:10 GMT"/>
    <header key="Server" value="zope.server.http (DebugLayerHTTP)"/>
    <header key="X-Powered-By" value="Zope (www.zope.org), Python (www.python.org)"/>
    <header key="Content-Type" value="application/json"/>
    <header key="Content-Length" value="553"/>
    <header key="Vary" value="Accept,Accept-Encoding"/>
    <header key="Via" value="1.1 launchpad.dev"/>
    <header key="Keep-Alive" value="timeout=15, max=100"/>
    <header key="Connection" value="Keep-Alive"/>
    </headers>
    <body>
    {
       total_size : 1,
       start      : 0,
       entries    : [
          {
             title              : 'Buffer Overflow Intro.txt',
             bug_link           : 'https://api.launchpad.dev/beta/bugs/15',
             data_link          : 'https://api.launchpad.dev/beta/bugs/15/+attachment/2/data',
             http_etag          : '"0edda8c433532e60707d34a322ce808dbc508ef1-2e61275e2b0bd7cc15cc6322c5fd26c66272dfa6"',
             message_link       : 'https://api.launchpad.dev/beta/redfish/+bug/15/comments/8',
             type               : 'Unspecified',
             self_link          : 'https://api.launchpad.dev/beta/bugs/15/+attachment/2',
             resource_type_link : 'https://api.launchpad.dev/beta/#bug_attachment'
          }
       ]
    }
    </body>
    </response>
    </rest-client>

Minor Tasks

To simplify the task of debugging Launchpad, I gave my Ubuntu VM remote-access and edited Apache configuration accordingly. Now I can just make changes to the sources using NFS mounted branches and test them in my host browser using launchpad.dev.

Actions for the Following Report

I haven’t yet decided whether I should focus on getting these changes merged into trunk yet or instead move on to launchpadlib and arsenal aspect of my project. Guess I’ll just add the matter to the list of items I need to discuss during tonight’s IRC meeting.

Tags: , , , , , , , , ,

May 22, 2010

Summer of Code Progress: Debugging Launchpad’s RESTful API

Filed under: Blog — krkhan @ 8:03 pm

Related Links

Summer of Code Archive Inspirated Code
Original Proposal Ubuntu Wiki

Report

RESTful web services are very fun once they get properly integrated in end-user applications. Testing those services is a whole different thing and I wanted to dive deep into the bare essentials of REST communication performed by Launchpad for its API. The most straightforward way was to write a Python script using urllib2 and/or httplib for the HTTP request/response mantra. Obviously I found it to be a cumbersome solution and then found this little beauty:

RESTClient Screenshot
(Click on the thumbnail for larger version.)

RESTClient does one thing and does it sweetly: it gives you a nice GUI for toying with REST requests. Getting it to work with Launchpad was not as straightforward though as all requests have to be signed to be of any real value. I also had to spent a few hours trying to understand why api.edge.launchpad.net was not recognizing my access tokens until by sheer stroke of luck I used api.staging.launchpad.net and it started working perfectly.

1
2
3
4
5
6
7
8
9
10
11
12
<rest-client version="2.3">
<request>
<http-version>1.1</http-version>
<URL>https://api.staging.launchpad.net/beta/bugs/1</URL>
<method>GET</method>
<headers>
<header key="Authorization" value="OAuth realm="OAuth", oauth_nonce="77848601", oauth_timestamp="1274537900", oauth_consumer_key="just%20testing", oauth_signature_method="PLAINTEXT", oauth_version="1.0", oauth_token="6dwHFn3CPzxjNrrdp3r9", oauth_signature="%26xxxxxx""/>
<header key="Accept" value="application/json"/>
<header key="Host" value="api.staging.launchpad.net"/>
</headers>
</request>
</rest-client>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<rest-client version="2.3">
<response>
<execution-time>897</execution-time>
<status code="200">HTTP/1.1 200 Ok</status>
<headers>
<header key="Date" value="Sat, 22 May 2010 14:26:32 GMT"/>
<header key="Server" value="zope.server.http (HTTP)"/>
<header key="X-Powered-By" value="Zope (www.zope.org), Python (www.python.org)"/>
<header key="Content-Type" value="application/json"/>
<header key="Content-Length" value="2888"/>
<header key="Etag" value=""d9b357c932ada0a71e96401a8c87368d4704a500-dec69b947b887c4addba8eb4aae5ca64c94f616c""/>
<header key="Vary" value="Accept,Accept-Encoding"/>
<header key="Via" value="1.1 wildcard.staging.launchpad.net"/>
<header key="Keep-Alive" value="timeout=15, max=100"/>
<header key="Connection" value="Keep-Alive"/>
</headers>
<body>
{
   users_unaffected_collection_link          : 'https://api.staging.launchpad.net/beta/bugs/1/users_unaffected',
   latest_patch_uploaded                     : null,
   users_affected_count_with_dupes           : 378,
   security_related                          : false,
   private                                   : false,
   bug_watches_collection_link               : 'https://api.staging.launchpad.net/beta/bugs/1/bug_watches',
   date_made_private                         : null,
   linked_branches_collection_link           : 'https://api.staging.launchpad.net/beta/bugs/1/linked_branches',
   subscriptions_collection_link             : 'https://api.staging.launchpad.net/beta/bugs/1/subscriptions',
   number_of_duplicates                      : 0,
   id                                        : 1,
   users_unaffected_count                    : 6,
   title                                     : 'Microsoft has a majority market share',
   name                                      : 'liberation',
   http_etag                                 : '"d9b357c932ada0a71e96401a8c87368d4704a500-dec69b947b887c4addba8eb4aae5ca64c94f616c"',
   messages_collection_link                  : 'https://api.staging.launchpad.net/beta/bugs/1/messages',
   self_link                                 : 'https://api.staging.launchpad.net/beta/bugs/1',
   who_made_private_link                     : null,
   attachments_collection_link               : 'https://api.staging.launchpad.net/beta/bugs/1/attachments',
   resource_type_link                        : 'https://api.staging.launchpad.net/beta/#bug',
   date_last_updated                         : '2010-05-13T23:24:26.362094+00:00',
   description                               : 'Microsoft has a majority market share in the new desktop PC marketplace.\nThis is a bug, which Ubuntu is designed to fix.\n\nNon-free software is holding back innovation in the IT industry, restricting access to IT to a small part of the world\'s population and limiting the ability of software developers to reach their full potential, globally. This bug is widely evident in the PC industry.\n\nSteps to repeat:\n\n1. Visit a local PC store.\n\nWhat happens:\n2. Observe that a majority of PCs for sale have non-free software pre-installed.\n3. Observe very few PCs with Ubuntu and free software pre-installed.\n\nWhat should happen:\n1. A majority of the PCs for sale should include only free software like Ubuntu.\n2. Ubuntu should be marketed in a way such that its amazing features and benefits would be apparent and known by all.\n3. The system shall become more and more user friendly as time passes.\n\n',
   duplicates_collection_link                : 'https://api.staging.launchpad.net/beta/bugs/1/duplicates',
   tags                                      : [
      'iso-testing',
      'ubuntu'
   ],
   message_count                             : 1198,
   heat                                      : 2138,
   bug_tasks_collection_link                 : 'https://api.staging.launchpad.net/beta/bugs/1/bug_tasks',
   cves_collection_link                      : 'https://api.staging.launchpad.net/beta/bugs/1/cves',
   users_affected_with_dupes_collection_link : 'https://api.staging.launchpad.net/beta/bugs/1/users_affected_with_dupes',
   duplicate_of_link                         : null,
   users_affected_count                      : 378,
   owner_link                                : 'https://api.staging.launchpad.net/beta/~sabdfl',
   date_created                              : '2004-08-20T00:00:00+00:00',
   can_expire                                : false,
   date_last_message                         : '2010-05-13T23:24:21.253673+00:00',
   users_affected_collection_link            : 'https://api.staging.launchpad.net/beta/bugs/1/users_affected'
}
</body>
</response>
</rest-client>

With a local Launchpad ready to do my bidding and a debugging process in place for elaborating its API, I’m looking forward to the coding phase. Which, coincidentally, begins on the same day I give my final exam for the current semester.

Rest REST: the sweet sauce of labor.” — Plutarch

Tags: , , , , , , , , ,

April 11, 2010

Workaround for getting received SMS’ sender number in PyS60

Filed under: Blog — krkhan @ 9:22 pm

It’s fairly simple in PyS60 to get the sender’s details whenever a new SMS is received. However, if the sender has an entry in your address book these details translate to just the contact name. That way, if the contact has multiple numbers you have no idea which number was used to send the text. Here’s an ugly little workaround for this issue:

received-sms-number.py

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
def message_received(id, box):
    box.sms_messages()
    sender = box.address(id)
 
    if sender[0] != '+' or sender[1:].isdigit() == False:
        # Try to find the sender's number from log.
        logged_sms = logs.sms(mode = 'in')[0]
 
        # To confirm that the log entry is the same one we're concerned
        # about, do some checks.
        if logged_sms['subject'] == sms_text[:64]:
            number = logged_sms['number']
            contacts_db = contacts.open()
            found_contact = contacts_db.find(number)
            if found_contact:
                title_match = True
                for token in sender.split():
                    if found_contact[0].title.find(token) == -1:
                        title_match = False
                if title_match:
                    sender = number
 
    print "SMS Received from: ", sender

You can use this little snippet of code to reply back to the sender even when there’s a matching entry in the contacts database. This in turn opens up a whole new range of interesting ideas for auto-responding applications.

Tags: , , , , , ,

April 1, 2010

71 days of E71: Top 10 3rd party applications

Filed under: Blog — krkhan @ 2:05 pm

While I would have sold my clothes, PS2 as well as my soul to get my hands on a N900, I couldn’t strike a practical deal and in the end had to settle for E71. Now, while E71 does not ooze s** by running a full-fledged Linux distro it still does a pretty good job of running Symbian. The specs are fun, the keypad is great and the build quality is nothing but ergonomic love.

After completing 71 days of tinkering with the new phone, I have settled on the choice of apps which would become an integral part of my digital life. I’m listing the top ten here, but the arrangement is in no way meant to be indicative as an absolute index of application quality. These are just the ones that I found useful.

10. ScreenSnap — Honorary Mention

It would be a bit unfair to not list the very application that powers the visual aspects of this post. So here we are with the self-referential snap:

ScreenSnap Screenshot

9. SmsOne — Hassle-Free Flash SMS

“Flash” texts — the ones which always instantly show up on the recipient’s cell and are not saved in the inbox unless specifically made to — have always been a speciality of applications with poor interfaces as well as poorer integration with the rest of the phone. SmsOne, on the other hand, has a simple interface with excellent phonebook integration for making the job as simple as possible.

SmsOne Screenshot

8. Mobipocket MobiReader — eBooks Made Fun

Reading a large PDF file on your E71 is indeed possible, but it takes away any fun whatsoever by forcing you to deal with redundant scrolling and weird font sizes. MobiReader combined with the desktop software Calibre is the ultimate eBook reading experience on Symbian phones.

MobiReader Screenshot

7. Gravity — Pulling Tweets Consistently

The one word for summarizing Gravity would be: slick. Of all the Twitter applications for Symbian — and there are quite a lot — Gravity is the most organized, reliable and pretty-looking competitor around.

Gravity Screenshot

6. PuTTY — That Insane Power in Your Hands

I’m lying down in my bedroom and I want to play this song on the speakers in my drawing room. I’m in my university and I want to start this download on my laptop which is unfortunately back at home. I’m in another city and I want to see the contents of this file which is in my home PC.

I can. Because I have that command-line access at my fingertips:

SmsOne Screenshot

5. mIRGGI — IRC Never Dies

Open-source — being the distributive collaboration that it is — depends heavily on mailing lists and IRC channels for communication. For the latter, mIRGGI works flawlessly. In fact, you can even do fancy stuff like using different network connections for different channels.

mIRGGI Screenshot

4. Python — “It’s …”

For all the comparisons made over the years between Perl and line-noise, Symbian C++ easily beats both by a mile. Which is why your choices are rather limited if you want to program for Nokia phones while preserving your sanity at the same time. Your best bet is to go for Maemo. Unfortunately, that ain’t exactly an affordable option for everyone. The other way is to use PyS60 rely on that programming language which makes every other alternative pine for the fjords.

PyS60 Screenshot

3. MSDict Viewer — Dictionaries which Help

A dictionary is one of the least useful things you can carry around. Even with one of them installed on your phone, they rarely get used. Similarly, the pronunciation guides used in those dictionaries are cryptic symbols at best. Add the ability of audio pronunciations and you suddenly have a lovely app referring which almost becomes an addiction.

MSDict Viewer Screenshot

2. Google Maps — Never Lose Yourself

For people who’re not especially good with directions, there couldn’t have ever been a better solution:

Google Maps Screenshot

1. Opera Mobile — Synonym for Excellence

Even if this list is tailored more to my requirement, get some hundred people to make similar ones and Opera will be the topper in majority of the rankings. Opera bridges that gap between mobile browsing and real browsing and is one of those applications which epitomize how software should be engineered.

Opera Mobile Screenshot

Tags: , , , , , , , , , , , , , , , ,

February 26, 2010

Facebook Friends Graph v0.2 — Deb and RPM packages for Ubuntu and Fedora

Filed under: Blog — krkhan @ 2:36 am

Thanks to Christoph Korn, Ubuntu users can now install the package with a single click from the GetDeb repository. The Deb file itself is available on the release page here, along with an RPM for Fedora users.

The looks:

Facebook Friends Graph v0.2 Screenshot

And the hooks:

Changelog:

  • Fixed:
    • Bug #522735: Facebook: Application Request Limit Reached
    • Bug #523378: Connection reset by peer
    • Bug #522487: Facebook Friends Graph fails when friends have a dash in their name [patch by Little Jawa]
Tags: , , , , , , , , , , , , , , ,

February 21, 2010

Bookmark Undertaker v0.3 — Picking up the threads

Filed under: Blog — krkhan @ 8:09 pm

Threads are love. Threads are speed. And more often than not, threads are a consistent PITA. However, I’ve had an accidental epiphany just a few hours ago:

When in doubt When you need to communicate among threads, use synchronized Queues.”

There. This magic mantra will solve more issues in your life than you can ever imagine, and certainly more than I expected.

Getting back to the topic at hand, adding threading support to the program has sped up the bookmark checking process by a factor of about 435895234. Coupled with fixing of some parsing bugs, Bookmark Undertaker v0.3 is finally capable of providing a quick, stable and consistent way of sanitizing your Firefox favorites:

Boomark Undertaker v0.3 Screenshot

This time, I’ve also tried to provide Deb and RPM packages on the release page for easy installation by the Debian/Ubuntu/Fedora populace.

Ushering in the era of communist applications:

“If everyone gives one thread, the poor person will have a shirt.” — Russian Proverb

Tags: , , , , , , , , , , , , , , , ,

February 19, 2010

Facebook Friends Graph on Ubuntu

Filed under: Blog — krkhan @ 12:04 am

I never really thought anyone other than me would be interested in seeing gargantuan graphs of their friends’ connections until I found out through this post on the OMG! Ubuntu! blog that my application was included in the GetDeb repository for Ubuntu users. I have not used Ubuntu myself since about never, but apparently you can now install the application on Karmic Koala with just a few clicks.

Edit: I have now tested the installation on Karmic myself and can guarantee that it indeed works without any fuss. Gotta love Launchpad/Ubuntu.

The application itself was in a pretty much skeletal state of being so I was a little taken aback by the exposure. Nevertheless, I was reminded of the famous aphorism apropos of open source development:

“Release early, release often.” — Linus Torvalds

And indeed, the bug reports that came from users were a valuable byproduct of the Ubuntu push as I had stopped development on the script after it started working fine for me.

Tags: , , , , , , , , , , , , , , ,

February 7, 2010

Faking User-Agent with PyS60

Filed under: Blog — krkhan @ 12:00 am

“Anyone who slaps a ‘this page is best viewed with Browser X’ label on a Web page appears to be yearning for the bad old days, before the Web, when you had very little chance of reading a document written on another computer, another word processor, or another network.” — Tim Berners-Lee in Technology Review, July 1996

People never learn. Slapping such labels is one thing, they even go as far as adopting brain-dead practices of checking user-agent strings and refusing service to any browser not originating from Redmond. For example, Opera Mobile — the sexiest mobile application on planet — works astonishingly well for Javascript websites. Nevertheless, when trying to browse my university’s academic management portal on it I am presented with a big ugly “We’re dumb, you need to open this page with Internet Explorer 6.0 or later because it uses JAVASCRIPTXX0RZ.” Even though Opera does allow spoofing of user-agent strings, the fake strings still contained “Symbian” as the operating system which still resulted in incompatibility errors.

As ever, Python came to the rescue. Firing up the Twisted framework, I created a simple HTTP proxy which modifies the user-agent string on the fly. Peaches:

Opera Mobile User Agent Spoofed
User-Agent Proxy Screeshot

The script is still very quirky and is the farthest thing from what you’d call a stable solution. You can download the inital release here. The zip file contains the tiny proxy server script as well as Twisted and Zope dependencies. Good luck with trying to counter retards who’re doing everything they can to avoid compatibility. Yes, even 14 years after Sir Tim’s veracious proclamation.

Tags: , , , , , , , , , , ,

February 6, 2010

Inbox Stats v1.1 — S60 3rd Edition Compatibility

Filed under: Blog — krkhan @ 3:16 pm

Continuing the migration to E71, here’s the new release for Inbox Stats which works on Python 2.5 releases:

inboxstats-1.1.zip
Inbox Stats v1.1 Screenshot

Tags: , , , , , , , , , , , ,
« Previous PageNext Page »