Using YQL in Dart

I was exploring Dart, and wanted to create a small project using it to compare it with JavaScript. I was searching for ideas and then I thought of using YQL in Dart, to see how easy or difficult it is.

After poking around a bit, I found that Dart supports making Rest calls using XMLHttpRequest object, similar to JavaScript. I quickly tried to make a YQL call using that object.

The following is the bulk of the code. It is exactly how you do it in plain JavaScript.

URLEncoding

The only place I found a problem, was that Dart doesn’t have a URLEncoder yet. You have to emulate the URLEncoding done in JavaScript. I hope Dart gets its own URLEncoder soon.

Full source code

I have uploaded the full source code to github and added a couple of other examples as well. Check it out.

Posted in JavaScript/jQuery | Tagged , , | 10 Comments

URLEncoding in Dart

I was trying to use YQL from Dart and found that there is no way you can do URLEncoding using Dart.

I searched the dart:html, dart:uri and dart:io packages and found that none of them have the method to do URLEncoding.

I then posted about it in stackoverflow and then later found that, right now the only way to do URLEncoding is to emulate the encodeURL() function of JavaScript. Someone from Google has already done it. I just copied the file and placed inside my Dart project and then used the following line in my dart file.

#import("EncodeDecode.dart");

Although it works right now, I would really like to see this as part of the dart:uri package. Let’s see if someone from the Dart team is listening to this.

 

Posted in JavaScript/jQuery | Tagged , , | 5 Comments

Posts By Tag Plugin now supports excluding current post

I recently released a couple of updates to my Posts By Tag WordPress Plugin, which allows you to display a list of posts based on tags either in the sidebar as a widget or inside your posts using either shortcodes or a template tag.

Changes

The following are the changes that I have made to the Plugin

  • Ability to exclude current post/page
  • Moved caching logic to widget
  • Added Lithuanian translations

Ability to exclude current post/page

One of the most requested feature in the Plugins was to have the ability to exclude the current post in the listing. This could happen when ever you are including the tag of the current post also in the list of tags.

Now I have added an option in the widget to exclude the current post or page.

This option is also available even if you are using either the template tag or the shortcode

Moved caching logic to widget

I have cleaned up the logic which I was using to cache the DB queries used by the Plugin. If you are using the widget, then the output of the widget itself is cached. If for some reason, you don’t want to the widget to cache the queries you can disable it as well.

But if you are using the shortcode or the template tag, then you have to manually cache the output or the db queries.

Dev Time

This release took me about 3.5 hours of development time. You can find more details about the dev time tracking which I have recently started doing in a separate blog post.

Download

You can download the latest version of the Plugin from the Plugin’s home page.

Feedback

Try out the Plugin and if you have any comments or if you want to report any bugs, please leave a comment below.

Stay updated

I would be posting updates about this Plugin in my blog and in Twitter . If you want to be informed when new version of this Plugin is released, then you can either subscribe to this blog’s RSS feed or follow me in Twitter .

 

Posted in Plugin Releases | Tagged , , | 1 Comment

Started tracking time spend on my pet projects

Regular readers of my blog will know that I have lot of pet projects. WordPress Plugins, Android Apps, Arduino projects, jQuery Plugins and a whole variety of other hobbies as well.

Some of them are really popular. For instance my Bulk Delete WordPress Plugin has been downloaded for nearly 100,000 times. The flip side of it is that these pet projects have some additional baggage as well. Support questions, regular updates, feature requests etc can be sometimes very time consuming.

I always wanted to know the projects, which takes up most of my free time, but didn’t had any metrics or logs. So I have started to track the amount of time I am spending on each of these projects.

The advantage of this is that, now I know which project are real time hogs and can have some metrics to decide on whether it is worth spending time on those projects or not. I am also going to add this data to the project readme files, so that people who use it might also know the amount of time and effort I have put it on those projects 🙂

I have already started this and the recent release of my Bulk Delete WordPress Plugin had this metrics. I have spent close to 11 hours for releasing the update to the Plugin.

Let’s see how this new experiment turns out to be.

BTW do you guys also track your time spent on pet projects? If yes, then share your experiences as well.

 

Posted in Random/Personal, WordPress | Tagged , , | 3 Comments

Bulk Delete Plugin now supports deleting by permalink

I have recently released lot of updates to my Bulk Delete (which is a WordPress Plugin that allows you delete posts in bulk). The new updates allows the user to delete posts based on permalink in addition to deleting by tags or categories.

Like the previous updates, this feature was also requested by the users of the Plugin. So if you have any feedback or feature request, don’t hesitate to contact me, I will try to add them to the Plugin.

New features

The following are the new features that are supported by the Plugin

  • Ability to delete posts by permalink. This features was written by Martin Capodici
  • Major UI revamp. Let me know if you have any feedback about the new UI.
  • Added debug information, which should help you to debug issues related to your server.
  • Added roles and capabilities for menu.

Bug Fixes

The following are some of the bug fixes which have gone into the releases

  • Fixed issues with translations
  • Fixed a major issue in the way how dates were handled
  • Fixed CSS issues in IE

Translations

The following are the different languages for which translations have been added. If you are willing to translate the Plugin in your language, then you can find the pot file inside the language’s folder.

  • Turkish
  • Spanish
  • Italian
  • Bulgarian
  • Russian
  • Lithuanian

Dev Time

