Archive for November, 2006
How to write PHP extensions
By Justin Silverton
What is a php extension?
A PHP extension is a way to write extensions for the php language that would otherwise not be practical in the php language itself. The main benefit is speed of execution. An extension can be created in a compiled language such as c/c++ (if you look in your php.ini file, you can see examples of many extensions you most likely have already used) and loaded through a .dll (in windows) or a .so (in *nix) environment.
Types of extensions
Zend extensions
- pros: very fast and built into the core zend engine, which is what php runs on. This type of extension would be an actual change to the php interpreter/language (objects, expressions, etc).
- cons: if written improperly, can cause instability. These extensions are not recommended in most situations.
External extensions
- pros: Loaded at run-time (only the extension needs to be re-compiled when you make a change). Functionality is available to the script that loads it and memory is freed when the script ends.
- cons: Loading and unloading of extension may take up more processing power depending on how often the script loading it is accessed.
Built-in extensions
- pros: compiled with php and loaded with the php processes.
- cons: any changes to the extension require a complete re-compilation of php.
Example Code
An example extension project can be downloaded here
This example is for the *nix platform.
How to build:
$ phpize
$ ./configure –enable-hello
$ make
After running the above commands, you should have a hello.so file in ext/hello/modules/ . Now, you can copy this to your extensions directory (/usr/local/lib/php/extensions/ is the default, check your php.ini to be sure) and add the line extension=hello.so to your php.ini to trigger it to load on startup.
More in-depth information can be found here
No commentsTech Resume Tips that may get you your next job
By Justin Silverton
Here are some tips that may help you when you apply for your next tech job:
Top Ten Technical Resume Writing Tips
- List your technical knowledge first, in an organized way. Your technical strengths must stand out clearly at the beginning of your resume. Ultimately, your resume is going to be read by a thoughtful human being, but before it gets to that point it often has to be categorized by an administrative clerk, and make its way past various sorts of key word searches. Therefore, you should list as many directly relevant buzz words as you can which reflect your knowledge and experience. List all operating systems and UNIX flavors you know. List all programming languages and platforms with which you’re experienced. List all software you are skilled with. Make it obvious at a glance where your strengths lie - whether the glance is from a hiring manager, a clerk, or a machine.
- List your qualifications in order of relevance, from most to least. Only list your degree and educational qualifications first if they are truly relevant to the job for which you are applying. If you’ve already done what you want to do in a new job, by all means, list it first, even if it wasn’t your most recent job. Abandon any strict adherence to a chronological ordering of your experience.
- Quantify your experience wherever possible. Cite numerical figures, such as monetary budgets/funds saved, time periods/efficiency improved, lines of code written/debugged, numbers of machines administered/fixed, etc. which demonstrate progress or accomplishments due directly to your work.
- Begin sentences with action verbs. Portray yourself as someone who is active, uses their brain, and gets things done. Stick with the past tense, even for descriptions of currently held positions, to avoid confusion.
- Don’t sell yourself short. This is by far the biggest mistake of all resumes, technical and otherwise. Your experiences are worthy for review by hiring managers. Treat your resume as an advertisement for you. Be sure to thoroughly “sell” yourself by highlighting all of your strengths. If you’ve got a valuable asset which doesn’t seem to fit into any existing components of your resume, list it anyway as its own resume segment.
- Be concise. As a rule of thumb, resumes reflecting five years or less experience should fit on one page. More extensive experience can justify usage of a second page. Consider three pages (about 15 years or more experience) an absolute limit. Avoid lengthy descriptions of whole projects of which you were only a part. Consolidate action verbs where one task or responsibility encompasses other tasks and duties. Minimize usage of articles (the, an, a) and never use “I” or other pronouns to identify yourself.
- Omit needless items. Leave all these things off your resume: social security number, marital status, health, citizenship, age, scholarships, irrelevant awards, irrelevant associations and memberships, irrelevant publications, irrelevant recreational activities, a second mailing address (”permanent address” is confusing and never used), references, reference of references (”available upon request”), travel history, previous pay rates, previous supervisor names, and components of your name which you really never use (i.e. middle names).
- Have a trusted friend review your resume. Be sure to pick someone who is attentive to details, can effectively critique your writing, and will give an honest and objective opinion. Seriously consider their advice. Get a third and fourth opinion if you can.
- Proofread, proofread, proofread. Be sure to catch all spelling errors, grammatical weaknesses, unusual punctuation, and inconsistent capitalizations. Proofread it numerous times over at least two days to allow a fresh eye to catch any hidden mistakes.
- Laser print it on plain, white paper. Handwriting, typing, dot matrix printing, and even ink jet printing look pretty cheesy. Stick with laser prints. Don’t waste your money on special bond paper, matching envelopes, or any color deviances away from plain white. Your resume will be photocopied, faxed, and scanned numerous times, defeating any special paper efforts, assuming your original resume doesn’t first end up in the circular file
- Resumes should be concise and in a manageable document length.
- Your Name and Page Number should be located on every page, just in case pages become separated while in the hands of the prospective employer.
(The Name and Page number can be in the Header or Footer part of the resume, or at the top of the page using a smaller font size, to avoid distracting the reader. Page Numbers can be written as: Page 2, Page Two, Page 2 of 3, or Page Two of Three.) - Do not put a photograph of yourself on the resume. Potential employers will not be hiring you based on your looks! However, International candidates will need to send their scanned photograph to the Systems Integration Solutions, Inc. International Department representative along with the final formatted resume.
- Type your resume in a word processing document and back it up on a disk. Updating your resume then becomes easy. If you are not a typist, ask a professional to type it.
- Use one typeface such as Times New Roman, Arial, or other traditional typeface. The standard font size is 11 point. Headers may be increased to 12 point.
- Margins should be no less than one inch on sides, top, and bottom. The white space serves as a border and keeps the resume from looking cluttered.
- Avoid underlining within the resume narrative. If you have written the statements well, they will need no further emphasis.
- Always do a print preview of each page of your resume, to view the layout and spacing.
- E-mail your resume document, with a short introduction letter to your Systems Integration Solutions, Inc. contact. The document can then be opened, printed, and distributed to clients.
- Laser-print your completed resume or have it professionally typeset.
- Give or mail an interviewer your resume printed on an off-white, tan, or light gray quality bond paper. Never give them a photocopy of your resume.
Sun releasing Java under the GNU
By Justin Silverton
In a suprising (yet not so surprising) announcement:
“Sun will release the first pieces of source code for Sun’s implementation of JSE (Java Platform Standard Edition) and a buildable implementation of JME (Java Platform Micro Edition).
Sun will also be making JEE (Java Platform Enterprise Edition) available under the GNU GPL v2 (General Public License version two).”
This sudden interest in open sourcing java has not always been the case.
“By open-sourcing Sun’s implementation of Java technology, we will inspire a new phase of developer collaboration and innovation using the NetBeans IDE [Integrated Development Environment] and expect the Java platform to be the foundation infrastructure for next generation Internet, desktop, mobile and enterprise applications,” said Rich Green, Sun’s executive VP of Software, in a statement.”
With the JDK [Java Development Kit] released as free software under the GPL, Sun will be working closely with distributors of the GNU/Linux operating system, who will soon be able to include the JDK as part of the open-source repositories that are commonly included with GNU/Linux distributions. Sun is releasing these technologies as open source in order to accelerate Java’s development and evolution. In addition, Sun said it hopes that it will reduce fragmentation and drive down development costs throughout the Java ME ecosystem. In addition, this move will provide easy access to the latest versions of Java ME platform technologies and, for the first time, enable the whole Java ME community to follow the activities of and participate in the development of these technologies.
This is a step in the right direction for Sun. With the power of the open source community, Java will now have more of a future as a development platform.
No commentsMicrosoft interested in other linux distros
By Justin Silverton
From a recent Microsoft announcement:
“We will love to put that kind of agreement in place with anyone who distributes Linux software, Red Hat, whoever else,” Steve Ballmer told India’s Economic Times in an interview published on Thursday.
Ballmer, on a visit to India, said while he believed software would be increasingly downloaded and managed off the Internet, it would still also be sold through a more traditional chain.
“I think some software will be bought, some will be subscribed to and some will be monetized through advertising,” Ballmer said in the interview in New Delhi.
“I would say we are moving to a world where there is a lot more electronic distribution. It is a new style of software, not the old-style distributed electronically.”
First, Microsoft was against linux and the open source community. Then, they decided to support the SUSE distro through Novell. Now They are supporting them all?
It’s very interesting that they have made all of these announcements within a couple of months from the release of Vista, the new Microsoft operating system (Retail Versions are set to be released on January 30. 2007).
One of the main strengths of any open source project is that as long as it is under a license such as the GNU, it can never be closed to the public. There will always be some form of the source code available to view, develop, and use. A strategy that corporations seem to be following is that if they can buy out (hire) the main developers (Microsoft has done this in the past), they can basically stop development of that project and remove their competitor from the market (even if it’s free)
A new strategy has also started to emerge in the past couple of weeks by Oracle (and now Microsoft). By directly competing with companies that are supporting/distributing products based on open source, those companies might lose business to the likes of a larger, more powerful company (Redhat’s stock dropped shortly after Oracle’s announcement).
No commentsWhy is Microsoft interested in linux?
By Justin Silverton
Earlier this month, Microsoft announced that they have taken an interest in the php language and would be working closely with the Zend corporation to make it more efficient and scalable on the windows platform.
Now, Microsoft has announced that they will also co-develop a version of linux with Novell (based on the SUSE distribution).
In a Recent Article from InfoWorld:
“Microsoft will offer sales support for Suse Linux and will co-develop with Novell in the areas of virtualization, Web services management, and document format compatibility between Microsoft Office and Open Office. The collaboration will make it easier for users to run both Suse Linux and Microsoft Windows on their computers.”
At first glance, this sounds like a great thing. Microsoft will now be supporting the open source community. This could bring: better driver support, interoperability with office formats (and other proprietary formats), and even more wide-spread usage at the enterprise level (large companies might see Microsoft as a more viable support option).
We also might see something I have been wanting for awhile now: A good desktop distribution. Linux works great in a server environment, but I have had many issues when attempting to use it as a desktop machine (driver support..or the lack of is one of the biggest problems).
The downside of this new interest is the fact that Microsoft is still a corporation. A corporation has only one thing in mind: making money. One of the main objectives here is to get back the marketshare that is slowly being lost to linux servers. Looking at their past history (Steve Ballmer once said that the GNU is a “viral license”) leads me to believe that they will try anything in their power to control the one thing they cannot buy.
13 comments




