Here is a way to test if your startup’s idea/product is viable:

- can you describe it one very short and succinct sentence?
- can you describe the value it provides users/society in one very short succinct sentence?
- stripped of all fluff (bells, whistles, and whiz-bang things that are purely there for marketing purposes) is it still valuable?
- stripped of all fluff can you differentiate it from competitors? (again, in a very short, succinct sentence)

I am a believer in minimum viable product (MVP). Valuable ideas and or products can express themselves in minimal viable product form. Others can not. And that is it’s essence.

I have heard the argument that minimal products can not compete because, in general, the bar has been raised too high for web applications. The argument against MVP follows that a product must have polish to be successful. Yes, a product must have polish to be widely accepted, but what we are searching for is merely a viable product. This is the proof that it provides value. Therefore, don’t waste your time trying to build the Taj Mahal because you may very well just be putting lipstick on a pig.

Far too often people go about creating a startup simply because they want to create a startup, not because they actually think they have an idea that is viable. Now, I don’t actually have anything against this approach, and in fact, I encourage it if you have the time and have nothing to lose. However, do it to learn how to create a startup, not because you think you will become the next Mark Zuckerberg. And here is the formula:

  1. throw something against the wall
  2. see if it sticks
  3. goto 1

So I finally got around to moving my sandbox type stuff and my blog off of slicehost and onto linode. I rarely touch my blog and do anything with wordpress so it is always a bit of a chore to upgrade etc. ’cause I’m treading on unfamiliar ground.

Anyway, I thought I would give myself a challenge and run wordpress behind nginx. The formula is to proxy nginx to php-cgi. This worked fine but was horribly unstable as the php-cgi process goes down quite often. The problem was running spawn-fcgi from init.d. It needed to be run from a proper process manager. As luck would have it, I had supervisord already running to monitor uwsgi.

I wish I would have stumbled across this post from Grig Gheorghiu, as it would have saved me a lot of effort. Funny how he is also a python guy.

Andy McKay linked to a bit of interesting data from his twitter account. I wanted to be able to visualize the data so I used it as an excuse to try out flask, a python micro web framework, and some other stuff. It was all a bit of a yack shave because I could have done the whole thing as a static page but what the hell. It also led me to finally moving my blog off of slicehost and over to linode which of course led to an upgrade of wordpress which led to trying wordpress behind nginx and so on and so forth. Such is the life of a techie.

Anyway without further ado, click through to see all locations in BC where a marijuana grow operation was found by the police in the last year. And here is the raw data.

The visualization shows a circle at the location and the size is proportional to how many plants were seized. A scaling factor was applied to the circles so that they are still visible, and proportional, at all zoom levels.

Also, don’t be surprised if the whole thing comes crashing down because this was thrown together as an experiment.

Installing supervisor on Natty Nat will undoubtedly throw the error ImportError: cannot import name fixtag

The root cause of this error is the python-meld3 library and the following import statement:

from xml.etree.ElementTree import fixtag

The problem has been fixed in version 0.6.7 of python-meld3. Therefore, before you install supervisor, do the following on the command line as root:

aptitude install python-meld3
pip install meld3==0.6.7

The above will install version 0.6.5 of python-meld3 and then pip will upgrade it to the latest. You can then install supervisor without any problems.

If you want you can read the gory details of the problem in python-meld3.

If you have created some client functionality that is triggered when the user moves the mouse over an element, you may run into trouble testing with Selenium’s mouseOver method.

I recently implemented such a feature using jQuery’s hover event handler and pulled my hair out trying to test the functionality with Selenium. I went down a complete rat hole trying trigger the event within selenium using the getEval method and passing in custom javascript code. What a nightmare. That is, until I really sat down and thought about it.

Remember that Selenium doesn’t actually control the pointer in the browser but drives the browser through javascript. Therefore, unlike a true mouse event that may trigger a number of events, Selenium’s mouseOver just triggers mouseover on the element. Now, if you have used jQuery’s hover then you are binding your functionality to mouseenter and mouseleave not mouseover and mouseout.

Therefore, if you wish to test with Selenium, do not use jQuery’s hover method and bind your functionality to mouseover and mouseout.

Note that many older browsers do not support mouseenter and mouseleave as this was introduced by Microsoft and was not immediately adopted by the others. There is also a big difference in their behaviour and propagation in the event model. mouseover and mouseout bubble up whereas mouseenter and mouseleave do not bubble up.

Well, it looks like the final nail in Microsoft’s coffin is not far off. They are now resorting to suing their competition rather than say, oh, out-competing. Brian Proffitt’s article on IT World offers up the gory details.

I loved this quote from one of Microsoft’s weasels councils:

Their refusals to take licenses leave us no choice but to bring legal action to defend our innovations and fulfill our responsibility to our customers, partners, and shareholders to safeguard the billions of dollars we invest each year to bring great software products and services to market.

I took the liberty to translate the double-speak into English:

Their refusals to be extorted into buying meaningless licenses leaves us no choice but to use our ill gotten gains from years of monopoly rule to financially punish them by dragging out meaningless legal claims in the courts until such time that they relent into paying us for nothing or we bankrupt them. We must defend our lack of innovation so that we can continue to stifle technological advances and continue to sell our shitty software under long-since-dead per-seat pricing models to the unsuspecting corporate yes-men and slack-jawed middle managers that are our life’s blood.

The D-Link DNS 323 is an extremely affordable SAN solution for a home or small business network.  And since Bonjour support has been cooked into firmware version 1.09 it is now even more useful for Mac users.  However, out of the box it still cannot be recognized by TimeMachine as a valid backup drive.  Infuriating to say the least, however, with a bit of time and perceverance it is possible.

Firstly, you will need to fun plug your DNS 323.  Excellent instructions are found at the DNS323 Wiki site which is an excellent resource for all your DNS 323 hackery needs.

Secondly, you need to add AFP support.

Lastly, do the following command on the command line to get TimeMachine to recognize network drives which it does not do by default (really Apple?  Why?!?):


defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

That’s it.  You should be able to point TimeMachine at your DNS 323 and you are good to go!

Note that you used to have to trick the Mac into using the SAN as a backup drive but I did not find this to be the case with my latest setup, but if you are having trouble, read A Poor Man’s Apple Time Capsule.

I just stumbled across this little recipe to save common searches in gmail. If you turn your search into an URL you can then bookmark it. For example, if you want to search for anything with the label, funny, you would put the following into the search box:

label:funny

Instead just create an URL as follows:

https://mail.google.com/mail/#label/funny

bookmark it and TADA, you now have a saved search!

I haven’t experimented with other types of searches but all keywords could conceivably  be prepended with the hash symbol and work similarly.

Magento seemingly makes the most mundane development tasks an exercise in patience. The over engineered PHP beast makes you do more XML situps than the most anal of Java app environments all with zero documentation of its convoluted naming conventions. Therefore, when I wanted to email from within a custom Magento module I found myself back in the Magento source and forums to try and figure it out. I was just about to go down Asad Rahman’s approach or Branko Ajzele’s but digging around in Magento’s source led me to believe there was an easier way. Please note, however, if you want to take a template approach to emailing then you are probably left with the aforementioned approaches and I wish you luck. This approach is very straight forward and about as simple as it gets in Magento. The following function probably doesn’t need a lot of explanation:

public function notify($sendToName, $sendToEmail, $subject, $msg) {
 
    Mage::log("Sending email to $sendTo");
 
    $mail = Mage::getModel('core/email');
    $mail->setToName($sendToName);
    $mail->setToEmail($sendToEmail);
    $mail->setBody($msg);
    $mail->setSubject('=?utf-8?B?'.base64_encode($subject).'?=');
    $mail->setFromEmail("support@example.com");
    $mail->setFromName("Your Friendly Neighbourhood Support");
    $mail->setType('text');
 
    try {
        $mail->send();
    }
    catch (Exception $e) {
        Mage::logException($e);
        return false;
    }
 
    return true;
}

If you are using the new, alpha version of the Facebook Connect JavaScript SDK you have no doubt scratched your head on how to verify the session signature. The biggest problem is that the documentation of how to validate the signature is completely wrong for the new open-source javascript API.

The methodology described in the documentation is still correct but there is a new parameter, base_domain, that throws people for a loop. As well, a number of the parameters have changed names. Anyway, here are the parameters that you should be able to retrieve from the cookie fbs_[your API key] if you set the cookie option to true in your call to FB.init or they can be retrieved off of the object returned from a call to FB.getSession():

base_domain=somedomain.com
expires=1221157773
secret=HUvxPvYA_7Hvt2gZ3ndw_T__
session_key=2.s_eeketB6Ed9m5qgz64hYw__.3600.1238553600-327212630
uid=2901279

Concatenate all of the above, append your application secret, which you can retrieve from http://www.facebook.com/developers, and take the md5 of the string. The result should match the sig parameter.  (Note: that the values of the parameters above are made up but should resemble your values.)

© 2012 rootsmith blog Suffusion theme by Sayontan Sinha