Things and Stuff Driven Development

It is I, DA GregA lot of us heard acronyms TDD, Test Driven Development and BDD, Behaviour Driven Development. Those two are development techniques where application code is introduced with leading expectation. In both cases this leader, so called driver, will be a test.

In ideal world Developers would know exactly how to build a test from “never changing” business expectations and will develop 100% bug free and working code.

Everyone knows how far we are from ideal world and because we are a human beings the main driver of development is different then the desired one.

My few years of development experience thought me that there is a wide variety of technically non related drivers in development. Here they come 🙂

Continue reading “Things and Stuff Driven Development”

Bad interFACE design based on a TOILET example

So I’m reading this book at the moment “Design of Everyday Things” by Donald Norman. It’s good read for all the people that design/create things/software that would be used by others. I realized that I’m paying more attention to how things are design. If they are user friendly etc.

Client that I work for at the moment has one disable toilet with shower. I use this toilet to change and shower when I arrive on my bike to work. There is couple of things in this toilet that made me generally think about the design and find analogy in software, AND more exactly in Web Interfaces. I have stumble upon those issues all the time, on BIG GUN web sites (like banking interfaces) and on small private web sites.

Continue reading “Bad interFACE design based on a TOILET example”

ASP.NET and Web.config in DA House

It is this time again when I have to switch platform I work at. This time I jumped into .NET world. It is not an unfamiliar ground, I was doing some work with .NET before and I like it (not all of it though).

dotnetOne of the interesting things we came across this week was a config file for web   application, so called Web.config. So we desired to switch some settings based on environment where application was deployed. Simplest thing we could think of was referring in a config section to external file with settings. Something like this:

<web.model configSource=”file.with.config” />

Deployment with NAnt was just deploying proper file to server and all was automated.

Continue reading “ASP.NET and Web.config in DA House”

A piece of Ruby on a Windows or a Linux plate?

ruby Some time ago I overheard a conversation about performance of Ruby applications on Windows or more precisely it’s lack. I don’t usually believe this kind of conversation until I see something with my own eyes. I saw it today.

I am a Linux enthusiast. I use Linux on my desktop and usually deploy applications on Linux servers. I know that Linux is fast and reliable. I don’t need proof for that. But I thought that Ruby will perform somehow similar on both platforms. Wrong.

I wrote a little application that is pooling a lot of XML content (RSS feeds) from web sites, parses it and extracts a data. It also updates MySQL database with new content.

Running application on Windows took me 24 minutes (something about 2000 web sites). Dual core machine with empty MySQL database and without any intense processes in a background (excluding Windows itself hehe 🙂 .

Then I run it on Linux with same configuration, same network connection, empty database and no intense processes in a background. It took 7 minutes. I know that maybe server that the sites were requested from could respond slower but COME ON. How much slower it could be.

I never trusted Windows when it came to a production environment. Now I don’t trust it even more. Where is the 17 minutes that Linux didn’t need it? Is it MySQL performance on Linux or I/O operations or maybe networking?

I’m looking forward for Ubuntu Hardy to install it as I did some damage to my old installation and I am to lazy to fix it. Developing on Linux was always much faster and more flexible for me. Plus I do get my favourite tool, powerful command line 🙂

Greg

Do NOT try this at home kids

greg I’ve done a horrible thing yesterday. It ended up with coming back to Windowz again. But let’s start from beginning 🙂

When I was writing the post I looked at some news in Linux community and came across KDE 4. It’s got an eye candy look. I have a weak spot for my desktops. I decided I got to have it and give it a test drive.

Quick Google and search on forums showed me that I can get it with latest development release of Kubuntu. So, all I need to do is two steps. Install Kubuntu desktop on my Ubuntu (sudo apt-get install kubuntu-desktop) and then upgrade to latest version (sudo update-manager -d). BIG MISTAKE. I mean all updates and upgrades went fine.

It took about 30 to 45 minutes to finish (in a mean time I could play and talk with my 4 months old daughter about my desktop change decision, she is pretty good listener, but it’s hard to get any sort of opinion from her in when it’s about IT subjects. I’ll give her one more month for that :).

So, after 45 minutes computer prompted me for restart. When I did so and it arrived at boot menu screen what a surprise. SEVEN different options for booting Ubuntu, with three different kernels. Oh well, I choose default, the one that was preselected. What a surprise when it took about 5 minutes to boot (normally about 30 seconds). When it finally manage it only screen resolution I could get in either Gnome or KDE was 800X600. RIDICOULOUS.

Poking around for 30 minutes with Oliwia (my daughter) hanging on the other side of my arm with face expression telling me “See old man, BIG MISTAKE” I realised it was a BIG MISTAKE.

Back to Windowz days for some time. I don’t have the patient to fix this sort of problems anymore. Will wait for stable release of Ubuntu Hardy Heron and then put a clean install.

On the other hand I found a nice piece of software for getting an access to ext2/ext3 partitions under XP. It is called Linux Reader.

Summary

Don’t do system upgrade on Beta and Development version of software.

I hope uncle Greg teaches you kids a lesson. It’s better to learn at someone else’s mistakes.

Gregster

Addicted to Ruby

GiguToday first time in my life I decided to write small Ruby script instead of using COPY, PASTE. Does it mean that I’m a geek now?

I needed to get some data from a web site. Because data was nicely formatted in table I could just mark it, copy and then paste in spreadsheet tool. What I did instead was a little script that loaded the page, parsed table rows, extracted the data and saved it to a csv file. There is a nice library for HTML parsing called Hpricot. If anyone is doing some HTML, XHTML parsig in Ruby I do strongly recommend. Very simple parsing based on document tree.

Short example, to get all link elements from this blog I would do something like that:

document = open(‘http://blog.gigoo.org&#8217;) { |opened_uri| Hpricot(opened_uri) }

link_elements = document.search(“a”)

Voila 🙂

So, why addicted

I think I became addicted. Got the Ruby bug on me now. I like it more and more. Still trying to keep away from Rails just play with language and it’s features. I love big number of useful tools and libraries and the fact that community is working hard to make great stuff for it.

What I don’t like is the fact that everything is design and created with Rails on mind. I hope that Ruby is not going to be “the Rails language” and that people are going to remember that it’s not only about WEB (well, almost all the time is).

Cheerios and other cereals, Gregster

Looks like Studio but it's not

I got standard Ubuntu Gutsy installation on my laptop. Some time ago I tried Ubuntu Studio and I always remembered its look. It was probably one of the best looks of Linux desktop I ever seen. It turns out that guys from Studio made they distributions look pre-packaged and you can use apt to install it. It is just one simple command

sudo apt-get install ubuntustudio-look

And results are:

First screenshot

Second screenshot

Fancy a little bit of Studio for yourself?

Cheers, Gregii

Ubuntu Gutsy and sound problems

Linux RockI got dual boot at my laptop. Most of the time I use Ubuntu (Gutsy Gibbon at the moment). I do occasionally switch to Windows XP to use my digital camera software that is only available for Microsoft’s system. Few weeks ago problems with sound started. When I tried to use Firefox with a Flash it completely nuked the sound in Ubuntu. Not just for a moment but until next restart.

I know at least two people with same problem. Laptop I got is Dell Latitude D620. Have I fixed a problem? Sure I did, Google helped as usual 🙂

I got a deb package from Paul Betts, looks like he is fixing stuff 🙂 If you can’t find it there here is a copy. All you have to do is download it and install. All that is required is a Firefox restart.

I thought I will share this knowledge as solution is fast and simple 🙂

Cheers, Gregster