RSS
 

Archive for the ‘Technology’ Category

Client for OAuth with Spring Security

20 Nov

About one year ago I wrote an article in which I described how can one implement a client and a server that uses the OAuth security protocol. The implementation was using Spring Security and a plugin for OAuth. The article was intended to focus on the 2Legged flavor of the OAuth 1.0 protocol. However, because of a misunderstanding from my part, that article is just a normal OAuth 1.0 implementation of Client and Server, with a small hack for the second step. Thanks to all the people that commented on that article, I was able to understand how the 2Legged mode should work.

Therefore, this article presents a small client application that uses both the normal OAuth 1.0 mode and the 2Legged mode (also know as “signed fetch”) for accessing a protected resource. Read the rest of this entry »

 
 

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.

 
 

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 »

 
 

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 »

 
 

Impressions of my new Logitech TrackMan Marble

24 Dec

My lovely girlfriend made me an early Christmas present, and gave me the Logitech TrackMan Marble. The device is very interesting, from multiple points of view. First of all, I am not short on mice, I have like 3 or 4 mice available, and before getting the TrackMan Marble, I was using a Microsoft Wireless Laser Mouse 6000. But after getting the Marble, I just fell in love with it.

Here are some pictures I took that feature this device:

The pros

The first pro point that you get is the shape and the look of the Marble. Is very cute and good looking, making a good impression with its big marble-like ball. Then, after starting placing your hand on it, you discover how well it fits in your hand. The device has an ergonomically shape, fitting in your palm very nicely.

The 2 big buttons act as the standard mouse buttons. However, you have to use your big thumb to make a click, and the third finger to make a right click (whereas with a simple mouse you use the first finger to make a simple click, and the second finger to make a right click). These two big buttons are configurable through the Logitech SetPoint software.

The mouse has two more buttons, that are again completely configurable. I set them to act as middle click (the small button on the left side) and as Universal scroll for the right one.

Since there is no wheel, the mouse installs a Universal scroll feature, which means that when you click the button that has the Universall scroll feature assigned, the cursor turns into an arrows cross, and you can scroll the current page both horizontally and vertically, by using the ball.

Another pro point is the fact that you don’t have to move the mouse. This means that you don’t have to have a mouse pad or a friendly surface for the mouse to move the cursor correctly. Moreover, by removing the need to move the mouse you also get rid of the pains in the right hand that sometimes you are getting when using the mouse for a longer period of time.

The manual of the device points out another feature of the Marble. By moving the cursor using the marble ball, you can more precisely make double clicks, since after positioning the cursor on an object, when you make a double click the cursor cannot be moved and remains fixed.

The cons

The device is not perfect, and here are some of the cons that I discovered.

After switching from a normal mouse, you have a very strange feeling. The usage of the Marble is somehow similar to using a touchpad. The movement of the cursor is very imprecise in the first week of usage, for example. Probably after this week the precision will increase.

Next, since the device has no wheel, the scrolling is a little bit difficult to be performed. In programs like internet browsers and Office documents, the Universal scroll feature behaves ok, but you still need to push one button to activate that feature. But even after getting this one-more-button-click for scrolling, the scroll is quite sensitive, and you often get to scroll on both directions, even though you only intended to scroll on one direction.

The major disadvantage of the missing wheel is the zoom feature, which could be performed by combining the CTRL key with the wheel. I was using this feature in Office programs, internet browsers and also in image editing programs (Corel PaintShop Pro). Now with the Marble mouse this is no longer possible and I have to stick to using the +/- keys or just go to the toolbar and use the combobox with the Zoom factor to zoom in or out.

Note: you can get the marble-style trackball and the wheel by choosing some other product from Logitech, like the TrackMan Wheel, Cordless TrackMan Wheel or the top of the line product, the Cordless TrackMan Optical.

Another disadvantage of the Marble mouse is that you have to get used to clicking with your thumb, instead of using the index finger.

Conclusions

