Geek Garage

Find inspiration in awesome ideas.

Category: Tutorial Page 2 of 3

How to respectfully get your user contact details ?

My app KipinTooch is a kind of contact management app. I created it with the following intentions:

  • Have a better view among the common informations from different contacts.
  • Highlight the relations between contacts.
  • Allow a batch modification for those informations.
  • Help filling informations in a contact card based on similar contacts.

I also wanted the starting point to be the user. So, the app need to gather some informations about the user. But I also wanted the app to be self-sufficient. The app should process data from the phone and everything is done on the phone. No third party social network, no sending to a unknown distant server which would do its magic. This is what I call to be respectful: the user private data remains private and on its device.

This mean that if you want to provide the user some similar informations, you can only rely on what’s on the device. In this post, I will show you how you can gather those informations.

Read More

Format your string resources on Android

There are many tutorials on the web about String formatting on Android. Unfortunately, most of them are about the usual String.format method. In this post, I’ll show you the different ways to display your message.

Read More

Modifying a Django Model

We fulfilled the first user story, but we revealed a weakness in our model. Of course this specific situation could have been prevented. But as a lot of weaknesses are revealed during testing, we have to know how to go back to your model. Lets see the consequences on this simple case.

At this stage, a product owner should add a new task which should be “Submitting duplicate data should be rejected with an informative message“. As we observed in the previous post, duplicate SourceUrls share the same URL. So, lets resolve this issue.

Read More

Create your first SourceUrl object.

We have defined our model and created the database tables. But we still didn’t completed the User Story we’ve defined. Using Django, having our model, we’ll just let the framework do the job.

Other frameworks like Ruby on Rails and Grails follow the Convention over Configuration paradigm for that purpose. Django is a little different. Instead of providing a scaffold for forms and display pages, it do provide an entire backend, the admin site.

Read More

Define the models of your RSS reader

Once the project is created, we can focus on its features. Now, we can define our first User Story. In the purpose of our project, we’ll want to follow RSS feeds. We’ll need to inform our software about those feeds. Usually, the first User Story is “I want to see a form to submit my data“. Usually, to complete this User Story, developers focus on the form. That is not the approach with Django. The data is most important than the form, so we’ll start with the data, Django will make the rest much easier.

Django also makes the data manipulation easy with the Model Layer. This is the abstraction layer where you are going to define and manipulate your data model. So first we have to define and tell Django what our data is.

At this step, we plan to build an app which will load, parse and display RSS feeds. So, the system will need to know where to find the feeds, and then to parse all the items. The user should just have to provide the URL of the feed. This will be our first model and form. A very simple model which will let us see how Django deals with it.

Read More

Working with Django and Eclipse.

Before going further on the development of our RSS reader app, lets just have a quick look about the how to work on the project with Eclipse. Actually, if you are planning to dedicate your life to Python and web development, Aptana Studio is certainly a better choice as it is an Eclipse ready to use. But if you want to build your own IDE with the plug-ins of your choice, you’ll certainly use Eclipse. But Eclipse does not support Python out of the box. As I introduced the tools in the first post of this tutorial, you’ll need to add the PyDev plug-in which will give you all the features you need. The manual and especially the Getting Started chapter provides a good explanation about how to configure the plug-in.

The manual also explains how to create a new project and how to import one. There is also a specific page for Django. If you followed the previous step of the tutorial, you already have created the project sources and you’ll need to import them. To understand why and how, lets just see how you would have done directly from Eclipse.

Read More

Start your own RSS reader project, part 2.

So, in the previous post, you have gathered all the tools you need. You can now focus on the project. Thus, before defining our User Stories, we need to create the project. This will start by initiating a project trough Django. This step is nicely described on the Django Tutorial, so in this post, we’ll focus on our specific need. It will be necessary to understanding the terminology used by Django and more specifically what is a Project and what is an Application.

Read More

How to read RSS online ? Make your own site with Python and Django

What is the worst news we heard lately ? Yes, Google is closing Google Reader, which is a major disaster in our lives. How can we read our RSS feeds by now (actually, by the 1st of July) ? Watching the numbers of flowers on Google Reader’s grave, this was still a popular service.

But hey, you are techies, and RSS feeds are simple data easy to parse, so, why don’t you write your own reader page instead of wasting time looking for another service provider ? Of, course, you don’t want to spend too much time on this. Ok, lets do it the easy way, do you know Python and Django ? If not, lets learn how to use them.

Read More

Reuse your Mir:ror in Pyhton

The Mir:ror is an RFID reader produced by the company Violet, which also produced the Nabaztag. With the idea of the Internet of Things in mind, this device is a mass-market RFID reader really easy to use. You just have to connect it to your computer via USB, and associate any RFID tag to an action trough Violet’s website.

But here is the problem. Since the service is hosted on a remote server run by a service provider, how can you be sure of how long the service will be provided ? The company Violet does not exist anymore, so the device had become useless.

Read More

Make your computer talk to your Arduino, in Python.

At Europython 2012, I attended a talk about Python and the Arduino which motivated me to make my computer talk to my Arduino. Actually, using Python, it is pretty straightforward. This would bring some opportunities to have a real interaction between the computer and the physical world.

Read More

Page 2 of 3

Powered by WordPress & Theme by Anders Norén