All these releases combinedly took me about 11 hours of development time. From this release on I have started tracking the amount of time I am spending on each release of my WordPress Plugins. There is a separate blog post, which explains the reasons why I track my development time.

Download

You can download the latest version of the Plugin from the Plugin’s home page.

Feedback

Try out the Plugin and if you have any comments or if you want to report any bugs, please leave a comment below.

Stay updated

I would be posting updates about this Plugin in my blog and in Twitter . If you want to be informed when new version of this Plugin is released, then you can either subscribe to this blog’s RSS feed or follow me in Twitter .

 

Posted in Plugin Releases | Tagged , , | 2 Comments

Buying Arduino in Bangalore

After seeing my talks and projects on Arduino lot of people keep asking me the same Question. Where do buy Arduino or other electronic components in Bangalore?

Instead of replying to them individually, I thought I would post about it here, so that it is useful for others as well.

Okay, to buy Arduino in Bangalore you have two options, either buy them offline (in a brick and motar shop) or buy them online.

Buying electronic components in Bangalore

In general you can find most of the electronic components that you need for your hobbyist projects in SP road in Bangalore. It is similar to Richee Street in Chennai. (I guess every city has a similar a similar road)

For people who are new to Bangalore, I have embedded a map of the place, which I am talking about below.


View Larger Map

Shops that sell Arduino in Bangalore

In SP road, I know the following shops that sell Arduino. There could be others as well, but these are the ones that I have personally bought Arduino from.

  • NSK Electronics (price Rs. 1300, checked on 24-March-2012)
  • Vishal Electronics (price Rs. 1300, checked on 24-March-2012)

NSK Electronics also sells Arduino clones for a much cheaper price. Once thing to keep in mind is that, these Arduinos don’t come with the USB cable. You have to buy them separately. Don’t forget to buy them as well. Last time I checked the price was around Rs 20.

Buying Arduino Online in India

If you are not in Bangalore or if you prefer to buy them online then you can buy them from one of the below shops.

  • rhydolabz.com – I bought my first Arduino from them, way back in 2010
  • 9circuits.com – They are slightly costly, but they have Arduino ADK boards as well.
  • tenettech.com – They have lot of good tutorials and also have a clone as well.

Buying USB Host shield

I have not seen any shop selling USB Host Shield in Bangalore so far. The only option is to buy them online from Circuits@home

If you find a better option, then let me know in the comments below and I will add them to the article. Till then, best luck with your Arduino 🙂

Posted in Arduino | Tagged , | 57 Comments

Transferring data from Android using Audio

Just came back from monthly Bangalore Android meetup. Today I gave a talk about transferring data from in and out of Android using the audio jacket.

About the talk

In the talk I mainly discussed about the way by which you can transfer data in and out of Android using the audio.

I also discussed about the ways by which you can read this data in Arduino from Android.

Continue reading »

Posted in Android/Java, Events/Conferences | Tagged , , | 10 Comments

Adopted Cron debug log WordPress Plugin

Recently, I saw a post by Ron (of wpmututorials.com fame) that he is making a couple of his WordPress Plugins available for adoption, since he wanted to concentrate on other stuff in life.

I offered to adopt the Cron Debug Log Plugin because a couple of my own Plugins depend on cron and at times I need to debug if there are any issues with cron and this Plugin could be immensely helpful.

For those who don’t know, Cron Debug Log Plugin can used to debug remote calls made using Cron jobs in WordPress. It basically logs all unsuccessful wp_remote_post calls from Cron.

Ron was kind enough to accept my offer and gave me check-in access to the repo. Over the next few weeks, I am planning to make some modifications to the Plugin and add some features. If you want any specific feature in the Plugin, then do let me know and I will try my best to get it implemented.

Update

In addition to the above Plugin, I have also adopted the following Plugins.

Posted in Plugin Releases | Tagged , , | 3 Comments

Phishing attempts to get your wordpress.org password

Recently, I received an email, claiming to be from WordPress.org, notifying that one of my Plugins have been taken down. It also provided a link where I was supposed to check the status of my Plugin. Clicking on this link took me to a website which looked like wordpress.org and was asking for my username and password.

Even though it looked like a WordPress.org website, the url was different. I posted about it the wp-hackers mailing list and got the confirmation that is a phishing attempt to get your WordPress.org username and password.

If you get an email like below, be careful and don’t click the link or enter your username and password.

wordpress.org-phishing-attempt-email

In addition follow the following steps to make sure you don’t compromise your account.

  • Check the sending email address. It will always have a wordpress.org email address
  • Check if the link text and the actual link are different.
  • Make sure that the url of the page where you enter your password is always wordpress.org

You can also find more information about it from this forum thread.

WordPress.org has also sent the following email to all the Plugin developers regarding this issue.

wordpress.org-email-png

Be vigilant and stay safe.

Posted in WordPress | Tagged , , , | 4 Comments

Slides from my talk about using JavaScript at TechEd

Just came back after my talk today at Microsoft TechEd about JavaScript.

About the talk

The talk was mainly about using JavaScript in today’s world. I gave a brief about different frameworks and some suggestions on when to use each one of them.

It also covered using JavaScript in different scenarios. The following are the different use cases that I covered

  • Using JavaScript in the Brower/client
  • Using JavaScript in the server
  • Using JavaScript to create mobile apps
  • Using JavaScript to create desktop apps
  • Using JavaScript to control devices connected to your computer

Continue reading »

Posted in Events/Conferences | Tagged , , , , | 5 Comments