Monday, July 11, 2011

The Toilet Paper Entrepreneur. Not a review

Many years ago I was fascinated with ideas shared by Robert Kiyosaki and others, that everyone could be a millionaire. The only is needed is to think that you’re already a millionaire and action accordingly.

That was easy. Only several hours a day, dreaming how would I spend my millions on yachts, helicopters, restaurants and all my dreams become true soon.

Yes this is bullshit, but for first-year student this looked very cool along with the fact, that book authors looked rich and successful people. By the way, I haven't spent much time on practicing this, because I was busy with other things, that fascinated me more - programming, studying, family. But I still know some people who believe in this, and still sometimes invite me to "dream together".

Ok, most of them, who believed in the easy money grove, went for work, gathering money, playing with children and ensured that there is no easy money. Each work or business requires much of efforts, nerves etc. If you want to get more money, than prepare to greater responsibility, or greater risk or both. Anyway, you'll have less time to sleep or to play with kids.

"But what about these lucky guys, from all these books? What about Page and Brin? Zukerberg? Other millionaires?" You'll ask. The answer is: "They're lucky, dude". Yes, they belong to the small number of population, we kindly name "lucky pants". I'm very happy these people exist and do cool stuff I'm using, but they couldn't act as examples. They're represent only 0.0001% of all businesses. Next 2-5% are ordinary businesses with ordinary income and 95% businesses are failed, or in a way of failing.

Anyway, I like to read books and when "The Toilet Paper Entrepreneur" comes through my eyes, I’ve decided to look on it.

To be shortly, this book left concurrent feelings. The good are that it is not big and reads easily. Also the author tells about hard way to success, contrary with previous dreaming-based methods. He also give there some fresh tips on how to start business without initial funding, how to keep away from angels and VCs on startup. There are also many tips on how to spend less or no money on advertising, web page, conference calls etc.

In the same time Mike presented a new population of entrepreneurs - TPE. But I don’t wannabe TPE, I just want to do what I like and get paid for it. And I don't think this book will create new move - TPE move.

Also, appealing to the lucky businesses and "The Secret" movie, left feeling that this book continues series of "Homebrew millionaire. Made easy" books, about which I have strong disagreement. Yep, believing in success should be present in all entrepreneurs, but pragmatic view should dominate.

I don't miss I've read this book; it has many interesting advices, and tends to be real. Also it prepares you to a hard way if you'll choose to be an entrepreneur. And not only toilet paper entrepreneur :)

Sunday, April 17, 2011

Installing gtk2hs 0.12 for the latest Haskell Platform on the Windows 7

This post only comments the original tutorial from haskell.org and describes extra action, one should perform to successfully install the Gtk bindings to Haskell without MinGW.


So, steps, you should perform:



  1. Read the original documentation on how to install Haskell for Windows


  2. Download all required files, mentioned im this document


  3. Install the Gtk to the location without spaces in the filenames. So the default location (C:\Program Files\Gtk+) won't work.


  4. Run command-line prompt, fill the INCLUDE and PKG_CONFIG_PATH with correct paths to Gtk+ and libxml2.


  5. run cabal install --ghc-option=-DCABAL_VERSION_MINOR=10 gtk



This is not all.


Now, some packages fails to register with error:


Registering cairo-0.12.0...
setup.exe: internal error: unexpected package db stack: [UserPackageDB]

This is because of bug (or mistake?) in Gtk2hsSetup.hs. So for these packages you should unpack them (e.g. cabal unpack cairo), move to the unpacked directory and change the following code in the Gtk2hsSetup.hs (line 199 of the file):


#if CABAL_VERSION_CHECK(1,10,0)
installedPkgInfo pkg lbi inplace [packageDb]
#else
installedPkgInfo pkg lbi inplace packageDb
#endif

to


#if CABAL_VERSION_CHECK(1,10,0)
installedPkgInfo pkg lbi inplace (withPackageDB lbi)
#else
installedPkgInfo pkg lbi inplace packageDb
#endif

Than, in the package root directory type:


cabal install --ghc-option=-DCABAL_VERSION_MINOR=10

Other errors I've faced with, and the solutions


Error in compiling pango package, the compiler couldn't find glib/glib.h file.


In the file pango-0.12.0\Graphics\Rendering\Pango\Struts.hsc change


#include <glib/glib.h>

to


#include <glib.h>

Error in compiling gio package, some names aren't defined (wmDriveStopButton, DriveStartStopType, DriveStartFlags)


This is because in the module exports these names are present, but defined in a body with macro:


#if GLIB_CHECK_VERSION(2,22,0)
...
#endif

My solution, is to wrap the definitions of these exports in the same macro. Fortunately this will not break the compilation.


After all these steps you should have a working installation of the Gtk2Hs. To check this, you could build and run examples from the gtk-0.12.0\demo directory.