Lots of other functions have been deprecated, including split(), ereg(), etc. See PHP 5.3 Manual, Deprecated Features.
Upgrading Zend Server from PHP 5.2 to PHP 5.3
Backup your php.ini file. Then run the following commands:
yum remove php-*
yum remove mod-php-*
yum install zend-server-php-5.3
After this, you will need to restore back the settings of your php.ini file.
Hiding Deprecated Warnings
Set your error_reporting to
error_reporting(E_ALL & ~E_DEPRECATED);
Tue, 31 Aug 2010 11:23:40 -0400
The fine art of application virtualization
The new 8-core Intel Xeon 7550 processors are extremely powerful and a good platform for virtualised applications. My company is setting up PHP application running on a Xen based virtualisation on two HP Proliant DL580 for a total of 64 cores in a high availability environment. .
Why Virtualise?
First let's investigate why virtualisation is attractive. The advantages are:
- Simplified maintenance, as all software is running on virtual machines (VMs). Easy to stop and start VMs from the VM server console.
- High availability is easier to achieve, as you can just restart the VM on a secondary server if the primary server fails, assuming that the VM is stored in shared storage accessible by all servers, using shared storage methods such as NFS, iSCSI or a SAN (Storage Area Network).
- Able to optimize server hardware utilisation globally as CPUs, memory, hard disk, network resources are all shared.
The disadvantages are strangely enough related to the advantages:
- The maintenance is simplified, but the initial setup is more complex as not merely do you need to setup the hardware and the operating systems, but you have to plan out the virtual environment, such as the virtual network, and make sure that everything is properly sized as you are buying a few big machines, instead of lots of smaller servers.
- High availability means you need to invest in high quality shared storage to store the shared VMs, typically a SAN, the SAN switches and the Fibre Channel HBA cards to connect to the SAN switches.
- Need to over-configure the hardware as there is some overhead in virtualisation, particularly in terms of network I/O and storage I/O. CPU overhead for virtualisation is normally not a concern with modern virtualisation technologies such as VMWare, Xen, or Hyper-V.
In this case, our customer was comfortable with virtualisation, as they are big users of IBM AIX Logical Partitions and VMWare. Secondly, they already operate several large Storage Area Networks, and merely had to upgrade the SAN to support us. Lastly they had the budget to pay for all of this :)
VM Technology
We are using Zend Server CE (PHP 5.2), Apache 2.2 and Oracle 11gR2 running on Red Hat Linux 5.5 and Oracle VM 2.2 (which uses the Xen Hypervisor).
In the VM world, there are 4 main technologies that are popular:
- VMWare - the market leader, this company has been doing virtualisation for over 10 years and they have good products.
- Xen Based products - Xen is an open source technology that arose from some research on Hypervisors (the bare metal OS that controls all the virtual machines) done in Cambridge University. Today, several companies offer products using Xen, including Red Hat, Citrix, and Oracle. Has good support for Linux and Windows.
- KVM - many kernel hackers were dissatisfied with Xen (because the Xen Hypervisor is not Linux-based internally), resulting in the development of KVM, which is fully Linux based. KVM is not as mature as Xen, but improving really fast. Support Linux and Windows.
- Hyper-V - Microsoft's virtualisation technology. Microsoft is committed to supporting Linux also.
We chose Oracle VM (Xen) because it has good performance with Linux and Oracle databases (naturally). Oracle VM is free with optional paid support available. There are also licensing advantages to using Oracle VM with Oracle databases. Oracle database licensing dictates that if you are using virtualisation technologies such as VMWare and are purchasing CPU licenses, you still have to pay database licenses for all the CPU cores of the server, even if the database VM is using only 1 core. However if you are using Oracle VM, then you only have to pay for the CPU cores you use using; this is known as "hard-partition" licensing in Oracle terminology.
I also have experience with VMWare, and can recommend it as an mature alternative. Apparently the Citrix Xen Server is a good product, but I don't have experience with it.
I will cover more technical details in part 2, which i will be writing in September after I complete this installation.
Fri, 06 Nov 2009 02:52:50 -0500
Updated Optimizing PHP Article
I have just updated my popular Optimizing PHP article with additional information on caching. I discuss memcache and squid. I also updated the PHP Accelerators and changed the tone of some parts of the article. I quote:
Perhaps the most significant change to PHP performance I have experienced since I first wrote this article is my use of Squid, a web accelerator that is able to take over the management of all static http files from Apache. You may be surprised to find that the overhead of using Apache to serve both dynamic PHP and static images, javascript, css, html is extremely high. From my experience, 40-50% of our Apache CPU utilisation is in handling these static files (the remaining CPU usage is taken up by PHP running in Apache).
It is better to offload downloading of these static files by using Squid in httpd-accelerator mode. In this scenario, you use Squid as the front web server on port 80, and set all .php requests to be dispatched to Apache on port 81 which i have running on the same server. The static files are served by Squid.

