Pencarian

Rss Posts

 

 

 

Berita pada bulan September, 2010

Call for Papers for the O’Reilly MySQL Conference

Sep 21, 2010

The call for papers for the O’Reilly MySQL Conference is now open, and closes October 25th.  Submit your proposal now at http://en.oreilly.com/mysql2011/user/proposal/propose/cfp/126!

JavaOne Monday Evening Keynote: Thomas Kurian on Java Strategy and Direction

Sep 21, 2010

So, what will the Monday night Oracle Open World / JavaOne / Oracle Develop keynote tell us? Intel and Thomas Kurian will provide the answer, which I’m watching on the Oracle Technology Network Live videostream.

So, I work in an Oracle/Sun data center. I guess you could say I’m biased, because we made that decision and it has turned out great for us. But, we are building a new data center, a next-generation data center. So, I’m really interested in what the future holds.

Intel is about to speak. I loved my tenure as community manager for ThreadingBuildingBlocks.org. Intel is superb! They understand the interactions between hardware and software. Bottlenecks are ultimately hardware related (the hardware executes as many instructions as it can in a given period of time); yet, ineffiecient software can leave too much hardware sitting around doing nothing; or, it can ask the hardware to repeat solutions to problems that have already been solved, but which weren’t saved.

Intel designs its hardware such that it will deliver ultimate performance for software developers who have some understanding of the implications that a line of code has on hardware.

Now the conversation turns to Java, the collaboration between Intel and Oracle with respect to Java, with an invitation to visit Intel Booth 509 at JavaOne. And the Intel presentation ends.

The focus now turns to Java, with Oracle’s Thomas Kurian speaking. Thomas highlighted Project Coin, with its improved type reference inference, try-with-resource blocks; Project Lambda (closures); and Project Jigsaw (the modular Java platform).

The next focus is multi-core processors, large memories, fast networks. You know that I belive this is the future, and must be addressed. Also, support for additional languages (Scala, for example) will be added. This is the .NET model (and I won’t argue who invented it first, Sun or Microsoft – though, to me, .NET was a response to Java)…

There will be new OpenJDK releases in 2011 and 2012.

The next discussion is on the client side. HTML5 is a key focus, along with native applications. JavaFX, JavaScript, Java 2D and 3D are considered key. JavaFX is highlighted as being a key element in the Java client arena going forward. Open Source is highlighted, along with support for large datasets, and flexibility with respect to images and other data types.

Oracle’s view is that all future browsers will run HTML5. Which means that Java and Javascript and modern graphic engines will be deployable to provide new Web experiences (as well as desktop experiences, I’d think).

I like what I’m hearing, so far!

Next is a demo of what Java is able to accomplish today on the client side. A JavaFX cup, followed by a game screen… an array of screens… fancy graphics/visualizations… quite fancy. All done vector graphics, no images. I think you have to see it to comprehend it. A real lot is possible using vector graphics and Java.

Thomas talked about the mobile vision: Project Mobile.Next. This will involve updates to the Java language, the VM, libraries, packages, and APIs. The goal is to enable Java support for new devices and new markets, including smartphones and many other mobile devices. Java Card and mobile payments were featured.

Bioware was the next focus, in a presentation of the “StarWars: The Old Republic” game, which runs on GlassFish. The video was spectacular, and it seems it’s all developed using Java.

In conclusion, Thomas said Oracle is committed to giving developers the world’s best programming platform on the desktop side, on the mobile side, and on the server side. And he announced the upcoming non-US JavaOnes. Then Olympic Champion Apollo Ohno came out, and said he was excited to be at JavaOne. I really liked watching him at recent Olympics, and it’s a thrill to see him at JavaOne! He said often people tell him “You look a lot like Apollo Ohno” and he says “I hear that a lot!”

So, what will the Monday night Oracle Open World / JavaOne / Oracle Develop keynote tell us? Intel and Thomas Kurian will provide the answer, which I’m watching on the Oracle Technology Network Live videostream
“The future of Java is not about Oracle, it’s about you the developers, and what you make Java become” — or something like that was Thomas’s last statement.

I myself am pleased by Oracle’s vision for Java, as presented at JavaOne 2010 thus far. What do you think?


