Raspberry Pi – Location Aware Media Server – Pairing

As mentioned in the post Raspberry Pi Location Aware Media Server I mentioned a new project I am embarking on. This post is to document my current process and thinking regarding the pairing process for the beacon Pi’s and the server Pi and for the initial setup to be carried out.

This post will reflect my current plans therefore will change over time. Where I have decided against a certain approach I will either create a new post specifying why or I will update this post giving reasons depending on the most appropriate approach. Continue reading “Raspberry Pi – Location Aware Media Server – Pairing”

Raspberry Pi – Location Aware Media Server Project

Recently I purchased a Raspberry Pi and have been considering what I should do with it.

1 consideration has been to create a location aware media server.  What do I mean by location aware media server? Well most media servers will allow you to create playlists and output to whatever speakers are attached. With my project however I plan on making the system know which room you are in and to then output to speakers in that specific room, if you move room the music will follow.

Prior to jumping into such a project there are a few things that I have to work out as well as to decide the full functionality of the system. Continue reading “Raspberry Pi – Location Aware Media Server Project”

Developing And Monthly Projects.

As many people know it can be very easy to make plans however harder to action them. I seem to be very good at procrastination and less so of removing things from my to do list.

To help me focus and get into the swing of programming I have decided that I need to set myself proper tasks with a set time for completion. To make sure that I carry through I am also going to be posting updates on my blog.

The plan is to start a new project on the 1st of every month, once the end of the month arrives I should have a project that I can then release. This does not necessarily mean the product will be perfect but in a state that I am happy to show others and essentially gives me something to build upon in future. Some of these may remain proof of concepts therefore will never be in a finalised state.

I have now set myself a bucket list, over time I will mark off those that are completed and add new tasks and projects to the list.

For my first month I am working on a simple Crossword Maker. This will not necessarily be something that will result in a finalised project but aims at getting me back into the swing of programming again.

The requirements of this are quite simple. For creating the crossword we have:

  1. User decides on the grid size for the crossword and this is output to the browser
  2. User can select which boxes are blank.
  3. User enters the answers into the crossword
  4. Script automatically creates numbered clue placeholders
  5. User can specify the question
  6. javascript submits the structure of the crossword to a PHP script
  7. Potential to have a script automatically generate the crossword with specified answers so that the creator doesn’t have to crate the layout.

For allowing people to complete the crossword:

  1. Script fetches the structure from the server and outputs this
  2. User manually enters the answers into the crossword grid
  3. If a user clicks on a clue when the user starts to enter the answer it automatically puts the letters into the correct locations.
  4. User can click on a button to check the solutions, the javascript submits the answers to the server and this specifies either correct or incorrect.
  5. Another potential would be to have a cheat option that fills in a letter for a chosen clue.

 

What do you guys think? How do you keep yourself motivated and staying on task? How about suggestions for projects?

Usability Over Security And Reliability

As developers we can face some difficult choices. Do we make life easier for the user or do we err on the side of security which can detract from the usability of our applications?

Make Use Of recently ran an article that highlights issues caused when usability is given too high a priority over reliability and security.

The article explains that the twitter account of Roger Ebert recently started to post after a long period of quiet. The problem? Roger Ebert died 2 years ago.

Clearly Roger Ebert had not been posting himself. It was thought that his wife had started to post as she retweets using the account at times (why???) but this soon became clear that this was not the case. Make Use Of appears to have come to a good conclusion  as to the cause. Roger Elbert appears to have posted Twitter updates using SMS. As Roger no longer has an active phone the number had been recycled and given to another customer in the meantime. As the phone number had been registered for Twitter this remains in place. The new owner can now post as Roger.

Now is this an issue for Twitter or the cellular network. In an ideal world there would be no need to recycle numbers but of course there are a limited number available and inevitably these do have to get reused. Therefore such issues fall upon us as developers (in this case Twitter) to make sure that we consider the failure points of our features and how we can overcome issues.

In Twitters case it would seem that once validated a mobile number can be used with impunity to post with no consideration of this being passed onto someone else. This could easily be overcome. For example for the end-user to have to verify the number on a periodic basis, if an app on the mobile device is also used maybe the app could do this on behalf of the user if they are logged in. This may not stop all occurrences of such issues but will help reduce this greatly. Not only this, but it would give the new owner of the number an easy way to opt out and stop receiving nuisance communications etc.

This issue is not restricted to mobile numbers. 2 years ago Yahoo announced that they would be freeing up dormant email accounts. An account was considered dormant if the user had not logged in to Yahoo for over a set time period. I do not disagree with Yahoo’s decision in doing so however this poses a problem for service providers. Consider the things we do over email. For example if you reset a password on most services you simply require access to the email account in question. This might be easy to use but how secure is it? Also consider some of the private information that we may send over email. Would we or the user be happy if such information was given to other people?

Any thoughts? Let me know.

Issue when implementing NSURLSession

I have recently been playing with NSURLSession and seeing the benefits of using this over the old method.

Today I came across a slight issue that is worth noting. During my programming session I was implementing the delegates. I started with NSURLSessionDelegate then moved onto NSURLSessionTaskDelegate. At this point I decided to test the code and found that the following method was called in my delegate object

– (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error

I tried to output the error using

NSLog(@”%@”, [error localizedDescription]);

But unfortunately this was not helpful as I received Null. I originally thought that there was an error in my coding however I could not locate 1. On further checking I found that I have made a couple of assumptions and I believe they were quite well founded.

The description of – URLSession:task:didCompleteWithError: is as follows:

Tells the delegate that the task finished transferring data.

Unfortunately I do not believe the method is named very well. As the description states this method is called when an error occurs. If no errors occur then the task completed successfully.

To ensure that the request was successful something along the lines of the example brow will work.

- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
{
    //TODO Implement method
    if (error == Nil) {
        //TODO ascertain the failure and report failure to the caller
        return;
    }
    //TODO Report success
}

Help Audit Truecrypt

Over the last couple of months Edward Snowden has shown us how intrusive governments has been. This has also raised questions such as how safe are you when using encryption software.

As Truecrypt is 1 of the more popular encryption solutions there is a vested interest for the NSA, GCHQ and other spy organisation in breaking the protection that these provide. There have also been suggestions that the NSA have attempted to coerce software developers in actively introducing backdoor’s into their software.

To date there has not been any large-scale security audits on the Truecrypt source code. Well this is about to change.

A team of people have started an Indiegogo Campaign.The campaign has already met the starting target however please do not let this influence your decision in backing the campaign. The more money pledged the better the results for the audit. The money will ensure that those carrying out the audit are properly compensated and funds are available to entice people in reporting bugs that they fund.

Be sure to back the Truecrypt Audit on Indiegogo.