Sun, 25 Oct 2009 09:12:02 -0400
Malaysian FOSS Conference 2009 Opening Keynote
Last Saturday, I gave the opening keynote of the Malaysian Free & Open Source Software 2009 conference. The speech was prepared the day before, but as usual, I will improvise some stuff, so some parts have been amended based on memory:
Ladies and gentlemen, honored guests, good morning!
Today the landscape of information technology has been transformed by the vision of free software and open source. The search engines of Google roar with the sounds of open source Linux. Our Malaysian government encourages the use of open source whenever possible. Sounds of PHP, MySQL, Apache, GPL have become familiar names in the tapestry of IT.
But that was not what it was like when I first started out as a young student in the mid-80s at the University of Melbourne, Australia. Things were different then. Concepts such as open source, GPL were still unknown. I still remember a fellow student was expelled from university for making copies of the source code of proprietary Unix software for his personal use.
I admit I was disturbed by this, because I too had an insatiable curiosity about how software worked, and it was impossible to learn more without access to the source code. I wanted to find and understand the wiring inside the software.
I remember fondly, and today with a bit of guilt, that I used to crack copy protected games, not for the pursuit of profit, but as an intellectual challenge – well ok, I have to admit I did it to play the games. The trick doing this (cracking) metaphorically is finding the wiring behind the copy protection and reversing the wires so that instead of refusing to run, it does the opposite and continues working.
Of course to quickly find the right wires to switch and crack a large program is not easy. Which brings me to the first piece of advice if you want to be successful in software design… You need to have good taste, which is kind of weird because nerdy programmers are notoriously bad dressers, fond of bad hair days and certainly not fussy about the finer points of fine dining.
What I’m taking about is of course is a taste for good logic. The feel of a beautiful idea, the taste of a mighty logic, or the fun in a great hack.
Games designers and coders are a talented bunch of people, and if you understand their logical rhythms and designs, it becomes obvious where the wires you need to reverse to crack the software reside.
The other important element of success is being happy. You have to have passion and enjoy what you are doing. To me cracking games was like cracking walnuts, a fun thing to do, but after a while it got boring. You need to do something with others and share with others to become really passionate about something.
Social responsibility is another important element of life. You need to channel your life productively - only then will you find true happiness. Cracking games became boring and I found other better diversions.
It was around this time my fellow student was expelled that I learned about the international USENET community. To young people, you have to imagine a time before the World Wide Web, when people used the Internet primarily for email. USENET was a fantastic group of mailing lists with forums and archives. USENET was also used to disseminate programming ideas and knowledge in the form of source code.
So even before the concepts of Open Source and licenses such as GPL became well known, there was this thriving community of programmers who shared their source code and learnt from others. Which brings me to the next lesson: the typical image of the best programmers being lonely introverted hackers is misleading. People are only successful in a community. Open source software needs to be grown organically and for that you need social skills. The classic example here is of course Linus Torvalds, author of Linux, who has skillfully led the Linux community from its inception.
It was through the USENET that I released software that I had written, including the one that won runner-up for best Australian Macintosh software in 1988 while still a foreign student in Melbourne.
You know, while preparing this speech, at the back of my mind I have always wondered why Malaysia has not had a bigger role in contributing software to the open source community? Was what I achieved due to my overseas education? I was thinking about it last night while writing this speech, and I don't think so: I will tell you why...
Malaysians do not lack ability. I see many smart and interesting people around me here at the conference. And I have seen many sophisticated pieces of software in the commercial world developed by talented teams of Malaysians. English, the language of Science and the Internet, is widely spoken here. However in the open source world, we have many more consumers than contributors.
Is it our education system? Perhaps an over-emphasis on exams it is a contributing factor, but I don’t think that is the main reason. I studied for 12 years in Malaysian state schools, and I survived sane and reasonably intelligent! And exposure to the Internet has made young people more worldly than any previous generation of Malaysians.
After reflecting, I suspect the reason is primarily economic. After college, it is difficult to sustain a living and have the time to contribute meaningfully to an open source project here in Malaysia. There are companies with strong support for open source here, but most companies here see little value in allowing their staff to contribute to open source.
So let’s flash forward from studying Melbourne in the 80’s to working in Malaysia in the year 2000. At that point in time, my company was planning on developing their next generation web application server, called PHPLens. An application server is a professional software framework which makes it easier for programmers to build high quality software modules.
We also wanted PHPLens to support as many databases as possible. That was the reason why we decided to open source our database abstraction library. Contributions from the programming community were encouraged so that we could support more databases.
And as this was the 3rd database abstraction library I had developed in my career, I had some meaningful experience in this area. Other developers liked it and today the library has become very popular world-wide and is in use by thousands of developers.
I have been working with and supporting the ADOdb abstraction library for over 9 years. I can tell you working on open source is sometimes not fun. You work for hours to implement some feature and then the feedback you get is that it’s not very useful. People will disagree with you. You also get cranky people emailing you in broken English to fix their problems urgently. And if you misunderstand them, it just gets worst. To survive, you need to be passionate about your work, really listen to people (which isn’t easy in an email exchange) and be committed to excellence.
I would like to show you now a presentation I did on ADOdb a few years ago. [presentation here]
In closing, I would like to ask how do I think the Malaysian Free & Open Source Software movement can advance further? Actually I think we are doing a good job. I see a lot of local companies have already switched to using Open Office or running Linux, Apache, MySQL, PHP for their web-sites.
As I mentioned before, the real factors we need to look into are still economic, your take-home pay. What we need is more demand for people with the right skills to support this open source infrastructure, and an ecosystem where the pay is attractive.
We need to transition from the idea that “free software is cheap†to “free software is cost-effectiveâ€. There is dignity in work, and people deserve to be rewarded. Thank you.
20 May 2012 21:00:54 GMT
crate-test 1.3.1
UNKNOWN
20 May 2012 21:00:37 GMT
mz_nester 1.2.0
a simple printer of nested lists
Tue, 15 May 2012 00:00:00 +0000
Intelligent Converters released PostgreSQL-to-MySQL and MySQL-to-PostgreSQL converters
When thinking about open-source relational databases, many people face dilemma how to choose between two the most popular systems: MySQL and PostgreSQL. Both of them are cross-platform, time proven solutions having a lot of users ranged from individuals and small business to huge corporations. In order to resolve this issue Intelligent Converters released solutions to migrate MySQL databases to PostgreSQL server and vice versa. Both products have high performance due to direct connection to data source and destination databases (they do not use ODBC or any other middleware software). Command line support allows to script, automate and schedule the conversion process. Intelligent Converters invites both end-users and media people to try PostgreSQL to MySQL and backward conversion using free demo version of the products:
[HTML_REMOVED]http://www.intelligent-converters.com/pgs2sql.htm[HTML_REMOVED][HTML_REMOVED]
[HTML_REMOVED]http://www.intelligent-converters.com/sql2pgs.htm[HTML_REMOVED][HTML_REMOVED]
Demo version allows to convert only five records for each database table, all other features are in place.
[HTML_REMOVED]Features[HTML_REMOVED][HTML_REMOVED]
[HTML_REMOVED]
[HTML_REMOVED]All versions of PostgreSQL are supported[HTML_REMOVED]
[HTML_REMOVED]All versions of Unix and Windows MySQL are supported[HTML_REMOVED]
[HTML_REMOVED]Fast conversion engine (about 10,000 records per second of average P-IV system)[HTML_REMOVED]
[HTML_REMOVED]Option to merge data into an existing database[HTML_REMOVED]
[HTML_REMOVED]Option to convert individual tables[HTML_REMOVED]
[HTML_REMOVED]Converts indexes with all necessary attributes[HTML_REMOVED]
[HTML_REMOVED]Command line support[HTML_REMOVED]
[HTML_REMOVED]Stores conversion settings into profile[HTML_REMOVED]
[HTML_REMOVED]Support for multibyte character sets[HTML_REMOVED]
[HTML_REMOVED]Easy-to-use wizard-style interface[HTML_REMOVED]
[HTML_REMOVED]Full install/uninstall support[HTML_REMOVED]
[HTML_REMOVED]Unlimited 24/7 support service[HTML_REMOVED]
[HTML_REMOVED]1-year subscription for updates[HTML_REMOVED]
[HTML_REMOVED]
More information about PostgreSQL-to-MYSQL and MySQL-to-PostgreSQL can be found here:
[HTML_REMOVED]
Mon, 14 May 2012 00:00:00 +0000
PostgreSQL 9.2 Beta 1 Available for Testing
The PostgreSQL Global Development Group announces the beta release of PostgreSQL 9.2, which will include major increases in performance and both vertical and horizontal scalability. The PostgreSQL Project asks all users to download and begin testing 9.2 Beta as soon as possible.
Major performance and scalability advances in this version include:
- Index-only scans, allowing users to avoid inefficient scans of base tables
- Enhanced read-only workload scaling to 64 cores and over 300,000 queries per second
- Improvements to data write speeds, including group commit
- Reductions in CPU power consumption
- Cascading replication, supporting geographically distributed standby databases
PostgreSQL 9.2 will also offer many new features for application developers, including:
- JSON data support, enabling hybrid document-relational databases
- Range types, supporting new types of calendar, time-series and analytic applications
- Multiple improvements to ALTER and other statements, easing runtime database updates
For a full listing of the features in version 9.2 Beta, please see the release notes.
We depend on our community to help test the next version in order to guarantee that it is high-performance and bug-free. Please download PostgreSQL 9.2 Beta and try it with your workloads and applications as soon as you can, and give feedback to the PostgreSQL developers. More information on how to test and report issues
Get PostgreSQL 9.2 beta, including binaries and installers for Windows, Linux and Mac from our download page.
Full documentation of the new version is available online, and also installs with PostgreSQL.
Thu, 10 May 2012 00:00:00 +0000
AnySQL Maestro 12.5 released
SQL Maestro Group announces the release of AnySQL Maestro 12.5, a powerful tool for managing any database engine accessible via ODBC driver or OLE DB provider (PostgreSQL, MySQL, SQL Server, Oracle, Access, etc).
The new version is immediately available at
http://www.sqlmaestro.com/products/anysql/maestro/.
AnySQL Maestro comes in both Freeware and Professional editions.
Top 10 new features:
- Report Designer.
- Support for auto increment columns for MS SQL Server and MS Access.
- SQL Editors: Unicode support, text change markers, and improved code folding appearance.
- Enhanced performance of the SQL Script Editor tool.
- Improved Script Runner.
- Inline images in the data grid.
- Displaying BLOB data as PDF.
- Creation of views from Visual Query Builder.
- Updated Data Input form.
- Spanish translation.
There are also some other useful things. Full press release is available at the SQL Maestro Group website.
Sun, 06 May 2012 00:00:00 +0000
PostgreSQL Magazine #01 is out !
The PGMag team is very pleased to announce the release of the first issue of PostgreSQL Magazine.
This issue #01 is brought to you thanks to the collective work of
dozen of people. Writers, Editors, Reviewers. Kudos to them all !
Here's a quick view of the ToC :
- PostgreSQL 9.1 : 10 awesome new features
- NoSQL : The Key Value store everyone ignored
- Interview : Stefan Kaltenbrunner
- Opinion : Funding PostgreSQL Features
- Waiting for 9.2 : Cascading Streaming Replication
- Tips & Tricks : PostgreSQL in Mac OS X Lion
The magazine is available online and on paper. You can either :
Finally, I would like to thank our benefactors… Fotolia.com has offered
us a free subscription plan to access their stock photo database. We
also received fundings from PostgreSQL Europe (PGEU) and Software in the
Public Interest (SPI). Thanks a lot to them !
Tue, 01 May 2012 00:00:00 +0000
Bull Announces the Formation of Database Migration Business Unit
Database consolidation, hardware upgrades, mergers and acquisitions, and the decision to virtualize server hardware all drive the decision to migrate data into new systems to stay competitive. Bull HN Information Systems (Bull) announces the formation of a Database Migration Business Unit ( www.postgresmigrations.com ) offering comprehensive solutions to migrate legacy and other relational databases to open source PostgreSQL, including consulting, implementation and optimization services for both infrastructure and applications. The business unit's formation leverages Bull's more than 40 years of experience with major, enterprise-level database migrations worldwide.
According to National Sales Director Jim Ulrey, "Bull has a long history in database technologies and their applications. We primarily work with PostgreSQL in order to deliver major savings in licensing and support fees to our customers, and have had great success with both proprietary relational database migrations and legacy non-relational database migrations. This includes large customers with both high-performance and availability demands.
"We understand that data is the lifeblood of today's business. Therefore, when it comes to mission critical projects like data migration, companies require an experienced partner like Bull--one that can offer proven solutions, solid methodology and a seamless transition. Our new business unit is dedicated to excellence and committed to helping our clients meet their business objectives," concluded Ulrey.
About Bull, Architect of an Open World
Bull is an Information Technology company, dedicated to helping corporations and public sector organizations optimize the architecture, operations and the financial return of their Information Systems and their mission-critical related businesses. For more information, please visit www.postgresmigrations.com .
SOURCE: Bull HN Information Systems
Integrated Communications Management
Patrick Riley, 603-893-6510
pjriley@icmarcom.com
Battle for Wesnoth 1.10.3 (updated)
Fantasy Turn-Based Strategy Game
More about Battle for Wesnoth
Oil rush 1.0.2 (updated)
RTS with a Tower Wars genre
More about Oil rush
Stick Knights Online 1.0.4 (updated)
Stick People Online Video Game
More about Stick Knights Online
Fri, 18 May 2012 00:00:00 EDT
NASA Chief Technologist To Attend Cleveland Manufacturing Event
NASA Chief Technologist Mason Peck will join agency and Ohio officials to name nine small and medium-sized Ohio manufacturers that will receive NASA assistance to solve technical problems with new or existing products.
Fri, 18 May 2012 00:00:00 EDT
NASA Invites Media To Annual Lunabotics Mining Competition
More than 50 teams of undergraduate and graduate students from eight countries will come to NASA's Kennedy Space Center in Florida May 21-26 to take part in the third annual Lunabotics Mining Competition.
Fri, 18 May 2012 19:08:10 -0500
Bapakku Tak Ada Di Rumah
Seorang pencuri mendatangi sebuah daerah hunian hendak melakukan aktivitasnya. Matanya tertuju kepada seorang bocah laki-laki yang sedang duduk di dalam pintu rumahnya, lehernya tergantung seuntai kunci. Ia coba melangkah ke depan dan bertanya: "Nak, Bapakmu apa ada di rumah?"
"Bapakku tak ada di rumah," jawab bocah laki-laki itu.
"Aku adalah tukang periksa meteran listrik. Bolehkah aku masuk sebentar?" kata pencuri itu lebih lanjut.
"Sudah tentu boleh, masuklah..."
Bocah itu membukakan pintu untuknya, tapi baru saja si pencuri melongokkan kepalanya ke dalam, ia pun segera mundur selangkah lalu lari terbirit-birit. Bocah cilik itu berteriak-teriak mengejarnya: "Bapakku benar-benar tak ada di rumah. Mereka adalah Pakcik dan Pakdeku." (KETAWA.COM)
Fri, 18 May 2012 06:16:36 -0500
Rebutan Makan Kentang Dengan Sapi
Melihat Ibunya membeli setumpuk kentang, anaknya bertanya,
"Bu, buat apa beli kentang sedemikian banyaknya?"
Ibunya menjawab, "Sudah tentu untuk dimakan, dong! Masa kamu sudah lupa, waktu kamu masih kecil pernah sekali rebutan kentang dengan sapi di rumah Nenek, kan?"
Anaknya sangat terkejut mendengar perkataan ibunya, maka itu dia berkata, "Aduh, Bu, kejadian itu sekali-kali jangan Ibu ceritakan kepada orang lain, malu ah!"
Ibunya malahan berkata dengan bangganya, "Takut apa? Waktu itu kamu toh keluar sebagai pemenang!" (KETAWA.COM)
Fri, 18 May 2012 01:07:23 -0500
Harapan, Kecewa dan Tidak Ada Harapan
Anak: "Bu, bagaimana memahami makna kata 'harapan' dengan tepat?"
Ibu: "Mirip-mirip wajah Bapakmu waktu membeli lotre begitu, lah."
Anak: "Lalu, memahami arti kata 'kecewa' bagaimana Bu?"
Ibu: "Seperti wajah Bapakmu saat 'tak menang lotre'"
Anak: "Lalu bagaimana menghayati makna kata 'tak ada harapan', Bu"?
Ibu: "Bagaikan wajah Bapakmu kalau tidak ibu beri uang dan tak punya uang untuk membeli lotre..." (KETAWA.COM)
Thu, 17 May 2012 07:06:55 -0500
Dilamar Mas Joko
Tuti curhat kepada ibunya, "Bu, Mas Joko itu sangat sayang sama aku. Minggu kemarin aku dibelikan HP baru dan mobil batu. Minggu ini dia membelianku rumah di perumahan yang elit. Kemarin mas Joko melamarku, dan aku harus menjawabnya ahri ini... Aku harus jawab apa ibu?"
Ibunya yang mendengarkan itu berkata, "Tuti, kamu harus lihat orangnya dulu, kamu kan baru kenal 3 bulan. Cara yang paling gampang itu adalah dengan melihat ayahnya, karena buah tidak akan jatuh jauh dari pohonnya. Kekasihmu itu 30 tahun lagi akan menjadi seperti ayahnya."
Tuti menjawab, "Ibu, saya tahu itu adalah petuah lama yang turun temurun diberikan Nenek kepada Ibu kan? Hanya saja mas Joko ini tidak akan sampai selama itu, umurnya saja sekarang sudah 65 tahun..." (KETAWA.COM)
Tue, 15 May 2012 19:06:22 -0500
Ditilang Polantas Karena Mengebut
Seorang pria pulang dari perjalanan memancing. Dia mengemudi terlalu cepat di jalan raya. Dia merasa aman karena semua mobil yang serombongan dengannya berjalan pada kecepatan yang sama. Namun, tidak lama kemudian ia melihat lampu sirene polisi berkedip di spion dan kemudian menepi.
Petugas menyerahkan surat tilang, menerima tanda tangannya, dan ketika polisi itu hendak pergi ketika orang itu menghentikannya. "Pak Polisi, saya tahu saya ngebut," ia memulai, "tapi aku tidak berpikir itu adil. Ada banyak mobil lain di sekitar saya sama cepatnya, jadi mengapa saya saja yang mendapatkan tilang?"
Petugas itu mengangkat kepalanya dan menunjuk ke alat pancing di kursi penumpang. "Saya melihat Anda hobi memancing," katanya.
"Ummm, ya saya lakukan... jadi?" pria itu menjawab sambil kebingungan.
Petugas itu tersenyum sambil berpaling pergi, "Pernah menangkap SEMUA ikan?" (KETAWA.COM)
Fri, 03 Feb 2012 00:31 GMT
RealNetworks RealPlayer RV10 Sample Height Parsing Code Execution Vulnerability
This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of RealNetworks Real Player.This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of RealNetworks Real Player.
-
Make your website safer. Use external penetration testing service. First report ready in one hour!
Fri, 03 Feb 2012 00:31 GMT
RealNetworks RealPlayer IVR MLTI Chunk Length Parsing Code Execution Vulnerability
This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of RealNetworks Real Player.This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of RealNetworks Real Player.
-
Make your website safer. Use external penetration testing service. First report ready in one hour!
Fri, 03 Feb 2012 00:31 GMT
RealNetworks RealPlayer RV30 Uninitialized Index Value Code Execution Vulnerability
This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of RealNetworks Real Player.This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of RealNetworks Real Player.
-
Make your website safer. Use external penetration testing service. First report ready in one hour!
Sat, 19 May 2012 15:55:17 GMT
Xamarin: Catch Xamarin at DevTeach & get 20% off DevTeach registration!
DevTeach is offering a 20% discount ($100 off) admission to its MobileTeach conference for Xamarin customers and anyone interested in learning more about mobile development with Xamarin! DevTeach MobileTeach is a developer conference with a focus on mobile development and the mobile industry. The 2012 conference runs from May 28th to June 1st in Vancouver. [...]
Wed, 16 May 2012 14:46:51 GMT
Sebastien Pouliot: Touch.Unit vs NUnitLite 0.7
Last week Charlie Poole released NUnitLite 0.7. This new release greatly reduce the feature gap between the older 0.6 release and the upcoming NUnit 3. I know people will rejoice having Assert.AreEqual(x,y) back as it is simpler than the Assert.That … Continue reading →
Tue, 15 May 2012 18:55:17 GMT
Xamarin: Calling all social coders: Xamarin is hiring Developer Evangelists
As we continue to rapidly grow at Xamarin, we’ve reached a point where we are looking to spread the word about MonoTouch and Mono for Android to even more developers around the world. To do this we’re creating a new team of social coders to represent us to the community as Developer Evangelists. What is [...]
2012-05-20T05:04:47+00:00
Raja Kannappan: Hamcrest Matchers in JUnit tests
Normal assertions in JUnit would look like this:
Assert.assertEquals(expectedValue, actualValue); for example Assert.assertEquals(3, bean.getValue());
With hamcrest matchers, we can make the tests much more expressive and with recent versions of JUnit, core hamcrest matchers are bundled with JUnit and so there is no need to download and add hamcrest to our classpath explicitly.
JUnit has this new static method in org.junit.Assert called assertThat which has signature like this:
assertThat(actual, Matcher);
Using this, we can make the tests very expressive. First add some of the static imports:
import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.core.IsNull.nullValue;
import static org.junit.Assert.assertThat;
Then, assertions can look like this:
assertThat(bean.getValue(), is(equalTo(3)));
assertThat(bean.toString(), is("XYZ"));
assertThat(bean.getNewValue(), is(nullValue());
assertThat(bean.getType(), is(not(nullValue()));
This shows how readable these tests are when compared to the regular assertions. Also, we can see that matchers can be nested. In the above block, is and not, is and equalTo, is and nullValue() are chained to make it more readable.
There are more matchers available in org.hamcrest.core package inside junit jar. In Eclipse, you can open up the junit jar under referenced libraries and navigate to this particular folder in package explorer to see other available matchers.
Only drawback that I found is, I cannot use assertThat for comparing double values with tolerance. Other than that, I tend to assertThat for most of my assertions. It certainly makes my tests much more readable and expressive!


2012-05-19T06:55:25+00:00
Chris Daniel: Eclipse in Fedora - 0 day update
Eclipse bundled by Fedora will contain additional fixes that are not yet a part of Juno release:
1. Predefined update sites
You may say that's all Eclipses have that, but it is not quite true. You have not just used Eclipse with a shared configuration. However, in Linux, this is a default installation, so many many people reported this problem, and for some Linux distributions it was a blocker that prevented them from including Eclipse. But things are getting better - Fedora, and eclipse-build, now include a fix for that issue.
2. Discover renamed jars in dropins.
Again, this issue does not happen often in regular Eclipse installations. But if for some reason you need to rename a jar in dropins, P2 will refuse to load it. In Fedora, each jar should be packaged only once (f.e. junit), so each discovered duplicated library is replaced with a symlink. Sometimes Eclipse refused to resolve dropins, now we know why :-).
3. Reconciler debugging options are now in a default installation.
As of previously, when anyone reported the problem with Eclipse not being loaded fully, we had to guide him through creating the .options file, putting it in right directory and gathering logs. Now it is easier. To get a hint what is going on with reconciler it is enough to invoke following commands:
$ cd /usr/lib64/eclipse
$ ./eclipse -debug -clean > reconciler.log
4. Eclipse cannot be run as root.
This is the most controversial change, but when you try to launch Eclipse as root, you will get:
# eclipse
CompilerOracle: exclude org/eclipse/core/internal/dtree/DataTreeNode.forwardDeltaWith
CompilerOracle: exclude org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.
CompilerOracle: exclude org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.instantiateTemplate
CompilerOracle: exclude org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.addBinding
CompilerOracle: exclude org/python/pydev/editor/codecompletion/revisited/PythonPathHelper.isValidSourceFile
CompilerOracle: exclude org/python/pydev/ui/filetypes/FileTypesPreferencesPage.getDottedValidSourceFiles
This application should not be run by the owner of the shared configuration.
and exit code will be 14.
The reason behind that is pretty simple - when you invoke the Eclipse as root, everything what you have in dropins will be written into the master configurations. And later, when you change your installation layout using RPM, things will go ugly, because the master configuration will not reflect what is really installed.
If you really, really need to launch Eclipse as root in Fedora, and you know what consequences are to expect, please remove -preventMasterEclipseLaunch from your /usr/lib64/eclipse.ini.
Note 1. All paths used in this blog post are for 64 bit systems. If you happen to run 32 bit Fedora, please replace every lib64 with lib, so the base Eclipse installation folder will be /usr/lib/eclipse.
Note 2. Fedora 17 (a.k.a. Beefy Miracle) is out pretty soon. You can grab beta here.
2012-05-19T02:43:47+00:00
Dave Orme: blog:orion_works_on_asus_transformer_tablet - created
I've been looking for a handy way to edit code on the go and wondered a while ago if Orion plus my Asus Transformer Prime tablet would fit the bill or not.
I originally tried it several months ago using both the built-in Android browser and the Chrome beta for Android. At the time, neither worked in any usable form at all.
However, today I tried again, and I'm happy to report that using the latest Chrome Beta on the tablet, it works fine–with good performance to boot.
Congrats to the Orion team!
Now for what I really want:
An Orion-based hosted service
With Play Framework installed/integrated
And Scala/Java Development Tools integrated
Not this year, probably, but… ;)
powered by zFeeder