I have an exciting announcement today.

I am releasing the source code for PhotoBook.
As you may know, PhotoBook is a Facebook photo browser for Mac.

All code is being released under the MIT license (guess why :) ). Unlike the GPL, this license allows for a lot of flexibility with what can be done with the code.

Visit the Google Code project page for more details and to download the source.

I have two main goals in doing this:

  • First, PhotoBook is freeware and I don’t have a particularly strong reason as to why I should hold onto the source. By releasing it into the wild, I hope other Cocoa developers will find some use for it in their own projects. The license allows pieces of code to be used in other applications (free or for profit) with few restrictions. It is a small thank you for all the other open source code I use and love.
  • Second, I hope this will help foster faster development. There has not been a new release in nearly seven months due to school and other projects. I know the time I will be able to spend working on PhotoBook will decrease even more next year. So, by making it a community based project, others will be able to help fix bugs, add new features, etc. I have already been in contact with one developer working on an amazing, revolutionary feature that you have never seen before in a photo application.

If you are interested in joining the project, checkout the code. Post patches on the Google Code page, or send me an email (adam [at] [this domain].com), and I’ll add you as a developer so you can make commits.

I should note that I did not originally plan to release the source to PhotoBook, so it is not as commented and such as I would like, and some features are implemented in special (read:lazy) ways. I will work on this soon.

The code currently in the repository is basically the 1.1 source with a few bug fixes.

If the project takes hold, it should be really exciting. I welcome any feedback.

Also, look for some more open source announcements in the near future.

1 Comment | Category: Cocoa, PhotoBook

I love this idea.

The result of one week of work:

(Click to enlarge)

  • That’s my brand new MacBook Pro :)
  • Yes, there is a Mathematics and Sex book on my desk. It was a gift, ok?
  • There is a screenshot of my project in there. See if you can find it!

No Comments | Category: Uncategorized

Hurray, I’m not dead!
Yes, that’s right. Despite an impossibly long period of total invisibility on the interwebz, I am still here.
Basically, I have been busy with school, and all my programming stuff has been pushed down to a pretty low priority.
(By the way, free iPhones, computers, etc., might very well prevent this from happening again :)).

So, you might have noticed that I chose a new theme for this blog. It is called Abstracta, and was designed by Rob Goodlatte. I love it. Very pretty and clean.

Ok, so update time:

  • I am officially a member of the MIT class of 2012! I’ll be off to Boston in the fall to meet lots of people smarter than me as I learn that I HTFP
  • Almost as exciting, I have not gotten anything done on Web Importer or PhotoBook. You’ll see so many updates this summer, I swear! I have like totally nothing to do until the end of August.
  • But I have done a little work on Adium. Look for live contact list searching in the next release (1.3)

And now… story time!

So, a couple of weeks ago, I finished all my AP tests (which, if you don’t know, are classes+tests high school students take in particular subject areas that are supposed to be “college level.” I took AP English Lit, AP Calculus BC, and AP Physics C). After those tests, we have very little work left to do for the last 5ish weeks of school, so my physics teacher gave us a Sudoku (probably to keep us quiet). I have never done a Sudoku before, and needless to say, I could not get the 5 star one she gave us. Frustrated, I sort of forgot about it.

Then, last weekend was Prom. All the girls, and I suppose some of the guys, felt the need to go through the predictable ritual of spending hundreds on hair and plastering themselves in makeup. I was quite bored, and instead of doing something normal like going outside or seeing a movie or something, I decided to revisit that Sudoku. Now, instead of doing something a typical antisocial sudoku player would do, like spending another hour trying to solve it, or something a self-conscious antisocial sudoku player would do, like going online and cheating to find the solution, I decided to be a self-conscious, antisocial, geeky sudoku player and write my own Sudoku solver.

Luckily, I had recently seen this xkcd comic, so I felt a bit better about myself.

And just before I left for fun pictures and such, I had a working Cocoa sudoku solver that solved the puzzle in about a quarter of a second.

I added some finishing touches this week, so I thought I might as well put it up here and release the code.

Don’t expect anything amazing or original. This just uses what is basically a brute force algorithm to solve the puzzle. And, even that algorithm is written very poorly and is quite ugly. If you are looking for a useful Sudoku solver, just search Google. There are tons of really good human logic sudoku solvers available.

But mine, of course, is better.

If you are learning Cocoa, this project demonstrates these topics:

  • Interface Builder and standard controls
  • Using an NSMatrix to lay out a grid of NSCells (81 Sudoku boxes)
  • Using NSNumberFormatters (to ensure that only the integers 1-9 can be entered into a box)
  • Basic threading with NSThread (the solving algorithm runs in the background in its own thread)
Download the pre-built application
Download the Source Code (BSD License)

2 Comments | Category: Cocoa, randomness

So, first about this supposed I-Phonographer SDK thing.

Ahhh, it is so cool! I was able to get it working on my non-intel iMac thanks to this. I haven’t looked at it that much, but from what I have seen and tried, it looks really amazing. I am thinking I want to make an iPhone app this summer. It might be a PhotoBook Touch that behaves just like the default Photos application. It would also have upload support, so you can snap a photo with the iPhone camera, and upload it instantly to Facebook.

