Author Archive

Trac VS Crucible

Used track for 12 months, migrating to Crucible (plus the Atlasian suite).

Initial impression.

  • Lots of data & graphs == please management.
  • Slooooow & heavy, we had to upgrade RAM.
  • Awesome search facility for commit messages!
  • Spacious commit messages, I prefer a summarised version for quick scanning. Perhaps this is a legacy preference. Relating to this is the summarised list of commit messages making it easy to find merges.

Long term Impression (2012):

  • It is too slow for professional use.

Distributed Security Risk

If you distribute the IP among open-source projects, you also distribute the security risk. SR (security risk may be considered a foreign concept) is inherent in IP, by definition.

I experienced really slow internet connections all of a sudden through a wired connection to my Ubuntu desktop. It was weird as the wireless connections were all faster and the router was getting good signal. Anyway, it turned out (after much tweaking & a fresh install!) that it was something to do with DNS resolution!?

sudo gedit /etc/nsswitch.conf & change:

# hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts:          files dns

I reckon mdns is to blame…

At the end of the day, I wanted to upgrade to 10.10 anyway and it forced me to backup my files. A good spring clean & learning experience.

As an addendum to this post…

Since I made it, the network connection on the “fresh” install ground to a halt. It turns out that its the default network manager which is to blame (thus far). I’m not sure how it manages it, but it breaks networking in some fashion.

What you need to do is install “wicd” network manager in place of the default installed network-manager.

1
apt-get install wicd

Then remove the network manager using synaptic or the Ubuntu software centre(er).

Ubuntu window control locations

If you want to get the buttons back onto the right hand side on the windows use:

tim@laptop:~$ gconftool-2 --set /apps/metacity/general/button_layout --type string menu:minimize,maximize,close

This is for 10.10 which I just dual booted on the laptop.

Xdebug .htaccess settings

You’ll need to add these to get it working.

php_value xdebug.remote_host <your IP.0.0.1>
php_value xdebug.remote_enable 1
php_value xdebug.show_exception_trace 1

FizzBuzz Test

This morning someone on twitter (@brooklynDev) commented about how good the FizzBuzz test was to weed out bad programmers. I’ve been interviewing for a few jobs recently and by co-incidence so I wanted to give it a go.

In essence it is as follows:

"Write a program that prints the numbers from 1 to 100.
But for  multiples of three print “Fizz” instead of the number and for the  multiples of five print “Buzz”.
For numbers which are multiples of both  three and five print “FizzBuzz?”."

Pretty straight forward right? I thought so anyway… Here’s my solution. It took about 5 minu

$i = 1;
while($i <= 100) {  
$divThree = (($i % 3) > 0) ? false : true;
$divFive = (($i % 5) > 0) ? false : true;

if($divThree) echo 'Fizz';
if($divFive) echo 'Buzz';

if(!$divThree && !$divFive) echo $i;

echo '';

$i++;
}

I saw another solition which involved the use of a case statement with a “true” test condition which I also liked, but it is not something which immediately jumped to mind for me.

Retrospective coding

Its interesting that since my last post I’ve been made redundant from my position at The Sound Alliance. They cut back the development team to bare bones as the good work we did made maintenance a lot easier. Effectively we coded ourselves out of a job! I wont go into it here though.

Anyway, I’ve found another position at The Royal College of Physicians and have had a week and a half off. Well not really “off” but working on a freelance project for an old client. It involves implementing some workflow automation within their Intranet that I developed about over the last 4 years and haven’t touched for 2 years .

What I’m amazed by in this is how my code style and even logic evolves over time. Its made me realise that I learned a lot of good technique while at TSA. Its also highlighted some of the great design decisions and techniques I already posessed.

If you look at your old code and cant see room to improve, you’re missing something – or its genuinely good code!

We have lift off!

We released a new version of inthemix.com.au yesterday. My feeling is that it went really well. There were only very minor oversights which we had pre-determined solutions in place for. Ut was a real case of “Fail to prepare, prepare to fail”.

We had prepared.

Android

Well. I made my first attempt at development on Android tonight. Im excited by it as it leverages off the Java skills I got back at TAFE. Excellent Eclipse integration and the backup of the future monopoliser, Google…

The dynamic nature of PHP defines – you don’t need to declare all variables, inherently adding the notion that adding them initially was a pursuit to be avoided.

So why re-implement a feature people bothered to un-impliment?

$this->that;

VS ~

$this->getThat();
function getThat(){
    return $this->that;
}

At least make redundant set/get [tters] dynamic. Use of the magic __set() and __get() methods means the benefit of protecting access to your objects properties can be encapsulated into your base class easily enough.