Too Cool for Internet Explorer

Monday, October 25, 2010

The Windows Definitive Guide to NoSQL


First of all let’s correctly define NoSQL.

Currently, it is a RDBMs anti-pattern, some people are trying to use the old “not only SQL” definition, but I prefer the “non relational” instead.

There are of course more detailed definitions. For an easy understanding, any modern, non-relational, schema-free, web-scalable, with easy replication support, that don’t use SQL language to interface with it, will fit in the NoSQL field.

There are quite a few categories of NoSQL databases, grouped by characteristics like: Columns, Documents, Tuples, Key Values, Graphs, and others.


I have been working with relational databases associated with ECMs in applications almost all my professional life. When I hear from NoSQL databases a few years ago, the Documents category sparks my imagination.

Two of them have become trends in the field: CouchDB and MongoDB.

Being strictly honest, I have a predilection for MongoDB.


Here are a few reasons:
  • It is Powerful and Flexible
  • It has Collections (slightly similar to tables)
  • It is Easy Scaling (automatic Sharding)
  • It uses TCPIP (amazing performance) and finally 
  • It full supports Windows from the very beginning

In the “Ultimate Guide to NoSQL in Windows”, I will show how to get them both working easily.

Tuesday, October 19, 2010

HTML Colors and the Shadows of Gray


Do you remember of the old monochromatic times?

In another recently experienced situation, I feel like in a "back to the past" movie.

Let me show you how that feeling arises:

Working for the Enterprise, there is always a chosen hardware and of course a chosen development environment. I have already posted about customer's decision around being IE6 the standard browser to be considered when developing applications in the previous post.

Considering the hardware, I have recently involved in a situation where the chosen hardware simply didn't support the chosen software options.

