Archive for the ‘General’ Category

So, I just downloaded the new Opera, and ran a JavaScript speed check, and was amazed how their new engines compare to the other browsers around.  It also supports Windows 7 taskbar highlights properly :)

The test I ran was on http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html and here are the results

Opera 10.50
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 388.6ms +/- 2.3%
——————————————–

Chrome 4.0.249
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 556.2ms +/- 3.1%
——————————————–

Firefox 3.5.8
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 1155.4ms +/- 1.6%
——————————————–

Internet Explorer 8
============================================
RESULTS (means and 95% confidence intervals)
——————————————–
Total: 5145.4ms +/- 0.6%
——————————————–

  • Share/Bookmark

Ever since the web moved into the 2.0 generation, websites are increasingly using ajax to build up content, and navigate around without reloading the entire page. There is one major problem with this, and that is the browser. Until now, browsers to not trigger events for when the user is flipping between pages using the navigation buttons. This has been a problem with flash sites for a much longer period of time, with the user clicking back in the browser expecting to see the previous page shown in flash, but instead, they are taken to the last site they were on.

When improving the functionality of our Automated Chat Software, Intellichat, we had many requests from customers asking for the chat window to not launch when the user clicked back in their browser. After a lot of research into the problem, and how to detect it, I found the solution to be based around iFrames (as much as I hate them). When the user clicks back on their browser, they will initially navigate back through the iframes on the page before main page can go back.

This solution works great in Firefox and IE, however Safari needs an alternative solution. This is based around location hash tags (I find this solution quite messy, and easy to spot from the users point of view). When the page first loads, you can set the window.location.hash to anything you want, and then simply check the window.location.hash variable every few milliseconds to see if it has changed. Once it changes back to an empty value, you can see the user clicked back.

The Solution
I have made a very reusable javascript class, that can be simply dropped into your web page, and when the user clicks back, it will call a function. The default function on this call is a javascript alert “Back Button Clicked”.

To replace this functionality, you simply need to override the OnBack function. This can be done by using the code below.

<script type="text/javascript">
bajb_backdetect.OnBack = function()
{
alert('You clicked it!');
}
</script>

This will now replace the “Back Button Clicked” alert with a “You clicked it!’” alert.

You can see the code in action at http://www.brookebryan.com/code/backbutton/
or you can download the source from: http://www.brookebryan.com/code/backbutton/BackDetect.zip

  • Share/Bookmark

About 20 minutes ago I got my invite to google wave. I now have my account live (brooke@wavesandbox.com) as well as my secondary account (brooke-test@wavesandbox.com), so I can start testing out the wave. I haven’t had any time to get into it and play, but here is a screenshot of an empty preview account :)

Google Wave Home Preview

Update:
After about 20 minutes, everyone started using wave and this is what it looks like

Wave After 20 Minutes

Update 2:
When I tried to reply to a wave that was created after I first loaded the page.

Wave Requires Refresh
  • Share/Bookmark

It has now reached the stage where I am logging into 20 – 40 different servers a day, which itself is quite time consuming when you know the server logins stored in your head.  However, all our servers have different access passwords and finding each server password takes a little too long (there is no way I could remember all our server logins).

There is a great feature on UNIX  machines which will allow you to simply ssh into a server without the password as long as you have configured each machine.

The setup of this is pretty quick, there are only 3 main things you need to remember.

1. Generate the Key on the client box
2. Copy the Key into your clipboard from the client box
3. Enter the Key into  the server box from your clipboard

Stage 1: Generating the Key

ssh-keygen -t dsa

By running the above command, you will generate your client key. You will be faced with a few questions, you should just be able to press enter with no answer on each question.

Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Stage 2: Access the Key

You will need to access the key that was just generated to place on your server so you can quickly access it.   First things first, you need to get the key onto the screen or into your email.  I would recommend using the screen output to avoid any formatting errors by your mail client.

Outputting onto the screen:

cat ~/.ssh/id_dsa.pub

Sending the output to your email:

cat ~/.ssh/id_dsa.pub | mail email@domain.com

Stage 3: Storing the Key on the Server
Now you have the key, you just need to add it onto the server you are going to be SSH’ing into.

Open up the file ‘~/.ssh/authorized_keys’ using your preferred editor. I usually use nano, so:

nano ~/.ssh/authorized_keys

Then copy the key into the end of the file. You need to ensure that the key stays on one line and you have one key per line.

Once you have saved the authorized_keys file, you should be able to hop back onto the client box and just type

ssh root@hostname

and you will be logged straight into shell on the ‘hostname’ box.

And thats all you need to do :)

This has saved me soo much time on a day to day basis and probably given me an extra 30 mins > 1 hour a day to get some real work done.

  • Share/Bookmark

So, its only a few hours away from the timestamp 1234567890 and we just went past 1234543210. As always, sad enough to take a photo (well, Jordan (www.oxcreative.com) took the photo) on a monitor in our office which is displaying www.coolepochcountdown.com. Its only 6 or so hours till all hell breaks out and the time starts going backwards (or we just see a nice timestamp come and go).

123453210

  • Share/Bookmark

A few weeks back Jordan (designer @ Just Develop It) brought in his rubiks cube into the office and we were all amazed that he could complete the cube. The fact he could do it in under 5 minutes just added to the amazement. Between writing code and sleeping, Rich and myself found ourselves trying to solve the cube wondering what logic we could apply to come to a solution. After about a week not being able to complete more than the first 2 layers I cracked and looked around youtube.com for a way to complete the cube.

