Exceptions vs method missing in Ruby and Rails
- May 19th, 2010
- Write comment
http://github.com/phegaro/thinking-sphinx
Since Sphinx only returns ids of items that match the search query, thinking sphinx actually does the work of running a find and retrieving all the records by using a find method and passing all the arguments you sent to the search method to the find query. It passes things like :include and :joins etc but it does not pass conditions so i created a new options called :sql_conditions and you can pass the normal sql conditions you might want to pass to have joins be filtered etc. Hope it helps and good luck
I looked all over the web and found some links to this but it was not easy to find so i thought i would write a little article about it.
You will see this error:
Abort class-pclzip.php : Missing zlib extensions
This is because in the file class-pclzip which is in your wordpress directory
at ${wordpress_root}/wp-admin/include
wordpress looks for gzopen and now in php that is called gzopen64 so just find all occurances of gzopen and replace it with gzopen64.
Now you can install plugins and themes again. Good luck and hope this helps others.
Walt Mossberg said in his most recent review of the iPad:
“Still, the software looked impressive, and that could help Steve Jobs do the one thing even he has never done in an amazing career: get the public to love not just a better version of an existing type of gadget, but a whole new category of gadget.”
It brought back a thought i have had about products and how they are created, evolved and revolved. Most of the products that come out today are either evolutions or revolutions of existing products. Very very rarely are there actually truly new an innovative products.
When i talk about evolutionary products, i look at products that are continuing to add features, adding performance and slowing moving towards a better product. Most of the phones made today are evolutionary products that continue to change in small slight ways and then marketing/advertising teams work hard to call it innovation.
When we I talk about revolutionary products, i think about products like the iPhone or they Hybrid Car. These are still steps in products that already existed but is such a large step that it feels like a whole new product. iPhone re-introducing touch and making that a central part of the user experience with physics integrated was a revolution, but the concept of a phone, apps, email and even music had been around for some time. It was not a whole new category of product or a whole new solution.
The few true innovations that i can think of in the recent past are Tivo and Eink. I am sure there are others that i have not thought about but these stand out to be me very easily. For years people were trying to build smarter and smarter VCR 1 click remotes and then the Tivo came out and showed us how we need to navigate content and how to really watch/manage tv shows and content. The stopped the focus on channels and moved the focus to the actual shows. It was a whole new category of product that was not just a smaller, or faster or brighter version of something that already existed. EInk has not really hit the mainstream yet but the idea is the same. If we really can move to a model where we will use eInk and ePaper to replace pen/paper for all our hand written content that would be a true change and evolution of a new category.
Right now, I am the founder and CTO of a small company called sliced simple. We are working on software solutions for real estate agents and I think we are building something that is revolutionary. I don’t think it is really going to create a new category of solution but it will definitely change the tool landscape for real estate agents. After this venture, i hope to have the change to build something truly innovative.
What do you think are some innovative solutions out in the world and what do you think of my categorization of the products above?
Efficiency and tools to make me more efficient are kind of an obsession with me. To some extent, it might be such an obsession that it might actually stop me from being efficient
. I try many many many tools and only a few of them survive for more than about a few minutes and even fewer survive longer than about 2-3 weeks. The ones that stay behind are ones that i dont have to change to adapt to but ones that can easily change to adapt to me.
Todo applications are a great example of this type of tool that has gone through a number of different cycles and i have finally ended on one. Once again, i dont think any of these have ever lasted more than a few weeks and maybe some a few months but here is my take on each.
I tried to use the device side todo application for doing all my task management because i thought “Hey its with me all the time why not do it there”. Let me tell you this was a disaster in about a few days. I tried really hard but there are just many issues with the solution:
Things is an application from Cultured Code. The application itself is pretty beautiful and is designed around the concept of GTD. You have an inbox and projects and tags and can really just keep a list of things to do very effectively. They have plugins for QuickSilver and with its Applescript interface you can pretty much push anything into it as a task. In fact, i wrote a couple scripts that move entourage mail into it as a task and also apple mail could be moved into it as tasks as well. Since some of my tasks come from email, i thought that this was a great model because i just had to hit a button and boom the email was now a task and it was cleared out of my email inbox. It was now in my task manager inbox. I used tags and projects and tried to keep track of everything, but there were a couple things that finally made me leave this application.
From here i realized i wanted something that made entering the task easy but also available every. I did some quick googling and found
This app continues to amaze me. It is fast for a web based application and they have a iphone sync app and a mobile site. I built a WebOS application to get my tasks on my phone. It has TONS of plugins for Quicksilver and every other app to get tasks into the system. You can email it stuff with just a forward it to the app and it would show up in the Inbox of the task manager. It is a super duper task and list management service and have used this for a while now. To make it feel more like a local native application, i used Fluid to make it feel like a native application. While it was easy to get things into the list and tag it and manage it there were other issues:
I continue to use this application cause it is so ubiquitously available but i still end up using another tool to perform some of my basic task management. I also use this tool to keep track of things like books to read, movies to see etc. It ends up being a long list of stuff more than a todo list it is more of a list of things to catalog and reference periodically.
While i was happy using RTM, i realized quickly that i was still bringing up textedit and just keep a list of items to do with notes and tasks in a text file. I did this when i was starting a project and things were still pretty free form. I kept a list of ideas there or a list of tasks and would take them and send them into RTM periodically. As i did this more and more, i quickly realized that my best todo list was plain text files. They are not as ubiquitous as RTM so i cant easily add to it or remove from it unless i am on my Mac. I have the text files sitting in drop box synced folder so its kinda available just not very easily on my phone. Text files are pretty awesome cause Quicksilver and Launchbar allow me to just add text to the end easily. Moving things around is easy. Sharing it with others is just an email with a cut and paste and indentation works. The things that are missing are the organization of tags and search.
This is an app that i have only been using for about 2-3 days so ask me again in a few days if this is still good. It seems to be pretty perfect in that it gives me tags/search and projects but it is all just a text file. It just feel natural to use for a programmer or someone who just likes to type out what he is thinking. Notes are easily mixed as in plain text files and at the end it IS just a plain text file. My only downside on it so far is that it is not ubiquitous in terms of access. It is a app that runs on a Mac, i need it on my phone.
What i would love is a web app version of Task Paper that works on the web and my phone and also has a desktop app. The text files are just synced and kept easily accessible everywhere. I guess i can either keep hoping or maybe one day I will just end up building this for myself
Sidenote: Many times I use the tools other than the above to do feature/issue tracking. Currently we are using redmine but i have also used jira and bugzilla. They all have their own issues but have different needs/requirements. I think the one that seemed to be the best for my on this front was thymer but I did not want to pay for something when it was in alpha/beta and we are still a small startup.
Update: 2.8.10
I have been using TaskPaper for a few weeks now and i think it is something that has become a central part of my tool arsenal for todo management. In the comments, you can see that the author of TaskPaper is also providing a iPhone app and text sync tool that seems to be working pretty well. Task Paper seems to be the solution for my free form thoughts and in general for notes. I am using RTM for keeping track of long lists like “books to read” and we are using Redmine for simple project task management. Thanks everyone for the comments and ideas but these are the solutions that seem to work for me for now.
Ben Galbraith – The state of developer tools | Web Directions.
The tools look pretty interesting and its been a while since i have seen a single list of tools that people are using. I really love using tools because they make me more efficient. Not all tools are the same and not all tools help but i find that tools tend to make the job a LOT easier. It is kinda amazing to me that more people dont go looking for tools to make there coding life easier. Its like being a carpentor but not having a hammer or a table saw or the right tool to do a circle cut and then spending hours doing it by hand and not getting it perfect only to find that there is a tool that would have done it. The big difference is that software tools are mostly freely available and only a few of them actually cost more than $30-$70. Here are a list of tools that i tend to use in no particular order.
I have a ton of other apps that i use as i code as well but i dont know if i would call them tools. I’ll write about those as well in the next blog entry.
High Performance Web Sites :: Mobile Gmail and async script loading.
Articles like this area awesome when people use the system they have to do some ingenious delayed loading/parsing. What a lot of people dont realize is that CSS has the same level of issues on load/parse time. I wonder if you can do the same trick with inline CSS.
As i have been doing more webos app development, i thought i would just keep little snippets of things i learned as i was developing. One thing that i really wanted to do was to have a spinner in as a button in the command menu (aka the button bar at the bottom). First you need the code to setup the commandMenu. This is called in the setup method of your assistant. In this case, i have a menu with a new button on the left and 2 buttons on the right and a spinner in the last spot (aka the dynamic content).
this.cmdMenuModel = { items: [
{
items: [{label: $L('New'), icon: 'new', command: 'new'}]
},
{},
{
items: [
{label: $L('undo'), icon: 'refresh', command: 'undo'},
{label: $L('search'), icon: 'search', command: 'search'},
{example: 'A', template: 'common/spinner'}]
}]
};
this.controller.setupWidget(Mojo.Menu.commandMenu, undefined, this.cmdMenuModel);
this.controller.setupWidget('spinner', {
spinnerSize: Mojo.Widget.spinnerSmall,
},
sceneAssistant.spinnerModel = {
spinning: true
});
this.spinnerWidget = this.controller.get('spinner');
The template for something to show up in the button bar looks like this. This makes it still look like a button but you can show your content. The main thing to notice is that the item from the command model above is passed to the template for variable expansion.
Now you should have something that looks like:
Also, you can now enable and disable the spinner with:
this.spinnerModel.spinning = false; this.controller.modelChanged(this.spinnerModel);
I have been thinking a lot about what it takes to start a company or even start anything in the world. Starting a website, a blog, a project or even something as simple as an exercise schedule. For all of these things it takes something very simple, it just takes the first step towards doing it. The larger the task the harder it is to take that first step, but i have also realized that once you take the first step, the second, third, etc become exponentially easier. I don’t think this is something that just I have discovered. If you read any self help book or talk to any motivational speaker they tell you this and yet its hard. Its hard to internalize it, its hard to step out. Some of it is fear, some of it is just laziness. Somehow, a single step just seemed subtly simple. I hope that all of you have the ability to take your first step….
I just spend the last week or so reading about all different type of lenses and which one does what and is how good etc. There are a lot of reviews but there are very few that really talk about whats good/bad in simple terms that an average SLR camera consumer can understand. So here is my take on the subject
. You need to know some basics before you break it all down:
The ultimate lens that a consumer would want but does not exist is:
If you say okay lets look around see what we can find, you will see a number of lenses that are close but not exact.
You notice that you can get a super zoom lens but the F stop is so high that you might not really get great pictures in terms of light. I searched high and low for a 24-200 or a 18-200 with F2.8 and they just dont exist. So now that you have come to picking something that is based on what is available you have two choices.
Choice 1: Get 2 lens one for 24-70 and one for 70-200
Choice 2: Get 2 lens one that is a 18-270 and then get a 18-55 2.8
I went with choice 1 mostly because i want to start with the 28-75 and see if that is good enough zoom for most cases for me. If it is then i am done with one lens, if not then i have to get the 70-200 F2.8 but at least i have 2.8 across the whole range and that makes for some nice pics.
OH!!! The last thing that is super important that no one tells you about is the flash. If you get a 430EX2 flash then the indoor portrait pictures can come out amazing. The lighting for photos is half the photos beauty. With a simple flash you can get some amazing shots of people and things and not need perfect sunlight to get the beauty you want.
I could write more about each lens and good/bad etc but then it wouldn’t be short a simple would it?