Automatically ReTweet Another Twitter account (update)


This is a brief update for auto-retweeting on Twitter. Some time ago I wrote a post about my experience with Yahoo pipes, but now I don’t need to “invent” anything anymore.

RoundTeam provides quick and convenient solution for retweeting automatically anything we want. RoundTeam is online service, which is created to do automatic retweets on behalf of your Twitter account. Using this tool you can define what to retweet: #hashtags, @mentions or just keywords. Also you can define from whom to retweet: from your followers, from those who are followed by you, or from all Twitter. Another useful feature – you can set up retweeting from any Public Twitter list. That means you can retweet from any particular Twitter account or even a group of accounts just by including them into Twitter list.

Let’s have a look on how it works. Login to RoundTeam. No registration needed. You will see the dashboard like this:

Link Twitter account which will make automatic retweets. It can be either account you used to login or any other your Twitter account. I added the same account which I used to login. (Note numbers of your followers/following at the next screenshot – brilliant idea! – it also shows the +/- difference  in numbers since last login, so you can always track your progress!):

Define any retweet parameters you want. First, choose the auditory you want to retweet from. I chose “Followers”. Then add #hashtag, @mention or keyword you want to be retweeted.

You are done now! Enjoy your retweet feed! You can make changes to your settings anytime. Hope you’ll enjoy user-friendly interface of this service.
And here is the simple screenshot illustrating how “List” feature looks like:

More details about configuring Lists feature you can find here: RoundTeam FAQ

One more thing, there is a very useful in my opinion feature called “Email aliases”. If you want to register new Twitter account for your retweeting purposes, you will need to provide new email address. RoundTeam saves your time by providing email aliases – create your “roundteam.co” email and link it to your current email address (Gmail, Yahoo etc.). Just 2 seconds and you are done:

Here what we finally got:

In conclusion, I can mention several use cases RoundTeam can help you with:

  • you can fill your Twitter feed with interesting retweets, relevant to your account’s topic. More about it here: Aggregate Updates.
  • you can promote your Twitter account – it is not a secret that people follow those, who have bright, the most up-to-date information in their feeds;
  • you can engage the interest of other Twitter users by retweeting them (nobody knows that you do it automatically! RoundTeam just saves your time and effort, but on Twitter nobody can find out if it is manual RT or auto-RT unless you’ll tell them!)
  • unique opportunity on Twitter – you can establish conversations among your followers. No one other application or Twitter itself can allow you to do this! Right now Twitter is just micro-blog, but using RoundTeam you can create and develop communities. All you need to do is just to think about your unique #hashtag, add it to be retweeted from Followers in your RoundTeam account and inform your buddies to tweet with this #hashtag when they want to say something to the community. RoundTeam  will retweet this message and every your Follower will see it in your account’s feed without the necessity to follow or be followed by other community members. More about community building with RoundTeam here: Community Building.

Using the service is completely free. Moreover, they have nice customer support and you can get your problems solved at the quickest. You should give RoundTeam a try now!

VoidWarp – My first Bukkit Minecraft plugin


So I have wanted to learn Java and since my favourite game of the moment, Minecraft is written in Java, I thought, “What better way to learn Java than to start with having a play with writing Minecraft plugins?”. I have a bit of experience with Java and I have looked over the source code for a few Bukkit plugins that I have used and to achieve some fairly simple things it isn’t that difficult and so I am here to share my experiences.

What is Bukkit?

I suppose I should start with explaining a little about Bukkit itself. Bukkit is an unofficial extension on the Minecraft Server providing an API allowing developers to write extensions to the server-side. Unfortunately you are unable to do anything that would require any changes on the client side however this still provides a lot of When playing multi-player, it is down the server to tell the client what blocks are where, which players are where, handle the chat and many more things that are required to link the user experiences of the many players together. Because of this, Bukkit is able to emulate a whole bunch of things – where I have found the main limitations would be, are with visual changes on the client, such as things that would require new textures or 3D models, or even additional configuration GUI but what you can do is use commands. The way Bukkit actually works is by decompiling the official Minecraft releases and editing this where required such that the methods of the API can be implemented. Minecraft (at the moment) do not provide their own API, and a lot of the code is subject to change.

The purpose of the API is to provide a fixed, unchanging interface into the underlying functionality of the server. The Bukkit API is essentially just a set of Java interface files, and the implementation of these interfaces is known as CraftBukkit. Although you can directly access methods of the CraftBukkit objects, this is discouraged, because if it is not part of the interface, then there is nothing saying it won’t change at the next release, and in turn potentially break your code. CraftBukkit is the bridge between what is often referred to as NMS (an abbreviation of the package name for the official Minecraft Server: net.minecraft.server) and hence is updated with every release of Minecraft. The idea is that it abstracts away from the actual code running behind Minecraft, just providing the hooks you need.

What is VoidWarp?

When deciding what plugin I wanted to do, I wanted to pick something simple and achievable as a starting point. After looking through the Bukkit API, playing with a few tutorial projects to get my head round things, I decided on making the VoidWarp plugin. VoidWarp is a simple plugin that teleports the player to a new location when they fall through the void. This would be a simple case of checking the players current location, determining if they are in the void (using their Y coördinate) and then teleporting them to new coördinates. Although this was a fairly simple thing to do there were a few concepts and a few problems I had to get my head around.

The core of a Bukkit Plugin

Making a Bukkit plugin is actually surprisingly simple – or at least to make the shell of a Bukkit Plugin. To get started with the most simple of plugins, you will need:

  • A plugin class
  • A plugin.yml

That’s it!

Plugin Class

Using VoidWarp as my example, the bare minimum for the main class:

package me.flungo.bukkit.VoidWarp;

import org.bukkit.plugin.java.JavaPlugin;

public class VoidWarp extends JavaPlugin {

}

Yep, that’s it! it really is THAT simple! This plugin won’t do much… well it won’t do anything and could be considered rather useless but it just shows how easy it is to actually get started with a Bukkit Plugin. Since that is fairly useless we will make it a bit more useful with the following alterations:

  • Implement a Java Logger for sending output to the console. You can use the System.out.println() but it is strongly discouraged. The logger is simple to use and requires just one line of code to set up:

    public final Logger logger = Logger.getLogger("MineCraft");
    

    If you haven’t used a Java logger before, it will not take long to get your head around the basics. The advantages of the Logger is that with each message a Logger.Level can be set. This makes it easy to have log messages that only show when a finer level is chosen. The true extent of a Logger is a whole subject matter in itself, but as with anything, the best place to start is with the documentation

  • Add onEnable and onDisable methods so that the plugin can be initialised. One thing you can’t (or at least absolutely shouldn’t do) with a Bukkit plugin is use the constructor on your main plugin class. It is for CraftBukkit to instantiate your plugin and only when onEnable is called should you do any work loading classes, initialising variables and such. This then abstracts away any concept of plugin management to CraftBukkit and means that if your plugin is disabled then it will not be consuming memory or other resources with objects that you have instantiated (which, may also lead to your plugin’s functionality not actually being disabled). This also means that the control flow is much more predictable and means you are less likely to break the whole server as calls to your classes, should be wrapped and isolated in try { } catch ( ) { } blocks.

    @Override
    public void onEnable() {
        PluginDescriptionFile pdffile = this.getDescription();
        this.logger.info(pdffile.getName() + " version " + pdffile.getVersion() + " is enabled.");
    }
    
    @Override
    public void onDisable() {
        PluginDescriptionFile pdffile = this.getDescription();
        this.logger.info(pdffile.getName() + " is now disabled");
    }
    

    In these methods we are just implementing a message that confirms that the plugin has been enabled. We use a PluginDescriptionFile object that represents the plugin.yml (see next section) of the plugin. This allows us to get the name and versions of the plugin. Although these strings could be hard coded this is poor practice as it makes the code difficult to maintain.

plugin.yml

The plugin.yml is a file that should be stored in the root of your generated jar (not inside the package) that contains all the metadata Bukkit needs to be able to load your class. The most important ones are name, version and main:

name: VoidWarp
main: me.flungo.bukkit.VoidWarp.VoidWarp
version: 0.2.2

The syntax of this file is YAML (Yet Another Markup Language) which is actually a great little markup language for configurations and settings. It’s simple to learn and the basics needed for now are the idea of key: value for simple mappings. Full details about what can be put into a plugin.yml is available from the BukkitWiki. There are a lot of different settings that can be set including dependencies (to ensure all dependencies are loaded before your plugin), command registration and various other pieces of metadata.

In the example, the most important attribute is main. This defines the fully qualified name of your main class (your plugin class). Without this Bukkit will not know which class to load for your plugin!

Bukkit Events

