Too Cool for Internet Explorer
Showing posts with label Other. Show all posts
Showing posts with label Other. Show all posts

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.

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.

Sunday, January 3, 2010

Test on color code II

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).

Monday, December 15, 2008

Test on color code

This is a test on posting colorized code here on Blogger:

def creditcard?(type = nil)
number = self.to_s.gsub(/[^\d]/, "")
return false unless number.length >= 13

if type
return false unless creditcard_type == type
end

sum = 0
for i in 0..number.length
weight = number[-1*(i+2), 1].to_i * (2 - (i%2))
sum += (weight < 10) ? weight : weight - 9
end

return true if number[-1,1].to_i == (10 - sum%10)%10
return false
end

After that I have edited the post to check the consequences...

And then edited another time to fix it... Very fast.

And here is the source: A Brent Sowers' article.

Monday, April 21, 2008

Shift Happens

Today I give myself a break.

I have seen this video Shift Happens 2.0 few days ago, and it impressed me a lot.

Now I have found a collection of versions on it (some serious others not so much).

Take a look.

Make your choice.

Sunday, April 6, 2008

I have tried a fast delivery, but…


I'm following Amy Hoy as much as I can, since last year, when I hear a podcast about her learning Rails process.


Now I have a testimony about her "Just ship. Seriously" article. We have a popular statement here in Brazil to summarize the idea:

The better is good’s enemy.

Delivering “the good” to achieve “the better”; if you try to deliver the better on the first try, you risk delivering nothing.

I try, as much as I can, persuade my bosses to forget about these HUGE projects, which will take months or years.

Ho Gosh, the testimony please! OK here it is: A few weeks ago, I get a mission:

“There is a user, in trouble getting data from this legacy client server application to pick some thing like 20 lines of information on a daily basis worksheet, I don’t want to involve the business-technology department on this, just go there and bring me a Java based solution”.

Here is the situation: The user takes 40 to 50 minutes, every single day, filtering information at two different pending flags on a supervisor level. There are 10 supervisors, so, 20 filtering actions on the system, counting grid lines returned by each, and put that value on a worksheet cell. Ridiculous! Yes, but that is the situation.

Mocking up the solution:

Execute two queries to get the proper grouped and counted information, and show the results.

My first option becomes: a night shift service, executing these poor performance queries and sending an email with the desired data to the user.

Some problems with the “web servers’ support” department and with the “job scheduler” application let us to another option.

The adopted option: improve the query performance (with specific indexes) and implement an intranet based application, where the user simply gets the information needed any time he wants.

All fine, this is a very simple application, so let me guess, to put it on production status on this BIG full of burocracy company, nothing less then a week, so that is it, my first shot, A WEEK to deliver this very simple application to the user.

Now the facts:

March, 12

I get the queries and specification done, and send it to a third part partner (Java factory) to get things done.

On my side, I start the HUGE burocratic process to get a new intranet application on production status. So, I started three different threads:

To the Data Administration department, create the necessary indexes, improving queries performance.

To the Logical Security department, to create the necessary user, with the necessary privileges to be used by the application.

To the Operations department to get the new application registered like an intranet one.

First problems:

The “partner” (Java factory), ask for a month to get the application done, two days after everyone agree that a week will be.

A week after I received the application, tested it, and figure they (the partners) changed the queries, and don’t get the behavior desired, which was: execute two different queries and show the result. I ask for a new version, with original queries and specified behavior.

Any way to get the burocracy done in advance, I have started another thread to the Systems Architecture department to check this non working version, just to verify if all necessary patterns and good practices where used.

March, 21

I get the final version ready and tested, by me and by the user, on my local development machine; so, I start a new thread to the Pre-Production department to get this new application ready on the Pre-Production environment, to the user evaluation.

Now you could say: well everything possible was done, the burocracy in advance and in parallel, so you have the application delivered and accepted by the user…

NO, not yet. We have more problems:

People from the Development and Pre-production departments do not create the database users on each environment at time (lack of communication between departments).

People from the Data administration department spent too much time to create the indexes on the right way on each environment (lack of competence here).

The procedures and forms to get a new intranet application registered, has changed since the last time I have done, so, I need to start this thread again with the new forms.

With these problems we miss the first chance to get this new application thru the weekly forum. Ooops, I forgot any new application to get into production status, need to be approved by the user department’s manager and get into the weekly technical forum.

When everything was fine, there was some technical problem with the data access configuration on the pre-production environment. Another wasted day…

Now we are close, the user tested the application on the pre-production environment, I get the approvement of the user department’s manager, so, next Wednesday we go thru the forum and finally next Thursday we will get this delivery done.

May be at April, 10, the user will be ready to use it I HOPE !

We know from the beginning the user will love this SIMPLE application, even more if we could deliver it in a WEEK as expected by developers.

There are some cases where you know that you try to deliver it fast…

But; there is always a “but”…

Monday, December 31, 2007

Ruby x COBOL, the final... combat ?

Again and again. Recently this InfoWorld article, sparks some Ruby x Java flames again.

I try to find some references about the author, but now I realize: it don’t matter, I think there is a pattern. People simply HAVE to write something. And they really do…

Regards the article's title, it again put RoR x Java, trying to convince us that: first COBOL is dead. It is ? It really is ? Java / J2EE, DB2, COBOL CICS integration is the recursive task that I work TODAY. And Second RoR is forcing Java programmers to invest in new skills. What I can say about that ? at least ridiculous ?

On the first paragraph we have this pearl: “Java is losing ground to Ruby on Rails, PHP, AJAX and other cool new languages”.

New languages ? Ruby is a language, RoR is not, and if we consider the first public release date, Ruby, PHP AJAX (read, JavaScript + XML) and Java it self are ALL born in 1995.

Next, another good one “Simply put, developers are saying that Java slows them down”.

Hehey… with these new “auto everything, super smart” IDEs, there is no excuses like “that language slows me down”. That is the crucial point. So many people are confusing and mixing languages with platforms and / or frameworks (may be Sun is partial guilt to don't clearly put the language and platform apart, commercial interests ?).

I really don’t waste my time comparing languages performance, and that is the point where I really agree with Matz: “machines are not important, people are important”. So, the language you choose must be the one that gives you more fun. OK, there are some practical issues that must be considered, but that is the spirit.

You run a performance test, You have a point. The same program runs faster on one language then the other, but witch language will give you the best software ? It will be the one which your programming team feels better.

And what is really slowing us down ? I think, the platform is guilt, it is really a mess trying to configure ALL the “possibilities”, because we can do anything anywhere "Write once, run anywhere" remember ? We just have to “configure”, or in other words, tie those “compatible” pieces together.

There is a Java vs Ruby (Gregg Pollack and Jason Seifer) video that illustrates this situation, if you don't know, take a look. In fact, these videos are becoming a hype on RoR community.

Now the best: “CEOs of Twiki.net, and Sendori states that Java platform (J2EE in this case) is becoming more and more complicated … and RoR on a shopping cart for an e-commerce site...” is the heaven ? Dahaha. Just a simple matter of “convention over configuration” baby.

And it continues… “Another area of (Java) weakness is the development of mobile applications …and no wonder Google is creating its own version (Android)”

And what is this Android ? "Android as it is currently defined is a fork of the Java ME, it is similar to the Java ME, but it's a (open source), non-conformant implementation, In fact, it's not really Java".

The real problem here is the fact that JavaME is a proprietary copyrighted solution. This new open source platform is a mutch better aproach. Android supports Java (the language) now, but could support Ruby in a near future. And again, we are talking about platforms, not languages.

And the grand finale "developers and analysts agree that Java is alive and well for internally developed enterprise apps. On the back end, there is still a substantial amount of infrastructure available that makes Java a very strong contender, says Zephyr's Shah. (CEO of software testing provider Zephyr)". Haha, another CEO "de facto" statement…

Gonna have to really disagree, I'm experiencing J2EE slowing me down every major change or upgrade needed by the application. A recent practical example:. this new resource adaptor was needed by a recent implemented Java / J2EE application. We spent two weeks to the support team install and configure it, two weeks for "configurations" and tests with a sample application and just two days to change and test the application. Who is the guilt? Java language? I don't think so.

Let's try another formula ? May be COBOL vs Ruby !

On the blue corner we have: the first, the oooonly and all procedural oriented: COOOOOBOOOL.

On the red corner we have: the neeeew, the funniest and totally object oriented: RUUUUUUBYYYY.

Sorry. I feel it will never ends…

Saturday, December 22, 2007

Ruby Christmas and New Year best wishes

From: Me

To: You

Cc: All

We can find hope on unexpected places…

We just need to want to.

And here is my last code of the year: