Posts Tagged: prosper


1
Mar 10

prosper 0.8

prosper logo

prosper

As the “pay the bills” work has gotten more fast and furious these last couple of months, Prosper development has started getting less and less priority. Today though I would like to announce that Propser v0.8 is officially ready for consumption. This is still a pre-1.0 release so its use in your multi-million dollar project should wait a while still.

Prosper is currently very stable and its stability is increasing as Unit Tests are being written, ferreting out many tiny bugs. Right now the MySQL and SQL Server adapters are the most heavily tested adapters, but full test coverage is a priority before the 1.0 release.

There are a lot of new things to be excited about, a new AREL inspired way to handle result sets by making the query object itself iterable. This new semantic way of working separates processing from execution and provides a nice new way to interact with the data backend. Support has been added for the GROUP BY and HAVING SQL clauses.

Prosper has a new home http://prosper-lib.com which will be getting a snazzy new design just as soon as I free up a couple of hours to make one. I have worked with the incredibly talented Ashley Kruso to get a new logo designed for Prosper.

Big thanks to Ian Potter who provided bug reports and even some nifty patches that have been incorporated into this release. It’s your turn to go forth, play with Prosper, and submit to me feedback. Happy PHPing.


7
Jan 10

codemash

winking puppy

I want you to come to Matt's CodeMash Session

Disclaimer: This post is shameless, and I mean really, really shameless, self-promotion.

If you have ever been on this site before you may recognize the name prosper. Prosper is my attempt at creating something of value for the PHP community. For anyone is following along at GitHub, you may have noticed that there hasn’t been much work done in the last few weeks, what’s the deal?! Well, don’t fret, prosper is still under active development but it has been frozen for a few reasons.

  1. It was the holidays, and I was doing this weird thing where you interact with humans
  2. I’ve been seeking, and receiving, feedback from some key users
  3. I will be giving a live demo of Prosper and have been working on that demo more than the library as of late

“A Live Demo?” you say bedeviled by the notion. Don’t worry you don’t all need to cram into my apartment to see some technological wizardry, all you need to do is head on over to CodeMash, then at 3:00 on Thursday head to room E. The awesome company that I work for, HMB is sponsoring CodeMash and have selected me to give a presentation on this crazy open source project they’ve heard I wrote.

I’ve been working on a very minimal PowerPoint, because I know people can read so there is no point in me reading to them. At the end of the presentation though will be a live demo building up a simple database backed PHP application for managing all the fond memories of CodeMash, a quote board. In case you are unaware, building an application in front of people is incredibly nerve-wracking, which is why for the next 5 days I will be building this application over and over while talking to absolutely no one, to the confusion of my poor neighbors.

Live demos have a fantastic way of just going all wrong, as Bill will demonstrate



I’m not trying to poke fun at Mr. Gates (for once), giving a presentation in front of people, with new software is never a fun experience, and bad things© do happen. I will be practicing and practicing and practicing, and after that I will probably be practicing, for this presentation to make it the best it can be.

In other prosper news, I have set up http://prosper-lib.com to be the new home of prosper (currently just a forward to here, although the update is still working its way through GoDaddy’s intertubes so you may get a parking page for a while). I am working with my good friend Ashley Kruso to get a new logo for prosper. Once I have the new logo I will begin building a new web home for prosper that will be all kinds of pretty. This is all in the run-up to Prosper 1.0, which is a goal for this year, but I haven’t quite nailed down when.

It’s all steam ahead on Prosper, thanks to the contributions and support of many people. When I started this project a few months ago I would not have been able to guess what it would turn into, so thanks to everyone that has helped or is going to help. By month’s end there should be a 0.8 release that will have all kinds of new fun stuff including deferred result sets and lots of bug fixes from my friend who was kind enough to evaluate Prosper, Ian.


22
Dec 09

early present

pink present

open source software, the gift for everyone!

There is an early Christmas present for anyone using prosper, a new release, Version 0.7! You can get it hot off the GitHub or download here.

