Home Coding Wiki
RSS
 

QR Codes – possible usage for a tombstone?

23 Jun

I was writing a while ago about QR codes, what they are, how are they working, and what possible usages one can find for them. Today I read an article about the RosettaStone Tablet, and I think a QR code might also fit perfectly for this.

Long story short, the idea is to attach a QR code to a tombstone (this can be achieved for both existing or new stones) and allow the people that are passing by and that want to learn a few things about the owner of the stone, to read information about the owner, see photos, videos, or generally see the information that the owner decided to leave behind him/her.

To accomplish this, you need a server to store the information for each tombstone owner (this is exactly what RosettaStone is doing, but without the usage of the QR codes). The content stored by the server would be delivered upon request on the mobile devices of those that are passing by the stone and take the picture of the QR code.

It is a little macabre, I agree, but I think it is a nice effect and a good usage for the codes.

 
 

OAuth 2-legged model with Spring Security

14 May

This article contains incorrect information about the 2Legged mode of the OAuth protocol. Thanks to all the people that commented on this article, I wrote a new article, where the 2Legged mode is (I hope) better explained and where a better client for OAuth is implemented. This article is left here for historical references and in order to keep the valuable comments that were added to it.

The OAuth protocol has two models that can be implemented. First, the 3legged model involves all the steps described by the RFC and it is generally used when the authentication of the user is involved in the process (this case is the most common). A very good example of implementing this form of the protocol is composed of the two applications (Sparklr and Tonr) that are delivered with the OAuth plugin for Spring Security source.

The second model is the 2legged model, where the second step of the process (the one where the user is presented with a login page from the server, and he/she needs to log in and then authorize the access to the protected resource) is skipped, on the reason that the client has an additional level of trust, and therefore it is sufficient the exchange and authorization of tokens (this is clearly incorrect; the 2Legged mode means that instead of having 3 parties involved, one has only 2: the provider and the consumer; read this for a better explanation), without the need for the user to authenticate itself.

In this article I will present how one can implement the server and the client for leveraging this flavor of the OAuth protocol. Read the rest of this entry »

 
19 Comments

Posted in Spring

 

Some links about OAuth

10 May

In the project that I am currently working I am implementing the OAuth protocol, in order to have the client and the server authenticate and exchange access tokens, before allowing the client to get access to the protected resources. Currently we are developing only the 2-legged model of OAuth (since we don’t need the resource owner authentication and permission allowance), but it is very likely that in the future we will switch to the 3-legged model.

Here are some links that I gathered regarding the OAuth authentication and authorization method.

For the first steps, here is a nice presentation of the protocol. By far the RFC is the way to go in order to understand the protocol completely, since it provides all the details and examples about how OAuth works (honestly I didn’t expected to find an RFC that is both easy to read and complete in information). Also, the pages that are documenting the API from LinkedIn and Twitter have proven to be very helpful.

 
 

Learn from Wikipedia – writing better articles

13 Apr

WikipediaWhile searching for some introductory information regarding NoSQL-like systems (topic on which I plan to write some posts in the next weeks, especially regarding the Cassandra project) I got to this page of Wikipedia, called Writing better articles. Now, this page might not seem that important to you, unless you take a great deal of time contributing to the Wikipedia encyclopedia, since it contains the rules and the conventions that Wikipedia contributors must follow in order to give a unified and uniform structure to the articles that Wikipedia stores. And while the first par of the page holds the previous statements true, the second half of the page should be of much more interest to everyone, not just the contributors. Read the rest of this entry »

 
 

QR codes – what to use them for

08 Apr

The Quick Response Codes, aka QR Codes, are a type of 2D barcodes that allow for encrypting information in an image, information that can later be retrieved and used by the devices able to scan and process a barcode image. The most popular devices are the mobile phones, that can use some specific applications to extract the data from the pictures taken with the phone’s camera and use that information.

The most popular information that can be encrypted in a QR code is an URL. Upon scanning and processing, the application on the phone can open that URL in the phone’s browser, therefore taking the user to that website. According to Wikipedia, these QR codes seem to be very popular in Japan. Also, today I read a couple of articles (namely this one on QR codes that can be generated with Goo.gl and this one on a bookmarklet that can quickly generate QR codes for an URL). Read the rest of this entry »

 
1 Comment

Posted in Technology

 

About CSS typography – about design

05 Apr

typographyOn one of the sites that I follow (Smashing Magazine) I found a nice article about the CSS typography, covering techniques from both CSS 2 and, most interestingly, CSS 3. It is called The Future of CSS Typography, and it is a nice introduction in various customizations and effects that you can apply to the text that appears on a page.

On a general note, I would like ask you: how much designer are you, and home much programmer? I know people that say that they hate completely to deal with design and UI elements. They think that this is solely the job of the UI designer, and they find very complicated and annoying to deal with UI elements. Read the rest of this entry »

 
 

commons-logging: when to use it

18 Mar

Nowadays I see a lot of cases where the Apache commons-logging is the default library to use for logging, in combination with Apache log4j. The commons-library is implemented so that it discovers at runtime the actual logging library that you have in your classpath, and delegates all the logging calls to that specific framework. In other words, commons-library does not implement any logging functionality. Instead, it acts as a bridge between your application and the logging framework of choice.

However, as any dynamic mechanism, it is quite fragile. So fragile that it has been marked as “DO NOT ever use it”. You can read here and here about the problems that commons-logging is creating. Read the rest of this entry »

 
 

Thinking of … NovaOne

23 Feb

A couple of years ago I had some thoughts and ideas regarding building a system that could… to say it mildly… think. Sure, the quest is daunting and, at least at my age and considering I am not some hot-shot genius, it is really unlikely to do much in this area. However, the ideas from back then are still roaming in my mind, so I am taking this opportunity to lay them down and share them with you. Read the rest of this entry »

 
 

Can we come up with something better than UML?

17 Feb

Today I stumbled upon this article, taking a side on the problems that UML has and how a better modelling language should look like. I agree with the author of the article on some of the points expressed, but, besides the requirements that the MDD community has on the language itself, I think UML does a pretty good job for the rest of the (let’s say, more common) cases where the modelling concepts are used.

UML provides a set of notation guidelines that form the base for any kind of architectural or design discussion. Sure, the specs of UML is quite large, and trying to read everything from cover to cover is a daunting task. But all this information is required only for the cases that are covering the entire field of models that need to be created. However, in many cases only a subset of the diagrams is required, and even for those diagrams, only a part of the notations is used. Read the rest of this entry »

 
 

Custom protocol handlers in Java

21 Oct

In the project that I am currently working on, we are using Groovy and the Groovy Script Engine. This class has a constructor that accepts a path (relative to which it resolves the scripts to execute) or a list of URLs. Well, the class works pretty nice with files, loading the scripts from disk, executing them, and also watching them for changes (this is actually why we are using this class as startpoint for Groovy).

After a few days, we got to the need of taking the scripts and putting them in the database. We wanted to make Groovy load somehow the scripts from the DB, and execute them. We also wanted to keep the nice feature with looking for changes and reloading/recompiling/re-executing the script each time it is found to be modified. Read the rest of this entry »