Java Today

Justin Kestelyn points us to the JavaOne photostream in Let The Photos Commence:

Yep, we’re onsite in our JavaOne home for the week, the Mason St. tent, and documentation of the goings-on around us has already begun… Stay tuned to this photostream for more virtual experiences!

On the JavaOne Conference Blog, Janice Heiss posted Rock Stars Tony Printezis and Raghavan Srinivas Chime in on the Future of Java:

I caught up with two JavaOne Rock Stars, Tony Printezis of Oracle and Raghavan Srinivas, a Java evangelist known for keeping his finger to the wind, to get their take on Java and JavaOne. I asked Printezis, a leading expert on Garbage Collection and Java about this year’s JavaOne…

R. Tyler Ballance of Hudson Labs, who’s blogging at JavaOne, reported on the Pre-JavaOne Hudson Meetup Redux:

Yesterday Digg was kind enough to host and “sponsor” (read: free drinks and pizza!) a Hudson meetup at their offices in San Francisco. While Digg has been the source of some controversy and press due to their recent redesign and corporate shake-ups, as far as the Hudson community goes they’ve been largely responsible for a great case study on continuous deployment using Hudson and Gerrit

Dustin Marx is posting JavaOne 2010: JDK 7 and Java SE 7 as he attends the JavaOne 2010: JDK 7 and Java SE 7 session at JavaOne:

For my first real JavaOne 2010 session, I am attending JavaOne 2010: JDK 7 and Java SE 7 in the large Hilton San Francisco Grand Ballroom A/B.  I normally write a blog post in its entirety before submitting it, but in this case I am going to continually submit this same post with updates as the presentation continues.  In other words, I will be updating this same post throughout the presentation…


Poll

Our current java.net poll asks What’s your view of Java on the desktop? Voting will be end soon.


Subscriptions and Archives: You can subscribe to this blog using the java.net Editor’s Blog Feed. You can also subscribe to the Java Today RSS feed and the java.net blogs feed. You can find historical archives of what has appeared the front page of java.net in the java.net home page archive.

Kevin Farnham

Twitter: @kevin_farnham

JavaOne 2010 is right here!

Sep 18, 2010

Content available at: http://blogs.sun.com/arungupta/entry/javaone_2010_is_right_here

Should You Close Your PHP Code Tags? – SitePoint ? PHP

Sep 17, 2010

Even those with a modest grasp of PHP know that code must be enclosed within special <?php and ?> tags.

note: Alternative PHP tags

You may also be aware that PHP code can be delimited with the lesser-used <script language=”php”> and </script> tags.

If short_open_tag is enabled within php.ini, you can use <? and ?> although they should be avoided if you?re embedding code within Xhtml or XML.

Finally, you can use the ASP-style <% and %> tags if asp_tags is set within php.ini.

However, if your file contains just PHP ? and no escaped html code ? the closing ?> tag is entirely optional. Many developers argue that unnecessary code should be removed but there?s another reason you could consider scrapping the closing tag.

Assume we have a PHP function library named library.php:


<?php
// library functions

function DoStuff() {
	// code
}
?>

The library?s included inside our main entry file, index.php:


<?php
include('library.php');

// write a header
header('X-Demo: Example');

// set cookie
setcookie('TestCookie', 'Example');
?>

<p>End of index.php file.</p>

Unfortunately, 2 warnings with the same message appear when this page is loaded:

Warning: Cannot modify header information - headers already sent

Or worse, if you could be running in a live environment where warnings have been disabled and no message appears. In either case, neither the header or the cookie is set and that could cause critical application problems.

What?s causing the error? You can?t see it, but there?s a space character following the closing ?> in the library.php file. When it?s included at the top of index.php, that space is sent as page content to the browser ? along with all the necessary HTTP headers. Once the first block of content has been sent, it?s not possible to set additional headers or cookies.

note: PHP output buffering

Modern versions of PHP set the output_buffering flag in php.ini. This buffers your html output and sends it when your PHP code has been processed or once the buffer reaches a limit (e.g. 4,096 bytes). You can also use PHP?s ob_start() and ob_end_flush() to implement your own buffering functionality.