Version 0.7 has a lot of exciting new features, the biggest 2 were spurred on by Ian Potter and Jeremiah Peschka. The phpDoc has been updated (if you are still using version 0.6 you can find the old documentation here). The big news is that prosper uses Prepared Statements by default now, gracefully and transparently falling back to string interpolation where Prepared Statements are not available. The second new feature is the introduction of Explicit Transaction Management.

try {
  Prosper\Query::begin();

  //Do a bunch of stuff

  Prosper\Query::commit();
} catch (Exception $e) {
  Prosper\Query::rollback();
}

Only some of the adapters support this, the ones that do not simply ignore the call to begin(), commit(), and rollback(). You can use the has_transactions() functions to check if the current adapter supports transactions.

Database Supported by Prosper Prepared Statements Transaction Support
dBase YES NO NO
DB++ NO NO NO
FrontBase YES NO YES
filePro NO NO NO
Firebird / Interbase YES YES YES
Informix YES NO NO
IBM DB2 YES YES YES
Ingres YES YES YES
MaxDB YES YES YES
Mongo NO NO NO
mSQL YES NO NO
MS-SQL YES NO NO
MySQL YES YES YES
OCI8 (Oracle) YES YES YES
Ovrimos YES YES YES
Paradox YES NO NO
PostgreSQL YES YES NO
SQLite YES NO NO
Sybase YES NO NO
Tokyo Tyrant NO NO NO

Happy Holidays, and Happy Coding!


9
Dec 09

pushing

cupcake dispensing button

cupcake dispensing button

I have been working on prosper for the last few months, I started thinking about it in early October and according to GitHub my first commit was October 22nd. This project has been great fun so far and I’m not even close to a 1.0 release yet (right now prosper is at 0.6 well on its way to 0.7). I have learned a ton on this project that I would have never guessed before I started.

I completely underestimated the amount of work prosper would be, and I don’t mean coding (although coding has eaten up a large chunk of the time I normally fill with playing Borderlands). I didn’t realize the amount of work it takes to manage even a small project like this. GitHub has been an amazing resource, but at the end of the day it is a tool, and you need to spend time learning how to use it and populating it with data. Writing up documentation, reading documentation, creating examples, running tests, working with collaborators, discussing technical problems, it has been a mountain of unexpected stuff. Now I’m not complaining, this was the challenge I wanted, I’m learning a ton of new stuff, making great new connections, and pushing myself in ways I never have before. One of the most important new hats I’m learning to wear is promoter

Let’s say you have a great idea (like a standardized php database abstraction layer), and you decide to invest your time and energy into it. Great, you start coding like a madman and you have something working, you are working out the kinks, enjoying it, really making something worthwhile. After a while you have this project to the point where you think others might be able to use it, what do you do?

  1. It’s too much work to do anything, just let the bits sit on your harddrive
  2. I need to share this with people, I’ll toss it on GitHub / BitBucket / SourceForge / etc
  3. I want to promote it
  4. I’m going to get others involved

Those are the steps that I went through, and I would imagine a lot of people do, really I’m at step 2.5-ish, I created some pages within WordPress for prosper, but I plan on spinning out a standalone website for prosper at some point. The list looks easy but the problem is that you have to push yourself, because each step is costly.

To go from step 1 to step 2 you need to push past that voice in your head telling you to apply more polish. You need to push past any indecision or fear of criticism and get your code out there. The next step is to promote the crap out of your project. This step is difficult because how do you even go about it. Here are some ideas.

  • Create a sample application using your project
  • Give your project a home and shamelessly link to it
  • Promote on reddit, Hacker News, etc.
  • Get friends more famous than you to push it, if you don’t have famous friends, start sending out emails, the people that I’ve talked to have been really great
  • Submit your project for review in any pertinent technical website (like PHP5 Magazine, which may actually be defunct)

For step 3 you have to push others, push friends, and push yourself to get your project on people’s radar. Now for the next step, getting others involved. You should have created some connections and hopefully some users, enlist them to make your project the best it can be. User’s can submit bugs, feature requests, and patches. Other developers can polish up bits they are interested in, as my good friend Jeremiah did. Getting more eyes and ears and noses in your project let’s you refine and build, spreading complexity around.