The first thing is the Bukkit events system. One of the functions provided by the Bukkit API is an events system which provides an efficient way to respond to in game actions. For detailed usage information on how to use this, the best place to look is the BukkitWiki but I hope to explain the basic of using this and also explain a bit about the actual implementation under the hood.

To implement the events, one of the things that CraftBukkit does is add method calls within the original NMS code to trigger the events. In some cases the event is constructed from known information about the event provided from the Minecraft code which can be actually modified by your event. A common modification to an event is to set a boolean flag so that the event is cancelled.

Listeners

There was a recent update to the usage of the events system, but if anything it has made it even easier to use! What you will need is a Listener. A listener is a class that represents a single or a set of EventHandlers. These are usually grouped in a logical way depending on how concise you want each class to be. For example, you may make a PlayerListener and handle all events related to players, or you might make a BlockListener for block events. I went for something a little more specific which was a PlayerLocationListener which would have the one EventHandler. Producing a Listener is as simple as implementing the Listener interface from org.bukkit.event.Listener; as an example, here is my stub class that needs to be populated with EventHandlers:

package me.flungo.bukkit.VoidWarp;

import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;

public class PlayerLocationListener implements Listener {
    public static VoidWarp plugin;

    public PlayerLocationListener(VoidWarp instance) {
        plugin = instance;
    }
}

I have also implemented a basic constructor that just takes my implementation of JavaPlugin, VoidWarp for later use.

Event handler

Event handlers are very clever in terms of their implementation and make creating new handlers incredibly easy. Using the power of Java annotations, all you need to do is create a method within the Listener of arbitrary name and annotate it with @EventHandler. The way Bukkit then knows what kind of events it handles is through type inference, specifically the type of the first argument of the event handler. The signature for the method must be of the form public void arbitraryMethodName(T event) where T extends Event.

There are a whole bunch of events and the best and most up to date way to find the ones you need is through the Bukkit API Documentation.

In our case, we want the PlayerMoveEvent to check the players position, whenever it changes. We are looking to detect a player in the void so really we are only interested in their Y coördinate. To make sure they are in the void and add a bit more suspense to the teleportation, we will wait until they are at y = -50 (well infact we will check y < -50 as this gives a larger window in case of lag).

To then teleport the player we will construct a Location object that is 2 blocks above the spawn location so that they drop onto the spawn. To then teleport the player to this location is simple, using the Player.teleport() method of the Bukkit API.

All of the information and objects we need can be gotten from the event and can be implemented as so:

@EventHandler
public void onPlayerMove(PlayerMoveEvent event) {
    Player p = event.getPlayer();
    World w = p.getWorld();
    Location to = event.getTo();
    int y = to.getBlockY();
    if (y < -50) {
        Location spawn = new Location(w, w.getSpawnLocation().getX(), w.getHighestBlockYAt(w.getSpawnLocation())+2, w.getSpawnLocation().getZ());
        p.teleport(spawn);
    }
}

Registering Events

So that’s it isn’t it? We have our plugin, we have out listener and event handler, what else do we need to do? Well, we need to tell Bukkit about our listener class! This is easy as pie in the grand scheme of things. All we need to do is instantiate our PlayerLocationListener and register it with Bukkit. We will instantiate the class as an instance variable of our VoidWarp class. To then register this event we will add the following to our onEnable method:

PluginManager pm = getServer().getPluginManager();
pm.registerEvents(this.playerListener, this)

Summary

And that’s all that was needed to make a simple, first Bukkit plugin. It’s not perfect and there are many features to add and things to improve in the code but I thought I would just give you a rough guide of what I have been up to recently.

VoidWarp.java

package me.flungo.bukkit.VoidWarp;

import java.util.logging.Logger;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

public class VoidWarp extends JavaPlugin {

    public static VoidWarp plugin;

    public final Logger logger = Logger.getLogger("MineCraft");

    public final PlayerLocationListener playerListener = new PlayerLocationListener(this);

    @Override
    public void onDisable() {
        PluginDescriptionFile pdffile = this.getDescription();
        this.logger.info(pdffile.getName() + " is now disabled");
    }

    @Override
    public void onEnable() {
        PluginManager pm = getServer().getPluginManager();
        pm.registerEvents(this.playerListener, this);
        PluginDescriptionFile pdffile = this.getDescription();
        this.logger.info(pdffile.getName() + " version " + pdffile.getVersion() + " is enabled.");
    }
}

PlayerLocationListener.java

package me.flungo.bukkit.VoidWarp;

import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;

