Posts tagged Ruby on Rails
Silverlight VideoPlayer for RailsCasts
Jun 1st
I am and will be a Microsoft Developer. While working for convenience with other tools, I love strong type languages. I don’t want to ship products because I saved once and hit “s” one more time, so my product will be shipped with that small, human and yet unpardonable error in code.
How many times did you loose your time and effort with PHP in order to find a small mistake like this?
In my pursue on Microsoft tools path I started enjoying the Silverlight technology. Who might not know, Silverlight is a competitor to Flash. By now, on its 4th version, is way above Adobe Flash in almost all areas (I actually worked with Flex and Flash recently, so I really know what I’m talking about):
- Easy to develop : the C# language is a world class, easy to write in, with good compiler, a lot of resources and a VERY good IDE (try to write code and animations in same time in that Flash IDE and you’ll see what I mean)
- Supports Full HD (there are examples on the net with 2 or 3 full HD movies playing), while Flash just tries to get HD with lots of CPU used.
- The model of development is the same for in Browser and Out of Browser – you don’t need to change the tool from Flash to Flex in order to have same product for Desktop and Web.
Railscasts Silverlight video player
May 31st
This is my second shot to create a better player for Railcasts. As you can see, it goes better and better. Who knows what might be next?
- How and why I choose the Silverlight platform
- How to integrate your Silverlight content with your WordPress blog (and presumable all blog systems who allow you to add JavaScript)
Create a simple HTML .MOV player
May 26th
As a Ruby developer, I work quite a lot with their “special” plugins called gems. The nice fact about the gems is that they bring lots of functionality. By example, there’s a gem for paginating a collection who takes just few parameters and not only that finds out how many objects the collection has, but also how to split them, generating the corresponding links and serving to the original container (that used to show the entire collection) only the collection part that is representative in the context of current page and items per page.
Before someone new to a specific gem starts thinking to implement it, usually searches on the net for examples. The most important gems are described and exemplified in Railscasts.com. The content is excelent, the quality is good, sound is nice but the format chosen for movies is Apple’s .MOV proprietary format. There are few plugins to install for playing the files with MediaPlayer, but frankly I wanted a quicker solution than go on some obscure websites and getting from there a creepy .exe installer.
So I’ve created a simple .mov player that will replace the 33 MB of useless QuickTime Player (if you’re a Mac user, you have already this installed so you’ll not need my hack).
So let’s see some code!
First, I decided to use the Object method in order to play mov files. Apple provides a .cab file, who is able to play this files in browser. More documentation on its parameters you can find in their Embedding tutorial.
Don’t forget to add a link to JQuery library!
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
The html code is shown below and it is pretty straight forward:
<body>
<div class="media">
<div class="navigationTabs">
<input type="text" id="txtURL" style="width:75%"/>
<input type="button" id="btnPlayMov" value="Play"/>
<input type="button" id="btnClearMov" value="Clear"/>
</div>
<div id="divPlayer">
http://media.railscasts.com/videos/188_declarative_authorization.mov
</div>
</div>
</body>
The JavaScript is a little bit trickier as it involves JQuery. For a newbie, it is pretty hard to debug, but after a while you’ll just feel it:
$(function() {
// bind an onClick event for this second Flash container
$("#btnPlayMov").click(function() {
var _height = "306px";
var _width = "400px";
var _movie = $('#txtURL').val();
var _html = '';
$("#divPlayer").html(_html);
});
$("#btnClearMov").click(function() {
$("#divPlayer").html("http://media.railscasts.com/videos/188_declarative_authorization.mov");
})
})
Not to mention that it works in all major browsers (IE 8, FireFox 3.6 and Chrome) !
How to add ui-icons to JQuery tabs
May 25th
While working in UniBonn, I have a lot of contact with Ruby on Rails and JQuery; I actually started loving its interactivity and stability. But lately I encountered a small situation with the tabs object that they offer.
This is their default view, with Redmond theme applied. Nice and clean, you might say. But what’s missing? These tabs don’t support images. So you’ll not be able to show an image to specify, let’s say, that this tab has some updated information or a warning that something important is inside that tab.
I wanted to have some kind of control on specifying how the tab should look when I wanted my users to understand that something important is inside and requires their immediate attention.
As I searched through the website, I found the mentions of how to change the tab looks into an “error” style, so that it will attract attention no matter how tired the users are. In the Theming area of JQuery UI website, I found the help for Layout Helpers. Basically, you can specify additional classes who can override the theming of an element. Under Interaction cues, you’ll find all you need to set your elements style to highlighting, error, disable etc.
UniBonn
Mar 2nd
Position: Assistant Researcher ( WHK or Wissenschaftliche Hilfskraft )
Starting 1. March 2010 I work in Informatik 3 Department of Rheinische Friedrich-Wilhelms-Universität in Bonn.
My master is a joint effort between Uni Bonn and RWTH Aachen. During my master, I had the pleasure to be part in the Agile Lab, where I encountered two Research Associates, Pascal Bihler and Mark von Zeschau. They are true developers, result driven people and fair judges of our activity. During this lab, which was intensive, we had 3 weeks as developers in an almost real company environment. From 9 to 18, if you know what I mean.
The experience that I had we very nice and as soon as I could, I discussed with them about joining their development team. Now I have the pleasure of developing a project that will affect all students that will study in this department.
The project is an upgrade to the existing system and will be developed in Ruby on Rails and have a Postgres database, allowing students to have a better application experience. The basis of it are an interactive and dynamic application who has several workflows, involving both possible future students and professors into finding the best candidates for this fine university.
My responsibilities are:
- development in Ruby code on Rails platform
- database migrations / upgrades
- installing / configuring gems
- CSS / interface design
- JQuery JavaScript client side interaction
- testing of the application
This is one more important task who caries with it big responsibilities, but I’m feeling very good about it!
GPS vs aGPS vs WiFi vs GSM localization
Aug 26th
Each method presented has its strengths and weaknesses. None of these is the perfect positioning system, yet they all can collaborate in order to give the estimated position of a user.
GPS, the veteran of the group, has a plethora of satellites at its disposal, offering almost anywhere in the world a precision in meters. The devices which implement this technology are small enough to be inserted even in phones, smart enough to do their job or even more by tracking many satellites in the same time and eating less power, affording the usage of this service for hours in a row. But it needs clear sight to the sky in order to see at least 3 satellites and needs quite a long time in this busy era to get a clear position and be able to pinpoint the location on a map.
GPS – Global positioning system
Aug 24th
GPS is the oldest one from the frameworks available to the large audience. It isn’t the first positioning system, but it is the one with the most success and longevity. It started as a military project in 1957. Because of the cold war, once the Russians sent to space the first man-made satellite, a team of scientists started monitoring its radio transmissions. The crucial discovery was that, because of the Doppler Effect, the signal transmitted frequency increases as the satellite approached, and lowers as it continued moved away from them. This added to the fact that they knew their exact location on the globe, the logical conclusion was that one could pinpoint where the satellite was along its orbit by measuring the Doppler distortion.
SCRUM
Aug 23rd
- one of Agile processes
- use incremental framework for developing complex software
- managing new products
- considered more like a framework in which you can employ various processes and techniques
- Key principle: during a project the customers can change their minds
Manages complex processes by:
- Transparency
- The outcome of the product should be visible to the manager who is managing the outcomes. Also each process that affect the outcome of the product also should been visible to the managers.
- Inspection
- Various aspects of the process must be frequently inspected regularly so that quality of work and peoples can be seen.
- Adaptation
- If the inspection process find outs some process are outside the scope of the product or the outcomes will be unacceptable, then the inspector should response quickly and adjusts the process or data being used in the process.
Agile vs Waterfall
Aug 21st