It might also be something totally different. If you have any cool ideas for an application you want to see on the iPhone, let me know, and I might just make it.

Web Importer is coming along, just not as quickly as I would have liked. I have found very little time recently to work on it. I am also going to Eastern Europe for a couple weeks, which should be really fun, but will delay it even longer. So, hold tight.

I have gotten more than enough people who have asked to beta test it. I really appreciate all the support.

Since my last post, I have written an early version of the Facebook Friend plugin, and I have added plugin preferences (See a screenshot).

Also, I can confirm that “Web Importer” will not be the final name. Some other better and more creative names are coming down the pipeline :).

However, there are still just too many little things left to fix, so I don’t feel comfortable releasing a beta yet. Sorry, but I promise it will be worth it.

No Comments | Category: Uncategorized

The next generation (to be dramatic) of Google Importer is coming along nicely.
Right now, it is code named Web Importer. Whether or not that becomes the final name is dependent solely on if some sudden stroke of creativity hits me (or if anyone else has suggestions, in the spirit of its future fate of being open source).

So, here’s what is done:

  • The backend (minus a few bugs)- Spotlight menu and Finder searches work, the plugin system is ready, results are saved to disk, Spotlight finds them and imports the metadata, etc.
  • The Yahoo! Web Search Plugin
  • The Quick Look Generator- you can use Cover Flow to see thumbnails of all the results, including the logo for the service, the title, and a description. Hit space and you get all the detailed information about the result. Then, double click on the file and it opens instantly in your web browser.

And here is what is left:

  • Preferences. I have only worked on the basics, but all plugins will be fully customizable and extendable.
  • Plugins. Aside from the Yahoo web search plugin, I am planning on shipping it with at least Yahoo image search and Facebook friend plugins
  • All the polish and little details…

So, I am hoping to have a near feature complete beta available soon. Like really soon. Probably. :)
If you are interested in being among the first to try it out, just send me an email (support [at] caffeinatedcocoa [.dot] com)

And what would a teaser post be without some screenshots? (Click for full size)

Web Importer Teaser- Spotlight Menu

Web Importer Teaser- Finder Search

Web Importer Teaser- Quick Look

              

8 Comments | Category: Google Importer

After Daniel Jalkut’s endorsement of Barack Obama and its appearance on the front page of the New York Times, I thought I would follow up with my own opinion. On behalf of everyone at Caffeinated Cocoa (i.e., me) I strongly believe Barack Obama is the best candidate for president.

Obama can bring about real change in this country. He is not talking only about policy change (which I’m sure Hillary could do quite well). He will also change how politics works in Washington. No other candidate has, in recent memory, talked about change like he does.

Even Steve Jobs secretly supports Obama. Seriously, he decided to hide clues all around Apple products. For example, try typing this into Terminal:

echo -e '\0126\0117\0124\0105\n\0117\0102\0101\0115\0101'

(the numbers correspond to the serial of the yet unreleased Apple Tablet I am typing/tapping this on.)

I guess every bit helps….

I’ll be waiting for a call from Obama inviting me to travel on the campaign trail with him and Kennedy…..

2 Comments | Category: randomness

So, in addition to giving you an update on Google Importer, it is about time for another Cocoa post.

Google(Web) Importer for Leopard makes extensive use of the Accessibility API. This may seem a bit weird. Most people would think it would be for things like screen readers and speech recognition, but it can be used for a lot more. For example, the Watch Me Do feature in Automator that lets you record and replay every action you do in an application uses the Accessibility API. Google(Web) Importer will use it to get the search terms from Spotlight and the Finder.

The Accessibility API is great for getting the state of the GUI, such as the location of the mouse, the text typed into a field, or the button a user clicks. It is also great for controlling the GUI, like actually clicking a button or entering text. So, it can really be used in a lot of applications.

(By the way, the front end to the Accessibility API in Applescript is called UI Scripting. Same idea.)

Also, unlike Input Managers (which Google Importer for Tiger used), using the Accessibility API:

  • Is fully supported and documented
  • Works with practically every application (not just Cocoa apps)
  • Should not break between releases, if coded carefully

Now, I don’t think it is necessary to write about how to use the API. It is a C API, but just read the documentation and look at this sample code that demonstrates just about everything.

Instead, I will focus on something else that probably will be purely for the benefit of the mighty search engines…

Aside from being really useful, the Accessibility API is also really powerful and therefore subject to abuse. For example, one could very easily write a keylogger with it. That is probably why Apple decided to disable it by default. To enable it, the user has to open System Prefrences, click on Universal Access, and check the box labeled “Enable access for assistive devices.” Now, there are a couple problems with that approach:

  • It enables access system wide (or user wide, I’m not sure). That means that any application can use it if that little box is checked. In the keylogger example, if the user checked that box to let Automator use it legitimately, the keylogger can also use it without any sort of notification to the user.
  • It is annoying. A user should not be asked to change their preferences just to run your application.