To sum up, I like the device and I don’t intend to return to regular rodents. I especially like the fact that it is so unusual. After all, I have a mouse with ball but optical, a mouse with ball but that doesn’t move and a mouse with the ball on top of it :) .

 
 

The need for a new browser-server model – part 2

11 Dec

In the part 1 of this article I presented a summary of the disadvantages that I think the current model of communication between the browser and the server has (where the browser-server can be any combination of implementations you can think of).

In my opinion the current dialog protocol is no longer sufficiet for the needs of many of the applications that we build today. We inherited the HTTP protocol and the HTML language from the days when getting a document from the server was all there was needed, and currently we are trying to turn this document-fetching operations into something interactive, something that works just like a desktop application. But it doesn’t, and those applications that do look interactive/snappy/web2.0 are just fully loaded with Ajax and JavaScript on the browser side, and hard core workarounds and tons of libraries on the server side.

When I say “interactive” I refer to the form of dialog where the user is working directly with the window or the dialogs that he/she sees, where clicking on the Save button makes the data persistent in the storage and I can keep working on my current tasks in the application, where I can minimize applications to taskbar or to system tray, where I can create shortcuts to my applications on the desktop, where I can have my “.xyz” files opened with that application, and so on. All this directly through the browser.

Sure, we can have many of these implemented using Ajax and JavaScript, but as I said on part 1, this is a simulation for both users and developers.

Changing this

First of all we have applications nowadays that are fitting the old document-request model really well. Documentation sites, company advertising sites, presentation sites, personal sites and so on cope very well with this type of dialog, so the new browsers and servers should still be able to support the old model.

The new dialog model I believe should be based on a binary format. The data that will be transferred between the server and the browser will be quite large, so compression should be available. Also security will be enhanced if the format is binary.

Next the browser should be implemented in such a way so that it is able to create new modal windows, panels, dialogs, list boxes and so on based on the information received from the server. The classical buttons like Home, Refresh, Back, Forward must be removed, since it doesn’t make sense to use them in such applications. Everything starts from the main window, where you get the basic data, and then you start doing your work with the elements from that window, open panels, save data, add/remove/edit items and so on. You don’t need to get to the next page or return to a previous one because… there is no previous one.

Since the client is working in one place and the server is some other and distant place, the connection between them might fall at any moment. The browser should be prepared to take the application offline, store the data locally in some internal database, and then, when the connection to the server is re-established, synchronize the data and transfer the items created during the offline session back to the server. This should be transparent to both the user AND the developer. Of course, when the application is taken offline, the user should be notified that several services or functions of the application are no longer available until the connection is back online, because the data that was fetched from the server-side storage is available locally, but any additional data cannot be fetched from the server since there is not connection available yet.

The development model for the client side should be as simple and straightforward as possible. Glue code and classes should be provided for making the connection between the code for the client (/browser) and the code from the server.

On the server side things are not as different as they should be on the client side. However, a framework or again some glue code should be provided in order to make the connection with the code from the client side. This framework/glue-code should also handle gracefully the part with the synchronization of the data from the client with the data from the database, after a session of dropped-connection/offline-working.

How about Flex and GWT?

True, Adobe Flex and GWT are two technologies that provide some of the features that I want from the new model (of course, there might be other technologies besides these two, so please add a comment if you know some more). However, what they really do is to create just another layer on front of the users and the developers in order to hide the fact that every click results in a Ajax call or in a hidden iFrame being refreshed.

And Google Gears?

Yeap, Google Gears is an example of how the browser should handle the dropping of the connection between the browser and the server. But something that I think Gears doesn’t have (yet) is a mechanism for automatically handling the synchronization of data between the client and the server. How can this be done? I am not sure, perhaps by recording the actions performed by the user, and the replay them to the server once the connection has been re-established. This will ensure maximum transparency for the client code, and for the server the things will look just like they are being performed by the user operating the client very fast. But anyway, this is just an idea, probably a much better solution could be designed for this.

 
 

Sharing knowledge and ideas

02 Dec

