TECHNOticles

conversations on all interesting things related to technology and innovation ...

Facebook, Linked In, Twitter authetication integration for Rails

Share |

It become a default assumption in all new web applications (that I have worked on or read about) to have an integration with either facebook, twitter, linked in, or all the three.

Working with these on rails is no longer rocket science as the various plug-in and gems do most of the work for us. I thought it would be appropriate to create a place for my reference as well as that of others to collect some good tutorials that allow us to do these integrations.  To start off, I am adding a few good ones that I have referred to or those that have a lucid explanation and are a good read.

Read more…

HTML 5 overview

Share |

HTML 5 is all over the place. I started hearing about it first when i was reading about the canvas tag about an year ago. But all the noises reached their pinnacle when the iPad was launched with HTML5 support instead of Flash.

ExtJS.com has put together a nice article explaining HMTL5 in brief (Click here for the article) while diveintohtml5.org gives a detailed explanation on the features.

As the article puts it, HTML5 is just a part of the family of  specifications that people end up calling as HTML5.

Some of the highlights of the HTML family are as follows:

Pydev installation on eclipse : a tutorial

Share |

I use the Pydev plugin to develop Python programs on Eclipse. It’s a free plugin. Here I am listing down the step by step process to install and start working with Pydev.

1)      Download the Pydev plugin here

2)      Install the Pydev by just following the instructions

3)      Once the Pydev is installed open eclipse

4)      Goto Window -> Preferences -> Pydev -> Interpreter Python

5)      Click on the New Button Read more…

Some good Ruby on Rails tutorials

Share |

Ever since I started working on Ruby on Rails I have been asked by people to help them find links of some good tutorials to learn Rails. Well, the thing about Rails is that it is best learn’t by just jumping into the code and starting out, referring the basic stuff from RubyOnRails.org.

Leaving behind this thought, we at technoticles have started started creating a compilation of some good tutorials available on the web. We will keep updating this list as and when we find more of such interesting and useful tutorials.

Rails Introduction

Rolling with Ruby on Rails – part 1 – by Curt Hibbs

Rolling with Ruby on Rails – part 2 – by Curt Hibbs

Ajax on Rails – part 3 – by Curt Hibbs

Specific Topics

Rails Migrations -  IBM developerWorks

Using Facebook Connect with Rails – by Stuart Eccles

Improving Rails Performance -  by Stefan Kaes

Deployment related

Creating single executable to distribute Rails applications – by Erik Veenstra

Deploying using Capitrano on Fedora from scratch – Tutplus.com

External API

Share |

External API is an interesting api that allows communication between JavaScript and the flash player. This is a very important feature for sites that have flash content in conjugation with JS code.

ExternalInterface is a part of this api that specifically concentrates on easy communication between ActionScript and the Flash Player. Read more…

What is SOAP ?

Share |

For all those people who find difficulty in understanding SOAP. It is also for people who want to learn about SOAP
The S stands for simple

De-proxying Hibernate objects

Share |

Rishabh Joshi, a product engineer, a friend and a once in a blue-moon blogger, encountered a requirement to create clones of database objects such that even if their relationships get modified the cloning process remains unaffected. Here is his article and the code he wrote for de-proxying hibernate objects and visiting the entire object tree.

The Requirement:

The business requirement was to get an object from the database, create its copy (or clone it), modify the required fields (through-out the object tree), and save as a new row. An, added requirement was, to be able to specify the fields one wants to clone (again, through-out the object tree) and ignore the rest.

Problems faced:

Simple bean copy would not work for us, because, Read more…

Integer Cache in JDK1.5

Share |

Integer Cache is an interesting concept in Java 1.5 that I recently discovered while reading a blog post.

Here is a post on another blog that explains the concept of Caching Integer Objects in detail: Integer Cache in JDK1.5.

Uninformed Search – BFS and DFS

Share |

Breadth first search is a strategy in which root node is expanded first and then all successors are expanded. It means that all the nodes at a given depth are expanded before any other node at the next depth level can be expanded. While expanding the nodes the information of the successors needs to be stored in the memory so that in the next iteration those particular nodes can be expanded.

Binary tree, BFS and DFS traversal

For the given tree the BFS expansion will be :

1 2 3 4 5 6 7 8 9 10 11 12
Read more…

What is Spurious Wakeup

Share |

If a waiting thread wakes up without notify being called it is called Spurious wakeup.
synchronized (obj) {
while (){
obj.wait();
… // Perform action appropriate to condition

}

}

This is the standard idiom to use wait() method. In above scenario if a notify() is sent by any other thread then the condition will not hold and wait() will be skipped. Consider if there is no while loop and some other thread calls notify before wait() is called by this thread, then it may happen that it could wait forever or till next notify is called.

The javadoc of wait method in JDK 5 has also been updated

A thread can also wake up without being notified, interrupted, or timing out, a so-called spurious wakeup. While this will rarely occur in practice, applications must guard against it by testing for the condition that should have caused the thread to be awakened, and continuing to wait if the condition is not satisfied. In other words, waits should always occur in loops.

Src : Effective Java By Joshua Bloch