2011
01.22

… at least for me..

This is a list of the software I use daily to do my work the best way possible, I’m sure that some of you agree, and others do not.. this list is due to change eventually, but at this moment for me this is the best software help me do my work..

1 – Filezilla Client:

Filezilla

The best FTP client that I ever used, and the best of all is that it is completely free.

2 – Adobe Photoshop:

Adobe Photoshop Logo

How can one work on the area of web development and not use Photoshop?! This one is pretty obvious.

3 – Dreamweaver CS4:

Adobe Dreamweaver

I’m kind of letting go this one, I’m starting to use Netbeans for development, the HTML auto complete isn’t as good as Dreamweaver, but it completely kicks ass in PHP. ( Actually Dreamweaver CS5 is a little better on the PHP auto complete… but no quite there.. )

4 – Toad for MySQL:

Toad for MySQL

This is actually a tool that I started using for Oracle ( Toad for Oracle is the best ), and when I found out that they had a free version for MySQL, I downloaded it, and I haven’t been using anything else to do most of the tasks since that day.

6 – DBTools Manager:

Another manager for MySQL, I also really like this one, it’s pretty simple and light ( Toad is a little heavy ), and for remote access to databases I only use this one..

7 – Ultra Edit:

Ultra Edit

Perfect editor for the quick edit, I use it a lot, specially when I want to edit a file remotely, it integrates perfectly with Filezilla.. and doesn’t screw up the encoding of the pages.

8 – MySQL Workbench:

MySQL Workbench

I’ve been using this one for about 6 months ( or more ), it crashes like crazy, and has some annoying bugs, for example in one of the databases I renamed one of the columns of a table, and now every time I sync the model with the database, he drops that field, and recreates it.. can’t figure out why.. he’s just stubborn and buggy.. but it spares a lot of work.. which is always a good thing.

9 – Microsoft Outlook:

Microsoft Office Outlook 2007

How are you going to communicate with your clients if you don’t have an email client? Mine actually is quite complex right now, I have 6 email account’s, and they are all going to different mailboxes in Outlook, but still it’s a mess..

10 – Collabtive:

Collabtive

Project Management software, it’s a good and free web based project management software, the only problem is the updates which aren’t quite as frequent as I would like… and they don’t have a public writable repository, and that doesn’t help.

11 – Billy:

Billy - Sheep Friends

Yes, that’s the logo of Billy…

For me this is the most important one, a lightweight mp3 player, I have in the playlist 4376 files and it only occupies 2,8MB of memory. And with all these things open, memory is precious.. and as you can see even the logo is lightweight..

12 – Tortoise Hg, and Tortoise SVN:

Tortoise Hg

How can someone work without source control? I’ve got both of them installed, because I need to checkout the code from Collabtive..

13 – No-ip.com:

No-IP.com

Since I have a dynamic IP at home, and I need to have the sites available for the clients to see, I bought a domain at No-IP, and use their tool to let everyone access the sites I’m developing, this way, if I’m on the phone with a client, and can make a small change to the code, push the code to the repository, and the client only has do to a refresh on his browser..

14 – Wamp Server:

Wamp Server

How could I develop something if I don’t have a web server? My choice went to Wamp Server, I used to work with Easy PHP, but after I tried Wamp Server, I’ve never looked back.

15 – Browsers:

Browsers

And the most important software of the entire list, Firefox, Chrome, IE, Safari and Opera, I can’t say that I test everything single thing on them… I usually just have a quick look on Safari and Opera to see if there are no big error’s on the layout..

So there they are, the software that I use daily for my Web Development work, I couldn’t live without them..

2011
01.18

At my new job, the network architecture is something like this:

Old Network Architecture

Developer 1 as XAMPP Server installed ( Windows Vista ), and Developer 2 has MAMP Server installed ( Macbook Pro?! Or something like that.. )

All developers, work on their computer, and keep all the projects files on their computer only, no backups are made… no source control is used, so if for example their disks fail, all their work is going to be lost, mine isn’t because I’m backing up everything to my 2,5″ external hard disk..

The external hard disk, only has some files for the various projects, organized in a strange way, I can’t seem to figure why it’s organized like that, some things make sense.. but others, no sense at all… I had to correct a bug in a flash site, and it took me about 5 minutes to correct the bug, and 5 hours to publish the flash, libraries were missing, fonts where missing.. well everything was missing..

The remote webserver is our development server ( so to speak )…every time we have to show a almost finished site to a customer, we have to upload everything to a remote webserver, so the client can see it..

Last month I’ve been working on a new site for one of our costumers, the time comes to demo the site and the back office, so I upload everything to our testing server.. the client see’s it, and asks for a lot of modifications ( this is a story for another post ), most of these changes mess with the database, so I have to change the database two times, one on my local machine, to test, and then I’ve to upload everything to the server again.. which can cause serious bugs, because if I forget to update a field on one table, something is going to go very wrong..

So I proposed the following architecture ( if I can call it architecture ):

New network architecture

What we have here is pretty simple, the development server, is basically, a windows machine with XAMPP Server installed, we really should go for Ubuntu Server or something like that, but nobody ( including me ) knows a lot about Unix, so configuring one was going to take a lot of time…

It’s going to be accessible from the outside of the network, that means that I will point a domain to that machine, and every client can see their site using sub domains ( client1, client2, etc ).

This server is also going to be the source control server, we are discussing options right now, but we are thinking about Mercurial ( I tested it at home, and in 30 minutes, I was committing, pushing, pulling with no problems whatsoever.. )… and we are going to use an DCVS ( Distributed Concurrent Versions System ) no doubt about that..

The database on the server is going to be shared, this means that, when I’m developing at my local machine, the database on the server is the database I’m using.. so any change I make to the database will automatically be accessible for the client, for the code, I just have to do a push to the main repository, and the client can see everything…

The external disk is there for the backups of course… this way everything is saved somewhere.. ( I just need to find out how to restore MySQL backups … )

There are some kinks that need to be sorted out, for example the repositories on the development server, I’m thinking of using two of them..

One is the main repository, and the other is the WWW repository, to synchronize them, when I change the code is pretty easy ( at least in Mercurial ), I just need to add a hook to the push action, and when the push finishes, I just call an Update on the WWW repository..

The problem is synchronizing in the other direction, I’m talking about images loaded by the client and etc, with this method if I upload an image on the server, I’m not going to have that image on my local development machine.. some people say, that files loaded dynamically shouldn’t be on source control… and I tend to agree with them.. but solving this problem in PHP is going to take a while, I’ve got to find a simple way to access a UNC share from PHP, while still using the move_uploaded_file function ( etc ) with no problems… I probably need a class to handle all of this..

For me, this seems the best architecture to use on the office, at least for a small team of programmers.. I could change a few things, the perfect solution would be to use a webserver ( only Apache and PHP ), a database server ( MySQL ), and a Source Control Server.. one machine for every job.. that would be perfect.. but we really don’t need that yet.. down the road, maybe.. but for now this is going to be just fine… and it’s going to be a big leap forward on the organizational side of things..

2011
01.11

Ok.. let’s try something completely different.. I’m going to start writing a few posts in english.. ( or at least try )..

For those who don’t know, I just switched jobs, I’m currently working on a small agency in the middle of Lisbon.. It’s going great so far.. I just made one month..

On the second week of work, I came across this piece of code from our custom CMS:

public function updateCategory( $item )
{
    $new_cat_id;
    $select_ids_q = " SELECT id FROM categories ";
    $ids2compare = Array();
    $select_ids = BdConn::runSQL( $select_ids_q );

    while($row = mysql_fetch_array($select_ids)) {
        $ids2compare[] = $row['id'];
    }
    $new_cat_id = self::genRandId($ids2compare);
    //do insert of category
}

public function genRandId($numToCompareArr) {
    $new_id = rand();
    for($i = 0; $i < count($numToCompareArr); $i++) {
        if($new_id == $numToCompareArr[$i])
        genRandId($numToCompareArr);
    }
    return $new_id;
}

This is good code.. don’t you think? I almost had an heart attack on the spot when I saw this.. at that moment I was debugging the code, trying to find out what the code did, everything is in Ajax, with redirects after the Ajax call is completed.. ( which in my opinion is not a good thing for a back office )…

It wasn’t a fun day, the next day I decided to use my own back office to do the site.. then everything started to run smoothly..