Close

Home » Web Development » Tools & Tips

‘Tools & Tips’ Category

April 15th, 2010

Web Development Tools of the Trade

When developing sites, coding in general or even support in a community there are quite a few tools that make the job a lot easier on a person. This is a list of tools that I use along with many other developers out there and are invaluable…

Note: Some of these tools can be resource intensive.
I run most of these tools, even all at once, but it is on a 4 Core workstation with 6 Gigs of Ram.
  • Local Host
    You simply can’t develop efficiently without one and you don’t want to be updating some clients site with out testing your code first. That’s where a local host comes in and is extremely faster than using a test site on the web somewhere because there is no uploading or transferring of files.
    • I prefer XAMPP
    • MAMPP for Mac
    • There are many other Local Host options out there, try a few and see what works best for you.
  • Browsers FireFox, IE6 – 8, Safari, Opera, Chrome
    • FireFox, If you don’t all ready have it I should reach out and slap you :)
    • IE Tester
    • Opera
    • Safari
    • Chrome
    • Generally speaking, if you develop in FireFox the others will usually be fine with the exception of less than IE8. You still have to browser check to be sure and do your minor tweaks!
      This is assuming your code validates.
  • Browser tools
  • Integrated Development Environment (IDE)
    • NetBeans is currently my IDE of choice.
    • Aptana Aptana Studio 1.5 had a PHP plugin. I will dig that up as well..
    • Eclipse Is just about the root of about 75% of all IDE’s out there as most of them are built off of it..
  • Quick Text Editor
    • NotePad++ My all time favorite quick code editor. Lite Weight and Free!
    • WinMerge is actually a diff tool but also has code highlighting. Used for finding differences between files and directories.
  • Graphics Editor
    • Photoshop You will need to spend some coin on this but nothing compares.
    • Gimp The GNU Image Manipulation Program.
    • Paint.NET – Free Software for Digital Photo Editing
  • Video Recorder for Video Tuts
    • JingPro My favorite and very reasonable price and the only one I could find with true quality..
  • GIT
    • Repo’s
      • Assembla I have a paid package for the private use feature for customer projects.
      • GitHub
  • SVN
    • Repo’s
  • Time Recording for keeping record of times on projects.
    I currently use HourGuard from NCH Software, it seems reliable and has a reasonable price tag (Free) and exports times to their invoicing software. I have tried many others, some that don’t even keep correct time and some that do but have less features or some other issue.
  • Invoicing Same here, I currently use Express Invoice from NCH Software, it seems reliable and has a reasonable price tag (Free – Pro version)
  • Project Management
    • Assembla, I can’t find any other site with more relevant tools for web development projects.
      I give Assembla

There are a ton of web based tools for everything from photo manipulation to code editing to invoicing. I don’t use them for one simple reason, you need web access to work with them. Obviously you need web access for this line of business but having the tools on your machine will always be faster and if you have internet down time, you can still work..

On the same note, there are thousands of tools out there for web development, this I know. This is simply the list of the tools I use and the tools that I know do the job.

With that , have fun and happy coding :)

April 10th, 2010

phpBB – Git – Windows Vista setup

First thing, this is on Windows Vista only. I have not tested on others but have been told it works on XP also.
WARNING: I will not be responsible for anything happening or going wrong with your PC because of these instructions.

Using these instructions you will be able to set up a local working copy of phpBB’s development repositories.
You will also have some new commands for command line and Git installed on your Vista PC.

If you don’t have a localhost setup, there is no point in going any further as this is for development only…
Here is the link for setting up localhost on Windows Vista Vista Local Host Setup, Tutorial on StarTrekGuide

1. The first thing you do is set a restore point in your Windows System so you can clock it back if you have to.

2. You will need to download some packages. These must be installed in the order I have listed.
Download the latest of both.

3. Installing msysgit Install this first!
The important settings on the install are as follows

For the image above,
Git-Cheetah no clue, it’s a new feature, the selection that I have there installs Git Bash, GUI, and cheetah
They are not needed for our setup because we will use a better solution tortoisegit, but they are optional and may have uses.
You may not want those extra options in the context menu to save room. As you see a few images down it can get quite long and as I said they are not needed.

The image above is an important one.
I suggest you select the one I have selected with the warning. Those couple Windows commands that you didn’t even know were there will get replaced with commands we need.
Like generating SSH Keys and using Git right from command line and you will need this!

Putty didn’t want to work for the keys needed and I got sick of fighting, this is the best solution.

Also msysgit Git Bash connects a lot slower to the server compared to good old Command Line at least for me it does…

For this image above, that setting should be fine…

4. Installing tortoisegit

The above image is very important.
That is the setting you want.
The rest of the install is obvious.

After the install you should have some tools that look like this in your right context menu.
Well my tools show all because it was over a local git repo, you will only see a couple options until you have a clone of a Git Repository

