Friday, 31 July 2009

Yahoo Gives Up?

As a shareholder of Yahoo (granted a rather small shareholder), I am not sure what to think of the announcement this week. Basically, Yahoo is going to outsource the development and maintenance of their Search Engine to Microsoft. For the 10 years the deal runs, it looks like a good deal for Yahoo. But what happens after that? Essentially, you have killed all your search and advertising R & D. You have nothing to fall back on. No software, no expertise, all gone. With only two options to choose between, this puts you in a very weak position for negotiating your next deal. Plus, after 10 years could you even contemplate decoupling your infrastructure?


So, this begs the question. What is Yahoo trying to be? The biggest online newspaper? That seems more than a bit risky. Some sort of web app conglomerate? A little more potential there.


For me, Yahoo has always been great at creating or buying innovative web services and applications. But once they have a great app, they don't seem to know what to do with it. Take Flickr, a totally awesome service that they really haven't improved much since they bought it.


But there is hope. I like the improvements that have been made to Yahoo! News and My Yahoo!. They have a number of very cool apis and dev tools that have a lot of potentional. Maybe with a little more focus on the assets they have, they can find new ways to grow.


Bottom line. Once the deal goes through, the die has been cast. Their future no longer lies in search.


Below are a few more opinions on the deal.


Loading All the Styles from another Document with Open Office 3

I'm working on some new book templates at work. One thing you need when building books is the ability to copy all the styles and formats from one document to another. This allows someone working on a template, to pass all their updates to another author. FrameMaker does this quite well. So does Open Office. Detailed steps can be found here. Check out the second section toward the bottom of the page.

Wednesday, 29 July 2009

PCs Free Like Phones


Linux Logo

PCs free with your internet service? That is the point this article makes. I agree with it. With the price of things like NetBooks getting cheaper than many devices, like an iPhone, I think its inevitable.

Tuesday, 28 July 2009

Simple Compiler And Runtime, BASIC for Android

Simple is a BASIC dialect for developing Android applications. It is particularly well suited for non-professional programmers (but not limited to). Simple allows programmers to quickly write Android applications by using the components supplied by its runtime system.

Simple programs are form definitions (which contain components) and code (which contains the program logic). The interaction between the components and the program logic happens through events triggered by the components. The program logic consists of event handlers which contain code reacting to the events.

Simple Project Home
To know How To Write A Simple Application

Saturday, 25 July 2009

North Denver Free Wifi: Old Chicago Broomfield

Old Chicago - Broomfield is standard brew pub or sports bar fare that specializes in pizza and calzones. But instead of brewing their own beers, Old Chicago is know for their variety. So if you are interested in trying an import or a micro brew, Old Chicago's a great place to go. The pizza is great. You can expect a little wait to get in on Friday and Saturday night.


The wifi has easy access. Pretty much, you just start your machine and go. No login or registration required at this point in time. It is fairly dark so its a great place to hack a little. The music is ok, kind of KBCO eclectic rock, not too intrusive. The place can be a little loud at prime time when a lot of kids are around.


On the whole a great place to hang out and surf a bit.



Old Chicago - Broomfield

1280 East 1St Avenue

Broomfield, CO 80020

(303) 443-5031



Thursday, 23 July 2009

Configure Eclipse to work with local cvs server

In previous article, Setup cvs server on Ubuntu, I described how to setup cvs server. In this article, I will describe how to setup Eclipse to work with the local cvs server.

OS: Ubuntu 9.04
Eclipse version: 3.5 Galileo, with CVS installed.

Firstly, open your project and switch to CVS Perspective
Click the Eclipse Menu Bar Window > Open Perspective > Other...

Select CVS Perspective Expoloring


Right click on the empty are of CVS Perspective wiindow,
select New Perspective Location

Enter the setting:
Host: localhost
Repository path: /myrepos
User: cvsuser
Password: ********
Connection Type: pserver
Use the default port


Click Finish


Switch back to java Perspective

Right click project, select Team > Share Project...


Use existing repository location:
:pserver:cvsuser@local:/myrepos
and click Next


Accept the default setting, click Next


And click Finish


Enter your comment and click Finish


Now, your Eclipse project is linked with your local CVS sserver.

Wednesday, 22 July 2009

Setup cvs server on Ubuntu

In this article, I describe steps to setup cvs server on Ubuntu.