For each need that we have, we can find a supplier. For each ingredient in the food that we consume every day we can find a shop for. What about knowledge and ideas? These are also ingredients that we need every day, in order to function properly. Sometimes I look around me, at the people that are passing by me, and I observe the fact that many of them are just too focused on the task of day, on the job that they must take care of. A job that most of the times takes us to some ordinary and repetitive actions, where the imagination, ideas and the improvement of the knowledge are not required or, even worse, useless.

We must understand (or remember if we have forgotten), that the human being is by excellence a creative being, is able to create, design and craft new things for the sole purpose of entertainment, not just for survival or for getting to the food.

Although I don’t have much time after work, I usually split this time in reading a book, reading news on subscribed channels and working on personal projects. Here are three sites that I want to share and talk about, sites that basically provide the food for thought, provide a good start for and a good load of ideas and knowledge.

www.ted.com

The first one is http://www.ted.com, standing for Technology, Entertainment and Design, where you can watch presentations held by various people from these three worlds. I will not get into further details about the site, you can read more about the goals of ted.com by accessing the About section of the site. What I want to say is that watching the presentations is a source of new ideas and very mind opening. The manner in which the subjects are presented, in a simple and direct way, without the fuss of scientific details, they all make this site one of my favourites.

www.droppingknowledge.org

The second site that I want to talk about is http://www.droppingknowledge.org. Here users can post questions, answer to already posted ones and generally share the knowledge that they have. If you want to just assist, you can browse through the archive of questions and see what answers have been posted for each question. The format of the site is somehow similar to Yahoo! Answers, except that the level of the questions is much higher. The subjects discussed range from global warming to the meaning of life. If ted.com was the source for ideas, droppingknowledge.org is clearly a source for possible answers and discussions on some very hot and difficult subjects nowadays.

cultivatinro.wordpress.com

The third site, which is actually in its infancy (or was at the time of this writing), being started on 21st of november, 2008, is http://cultivatinro.wordpress.com and is in romanian only. The idea behind it is quite interesting: 7 people post on each day of the week, each one of them having assigned one day of the week. There is also possible to invite other people to post on the site. The posts are Computer Science related and their goal is to bring into discussion various themes from the large field of IT. Since each new comment is potentially a new point of view for the target post, I really hope this blog will get bigger and more people will visit it and join the discussions that are sparked by the posts.

Conclusion

This post aims two things: the first one is to talk about ted.com, droppingknowledge.org and cultivatinro.wordpress.com, three sites that provide interesting ideas and discussions.

The second goal is to make you remember that we must stay creative, we must read information sources that provide us with quality content (not the Sport magazines or the 1000th buddy’s homepage on hi5, facebook, myspace, zorpia, you-name-it :-) ). And if possible, engage in conversations, share ideas that you have and the knowledge that you posses, because one of the ideas that you give to someone might sparkle another idea and then another idea, and this could lead to the next big breakthrough in science, art, music or any other field.

 
1 Comment

Posted in Technology

 

The need for a new browser-server model – part 1

27 Nov
The dialog between the browser and the server is simulated

The dialog between the browser and the server is simulated

We are building complex web applications for years now, and the dialog between the browser and the server is well known and with very clear and simple rules. But did it ever occur to you that what for the browser and the server is a perfect and normal dialog, for the developers AND for the users (at least for those users that are able to see this) this is all just a very big and nasty simulation?

Huh?

Here is what I am saying: the browser requests a page, the server receives the request, then according to some configuration files (I am thinking now on  the Java platform, but this is similar to any other platform, be it C/C++, .NET, Ruby On Rails, whatever) it selects the piece of code to execute, lets the code to execute and then returns the result to the server. Cool, so what? As I said, this process is perfectly logical, and for both parties there is nothing simulated here.

But for the developer this dialog is OK and normal only if she/he creates a simple personal web page or some presentation site, similar to a Word document but with links between pages. For any web application that is just a little bit more complex, many simulations and workarounds and stuff that are not really normal must be performed.

Read the rest of this entry »