If output buffering is enabled, you can set HTTP headers and cookies after outputting html because returned code is not sent to the browser immediately.

Note that older versions of PHP and some ISPs do not enable output buffering ? it hits server performance and requires more memory. Even if you?re certain buffering is always enabled, it?s good practice to set HTTP headers and cookies before sending page content.

Your PHP application could include dozens of library or class files. As you can imagine, it can be difficult to hunt down additional spaces, carriage returns, or any other characters following a closing ?>.

Fortunately, there?s an easy fix. If you omit the closing ?> in all your PHP-only code files, the error simply can?t occur ? the parser will ignore whitespace.

It?s a solution, but would you use it? It makes me feel a little dirty?

Do you already omit the closing ?> tag? Would you adopt the practice? Or does it just feel wrong?






Practical PHPUnit: Testing XML generation – Qafoo – PHP

Sep 17, 2010

Testing classes which generate XML can be a cumbersome work. At least, if you don’t know the right tricks to make your life easier. In this article, I will throw some light upon different approaches and show you, how XML generation can be tested quite easily using XPath.

Eclipse Labs – Most Active Project: Eclipse Labs Projects Update for the week of September 17th 2010

Sep 17, 2010


Most Active Projects

code-recommenders – IDE 2.0: Bringing Collective Intelligence into Software Development
anyedittools – AnyEdit plugin adds several new tools to the context menu of text based Eclipse editors, to Eclipse main menu and editor toolbar
birt-functions-lib – A collection of BIRT Aggregate and Script Function Extensions for use in your project
birt-controls-lib – A collection of BIRT ReportItems created through the ReportItem extension point.
wascana – Wascana Eclipse C/C++ IDE for Windows Developers
ostool – Central metadata repository for unstructured data supports records and knowledge management for small and medium-sized organisations.
onotoa – Onotoa is a visual editor for the Topic Maps Constraint Language.

New Projects

java-toto – sweepstake application
multiproperties – MultiProperties is an Eclipse editor for multiple Java properties files editing simultaneously
splendor023 – splendor023
mc920-reconhecimento-facial – Realce da face
smartedu1 – Education management
smartedu – Education management
hypeerweb – BYU CS 340 Project

Learnings from the Philippines

Sep 17, 2010

Learned a few things during my trip to the Philippines this time. Another country that amazes me. For the first time in history, Philippines attracted more foreign direct investments (FDI) than Malaysia, in 2010 (see: Malaysia’s FDI plunge).
Mobiles
There are a lot of people here using prepaid phones as opposed to postpaid phones. This is because the requirements of getting a postpaid account is quite tough (you need bank documents, etc. before they give you an account).
Many people carry more than one phone (or have more than one SIM). Smartphones face an uphill battle – they cost too much and there is generally no operator subsidy because everyone prefers prepaid accounts. It makes economic sense to have more than one SIM, as you’ll end up saving money (operators like to offer free text, calls, etc. from time to time).
It’s interesting to note that SMS is very common in the Philippines. At the conference, you ask questions the traditional way – going up to the microphone. Here in Manila, you can also send a SMS message and it will be asked on your behalf. Very handy use of technology, especially in Asia, when people are occasionally scared to ask questions in-front of a large audience.
Data plans are not very common here. The cost of mobile data only recently took a price cut here, it would seem. USB dongles with data can be had for about PHP1,200-1,500 per month, with no implemented data cap (they’ll tell you its 3GB, but apparently nothing happens if the limit is hit). That’s quite impressive, since you might also just plug it into a MiFi and get data for cheap, on the go.
Social Networking
Facebook is the social network of choice. Multiply is losing ground. Friendster is the network of the past. This is true with the universities, and it is also true on popular TV shows (I caught a VJ talking about the shows Multiply and Facebook presence). Twitter seems to be pretty large here.
?Foursquare and other location based services (LBS) do not seem to be very popular at all. In the Makati area, you’ll find people checking in, and there has been some use of Facebook Places even. You’re usually about 4-9 check-in’s away from becoming the mayor from what I’ve seen. Students have next to no use of these LBS services; I have a feeling that it should largely be attributed to data plans being uncommon.
Gaming, payments, OFW’s
?People love to play Farmville and other Zynga games online. Credit cards are not common here. You can buy prepaid cards to buy credits for online games. Virtual goods is a large market here. Social gaming – I see this more and more now. Online shopping/e-commerce is not too widespread.
Gaming (gambling) is common. There is legalised e-gaming (presumably with taxes going to the government), but there is also a growing number of illegal gaming making lots of money. Apparently this industry is quite large. Here gambling also has another problem – the Catholic church is not necessarily very happy with it.
Today, remittance can happen via mobile phones from overseas. From what I understand, if you are an Overseas Filipino Worker (OFW) you can remit money from Singapore to the Philippines using your mobile phone. Telcos are going past banks, becoming clearing houses. It turns out that last year, through official means, OFW’s contributed about 20 billion dollars to the Philippine economy. That is something in excess of 15% of the GDP of the nation. About 11% of all Filipinos are overseas as an OFW. Population currently stands at 80 million.
In conclusion
There are lots and lots of smart people here. UP has about 80,000 students. Over 19,772 people attended Y4iT. The crew did a fabulous job in terms of organising and getting people together.
The people are all very friendly. They all speak English. I know many people outsourcing work to the Philippines through services like oDesk.
Generally, good stuff is happening here. Manila is the only place I’ve been to, but I know there are DevCon’s happening elsewhere and there are other IT hubs in Cebu, for example.

