Dear
Software Developers,
This CPTTM Software Developer newsletter is to bring useful news to
you, software developers in Macau, for references without obligations,
so that you can do your jobs easier and better! Hope you like it. if
you'd like to unsubscribe or recommend your friends to subscribe, just
email me at kent@cpttm.org.mo.
Old issues are available here.
Topics in this issue:
Real-world hyperlink - 2D barcode

In Japan, you could find 2D barcodes on everything from business
card to large outdoor billboard. The most valuable part of 2D barcode
is that it could contain more data than normal barcode and many modern
cellphones are potential as a reader with built-in camera and software.
You could use it for textual data transfer. One QR barcode could
contain up to more or less 984 of Chinese characters (Unicode format in
UTF-8).
The most common use case is that 2D barcodes are hyperlinks in the
real world. We could convert a link into QR code format. We could get
those QR codes printed, so people could simply snap them by cellphone's
camera, they don't need to write the URL down. The hyperlinks are very
useful way that people could get more information from the Internet.
For an example, if your company website has a Google Map to show the
location of your company. If you provide a QR code next to the map. The
visitors could capture it to open a Google Map in their smartphone,
which navigate them to your company's location.
If you want to encode data into QR code in your website or
application, you could try these open source projects or free web
services:
If you are a mobile app developer, you might be interested in ZXing.
ZXing (pronounced "zebra crossing") is an open-source, multi-format
1D/2D barcode image processing library implemented in Java. Android OS
running on smart-phones have already had a built-in barcode
scanner app based on ZXing. Check out more information ZXing's project
website: http://code.google.com/p/zxing/
The use of QR Code is free of any license.
Thanks to Denso Wave which the company owns the patent rights on QR
code and has chosen not to exercise them and published QR Code as open
standard.As more and more mobiles are able to read those 2D barcodes,
it is nice to have more QR codes in your websites and printed material.
Let your target audience to store your information in a convenient
manner.
Tim Ma
PHP.JS - Use PHP functions in Javascript

If you are a PHP programmer, you always jump between two worlds -
Server-side and Client-side. You write PHP server-side scripts to deal
with stuff like database accessing. You write Javascript client-side
scripts to present interactive user interface.
Thanks to PHP.JS, now you could apply your favorite PHP functions
in JavaScript. Due to JavaScript comes with web browsers only provides
functional and foundation functions so you always need an external JS
file or framework to fulfill your need. But PHP had already provided
many handy and high level functions.
For example, if you want to strip the HTML tag from a text area by
Javascript. strip_tags() is a famous built-in function from PHP. With
PHP.JS, you could use those high level PHP functions in Javascript.
One more example shows that JavaScript is not quite handy to deal with time:
var now = new Date();
today = (now.getYear() +1900) + '-' /* getYear() return 110 for Year 2010 */
+ (now.getMonth() +1) + '-' /* getMonth() return 0~11 */
+ now.getDay() ;
alert(today);
With PHP.JS, you could simple use date():
alert(date('Y-m-d')); //date() from PHP
To use PHP.JS you can either:
- Copy-Paste one of implemented Functions here .
- Customize a (CommonJS) package here
- Download the default package (only
use for study and development only, because it will slow down the
browser performance when you load all supported functions at one time)
Of course, PHP.JS is not an excuse for you not to learn JavaScript. PHP
and JavaScript are naturally not the same. They are built for entirely
different environment (server and client side). There is no DOM
(Document Object Model) manipulation in PHP and you could not access
File IO or database in JavaScript. So the same function in PHP.JS might
behave sightly differently that you should read the document carefully
or learn some JavaScript when you try to use PHP.JS.
PHP.JS project home: http://phpjs.org
Tim Ma
Software Developer's Missing Skill: Self-marketing
As
a programmer, we love to write code and try to delivery a high quality
code. We work hard and love to learn new languages or techniques to
improve ourselves. Sometimes we just too focus on our ability to tell
people how good we are. Have you even tried to market yourself?
You might wonder who are your target audiences for that. To market
yourself to non-technical people, getting certificated is a good start
to let them know how professional you are. Since they might don't
understand what you are doing, a certification from a industry
authority could convince them. For example, if you are developing in
Java, go and get SCJP (Sun Certified Java Programmer) certificate.
Practically,
a certification only proves your have a basic standard. More further,
to market people having a strong technical background such as your
superiors and colleagues. The key point of self-marketing for software
developers is to tell people what you could do and how you do that.
There are many way you could do so. First, don't be afraid to share
your knowledge and your findings. You could email and share some
technical tips for your superiors and colleagues. You could simply
share a website and a free tool you use that help your colleagues ease
their problems. It is nice that you could are volunteering to be
responsible for a project, to conduct a tech briefing for your
colleagues. By sharing your knowledge, you will win your reputation
from your colleagues.
At the end, you
might think why bother to market yourself? I think as a software
developer, sometimes our effort is not easy to be seen and evaluated.
We are not salesperson that we could be evaluated by company's revenue.
Our key value is the ability to solve problems by designing or
conducting software system. If you could market yourself to your boss,
your boss see your value and you could get a promotion. If you could
market yourself to your colleagues, you win more trust from them and
you both share knowledge to each other.
Tim Ma
Upcoming courses for software
developers
Feedbacks
Any questions, ideas or experiences to share? Contact me at 28781313
or kent@cpttm.org.mo. We also
have two other newsletters: CIO newsletter
and Network
administrator newsletter,
your friends may like to subscribe.
Until next time,
Kent Tong |