Blog  
 
  Lextech Blog  

Recent Articles

Making Money
With Technology
Systems
Engineering

Lextech

Tech News

Author Archive

Useful Tools You May Not Have Vol. 2: Firebug for Web Development

by: Jeff

Monday, July 14th, 2008

Web development can be… well… a pain sometimes. Especially if you are creating dynamic web pages with Javascript and CSS. Thankfully there are some tools out there to make your life easier. I’ll delve into a tool specific to Firefox called Firebug in this article.

Firebug is a Firefox plugin that can be installed by searching the Tools->Add-ons interface. After installing the plugin and restarting your browser as instructed, you’ll notice a little green icon (or bug) in the bottom right of your Firefox browser. Simply click on it to bring up Firebug and enable it.

You’ll notice 5 main parts to Firebug:

Console - Javascript debugging console. Convenient way to view errors in your javascript, including the line and file the error occurred.

HTML - HTML of current page. What is really cool about this is that unlike right clicking the page and selecting view source, you can also see changes to the HTML that happened dynamically since the page loaded.

CSS - All the styles loaded for the current page. Including external CSS files.

Script - All javascript loaded for the given page. Including external Javascript files.

DOM - DOM layout / overview.

Net - Tracks request, their status, and how long it took to load each one. (ajax calls, images, css, js, etc…).

Additionally, there is an “Inspect” option that allows you to mouse over the website and automatically outline and display information about the current element your mouse is hovering over. All of the client side aspects of the site can be edited on the fly as well, with immediate results reflected in the browser.

There are quite a few more features available in Firebug, but I’ll let you find those out on your own. I hope this little tip has been useful. I know Firebug has helped me a great deal.

For more information:

http://getfirebug.com/ - Special thanks to Joe Hewitt and the Firebug group.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Ubuntu - My Favorite Linux Distro

by: Jeff

Monday, June 23rd, 2008

I’ve been tinkering around with Canonical’s Ubuntu (Oo - boon - too) since the first release 4.10 “Warty Warthog” all the way up to their latest release 8.04 “Hardy Heron.” Since then I’ve flirted with other distributions, but I always end up back with Ubuntu for several reasons. The top three are as follows:

1. Nice package management and abundant repositories. 

Ubuntu uses APT, which means getting thousands of applications is as easy as a simple apt-get from the shell, or for GUI lovers, there are nice options for any desktop environment you choose. Adding support for multimedia codes and proprietary hardware is a snap as well, it will prompt you if it detects you need it and ask you if you would like to install support for it.

2. Consistency and reliability.

I’ve only really gotten burned once with a bad Ubuntu update, which was resolved immediately (xorg.config bombed, not good). In my experience, other distributions that offer the breadth of software and updates that Ubuntu does typically break and require a lot of forum searching and manual tweaks to fix. Which is about the time I say screw it and reinstall Ubuntu.

3. Excellent community.

Be it forums, IRC, or user groups - Ubuntu has a great following and a lot of good people willing to help you out with any issues.

So, I guess I could wrap things up by saying Ubuntu is easy to work with and provides me the least amount of headaches of any Linux distribution. I can get up and running quickly with out the stupid little things breaking like they do on a lot of distributions while maintaining the freedom to pop under the hood and be a nerd with it too, because after all it is Linux!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Debug CakePHP in Eclipse - Bake Cakes Not Brownies

by: Jeff

Thursday, June 5th, 2008

Having developed several CakePHP projects in Eclipse, I’ve always been on the lookout for things to make my life easier. Not too long ago I stumbled across an addition to Eclipse’s PHP Development Tools (PDT), which integrates the Zend/Xdebug debuggers into the Eclipse environment. The ZendDebugger binaries are available for OS X, Linux and Windows platforms at Zend’s website http://www.zend.com/en/community/pdt.

Also on this page, you may also find an all-in-one bundle for Eclipse that has everything you need to get started. Once the debugger is loaded in PHP and your web server has been restarted, you can open Eclipses debug dialog and create a new PHP Web Page profile.

First configure the “PHP Server” section to point to the development server your project exists on. Then set /<project name>/app/webroot/index.php for the “File” section of the PHP server debug dialog as well as http://<host name>/ , index.php respectively for the two entry boxes of the “URL” section. On the advanced tab select “Debug All Pages” and the debugger will now recognize any breakpoints in all .php files in your project!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

CakePHP… Brain Dessert for PHP Developers

by: Jeff

Tuesday, May 13th, 2008

The guys over at CakePHP have whipped up something full of awesomeness for the PHP community. They have provided a tool to make our lives easier and more productive by removing the hassles of creating redundant boilerplate code using a framework to cleanly build web applications. I’ll briefly delve into what Cake is and why I think it is so awesome.

The main concept to learn behind cake is the Model-View-Controller (MVC) architecture. This basically means that the code to handle data (model), the code to handle html (view), and the code to handle logic (controller) is neatly broken up into three separate files. In essence, the controller gets data from the model (usually synonymous with a database table) and figures out what it wants to do with the data, then supplies the view with the processed data. Additionally, if you want to get started quickly, you can declare a variable called scaffold in your controller and CRUD pages will be auto-magically created for that table in your database!

To take things a step further, you can run a command line utility that can create permanent copies of these CRUD pages and help you define relationships between your models. The CakePHP project is very active and I’ve only glanced on a couple of the cool features.

Once you get in the mindset of using it, which includes familiarizing yourself with some naming conventions and taking full advantages of models instead of making raw queries, you’ll be creating PHP sites in a fraction of the time. (For further information about getting started, please look at The CakePHP Manual.)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Useful Tools You May Not Have Vol. 1: Synergy for Mouse and Keyboard Sharing

by: Jeff

Monday, May 5th, 2008

Ok, I’ll preface this article mentioning that having and managing more then one computer at a time is a not typical problem for most people.

However, for the typical nerdy keyboard jockey it can become a cumbersome task. Thankfully, the guys over at http://synergy2.sourceforge.net/ have developed a cross-platform tool to effortlessly share your keyboard, mouse, and clipboard over any combination of OS X, Windows, and Linux computers. I’ve had my MacBook Pro, Windows XP, and Ubuntu 7.04 machines all lined up and controllable with a single mouse and keyboard without any extra hardware. You can even sync screen savers on most systems.

All thats required is a minimal knowledge of networking to modify a configuration file on the host machine to correctly point to client machines on the network and configure their screen positions (left of host, above host etc. etc.). I’d strongly suggest giving this a shot before you run out to the store for a hardware solution.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati