debuggable

 
Contact Us
 
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28

Workshop Application (Source Code + Demo)

Posted on 10/9/08 by Felix Geisendörfer

Hey folks,

today is our last day in Raleigh and an lengthy article on the whole experience will show up here tomorrow. In the meantime those who did not participate can already look at the application we built for the workshop. Nate (acl) and Garrett (web services) have some yet uncommitted changes they will upload soon, but other than that the application should be in fairly good shape.

So here are the links:

If you are looking for a good piece of sample CakePHP code written by the core developers, then this app should certainly be worth a look. We are planning to continue working on it in future and possibly hosting it somewhere.

Questions, Comments and other Feedback is more than welcome!

-- Felix Geisendörfer

 

Use the Terminal

Posted on 9/9/08 by Felix Geisendörfer

Hey folks,

here is a word of advice if you want to have more fun developing. Use the terminal. Windows user? Make your next machine a mac (or install linux).

Ever since I switched from Windows to OS X in last July, I have been working on my bash skills on and off. Every step of the way I learned tricks that save me valuable time on a daily basis now. Now it just simply hurts to watch people who avoid the terminal work. Take creating a new database and importing some sql into it. The typical GUI workflow for this is:

  • Open a MySql client (PhpMyAdmin, Navicat, ...)
  • Click somewhere to create a new database
  • Type in the db name (mouse -> keyboard switch)
  • Click somewhere to get an import sql dump dialog, often this is hidden in sub-menu (keyboard -> mouse switch)
  • Browse to the location you need to find your file
  • Select the file and hit enter
  • Sometimes now you have to confirm the import again
  • Done

If your sql file is compressed and your client doesn't support that compression you will even have to manually uncompress the file somewhere along the way. My typical experience from watching people going through the GUI way of sql import is that it takes them 5-10 minutes.

Now lets look at the bash side of things.

  • Cd into the directory with the sql file
  • Run the following commands:
mysql -e "CREATE DATABASE foo;"
bzcat foo.sql.bz2 | mysql foo

As you can see, the terminal way of doing this is a lot more efficient. Not only that, your also usually have less problems with it. Because the further you get away from the terminal the more tools and applications are usually stacked on top of each other to make for a GUI app. That usually leads to more bugs and slowness. Especially importing large sql files (I used to import ~2-3gb of data on a regular basis for a client) is something where GUI apps have failed me big time in the past.

Another big advantage of doing things in the terminal is that you can replay them easily. Any decent terminal will or can be brought to record the history of the commands your enter. Check out your shells history commands. If what you did fails, you can easily try again by executing one of your previous commands again without having to type it in (arrow key up). Using a GUI you will have to manually go through all the steps involved again.

Here is another command I use a lot - emptying a CakePHP app's cache directory:

find app/tmp -type f | xargs rm

Anyway, my point is not that everything should be done in Terminal. In fact, for most things I like to have a GUI. But anything that looks like something you might end up doing a lot or that you are likely to do a lot more if it wasn't as much of a pain as it is right now - consider figuring out how to do it in the terminal.

-- Felix Geisendörfer aka the_undefined

 

Workshop Day 2

Posted on 8/9/08 by Felix Geisendörfer

Hey folks,

here are some shots of day #2:

Tim doing his presentation on validation:

The attendees all in one picture:

The Cake Gary (aka NOSLOW) who took the initiative in having his company sponsor the workshop gave to us. We can't thank Gary enough for everything he did.

Garrett "gwoo" Woodworth and Nate Abele holding the cake.

The two Germans joining them:

Me doing some presenting as well:

Nate explaining ACL:

Tim and me happy with some beer:

Playing Tischfussball:

Last but not least a little teaser. Anybody remembering Tim deleting the cake core?

-- Felix Geisendörfer aka the_undefined

 

Workshop Day 1 / Missed blog post

Posted on 7/9/08 by Felix Geisendörfer

Hey folks,

if you have been following this blog closely you probably have noticed that there was no blog post published yesterday. Corey, one of the attendees here at the workshop was the first to notice and has already received his 50 EUR reward.

So what happened? Well, Nate, Garrett and me did an allnighter last night to finish some of the material for our presentations. Bye the time we were done (err ran out of time) the workshop already started and I wasn't able to fit any blogging time in between. Oh well - I'm going to continue the challenge anyway and add another day at the end to get to 30 posts total.

Today's post is just a quick sum up of yesterdays action. Before any of the workshop started, Garrett had to do some training of his presentation skills (no, he missed the catch):

As already mentioned above, all of us had lots of material to go over to make sure we were well prepared:

Despite Hurricane Hannah coming in, pretty much everybody made it to the credit risk management headquarters where the event takes place. We cannot thank this company enough for providing us with their amazing facility.

As announced, we have two rooms available. Room #1 is where the official sessions are being presented.

And in Room #2 we have a great time going into great depths on anything people are interested in and want individual training on:

In the breaks there are lots of interesting discussions going on as can be seen in the following shots.


So far this has been great fun and we are looking forward to today's talks & events!

-- Felix Geisendörfer aka the_undefined

 

Fixturize Shell - Generate your fixtures automatically

Posted on 5/9/08 by Felix Geisendörfer

Hey folks,

this is post #17 of my 30 day challenge.

When you start writing unit tests or using the fixtures shell we published a while back you might be quite annoyed about something. The fact that typing in all those fixture data is not really efficient. In order to make our lives a little easier, we came up with a shell that takes any database table of yours, and creates the PHP fixture code for you automatically.

You can download the: Fixturize Shell at the Debuggable Scraps repository. Further documentation can be found in the git repositories readme file as always.

Usage is a simple as this:

cd cake/console
./cake fixturize posts

This will create a file called app/tests/fixtures/post_fixture.php for you that holds all of your posts tables records. Additional documentation can be found in the github readme.textile file as always.

If you have any questions or want to comment, feedback is welcome!

-- Felix Geisendörfer aka the_undefined

 
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28