Skip to content


Android devices to get Flash 10 beta in October!

Just read a tweet from @DevDroid linking to a post by TalkAndroid entitled “Adobe Flash Player 10 For Android Due In October”.  I haven’t listened to the entire talk from Adobe but here’s the quote from their slideshow:

Flash Player 10 for smartphone-class devices to be made available in beta at MAX conference in October  [adobe.com]

According to TalkAndroid, the Adobe CEO Shantanu Naraye said:

Google’s Android, Nokia’s Symbian OS, Windows Mobile and the new Palm Web OS will be the first devices to support web browsing with the new Flash player [via Talk Android]

So, still no word on iPhone getting Flash.  It makes me really glad that I chose to purchase a phone based on an open platform.

Posted in Uncategorized.

Getting Android Apps without the Android Market

A “smartphone” without applications isn’t a SMART phone, its just a phone.  I know I’ve complained about the lack of the Android Market in South Africa.  Apparently the guy at Google in South Africa who’s responsible for the Android Market has said that it’s coming soon. (I didn’t get a response to my email to him asking him for a comment, but that’s what I’ve been told by another local Android fan)

My favourite so far is Handango, but here’s my list of markets.  Worst of the pack (so bad I didn’t include them, were AndroidFreeware.mobi and AndroidFreeware.net – no “on device” experience, and a lot of really bad applications.)

Handango – starstarstarstar

Handango has been around for years.  I’ve used them for apps on my old Palm pilot, Windows Mobile phone and now on my Android phone.  Their Android selection isn’t huge, but they have some fun games, apps, and tools.  If you go to http://handango.com from your device you’ll be prompted to install “InHand” – their Android application for browsing through their store and downloading apps.  They even have some EA games in their catalogue.

Rating: 4/5 – Good, but really not as good as Android Market – no way to be informed of updates to an application that you’ve downloaded already.

MobiHand – starstarstar

I hadn’t heard of them until I started looking for alternative App stores. MobiHand seem to have a pretty extensive collection of applications for many devices.  They have a really well trimmed down mobile site at http://mobihand.com which you can use easily from your Android device.  My only complaint about the online store on the Android devices is that when the list of apps is too long and they start to split them into pages, the links to swap from one page to another are so incredibly small that it’s virtually impossible to click them without zooming in 3 or 4 times.

Rating: 3/5 – It’s good, has a start in the “on phone” experience for browsing for apps, but it’s not a happy experience and could use a few more apps.

Handmark – starstar

Yet another new store to me, Handmark seem to have made a really clean site.  Their software selection seems a little less impressive than both MobiHand and Handango.  That could be because both their mobile and full website seem quite tough to use to find applications.   It looks good, but just seems to require too many clicks to get there.  However, they seem to be the only app store that is selling some of the great EA games like The Sims 3, Spore, Sim City and a bunch of others.

Rating: 2/5 – Not a great search or “on device” experience, but the EA games are a big plus.

Google Search – star

Thanks to Google, I found my a great app for Geocaching, which had just been released for Android.  It’s called CacheMate.   I also found GeoBeagle, which is a free app.  That’s how I found Twitli – a really nice Twitter application.

Rating: 1/5 – You can get some nice things here, but it’s a lot of work.

Open Market – star

I’ve written about this before – you can get to it at Open Market.  It’s great, but is missing a load of apps. Doesn’t do paid apps, and I still haven’t heard back from them about the app I wrote and submitted to them a few days ago.  Until it gets more fully fledged, it’s not going to be a real contender, but you can download it on your phone at http://tr.im/nX6E

Rating: 1/5 – because it’s just South African, has no paid apps, doesn’t let you register as an app developer or downloader.

Posted in Uncategorized.

Overview of Open Market

Open Market is SUPER easy to use.  Start the app, pick a category, view details on an app, read comments, rate it, and download the app.  A few clicks and it’s all done.  The screenshots below are just a quick overview of how it looks

 Splash Screen Store List Application Details
SpashScreen Stores - Page 1 FBook - Page 1
Terms & Conditions / Download Rating an App Reporting an App
FBook - TandC Rate and Comment Report

It’s really that simple.  But what Apps can you get?  Well, here’s a few samples:

Facebook (Communication)