The point of everything is that you have to push. Even great ideas, great code, great projects can fall to the wayside if no one pushes. Promoting the work you do is nearly as important as the work itself, if no one ever uses your code, no one will care about the months of effort you put into making it beautiful. Get out there and be passionate, genuine, and don’t stop pushing.


Tomorrow I will be picking up the gauntlet that Jeremiah Peschka threw down today in What is Your Biggest Weakness? Tune in tomorrow to see what my biggest weakness is, and see who I challenge next.


3
Dec 09

prosper 0.6

I plan to have another real post later today, just wanted to announce a point release for the prosper library. Prosper development has been moving along and I am happy to announce that I just slapped the finishing touches on version 0.6.

Here is the 10 cent tour of the new stuff

  • Changed the configuration system to take constants instead of string literals
  • Added support for the older mysql library in addition to the mysqli library
  • Refactored adapters internally for more concise and logical class layout
  • Moved project to GitHub
  • Adapters are lazy loading now, this allows the configuration to be done with minimal overhead. This functionality also allows for unit testing
  • Added phpDoc Documentation to the project
  • Added GitHub frontpage documentation and project roadmap

There is a new download available on GitHub that contains all the documentation and source code. Since prosper is still in the 0.* stage it may be best to just clone or fork the source, a look at the 0.7 roadmap shows that there is still a bunch of work to be done.

If you want to help there are several ways that you can provide support

  • Use prosper and submit issues
  • Join the project*
  • Give me some feedback*

If you want to join up or give me feedback just send an email to ihumanable@gmail.com with prosper in the subject line


24
Nov 09

discomfort

was the colander really that hard?

was the collander really that hard?

I am an American, which means that my life is constant bombardment of people offering to make it simpler, faster, easier, and more comfortable. Watch an hour of tv and count the number of times people are trying to make your life easier and more comfortable, its quite a few. The problems they solve aren’t even real problems, they are imagined problems that we’ve been convinced are real. I used to think these problems were real too, I didn’t have enough time, I didn’t have enough skill, I needed the pre-packaged solution that was quick and ready in 5 minutes.

Then I woke up one day and realized that I had been swindled by a bunch of bullshit.

Who has 15 minutes to make pasta for dinner?! [Show woman dumping pot of scolding hot water and noodles all over herself]
There’s just not enough hours in the day!! Buy our microwave-licious pasta bowls!!!

You know who has 15 minutes to make pasta, everybody does. Want to write a comment saying there is no way you could free up such time, well fuck you Mr. I-have-time-to-read-a-blog-and-post-a-snarky-comment-but-somehow-can’t-find-15-minutes-with-both-hands-and-a-flashlight. At this point though, we are all thinking, am I trying to make some sort of point about pasta or is this going to get around to programming at some point?

Well thanks for going on that side-rant with me, let’s look at what in the world I’m trying to get to. Being a programmer I like to be comfortable, I like to work with the languages I like, and the tools I know, and the frameworks I understand. It makes sense, people are more productive when they are working with the tools we know, that’s why we have holy wars about what language is better and which framework to use, we invest some time getting our nice comfy language set-up just the way we like it and we look at people sitting on uncomfortable languages and wonder what the hell is wrong with them.

The problem with being comfortable is that its hard to learn and grow when you are comfy. You know the language, you might learn some edge cases here or there or uncover a new feature or bug every once in a while (and this is important too, its important to be a master of something), but new learning is rarely done this way. Its very hard to learn new things by doing the thing you already know how to do day in and day out. Yesterday I decided to do something new, and it was uncomfortable, but I’ve started learning and hope to learn a bunch more.

What was this horrible discomfort that I suffered, moving my code for prosper from Google Code to GitHub. You see, I’ve been using Subversion since college, when one of the smartest software developers I know, Ian Potter, introduced me to it. I had heard some stuff about svn before and compared to the source control system we were using (a folder called test and a folder called production) had determined svn would be a step up. He set up svn and patiently answered my questions of which code was on my machine and which code was on the server over and over again until my brain finally wired it up.

Moving to svn was much more complicated than the tried and true 2 folder methods, but the safety, history, and concurrency that svn offered was more than worth the week or two of learning the new system. In my career so far I’ve gotten to use cvs, svn, and vss, they are all similar concepts, there is a central repo and you can commit, update, branch, merge, blame, etc. This is how source control works in my brain, and I am completely comfortable with how this all works.