So, Apple came up with another solution in Tiger that solves these problems: the magic function AXMakeProcessTrusted. That will enable the API just for your application and needs to be called from a process running as root, so it is secure. It is also all automatic, so aside from asking the user for his/her password, there is nothing the user needs to do.
The problem is that it seems no one uses it. Every third party application I have seen and even Automator just asks the user to manually check the box in System Preferences. It is more work to implement and has one huge undocumented bug (the application must be relaunched before it is actually trusted Update: reported as #5711990), but I really think people should be using it. So, I thought I would release the code to make it easy to implement it in your app. It includes a helper agent that you should be able to just drop into your project.

Download TrustMe

4 Comments | Category: Cocoa

Yeah, so about this Google Importer for Leopard business.

I am done with college apps and I am now officially a second semester senior! Theoretically, that means more time for programming.
I have started working on it, and it seems to be progressing nicely. Once it is done, I plan to make it completely open source and hopefully have a plugin architecture so developers can make it search information from any website. I am also planning on dropping Google and switching to Yahoo, since they have a much more powerful API (that also means Google Importer will be renamed to something like Web Importer).

So, unfortunately I still cannot tell you when it will be done. I would really appreciate it if people would let me know if they like the path I am taking. If there is a lot of interest for just getting something out, I would be willing to rush a release that has none of these new features, but works on Leopard. Send pleas and candy-flavored bribes to support [at] caffeinatedcocoa[dot]com, or post a comment below.

2 Comments | Category: Google Importer

So, I released PhotoBook 1.1 today. 

That’s right, I finally got some time away from school, college apps, and friends (ha) to code! This release has a few major new features, a bunch of little changes of additions, and a whole lot of bug fixes. Most notably, you can now open almost any Facebook photo or album URL in PhotoBook, and I redesigned the photo viewing window to add easier to use slideshow controls. 

The vast majority of changes in this release were based on suggestions from users like you. So, keep sending me your ideas to support  at caffeinatedcocoa dot com. 

I know a lot of people have been asking about Google Importer for Leopard. I have started working on it, but unfortunately it requires a complete rewrite and Apple didn’t add in a nice API to make it easy. You should be learning more about the project soon. 

By the way, I got an iPod Touch and it is incredible. I can’t wait until February when Apple opens it up to developers. I’m hoping that means all developers, including starving (pre-)college students.  If so, I think PhotoBook Mobile or whatever would be really cool. Let me know what you think.

4 Comments | Category: Google Importer, PhotoBook, randomness

Leopard is out!
I never got the beta, so I am pretty excited to finally have it. As Walt Mossberg put it, Leopard is a evolutionary, not a revolutionary new OS. I would consider only 10.0 and 10.4 to fall under the latter. In my opinion, though, Leopard is the best evolutionary release ever, and exactly what Apple needs. Tiger added a lot of huge features, but lacked polish and consistency. Leopard pretty much leaves no part of the OS untouched. It seems like most every detail has been rethought. John Gruber gives a good example of this. That means a lot of small features will likely be hard to find, but will make the overall experience of using a Mac considerably better. 
But enough of that, there are plenty of Leopard reviews out there. On to my software.

PhotoBook

Good news! It looks like PhotoBook 1.0.2 runs great on Leopard. I am pretty surprised that in my early testing, I did not find any new problems. I probably just need to tweak some of the colors to better match the new window style, and drop in a 512×512 icon for funness in CoverFlow. Thanks Apple for such a clean upgrade.

There are so many new features I can add to PhotoBook that are made possible in Leopard, so I intend to start requiring 10.5 pretty soon. Think better slideshows, smart folders, animations, iChat Theater sharing, etc. Therefore, I will probably put out just one more major release for Tiger before starting to add some of these new features. 

Google Importer 

Bad news (Sorta)! Google Importer 1.0.1 does not work on Leopard. The way things were set up in Tiger required that it use a pretty ugly hack, so it is no surprise it is broken in Leopard.

Google Importer used an Input Manager to “plug in” to Spotlight, get the search terms, and add the Google results to the list. Apple has decided to stop supporting Input Managers in Leopard, so Google Importer never runs for a search.Input managers were a really easy, powerful tool for developers to extend applications without special plugin support. Applications that add features to iChat and Safari, for example, used input managers. The problem is that someone can just as easily build one to take control of an application, without the user ever knowing what is going on. This poses a big potential security threat, so it is no surprise Apple decided to get rid of them all together. (UPDATE: Oops, I guess they are still loaded in Leopard, but with a bunch of added restrictions. Also, there is a release not saying they are not supported, and might not be loaded in the future)

I am confident that there will be another, better way to get Google Importer to work in Leopard. I am so busy with school and college apps that it is unlikely you will see an update soon, but I will try to get to it eventually. 

So, congrats to all the Apple developers who worked on Leopard. While it does still have some problems, I really encourage everyone to consider upgrading. 

5 Comments | Category: Google Importer, PhotoBook