Install cvs and cvsd, start Synaptic Package Manager from ubuntu menu bar
System > Administration > Synaptic Package Manager

typ cvs in Quick Search box, select cvs and cvsd, click Apply.


When installing cvsd, you will be asked to enter Repositories to serve, the default setting is /demo:/myrepos, just accept it and click Forward.


After changes applied, you can close Synaptic Package Manager.

Next, open a Terminal.

Type the command to create /myrepos
#cd /var/lib/cvsd
#sudo mkdir myrepos

Initial /myrepos
#sudo cvs -d /var/lib/cvsd/myrepos init

Modify the file /var/lib/cvsd/myrepos/CVSROOT/config
(May be you have to change the permission to writable)

#sudo gedit /var/lib/cvsd/myrepos/CVSROOT/config
Add the line into it:

SystemAuth=no
PamAuth=no
LockDir=/tmp/myrepos

Save and Exit editor

Create LockDir
#sudo mkdir /var/lib/cvsd/tmp/myrepos

Add a user, named cvsuser
#sudo cvsd-passwd /var/lib/cvsd/myrepos cvsuser
You will be ask to input password.

Modify /etc/cvsd/cvsd.conf
#sudo gedit /etc/cvsd/cvsd.conf

Scroll to end of the file, find the text

Listen * 2401
Repos /demo
Repos /myrepos


change to

Listen 127.0.0.1 2401
Repos /demo
Repos /myrepos


where 127.0.0.1 is my local static IP, 2401 is the default port used by cvs.

and then, set the right.
#sudo chown cvsd:cvsd /var/lib/cvsd -R

Restart cvsd
#sudo /etc/init.d/cvsd restart

You can check the cvsd status using the command,
#sudo /etc/init.d/cvsd status

Make sure it's running.


Now your cvs server is up and running, in the comming article, I will describe how to configure Eclipse to work with this local cvs server.

Tuesday, 21 July 2009

Eclipse Local History

Using Eclipse to develop Android, you can have some useful tools to improve your working. Eclipse's Local History and CVS help much in keep record/version in development.

Local History

Local history of a file is maintained when you create or modify a file. Each time you edit and save a file, a copy of it is saved. This allows you to compare your current file state to a previous state, or replace the file with a previous state. Each state in the local history is identified by the date and time the file was saved.

Neither projects nor folders have local history.

Local History is displayed in the History View. Here is a look at what the local history of a Workbench file might look like:



To view the local history of a file, choose Team > Show Local History from the pop-up menu. This will bring up the History view and populate it with the revisions of the selected file. You can open different revisions from the table (by using Open from the context menu or by double clicking on a revision), compare them against the latest revision or against a previous revisions (by using Compare With Revision from the context menu), and replace the current revision with the contents of a previous revisions (by using Get Contents from the context menu).



For more details, refer to your Eclipse's Help Workbench User Guide > Reference > User interface information > Development environment > Local history or Eclipse on-line help here


In comming articles, I will describe how to set-up a CVS server on Ubuntu, and configure Eclipse to work on local CVS server.

Monday, 20 July 2009

Added a Simple Cookie Example


PHP Logo

I have added a very simple cookie example to my how to pages. It shows how to set a cookie and read it back with PHP. Just wanted some simple examples for my own reference. For detailed information on the subject I recommend the following book.