Much to my suprise, there was a logical way to solve the cube based on a few algorithms. Easy when you know how :) So, the youtube video I found was by pogobat and made the cube easy to understand. You can see the video here: http://uk.youtube.com/watch?v=HsQIoPyfQzM. The algorithms for the cube are as follows:

  1. Fi U Li Ui
  2. Ri Di R D
  3. U R Ui Ri Ui Fi U F
  4. Ui Li U L U F Ui Fi
  5. F R U Ri Ui Fi
  6. R U Ri U R U U Ri
  7. U R Ui Li U Ri Ui L
  8. Ri Di R D

Ok, the letters above dont mean very much unless you can watched the video. You always need to hold the cube in the same position for any of this to work :)

F = The face closest to you (Front)
U = The face on the top (Up)
L = The face in your left hand (Left)
R = The face in your right hand (Right)
D = The face on the bottom of the cube (Down)

There is also i. This stands for ‘inverted’ or ‘counter clockwise’

If you see Ri, you should turn the right face counter clockwise. Should you see R you should turn the right face clockwise. Be sure to only move that one face and not rotate the cube, else it will all end in disaster :)

Once I got to grips with the algorithms, everything slotted into place and I could complete the cube serveral times in one night. Its a very impressive skill to learn.

Get yourself onto youtube.com and watch the video linked above and learn the cube for yourself :)

  • Share/Bookmark

I have finally started working on a new product for JDI a few weeks back, its called Visitors 2 You.   This product is based around Search Engine Optimisation, allowing customers to enter in their domain, and a few search criteria they expect / want to appear under, and we will start recording historical data of search positions, link popularity and a few other bits.  I have been looking to get a product like this for the past few months to watch our own websites grow, see our improvements in Search Engine Rankings and make sure we are always improving our sites for both customers and search engines.

Visitors 2 You aims to help you improve your natural search positions through a range of methods, from code improvement, correct meta tags, improved content and much more.  We aim to have this product live within the next week or so, so make sure you signup to the newsletter and be the first to know when you can signup.

We are always looking for new features to add into the product to make sure its the only SEO tool you need, so if you have any ideas, feel free to email them to me : brooke [at] justdevelop.it

Visitors 2 You can be accessed at: www.visitors2you.com

  • Share/Bookmark

Last night I thought it would be a good idea to check out OpenSuse, so I downloaded the DVD and burned the only DVD I had with the image.  As soon as I got home, my vulnerable laptop was begging to keep windows at its heart, but in the end, after putting the OpenSuse DVD into the drive, it took complete control of the laptop and started the installation process.

The OpenSuse installation was very easy and did almost everything for me, apart from filling out my name etc.  It shrank my windows partition, and created a load more to use itself.  When I booted my laptop up in the morning, I got straight into my new operating system and started playing.  When I realised my wireless card was not installed by default, I thought I should switch over to windows and get any drivers I needed.  I restarted my machine and got the boot loader, and selected Vista.  Much to my horror, I was thrown straight back into the OpenSuse installation.

After hunting around online for solutions, I finally found the app bcdedit.exe stored in the system32 directory on my windows install (I was running repair mode off the Vista CD).  Running this, I could see all of my boot options and the paths they were using.  I noticed that the path for windows was still “\grldr.mbr” instead of the windows default “\windows\system32\winload.exe”.

Using the following command in command prompt, I managed to restore my Windows Boot Sequence.

bcdedit /set {default} path “\windows\system32\Winload.exe”

{default} should be replaced with the Guid of the loader you need, however {default} should work for most windows installs.

  • Share/Bookmark

The tag clouds below were made for me by Goose a friend who I met in the early years of business when I was still living in Torquay.

The image was made in Illustrator and content from with a script, the cloud has been automated from site content > graphic. Looks pretty cool I think, much better than anything that can be done in CSS :)

BAJB Tag Cloud

Just Develop It Tag Cloud

  • Share/Bookmark

From a very young age, everyone has an imagination.  Seeing a spoon of food infront of you, full of the most horrible thing in the world (probably mash potato) you really dont want, and refusing to eat it. Suddenly, your mum, or dad makes the noise of a train and your mouth is a tunnel.  You eat whatever was on the spoon and forgot that you didn’t want it.  Without your imagination, you would just have looked at your parents in horror of what they were trying to do to you, and not given up.  Our imagination is the thing that drives us to conjure up wild ideas.

Back at school, most people have a vision of what they want to do when they grow up.  Some people grow up doing exactly what they wanted to do when they were in school, some people change their mind when they have new experiences, from a new lesson at school, or a hobby you may have.  Being able to stick to your vision is the one thing you need to make sure you achieve your goal.

Every time I have a new project, I have a vision of where that project is going to be in 5 years time.  Being able to see that project years down the line gives you your goal, where you want that project to end up.  As with any goal, you need to know how to get there, you need to make a map to its success, in your head, on paper, or on a whiteboard, it really doesnt matter as long as you have a plan.  Without your vision, you cannot begin to think about the things involved.  If you take facebook as an example, Mark Zuckerberg saw facebook as a website that would revolutionise social networking, he didn’t start the facebook project thinking, its a great tool for my friends to use, he knew it would be big, it was just a matter of time and commitment.  Looking at facebook today, you can see Mark’s vision became a reality, and he will always be extending the horizon of his vision, afterall, as soon as you reach your goal, you always want more.  Don’t you?

If you want to succeed, make sure you keep your vision on the horizon and don’t let anything stand in your way or sidetrack you.  The last thing you want is for your vision to be clouded and years down the line you never achieved what you setout to get, and you are back to square one.  Make your plan, work all the hours you have to make sure it works.  The hard work will pay off, and you will be greatful you stuck to your plan, your vision.

Did you have a vision 5 years ago, looking ahead to where you wanted to be now.  Did you make it?  did you change your plan?

Having a vision will only get you so far, you need to work hard at it to achieve your goals and to make your vision reality.

  • Share/Bookmark