April 15th, 2009
Hey everyone!
We have been updating AndroidSnippets over the last days, and just now pushed a major update for the snippet detail view. That seems a good moment to post about the things that happen in the background and about what will be inside the next release.
For the Snippet-Detail view, we switched over to the syntaxhighlighter.js library which now takes care of the syntax highlighting. This gives us a lot more flexibility and features, such as copy-to-clipboard and view-plain. Furthermore djangosnippets messes up the line numbers if a snippet has a lot of characters and need a scroll bar (example). The new library works very well for this!
Besides a new syntax highlighter and full IE support, we updated the following things:
- Comments got a nicer layout
- Feed of latest comments
- On the frontpage replaced the date of submission with count of comments
- On submitting a snippet, automatically vote up
- Tags in the sitemap
- Displaying related snippets (based on tag-similarities)
- Tweeting of new comments
We are giving our best to improve the site as possible, and what would help us vastly is feedback! Please have a look and let us know what you like, dislike and what you would want. Thanks a whole lot!
Your AndroidSnippets Team
Posted in Uncategorized | 4 Comments »
April 12th, 2009
The last days we have been working on a feature that would show related snippets based on at least two overlapping tags. Well, it seems it is working so far and we published it today!
It works currently very well, although I don’t yet know about scaling if we’s have more than a thousand snippets. Well, time will tell and we will try to speed it up if it becomes necessary
From now on, most Snippets dynamically display links to related snippets in the right sidebar, as seen for example in the “Post a tweet on Twitter” Snippet detail-page. Please have a look and let us know what you think! Thanks!
- Your Android Snippets Team
[update]We have just implemented the feature to post about new comments on Twitter[/update]
Posted in Uncategorized | 2 Comments »
April 11th, 2009
Hey everyone!
This is the first post in our new blog, and as promised we released some new features and updates on AndroidSnippets! Most notably a Twitter integration, fixed username-issue in the comments and a few updates all around…
Implementing the Twitter API to tweet about newly added snippets was easy as pie. Thanks to python-twitter the whole implementation breaks down to these three lines:
import twitter
api = twitter.Api(username="androidsnippets", password="pwd")
api.PostUpdate('Hello World!')
And a few extra lines for the 140 character limit…
# Prepare Data for Tweeting
u = " http://androidsnippets.org/snippets/%s" % new_snippet.id
s = form.cleaned_data['title']
# Truncate to tweet length
max = 140 - len(u)
if len(s) > max:
s = "%s..." % s[:max-3]
# Put the pieces together
msg = '%s%s' % (s, u)
# Maybe space left for a #android ?
if len(msg) < 132:
msg = "%s #android" % msg
That was it! Probably a good idea is to tweet newly added comments as well (maybe a comment-rss too).
If you’ve got any ideas or feedback, please let us know by posting a comment or dropping a line. Thanks!
Other things in today’s update:
- User-names for comments (were previously not displayed if posted by non-registered user)
- Sidebar Updates: Larger Description of the Snippets, Simplified the Homepage
At this point we want to explicitly thank learningandroid.org for their comments and feedback as well as the links to the Snippets… Keep up the good work!
[update]We have implemented the recent comments feed[/update]
What to do next?
Posted in Updates | 4 Comments »
April 10th, 2009
AndroidSnippets got it’s own blog today! Hurray!
We will start posting updates tomorrow with a nice surprise
Your AndroidSnippets Team
Posted in Updates | 3 Comments »