Sunday, 15 September 2013

Make the most of that huge tool you have in your hands

For those of us with a screen larger than 4 inches and multicore processors in our phones (most android users), apps like the two I'm about to mention are another reason you will be glad you didn't get an iPhone.
The first one is called Floating Stickies. I found this app a few months back, and it works brilliantly. The name says it all, but you may not realise just how useful it is until you try it out. It puts a little sticky note on your screen on top of whatever app you're running in the background. A good example of use is when you're looking up details on a website:

As you can see, its great for taking notes without the need to switch between apps - but equally as useful is the fact that it is dockable!

I've got three stickies 'docked' on the upper left side of my screen in the above pic, they're represented by a small 'pencil' icon and can individually be dragged onto the screen, resized, added to or copied from at any time, on top of any app! It isn't a huge leap in technology; desktop operating systems have used windowed applications for a long time, but we are so used to full-screen apps on smart phones that its refreshing to see some developers creating floating apps such as this - it brings multitasking on your phone to a new level. Have a 10 inch tablet? It makes a lot more sense to have floating stickies than a full-screen 'notes' app for jotting things down.

Floating Stickies is available for free on Google Play:
The second app I'd like to touch on is called Showtime. It does what the name says, plus a little more that you mightn't expect! (The developer has called it Showtime - this is the title when in the full-screen mode of the app, but search for Youtube Floating HD Player on the Play store or use the link provided below)

Here I've got a chat window open with one of my mates AND while I'm waiting on his replies, watching videos on YouTube! The window can be minimised (to your notifications bar) and still play audio, ready to be recalled at any time in a floating, windowed format or in full-screen glory. You can optionally pause first (so that you don't miss out on those videos you're actually watching as opposed to those you're just listening to.) AND it allows you to select the quality of the video, seek through the video, mute - all from the floating window!

It would be GREAT if the app could also play videos from your gallery - well guess what? IT CAN!
(Disclaimer, on my HTC One X running a custom ROM, it doesn't work correctly, but most people report it working for them!)

At this stage you have to browse to the desired video within your gallery, then "share" the video and choose "Showtime" as the target. This might be a tad clunky, but it's not hard, and I really think it was great that the app developer included this feature - a bit more polish and it will be nothing short of perfection! Infact, this app is worth getting even for smaller screens / older devices as it allows you to stream in whatever quality you desire (most older devices have a limit on maximum quality, this app overrides that limit.)

Showtime is available for free on Google Play:

I found these two apps a little while back, but I've since purchased a new Ainol 'Spark' 9.7" tablet (with retina display) and was looking for apps that would be useful on a larger display - These two apps will be great for a tablet or android-powered TV!

Leave us a comment if you've used one of these or similar apps before, or if you know any others which make the most of our large screens!

Monday, 3 June 2013

Why you should buy an iPhone (but not right now!)

Had an amusing conversation in the car with the missus the other day.

I better set the scene first...

My handset at the moment is HTC's flagship model (was when I bought it) the "One X"...
This MONSTER handset is actually faster and has as much RAM as the netbook I'm writing this post on, it's a Quad-Core 1.6GHz, 1GB RAM, 4.7" 720x1280 resolution device and mine is running Jelly Bean 4.1.2.

Missus has an iPhone 4... 1GHz single core, 512MB RAM, smaller screen.

We share a car with a Bluetooth enabled stereo in it. This stereo worked 100% every time when it was connected to my (old) iPhone, or the missus iPhone. Since I've been using it with my android however, I notice a few things:
  • With iPhone, the car connects automatically and you simply have to press "play" on the stereo to resume playing music. This doesn't SOUND like much effort, but it seems like one extra step... If you have a CD in, or the radio selected, it will start playing music as soon as you turn the car on, no need to press "play" to resume.
  • With an android phone you get a LOT more options here. Various apps and settings can allow you to resume playing music when Bluetooth connects, specify the volume, read SMS's out loud, turn on the GPS and open a navigation app. This is the reason I've moved to android, the ability to streamline things and personalize your settings a LOT more than the iPhone. If you found yourself constantly doing an array of tasks every time you get in the car or every time you arrive home, you can set your phone up to do all these tasks automagically.
  • THE CATCH: Although android does allow for all this customization, it is NOT flawless. On occasion I would jump into the car and the music would not play, the Bluetooth would not connect, or it would connect and play, but would have popping sounds and stuttering which made it "unlistenable".
    The only method I could find to get the android working happily again was the golden system technicians trick...

                                              Turning it off-and-on again.

This is where the amusing bit comes into it...

My past 12 months, at least once a week I jump into the car and have this audio stutter problem... So I reboot the phone, wait about 45 seconds and we're back in business - the thing will usually re-connect automatically and start playing music. Not hard, just something I've come to live with.

The missus (I should also point out she uses a Macbook) jumped in the car, and that reminded her that "Hey - I tried to connect my phone to the stereo the other day and it gave some error message about bluetooth."

So (while driving) I go through some troubleshooting steps with her.
  • Have a look under Bluetooth in settings, is Bluetooth turned on?
  • Have a look at your devices under Bluetooth, can you see the car stereo?
  • Ok, click on it and go to "forget this device", then we'll add it again.
         "Ok, tried that and it says there's a Bluetooth error"
  • ....
  • ummm.... Just try switching your iPhone off and on again?

The response I got was the amusing bit. As an android user (and a PC user), I am used to rebooting to fix a problem. Her response to this was "oh, oh yeah - I totally forgot you could do that!"

The reliability of the iPhone and Macbook really speak for themselves. She has a pretty geeky boyfriend (if I do say so myself :-p) and so she's no stranger to 'basic techie' stuff, choosing operating system at boot or changing settings on computers etc. But whenever I tell her to reboot the Macbook I get this "what?" sorta look, like, she's not sure if she heard me correctly.

THIS is how reliable apples products actually are, their users think of rebooting as a "What? ok, just give me a minute while I remember how to do that..." kind of moment - it's such a rare occurrence... Tell a windows user to reboot and they simply go "yep" - it's a completely different attitude...

Proof is in the pudding;

My android now has a host of 'reboot' options when I press the power button. I can do a quick reboot or a full reboot (I often do the full reboot to be sure). I have this Bluetooth 'bug' as well as occasional other problems which prompt you to 'turn off-and-on again' to give your phone a chance to clear it's head...

iPhones have a "shutdown" button and that's it, because, it's almost unheard of that you would need to reboot it. She has been happily playing games, writing messages and emails, browsing with tabs, installing and uninstalling new apps, playing music and videos - for close to 2 years straight! Without (purposely) turning the phone off-and-on again (I say purposely because on the odd occasion it HAS run out of batteries, so I can't say it's been constantly on for 2 years straight). This is the sort of reliability I would need if I were getting a smartphone for my mum, my nan, or anyone of those "I don't know what a smartphone does" types. Not because it is less customisable and therefor easier to use, but because they can take it out of their handbag and do something on it, confident that it will "just work".

Apples current offerings;

So after the iPhone 4 was released, there was the 4S - TO MOST PEOPLE they are almost the same phone, the camera was improved, and the specs were raised a bit, but, most people aren't playing full 3D high-graphic shooting games etc. on their iPhone, so the specs of the iPhone 4 weren't lacking in any way.

Then the iPhone 5 came out, with the infamous new "ultra-scuffable" aluminium body, and, well, a slightly taller screen and not too much else.

In about the same amount of time, android has had 2 or 3 MAJOR operating system updates, handset technology has been increased to offer handsets with up to 8 cores, 2GB of RAM, 5" screens, 3D cameras and 3D screens, the ability to plug in USB devices (keyboard, mouse, hard drive, camera etc) and the android ecosystem (the app store) has grown a LOT (where it used to be microscopic when compared to apples ecosystem).

What will they think of next?

The iPhone is, and should remain to be, a solid unit. But apple will need to come up with some new ideas soon, as the new iPhones will start to be overshadowed by increasingly impressive new androids. My advice to those in the market for a new phone right now is; WAIT... if you can, wait a little and see what happens in the next few months. The iPhone 5 is a renowned "flop" - it is "good" - but it's not 2 generations better than an iPhone 4. It will be interesting to see what the next iteration of the iPhone will be capable of - and with so many manufacturers competing in the android arena, we're sure to see some quick developments there too!

Sunday, 26 May 2013

JAVA Guessing Game

This post will take a look at a "Guessing Game" app I've created using JAVA. There are many ways of accomplishing this but this is one working method I've come up with after taking a few basic JAVA lessons. I though I might share in the hopes that someone like myself may find it useful.

The requirements of this program would be:
  1. A random number is chosen (between 1 and 100)
  2. User is greeted with a message and instructions
  3. User is then prompted to input a 'guess' (an integer)
  4. 'guess' is checked the random number
  5. User is instructed weather the guess was too high, too low or correct
  6. If the guess is not correct, repeat steps 3 to 5 until the guess is correct
  7. Once the guess is correct, tell the user they've guessed correctly and exit program

Since I'm new to Blogger and am yet to find a nice way of formatting my text here, I'm going to paste the entire program here first and then discuss parts of interest below so, without further a-do:

 /* A simple number guessing game  
  * call this  
  *    Written by Jarred Baines, 2013  
 import javax.swing.JOptionPane;  
 import java.lang.Math;  
 import java.util.Scanner;  
 public class GuessGame {  
     // Give answer a random int between 1 and 100  
     private static int answer = (int)(Math.random()*100+1);  
     private static int guess; // variable to hold users current guess  
     //Method to generate message based on the guess  
     public static String makeGuess(int guess, int answer) {  
         // if...else ladder to generate message for user  
         if (guess < 1) { // This guess is invalid  
             return "Nope! The number is between 1 and 100";  
         } else if (guess > 100) { // This guess is invalid  
             return "Nope! The number is between 1 and 100";  
         } else if (guess < answer) { // The guess is too low  
             return "Too low! Try again?";  
         } else if (guess > answer) { // The guess is too high  
             return "Too high! Try again?";  
         } else if (guess == answer) { // The guess is correct  
             return "Congratulations! You are correct!";  
         } else return "Error detected"; // end of if ladder  
     } // end makeGuess method  
     public static void main(String[] args) {  
         // you can uncomment the following line of code to  
         // display answer in console, useful for debugging  
         //System.out.printf("Answer is: %d\n\n", answer);      
         do {  
         guess = Integer.parseInt(JOptionPane.showInputDialog(  
             "I'm thinking of a number between 1 and 100.\n\nGuess what it is!"));  
         JOptionPane.showMessageDialog(null, makeGuess(guess, answer));  
         } while (guess != answer);  
     } // end main method  
 } // end GuessGame class  

A few points of interest I came across while creating this program:

Math.random() outputs a double value, greater than or equal to 0.0 and less than 1.0.
So to get a number between 1 and 100 we need to multiply it by 100.

Math.random()*100 outputs a double value greater than or equal to 0.0 and LESS THAN 100.0.
This means that it will never actually be 100, although it could be 99.99. Which in conventional maths would ROUND up to 100.

However, in a cast to int such as this:
We LOSE the fractional part of the number, it doesn't get rounded, it gets lost! This gives us an output of 0 to 99.

thus, to get our required 1 to 100 random numbers, we must add 1 to the expression, like so:


MechaSonics hey?

Sounds pretty cool, I think! Especially for a 4 pronged blog which will revolve around 4 of my main areas of interest, Computer Programming, Mechanical Engineering, Electronics, and Sound! The name is a bit of a play on the word "Mechatronics" - which is a combination of Mechanical Engineering, Electrical Engineering, Control Engineering and Computer Engineering. Add into the mix my love of Sound Engineering / Music Composition and DJ-ing and you've got to be crazy NOT to call it "MechaSonics", right?
So what better way to kick things off than an introduction?

My name is Jarred, I also use the handles "JazzyB" and "JBainesy" on various forums and sites around the web. I work as a CNC machinist and I also work as a DJ, spending my spare time composing electronic music, designing and printing out objects using my 3D printer, hacking my phone (to make it do things it couldn't / shouldn't do) and writing JAVA and Android apps (which I am learning how to do at the moment, through studying a Diploma of JAVA Programming through Fitzwilliam Institute).

As soon as I figure out the ins-and-outs of Blogger, I'll have one more hobby to add to the list ;-)