5. Setting up a copy of the phpBB git repo.

  • Setup an account on GitHub
    You will need an SSH key pair to work with this repository.
    Since we added the Unix tools to our command line this is easy.
  • Getting ready to create Keys
    Go to your C: drive or what ever drive your Windows is installed in.
    For me it would be C:\Then go to C:\users\ and locate your personal folder, eg. C:\users\jeff
    Hover over that folder press Ctrl + Shift keys and right click all at the same time.
    This will force an Open command line here in the context menu.

    In this command window type

    mkdir .ssh

    Then Enter and close the command line.
    You can only do this via command because windows will not allow you to create a folder named .ssh with the UI

  • Creating the Keys
    Now go into your user folder, find the .ssh folder you just created and again over this folder…
    Hover over that folder press Ctrl + Shift keys and right click all at the same time.
    This will force an Open command line here in the context menu.
    Now we are going to make the Keys, you have 2 options rsa and dsa but I am going to suggest using dsa to reserve rsa for elsewhere like assembla.In this command line window you should be at a prompt similar to C:\Users\jeff\.ssh
    At this prompt type

    ssh-keygen -t dsa

    then hit enter
    You should end up with

    <br />Generating public/private dsa key pair.<br />Enter file in which to save the key (/c/Users/jeff/.ssh/id_dsa):

    type

    <br />id_dsa

    Then hit enter which will return

    <br />Enter passphrase (empty for no passphrase):

    Enter a passphrase which will return Enter same passphrase again: enter it and hit enter.

    Now close that command window.

  • Finish account setup
    Go to git hub in your account under account settings click the SSH Public Keys
    Open your .ssh folder and open the id_dsa.pub with notepad or another text editor like NotePad++Copy the entire content of that file and use the Add a Key on GitHub and paste it in for your public key.
  • Creating a phpBB Fork
    Now if you plan on submitting patches, etc… to phpBB you will want a fork of phpBB. (It’s like your own phpBB branch)
    Simply go to the phpBB repo http://github.com/phpbb/phpbb3 for the phpBB and http://github.com/phpbb/phpbb for phpBB4 development
    at the top of those pages click the Fork icon which will create a fork in your account.Go back to your dashboard on the right side in Your Repositories click the phpBB3 fork link
    Make a new folder on your PC preferably where you have your localhost setup, like http://localhost/phpBB/

    Make sure your firewall allows access to the access keys in the .ssh directory.

  • The first Clone
    This part works best with Command line because of branches.
    Hover over your folder and press Ctrl + Shift and right click and select open Command Line HereType in

    <br />git clone git@github.com:YOUR_GITHUB/phpbb3.git

    You can get the above URL by going to your phpBB3 fork , the link is on the right of your GitHub dashboard
    click the link and on the new page select the private git URL

    This will initialize the folder and then ask for your pass phrase then it will download the remote objects.
    This part will take some time with 90274 objects depending on your connection speed, mine is not that good.

    You will now have a clone
    To see, open command line on that directory and type

    <br />git status

    Which should return something like

    <br /># On branch develop-olympus<br />nothing to commit (working directory clean)

    Note: I apparently didn’t have my fork set to Master by default which is why I ended up with that branch.
    On GitHub when viewing your fork select the Admin button and you can change these settings.

  • Switching Branches
    To change right click on the folder and select TortoiseGit -> Switch/Checkout
    Then in the branch dropdown pick remotes/origin/master whcih should be the latest release.Output will look something like this

    <br />git.exe checkout    remotes/origin/master<br /><br />Previous HEAD position was 2e1cd98... exclude the image file with text in the name from having newlines fixed<br />HEAD is now at c4e02a1... Merge commit 'release-3.0.7-PL1'<br />Success

    You now have a clone of your fork.

  •  

Any changes that you make to this repo and push back will show up for the phpBB development team and they can decide on if they want to use it in phpBB.

You should now be setup with your own working copy and repository fork for phpBB.
99% of the time you will be able to use TortoiseGit options in your right click context menu, but there may be times when command line is needed.

Some Resources
http://git.or.cz/course/svn.html
http://kernel.org/pub/software/scm/git/docs/everyday.html
http://github.com/guides/home
https://git.wiki.kernel.org/

December 30th, 2009

NetBeans 6.8 and Macros

Well, I have been playing with the new release of NetBeans and I must say, I Like It!
It has a lot of useful features that I am really enjoying and find very useful fro productive development.
2 main items being the Macro Recording and the Snippet Palette.

The macros I had a bit of difficulty finding documentation on keywords, which seems to be a common issue.
So here is what I have found out, all shortcut keywords are fair game. List_Of_Shortcuts , at least anything like this adjust-caret-top is for sure.

The keyword Action is usable, eg “caret-forward”.
So say you wanted to end a string with a shortcut to place a semi colon ; at the end of the line.
Here is the macro I use
caret-forward ";" and I set it to a shortcut of Ctrl + ;

So when you have say

echo 'This{Ctrl + ;}'

right after the s in This you hit Ctrl + ; and it will jump over the last quote mark and add a semicolon

Let’s do something a little more sophisticated like a comment block for a $variable.
Here’s your code

$my_var = '';

Now you want a decent comment block for that var, here is the Macro

"/**" insert-break "@var " word-match-next insert-break "@return " word-match-next insert-break

All you need to do is use your Set Shortcut for that Macro on the line before the variable and it will make a comment block that looks like this.

/**
 * @var $my_var
 * @return $my_var
 * 
 */
$my_var = '';

So with this Macro feature you can create all sorts of speedy shortcuts.

As for the Snippet Palette, well just highlight the code and drag & drop it in the category you want and name it. That simple.