We have basically two models of PCs coming from a big enterprise supplier. One of them have an on board video controller (let's call it the X320 model), and the other an off board more specialized video controller (this one could be the X330 model).

Our principal customer site consists mainly of shades of red and gray, but the problem appears more easily with a variety of different tones of gray.



The question is: using the customer's standard CSS plenty of gray tones, many of those tones are simply ignored by X320's video controller, but appear fine when using the X330's one.

This situation brings me back to the old "safe web color" time, and proves me that in the "safe way"; there are no many safe gray options.



If you have any question or need more information, I have compiled information about HTML Colors in general and specifically about gray scale here.

The final word is "Be careful about Gray Shades".

Saturday, October 2, 2010

Who cares about Javascript, Jquery and Prototype?


Well, I care about them all of course.

But I have recently experienced a situation where if I was in a more up to date development environment, none of them will surpass simple HTML and CSS.

Let me show how that application should work:

  • First of all, unfortunately, we need to use tables in these apps.
  • We have a set of images in a Thumbnail.
  • When one of the Thumbnail images is clicked a corresponding centered larger image will be displayed at the bottom of the page.
  • I have defined a fixed width of this larger image in 750px.
  • I was counting with the height being automatically and proportionally set considering that width.

Everything works fine in all browsers, except when images are narrow then that preset limit.

In that case the centered larger image becomes distorted. The narrow the image compared with the preset width the more obvious becomes the distortion.

You can see an example of how it not properly works here.

On the other hand the solution to that was amazingly simple. Simple as 2 lines of CSS code!

You can see that working option here.

But there is a problem… As always that simple amazing solution doesn’t work on IE6 (in fact it doesn’t work in IE at all). If you are testing the above example in IE, try the last image and see what happens.

Believe it or not, many customers around (at least here in Brazil) are using that infamous browser as the “official” one, and developers should base their web applications on it.

That is only one of the many situations where you should care about Javascript, Jquery and Prototype. They will help you a lot.

Since this is not so complicated, Jquery and Prototype are not necessary. Just a couple of Javascript functions have solved the problem.

Here is a working solution tested against IE6, IE8 and some real modern Browsers like Firefox, Safari, Opera and Chrome.

I would like to see some Jquery and Prototype alternatives to get the same, on an even simpler solution.

Tuesday, June 15, 2010

Peek-a-Boo (Pik a Ruby)


I have seen so many people around talking about testing different Ruby versions in Linux and OS/X.

What about using different Ruby versions in Windows?

I have been doing the job manually since the beginning, but there is a cool alternative.


It is a Multi-Ruby Manager for Windows.

A clever solution and there is extremely simple to get it working.

Let’s see:

Saturday, May 8, 2010

Diving into HTML5



I have chosen XHTML since I will apply some effort on Web development stuff.

Last Year W3C have decided to stop the XHTML development.

So, it is time to give XHTML a break, and start learning HTML 5 and CSS 3.

Of course we have many other HTML5 references on web; here is my first attempt into HTML5.

First things first: the Doc Type declaration.

Compared with my previous one:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

It couldn’t be more appropriate, simple and easy:
<!DOCTYPE html>

What we have been doing using the div tag, could now be done more semantically with, article, section, header, footer, nav and aside tags.

A few phrasing elements can help when including complementary information like: time meter and progress tags.

And a lot of new resources to be explored in the near future, like: video, audio, data attributes, microdata, native drag and drop, canvas, DOM storage, Client side SQL, new form controls, and some more.

At this point I need to do something practical, so, why not turning my own personal page into HTML5. Good chance to change its outdated design and a few concepts.

Hands on!

Here are the steps I have followed:

First, take the former page and a few ideas on what to change.



And here is the altered page:



It was an intermediary version, a cleaner one, but still using XHTML.

The tool I have used most in this phase was the ColorZilla Firefox Plug-in.

Since I was trying to keep the color scheme close to the one I have used in the previous version, this plug-in really helps.

Now, the big change!

I was looking for a different approach. My web page would show a more intimist profile, giving me a chance to explore HTML5 basics.

And here it is:



I have made a self-explaining layout from this new version of my page, where each new tag could be easily found.

I have also provided a full HTML5 page wireframe, so anyone could start working on it right now.

What to do next? I think a little work using the canvas tag will be.

Saturday, April 10, 2010

Who cares about a nanosecond?

Things are going faster and faster, so, why still measuring times in a second precision?

Could you think about how many files are uploaded from users in a specific city within a second?

Let’s say, any country capital with a high speed broadband service.

Try to put them all in order. Which arrives first?

Most of the current relational databases support Timestamp data:

Oracle ........ '2007-08-08 09:00:00.123456789'
DB2 ........... '2002-10-20-12.00.00.123456'
PostgreSQL .... '2003-07-29 13:19:30.532'
MySQL ......... '1970-01-01 00:00:00'

But most of it doesn’t consider nanoseconds properly.

People tend to consider that only Real Time Systems have better precision of time measurement needs, but that is not true.

I have recently developed a business application where users can upload files.

Files are uploaded in groups (fifteen maximum). It was important to know the order on which files have been upload.

Depending on the size of the files and users’ internet broadband capacity, some files could be uploaded in the same second.

So, that is the reason to store the uploaded date in the table as a Timestamp column.

The problem starts when trying to feed the required data using the language resources only. I know we can provide current timestamp from the database itself, but if you are not using a relational database and needs to store the timestamp?

Java and Python for instance, have nanoseconds support, but deal with them separately from the date and time. And about Ruby?

The Good new is that Ruby 1.9 does the job nice this way:

Time.now.strftime('%Y-%m-%d-%H:%M:%S.%6N')

Where you can specify the desired precision in %3N, %6N or %9N, but will need a superfast machine to test them all.

Here is a working sample:



Another consideration you must take into account: the O.S. used:

  • Solaris and Linux already support nanosecond precision.
  • The situation on Mac OSX is not that good, since only microseconds are available.
  • Windows, on the other hand, supports nanoseconds, but have a 10ms granularity limit.

So, depending on O.S. running your code, you may need some extras to get the timestamp in the complete form.

The Bad new is that Ruby 1.8 doesn’t support nanoseconds.

Back to the real World, we must admit that most of people out there are using Ruby 1.8.6 under Windows.

So, I have made a working snippet for Ruby 1.8.6 on Windows that could at least, provide data to the PostgreSQL centisecond format.

Saturday, March 13, 2010

Ruby TransParenTheses

First thing first, the definition:

Parentheses (singular, Parenthesis)—sometimes called Round Brackets, Curved Brackets, Oval Brackets, or just Brackets, or, colloquially, Parens.

Contain material that could be omitted without destroying or altering the meaning of a sentence.

I think the above definition, must be considered when discussing about the non mandatory Parentheses use in Ruby.

On many discussion groups, people are questioning Matz’s option to not make the use of parentheses mandatory in Ruby Language, mostly around Ruby methods parameters.

Apparently this decision is becoming stronger.

If you run the following piece of code in Ruby 1.8.6, you will get a warning:

p Array.new 31

ptest01.rb:1: warning: parenthesize argument(s) for future version

The same occurs with this one:

p Array.new (3+1), 1

ptest02.rb:1: warning: don't put space before argument parentheses

But if you run them in Ruby 1.9.1 they will pass with no warnings.

Do you really think it would be better this way?

p(Array.new((3+1), 1))

When developing an application I like to put myself in the user’s shoes.

As a user of a reading text (program), I would like to read it easily.

Some times the absence of a rule is not that good.

But the strict use of a rule could be bad as well.

I have this little example:


I can say Matz is right to keep parentheses optional in Ruby, leaving to users the final decision on its usage.

Saturday, February 13, 2010

Ruby Symbols Ultimate Guide

In Ruby, a Symbol is a special class used to define a constant named label.

A symbol is defined using a colon ":" in the beginning.

Example:
:my_test_symbol

A symbol is not a string, but it has a string representation and an object identifier.

Ruby newbies ask about advantages on using constants over variables, or symbols over both, very often.

First of all, you must know there are no really Constants in Ruby. They are just a convention on variable names (starting with uppercase letters).

You can in fact, change the "constant" values along your ruby program.

That way, it is your responsibility to keep your Ruby "constants" with the same value almost all the time.



Strings, even with the same content are different objects, so, are identified differently.



So, strictly technically speaking, Symbols are pointers to memory objects containing the symbol name.

Differently from Ruby variables or even Ruby "constants", Symbol values could not be changed.



In fact you couldn’t even access the Symbol content unless through a Symbol#to_s method.



Remarkable points here are:
  • When Symbols are better then Strings?
  • Which are the advantages and drawbacks from one over the other?

If you have a few unique string values, and will use them the way they are (no concatenation, upper or lower case, no nothing), Symbols are the right tool for the job.

In any other circumstance, stick with strings. They are not that much slower then Symbols, and much more flexible.

Symbol scope is a bit different and need to be considered.



About performance, you need to have a few points in mind when dealing with a great amount of strings and Symbols:

About memory:

Strings are Garbage collected, Symbols are not.

So, Symbols will be there while your program is running, which can be a great memory consumer.

Have you ever considered how many objects you will have when you set a variable inside a loop?



When creating a great amount of Strings and Symbol, how did the operation compares in performance?



About CPU Time:

When you make Strings comparison rather then Symbols comparison, it could be a great CPU time consumer, since the comparison must be done for each character in the string.



Symbol "values" can be retrieved in many different ways:



Usage:

Symbols should be used whenever referring to a name (identifier or keyword), even if that name doesn’t exist in actual code yet.

  • Naming keyword options in a method argument list
  • Naming enumerated values.
  • Naming options in an option hash table.



That is it about Ruby Symbols

Sunday, January 3, 2010

Test on color code II

Friday, November 20, 2009

OOCSS, Page Layout and naming conventions

At this point, I’m investing some time to improve my technical skill on (X)HTML, CSS, page layouts and different skins for applications mostly based on CSS.

Of course I’m not a designer, and probably never will be. But I know for sure, every developer must know “the minimum” at least, or we will be in the #yerdoinitwrong category.



Studding a few Rails applications and how they implement different css skins for the same page, I get shocked.

There is no guide line to follow, pattern to apply, base layout to use, and most important: no naming convention at all.

So, I have searched the web for all these items just to get even more chocked.

Why? The only thing people agree is to disagree. They don’t even agree if it is fair to use a reset css or not.

So, I need to start making my own decisions and establish some rules by myself.

I want to explore css to the limits, avoiding JavaScript for a while. So, I need to create my css template and start applying it on my web pages, before I can use it on an application (Rails or not).

Reset CSS?

Let me start by the reset css subject. I will not argue about that. There is a lot of discussions over the internet: people considering pros, other considering cons about using the reset css.

After reading most of the discussions, evaluated and tested all the “reset.css” files listed in this collection.

I took the decision to use a “reset.css” file. But the one I have chosen was the W3C proposal.

It is a bit longer if compared with others, but it considers the phrase “a default style sheet must show an HTML page content into a readable and useful way”, seriously.

If you want to make your own tests, I have created and published a basic HTML test page.

In my tests most of the available “reset.css” files (including the popular YUI), turns the HTML content into an unreadable and useless format. That is my reasoning about using the standard W3C reset option.

Page Layout

Next topic, the page layout and element names, in this topic we have a few statistics and agreement about.

You can see a few statistics naming conventions.

Words I think we should consider when naming are: meaning, brevity, clarity, semantic, generic (thanks to Nicole Sullivan).

So, taking my own site as an example:



The main area proposal:



Words like “wrapper” and “main” are not so clear in my opinion. Inside the body, we simply have our desired “page”, that is it.



In our page we have three main areas we can consider a practical standard. The popular: header, content and footer.

And finally each of these areas will be divided into sections:



The left, the center and the right sections, are nothing more then columns.

OOCSS:

That points to the last topic: the oocss proposal, which can be used to put it all together.



You can find associated  links from the oocss home, or go to the project itself.

And it is very easy to define and combine columns using the oocss Grids “sizeXofY” classes.

I am a fan of the oocss way; despite disagreeing on some points and need to change it a bit for my specific needs, most of my class names and current css style came from there.

OOCSS has some key points:

•    use modular components
•    be consistent
•    use grids
•    minimize use of css selectors
•    use multiple classes per element to extend behaviour
•    separate container and content
•    new pages should not need new css

and key points to avoid

•    avoid location dependent styles
•    avoid styling by id
•    avoid specifying the tag a class applies to
•    avoid drop shadows and rounded corners over image backgrounds

According to Nicole Sullivan: “OOCSS isn’t really a framework … but a way of writing scalable, sane, maintainable CSS”.

You can have a First Look on Object Oriented CSS.



And a live sample (my own version) of OOCSS.



It is not even a final draft; it is a work in progress.

Any suggestions are welcome.

Tuesday, October 20, 2009

Rails Summit Latin America 2009 Rocks

I’m on vacations right now, and there are some parallel talks and obviously I didn’t get them all, so, to get this done quickly I will use someone else information for each part of the event and free translate, summarize and mix with my own perception here.

Let me start (of course) with AkitaOnRails:


"About 550 attendees, 20 speakers on a semi-crisis years was a good result”.

"More people outside São Paulo have attended this year, a large group from Rio, but from North, Northeast, South and Center regions also. And even from Argentina.”

"Brazilians once more surpass in hospitality and comrade-ship we have happy hour evenings all days, including the day after, something we didn’t see in RailsConf elsewhere.”

Then Akita disposes about a few problems in the back stage, which the only that could be seen by the audience, was some microphone problems in the first day, nothing else.

"More sponsors this year, what is great, but we need to do even better next.”

"About the talks I try to choose the speakers to provide a big mix in motivational and technical themes, and more focused into the Brazilian audience.”

"In the first day we have our "now famous lightning talk session” which rocks again.”

Then Akita summarizes about the talks, including his own (I will do the same bellow, but considering different sources).

"We from Rails Summit organization staff had recorded all the talks. They are on a final video editing phase, and will be published ASAP in the official event site”

"By now, some attendees recorded and published many of the talks, so, you can watch them up front.” Thanks to Hugo Borges' videos.

"The community participation is always the best part of the event. And you don’t disappoint. Many Railers interacting exchanging ideas and experiences that is the big deal, watch the talks is just a little part. It becomes clear in the "after shift”. In the first day, we had a "Denial of Service” in the "Brahma do Aeroclube” pub and in the second we had a "Stack Overflow” in the "Vila Vintém” pub. May be the only Rails event with hangover effect” – Great moments.



First day talks:

Ruby on Rails Insurgency – Chad Fowler

Chad’s talk resembles the original 2001 talk "Ruby Insurgency” in many aspects but of course in a fresh and renewed view point.

He pointed out that we spent more then a half time of our lives at work, so we must do it the right way. He talked about reasons leading companies to become resistant over new technologies.

There are managers asking a lot of questions: Rails do this? Rails do that? Just waiting for a NO answer to have a chance to state: "Ahaa That is the reason we couldn’t use it”.

Then he brings a recipe on how to push Ruby / Rails into a big company. Doing it slowly, step by step, starting with minor projects.

Presentation: STILL WAITING


On The Edge of Rails Performance – Gregg Pollack

Greg show up a lot of plugins used to detect and fix many scalability problems in Rails applications in the following areas:

ActiveRecord plugins for DB Optimization.
Rails plugins to prevent Memory Bloat
Ruby libraries to help scale

Presentation:
http://blog.envylabs.com/summit/


Yet another Ruby Framework: How Rails works from the inside – Carlos Brando

Carlos have changed the presentation a bit turning it into a more introductory level he exposes how we can benefit on creating a framework ourselves. In his case he need to deal with open social platforms and had spoken on how he created a framework for development into this platform. Then he picks some architectural decisions (push-based vs. pull based), database ORM strategy, code generation and templates as examples on how easy it could be.

Presentation:
http://www.slideshare.net/eduardobrando/yet-another-ruby-framework-como-o-rails-funciona-por-dentro?src=embed


Real-time Ruby for the Real-Time Web – Ilya Grigorik

I feel Ilya’s talk will be a so much advanced topic for me, so, I choose to watch the Carlos Brando talk.

I thing you could see most of the topics covered in the "Advanced Messaging & Routing with AMPQ” article:

Presentation:
http://www.igvita.com/2009/10/08/advanced-messaging-routing-with-amqp/
http://www.slideshare.net/igrigorik/realtime-ruby-for-the-realtime-web


Tarantula: Easy Fuzz Testing for Rails Apps – Glenn Vanderburg

His explanation on how Tarantula crawls a Rails app, traversing links and looking for potential problems (broken links, XSS and SQL Injection vulnerabilities, etc, was really amazing. There are a lot of test steps this tool can handle.

Presentation: STILL WAITING


Code Generators with Thor – José Valim

José speaks about Thor and Rails 3 code generators, and how we could easily customize them. He explains about Thor advantages over the former code generators.

A practical example using RSpec in which a "spec_model” will generate migrations also, considering migrations is not part of RSpec scope, the only option is to change "script/generate model” into "script/generate rspec_model” using this example, he shows how the new generators will help on plugin tasks from now on.

Presentation:
http://www.slideshare.net/plataformatec/thor-rsla-13oct2009-2221414?src=embed
http://blog.plataformatec.com.br/2009/07/creating-your-own-generators-with-thor/


Ruby, dynamism and metraprogramming at DSL construction – Fabio Kung

This one was a big surprise for me, I was thinking Fabio’s talk will stay on a basic DSL level, but he goes beyond, and here is the surprise: besides there are a lot of "black magic” on his code examples, since Ruby is a so crystal clear language, I feel I can play with that "black magic” code as a homework. Really cool presentation.

Presentation:
http://www.slideshare.net/fabiokung/dsls-internas-e-ruby
http://github.com/fabiokung/railssummit-ruby-internal-dsls


RSpec and Cucumber: Beyond the Basics – David Chelimsky

In another hard decision I have chosen the Fabio Kung Talk this year.

David talked about some cool RSpec features like: pending capabilities for tests, implicit subject, explicit subject, custom matchers and wrapped assertions. He also mentioned Spork/Autotest, which are automating test tools that quickly execute all RSpec tests of an application every time a test file is modified (and saved).

Presentation: STILL WAITING


Agile, beyond Chaos – Fabio Akita

In this presentation, Fabio makes a "big trip” on how we need to be on the edge or try to get there most of the time, to keep things working on an agile way:

If the team is constantly winning it is time to change it.
Success is not a plan consequence, but environment adaptability is.
Break the rules.
Agile is important, but not the final step.
The absence of Chaos is death.

Presentation: STILL WAITING


The Future of Ruby & Rails – Matt Aimonetti

Matt talks on how the work on Rails 3 is being conducted. Explain many Rails 3 aspects and new features. And show it in the context of the various Ruby language implementations (MRI, IronRuby, JRuby, MacRuby and Rubinius) also.

Presentation:
http://www.slideshare.net/mattetti/future-of-ruby-and-rails-2223913


Lightning Talks:

This session rocks last year and get even better now.

People from Guru-SP and Ruby-Inside-BR, presented themselves, people from Plataforma Tec, presented a new authentication plugin called "Devise”, Cipriani presented about real-time communication systems using Rails, AMPQ, etc. People from Rio show all the activities going there like DojoRio, DevInRio, HoraExtra, etc. People from Natal (RN state), talks about how do NOT make an event, and OxenteRails 2010.



From all this a special reference to Cipriani who shows not only an interesting Ruby on Rails real time application, but a new (for me at least) presentation tool called Prezi.

The highest point here becomes "A 15 minutes blog in Rails” presentation. Nothing new you may say, but presented by an 11 years old boy? With a previous lightning talk describing his journey into this? It was simply awesome.


You need to see this video, even if you don’t speak Portuguese.

Stop the engines and cool down...


Then, after shift time!





Second day talks:

Mac Ruby – Rich Kilmer

Since I’m not a Mac user, this talk has no meaning to me by now, but, here it is:

"Ladies and Gentleman… Mr. Rich Kilmer…”, conducts a nice presentation about HotCocoa and MacRuby, and even nicer to know about the Apple effort in making MacRuby "The development language” in Mac OS/X environment.

Presentation:
http://www.slideshare.net/mattetti/macruby-hotcocoa-presentation-by-rich-kilmer


Ruby at ThoughtWorks – Carlos Villela

Carlos presented a summary Martin Fowler has done, concerning Ruby projects since 2006 at ThoughtWorks.

What is remarkable about this research is that the majority of projects were considered to have made the right choice in using Ruby and many developers reported a productivity boost of at least twice.

Presentation: STILL WAITING


What changed in Ruby 1.9 – Nando Vieira

Nando talks about new features of Ruby 1.9, his magnificent presentation bring many notes about the changes. A few points:

Releases in December 2008, it is a Ruby 2.0 preview (faster and less memory used)
m17n (multilingualization): many options to get it.
The regexp: uses the uniguruma library now (multi-language, faster, many optios)
New hash syntax, which turns the syntax even clear.
Now rubygems, rake, rdoc are native parts of Ruby.

Presentation:
http://www.slideshare.net/fnando/o-que-mudou-no-ruby-19?src=embed


Lessons Learnt In 2009 – Pratik Naik

Pratik was a bit nervous on his first ever talk, besides that, there are a plenty of useful tips in his presentation. Here are just a few:

Use Ruby Enterprise Edition whenever possible. It is faster and will make your tests faster.
Use the Tickle plugin to execute parallel tests.
Focus on integration tests, not the unit tests.
Security: rails_xss (default in Rails 3).
Will_paginate doesn’t scale. Use Ajax instead (like Twitter).

Presentation:
http://www.slideshare.net/pratiknaik/lessons-learnt-in-2009


A little about CouchDB – Marcos Tapajós

Tapajós shows an overview of CouchDB, and how to work on it. He also show how to change your mind from a relational database approach into a document oriented database, a totally different paradigm.

He splits the presentation into two parts, giving plenty of time for questions and hands on doubts.

Presentation:
http://www.slideshare.net/tapajos/um-pouco-sobre-couchdb?src=embed


Rails Can’t Scale – Bruno Miranda

Bruno and Jason (absent) talk about a real project they both make scaling: the Cyloop the MSN music channel, and how they could keep a scalable infrastructure using Rails. Here are some data about the project:

13500 requests per minute
Using Memcached
Using Scrooge
Using Webservices with Sinatra
Proxies: Round Robin, HA Proxy, Nginx Fair Proxy
Tests: test applications with real data
Log everything to keep it safe if something goes down.

Presentation: STILL WAITING


JRuby in the enterprise world: Using Rails with legacy code – Leonardo Borges

Leonardo talks about how to introduce JRuby into a Java project. He presents his approach on how to integrate Java legacy code with JRuby using Maven.

The basic idea is to pack the application into a jar file and put it into the load path of the Rails application.

Presentation: STILL WAITING


From service to product – Vinícius Telles


Vinicius have made one of the best, if not THE BEST, presentation of the event. Simply presenting a short description of his life path from an IT service business man to the recent release of his product the "Be on The Net

He shared useful pieces of advice and lessons learned in his professional (and personal) life.

Presentation: STILL WAITING


Version Control the correct way – Arthur Zapparoli

Arthur talks about the basics on Version Control Systems, then focusing on GIT (of course), give some practical examples and tips on how to do it the right way.

Presentation:
http://www.slideshare.net/arthurgeek/git-controle-de-verses-do-jeito-certo


Mastering the Art of Application Development – Obie Fernandez

Once more, Obie closes the event: In a stylish presentation, he establishes parallels between arts like sculpture, painting, playing piano, playing violin and application development. How schools are not the best place to learn to be a master on application development.

He talks about the importance of Practice, including the martial arts Shu – Ha – Ri path where you follow a Master in the Shu stage, you discuss with a Master in the Ra stage, and become a Master in the Ri stage.

His talk makes we question ourselves on how time we spent coding or reading code now, comparing with violinists which practice from the age of 5, and the ones who will become superstars practices 30 hours a week, totaling 10.000 practicing hours to become superstars.

But there are myths on how to become a Master…

Practice makes perfect. No!
Practice makes permanent.
Perfect practice makes perfect.

In order to play fast I have to practice fast. No!
In order to play fast I have to practice slowly.

I don’t need to practice reading music (or code). No!
Just like musicians, developers spent (or should) most of the time reading code.

The paints are available, so, focus on the artwork.
We all develop our own "stack” over time.
Don’t focus on the tools, focus on Why?
The pallet is not the point! The point is what we create with them.
How many brushes do you need to paint a master piece?

Code like a paint process:
Have an idea about the finish piece.
Create a sketch
Improve the sketch targeting the composition
Iterate

So the final messages for people who care about are:

Forget about the tools; think about the composition and innovation.
Keep practicing the right way, and keep reaching for excellence.


Presentation: STILL WAITING


My final notes about the event:

You can get the official photo set from here:
http://www.flickr.com/photos/locaweb/sets/72157622496267649/
http://www.flickr.com/photos/locaweb/sets/72157622496373737/


Some information I have transcribed here also come from these guys:

Leonardo Faria
Alexandre Gazola
The Paladin of the Heaven .ix (PotHix)
Herbert G. Fischer

I need to mention a successful live stream Rails application made by Cairo Noleto and a few other guys. It is called "TrendTi.me”, and is simply amazing.

This year the morena_opensource project have gathered a few more enthusiasts.


And I have launched its counterpart: the real_world_woman_on_rails_summit project, a fair reverence to the woman (not models) that made the event even more beautiful, and in this case, more real.



I have planned to talk in the lightning talk session, proposing a new challenge for Rio de Janeiro city, but when I get into the list it was getting late, and half of the audience had gone, so, I think my lightning talk will be done elsewhere this year.

And finally my thanks to the sponsors that helps making this event possible.

Locaweb, Intel, Gonow and ThoughtWorks

That is it.

Sunday, October 18, 2009

What Matters Most: Size or Pleasure?

Let me start talking about: People, Principles, Hardware and Furniture in the Web development environment.

There is a, considered by some, “epic” post reasoning about “Why Pair Programming Is Not for the Masses”.

People do or do not pair programming, for different reasons, and in totally different circumstances in US, Europe, India, China, Japan or Brazil.

Of course, an up to date hardware, a smooth and comfortable furniture, a cool and big enough workplace with a beautiful view will improve the life quality no matter where.

But the real question is: what does it matter most?

People & Principles or Hardware & Furniture?

I have being pair programming myself for a while and my boss doesn’t even know about that. Why? Because pair programming isn’t an acceptable practice where I work, so, we the craftsman, do some pair programming now and then, when we feel the need and we feel that is the best option to get things done.

And we do it wherever possible. A few months ago for instance, I was working as an outsourced resource inside the customer building, and my team mate at that time was from another third party company. My company occupies the 1rst floor in the client building. He was on the second, and the average hardware there was a dual core PC with 17’’ screen…

And YES, we do pair programming. We pair program at his desk on the 2nd floor, or at mine on the 1st. And we do it in cubicles.

Not by coincidence, this was one of the most successful recent projects on that client.

I was wondering if only our managers buy the agile idea, follow the principles, buy the hardware and furniture and sit the developers on a cool place, how better it could be…

In the end, lesson learned, about pair programming:

  • You just need TWO PEOPLE fully accountable for what they do, no matter the hardware nor the furniture, nor the view.
  • The (screen) size doesn’t matter, what matters most is the customer pleasure experienced when a quality product is delivered.


That is it.

Monday, September 21, 2009

Ruby on Rails for Sale! Under $ 2,500 limited offer.


Last Week I have brought some Java team mates to Dev in Rio 2009, a Web development event here in the town. You can see some pictures from the event here.

I was exited because they will be introduced to Ruby on Rails, by one of the most known Brazilian Rails expert.

But after the Rails keynote, I feel something went wrong.

Here is a summary of my conversation with my team mates:

Me - Hey, what do you think? Is Rails awesome or not?

Them - Yeah, yeah, Rails appears to be really awesome, but the cost is prohibitive.

Me - ????? WHAT ????? It is all open source!

Them - Yeah, yeah, but the problem is the hardware; I will not spent near $ 3,000.00 box into a Mac, just to get introduced to this Rails stuff.

OMG…

Here is the old problem again.

Why in the hell did the experts insist to associate good and productive Rails programmers with a hardware brand or specific O.S.?

I can only imagine someone from the Rails core team has a kind of association with something “evil”.

And they are not alone! People from Ruby Central “purchased and sent Matz a new Mac” which you can see here “full of smiles”.

But, the real fact is: A Mac Book Pro in Brazil could be legally acquired by $ 2,440.00 (best price today)

I need to assume developers on the same country, on the same city, on the same company have something in common.

Developers are average citizens after all.

And average citizens use Windows (more then 90% at least)!

Why, should I try to convince them not only to try a new open source language, a new open source framework, but change everything else around?

I don’t think so.

Thanks to Luis Lavena and a bunch of other smart guys I’m now testing Ruby 1.9.1 on Windows 7.

In the beginning before I start learning Ruby with Satish Talim from RubyLearning, I have spent some time looking for a place where I can learn Ruby using Windows, and my mentor uses Windows as well. Satish shows up just in time for me.

I think there are many similarities between India and Brazil in this case.

Apple products are very expensive pieces in developing countries, and are not for the average people.

That said, Rails experts, please try to be at least more agnostic about hardware and OS when keynoting about Rails.

IMHO, this is the best produced stupidest Apple advertisement ever.

I can understand why some people are stick with Apple products.


Anyway I will say it again.

Being a good and smart Ruby on Rails developer, has no direct relationship with the hardware, Operating system, Editor or IDE you use.

It is all about YOU, your motivation, your perception and good sources of information.

If you like the all open source Linux use it, it is completely free, and friendlier every day.

If you like the software proprietary Windows, buy the hardware you like the most (probably windows will be pre-installed on it).

And last but not least, if you like the software and hardware proprietary OS/X and can afford a Mac, do it, and be happy!

Free will for all!

Tuesday, September 8, 2009

UNDER CONSTRUCTION - to be, or not to be



This weekend I re-started the “TrainerOnRails” Project.

So, it is time to put the first page on that domain which was empty for almost a year.

My first attempt was to Google about “under construction pages”, and doing that, I start to question myself.

Would that be the coolest thing to do first?

Here are some of against opinions about that.

This icon says more about me than it does about my web page

Don’t use under construction pages

Design Mistakes: The Under Construction Page

Under Construction pages on websites - do they matter to SEO?

Making The Most of Being Under Construction

A nostalgic one:

The Top 3 Retro Under Construction Pages

This one disagrees from everyone else, saying an upfront “under construction page” can improve your SEO activity.

Getting Your SEO Started Early With A Development Home Page

The one that looks more pragmatically at this subject is this:

Under Construction page is such a waste of time or is it? What make a good one?

One good idea here:

Cool and Free Launch Page with Ajax Newsletter

Well, I have made my choice: a beta version page will be. No under construction, obvious and redundant, animated gifs at all.


But why in the hell do I need a beta version page?

In fact for some practical reasons:

First of all, if I do nothing, people will see that strange list of files when they access my domain name, if I need to do something, why not to put a page out there?

Secondly, I need to get ready with RRS feeds, donation badges, hit counters, etc. and to get that I need a working page now!

Another problem (in my case), is that TrainerOnRails’ domain, sleeps for almost a year, and there are a few broken links elsewhere that I want to redirect.

How can I do that if I don’t have any “beta version page” to redirect them?

This situation drives me to another research: customized error pages…

In this case, people were getting a 404 error page when they try the old TrainerOnRails link, so, I need to put something there to redirect them.

It is not a regular 404 error customized page, but sounds like one.

To test the whole thing, you can start from the former link, and see what happens:

I’m not a designer, I try to do it quite simple: no CSS, just hard coded HTML and a few images.

I like the final result. It is triple checked by W3C Validation Service, Validome and WDG HTML Validator.

Since it might help someone else to avoid one or two working days on something that simple, I have turned it into an open source project “my_domain_beta_page” and released it on Github.

You are welcome to fork it, customize it and make it better, trying to keep it simple at the same time.

After all: it is just a general beta version page to keep your domain alive up front just before “your real page” get ready.

Next step? What about a Release Candidate page?

Saturday, August 8, 2009

WEB 1.0 to WEB 2.0 to WEB 3.0


MarcRic’s definitions:

  • WEB 1.0 – We use “Their Data”
  • WEB 2.0 – We interact with “Our Data”
  • WEB 3.0 – We will sense with “World Wide Data”

The best summary ever (I suppose).

Sunday, July 26, 2009

Controlling and Documenting Software Development: a new approach

I’ve been reading a Tom de Marco’s article these days, where he reconsiders the “You can’t control what you can’t measure.” phrase.

http://www2.computer.org/cms/Computer.org/ComputingNow/homepage/2009/0709/rW_SO_Viewpoints.pdf

I’m suggesting that first we need to select projects where precise control won’t matter so much. Then we need to reduce our expectations for exactly how much we’re going to be able to control them, no matter how assiduously we apply ourselves to control.

Another great piece is the 1997 Bertrand Meyer’s satiric article. It is undoubted joking but most of it fits real and up to date for me.

http://archive.eiffel.com/doc/manuals/technology/bmarticles/uml/page.html

In its attempt to show that it has included everyone's pet ideas, it is a chock-full of symbol after bizarre symbol. Just the "Notation Summary" takes up 60 pages and has its own table of contents! UML is in fact as complex as a big and cryptic programming language, with generous use of "$" and "#" and "-" and "*" and "solid triangles with no tail" and rectangles and diamonds and solid lines and dotted lines and solid ellipses and dotted ellipses and arrows of all kinds and keywords such as "const" and "sorted" (not to be confused with "ordered") and different semantics for a class depending on whether its name appears in roman or italics; but at least a programming language, even the worst of languages, is executable! Here you have to learn all this monstrous complexity just to build diagrams of a possible future system.

For example I have tried to see if I could characterize UML as "object-oriented"; we all know this is a great compliment. Fat chance. Of course the authors make the requisite use of "object" and "inheritance" and so on. But a mere glance at the diagrams shows UML for what it is: an extension of entity-relationship modeling. The basic examples show binary and ternary associations, such as (page 16 of [1]) associations between "flight" and "seat" and "person"; this is the exact opposite of object-oriented design, where, as we all know, the world is structured in classes, built around object types, and every operation or property belongs to one class. Surely in object-oriented design you can't have a "passenger" link that treats "seat", "flight" and "person" symmetrically! In an object-oriented system it would belong to one of the classes; that's how you obtain the consistency, simplicity, modularity and reusability of O-O architectures; look at BON or at Eiffel to enjoy the results. The authors of UML know this, of course; to understand why they call UML object-oriented we must appreciate their famous sense of humor. Obviously they meant it in jest.

How could I criticize the method for not helping software developers or managers, when it does not care about software development at all, but only about developing a market for consultants and trainers? Everything started to make sense: the complexity and bizarreness of the notation, which I had foolishly taken for a deficiency, are in fact among its most attractive qualities, since they make for endless business opportunities, for Rational and perhaps even for others as well; so does its lukewarm adoption of object-oriented ideas, since it means a consultant does not even have to like or understand object technology to profit from UML.

My growing interest on agile philosophy and methodologies, trying to convince my job mates (all levels), to give the software project control and documentation a much more soft touch, the Design By Contract approach sounds much more smart and agile to me now.

I like so much this practical approaching article:

http://devlicio.us/blogs/billy_mccafferty/archive/2006/09/22/design_2d00_by_2d00_contract_3a00_-a-practical-introduction.aspx

So, in the control and document software development subject, we have:

The don’ts (old fashion):

  • Instead of hard control software development, try to deliver software that makes a difference.
  • Function Points is not an effort estimation method; don’t try to estimate time spent using it.
  • If the average managers try to deliver software on a seni
  • or developer time line with a bunch of junior or even trainee developer team, why in the Earth do we need to over control software development? And worst, why to use FPA to measure it.
  • Since UML is not simple, agile, or even OO, why in the Earth do we need to use UML when modeling or documenting software development?

The Do’s (new fashion):

  • Manage the people and control the time and money.
  • If you want to control something in software development, control its quality.
  • Use Mind Mapping to barely document the software requirements (user stories).
  • Use DbC to design the software.
  • Use a smart and agile (like Rails) technology to implement it.
  • Use XP methodologies when implementing it.
  • Applying BDD, use executable specification and documentation techniques.
  • If there is an obligation on measurements and control, use an agile technique like “AgileEVM” for instance.

And remember: what really matters to the customer is:

“BUSINESS VALUE DELIVERED PER SPRINT”

So, that is exactly what we need to focus on.

Sunday, June 21, 2009

Applying agile methodology is a waste of time



People some times wake up “Agile” no mater what.

After a few years, working on the customer site, things change a bit, and now we are working for the same client under a new OUT sourcing contract, so, I came back to the “home” office.

The first thing I have noticed back to the office was the “java team agile style”.

There is a task board on the wall;
The Java source code is under CVS control using “sprint” branches;
They have regular meetings every week…

So I need to ask my VB team mates: You are not agile yet? Why? Does your working environment let you be or become agile?

A few weeks later I realized that the point is not agile methodology but agile PHYLOSOPHY.

If your working environment doesn’t embrace the agile philosophy, there is no way to become agile no mater the amount of agile methodologies you use.

Some practical examples:

The weekly meetings were not focused on the project sprint deliveries, and soon they were disabled for the “big project” the java team was working on. And the other projects are not “big enough” to be selected by this kind of weekly meeting.

I need to implement an urgent but simple feature on the original java application they were working on (the big project). So I asked on which CVS “sprint” branch I should work and was told to use the 5th sprint.

Then I asked when the user have received this sprint, and was informed “No there is no sprint delivery to the client, we are working hard the last 6 (six) months implementing the new functionality and trying to integrate it with the original application”.

Well that is my point, why do they waste their time applying some agile methodologies if the overall philosophy remains waterfall.

This brings me back to the source “The Lean Principles”.

  • Specify value from the standpoint of the end customer by product family.
  • Identify all the steps in the value stream for each product family, eliminating every step and every action and every practice that does not create value.
  • Make the remaining value-creating steps occur in a tight and integrated sequence so the product will flow smoothly toward the customer.
  • As flow is introduced, let customers pull value from the next upstream activity.
  • As these steps lead to greater transparency, enabling managers and teams to eliminate further waste, pursue perfection through continuous improvement.

If we can put it on just one phrase, the “Lean Philosophy” is:

Do nothing but what gives to your customer some value.

So which is the value to the client on using the precious development time specifying and modeling the full feature; calculating Function Points for it, creating a document detailing each aspect of it, and implementing each of the possible functionality, with no delivering at all.

At the end we can see: if the enterprise still waterfall there is no way to be agile.

First of all we need the enterprises to become agile; we need the managers on both sides to become agile.

There is no way you could be agile if your manager insists on detailed upfront schedules.

There is no way to be agile if your manager insists on FPA for each functionality.

There is no way to be agile if your customer demands a huge amount of documentation.

There is no way to be agile if your customer demands a lot of form to be filled out just to get a new version of the application deployed.

So, managers, please read a few books about being agile, starting here.

And you folks, developers and other professionals try to share the agile philosophy before the agile methodology.

If you try to use agile methodologies into a “waterfall” environment, you are wasting your time a bit.

Good luck.