public class PlayerLocationListener implements Listener {
    public static VoidWarp plugin;

    public PlayerLocationListener(VoidWarp instance) {
        plugin = instance;
    }

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player p = event.getPlayer();
        World w = p.getWorld();
        Location to = event.getTo();
        int y = to.getBlockY();
        if (y < -50) {
            Location spawn = new Location(w, w.getSpawnLocation().getX(), w.getHighestBlockYAt(w.getSpawnLocation())+2, w.getSpawnLocation().getZ());
            p.teleport(spawn);
        }
    }
}

Source code

The full source can be found on my GitHub repository for VoidWarp. This was produced with the commit e167cf3

How to change the keyboard layout, without changing the input language


A common problem and mistake made on windows computers is that when you have a computer that has an international keyboard, for whatever reason, people seem to always make the same mistake when changing the keyboard layout. It is an easy mistake to make but can cause absolute chaos when using office applications as it instantly changes the language of whatever document you are working on to the language of your keyboard which in most cases isn’t what you want.

To help people with this I decided to create my first screen-cast, showing how to change the keyboard layout on your computer without changing input language:

Tep Wireless – Concept Review


What is the one thing all techies can’t life without but can’t get abroad without taking out a loan? Fast, reliable access to the internet where ever you are. There is however a company that claims to offer this. Tep Wireless is a company from the UK that can offer mobile broadband and smartphones within Europe for just a slight premium above a local buying internet locally.

The service is offered in several European countries including the UK, France, Italy, Spain and Germany offering different packages for the different countries which you can go to. There are fixed prices for each country depending how long you plan to stay in that country with the cheapest for 30 days being Italy, which is just £2.50 per day.

How it Works?

The way it works is that Tep Wireless have deals in the countries they allow travel to with the network providers where they pay the local rates. They can then rent the devices to their customers for the length of time they require without the needs for them to take out lengthy contracts or having the hassle of trying to communicate what they want in a foreign mobile shop.

What you get?

Pocket WiFi

With the pocket Wifi you get a Tep branded pack that contains:

  • Your pocket wifi
  • A USB Cable
  • A UK universal USB Charger
  • An adapter to use the charger in the country you are travelling to
  • A 12V Car Charger (optional)
  • An additional battery and charger (optional)

Smartphone

Data (Pocket WiFi and Smartphone)

In the countries where unlimited data is offered (just Italy, Spain, Germany and the UK at the moment) you are provided with PAYG sim that is topped up by

In all other countries you are provided with

Ordering from Tep

You may be wondering how to get your hands on this deal so let me explain the whole process with the advantage of personal experience. The first step is to order the device you want. For both Pocket WiFi and Smartphones you will first need to pick the country you are travelling to. From the next page you can then set your dates of travel, choose whether to have both a Pocket WiFi and a Smartphone, and then have the cost of your rental calculated. When I ordered mine it stopped calculating the price at 30 days so essentially you could have ordered these products for many years for the cost of one month but this glitch was soon resolved, which is unfortunate for everyone looking for a real bargain.

Once all this is calculated

Tep Wireless Website

Tep has a contemporary looking website with great images of people using their products and bright colours however, although the site looks great, it can be hard to navigate and find the information that you are looking for.

It is also glitchy in a few areas. One particular area is the savings calculator. I cannot for the life of me get this to work. It appears to have everything it should but doesn’t allow for a user to enter numbers and see how much would be saved!

Fair usage

What fair usage? One thing you should always expect from any company that offers an “unlimited” service of anything is a fair usage policy, however with Tep Wireless there is no fair usage policy to be seen meaning that on their unlimited services you can actually get unlimited internet!

The Future of Tep

I have been reliably informed of some upcoming changes to the Tep service to improve it further. With the non-unlimited plans they have promised to be upgrading this service to 150MB per day as apposed to the 50MB per day for the same price which is a much more reasonable amount of data for the standard user.

HTC Flyer Hidden Capactive Stylus


I accidentally found this out but it is really handy. All you have to do is flip around the HTC scribe pen and it works as a fantastic capacitive stylus:

HTC Flyer Hardware Tour


This is the hardware review of the HTC Flyer where I will take a look at the hardware features and specs of the device. See full specs bellow the video.

