Bitcoin Helper 0.11 – Error handling and caching

Warning iconThis is a quick post to announce the release of Bitcoin Helper 0.11. Bitcoin Helper 0.11 contains significantly better error handler than the initial release (0.1) and also makes the file-based caching of the JSON retrieved from bitcoincharts.com mandatory.

Error Handling

It can now handle internal issues with network communication to the data source and incorrect JSON formatting of retrieved data. Bitcoin Helper 0.11 also checks to ensure the requested ISO 4217 currency code, for conversion to Bitcoin, is supported.

Certain functions in Bitcoin Helper now return a negative integer in the case that an error occurs. Details regarding these error codes can be found in the source code comments of bitcoin_helper.php. The relevant section of commenting is quoted below for convenience.

/* Information about error codes

Certain functions within Bitcoin Helper (0.11 onwards) will return
numeric error codes in the case of unexpected error or failure.

You should make sure to check the returned value for error codes
(intergers less than zero) in your code. The following reference
shows the error numbers and an explanation.

* -1 = Network error retrieving data from bitcoincharts.com
* -2 = Error decoding JSON data retrieved from bitcoincharts.com
* -3 = Currency code not supported
* -4 = Could not write to cache file – check permissions!
*/

File-based Caching

Bitcoin Helper 0.1 would cache the JSON containing currency exchange rates to a file if possible. This caching is now a requirement as of Bitcoin Helper 0.11.

Bitcoin Helper will attempt to write a file named ‘bitcoin_weighted_prices.json’. If this file is not writeable, you will receive error code -4.

If you receive this error, you will need to alter the permissions of the directory to allow this file to be created. Once created, you can revert the directory permissions if you desire and make only the individual ‘bitcoin_weighted_prices.json’ file writeable.

Download Bitcoin Helper 0.11

To download Bitcoin Helper 0.11 with improved error handling, please go to the Bitcoin Helper project page.

Make a comment


Bitcoin Helper 0.1 – Converting currencies to Bitcoin

Over the past few months, I’ve gained quite an interest in the crypto-currency Bitcoin. Bitcoin is a new currency which has no physical form, but can be considered Internet cash. If you want more information on Bitcoin in general, take a look at the We Use Coins website, which has a great introductory video and [...]


Spotify for Linux (Native Preview Release)

Although this is old news, I should mention that Spotify is available for Linux natively. I’ve written about Spotify on Linux before, however this focused on how to get Spotify links working in Linux, when utilising the the Windows version of Spotify via Wine (a Windows compatibility layer for Linux). As of mid July last [...]


Imagine turning on your computer to read a newspaper…

This is a report about what it will be like in ‘the future’, when we will be reading news from our computer. This is ‘newspapers by computer’. It is truly awesome to see how far we have come in terms of the Internet and networking computer communication. It is also slightly amusing to see how [...]


Program Design – “90% of your users are idiots”

They are. Or at least, it can really help to assume they are. A short while ago, I read this from Alex Yumashev’s Jitbit blog: I just overheard this conversation between two developers at a co-working site: “I plan [on] creating a prototype for my new XXXX application, whatcha think it should be – a web-app, [...]


Storing PHP Session data in a database

I’ve recently exchanged e-mails with a colleague regarding the storage of PHP sessions data in a MySQL database. To help anyone else interested in using database storage of PHP session information, I have paraphrased / rewritten the content of some of those e-mails below. One of the best ways to implement the database storage of PHP session [...]


The Future of IBM’s Watson

After defeating the two greatest Jeopardy! champions of all time, the technology behind Watson will now be applied to some of the world’s most enticing challenges. Watch a breakdown of the match from Ken Jennings, Brad Rutter and the IBM team members as they look toward the future. Want more information? IBM’s Watson AI software


IBM’s Watson AI

Watson is an artificial intelligence program developed by IBM designed to answer questions posed in natural language. Named after IBM’s founder, Thomas J. Watson, Watson is being developed as part of the DeepQA research project. The program runs on POWER7 processor-based systems. In 2011, Watson competed on the television quiz show Jeopardy! as a test [...]


How do you define intelligence?

Intelligence is a term describing a property of the mind including related abilities, such as the capacities for abstract thought, understanding, communication, reasoning, learning, learning from past experiences, planning, and problem solving. The Study of Intelligence Intelligence is most widely studied in humans, but is also observed in animals and plants. Artificial intelligence is the intelligence [...]


How to View Saved Threads on reddit

I’m a huge fan of reddit, the social bookmarking/community website found here. One of the features you have as a registered user is to save threads. I feel like a completely moron but I’d never been able to find out where these saved threads were listed until today, when I looked it up. Apparently I [...]


Howdy! My name is Jordan Hall and you’ve reached my website for some reason. Hope you are enjoying it. If you want, I have a few more details about this website. If you are looking for a more professional overview and less general prose, take a look at my biography or my skill and experiences section.

Latest Project

A portfolio of sorts will appear here shortly listing some of the projects I've developed or those I'm currently working on.

For now, take a look at my projects page directly.

Latest Photographs

Some photograph previews will appear here at some point.

Please feel free to take a look at my photographs page.