Scala, Java, Unix, MacOS tutorials (page 350)

Alaska programming and website design: Nothing too exciting here for the devdaily world, but just a quick announcement that I am finally launching my new computer consulting business in Alaska. My new company is named Mat-Su Valley Programming (or MVP, for short), and we'll provide Alaska with website design and programming services.

CakePHP HTML image links FAQ: How do I create HTML image links in CakePHP?

When I first started using CakePHP I had no idea how to create a CakePHP image link, so I thought I'd share what I've learned here, specifically the CakePHP HTML image and HTML link syntax.

Rather than go into any great detail, I'll just share the source code from one of my CakePHP view pages. This is from a typical CakePHP index view page, but I wanted to use images for the Edit and Delete actions instead of plain links. Here's the CakePHP view code I created to get this done:

CakePHP/SimpleTest automated web testing: Can you share an example of some automated CakePHP SimpleTest web tests?

Sure, here's a quick look at how I've created a suite of CakePHP automated web tests using SimpleTest to perform integration testing on a new CakePHP web application.

The recipe for creating automated web tests in CakePHP is fairly simple:

CakePHP delete database test data FAQ: How can I delete CakePHP test data from my database in automated CakePHP unit and web tests (integration tests)?

I recently created a large set of CakePHP unit tests and CakePHP web tests (essentially integration tests), and as part of thorough testing, I needed to be able to create some user accounts and insert some test data into the database.

Twitter icons meaning: I may be the only one on the planet who doesn't understand the meaning of the current Twitter icons, but really, I don't understand most of them. A Twitter reply icon is an empty ballon? The media icon I kinda get, but the Twitter geo pin icon I don't get. (Maybe I don't work with geo tags and geographic locations much, but I can think of a few million people who also don't.)

Update (1/26/2011): This is the last week to enter the "jQuery in Action" contest. Details below:

Okay, I'm back from a short break, let's get 2011 rolling. First up: A contest to win a copy of jQuery in Action.

I don't give out stats, but I'll make this promise: The more people sign up for the mailing list, the more copies of jQuery in Action I'll give away, and I'll do it at a rate that increases your chances of winning -- so get your friends to sign up!

CakePHP SQL UPDATE FAQ: How do I perform a SQL UPDATE with CakePHP?

As I was writing a user registration process for a CakePHP application, I just found myself in a situation where I needed to write a CakePHP SQL UPDATE query. While you don't pay attention to it, you often run a SQL UPDATE query in CakePHP in a typical controller edit() function, but this was the first time I really had to do this manually.

The short answer is that you execute a SQL UPDATE query in CakePHP using the usual model save() method. The way the save method work is like this:

Delete all iPhone photos FAQ: How can I easily delete all of my iPhone photos at one time (using my Mac)?

First off, a word of caution: This iPhone photos tip demonstrates how to delete all iPhone photos, which is obviously a dangerous thing to do, especially if you like your photos.

Second, this tip requires a Mac. (Sorry, I don't know how to do this from Windows, as I don't have a Windows PC at this time.)

How to delete all iPhone photos using your Mac

To delete all iPhone photos using your Mac, just follow these steps:

iPhone "delete photos" FAQ: How can I delete multiple iPhone photos from my Mac (or from my iPhone)?

A long time ago I wrote about how to delete multiple iPhone photos from your iPhone, and that tip still works great if you want to delete multiple iPhone photos directly from your iPhone. But if you'd like a way to delete multiple iPhone photos from your Mac, or a simple way to delete all your iPhone photos, this tip can also be helpful.

iPhone battery life FAQ: Do you have any tips on how to improve my iPhone battery life (or iPod battery life)?

Yes, it turns out you can do a number of things to improve your iPhone battery life, and I thought I'd share what I've learned here.

I don’t remember where I heard it first, but possibly the most important phrase I’ve ever heard related to the consulting field is this:

Where there’s mystery, there’s money.

MySQL Error 1293 FAQ: Help, I'm getting a MySQL incorrect table definition error message related to a TIMESTAMP column. How do I get past it?

If you ever get this MySQL Error 1293 (like I just did):

ERROR 1293 (HY000): Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

fear not, it may not be too bad. Let's take a look.

CakePHP flash fade out success messages: If you'd like to show fade out success messages in your CakePHP applications using jQuery, like the ones currently used by applications such as Twitter and Facebook, I thought I'd share the formula I came up with this weekend. While it includes touching a few different files, it's pretty easy, and once you've done the basic setup work you can display CakePHP fade out success messages in all of your web pages, and web applications.

CakePHP form save/validate/debug FAQ: How do I debug problems in the CakePHP form save/validate process?

One problem I've run into with CakePHP is that while the form validation approach works very well 95% of the time, when it fails it can be very hard to debug. Because the form validation process happens when you invoke the save() method, much of this debugging process seems to be out of your control.

CakePHP require, notEmpty, and allowEmpty FAQ: Help, I'm trying to edit my CakePHP model $validate field to make sure a CakePHP form field is required, but 'require' doesn't seem to be working as expected.

After fighting with a CakePHP form I just got this information beat into my head, so I thought I'd share it here. In short, if you want to make a CakePHP form field required, what you really want to use is the CakePHP notEmpty rule, like this:

Summary: A quick look at Seward, Alaska lodging information, including resources on my One Man's Alaska website, and other Seward, Alaska lodging resources.

I wish I had more statistics to look at this, but at a preliminary glance, it looks like Drupal has accounted for all new PHP job openings in the last twelve months. I just published a little CakePHP, Drupal, and LAMP PHP jobs survey, and while the good news is that the PHP job market appears to have grown well in the last twelve months, the case can be made -- based on these statistics -- that Drupal accounted for almost all of the new PHP job openings.

CakePHP and Drupal jobs, 2011 - Way back in December, 2009, I first started looking at the PHP job market, specifically CakePHP, Drupal, and LAMP/PHP job openings. I forgot to run the queries again this past December, but I just took a few moments to update them, so ... here is a quick look at the PHP developer job market in January, 2011.

Summary: A short review of Mac Git GUI clients.

Linux file information FAQ: How can I tell what type of file a file is on a Unix or Linux system?

The Linux file command shows you the type of a file, or multiple files. It's usually used when you're about to look at some type of file you've never seen before. When I first started working with Unix and Linux systems I used it a lot to make sure I wasn't about to open a binary file in the vi editor, amongst other things.

You issue the Linux file command just like other commands, like this: