This Week in Edge Cappuccino (38)

See last post here.

January 28 - February 3, 2010 Edition

There haven't been any commit in the master branch, but there was 41 commits in the jake branch (which should be merged in the master branch anytime soon).

This Week in Edge Cappuccino (37)

See last post here.

January 21 - January 27, 2010 Edition

There haven't been any commit in the master branch, but there was 47 commits in the jake branch (which should be merged in the master branch anytime soon).

  • CPTableView gets some background images for its CPTableHeaderView, a better drag and drop support, and a refactoring of the keyboard navigation. The commits : here, here, here, here, here, here
  • The Cappuccino DOM load system gets some improvements. It now allows external libraries to add elements to the body during the onload process. Read the announcement on the mailing-list. The commits : here, here
  • There is a new CPViewAnimation class that should offer a convenient way to animate multiple views and windows. The commits : here, here
  • CPCollectionView items resizing/positioning behavior is now more Cocoa-like. See this thread on the mailing-list. The commit : here
  • The bootstrap process keeps on getting improved. The commits : here, here, here, here
  • As well as press does. The commits : here, here, here, here, here, here

This Week in Edge Cappuccino (36)

See last post here.

January 14 - January 20, 2010 Edition

There haven't been any commit in the master branch, but there was 13 commits in the jake branch (which should be merged in the master branch anytime soon).

  • jake install doesn't use sudo by default anymore. There's now a new task if needed : jake sudo-install. The commit : here
  • Make CPPanel -becomesKeyOnlyIfNeeded and CPView -needsPanelToBecomeKey work. The commit : here
  • Fixed: under certain circumstances controls would not be drawn despite a call to setNeedsDisplay:YES. A typical symptom of this was custom CPViews' drawRect never being called. The error was caused by _CPDisplayServer throwing away its remaining work whenever the display code of a control called setNeedsLayout. The commit : here

This Week in Edge Cappuccino (35)

See last post here.

January 7 - January 13, 2010 Edition

There haven't been any commit in the master branch, but there was 60 commits in the jake branch (which should be merged in the master branch anytime soon).

  • Randy showed CPTableView some love, he started implementing drag and drop, auto resizing columns, keyboard support, scrollToVisible for columns and rows, double click action, deselectAll, inline editing. [credits update] : Highlightable rows thanks to Cacaodev and inline editing thanks to Rentzsch. The commits : here, here, here, here, here, here, here, here, here, here, here
  • Support for HUD scrollbars. The commit : here
  • CPFont now supports multiple font families which fall back on each other. The commit : here
  • CPFlashView now handles flashVars and parameters. The commits : here, here
  • Many nib2cib improvements for CPToolbar/CPToolbarItem. The commits : here, here, here, here, here

This Week in Edge Cappuccino (34)

See last post here.

December 31 - January 6, 2010 Edition

There haven't been any commit in the master branch, but there was 13 commits in the jake branch (which should be merged in the master branch anytime soon).

  • Fix for window overlapping the menu bar if the user dragged it up there. The commits : here, here
  • CPTreeNode gets archiving support. The commit : here
  • The jake branch should now build correctly. The commit : here
  • CPToolbarItem gets some more support in nib2cib. The commit : here

devdiari.es : a sample Cappuccino/Rails application open sourced for your pleasure

As you may have read on the Cashflow blog, I'm gonna rewrite Cashflow App with Cappuccino and I wanted to get my hands a little dirty before starting the big rewrite.

That's why I decided to write devdiari.es, a Cappuccino + Rails app that collects the tweets of developers who chose to create a separate dev diary Twitter account.

devdiari.es : the goals

I find dev diaries interesting to read, but not necessarily on a daily basis. I don't want to "pollute" my Twitter feed with too much information, but I still sometimes want to read what other devs are doing. One of the goals of devdiari.es is to aggregate and archive those tweets for further reading.

The main purpose for me was to go deeper into Cappuccino by coding a small app from start to finish. The code can certainly be improved, I took shortcuts here and there and I made decisions that may not be optimal. But I wanted to ship. I hope I'll get some feedback (thomas at this domain) and hopefully some contributions. It could become a collaborative Cappuccino app we could all use to learn and share our knowledge/best practices. It's up to you! I'll try to do a screencast that explains how things work.

Technical details

devdiari.es is a Rails (2.3.5) app, it uses the Grackle gem, delayed_job, the Cappuccino jake branch, and a slightly modified version of CPActiveRecord. The interface has mostly been done using Atlas. It is hosted on Heroku, and new tweets are fetched daily via a cron task. The code is available on Github. It currently doesn't work in Internet Explorer.

How to add a Twitter account to devdiari.es?

I first added a bunch of Twitter accounts I was following, then I decided to add a list Martin Pilkington put together. You can suggest other dev diaries that should be followed, and I'll consider adding them. Twitter accounts are not automatically added, because I'd like devdiari.es to be focused on dev diaries exclusively.

Spread the word, I can't wait to get your feedback!

This Week in Edge Cappuccino (33)

See last post here.

December 24 - December 30, 2009 Edition

There haven't been any commit in the master branch, but there was 7 commits in the jake branch (which should be merged in the master branch anytime soon).

  • Observable arrays get 3 new methods : indexOfObject:, indexOfObjectIdenticalTo: and removeObjectIdenticalTo:. The commit : here
  • Added applyChange:toKeyPath: and inverseChangedDictionary to support "automatic" undo with KVO. The commit : here

This Week in Edge Cappuccino (32)

See last post here.

December 17 - December 23, 2009 Edition

There haven't been any commit in the master branch, but there was 23 commits in the jake branch (which should be merged in the master branch one day).

  • Fix for action being sent to disabled CPMenu items. The commits : here, here
  • bootstrap.sh now asks if you want to delete your existing installations. The commit : here
  • CPView gets a new setSubviews: method that allows you to add multiple subviews. The commit : here
  • CPDictionary gets better support for recursing in dictionaryWithJSObject:recursively:. The commit : here
  • CPOperation has been added to Foundation. The commit : here
  • TextMate and Xcode files have been removed, since they now have their own repository. The commit : here

This Week in Edge Cappuccino (31)

See last post here.

December 10 - December 16, 2009 Edition

There haven't been any commit in the master branch, but there was 25 commits in the jake branch (which should be merged in the master branch one day).

  • CPTextField get support for copy, paste, cut, selectRang and setSelectedRange. The PasteBoard gets several improvements. The commits : here, here, here
  • Press gets a rewrite/cleanup. It is still a work in progress, but press --flatten should work. The commit : here
  • Several improvements to CPUndoManager (and a new CPProxy class). The commits : here, here, here
  • Better key equivalents support in CPMenu. The commits : here, here

This Week in Edge Cappuccino (30)

See last post here.

December 03 - December 09, 2009 Edition

There haven't been any commit in the master branch, but there was 34 commits in the jake branch (which should be merged in the master branch anytime soon).

This Week in Edge Cappuccino (29)

See last post here.

November 26 - December 02, 2009 Edition

There haven't been any commit in the master branch, but there was 14 commits in the jake branch (which should be merged in the master branch anytime soon).

  • CPString gets a new commonPrefixWithString method. The commits : here, here, here
  • A lot of cleanup in the jake branch (can you feel the merge coming?) : here, here, here, here, here
  • CPViewController does not load the same cibs lots of times anymore. The commits : here, here
  • Keyboards event handling has been reworked, it now uses snippets from the Google Closure Library. Ross says : «Previously, you had to manually blacklist keys which you wanted to use for keyboard events and which you did not want the browser to take action on. Now, this is inferred by whether or not your application returns YES from performKeyEquivalent:. Additionally, there’s a mechanism that will allow you to both perform a key equivalent and still allow the event to bubble up the browser if necessary. Another important fix is with copy/paste events. You’ve always been able to use the copy/paste events to interact with the native text clipboard, which allows applications like 280 Slides to copy and paste text without using a textfield. This broke in Safari 4, but is now fixed and should be even more robust». The commits : here, here

This Week in Edge Cappuccino (28)

See last post here.

November 19 - November 25, 2009 Edition

There haven't been any commit in the master branch, but there was 10 commits in the jake branch (which should be merged in the master branch anytime soon).

  • You can now choose to install Narwhal and its packages via git clone (--clone option) instead of downloading the zip archives from Github. The commit : here
  • CPApplication gets an About panel. The commit : here
  • Fix for NSScrollView breaking nib2cib. The commit : here

This Week in Edge Cappuccino (27)

See last post here.

November 12 - November 18, 2009 Edition

There haven't been any commit in the master branch, but there was 45 commits in the jake branch (which should be merged in the master branch anytime soon).

  • CPTextField gets some changes so it behaves more like NSTextField. More info in this thread. The commits : here, here
  • You don't have to call sudo to run jake install, sudo is called by jake. The commit : here
  • CPSavePanel gets some support for properties (like isExtensionHidden, canSelectHiddenExtension, allowsOtherFileTypes, canCreateDirectories) in desktop mode. The commit : here
  • CPRadio gets support for target and action. See how it works in this video. The commits : here, here
  • CPToolbar got an almost complete rewrite. More info in this thread. The commit : here
  • Built projects can now locate .j files in subfolders. The commit : here

This Week in Edge Cappuccino (26)

See last post here.

November 05 - November 11, 2009 Edition

There haven't been any commit in the master branch.

