聚會時間公告: 因應COSCUP 2011, Kalug 8月份休會一次

二月 28, 2011
» Android Honeycomb

二月 15, 2011
» Why Scala?

Check out this SlideShare Presentation:

二月 6, 2011
» [Tech notes] How to delete objects in Java?

There is no delete or free keyword in Java. The only thing that can collect the unreferenced memory chunk is garbage collector (GC). To take advantage of that, the best practice is to 'null' out your object reference whenever you want the GC to free that object:


MyObject a = new MyObject();

... /* Do something with object a */

a = null; /* Tell GC to free the memory referenced by a! */

» [Tech notes] What is Anti-aliasing?

Basically it is a technique to make your image/graphics smoother or reduce jagged edges of your graphics.

See the references below:

http://www.pantherproducts.co.uk/Articles/Graphics/anti_aliasing.shtml
http://en.wikipedia.org/wiki/Spatial_anti-aliasing

二月 5, 2011
» What is focus in computing?

'In computing, the focus indicates the component of the graphical user interface which is currently selected to receive input. Moving the focus away from a specific user interface element is known as a blur event in relation to this element.'

By convention, the tab key is used to move the focus to the next focusable component and shift + tab to the previous one.

There are several window management policies for focus:

Click to focus

On most mainstream user-interfaces, such as ones made by Microsoft and Apple, where one must click the mouse inside of the window for that window to gain focus.

Focus follows pointer

Another common policy on UNIX systems using X11 is the "focus follows mouse" policy (or FFM), where the focus automatically follows the current placement of the pointer.

二月 2, 2011
» [Tech notes] Android API levels

The following table specifies the API Level supported by each version of the Android platform:

Platform VersionAPI Level
Android 2.39
Android 2.28
Android 2.17
Android 2.0.16
Android 2.05
Android 1.64
Android 1.53
Android 1.12
Android 1.01

The API Level identifier serves a key role in ensuring the best possible experience for users and application developers:
  • It lets the Android platform describe the maximum framework API revision that it supports
  • It lets applications describe the framework API revision that they require
  • It lets the system negotiate the installation of applications on the user's device, such that version-incompatible applications are not installed.

Applications can use a manifest element provided by the framework API — uses-sdk — to describe the minimum and maximum API Levels under which they are able to run, as well as the preferred API Level that they are designed to support.

Development Considerations

Application forward compatibility

Android applications are generally forward-compatible with new versions of the Android platform.

Because almost all changes to the framework API are additive, an Android application developed using any given version of the API (as specified by its API Level) is forward-compatible with later versions of the Android platform and higher API levels.

Application backward compatibility

Android applications are not necessarily backward compatible with versions of the Android platform older than the version against which they were compiled.

Reference

一月 31, 2011
» Virtual function

In object-oriented programming, a virtual function or virtual method is a function or method whose behaviour can be overridden within an inheriting class by a function with the same signature. This concept is a very important part of the polymorphism portion of OOP.

The purpose of having a virtual function is as follows:

In OOP when a derived class inherits a base class, an object of the derived class may be referred to (or cast) as either being the base class type or the derived class type. If there are base class methods overridden by the derived class, the method call behaviour is ambiguous.

The distinction between virtual and non-virtual resolves this ambiguity. If the function in question is designated "virtual" in the base class then the derived class's function would be called (if it exists). If it is not virtual, the base class's function would be called.

Virtual functions overcome the problems with the type-field solution by allowing the programmer to declare functions in a base class that can be redefined in each derived class.

Programming language supports for virtual function:

C++: virtual methods are declared by using the virtual keyword followed by the function name and the parenthesis ().

Java: In Java, all non-static methods are by default "virtual functions." Only methods marked with the keyword final, which cannot be overridden, along with private methods, which are not inherited, are non-virtual. To override a method, use an annotation '@Override' (could be omitted) followed by function definition.

Python: In Python all class functions (methods) are virtual. And no special keywords needed to make overriding or virtualization happen. It just works automatically!

Reference: wiki

一月 22, 2011
» [Tech Notes] Android basics II - Android SDK building blocks

A few objects are defined in the Android SDK that every developer needs to be familiar with. There are the building blocks of your android applications.

The most important ones are: Activities, Intents, Services, and Content Providers.

Activities - represents a user interface screen. Applications can define one or more activities to handle different phases of the program.

Intents - a mechanism for describing a specific action, such as "pick a photo". Everything has to go through Intents before creating activities or actions.

Services - a service is a task that runs in the background without the user's direct interaction, similar to a Unix daemon.

Content Providers - a set of data wrapped up in a common API to read and write it. This is the best way to share global data between applications.

» [Ubuntu] Change desktop launcher icon

How to change desktop launcher icon? It is surprisingly easy, check here.

一月 21, 2011
» [Tech Notes] Android Basics I - Android System Architecture

Android system architecture:

Get get the big picture of system architecture, please check out this documentation online. To sum up, there are four primary layers for the software system - Linux Kernel, Libraries and Android Runtime, Application Framework, Applications and Widgets.

This concept is essential because you need to know what layer (s) you will be dealing with when developing apps, making your own frameworks and libraries or even modifying Linux Kernel. For application development, you will not see Linux Kernel, all you can see is Application Framework and Application layers.

Android System Architecture

support:

biggo.com.tw

A Django site.