Currently Browsing: General

Easily Export Data from any CakePHP model

I recently needed the ability to export data from my application in CSV format in my CakePHP application. It didn’t need to be anything fancy, mostly just a dump from a given model, which the customer could open in Excel. I’ve written it in an abstracted way. This fairly simple function takes a model name and an array of fields which should be excluded from the output, and delivers a CSV file. Rather than allow the function to be accessed directly, I’ve made the function private, and written a public function which accesses it. This has the added benefit of reducing the need for input...
read more

Try out Ubuntu Unity with quick install

Canonical recently unveiled a new version of Ubuntu, dubbed Unity (Ubuntu Light), built specifically with netbooks in mind, featuring super short boot times, and a whole slew of interface enhancements. It is still incomplete, but early versions of it are available to OEMs and to adventurous tinkerers. It is quite easy to get up and running if you’re using Ubuntu already. I have an Ubuntu desktop at home but decided to try this setup on my laptop via VirtualBox, which is sporting a relatively fresh install of Ubuntu 10.04 with Guest Additions installed. Follow the instructions below to try out...
read more

Foursquare Day quickly comes into focus.

The Foursquare Day event is catching on in every corner of the globe. In just a few short weeks, fans and new initiates of Foursquare and social media at large have self organized to plan and launch the first ever Foursquare Day. We created a website to help aggregate information about the many Swarm Parties and exclusive Specials on Foursquare day, but just browsing lists of information didn’t quite capture what was really going on. We’ve created the Foursquare Day map so you can see where people are participating both near you and all over the world. See who’s throwing events where,...
read more

Guac!

I developed a bit of an obsession with Chipotle’s guacamole, it was good but expensive, so I decided to make my own. I’m still tweaking the recipe but this is where I started and gives great results. You can find avocados with the other fresh produce at your grocery store. (extra points if you find them at a market!) ...
read more

Small lessons

I work for a small web shop and enjoy a very casual atmosphere. This is great most of the time, but recently it caught up with me. We were all sitting around the conference table eating pizza on the company’s dime and watching the classic Batman film over lunch. I was sitting there scarfing down pizza next to my coworkers and my boss when our sales guy poked his head in and asked me how much we’d charge for hosting a simple e-commerce site. We’re not exactly what I’d call a premium services sort of company, so I quoted him a price of $25/month. But I quickly added that at that...
read more

Search By Location (Miles From Zip Code) in PHP

Whenever you’re building a site that has a directory of businesses or people or anything with a physical location, it commonly lends itself to offering a search form which allows the user to search by distance from a given location. For example, a national or state-wide company with many branches may want to allow their website visitors to find a location near them. Or perhaps you may be building a directory of specialist doctors, or a site with real estate listings, and want to offer users the ability to search within X miles from a given location. It sounds like a difficult feature to implement...
read more

Hacking H1N1 (Swine Flu)

H1N1 What a fantastic read on H1N1 and the basics of DNA And RNA as they function in the body using the analogy of a computer program. The author then goes on to suggest ways in which the virus could be improved, from a reverse engineering standpoint. Read the original article...
read more

Can’t add widget?

Quick Wordpress tip for you, especially useful when you’re initially setting up your blog. If you’re switching from theme to theme and then find yourself unable to add certain widgets, it’s probably because they were left enabled on a different theme. Try switching back to the theme you were previously using, remove all of the widgets and then try adding them again after switching to the new...
read more

How to apply for a web design position

I’ve recently been charged with finding a couple new hires for entry level positions at our company. We posted an ad on Craigslist and within a day had dozens of applicants. If you find yourself new to the area of web design and are applying for your first job, here are some things to keep in mind, in no particular order:...
read more

The Web, Evolved (and You)

“Hello, my name is Dave.” “Hello Dave, nice to meet you… so what do you do, anyway?” “I work as a Web Developer over at Sparkfire.” “Oh, cool.” This is inevitably followed by a blank stare. It’s at this point which I’m always torn, do I go off on some suitable explanation of “web developer”, or do I just move on. ...
read more

« Previous Entries