But it does not mean nothing happened. The 280 guys were at JSConf EU where they showed off the new features coming in Cappuccino 0.8. They explained image spriting in a post on the Cappuccino blog. Commits this week were mainly bugfixes to the jake branch (which you should really try if you haven't yet).

Also, remember that the Atlas Beta Program launches on November 15. Exciting times!

This Week in Edge Cappuccino (25)

See last post here.

October 29 - November 04, 2009 Edition

There have been 20 commits in the master branch.

The jake branch will soon be merged into the master branch. Read Francisco's post about those upcoming changes, and read how to give this new branch a try.

  • Checkboxes get a new mixed state, and all existing controls get a disabled state. The commits : here, here
  • Documents/Windows get some love, with support for close warning for multiple windows per document and multiple documents per window, unsaved state for the close button on standard windows and recent file list support. The commits : here, here, here, here
  • nib2cib support for key equivalents. The commits : here, here

Cappuccino : building the jake branch

As you may have already read, the Cappuccino jake branch will be merged soon into the master branch. This is a quick post that will try to recap all the steps required to install and test the jake branch.

Feedback needed

Please post your feedback here and I'll update the post accordingly. I'll post a Cappuccino Cast based on this post, so the more accurate it is, the better the screencast will be.

Cleanup old install

If you already built Cappuccino from source, it's a good idea to cleanup the old install. If you never installed Cappuccino, you can skip this step.

$ sudo rm -Rf /usr/local/share/narwhal
$ cd /usr/local/bin
# those are old symlinks that referenced the /usr/local/share/narwhal/bin we just deleted
$ sudo rm activate activate.bash activate.cmd bake blend capp cplutil jackup js json narwhal narwhal.cmd nib2cib objj objjc ojtest press sea sea.cmd tusk tusk.cmd

# check if you have the $CAPP_BUILD env variable set
$ echo $CAPP_BUILD

# if it is set, make sure to remove the directory (it will be automatically recreated)
$ rm -Rf $CAPP_BUILD

Get the sources

If it's the first time you build Cappuccino, you have to set the CAPP_BUILD environment variable in your ~/.profile file and make sure to reload your environment :

export CAPP_BUILD="/your/path/of/choice"
$ source ~/.profile

Get the sources from Github, then switch to the jake branch

$ git clone git://github.com/280north/cappuccino.git
$ cd cappuccino
[master]$ git checkout -b jake origin/jake
[jake]$ # you are now in the jake branch

Install

Run the bootstrap script (answer "yes" to all questions, except if you are really sure you don't want to install a particular package) :

[jake]$ sudo ./bootstrap.sh
[jake]$ source ~/.profile # it reloads your environment so /usr/local/narwhal/bin will be available in your path

Then you can choose to use Narwhal with Rhino or with JavaScriptCore (which is much more faster but still incomplete, for instance, the "tusk" package manager is not supported yet)

To use Narwhal with Rhino, just run :

[jake]$ sudo env CAPP_BUILD=$CAPP_BUILD jake install

Calling the env command will make sure the CAPP_BUILD variable is preserved while running the sudo command. On Mac OS X 10.6, you could just run sudo -E jake install, the -E flag would make sure your environment is preserved. But since it's not working with Mac OS X 10.5, I prefer to show you the command using env.

If you don't do that, the CAPP_BUILD environment variable won't be available to the jake script, and your CAPP_BUILD folder will remain empty.

To use Narwhal with JavaScriptCore, you have to set the NARWHAL_ENGINE variable in your ~/.profile file and reload your environment :

# add this line to your ~/.profile file
export NARWHAL_ENGINE=jsc

Then reload your environment :

$ source ~/.profile

And run :

[jake]$ sudo env CAPP_BUILD=$CAPP_BUILD NARWHAL_ENGINE=$NARWHAL_ENGINE jake install

Again here, we make sure both the CAPP_BUILD and the NARWHAL_ENGINE variables are preserved.

Test it

If everything went smoothly, you should be able to create a brand new Cappuccino app and test it in your browser :

$ cd ~/Desktop
$ capp gen HelloJake

It is a good idea to test it with your existing apps too. Let's say you have a Cappuccino app in the MyApp folder :

# we will overwrite the Frameworks directory, so it may be a good idea to backup your app
$ cp -R MyApp MyAppTestJake
$ capp gen -f MyAppTestJake --force

Then test your app and please report any problem. Thanks in advance for your feedback!

This Week in Edge Cappuccino (24)

See last post here.

October 22 - October 28, 2009 Edition

There have been 32 commits in the master branch.

  • Added support to nib2cib for specifying the "Nib Name" property of the View Controller palette to enable view controller initialization from cibs. The commits : here, here, here
  • You now get an alert when you try to close unsaved CPDocument. The commits : here, here, here

Cashflow App goes Cappuccino

In case you missed it, I'm co-developing a cash flow management application that will be a Webapp + iPhone app.

We recently decided to rewrite the Webapp with Cappuccino. You can follow our development process on our new blog at cashflowapp.com. You can also follow our updates via Twitter (@cashflowapp).

This Week in Edge Cappuccino (23)

It has been a long time since I wrote a "This Week in Edge Cappuccino" post, so this one will try to sumarize 4 months of commits in the master branch. Feel free to comment if I forgot something important.

See last post here.

June 18 - October 21, 2009 Edition

There have been 309 commits in the master branch.

This Week in Edge Cappuccino (22)

See last week post here.

June 11 - June 17, 2009 Edition

There have been 9 commits in the master branch.

  • Fix for superview's not remaining mouseEntered when mouse moves over subviews. The commit : here.
  • Added removeObjectsInArray: convinience method to CPMutableSet. The commit : here.

This Week in Edge Cappuccino (21)

See last week post here.

June 5 - June 10, 2009 Edition

There have been 14 commits in the master branch.

  • CPToolbarItem gets a fix for its image view not displaying their image. The commit : here.
  • We now get a CPSearchField, thanks to cocoadev. The commits : here, here and here.
  • CPImageView now accepts image drag and drop. The commits : here and here.

This Week in Edge Cappuccino (20)

See last week post here.

May 28 - June 4, 2009 Edition

There have been 23 commits in the master branch.

  • CPEvent gets some optimization for mouse event handling. The commits : here and here.
  • CPJSObjectCreateJSON and CPJSObjectCreateWithJSON have been deprecated. You now have to use : JSON.stringify() and JSON.parse() instead. The commits : here and here.

Deploying multiple environments on Heroku (while still hosting code on Github)

As mentioned in an earlier post, Cashflow App is now hosted on Heroku.

The main repository for my code is still hosted on Github. This is where I manage/version it.

When you create an application on Heroku, it is automatically associated with a git repository hosted on Heroku. Deploying changes to your application is as simple as pushing your code to the associated git repository.

Here is a schema of what I want to achieve :

In this post, I will explain how I use Github to version my code and Heroku to deploy it, with 2 different environments. You may also read this article that explains how to deploy your application on Heroku and this one that also explain how to deal with multiple environments.

Setup different environments on Github

On Github, I want to work with 2 branches : a master branch for production and a staging branch for testing. The master branch is what you get when you first clone your repository :

git clone git@github.com:account_name/repository_name.git
cd repository_name
[master]$

To create a staging branch, just do :

[master]$ git checkout -b staging
Switched to a new branch "staging"
[staging]$

Then push your local staging branch to Github :

[staging]$ git push origin staging
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:account_name/repository_name.git
* [new branch]      staging -> staging
[staging]$

You should now have 2 branches on Github

Create the Heroku Staging App

Now, I will create a Staging app on Heroku. This will create a git repository. I will only push code to this repository when I want to deploy modifications to the Staging app.

[staging]$ heroku create myapp-staging --remote heroku-staging
Created http://myapp-staging.heroku.com/ | git@heroku.com:myapp-staging.git
Git remote heroku-staging added
[staging]$

You'll notice that I specified a custom remote name : heroku-staging. It will allow you to specifically deploy your code to the Staging app.

Your .git/config file should now look like this :

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git@github.com:account_name/repository_name.com.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "heroku-staging"]
url = git@heroku.com:myapp-staging.git
fetch = +refs/heads/*:refs/remotes/heroku-staging/*

Create the Heroku Production App

Go back to the master branch :

[staging]$ git checkout master
Switched to branch "master"
[master]$

Create the heroku prod app :

[master]$ heroku create myapp-prod --remote heroku-prod
Created http://myapp-prod.heroku.com/ | git@heroku.com:myapp-prod.git
Git remote heroku-prod added
[master]$

Your .git/config file should now look like this :

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git@github.com:account_name/repository_name.com.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "heroku-staging"]
url = git@heroku.com:myapp-staging.git
fetch = +refs/heads/*:refs/remotes/heroku-staging/*
[remote "heroku-prod"]
url = git@heroku.com:myapp-prod.git
fetch = +refs/heads/*:refs/remotes/heroku-prod/*

Deploy the Staging app

The Staging app on Heroku is linked to the heroku-staging remote. You'll want to push the code from your staging branch to the heroku-staging/master branch, as show in the first schema :

[master]$ git push heroku-staging staging:master
...
To git@heroku.com:myapp-staging.git
* [new branch]      staging -> master
[master]$

staging:master means that you push your staging local branch to the master remote branch. Here, the remote branch is heroku-staging, which is linked to the staging app.

Migrate the staging db :

[master]$ git checkout staging
Switched to branch "staging"
[staging]$ heroku rake db:migrate --app myapp-staging

Deploy prod app

[staging]$ git checkout master
Switched to branch "master"
[master]$ git push heroku-prod master
...
To git@heroku.com:myapp-prod.git
* [new branch]      master -> master
[master]$

Migrate the prod db :

[master]$ heroku rake db:migrate --app myapp-prod

Make some changes in staging and deploy them

First, switch to the staging branch, and make your changes.

[master]$ git checkout staging
Switched to branch "staging"
[staging]$ make your change
[staging*]$ git commit -a -m "test staging modification"

Then push your modifications to the staging branch on Github :

[staging]$ git push origin staging

Finaly, deploy your modifications to the heroku staging app

[staging]$ git push heroku-staging staging:master

Make some changes in production and deploy them

Switch to the master branch, and make your changes.

[staging]$ git checkout master
Switched to branch "master"
[master]$ make your change
[master*]$ git commit -a -m "test production modification"

Then push your modifications to the master branch on Github :

[master]$ git push origin master

Finaly, deploy your modifications to the heroku prod app

[master]$ git push heroku-prod master

Feel free to comment this solution and to share your tips here.

This Week in Edge Cappuccino (19)

See last week post here.

May 21 - May 27, 2009 Edition

There have been 20 commits in the master branch.

Cashflow App : a preview at WWDC?

For those of you who were asking, here's a quick update about the Cashflow App development.Things are going well, we took some infrastructure decisions, the presentation Website and the logo are almost done, we're refining the UI and we hope to have something to show at WWDC in 12 days.

About infrastructure

Initially, both Cashflow App's servers (Staging and Production) were 256Mb slices hosted at Slicehost set up with Ubuntu Machine. And then, a few weeks ago, we heard about Heroku announcing their commercial launch.The timing was perfect and Heroku's technology seemed too interesting not to give it a chance. After some initial testing, I've migrated the 2 slices to 2 Heroku applications (Staging/Production). Even though Heroku offers git repository hosting, I do prefer to keep things separated, so the code is still hosted at Github. I'll explain in a later post how I manage the different git branches with the different Heroku applications.

Talking about Github, we also migrated our issues from Lighthouse to Github, with this small piece of code I wrote some weeks ago. Github issues is a very simple and flexible solution that better suits our needs.

Presentation Website and Logo

We were lucky enough to work with a great designer who really understood our strong desire for simplicity. He did a great job with our logo and presentation Website.

You'll soon be able to see it live and to signup for our beta release (we don't have a date yet).

Features and User Interface

It's interesting and hard at the same time to select the features that will made it to the first release.

Scott Stevenson, from Theocacao had this interesting quote : "Once you've come up with a UI concept for a 1.0 version, try to imagine how 2.0 would look and work better, and consider making that 1.0."

Our aim for the first release is to provide a well thought app with a clean user interface and enough features and polishing so that people will find it useful and pleasant to use. We have many ideas about the app functionality, but we do not want to make too many assumptions before people really start to use it.

We are really excited about the early feedback we will receive.

A preview release at WWDC?

We are working really hard to try to have a preview release at WWDC on June 8th. We'll first give access only to a few selected people, then we'll send some beta invitations in batch.

In the meantime, follow us on Twitter : @cashflowapp or @tbalthazar to stay tuned.

This Week in Edge Cappuccino (18)

See last week post here.

As you surely have noticed, Cappuccino 0.7 has been released. This means that 0.7 is now in the master branch.

May 14 - May 20, 2009 Edition

There have been 55 commits in the 0.7b master branch.

  • CPBezierPath has been added to the repository. The commits : here and here.
  • Support for radion buttons and checkboxes has been added. See Francisco's announcement for more information. The commits : here, here, here, here, here and here.
  • CPURLConnection now has support for app: protocol, for use with Titanium, and it's delegate methods are now optional. The commits : here and here.
  • The capp command gets some new options. Read Fancisco's announcement for more info. The commits : here and here.
  • HUD has been added to Aristo. The commits : here and here.

This Week in Edge Cappuccino (17)

See last week post here.

May 7 - May 13, 2009 Edition

There have been 32 commits in the 0.7b branch.

  • CPSegmentedControl has been added to Aristo. This class implements a horizontal button made of multiple segments. The commits : here, here, here, here and here.
  • CPSecureTextField gets some love in IE. The commit : here.
  • nib2cib gets some fixes too. The commit : here.
  • The theme API has been finalized. The commits : here and here.
  • The build tools now run on an abstraction layer called Narwhal. More information can be found in Tom's announcement and of course in the commits : here, here, here and here.
  • The capp command now uses CAP_BUILD if present. It still checks for STEAM_BUILD if CAPP_BUILD is not found. Can you feel 0.7b coming? The commit : here.
  • CPURLConnection was calling didFailWithError for HTTP responses other than 200. didFailWithError is now called only if the request fails completely. The commit : here.

This Week in Edge Cappuccino (16)

See last week post here.

April 30 - May 6, 2009 Edition

There have been 20 commits in the 0.7b branch.

  • CPTexField gets some love : the placeholder string for CPSecureTextField no longer shows up as bullets, controlTextDidChange is now correctly fired, and there is also some bugfixes for IE (text selection) and Firefox. The commits : here, here, here and here.
  • MainMenu.cib is now loaded automatically. The commit : here.
  • CPDictionary has 2 new methods : initWithObjectsAndKeys and dictionaryWithObjectsAndKeys. The commit : here.
  • Windows are now forced to stay in the bounds of the browser window. The commit : here.
  • Highlight state and broken images resources have been fixed for CPMenu. The commits : here and here.
  • CPButton now has a sizeToFit method. The commit : here.

Tickets have been migrated from Lighthouse to Github, so, from now, browse them and report bugs on Github.

This Week in Edge Cappuccino (15)

See last week post here.

April 23 - April 29, 2009 Edition

There have been 5 commits in the 0.7b branch.

This Week in Edge Cappuccino (14)

See last week post here.

April 16 - April 22, 2009 Edition

There have been 14 commits in the 0.7b branch.

  • The color panel gets some love with a new opacity slider and some bugfixes. The commits : here, here and here.
  • CPSlider now has a CPCircularSlider and some fixes (sliders now works with nib2cib). The commits : here, here, here and here.
  • CPSecureTextField has been added to nib2cib. The commits : here and here.
  • XCode now has syntax coloring and text completion. The commits : here and here.

[updated] Move your tickets from Lighthouse to Github

Github has recently released an integrated issue tracking system which looks very promising. They also updated their API (which now has an Issus API section).

I decided to quickly write a small script that allows you to migrate your tickets from Lighthouse to the new GitHub issues tracker. This script will :

  1. search for open tickets in your Lighthouse project
  2. create a new issue for each Lighthouse ticket in your Github project
  3. apply the following labels to the each newly created Github issue :
    a. the corresponding Lighthouse ticket tags
    b. the corresponding Lighthouse ticket milestone
    c. the corresponding Lighthouse ticket assignee
    d. the corresponding Lighthouse ticket state
    e. a "from-lighthouse" label

Each newly created Github issue will also have a direct link to the corresponding Lighthouse ticket in its body.

Since the Github API does not currently allow to create issue comments, the Lighthouse ticket comments will simply be added in the Github issue's body (with some basic formatting to distinguish them from the initial ticket's body). [1]

This script needs the Lighthouse-api gem to be installed :

$ gem sources -a http://gems.github.com
$ sudo gem install Caged-lighthouse-api

Then, just download my script from here :

http://github.com/suitmymind/lighthouse-to-github/tree/master

$ git clone git://github.com/suitmymind/lighthouse-to-github.git

It is fairly easy to use and easy to configure, you'll find the following lines at the beginning of the script :

# -------------------------
# --- Lighthouse configuration
LIGHTHOUSE_ACCOUNT      = 'YOUR_ACCOUNT_NAME'
LIGHTHOUSE_API_TOKEN    = 'YOUR_API_TOKEN'
LIGHTHOUSE_PROJECT_ID   = YOUR_PROJECT_ID
LIGHTHOUSE_TICKET_QUERY = "state:open"

# -------------------------
# --- Github configuration
GITHUB_LOGIN      = "YOUR_ACCOUNT_NAME"
GITHUB_API_TOKEN  = "YOUR_API_TOKEN"
GITHUB_PROJECT    = "YOUR_GITHUB_PROJECT_NAME"

That's all you need to configure. You'll learn how to get your Github token here, and how to get your Lighthouse token here. To find your Github project name, have a look at your Github URL :

http://github.com/suitmymind/ubuntu-machine/tree/master

Here 'ubuntu-machine' is the project name (it seems that Github project name with a dot in the name do not work for the moment).

To find your Lighthouse account name and project ID, just have a look at a Lighthouse URL :

https://suitmymind.lighthouseapp.com/projects/22483-ubuntu-machine/overview

Here 'suitmymind' is the account name, and '22483' is the project ID.

When you have downloaded and configured the script, all you have to do is to run :

$ chmod 0755 migrate-lh-to-gh.rb
$ ruby migrate-lh-to-gh.rb

It can take quite a long time denpending on the number of tickets you have to migrate.

The script is surely not perfect, but I hope I can improve it with your feedback.

Feel free to improve this script or to post bug reports. Your feedback is more than welcome.

I hope you'll find it useful!

[update 1] : the Github API now allows to create comments, so Lighthouse comments are now migrated to Github comments.

[update 2] : some more improvements and bugfixes :

  • the number of attachements in Lighthouse is now specified in the Github ticket's body
  • the dot (.) in label names is converted as •, since I cannot manage to create labels with dots through the API
  • there is a distinction for 'special' labels :
    • LH milestones now begins with |M| (e.g. : '|M| 0.7')
    • LH states now begins with |S| (e.g. : '|S| assigned')
    • LH assignees now begins with @ (e.g. : '@Thomas Balthazar')
    • LH tags that begins with @ now begins with #, to avoid confusion with the @assignee convention)

An update about Cashflow App

It has been a while since I talked about Cashflow App. I've been really busy these days. I had lot of client work to do. I also spent a lot of time with a terrific band from Brussels. I kept on improving Ubuntu Machine (which I of course used to setup the Staging server for Cashflow App) and I continued to contribute to Cappuccino (which ... hmm, I'll talk about that later). But I never stopped working on Cashflow App.

I'm not alone (anymore)

Cashflow App - Lighthouse Ticket Bins It's sometimes hard to keep the focus when you work alone on a project, without any feedback but yours, without any encouragement but your cup of cofee in the morning. And it's hard to find the right person to work with, a person you trust and you share lots of opinions with. I'm pleased to announce that I now team with TMK, from Exidia. TMK is a very kind person and a very talented fellow developer I met some years ago. He is the person who made me switch (it was Jaguar time, around 7 years ago). We now work together half a day each week, besides our alone work time. We use great tools such as Lighthouse to get things done, stay focused, and deliver a beta version as soon as ... it is ready.

For iPhone too

Your read it, Cashflow App will be a Webapp + an iPhone app. We're very excited to work together to bring you a lean and easy way to manage your cashflow at your desk or directly in a restaurant/shop/...

If you want to be informed how things are moving, you can follow @tbalthazar (me) or @cashflowapp on Twitter. I'll of course update this blog too, so you can subscribe to the RSS feed if you want, or signup to the newsletter.

This Week in Edge Cappuccino (13)

See last week post here.

April 9 - April 15, 2009 Edition

There have been 24 commits in the 0.7b branch.

  • CPTextField and CPSecureTextField are being rewritten (There are still some issues in IE). They are now surrounded by a blue focus ring when they are selected. The commits : here, here, here and here.
  • Support for key views and tabbing has been added. The commits : here, here, here and here.
  • Functions that showed up as anonymous in the Safari console now have a "pretty" name. The commit : here.

This Week in Edge Cappuccino (12)

See last week post here.

April 2 - April 8, 2009 Edition

There have been 15 commits in the 0.7b branch.

  • CPView, CPClipView and CPDragServer now have support for autoscroll. It will allow the view to scroll while you are dragging an element beyond the document view. The commit : here.
  • CPColor gets some improvement with a new isEqual method and some color caching. The commits : here and here.
  • You can now specify that CPCollectionView allowsEmptySelection, which means that if you click anywhere in the CPCollectionView but on an item, the selection will be emptied. The commit : here.
  • Menus get some shadow support improvements. The commits : here, here and here.

This Week in Edge Cappuccino (11)

See last week post here.

March 25 - April 1, 2009 Edition

There have been 26 commits in the 0.7b branch.

  • A default Cappuccino application now has a "JavaScript is required" message that links here in case your browser doesn't support JavaScript. The commits : here, here and here.
  • CPAttributedString's documentation has been improved. The commit : here.
  • shebang has been changed to bash in the tools shell scripts which should now run smoothly on Mac OS X and Linux. Shell scripts on Windows should soon be replaced by batch files. The commit : here.
  • ojunit has been added as a git submodule. run rake submodules then rake test to run the tests. The commits : here, here and here.
  • CPTextField which was broken in the initial 0.7b release has been improved (it is now editable again). The commit : here.
  • Some bug fixes in drag and drop, the commits : here and here.

Search your Delicious bookmarks, a bookmarklet

I just wanted to share this small bookmarklet I created to search my Delicious bookmarks :

javascript:var query = prompt('Search delicious :'); location.href='http://delicious.com/search?context=userposts&p=' + encodeURIComponent(query) + '&lc=1&u=USERNAME' ;

You can drag and drop it on your bookmark bar from here : seach delicious, then replace USERNAME by your Delicous username.

I hope you'll find it useful.

This Week in Edge Cappuccino (10)

See last week post here.

Cappuccino 0.7b

This week, Cappuccino 0.7b has been announced. It represents a lot of changes, a lot of commits. Unfortunately, I cannot find the time to go through all of them. So, what I'll do this week is recap what are the main changes and give you some pointers to the code. Next week, I'll start to go through the commits in the 0.7b branch as I usually do.

Theme support

As mentioned in the original 0.7b announcement, theme support is still very early and its difficult to not use the built in theme. Here are links to the Cappuccino theme implementation classes : AppKit/CPTheme.j and AppKit/CPThemedAttribute.j. With 0.7b, you also get an early version of the Aristo theme, designed by the Sofa team. Here are some interesting threads on the mailing-list about themes : here and here.

Platform support

Objective-J is now able to ship separate code for different platforms. This will allow low level frameworks, such as AppKit, to be implemented differently depending on the destination environment (iPhone, browser, command line, ...). This shouldn't have too much incidence on your code.

New build system

The build system now uses Rake instead of steam and ant. The new dependencies to build version 0.7b are java, gcc, ruby, rubygems and the plist gem. (You'll also need git installed if you want automated setup for ojunit)

On Mac OS X, java, ruby and rubygems are installed by default. On Ubuntu Linux, you have to install them. Here are the commands that worked for me. I've also published a screencast that explains how to build 0.7b.

Capp

Steam has now been replaced by capp. To create a new Cappuccino application, all you have to do is capp my-app. You can also use the capp command to create a new Cappuccino project based on a Nib file : capp my-app -t NibApplication. Here is an interesting thread about Nib files.

Beta

A lot of work has been accomplished for this release, but remember that it is still beta. You're more than welcome to help test it and report bugs, discuss it on the mailing-list and on IRC.

Feel free to post your comment to this post if you think something important is missing.

This Week in Edge Cappuccino (9)

See last week post here.

March 12 - March 18, 2009 Edition

There have been 2 commits in the master branch.

  • CPCollectionView is now selectable by default. The commit : here.
  • The CPString pathComponents method now matches the Cocoa version : it returns an array of strings containing, in order, each path component. The commit : here.

This Week in Edge Cappuccino (8)

See last week post here.

March 5 - March 11, 2009 Edition

There have been 16 commits in the master branch.

  • The Doxygen documentation is being improved. The commits : here and here.
  • The documentation for CPObject, the root class for most Cappuccino classes has been improved. It now explains how to override the init and description methods.The commit : here.
  • CPControl now has support for tooltip. The commits : here and here. (But this change has been reverted for the moment, the commit : here).

This Week in Edge Cappuccino (7)

See last week post here.

February 26 - March 4, 2009 Edition

There have been 7 commits in the master branch.

  • CPDate now has support for UNIX epoch initialization. The commits : here and here.
  • CPColor now accepts 3 chars hex values. The commit : here.

Keep them coming guys!

This Week in Edge Cappuccino (6)

See last week post here.

February 19 - February 25, 2009 Edition

There have been 2 commits in the master branch. There hasn't been any significative change in the Cappuccino master branch this week, but as you may already know, the 280 North guys made a big announcement this Tuesday at FOWA. They announced Atlas. Watch the screencast which is more than self explanatory. I'm pretty sure I'll have much more work to do for the This Week in Edge Cappuccino serie in the upcoming weeks. Guess what! I'm excited!

This Week in Edge Cappuccino (5)

See last week post here.

February 12 - February 18, 2009 Edition

There have been 3 commits in the master branch.
  • CPSplitView now has support for autoresizing its inner subviews. The commits : here and here

Update : There have been lots of commits in Francisco's repository which means we can expect great improvements in the next weeks. Read more about the upcoming changes in this announcement.

This Week in Edge Cappuccino (4)

See last week post here.

February 5 - February 11, 2009 Edition

There has been 1 commit in the master branch.

  • CPView now has convenience methods for full screen. The commit : here.

This Week in Edge Cappuccino (3)

See last week post here.

January 29 - February 4, 2009 Edition

There have been 16 commits in the master branch.

  • The CPCollectionView gets new accessor methods for numberOfRows, numberOfColumns and verticalMargin. The commits : here and here.
  • CPAlert can now be styled. The commits : here, here and here.
  • The CPTextField placeholder string has been fixed. The commit : here.
  • A CPView can now be centered according to a given point, and you can also get the center point of a given view. The commits : here, here and here.
  • CPString now has a UUID (Universally Unique IDentifier) generator. The commits : here and here.

This Week in Edge Cappuccino (2)

See last week post here.

January 22 - January 28, 2009 Edition

There have been 23 commits in the master branch.

  • The CPCountedSet class has been created. A counted set is an unordered collection of elements that aren't necessarily distinct. The commits : here and here.
  • A close button has been added to the standart window look (_CPStandardWindowView). The commit : here.
  • _CPImageAndTextView now has support for vertical alignment, text shadows, and is being integrated into CPButton. The commits : here, here and here.
  • Some placing and spacing issues have been fixed in CPPopUpButton. The commits : here and here.

cappuccinocasts.com : free Cappuccino screencasts

I just launched cappuccinocasts.com, a free serie of Cappuccino screencasts.

Your feedback is welcome!

Track files that are downloaded from you website with Google Analytics

This is just a small Javascript snippet I'd like to share. It allows you to track links that lead to file downloads (e.g. links to .mov, .m4v, .pdf, ... files) with Google Analytics (with the latest version of the tracking code, not the old urchin code). It requires the prototype library.

Add this just before the </body> tag to track links to .mov and .m4v files :

1 var links_to_track = $$('a').grep(/[(\.mov)|(\.m4v)]$/) ;
2 
3 links_to_track.each(function(a) {
4     a.observe('click', function() {
5         pageTracker._trackPageview(a.href);
6     });
7 }) ;

Feel free to comment this solution.

This Week in Edge Cappuccino

In an effort to learn Cappuccino and be an active member of its development community, I'd like to start a "This Week in Edge Cappuccino" serie on this blog. It has been inspired by the "This Week in Edge Rails" serie.

Since I'm quite new to Cappuccino, I hope some more experimented developers will comment here and correct me if I'm wrong. I hope these posts will get better and better as I dig deeper into Cappuccino.

I'll only comment the most interesting and significant changes in the code.

January 15 - January 21, 2009 Edition

There have been 27 commits in the master branch.

  • The rounded style CPTextField (CPTextFieldRoundedBezel) had incorrect positioning. It is now displayed correctly. The commits : here, here and here.
  • Local documents can now be opened by Cappuccino document apps. CPURLConnection.j now has a method to test if the connection is established with a local file (file:). The commits : here and here.
  • Experimental support for dependent keys has been added to KVO (Key-Value Observing). Consider the case of a method that returns a person's full name by combining the first and last names. The fullName property is dependent on both thefirstName property and the lastName property. Anytime the value of firstName or lastName changes, an observer notification must be sent for thefullName property (As explained here). The commits : here, here and here.
  • CPBundle.j now load files much more efficiently. The commit : here.
  • KVC (Key-Value Coding) + KVO (Key-Value Observing) support for "To Many" keys added. The commits : here and here.
  • Changes were made to the Cappuccino Tools, and press (who was broken for a while) has been fixed. The commits : here, here, here, here and here.
  • CPButton fired actions and drawn the alternate image when disabled. The commits : here, here and here.

Feel free to comment, I'll be glad to update this post.

From mockup to screen

About 1 month ago, I wrote about the mockup tools I use and showed the first mockup for the Cashflow App I'm developing.

Time has passed, and I've been pretty busy with Ubuntu Machine, my small Cappuccino contributions, some client works, ...

But I want to show you the first working screen of Cashflow App. It is very rough, not sexy at all, but allows me to test the app functionalities and the way of organizing them before I revamp this layout (it has already started, I'll talk about it later).

So stay tuned, more to come later.

Ubuntu Machine updated : v0.3.1

Here is the changelog :

0.3.1 : - Jan 18th 2009

  1. REE is added to the default path (tickets : #12 and #13)
  2. REE updated to the latest version : ruby-enterprise-1.8.6-20090113 (you should update your deploy.rb file accordingly or re-download it from here.)
  3. The GitHub commit

To update, to the latest version :

# Make sure you have already done this :
# Add GitHub to your gem sources
$ gem sources -a http://gems.github.com

# Then update the installed gem
$ sudo gem install suitmymind-ubuntu-machine

Ubuntu Machine updated : now working with Ubuntu 8.1

Ubuntu Machine has been update and now works with Ubuntu 8.1 (it still works with Ubuntu 8.0.4).

There were some minor differences in the install process between 8.0.4 and 8.1. You can see the modifications on Github.

To update the gem, just run :

$ sudo gem install suitmymind-ubuntu-machine

The full installation instructions can be found here.

Thanks everybody for the feedback, keep it coming.

A quick reminder :

    <li><a href="http://groups.google.com/group/ubuntu-machine">the mailing-list</a></li>
    <li><a href="http://suitmymind.lighthouseapp.com/projects/22483-ubuntu-machine/overview">the bug tracker</a></li>
    <li><a href="http://twitter.com/suitmymind">updates on Twitter</a></li>
    

Ubuntu Machine released

Ubuntu Machine is a set of Open Source Capistrano recipes - packaged as a gem - that allows you to automate the setup of a machine running Ubuntu Server 8.0.4. Those recipes allows you to easily install/setup : SSH, iptables, MySQL, Apache, PHP, Ruby (+ Ruby Enterprise Edition), Rails, Phusion Passenger, and Git.

Ubuntu Machine is released as an Open Source project (as mentioned in an earlier post) :

It has been tested on a Slicehost slice, and on an OVH RPS.

You can watch the screencast here :

Download the iPhone version or the full quality version.

I'll be glad to hear your feedback here or on the mailing-list.

The decision to open source code

I've always used Open Source code. I've used Linux for a long time, I work with Ruby on Rails, I use Firefox, ...

I've never released some of my work to the open source community. I personally think that this is not an easy task. I want to be proud of my code. I want it to be perfect, because other people will possibly see it, use it, modify it. I know this is not the best attitude to have, but it's not always easy to overcome this fear.

Open-sourcing also requires time. You've got to extract the code from your project to open-source it. You've got to document it a little, if you want others to be able to use it, and to contribute.

I've decided to release one of my small projects to the Open Source community. It is surely not perfect, it won't be useful to everyone, but it will be released soon (January, 2009).

Right now, I'm documenting it, screencasting it.

I'll keep you posted, on this blog and on Twitter : http://twitter.com/tbalthazar

About mockups

When I've an idea about a Webapp, it's always hard for me not to start coding directly. But it's always better to visualize the screen you want to build before firing up the text editor and start coding.

Sometimes I use a paper and a pencil, sometimes I code directly the screens in goody old HTML + CSS. While those solutions did the trick, I wasn't totally confortable with them. The paper solution works fine for me for the very first mockup, but it's not that handy when you want to move screen parts around.

This is the very first mockup I did for Cashflow App :

Building the early mockups in HTML do not work well for me neither because it take me too much time, and my hands are already too much "in the code".

A few weeks ago, I heard about Balsamiq Mockups. It is an Adobe Air (which I usually don't like that much) application, but it's incredibly easy to use, easy to learn, and it gives you a quick and lean result. The guy behind this app is an Italian based in San Francisco, and he has a very interesting blog.

Here is the very first screen I designed for my Cashflow App :

It was done in a few minutes (I thought about it a little longer than that). It allowed me to quickly get real and start coding, having a clear and simple target. It's priceless.

Feel free to share your experience with mockup tools here.

Why a cashflow app?

Cashflow often sounds like a buzz word only used by big companies. It isn't. The cashflow is the amount of money that you earn and that you spend. Your cashflow defines your liquidity. Your liquidity is what pays your rent/loan. Your liquidity is what pays your food. It is a very important thing to care about.  If you are freelance, if you run a company, you've got to keep an eye on your cashflow.

Why I pay attention to my cashflow?

Ryan Carson wrote an interesting article about the importance of the cashflow a few years ago. (The Excel file linked  in his article is no longer available, so I uploaded it as a Google Spreadsheet. You can download it freely by choosing File > Export > .xls)

I read this article at a time when I hadn't started my company yet. (I did 7 months after this article was published).  I now really pay attention to my cashflow. It allows me to know if I've got to be anxious about the upcoming bills. It allows me to be more relax, knowing what I've got to do in the next few months.

Cashflow management tools

I've used Ryan's spreadsheet for some months. It was very handy to start paying attention to my liquidities, but I don't really enjoy using spreadsheets. Later, I heard about Pulse, a cashflow management Webapp. They did a great job building it and blogging about their development process. I used it to manage my cashflow some times after they launched, but it is still not the best tool for me.  I've been thinking about developing my own cashflow management app for quite a long time :   I think this time has come.

Why this blog?

I've created this blog some time ago, and I haven't paid much attention to it. It was not publicly available. I hadn't the time, and I hadn't that much to share.
I've decided to give it a boost now.
In fact, I've decided to use this blog to give a boost to one of my projects : I want to develop a Web application.
As many developer, I've started several Web applications without finishing them (I mean without releasing them to the public).
This happened for several reasons, between not being happy with the result and being overbooked with client works.
This time, I want things to happen differently. I want to make this blog public very soon. I will talk about the Webapp I develop here.
This Webapp will allow me to manage my cashflow.

Talking Heads

great video, a great show and a killing scenography!

Max Roach

So long, Max. Keep one eye on us, son.

About time

Work expands to fill the time available.

Parkinson's law

About software complexity

The most important rule of software engineering is also the least known: Complexity does not scale linearly with size… 2000 line program requires more than twice as much development time as one half the size.

— The Ganssle Group (from Keep It Small)

A wide screen

Screen I've been waiting for a long time before I made up my mind. I've bought an external display to work with my MacBook Pro, and I definitely do not regret it! It is a huge comfort I'd recommend to everybody!