Well svn is no longer the new hotness, git is in big time, and a good portion of its popularity can be attributed to GitHub. GitHub is the facebook of source hosting, its a really great site to host your project on, most interesting new projects are hosted there, and the social aspect allows people to easily interact with you and your project. I’ve had a GitHub account for a while, and I tried it out before, only to go back to the comfortable embrace of Google Code and svn.

who could resist octocat?

who could resist octocat?

So why move to git, just because its shiny? Well, GitHub is almost enough of a reason, but the distributed nature of git, the increased popularity of git, and the ability to quickly make new branches and merge them back into trunk, make it worth learning. If I want to continue being active in a community that more and more relies on git, its probably best to learn it.

I’ve taken the first step, I’ve moved my stuff over to GitHub and I’ve got git up and running on my laptop, I’ve been able to push some changes upstream and over the next few days I will be reading the excellent help that GitHub provides you. It will not be comfortable, I will probably be scratching my head for a while, wishing to go back to the centralized repo that I know and love. I will more than likely treat git like svn for a while until I “get it.” But I’ve decided to stick it out, to live with and own my discomfort and to learn this new thing.

Here is my challenge to you: maybe you’ve read a few things about a new technology and its interested you, maybe you’ve even taken a few trembling steps into the new technology, and you’ve walked away or put it aside. Go back to it, jump in head first, don’t look back and don’t give up. The great thing about technology is there is usually a manual to read, a community to turn to, and our old friend Google. Make yourself uncomfortable, you might just learn something.


17
Nov 09

dogfood, terror, and tweets

too literal

too literal

Yesterday I released my new library Prosper (in case you hadn’t noticed the new menu entry at the top of this blog). It was a ton of work, way more work than I ever expected, but it was worth it. Prosper is now out the door and ready for human consumption, I’ve been using it all day on a fun little project, mostly playing around with the twitter API (which I’ve done before but never from php).

I was talking the other day with the esteemed Rick Kierner about the upcoming CodeMash convention. Since I work for an amazing company that is sponsoring the event, I get to go for just about free. I plan on going to the precompiler sessions and that day comes out of my pocket, but its a small price to pay. Rick is taking care of the nitty gritty details but in the end I will have to give him some cash money to pay for the precompiler and the first night’s hotel room, he decided to use BillMonk to record the debt and keep everything straight.

After perusing BillMonk for a while I decided that I really liked the site, its a cool idea, and I thought to myself, “hey self, now that tipjoy is defunct could there be a space for me to make my mark.” (Side note, I often think hyperlinks at myself). Rick and I bounced some ideas off each other and at the end of the day decided that there really wasn’t a good business in what we wanted to do, so we abandoned the thought and moved on, c’est la vie.

Today though the idea kept bouncing around in my head, really its been bouncing since we first started talking. Today I finished my proof of concept for my new minimalist bill tracking system, currently dubbed cha-tweet (a portmanteau of cha-ching and tweet). I’ll outline quickly the concept behind it, a rough approximation of its implementation, its status, and what the title has to do with anything so far in the post.

The idea is basically this, you can tweet a specially formed tweet and cha-tweet will aggregate those into a nice little summary of who owes you cash and who you owe cash. The tweets look like this

The debt cha-tweet

@I_owe_this_guy_money > $5 lunch: delicious sandwich!

The give cha-tweet

@I_gave_this_guy_money < $5 lunch: mcdelicious

The basic idea is that money comes out of or goes into the username to or from you, respectively. It’s a simple syntax that lets you sort by debtor/debtee and by type of debt. Since it starts off with the @username syntax it only gets displayed (by default) to people that know both of you and would maybe care, and its easy to find by the service because it is treated by twitter as a reply. The system works fairly well, and I’m happy enough with the concept.

The problem was that to create an accurate summary it had to go get and process the entire tweet stream, which can take a long while, and assuming that most of the tweets in a users tweet stream will not be cha-tweets, there is no need to do all this processing everytime (and in steps sexy miss rdbms). So, throw a database at the problem, store the seen cha-tweets and operate on them, this has now been implemented, it took one hour, and I used prosper to do it.

