Friday, December 28, 2012

Initial foray into Android development

I took a deep breath and jumped in. You know what, the water is fine.

I finally made the small jump into Android development. Although, I am just hacking about, I am determine to build something useful. Firstly, useful for me as the first customer, and the useful for anyone else.

The stimulus for getting started in the Android development is the release of the SDK from Google that is easy to install and to get started upon. The one thing that really threw me off to get started on development on the Android platform getting the development environment working correctly.

I have always had a low budget x86 PC as my home computer, and this is what I was going to use as my development machine at home. To get the Android development working nicely on this was a nightmare. I recently bit the bullet and got a Mac Mini with a Intel I7 core. Even with this modest setup, it proved to be the silver bullet for me to get started. The nicely packaged SDK also help enormously.

I downloaded the SDK for Mac from Google. The download from Google installed a properly configured Eclipse and SDK in their correct location. I can simply start Eclipse and start following the Android developer's training

To round up the overall development, I signed up for a Github account. I also had to install Git, but that was pretty painless after following the instructions here. I have resisted installing any Git GUI client as I really like the command line interface.




Monday, September 03, 2012

Creating a landing page

If you listen to the many startup podcasts, the one thing that is consistently common among the advice from them when validating an idea is to create a landing page.

What is a landing page? Well, a landing page is a website that gives the visitor quick spiel of your idea and a spot for them to signup to it. The idea is to measure how much interest there are out there to you idea. There are no real measure for this except for the number of signups.

A measure of visitors the landing page is not a good measure as they are only considered as a casual visitors, and does not necessary show real interest in the product.

My landing page at launch.48translate.com was based upon the services of launchrock.com. It uses one of the standard template. I just updated the description and the background to give it a different flavour. Looking at it, it is unmistakeably a page from launchrock.com.

My landing page is my attempt to capture an email address which is a sign of the interest.

I could have gone with a different implementation by using something like weebly.com and embedding a widget from someone like mailchimp.com. Both solutions are free to get started on, but the weebly implementation requires two services, where as launchrock.com only requires the one services.

Some things to lookout for. 

  1. When you first starting a landing page, make sure that your naked address and your www address also redirected to it. 
  2. Get someone to review your text that you put up on the landing page. Make sure that it is correct. Nothing more embarrassing that publishing some action that you cannot support.
  3. Have something on your landing page that could encourage visitors to signup.




Tuesday, July 10, 2012

csv.DictReader in python

I am playing around getting python to parse simple CSV files. In the past, it would get quite difficult no matter which language I choose to do it. PERL does some useful parsing of it, but python is dead simple. It becomes even simpler when usign the csv.DictReader. The following snippet of code illustrates the point.


#!/usr/bin/python
from optparse import OptionParser
import csv


parser = OptionParser()
parser.add_option("-f", "--filename", dest="filename", help="the filename of the csv file")


(options, args)=parser.parse_args()


if options.filename != None:
        csv_filename = str(options.filename)
else:
        csv_filename = "foobar.csv"
print "csv file is " + csv_filename


inputfile = open(csv_filename, "rb")
csvReader = csv.DictReader(inputfile, fieldnames=['create_ts','title','url','id','hn_discussion'], delimiter=',', quotechar='"')


for row in csvReader:
        print row['id'] + " " + row['url']


inputfile.close()

The first part just parses for an input from the console for a filename of the csv file.

The second part is the interesting part where it parses the file as per the given fieldnames. The fieldnames were given during the call of the csv.DictReader.

By the way, this snippet of code is more prototype rather than production. Much error checking is missing and exception handling is missing, so beware.


Tuesday, June 26, 2012

What platform for Mobile apps?

This is just a list of development platforms that I can use for mobile apps.


Google Android SDK - Only for Android, however supported by Google.


Haxe.org - Multi-target. Also needs the Google Android SDK as it generates C++ code. Haxe is a multi target language, similar to Java.



Monday, June 25, 2012

Googlecl, what the f*ck is it?

I was going crazy trying to workout a way to upload data into the my blogger account. Sure, I could just write a post via the post option within blogger, but I want to do this in an automatic manner.


My first was to sent an email via the command line to blogger. The problem is that while it sort of work, I came across the problem that the post is uploaded and marked as a draft version. So I still need to login and publish it. Another problem is that my posts have pictures in them. I am unable to embedded a picture in the email that I am sending via the command line.


The second attempt is to access the Blogger API directly. However, during my research in the Blogger API, I came across googlecl


googlecl is Google's answer to accessing data to their services. Their services includes Blogger, Picasa, Docs and many more.


googlecl is also able to upload a file. So if that file is a html file, it would be rendered quite nicely by blogger.


The commandline is


google blogger post --src [filename.html] --title "a title" --tags "awesome"


The article has some hints if googlecl docs are too confusing.

Monday, May 07, 2012

Creating a news aggregator, showhn.blogspot.com

I have been a frequent leader of the tech news aggregator site at Hacker News. It is basically a collection of links and discussions of tech startup news, or just tech news in general that would appeal to the startup hacker.


When someone wants to show case their weekend projects, they usually post a "Show HN" posts on hacker news. As a way of increasing their presence, I have filtered all the Hacker News post for the "Show HN",  screen grab the webpage, voila, showhn.blogspot.com is born.


I have automate the collecting of data via an Google Spreadsheet App script. It uses the hnsearch api to grab the data.


The hnsearch api works directly with the Hacker News database. There are a couple of other hacker news API that performs a HTML scrapes on the Hacker News website and store it in their internal database. An API is available to access the scraped data.


The screen capture is performed using a Chrome screen capture plugin, specifically the Google Chrome Screen capture


At the moment, I am treating this as a learning tool. I am especially on getting a handle on how data can be obtained from the websites, and how that data can be manipulate. So far it has been quite a enlightening experience.

Thursday, April 12, 2012

This is getting annoying...validation of an idea.

I got a email from Nev (of AppSumo fame) about how many people are having good success in validating their ideas. So the AppSumo guys thought it would be a good idea to run a competition to see who had best validations, and the winner gets a trip to Austin, Texas.

Well, I accepted the challenge and posted up a validation idea. Check it out here, http://totalcostofcar.weebly.com/ for the launching site.

So I posted up my validation response and ticked the box to receive any follow up messages. This was getting good until some crazy spammers started to post comments, eh spams, up. It was getting annoying.
 
As for my idea, I am going to run this as a slow ramp up. Firstly, I don't have the time to launch into full time, and secondly, I have many things to learn, and thirdly, it started to look like a small idea the start, but it is actually quite a complex application.

I am using weebly.com to create the launch page, however I came across launchrock.com which could have been a better choice as it has better mailing list integration. 

For mailing list management, I stuck with mailchimp.com as I didn't know anything else and I have heard that it was one of the better ones around.

The launch page has been up for about 1 week, and I haven't done and marketing for it. I have four subscribers, so lets see. I need to understand how mailchimp.com works to use it more effectively. 


Tuesday, March 27, 2012

unity, cmock and ceedling

This could be the first post about how I am using a unit testing framework that uses the mock concept.


Some background, I was researching some information on the best way to deploy a unit testing framework for embedded work. I started by posting a question on the programmers.stackexchange.com. The answers led me to investigate the solutions provided by Atomic Embedded, namely unity, cmock and ceedling.


Each of the tool by itself will provide some value of unit testing for you, but for embedded work and to help manage all the infrastructure, all the three tools need to be present.


unity is a bunch of macros that performs the tests that determines if the results are correct. 

cmock provides an intelligent parser and framework that mocks the underlying code. So for all the functions that you use, cmock would be your friend.


ceedling is like the glue that holds unity and cmock together. It is a bunch of ruby scripts the parses your code that is being tested and generates the calls to cmock, generates the test runners and builds the unit test executables.


The Atomic Embedded folks also have CException but I haven't investigate this option.

Tuesday, March 06, 2012

As I was researching Java scripting, I came across an interesting new language. It is called HAXE. For me, the interesting part is the cross platform nature. 


Having a quick look at it, it looks like that HAXE has quite an establish community of developers. There have been quite a few sites, applications and webapps using HAXE as their language of choice. 


Be cross platform, it means that I could be developing a Android application, but it can also be deployed for iOS or a Windows phone.


A framework is also available to create rich and engaging sites. The framework is NME.


I am not too sure what toolchain is required, but with NME as a framework, deployment of it to an Android device looks to be quite easy.



Saturday, March 03, 2012

Choosing a host

On my journey to be the webapp guru :-), I started to search on the net for online tutorials and came across www.html.net


On the html.net, it gives some information for all the basic foundations of the building a webapp. I mean, the stack could include Ruby or Python or other. html.net concentrated a php for the server side functionality and javascript for client side functionality. That seems quite reasonable.


I quickly read through the html tutorial and the tutorials about CSS. It is now time to tackle php. I went with their recommendation on using 000webhost.com


The signup process was pretty easy and allow me to quickly get up and going quickly.


From my learning perspective, it said that it gives me full php functionality with MySQL. Technically, it gives me php version 5.2.17 and I can get access to a MySQL installation.


Well, let continue and see how far this gets me.


disclaimer: the link to 000webhost.com is an affiliate link..

Wednesday, February 29, 2012

Hacker News articles and webapp

I just read a couple of post that has quipped my interest in getting starting in webapplications. I found the posts here, where someone was learning Java Script. His results were impressive.

The other posts that I found were through a search on "profitable weekend project" on Hacker News and it brought up quite a few projects.

Some of the projects were quite simple to implement, include www.whatportis.com. It just allows the user to enter a port number and it tells you what it is used for. The other interesting thing is that a simple site like this is a great server for on-line adverts. 

So my motivation for learning Java scripting is to give me the tools to build these simple webapp. Perhaps getting more complicated as my skill set grows.