Related posts:MySQL at the Sun Tech Days, Philippines
Opportunities to talk MariaDB/MySQL in Manila, Philippines
MySQL Rocks: Wen Huang, in Makati City, Philippines

Rails on PostgreSQL: Rails 3, bundler, and the pg gem

Sep 17, 2010

I was moving a Rails 2 app up to Rails 3 and, because I have PostgreSQL installed in a non-standard location on my server, I ran into problems when bundler was trying to install the pg gem. After fiddling about for a bit I ended up with this in my config/deploy.rb:

require 'bundler/capistrano'

task :set_config_for_pg_gem, :roles => [:app, :db] do
  run "cd #{current_path} && bundle config build.pg --with-pg-config=/usr/local/pgsql/bin/pg_config --no-rdoc --no-ri"
end

before "bundle:install", :set_config_for_pg_gem

This sets up the appropriate command line flags for the pg gem so that they’re in place when Capistrano runs the bundle:install task. The --no-rdoc --no-ri part isn’t necessary, but I figured it’ll save a second or two. Note that these flags end up in the deploy user’s home directory on the server:

$ cat ~/.bundle/config
---
BUNDLE_BUILD__PG: --with-pg-config=/usr/local/pgsql/bin/pg_config --no-rdoc --no-ri

Running this task every time you deploy is a little wasteful since it sets the configuration unnecessarily – really you just need it before the first time you deploy. So you could optimize things by touching a file in shared/system/ or some such and checking it as part of this task.

OpenSQLCamp is exactly a month away!

Sep 17, 2010

Exactly one month from today, OpenSQLCamp Boston 2010 will begin its technical content (we will have a social event on Friday evening, Oct. 15th, starting no earlier than 6 pm). Have you registered yet? It’s 100% free! Make sure to get your flight before next week or the costs will go up, as it is generally more expensive to book a flight within 21 days of your trip. Also do not forget to book your hotel, we have a good rate of $149 per night for single or double occupancy….click here for details.
read more

Scala. Bridging The .NET and Java EE Worlds.

Sep 12, 2010

Scala is an object oriented and a functional programming language. If you already know Java or C# you will find Scala an easy to learn and a powerful one. Most of the new features that were added in C# (comparing with Java) exist as well, and apart of enjoying the power of OOP you will also get to enjoy the power of Functional Programming.

There are many advantages for using Scala. However, the one I find as the most interesting one from a business perspective is the ability to compile code written in Scala either into intermediate language code or into java byte code. Companies, that maintain two versions for their products, one for the .NET platform and one for the Java EE platform, can use Scala for maintaining the core modules of their products in one version. The Scala version. Given the scalability related unique adavantages of Scala (comparing with Java and .NET), doing so can also assist with implementing the required changes set by the dynamic business environment in which we operate.