HTC Flyer Specifications

  • 600 x 1024 pixels, 7.0 inches LCD capacitive touchscreen (with digitizer input)
  • 1.5 GHz Single Core
  • 32 GB storage, 1 GB RAM
  • Android OS, v2.3.3
  • 5 MP rear facing camera with 720p video support
  • 1.3MP front facing camera
  • Wi-Fi 802.11 b/g/n with Wi-Fi hotspot
  • Bluetooth v3.0 with A2DP
  • Quad-band GSM 850 / 900 / 1800 / 1900
  • 3G HSDPA 900 / 1700 / 2100
  • HSDPA 14.4 Mbps (Download), HSUPA 5.76 Mbps (Upload)
  • Li-Ion 4000 mAh battery

HTC Flyer Unboxing


Due to a lack of time at the moment, I have decided that in future I will separate my videos of devices from the reviews and then create a separate review when I have the time.

So here is the unboxing video for the HTC Flyer:

What’s included

Included in the box for the HTC Flyer, you get:

  • The HTC Flyer
  • A white leather case
  • The HTC Scribe Pen (included in the UK, but not in the US) – with AAAA battery
  • A wall charger for your locale
  • A USB cable for PC data sync
  • A pair of HTC headphones (with ear buds and clips)
  • Documentation

HTC Roadshow and the HTC Flyer


On Sunday I made my way to west London to go in search of the HTC Roadshow that was in town at Westfield Shopping Centre. It took me a little while to hunt down the road show but I did eventually find it! While there I took a look at all their latest products but the devices I was most interested in were the HTC Flyer and the HTC Sensation. After having a quick play arround with the Incredible S, Desire S and HD7 I got chatting to a friendly HTC worker. Started talking about all the old HTC phones (in particular the ones I had owned) and was just reminiscing with someone who could actually remember the HTC Universal!

After about half an hour just chatting we got down to business and he showed me around the HTC flyer (apologies in advance for the “Yep”ing):

As you can see the HTC Flyer is just an amazing device…

The other device I looked at was the HTC Sensation. After seeing the Flyer this was a rather disappointing experience. Of course it was very snappy and very fast and would make for an amazing phone to own, but there was no real innovation like in the Flyer. It was just another android phone and that’s exactly what it felt like.

I am not saying that as a phone it is a let down, or that the performance did not meet up to the specs that it had (because it most certainly did and if I was to buy a new phone, this would be the one I would get) but in terms of a new product on the market, the Sensation was just HTC’s version of a dual core phone whereas with the Flyer and its pen input, it was a real change.

HTC Flyer £479.99 @ BEST BUY UK – Super Sale or Super Screw-up?


After seeing the HTC Flyer over the weekend I am now dying to get my hands on one. After a recent search to see what other tablets were available at this price range or for even less I stumbled upon this:

HTC Flyer (32GB 3G and WiFi) for £479.99

HTC Flyer (32GB 3G and WiFi) for £479.99

Yes… You have read it right. The 3G/WiFi version of the HTC Flyer for the price of the WiFi HTC Flyer. To me this looks like a mistake for the very reason just mentioned (they have got it mixed up with the price of the WiFi Flyer). However it is not just that. They clearly State that it has a 32GB capacity which is ONLY available for the 3G version and my other theory that this was the US version (without a pen) was proved wrong by the description.

Obviously I had no choice but to buy one of these at that bargain price and you can do the same, providing they don’t change anything! I will keep you updated with the status of my order and obviously when it arrives I will do a FULL unboxing and review!

UPDATE: The description on the best buy page has now been modified for the WiFi, 16GB version. However, the tablet I ordered has arrived and it is indeed the 32GB, 3G version. Hope you all took my advice and ordered when you could in order to save £120 on the HTC Flyer. I suppose I owe a big thank-you to Best Buy for sending what the desription said and honouring their part of the transaction.

HTC Flyer on Best Buy (16GB WiFi) for £479.99

HTC Flyer on Best Buy after it had been corrected

How to back-up and share fonts


This is a quick tutorial made to explain how to copy fonts for backup and sharing.

Sharing paid font’s is illegal. Only use the method outlined in this post for sharing free fonts or backing up fonts that you own!

  1. Navigate to C:\Windows\Font or click Start>Control Panel>Fonts
  2. Find the font you wish to send. The name of the file may not necessarily be under the name you might expect and there may be a suffix to the font like “Regular” or “Compressed Light”.
  3. To back these fonts up, slect the fonts for backup and copy them to your backup location. For sharing, copy this to a removable media device or copy into a folder which can then be zipped and emailed to the recipient.
  4. To restore or install the font, you should right click the font file and select “Install”