So how was it? Really easy, I stole the configuration from the todo list project, switched around the credentials and the schema name, and was off and running. Everything was working well until I tried to update something and Prosper spit up a bunch of non-sense at me, and my heart sank. Did I just release some library full of horrible bugs and will be mocked endlessly, the cries of n00b and pwned reverberating so loudly as to drive me mad?! No, I just don’t know how to type so instead of writing this

Prosper\Query::update('user')
  -&gt;set(array('since' =&gt; $since))
  -&gt;where('id = :id', $_POST)
  -&gt;execute();

I wrote

Prosper\Query::update('user')
  -&gt;set(array('since' , $since))  //WHOA!
  -&gt;where('id = :id', $_POST)
  -&gt;execute();

Changing that double arrow to a comma makes a big difference, and causes prosper to correctly try to set `0` to 'since' and `1` to 'some_huge_twitter_id_number' which is what I told it to do.

Crisis averted, my library still functions properly, hip hooray!

  • Is it easy to use? Yes, I found that it cut down on my development time considerably.
  • Is that because I wrote it and have no learning curve? Quite possibly, I’m not going to rule that out.
  • Is the code easy to read? Yes, its fairly straightforward crud stuff, made much simpler by prosper.
  • Did I learn anything eating my own dogfood? The verbose function is awesome! I wrote the verbose function in the beginning as a simple debug / sanity check of sorts to make sure that things were being translated and serialized correctly (pro tip: the magic __toString function will print the sql statement that will be executed). During development though it was incredibly useful to be able to switch the call to execute for a call to verbose and immediately see at a fairly granular level what was going on. This got me to thinking how much prosper needs some official documentation, and that will be my project for the next week or two.

In the end I have a nifty little twitter gadget, I will probably be hosting it somewhere soon so keep an eye out for that, but more over I have some more experience as an end-user with prosper and a renewed energy to write the official documentation.


I’m also adding some stuff to the blog, there are now social media icons, the rss feed link got a new friend mr. twitter link, and there are some backend changes for speed and stability. This is another round of blog tweaks and that is the best time to have your opinion incorporated into the blog’s overall look and feel, so comment away!


16
Nov 09

announcing prosper

prosper

prosper

I’ve been talking and teasing and hinting about my side project. Well today is the day I can finally announce my project, prosper.

Prosper has been in the works for a few months in my spare time, it is a database abstraction layer written in php. For anyone who has ever written a web application in php you know that they are written for one database and one database only. It is a MySQL application or an Oracle application or an X application. If the application gets popular enough, the developer might get around to adding some support for other backends, and when they do it is always some homegrown solution. With prosper you can write your database code once and have it work across 18 different backend databases.

Prosper came about when I was looking for a quality ORM layer, the one thing that struck me as odd is that everyone was rolling their own database abstraction layer. Doctrine has DQL, Flourish has F-SQL, php.activerecord has an adapter architecture, and so each library has its own quirks and compatibility.

Following the Unix philosophy, prosper does one thing and tries to do it well. Here are some things that prosper is not. Prosper is not an ORM. Prosper is not an Active Record implementation. Prosper is not an MVC framework. Prosper will not pluralize names, will not handle sequences for Oracle, will not slice and dice your onions. Prosper is one thing and one thing only, a library that turns function calls into sql.

Official documentation is coming soon, but for now you can view the case study, learn why you should use proper, and get the code

I read the documentation, I wrote the code, now its your turn. Give it a try, submit issues to the Google Code Page, and let me know what a great / terrible job I did.

Note that prosper is not ready for primetime yet, this is version 0.5, lots of the backends should work but only the MySQL one has gotten any kind of real testing. The code is open source currently under an MIT License, although the license may change for the 1.0 release, it will always be free to use and open source though. Here is the list of things that still need to happen.

  • Thoroughly test the backends
  • Add any backends that I missed
  • Write up official documentation
  • Move code to github to facilitate collaboration
  • Forge partnerships with other open source projects
  • Shamelessly promote

Go get the code and let me know what else I need to get to work on.