FBook - Web App This app is apparently a wrapper for the Facebook iPhone site with a few tweaks.  Tabs across the top give you access to most of the common features, upload pics, check your messages, set statuses, comment on wall posts, etc.  Pretty slick, although the “Chat” tab seemed to not work so well for me.  It also has the ability to post notifications to you using the android notification bar.  So if you get a new Facebook message, you’ll get a notification and can read it right away.

 

 

 

Twitter – via Twitli (Communication)

[update: Twitli has been removed from the Open Market store. You can get it on your phone at http://tr.im/ogRs – or via http://www.twitli.com ]

Twitli Of the twitter apps in the Open Market this is one of the best.  Unfortunately Twidroid (one of the better known twitter apps for Android) is not prepared to make their app available to people who don’t have the Android Market, but Twitli is a pretty great client.  It certainly beats the client I had on my old Windows Mobile phone. Very easy to read tweets, reply, post your tweets. Even lets you take a picture and upload it.  Small, simple, and functional.

 

 

 

Barcode Scanner (User Contributions – Applications)

barcodescanner This is basically just Google’s ZXing application.  It’s a GREAT barcode scanner, can do all sorts of barcodes and interprets them.  This is often used by other applications to scan barcodes for them, and if you look at a lot of android app sites, you’ll see that they often put a link and a barcode next to each product so that you can quickly scan the barcode instead of having to type in a really long url to get to the app from your phone.  Currently not the flashiest application on the market, but it has some nice uses.

AndExplorer (Productivity)

For the Geek in you, there’s a file explorer – lets you copy, move, delete, edit, open, etc files on the device.

Notepad (Productivity)

A very simple notepad for keeping any quick notes you need to write down.  Its a really simple UI, but then there’s not too much required when you’re taking notes.

Shopping List (Productivity)

Shopping ListA pretty simple shopping list app. Really quick to add items to a list and mark them as purchased. Not filled with major functionality, but the font’s and buttons are easy to use one handed while pushing a shopping cart and looking for the best deal on Organic Soaps.  For a scatterbrain like myself this is a super useful application.

 

 

 

 

Quickpedia (Reference)

Quickpedia This is a pretty nifty wrapper around Wikipedia.  If you’re not keen on loading up the browser then this might be the best app for you.  It’s “News” tab is a neat view of current news.  The “Nearby” tab is especially interesting, giving you a list of articles about things that are in your current location.  I imagine this could be particularly useful if you’re travelling overseas (or even locally) and want to find out more about a tourist attraction or historical site.

Posted in Android.

Leaf’s Open Market – My Wishlist

I know I’m supposed to blog about my application but I’ve had some fun with the Leaf Open Market.  I know it’s getting some bad press from some quarters but its not been too bad to me.  They’re facing a hard battle to get some of the developers to support them, but they have a great vision and are making some progress.  This is hopefully going to be a more technical review of the market, with a practical look at it going up tomorrow some time.

I emailed Leaf this weekend and got some info from them.  Apparently some phones initially went out without the Open Market on them, but they’re getting sms’ed by their contract providers to be shown how to install it.  If you don’t have it on your phone, you can go to http://www.leaf.co.za/openmarket.  I’ve setup http://tr.im/nX6E to redirect there in case you’re not keen to type out that whole URL on your phone.

I’ve read their press releases and they basically say something along the lines of:

The phones are awesome (true) but a powerful phone is only as powerful as the apps that are on it.  While they come with a load of great apps, more is always better and because of the “open source” nature of the OS and development tools there are LOADS of great apps.  What we need in SA is a market for them, and this is basically what Open Market is about.

So my questions are “Does it live up to all that?”, “Is that all that’s needed in a market?” and “Do I think that this will be enough to convince developers to put their apps on here?”.

My Requirements for a software market.

1. Easy to use

This goes without saying – but it should be quick to load, and unobtrusive.  Needs searching abilities, and good categorisation.  Data going into the app needs to be standardised. (ie. if you allow people to specify what version of the OS an app runs on then keep the possible entries limited – not “Cupcake”, “1.5”, “1.5.0”, and “Newest version”).  It should display the download sizes of the apps.  Needs previews, ratings, comments and decent descriptions.

2. Highlights new apps

If I’m going to visit it every few weeks, a summary of the most recent apps would be essential.  Otherwise I won’t know what the new stuff is and I’ll have a hard time finding the latest apps.

3. Automates updating older apps (and hence displays version numbers easily)

I know a number of developers who would hate to have to build an Auto updater for their apps, so having this built in would be sweet.  It appears that a number of the devs who have put apps on the Android Market rely on this ability and are loathe to build something like this themselves

4. Does not restrict who can buy what

Seriously – why should someone in the UK see one app while someone in SA not?  To be truly a simple solution for a developer it needs to provide an easy single place to distribute your application to as many people as possible.  Providing roadblocks to that purpose is only going to make developers less likely to use the system, which in turn means less applications for your users

5. Provides user feedback on Apps

Ratings, comments, sharing apps with friends – all provides a social interaction.  Extending this beyond the marketplace application is only going to improve your rating.  Let people outside your device access a list of apps for download from your site.  Let them link, and comment, and rate.

6. Provides users some kind of guarantee/trial system for apps

I’m not keen to spend R100 on an app only to have it be a piece of junk.  Trials or 7 day money back guarantee’s are essential.

7. Allows for Paid and Free apps

Some people might code for love, but most of use need some kind of reward at the end of the day.  You need to have a mix of both.

8. Keeps a history of previously bought apps so you can re-download apps again

If I spend R100 on an app and I have to reformat my phone, or get it replaced, I certainly want to be able to access the application again without having to pay.

9. Allows outside apps to link to apps in the installer

Especially with Android where apps can share Intents, it makes a LOT of sense to allow me to link to an app that has intents that I require directly from my App.  If I can create a standard url, then its even better.  I could then link to the app from a standard web page, and have the app market show more info about the application before the user chooses to purchase or install it.

10. Provides user and developer accounts

Without this, there’s no real way for much of the other requirements to be met, but this gives me ways to know who’s saying what about my app, gives me some assurance that if I upload an application, only I can update it.  It allows usage information like “how popular is my app” and it allows users to see what they’ve downloaded and provide the ability to re-download apps that they’ve downloaded/purchased in the past.

Summary

I’m going to quote a bit of the slightly paraphrased response from Leaf to my questions:

[We’re releasing] Phase 1 of the website today. http://www.openmarket.co.za/. This will be the key point of internet interaction, we will over the next [while] release several new features, [hopefully this will include]: Contributor registration, Contributor management console, blogs, forums and then billing.

It seems like leaf’s got most of the main points under control. I’ll go through them quickly again with comments:

Easy to Use So far so good, easy installation, simple to find apps.  But when there’s version numbers of “dunno” and some apps don’t have file sizes, its not ideal.
Highlighting New apps There’s no feature like this right now.
Automates updating older apps Doesn’t do this right now
Does not restrict who can buy what As far as I’ve seen its Vodacom only right now, so its not an ideal start, but these are early days still.
Provides user feedback on Apps Sorted
Provides users some kind of guarantee/trial system for apps No paid apps yet, so not yet
Allows for Paid and Free apps Will be done soon
Keeps a history of previously bought apps so you can re-download apps again No paid apps yet, so not yet
Allows outside apps to link to apps in the installer Busy chatting to them about this
Provides user and developer accounts They’re doing it for Developers/Contributors, so makes sense for them to do it for users too.

On the whole that’s a pretty awesome system.  Looks like we’ll be in for a pretty good ride with Android in SA.

Hopefully with a bit of luck the last “red” items there will be sorted out and I’ll be a happy camper. Right now they’re doing pretty darned well as a first major app store that I know of that’s been built by a local company.  I’m seriously hoping for good things from this.

Posted in Android.

How to take Android Screenshots

For those of you wondering how I made the super awesome screenshots in the previous post.  It’s really easy.  Apparently there’s a $3 app that does something similar, but you can do it all for free if you have Java on your machine and have downloaded the Android SDK.  I got the steps to do this from “Taking screenshots on an Android-based phone”.

I’m going to quote a fair bit of their instructions, and make one or two modifications as necessary:

Step 1: Enable USB Debugging
On your Android phone (in this case, the G1), go to Settings, then Applications, and then Development. Check the checkbox for "USB debugging."

Then

Step 2: Download the Android SDK
Download the SDK for your platform here. Google also has some great installation documentation if you get lost. You will need to make sure you have a current copy of the JDK.

They then go on to say that you’ll need Eclipse to carry on, but you shouldn’t.  All the functionality is contained in the SDK.  I’m working on Windows XP, so your mileage may vary on other OS’s.

Go ahead and plugin your Android handset into a USB port on your computer, if it is not plugged in already.

Step 3: Run DDMS
After configuring Eclipse or whatever IDE you use to work with Android, you need to open up the DDMS application from within the "tools" folder in the Android SDK’s main folder.
After DDMS launches, select your handset from the menu on the left (it should be the only device listed). You might see an error message, but the debug tool should be loaded. Then, click CTRL-S on your keyboard. This will bring up the "Device Screen Capture" interface. From here, a static image is captured from what is appearing on your handset. You can save the image (nicely defaulted as PNG) and then refresh to your heart’s content to grab updated or different screenshots from your phone.

That should be it… Easy and quick screenshots.  Just remember, if you choose to make the SD card accessible to your PC by doing the following, then you won’t be able to use it on your phone for your demo’s:

01 - Mount SD Card via USB But if you don’t do that, then the phone should operate like normal.

Posted in Uncategorized.

HTC Magic’s keyboard

02 - Default KeyboardI have the plain HTC Magic (i.e. not the “with Google” version), and have been learning how to type with it.  My first complaint was that the keyboard in portrait mode, the standard QWERTY keyboard became a little small to work with.  Especially if you have slightly wider fingers or not too accurate hand-eye-coordination.  So one of my first missions was to investigate the alternative keyboards.

From my initial reading, I’d not seen much that gave me great hope for any better keyboards in portrait mode.  One of the guys in our offices recently got a Samsung Omnia and was showing how he’d swapped to an “XT9” keyboard in portrait, and I wished that Android had been clever enough to do the same.  With little hope I clicked on the little “cog” and went through the following steps:

03 - Keyboard Settings 04 - Touch Input Settings 05 - Touch Input Settings - Keyboard Types selected
Click the “Setup” cog< /td> Touch Input Settings Click Keyboard Types
06 - Touch Input Settings - Keyboard Types 07 - Touch Input Settings - Compact QWERTY 08 - Compact QWERTY
Keyboard Types List Click “Compact QWERTY” Enter Text

The result is a slightly fatter keyed QWERTY keyboard.  It’s not one I’m used to using so this didn’t quite work out too well for me.  Looking at the other option in the list of keyboard types (“Phone Keypad”) I just assumed it would be a quick way to enter numbers.  Boy was I wrong.  I followed the same steps as above, and chose “Phone Keypad” and came back to my browser and found this:

09 - Phone Keypad I now had a phone keypad just like the physical pad I used to have on my old iMate SP3.  The little “XT9”/”ABC” button on the left swaps between T9 predictive text and standard multiple-push ABC style entry.  To make things even cooler, if I tilt the phone on it’s side, it doesn’t stick with this keyboard but rather swaps to the standard QWERTY layout again because there is now enough space to use bigger keys, as follows:

10 - Landscape Keyboard

Now I can have the best of both worlds.  Of course my fingers still sometimes make mistakes, but that’s where the clever “auto correct” type feature kicks in and saves the day.  For example, if I’m typing an SMS and I want to start with “Hello” but by mistake I miss the “h” and press “g” to start with, the following happens:

11 - AutoCorrectIt actually lists alternative words that use keys near to the ones that I pressed, and selects the one it thinks is the most likely correction.  If I press “space”, it will automatically choose the word highlighted in green.  This is really useful and, as Leo Laporte said in an episode of TWIT (referring to the iPhone’s auto-correct feature) “as long as you trust in Steve, it will all work out” (slightly paraphrased). 

There are times when it’s not so great, as in the first time I typed in “Er” where it helpfully substituted the word “We”.  I didn’t realise that it thought I’d made a spelling mistake, so I happily sent off a rather cryptic sentence via Google Talk.  But that’s where Android have been really smart.  If I type in a word that the phone doesn’t recognise, I just have to tap on the word in the list of suggestions and it adds it to it’s dictionary and will use the new word in future.

I think the reason that the “T9” style keyboard is called “XT9” is because they’ve extended the standard “T9” to allow for similar mis-pressed keys.  So that the same ability that the landscape keyboard has to recover gracefully from my badly pressed keys extends to the “T9” keyboard too.

By mistake I also found out that doing a “long press” on a key gives you an “options” menu as follows:

09 - Phone Keypad - long touch     12 - Standard QWERTY - Long Press

For people who have to write Afrikaans stuff often, the ability to write é or ö at will could be great in the standard keyboard and when using the “ABC” mode of the “Phone Keypad”, it can be a nice time saver sometimes.

Posted in Uncategorized.

HTC Magic – Part 1 – Unboxing and initial impressions

I’m going to do this in a few parts:

  1. Unboxing and initial impressions
  2. My first app for the HTC Magic
  3. Any updates to the impressions after my Vodacom sim card starts working
  4. Review after a week

On Friday morning I finally got the call that the phone had arrived at Vodashop Rivonia, unfortunately my HTC TyTn has a *really* bad camera so the pics from the shop didn’t come out too well.  The process signup was pretty smooth, although it took almost an hour to get completed.  (The shop didn’t have the HTC Magic on various lists and they all needed to get updated, and then the manager needed to do some approval but he’d popped out)

The phone came with a full battery charge (possibly because Vodacom updated the ROMs on the phones before selling them) which was great – no need to charge it before you can play with it.   Since I’m porting form MTN to Vodacom, I need to wait for the port to complete before I can actually make calls on the phone, so I’ll be writing another post to give any updated impressions of the phone once I can use it to make calls and such.

IMG_0739 I’ve had 2 other HTC phones and this packaging was probably one of the cooler ones that I can remember.  Nice and compact, and easy to open.  Relatively minimal clutter on the packaging.

 

 

Once you take off the outer shell, you see the phone, covered by a plastic film that says IMG_0742“Important – to prevent damage, do not apply excessive pressure to the screen or device case. Please remove the device from your pants pocket before sitting down.  For more details, see the Quick Start Guide.”  Now I’m assuming that this must not be present on the phones sold in the UK for two reasons.  Firstly, UK people would have to wonder why anyone would keep their phone in their underwear, and might be wondering about the logic in placing a pocket in one’s underwear.  Secondly, its assuming that everyone who uses this phone wears trousers and not skirts/dresses which is semi-sexist.  Sorry ladies/gents, you can’t use this phone if you’re wearing a dress!

Underneath the cardboard that the phone is resting on, is the rest of the contents of the box which looks like this:
IMG_0747
Going from left to right and top to bottom, those are: Charger, Accessories booklet, Corded earphones, HTC Care booklet, Warranty Statement, USB Cable, Quick Start Guide, Battery (below the guide), slim “leather” case, phone, and the cover with the warning described above.

What you’ll notice, if you compare this list of goodies with the list of goodies that Vodafone UK customers get, you’ll see that we’re missing the USB to Headphone jack converter cable.  HTC (in their usual style) don’t give you a Headphone jack to plug into on the phone so you have to use their USB headphones.   Vodafone UK clearly saw this downfall and rectified it by including a USB to Headphone jack converter cable, while Vodacom decided not to do that.

While I’m happily bashing Vodacom and praising Vodafone, my initial look at the Vodafone offering showed that they get the “with Google” branded phones which means that they’re missing a few apps that the Vodacom guys do get.  You can see the spec’s of the two phones here:  HTC Magic “with google” vs HTC Magic (not “with google”) .  From what I can see on the spec sheets here’s the bonuses of getting the one that is NOT branded “with google”:

288mb RAM instead of 198mb, “A2DP for wireless stereo headsets”, HTC Sync (for syncronising data with your PC), Microsoft® Exchange Server synchronization

[HTC Magic Comparison]

BUT there is more that they don’t tell you…the phones not branded “with google “ get:

  1. “HTC Mail” which besides being their Exchange integration, also does POP3 and IMAP mail
  2. PDF Viewer – for viewing PDF’s
  3. Quick Office – for viewing MS Office documents

So on the whole Vodacom are getting us a better deal than the Vodafone guys.  I’d be really impressed if there were no downsides, but there is just one (even though it’s not Vodacom’s fault).  The HTC Magic’s sold by Vodafone include Android Market which is where most of the great Android applications can be found.  It’s like selling the iPhone without the App Store, or a car without some place to “pimp it out”.  As far as I’ve been able to tell, most of this is under Google’s control, so there’s not much that Vodacom or Leaf can do.

What they have done is to create their own “Open Market” which is a great idea except that it doesn’t yet have many apps.  And as luck would have it, as I start trying to list some now their application starts off hanging (causing Android to try to close it as a non-responsive application) and then tells me that my device has not been given access to the Open Market and that I should contact my provider.

If you want to get apps I’ve found a few ways of getting them:

  1. Go to Cyrket (pronounced like Circuit), there you can find the app, then do a google search and hope that the developer has provided a direct download.  If not, PLEASE take the time to email the developer and ask them to make it available elsewhere.  I’ve found 3 or 4 developers who have been more than happy to send me a direct link to their software.
  2. Android Freeware (http://www.androidfreeware.net/)   I am not linking directly to it because their apps just seemed dodgy, like the “Facebook” app which really is just a shortcut to launching http://m.facebook.com
  3. Google – Just google for: Android Weather download, or Android Geocaching download.  It takes a while, but its been one of the best ways for me to get some nice apps.

If you’re a geek, you can take a look at http://code.google.com, then search for Android apps, download the source, open it in Eclipse, build the project, and then transfer the resulting .apk to your phone.  That’s how I got ZXing – the Barcode scanner – on my phone.  I’m not sure of the legalities of posting a link to the apk, so I won’t do it just yet.  I’ve also got a really basic Solitaire app too.  Some of the projects even link directly to their own APK, like GeoBeagle (A GeoCaching application for Android)

On the whole I’m really happy with the phone even though the lack of applications is slightly frustrating.  Apparently it took 6-8 months before Australia got the Android Market, and even then they only got access to the free apps so hopefully this will be fixed in time.  But until then we’re at the mercy of Leaf, Handango, Handmark, Mobihand, and the developers of applications.   If I think about the trade off – Android Market vs all the benefits of the non “with google” phone, I think we’re better off without the Market for now.

Posted in Uncategorized.

Captcha’s in ASP.Net

I recently started getting some spam from my “contact us” page on my site.  I’d set it up “cleverly” so that it doesn’t try to send the mail to/from the addresses entered into the form since I’d seen online contact forms being used for “evil”.  Unfortunately I’d not taking into account the possibility that someone might use the form to send me spam.

Since I’d completely ignored that fact, I had not bothered to do any kind of captcha or other check to see that there it was a human that was sending the mails.  To be honest, part of the reason was that I’d imagined that making a Captcha work well would require WAY too much effort and I just wasn’t up to the task at the time.

Now that I was getting spam, I needed to make a plan and make one quickly before I was swamped by the mail.  Fortunately I remembered reading about ReCaptcha.  Basically they’re scanning books and words that are partly recognised get used in their captcha images.  Then when people enter the values for the captcha’s they’re helping ReCaptcha improve their OCR quality.

I headed on over to their site and was AMAZED at how many plugins and code “modules” they’d built.  Just take a look at the ReCaptcha Resources – When it comes to languages they have PHP, ASP.Net, Classic ASP, Python, Perl, Ruby, Java, JSP, and Coldfusion support.  And they have plugins for Wordpress, MediaWiki, phpBB, Movable Type, Drupal, Symfony, Typo3, NucleusCMS, vBulletin, and Joomla.  That’s excluding the fact that they have an API that you could interact with directly.

On to the ASP.Net.  It’s REALLY easy.  You reference their DLL, then register a tag for their control on the page you want it to be placed on as follows:

<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

Then you sign up for an API Key, and place the Captcha control in place as follows:

<recaptcha:RecaptchaControl
  ID="recaptcha"
  runat="server"
  PublicKey=""           
  PrivateKey=""
  />

Then finally you just put in a bit of code on the submission of the form that checks:

if (Page.Valid())

If it’s not valid, then the user entered the wrong captcha.

Three simple steps, and super quick to implement… Now my Contact page has a Captcha on it :)   I love it when things just work, and work simply.

Posted in Uncategorized.

Java Dates from a n00b point of view

After spotting that seemingly 90% of the methods on the Date class were deprecated, I started getting worried.  Then when new Date().getYear() started giving me odd numbers like 109 instead of 2009.  I started thinking “Wow! Those Sun developers must have been on some strong drugs when they designed this language!”

So a bit more googling and some “WTF?!?!!?”’s later I found out that the Date class returns the time since January 1, 1970.  So of course .getYear() returns the number of years since then.  Well, not exactly.  Because there are only 39 years since 1 Jan 1970 and today.  So how the heck did getYear() return 109?  I didn’t bother to go any further than that – clearly the Sun developers were on drugs that should never have been invented, and I didn’t want to even think about starting to try and understand what was going on in their twisted little minds at that point in time.

BUT, I found out that they have a GregorianCalendar class which can help you out in most situations, even if it’s a little obtuse in how you use it.

The following code:

Calendar cal = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMinute, mSecond);

Gives you a calendar object based on the input you gave it.  Now of course I get a Date object from a database so I want to do new GregorianCalendar(mDate).  But again, that would be asking too much, so instead of that simple instantiation I have to do:

Calendar cal = GregorianCalendar.getInstance();
cal.setTime(creationDate);

Why, on earth did they call it setTime?  I mean, I’m setting a date and time.  I’m not just working with Time here folks! Surely the method should be named something a little better like .setDateTime() or .setDate()?

But wait… it gets better.  You know the Date class had a getYear() method, right? Remember? It’s the one that requires large amounts of hallucinogens to understand or use!  Well, naturally you’d expect that the Calendar class would have a getYear() that makes sense.

That’s where you’d be wrong!  Since they started with the obscure requirement of doing .GetInstance() followed by .setTime(mDate), they clearly hadn’t quite yet gotten off their high when they made the get() method.  Here’s how you use it:

Calendar cal = GregorianCalendar.getInstance();
cal.setTime(creationDate);
mYear = cal.get(GregorianCalendar.YEAR);
mMonth = cal.get(GregorianCalendar.MONTH);
mDay = cal.get(GregorianCalendar.DAY_OF_MONTH);

Yup, that’s right… why make it as simple as cal.getYear() when you can make it cal.get(GregorianCalendar.YEAR)?  Perhaps someone over at Sun had some stock in a company that provides treatment for RSI’s, so that by making us type out loads more letters they hoped to make more of us suffer not only the pain of using their language, but also of repetitive stress injuries.

BIG DISCLAIMER:

From my brief work with Java previously, I know that the designers were NOT on any drugs and in fact they probably had very good reason for designing the classes the way that they did. It’s just not immediately obvious to the new user, and that’s mainly what I’m ranting about here.  So, to all the Java fanboys out there who are preparing to unleash their full fury on me for my sacrilegious comments about their language – please take a moment and laugh before you post. :)

Posted in Development, General.

Vodacom, HTC Magic, and bad communication

HTCMagic_small I’m one of *those* geeks!  Yes, the ones who want the latest technology and become all obsessive about getting it.  The ones who make the lives of those around them miserable when waiting because they keep saying “When I get my X I’ll do Y” or “I just read that there’s now an awesome app for device X”.

Back in the day (4, or so years ago) I was a Vodacom customer, but I swapped to MTN to get the iMate SP3.  I then stuck with MTN at my next upgrade to get the HTC TyTn.  So when it came time for my upgrade this year, I looked around and found nothing really cool in South Africa.  But there was hope for the iPhone and with the possibility of one of our networks releasing an Android based phone.

Last month MTN released the HTC Dream, and there were rumours that Vodacom were going to release the HTC Magic.  Last week (on around the 12th of May) a number of local news sources reported that Vodacom was indeed going to be launching the HTC Magic and while most of them just repeated a press release, a few offered extra info like MyBroadband’s “Vodacom to launch Google G2 phone”.  They mentioned that it would be available next week (aka from the 18th of May).

Long story short, I spent over 3 hrs waiting on hold to speak to someone from Vodacom Direct only to find out that they knew nothing about the phone.  Neither did any of the 4 Vodashop’s that I tried to contact.  Everyone kept saying “It will be out mid June” despite the fact that there had been the press release and articles and even despite the fact that a Vodacom brochure outside each of the Vodashop’s had an ad for the phone saying “Launching May 2009”.

I was ready to write a really peeved post about how terrible Vodacom’s communications were (Did you know? They even got the phone number for Vodacom Direct wrong in their press release!) until a Vodacom representative (vodacom3g) replied to a post on the MyBroadband forums saying:

They are in the warehouse but we’re busy updating the firmware. (Otherwise you all bitch and moan again! )
So speak to your local shop (they all order their own stock). I’d venture it should be in the shops in the next few days.

[Link to post]

Soon after that they responded to a few other questions.  Suddenly I knew why there was a delay (although it didn’t explain why the various channels I’d tried earlier hadn’t known) and I was happy with the reason.

Hopefully the phones will have started shipping out to my local Vodashop in the next day or two and I’ll finally get my hands on one of these babies within the next week.

Posted in Uncategorized.