04.30.07
Posted in Books, Ruby at 4:16 pm by Željko Filipin

I remember that I have heard at school something like this.
If you read a book and not write anything about it, it is like you have not read the book.
If you learn it at school, it must be true. Right?
I have just read Everyday Scripting with Ruby by Brian Marick. It is a good hands-on book written for people that have none or little scripting experience, but there is also useful information for people familiar with both scripting and Ruby. I am using Ruby for more than two years and I do not think that reading it was wasted time.
It starts with instructions how to install Ruby, followed with simple scripts that get more complicated. Methods, logical operators, objects, classes, modules, inheritance, regular expressions, blocks, test driven development, exceptions and other important concepts are introduced as task at hand requires.
Some chapters have exercises with solutions at the end of the book. I just love that way of learning. The new tool is introduced (whatever it is), then you are given a problem that you are supposed to solve with that tool. (It is how mathematics and physics, and of course programming, are learned.) The problem (for writer) is to find set of problems that are interesting and meaningful enough, simple at first, then more complicated, but not too complicated (so reader can solve them and have that great feeling of success), but also challenging enough. I find that Marick has done a excellent job, but quality of exercises degrades in the last few chapters (to complicated).
There are also several Ruby Facts chapters that introduce important things like arrays, regular expressions, hashes, argument lists and modules. Ruby Facts chapters are just great, and with exercises my favourite part of the book.
I was reading the book as I had time for about two weeks and of course that now I do not remember everything I wanted to write about it. I have a really bad memory. I wish I had written a sentence or two after I have finished reading for that day. Now I am smarter. I hope I will remember this when I start reading the next book.
In short, the first three parts (The Basics, Growing a Script, Working in a World Full of People) were great but the fourth part (The Accomplished Scripter) was not so interesting to me. Also, examples were great, but at the end got to complicated for my taste (I think I got lost while doing exercises for chapter 11 or 12).
Permalink
04.20.07
Posted in .NET at 4:16 pm by Željko Filipin
Recently I started to play with ASP.NET. I found asp.net, The Official Microsoft ASP.NET 2.0 Site. The first thing you have to do is to install required software.
In my opinion, they made the installation to complicated for total beginner. There are too many choices. I wish they had something like Instant Rails. I lost some time figuring it out, so I decided to share my experience. Maybe it will help somebody. If you have comments, improvements, or if I did something wrong, please leave a comment.
At asp.net home page there is link GET ASP.NET. It leads to Essential Downloads page. There they say you need Microsoft .NET Framework Version 2.0 (framework) and Visual Web Developer 2005 Express Edition (IDE). Language version was easy to choose (English), but do I need Framework or SDK version of framework? That was also easily answered when I saw
If you are new to web development, select the Framework download.
The truth is that you do not have to download framework. It will automatically be downloaded when you download IDE. I selected English version of IDE.
Download page opens with four easy steps.
The first step was to check if my computer meets the System Requirements. It did. That was easy enough. Also, uninstall any previous versions of SQL Server 2005, IDE and framework. I did not have any installed.
The second step is to download IDE. But, there is just to many options. Six. I just want to download an IDE for language I do not know nothing about, and they make me choose. I just knew that my developer uses ASP.NET and C#. And at that page there are Visual Web Developer and Visual C# IDE-s. Later I found out that I do not need Visual C#. (But after I downloaded and installed it. Do not make the same mistake.)
After download (Visual Web Developer is what you need), execute downloaded file. Of course, you have to be logged in as administrator. At the third screen of installation wizard there is option to also download and install Microsoft MSDN 2005 Express Edition and Microsoft SQL Server 2005 Express Edition x86. You need only SQL Server. At the next screen I noticed that Microsoft .NET Framework 2.0 will also be installed.
The third step is to download updates and additional components. You can install additional components later if you want to, no need to do it now. You do not have to download updates if you perform Microsoft Update after installation. That is what I did. There was two updates for .NET Framework and one for Visual Studio. I just wonder why they just do not offer the newest version of IDE and .NET framework, but instead you have to download an old version and than update it.
The fourth step is registration. You have 30 days, so there is no rush. But beware (from FAQ):
Without a registration key, downloaded Editions will no longer work after 30 days.
So, all you have to do is to download Visual Web Developer, make sure that SQL Server is also downloaded (while installing IDE) and perform Microsoft Update after installation.
Permalink
04.13.07
Posted in Ruby at 4:44 pm by Željko Filipin
I needed to convert an integer from base 10 to base 16. I found the solution at ruby-talk.
Example: convert 15 from base 10 to base 16.
15.to_s(16)
=> “f”
Permalink
04.12.07
Posted in Books, Ruby at 4:30 pm by Željko Filipin

I was reviewer for Everyday Scripting with Ruby For Teams, Testers, and You by Brian Marick. Over two months ago I received an e-mail from Pragmatic Programmers saying that if I send them my mailing address they would send me a free copy. I replied with my mailing address, but the book did not arrive.
Two weeks ago I sent them a reminder. No reply.
There is a thread at wtr-general about the book and I asked if anybody had a similar experience. I thought that maybe there is a problem because I am from Europe. I got one reply. George from UK received his book two months ago.
Today I got e-mail from Pragmatic Programmers. They are looking into the problem, and they have sent me a PDF copy in the meantime.
There is even text “Prepared exclusively for Zeljko Filipin” at the bottom of each page. I am sure that it is there not only to make feel exclusive, but they got me smiling whenever I notice it.
Chapters that I reviewed were great and I look forward to reading the book.
Permalink
04.05.07
Posted in Bugs at 5:02 pm by Željko Filipin
Don’t you just love bugs?

Steps to reproduce:
- open Internet Explorer 7
- go to any page (required only if blank page opens when IE7 starts)
- press Ctrl+ (increases size of text and images)
- open another tab
- go back to first tab
- text is scrambled
Not reproducible every time, try it several times, and it should reproduce.
Permalink