Are you looking for my non-technical blog?

This is now my technical-only blog, my non-technical blog is here.

30 January 2013

10 Steps to Startup (or more)

Today I attended a session by Matthew Draycott (@DraycottMC) about how to start your own startup. I know, there are hell lot of entrepreneurial seminars, books and real-TV shows (Matt called Dragon's Den entrepreneurial pornography, because it has nothing to do with real life). Well, I was saying that I wasn't expecting much from the session, but that fact is, I found it very good and inspiring, so I wanted to share the main points of it here.

The first thing he said, is that unlike many other people, he finds recession a good opportunity for starting a business, it learns you how to start a learn startup, than can survive hard moments later on.

Now here are the steps:
  1. Research: You need to be an expert in your niche, and you need to research the following three things: Your customers, competitors and collaborators. Customers can be your best friends or worst enemies, and to sell your product you have to convince your customers why you are better than your competitors not why your competitors such. You still can learn from your competitors mistakes though. You need to ask "Who, what, where, when, why and how" about them, and keep a database of all them. A database can be your calendar, address book, twitter lists, but it has to be there.
  2. Business Model: He stressed that it is better seen as business model and business plan. Because market changes more quickly than you expect, so you need a model that is agile enough and can embrace those changes than a fixed plan. He referred to Alexander Osterwalder here, and his books about business models.
  3. Value: You need to create a value to your customers, and there are three pillars of value: Newsness (think of what makes iPhone 4S buys iPhone 5 ones it is out), Performance (think how Google Search just works as it promises to do) and a Brand (think of those people who pay £400 in a Johnny Cupcakes t-shirts, although they might cost few quids just because they like the brand and collect those tees).
  4. Channel: A business without a channel is just an idea. How are you connected to your customers? The channel can define your value:
    • Personal Assistance: Your value comes from knowing everything about your customers, they might be just few ones then, but you just know them that you can build custom products or services for them.
    • Self service: A lot of business nowadays, especially retails, are moving to make customers service themselves, cashiers are being replaced with machines. So, in this case, your value is to make people do their shopping quickly.
    • Co-creation: Your value is to sell your customers tools to build their products rather than selling the product itself. Think of 3d printing, Apple's app store from the developers point of view.
    • Automated Service: This sounded like Self service to me, couldn't get the difference.
  5. Revenue and Pricing: You need revenue to sustain as a person and as a startup as well, so be brave to step away when your business comes out not to generate a decent amount of money. As for the pricing, there are strategies for how to price your product:
    • Cost plus: Just add some margin to your cost
    • Skimming: You know there is a niche to buy what you make no matter what, so price based on that, to cover your cost, R&D, etc. Again, think of an iPhone.
    • Loss leaders: Be the cheapest ever. Think of Pound Land (now there is even 99P), but this is very risky strategy, and you cannot compete on prices all the time, and even worse, once people take you for that price, it is harder to raise your prices again to meet any future expenses
    • Penetration: Not below market value as Loss leaders, but below top market value. Think of LG to Sony, or Kia to Honda.
    • Freemium: Think of drug dealers, give you something for free, wait for you to get attached, then sell you more stuff. Play a game for free, but pay to download next level. 
  6. Resources: Know where to find them.
  7. Partners: No one can start a business on his own. 
  8. Break the model: Now after creating your model, you need to test it. Compare your assumption from the model to data from your research. And fee free to adapt the model.
  9. MVP: Minimum (start small, and keep it simple), Viable (Be cheap when it comes to your initial investment) and Product (Have your product ready). If you are into software development, think of it as Torvalds' "release early, release often". 
  10. Evaluate: Put your mode in the wild and test it. Look for criticism, because most of your friends, family and acquaintance are usually too decent to give you real criticism.
  11. Pivot or Persevere: Basically, if market reaction is negative pivot, if positive persevere. Yet, this is something you can only learn by experience from as much success as well as even more failures.
  12. Execute: Well, I am not live-blogging here, so I might have already explained some stuff in previous points.
  13. Scale: Always keep in mind that your aim is to grow. You don't need to be as big as Google or Microsoft, but just grow, and remember, cash is what keeps your business ticking, or capital is your new king.
  14. Repeat: If it is successful, do it again. But remember, market changes so copy your previous successes might not always succeed.
One final note, the session was way more useful and interesting than this post, and some points here might be more or less how I understod them not how they actually are, but I tried to summarise it for my own self. And here are the slides for Matt's presentation.

20 January 2013

MacPorts FTW

Being new to Mac OS X, I am still struggling to memorize its different keyboard shortcuts and to make my fingers tell the difference between the command and control button. However, another thing I have been struggling with lately is, installing my favourite python modules on it. I had some problems installing Scipy and Scikit-learn in particular. I gave Homebrew a try among other things, but it came out that MacPorts was the only way to install those modules successfully.

It's simple and straight forward.

Download and install the MacPorts package for your system here.

On the command line, type the following commands
$ sudo port install python
$ sudo port install py-scipy
etc...
You may aso specify a specific version for python to use, so, type 'python27' and 'py27-scipy' instead. For sure you can use it to download hundreds of other packages, see the list here.

If you, like me, messed a bit with your system paths, make sure to have a look at your '.bash_profile', or whatever shell you use, to see if any other paths set by brew are taking precedence or something.

There is also 'sudo port selfupdate' to make sure all you packages are up-to-date. Check the guide for other useful commands here.

12 January 2013

Ubuntu on Dell Inspiron 15R 5520

I am a true believer in Free Software, but I am really considering selling my soul to Apple sometime soon.

For the past four days I have been stuggeling with my laptop's wifi, I installed 2 versions of Ubunto, one Mint, one Fedora and one Debian on it in the past few days. None was able to identify its internal wireless. I bought an external USB wireless device, some were not able to detect it, some needed ndiswrapper, and few were able to detect it, but the latter two, never worked properly, and the wireless connection kept going down.

The sad truth, is that when I bought my Dell Inspiron 15r 5520 laptop, it came with Ubuntu 11.10 preinstalled on it. But when I upgraded it to 12.04 the wireless stopped working, I then realized that Dell was using a custom Ubuntu version with the wireless driver in there. I tried contacting Dell since then to send me the driver, but with no hope. I created a supprt ticket with them almost 6 months ago but with no hope. Just google "Dell Inspiron 15r 5520 Linux Wireless" to realize how Dell doesn't give a rat's shit to their customers. People keep on comming out with workarounds to solve the problem, and Dell simply don't care. But on the other hand, Ubuntu's site mentioned my Laptop among their certified hardware, yet they added that "the standard images of Ubuntu may not work at all on the system or may not work well". So, I still have an option to pick another laptop that is certified by them. However, new models (the one you probably are going to buy) are not on their list yet. So, I am still not sure of that option.

I've been using GNU/Linux since 2002, so may now is the time to switch to Apple, at least for some time, we need to separate for a while. As for Dell, I don'y think I'll buy anything from them again.

08 January 2013

Time-Series Data Classification

Time-series data are every where. They are important in stock market analysis, eco-
nomics, sales forecasting, and the study of natural phenomena such as temperature and
wind speed. The growing size of such data, as well as its variable
statistical nature, make it a challenging problem for data mining algorithms to predict, classify.

I've written this report as part of my postgraduate degree in data mining program in The University of East Anglia. In it, I focus on time-series data classification by shedding the light on the researches done in this area.

Time-Series Data Classification

06 January 2013

Git for dummies like myself

Well, I had an account on github since 2009, but I started using it recently. On the one hand, that was because I was a very lazy programmer, but on the other hand, it was because git used to confuse me.

Now, after watching some webcasts and reading some scattered documents, I made myself a cheat-sheet, and I'd like to share it with you here.

First thing first, git is not github. I mean, you can use your local git and never touch github, however, github is the de-facto git in the cloud nowadays, and sharing your code there is a very cool thing. Hint hint, some employers also value those who share beautiful code there.

Second thing second, I will assume you are using GNU/Linux, oh, I forgot to tell you, Windows sucks, and one of the main reasons I never understood git, was because I was using Windows back then. Mac should be fine too, however, I never touched an Apple laptop before, so I cannot really tell.

Initializing Git

Now. let's say you are writing some cool software in some folder. In your beautiful GNU/Linux terminal get into that folder and type the folloing command:

$ git init

This is a mandatory initial step, it tells git to creates a hidden folder there, ".git". This folder will be  used by git from now on to do all its black magic.

How are you? How are they hanging? Que tal?

Throughout your gitting life, you can use the following command anytime to check the status of your repository:

$ git statu­s

As opposed to status, log tracks history not the status current moment

$ git log

Still confused a bit, give them a try now, or you know what, let me give you one more hint.

Help! I need some help

The easiest way to ask for help, is to write git followed by the word help, then the command that you need to know more about.

$ git help status
$ git help log

Probably, it will give you some cryptic information, so let's skip it for now, at least, you now know that help it there whenever you need it.

Let's start the fun

Git respects your privacy, and gives you control on what to commit (their lingo for saving) at a certain moment. So, whenever you edit your code, you have to explicitly tell it which files you need to commit later on. To add a file to git:

$ git add file_name.txt

You can use wildcards too, written in quotes. Below you add all text and python files:

$ git add '*.txt'
$ git add '*.py'

Similarly you can remove file from staging

$ git rm file_name.txt

After adding comes the committing

To commit files from staging area to repository:

$ git commi­t -m "Some committing comment here­"

I know, 'staging', 'repository' and 'committing', all sound Chinese to you now. Well, if staging is like the RAM, some temp location or so, and the repository is like the Hard Disk, then committing is like saving. The text in quotes after the '-m' is mandatory, but it is up to you to write anything there, you can even write a single dot in there if you want to. However, it is useful for your reference later on in case you needed to revert to a certain version of your software. So, it is always a good practice to write down what you have actually done before this commit. 'Add a hocus_pocus method to my Magic class', 'Corrected a typo in README', etc.

Github FTW

So far, we have been doing thing on our local machine, let's see how to publish all that to github. In your github homepage, there is a button called "New repository", click on it to create a new repo. They will ask you some question about your project's name etc. When done go to that repo, and on top of the page, you will find a URL that looks like this:

https://github.com/[YOUR-USERNAME]/[PROJECT-NAME].git

Copy it, and go back to your GNU/Linux termina and write the following command

$ git remot­e add origin [URL]

Well, I believe origin can be replaced with any other name, but I still have no clue about it, so let's stick to origin for now, I am just a monkey-see monkey-do at the moment.

Publishing your work

Now you connected your local git to github, what to do next? Exactly, publish that changes you have just committed. Or in our case, we will be publishing everything from scratch since our github repo is still empty now. Once more, those git people use their own lingo, so they call publishing pushing.

$ git push origin master

Remember, we used origin before, so we use it again here, as for master, this is something called branches, but let's not confuse ourselves with it now, let's stick to origin and master for now.

You know what, I've got a short-cut for you. Let's add a '-u' to the previous command

$ git push -u origin master

Great, by doing so, from now on, git will remember your choices and you will not need to say origin and master in your pushes again again. I.e. next time, just write the following and it will work:

$ git push

You 3 useful commands

Most of the time from now on, you will be editing files locally, then pushing them to git hub, to publish your changes all you need to do is the following 3 steps. Adding files, committing then pushing.

$ git add '*.py'
$ git commi­t -m "Cleaned my code a bit­"
$ git push

Sharing is caring

Like any social network, github is mean for people to share code. So, most probably you will have some other friends working on the same project with you, and they do make their own changes to the code as well. So, how to synchronize your local repo with the changes they already published on githib. Easy peasy! If push was our way of pushing our code to github, then pull is the way to get the updates from there.

$ git pull -u origin maste­r

See, we added our magical '-u', so next time, we can simple write the following.

$ git pull

Well, that's enough for now, in the following section, I will list some other commands for your (and my) reference, but you can skip them for now.

To see difference between last commit and current files

$ git diff head

Also you can see differences for staged files

$ git diff --staged

To create a branch to play in

$ git branch branch_name

To see which branch you are in, just type:

$ git branch

To move to your new branch, type:

$ git checkout branch_name

To merge changes in branch_name to master, type the following wile on master

git merge branch_name