March 28th, 2010 / No Comments » / by natebean
Powered by Twitter Tools
Posted in: tweets
Tags: tweets
March 21st, 2010 / No Comments » / by natebean
Powered by Twitter Tools
Posted in: tweets
Tags: tweets
March 14th, 2010 / No Comments » / by natebean
Powered by Twitter Tools
Posted in: tweets
Tags: tweets
March 9th, 2010 / No Comments » / by natebean
Great content from railscasts.com
Beginning with Cucumber
Cucumber is a high-level testing framework. In this episode we will create a new Rails application from scratch using behavior driven development.
via Railscasts – Beginning with Cucumber.
Webrat
If you prefer writing integration tests in ruby instead of Cucumber's plain english, consider interacting with Webrat directly as I show in this episode.
via Railscasts – Webrat.
More on Cucumber
There is a lot more to Cucumber than I showed in an earlier episode. See how to refactor complex scenarios in this episode.
via Railscasts – More on Cucumber.
Great screencast on Cucumber and some RSpec. Worth your 25 minutes.
This is a basic introduction to integration testing with cucumber. In it, I describe how to use cucumber and rspec to implement a feature in a web application, emphasizing the importance of writing tests before code, which is often referred to as TDD (test-driven development) or BDD (behavior-driven development, a refinement of the original TDD).
via Teach Me To Code – Introduction to Outside-in Development with Cucumber.

Writing Software not Code with Cucumber –
slides from Ruby Hoedown • Blog Archive • Ben Mabey.
Posted in: Ruby on Rails
Tags: Ruby on Rails
December 1st, 2009 / No Comments » / by natebean
Very nice plugin for cakePHP for uploading files with great documentation. Got it running with minimal effort. Would recommend.
An all around general purpose file uploader for CakePHP. Packaged as a stand alone plugin with file validation, file scanning and support for a wide range of basic mime types.
Class Features:
* Automatically sets all ini settings required for file uploading
* Support for a wide range of mime types: text, images, archives, audio, video, application
* Logs all internal errors that can be retrieved and displayed
* Saves a log for all uploads happening during the current request
* Automatically validates against the default mime types and internal errors
* Can scan the uploaded files for viruses using the ClamAV module
* Files can be uploaded anywhere within the webroot folder
* Convenience methods for deleting a file, moving/renaming a file and getting the file extension or dimensions
* Built in methods for resizing images and generating thumbnails
* Custom Behavior to add validation rules to your Models validation set
* Custom Behavior that allows models to attach files to automatically upload the file and save its information to a database
via Miles Johnson // Script: Uploader (Plugin).
Posted in: cakePHP
November 26th, 2009 / No Comments » / by natebean
A nice blog post from dsi.vozibrale.com on how to create a CakePHP behavior. This helps build on some of the missing points in the CakePHP manual. This post include also includes good references.
Simple hitcount behavior for CakePHP
Posted in CakePHP on 07.04.2008.
While developing Neutrino, I’ve decided to implement a simple hitcount behavior. So here it is.
For those few who don’t know, behaviors are “extensions” for models. In other words, they are reusable model logic. They help you keep your code DRY, easily maintainable and portable. In this case, we’re creating a hit counter behavior, hitcount for short.
via Simple hitcount behavior for CakePHP – lecterror.
Posted in: cakePHP
November 24th, 2009 / No Comments » / by natebean
Nice entry on how to get HABTM tests to work in CakePHP 1.2.
Test Fixtures for CakePHP Has-and-Belongs-to-Many Relationships
CakePHP, a popular MVC framework in/for PHP, offers a pretty easy-to-use object-relational mapper, as well as fairly straightforward fixture class for test data. Consequently, it’s fairly easy to get into test-driven development with CakePHP, though this can take some acclimation if you’re coming from Rails or Django or some such; the need to go through a web interface to navigate to and execute your test cases feels, to me, a little unnatural. Nevertheless, you can get writing tests pretty quickly, and the openness of the testing framework means that it won’t get in your way. Indeed, compared to the overwhelming plethora of testing options one gets in the Ruby space — and the accompanying sense that the choice of testing framework is akin to one’s choice of religion, political party, or top 10 desert island album list — CakePHP’s straightforward testing feels a little liberating.
Which is why it was a little surprising to me that getting a test fixture going for the join table on a has-and-belongs-to-many (HABTM) association is — at least in my experience — not the clearest thing in the world.
via Test Fixtures for CakePHP Has-and-Belongs-to-Many Relationships | End Point Blog.
Posted in: cakePHP
April 25th, 2009 / No Comments » / by natebean

Helpful and concise tutorial on using GIMP to design rounded buttons.
For last few day had been doing some designing. Had to make some buttons, so here is a tutorial for making a rounded cornered shiny button. And of course using GIMP
via Nothing To Lose | Little Shiny Blue Button.
Posted in: Gimp
April 25th, 2009 / No Comments » / by natebean
Create a web 2.0 badge in The Gimp
In this tutorial I will show you how to design a web 2.0 badge in the Gimp. These type of badges have made their place in the web 2.0 design as a great graphic to have on your website for all sorts of options such as subscribing to an RSS feed. Some techniques in this tutorial are based on the Photoshop tutorial written by Photoshop star which can be found here.
via Create a web 2.0 badge in The Gimp « Help Developer – Graphic and Web Design Blog with Collections, Freebies, Tutorials and Forums.
Helpful.
Posted in: Gimp
April 15th, 2009 / No Comments » / by natebean
Random Rows in MySQL
I have to admit that I had quite some trouble figuring out how I could get MySQL to return some random rows in a query. It was something I had to figure out for myself when I wanted to get a list of random websites off GIDTopsites™ to place on these pages here.
As usual, everything fell nicely into place and it was SO simple…
RAND()
Using rand(), I just had to add it to my SQL query
like this:
php:
// random row mysql query example
$sql = “SELECT * FROM tablename
WHERE somefield=’something’
ORDER BY RAND() LIMIT 5″;
// or, something like this
$sql = “SELECT * FROM tablename
ORDER BY RAND()”;
?>
via Learning Journal – Random Rows in MySQL.
Short and helpful.
Posted in: MySQL