PHP Cookbook (Cookbooks (O'Reilly))

Sunday, 19 July 2009

HTC Hero - First Look




A glimpse from HTC of what their third-generation Google/Android smartphone will look like. This model, the Hero, is designed for European customers. A version (or versions) of this phone, especially designed for the U.S. market, is said to be in the works for release by the end of 2009.

Change UI elements by changing main.xml

In the previous article, "Exercise: Hello World with EditText input", all the elements are placed in a single LinearLayout, both the OK and Cancel button's width are defined as wrap_content. It can be noted that the layout is not good aligned.

The layout can be changed by changing main.xml, without any modification on the java code.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Who you are?"
/>
<EditText
android:id = "@+id/message_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id = "@+id/ok"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="OK" />
<Button
android:id = "@+id/cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>





<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Who you are?"
/>
<EditText
android:id = "@+id/message_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id = "@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK" />
<Button
android:id = "@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
</LinearLayout>






<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Who you are?"
/>
<EditText
android:id = "@+id/message_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="right|bottom"
>
<Button
android:id = "@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK" />
<Button
android:id = "@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
</LinearLayout>



Download the project files

Exercise: Hello World with EditText input


In this exercise, I will implement a simply Hello World Andrid application; there is a EditText, after user enter name and click OK button, the Title of the application will be changed accordingly.

First of all, generate a Android Project in Eclipse, as described in the previous article, Install Android SDK on Eclipse 3.5 Galileo.

Modify the main.xml to change the UI screen.


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Who you are?"
/>
<EditText
android:id = "@+id/message_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<Button
android:id = "@+id/ok"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK" />
<Button
android:id = "@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
main.xml

And then, change the HelloAndroid.java as follow:


package com.example.helloandroid;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


Button okButton = (Button) findViewById(R.id.ok);
okButton.setOnClickListener(okOnClickListener);
Button cancelButton = (Button) findViewById(R.id.cancel);
cancelButton.setOnClickListener(cancelOnClickListener);
}
private Button.OnClickListener okOnClickListener =
new Button.OnClickListener(){
@Override
public void onClick(View v) {
EditText edit_text = (EditText)
findViewById(R.id.message_text);
CharSequence edit_text_value =
edit_text.getText();
setTitle("Hello:"+edit_text_value);
}
};

private Button.OnClickListener cancelOnClickListener =
new
Button.OnClickListener(){
@Override
public void onClick(View v) {
finish();
}
};
}
HelloAndroid.java

Saturday, 18 July 2009

WYSIWYG Open Source HTML Editing

While working on a project this week, I needed to create a simple HTML file to store a little narrative. So, instead of doing this by hand, it seemed like a good idea to try to create the file using a WYSIWYG editor.


For the initial try, the file was created with Open Office 3.1 for the Mac. Now editing the file in Open Office, is nice and easy. Just what you would expect from a full featured word processor. However, the HTML produced from OO is less than full featured. Heavy use of font tags and such makes for a less than desirable HTML output file. Very 1990s.


So to clean up the file, I remembered that the Composer application is still included as part of the SeaMonkey Project. If you are not familiar with it, SeaMonkey is essentially the "Son of Netscape", the continuation of the classic Netscape browser. It uses the same core as the Firefox browser, but keeps the same all-in-one feature set of Netscape. I was very pleased with the HTML output of Composer. Very clean HTML. No unecessary font tags and the like. The user interface is still a bit basic, but functional.


While searching around for information on Composer, I ran across this post about Kompozer, Composer, and NVu. KompoZer is a continuation of NVu. NVu is a very simple stand alone open source HTML WYSIWYG editor made for the Linspire OS. Unforunately, for copyright reasons, it could not be updated. So the source was forked and Kompozer was born. According to the post, the KompoZer app will be updated to the latest version of Gecko and then folded back into the SeaMonkey version of Composer. Very cool. It is good to have a tool like this in the Open Source space.

Friday, 17 July 2009

Firefox 3.5.1 Available

Firefox Logo

The Firefox 3.5.1 update is available today. It fixes stability issues, some security problems, and long load times on Windows. Yay!

Install Android SDK on Eclipse 3.5 Galileo

In this article, the procedure to install Android SDK on Eclipse Galileo will be described:



Android 1.6 SDK is available now, the setup procedure is same:)

If you have installed Android SDK 1.5 with Eclipse already,
here is the procedure to upgrade from Android 1.5 to 1.6.

--- Erik edited@2009-09-16 ---





Android 2.0 is available.
In order to develope application for Android, Android SDK Tools, Revision 3 is need.
The setup procedure is same.
:)

If you have installed Android 1.6 SDK with Eclipse already,
here is the procedure to upgrade to Android SDK Tools, Revision 3.

--- Erik edited@2009-10-28

It you are going to install Android SDK release 3 + Eclipse 3.5 + Ubuntu 9.10
Refer here: http://android-er.blogspot.com/2009/11/install-android-sdk-release-3-on.html

--- Erik edited@2009-11-06






OS: Ubuntu 9.04
Java: Sun JDK 6
Eclipse version: 3.5 Galileo
Android SDK: Android 1.5 SDK r3 (Also applied on Android 1.6 and 2.0 SDK)

Before you can start, you have to install jdk, type the following command in Terminal:
sudo apt-get install sun-java6-jdk

Sun's JDK 6 will be installed automatically.

Download Eclipse IDE for Java Developers from http://www.eclipse.org/downloads/, the current version is 3.5 Galileo. Extract to any location you want.
Download Android SDK http://developer.android.com/sdk/index.html, extract to any location you want.


http://developer.android.com/sdk/1.6_r1/index.html for Android SDK 1.6.




Here is page to Download the Android SDK for Android 2.0 SDK.



You are suggested to add the location of the SDK's primary tools directory to your system PATH. In my case, used on ubuntu 9.05, modify the file ~/.bashrc to include the statement:

export PATH=${PATH}:android-sdk-linux_x86-1.5_r3/tools

where android-sdk-linux_x86-1.5_r3/ is the location of my android sdk.

Now, it's the time to Installing the ADT Plugin for Eclipse:

Start Eclipse, click Help>Install New Software...


click ADD to add ADT site

insert https://dl-ssl.google.com/android/eclipse/ in the location box, and click OK.

Make sure to enable Developer Tools and click Next.

and Next again.

Accept the terms and click Finish.
You will be asked to restart Eclipse, just restart it.

Then you have to set Eclipse preferences for Android SDK.

Click Window>preference

Browse to the location where you install the Android SDK.

Click Apply, and wait for a moment, the list of SDK will be displayed, click OK.
Basically, your Eclipse+Android development IDE is finished.

Before you can Run your Android application on emulator, you have to create your Android Virtual Device (AVD).

Open a terminal, navigate to the /tools directory in the SDK package and execute:

android create avd --target 2 --name my_avd

It's time to implement a HelloAndroid to check if it's work OK.

Click File>New>Project... then select Android>Android Project... and click next.

Fill in the project details with the following values:
  • Project name: HelloAndroid
  • Application name: Hello, Android
  • Package name: com.example.helloandroid
  • Create Activity: HelloAndroid
  • Min SDK Version: 2
And click Finish.



Oop!
no classfiles specified
Conversion to Dalvik format failed with error 1

If you see the error (I suppose you will), add Android in the Build Path.

Right click you project, Build Path>>Configure Build Path...


Enable Android 1.1 and click OK.

Wait a moment, you project will be re-built. Suppose your project will be built without error.

Right click the project, Run As>>Android Application


Wait! Wait! your first HelloAndroid will be run on Android Emulator.

Thursday, 16 July 2009

Android 1.5 SDK r3 released


Android 1.5 SDK r3

Android 1.5 SDK is now available. It includes new APIs for Android 1.5, updated developer tools, multiple platform versions, and a Google APIs add-on.

Download Android 1.5 SDK �

Wednesday, 15 July 2009

Sony Ericsson Rachael UI


A demo showing the customizations Sony Ericsson applied to Android in its forthcoming uberphone - codenamed "Rachael".

Tuesday, 14 July 2009

live-android, A LiveCD for Android



LiveAndroid, is a LiveCD for Android running on x86 platforms.

Want to give Google Android a try, but don't feel like buying a T-Mobile G1? LiveAndroid lets you download a LiveCD disc image of the Google Android operating system. Just burn the image to a disc, stick it in a CD-ROM drive, and reboot your computer and you can check out Android without installing it or affecting any files on your PC.

You can also use the disc image in a virtualization application like VirtualBox or Microsoft Virtual PC if you want to try the operating system without even rebooting your computer.

The current version is 0.2.

To know more about LiveAndroid>>

Sunday, 12 July 2009

Phone Fixed

Let me give credit where credit is due. Qwest finally did came out and fixed my phone yesterday about 4pm. It seems only one wire in the pair was working. One wire at the main switch box had broken off.


What was truly amazing was my DSL started working on Friday night and kept working until the phone was fixed. Pretty amazing.

Friday, 10 July 2009

Living without an Internet Connection - Thanks Qwest

Just wanted to complain a bit. Thursday at 3:30pm, my phone line went dead for no apparent reason. It wasn't a very hot day. No thunderstorms, no rain. One minute I had a Net connection and a dial tone, the next nothing. That's where the FUN begins.


So I call Qwest to see what is up. Some genius there decided to install an "automated" problem reporting system. Tip to Qwest higher ups, when your phone and Internet goes down, the last thing you want to do is interact with a machine.


So I answered all the machines questions and all it would say is my problem would be resolved by Saturday at 7:00pm. Not being very comforted by the Cylon, later that night I called and got a human. He tested the line and noted it rings and goes to my voicemail, but could not tell if the problem was at my house or not. He had me unplug all my devices and wait a few minutes to see if that cleared the problem. A good try, but it didn't work. So today I have been running around trying to figure out the best place to get some Net.


Later in the day I remembered, Qwest offers free Wifi at some Starbucks around town. Sure enough, I went the the Barnes and Noble in Westminster, entered in some information, and voila!!! Free internet access! And I don't have to buy coffee to use it!


So thanks for the free Wifi! And fix my phone please. :)

Silly Chrome OS Posts

Ok, now its getting annoying. I keep seeing all sorts of new Chrome OS posts and articles pretending to provide new information on the new OS. Instead, it they are usually just another opinion piece stating how "Chrome will destroy Microsoft". Aren't we getting a little ahead of ourselves? Maybe we should wait for a public Alpha for Beta version of the OS before predicting the demise of Windows. I too am intrigued, but it would be nice to have a little more info on the subject.

Thursday, 9 July 2009

JQuery Tutorials


JQuery Logo

I found a few JQuery tutorials I wanted to post about before the 4th of July break, but just didn't have time to write a post. So here they are:



I have also posted them to my Tutorials Page

Wednesday, 8 July 2009

Google Desktop now supports 64 bit Windows

Last September we released Google Desktop version 5.8, which was lighter, faster and free of trans-fats. We also asked for any feedback, and users responded with "how about 64 bit support?" Well, as of today Google Desktop supports 64 bit Windows - go ahead, give it a try.

In addition to supporting 64 bit Windows systems, Google Desktop now supports the latest browsers as well (Google Chrome, Firefox 3, & Internet Explorer 8). Most browsers now integrate safe browsing solutions to protect users from malware and phishing. This is similar to what the Google Desktop Safebrowsing feature accomplishes.

To ensure that Google Desktop offers an efficient, optimal experience we will be removing the Safebrowsing feature on July 31. We encourage everyone to make sure they are upgrading to a browser that protects them from malware and phishing.

We hope you enjoy using Google Desktop on 64 bit Windows systems!

Android 1.5 NDK, R1 released

What is the Android NDK?

The Android NDK provides tools that allow Android application developers to embed components that make use of native code in their Android applications.

Android applications run in the Dalvik virtual machine. The NDK allows developers to implement parts of their applications using native-code languages such as C and C++. This can provide benefits to certain classes of applications, in the form of reuse of existing code and in some cases increased speed.

The NDK provides:

  • A set of tools and build files used to generate native code libraries from C and C++ sources
  • A way to embed the corresponding native libraries into application package files (.apks) that can be deployed on Android devices
  • A set of native system headers and libraries that will be supported in all future versions of the Android platform, starting from Android 1.5
  • Documentation, samples, and tutorials


Download Android 1.5 NDK, Release 1>>

Android 1.5


The latest version of the Android platform brings new features, improvements, and enhancements to Android-powered phones.

Highlights

  • Fast, smooth typing with the on-screen virtual keyboard
  • Easy access to favorite apps, contacts, bookmarks, and more via home screen widgets and live folders
  • Video recording, playback, and sharing
  • Full web experience with enhanced browser
  • Hands-free calls and listening with stereo bluetooth
  • Lots of UI refinements and performance improvements to the overall phone experience
  • New APIs and elements to enable even more innovative apps from developers




Behold the Future of the Computing - Google Chrome OS


Google Logo

Well I suppose I might as well jump on the bandwagon. Google has announced an Operating System focused on its Chrome browser. The core of the operating system will be based on Linux. The design is supposed to lightweight with a focus on security and ease of use. Netbooks will be the initial target platform.


This is the future of the computing, not just operating systems. More and more applications are gonna get pushed to the Net. You will access your applications through the browser and store your data on the cloud. The idea of boxed software will go the way of the buggy whip.


Google certainly has deep enough pockets to take on Microsoft. The question is, can they come up with a product compelling enough to stop folks from paying the Microsoft tax. Windows 7 is gonna be huge, but will it be the last operating system from Microsoft that matters?

Understanding Closures

Found this article on Understanding Closures on webreference.com. Based on my experience, the more closure examples you can look at, the better.