Dhananjay Nene made a very good comparsion of all major languages (C++ / Java / Python / Ruby/ Jython / JRuby / Groovy) including source code. This is a much better and more detailed view on a specific computing problem. My quick performance comparison was discussed very heavily since it doesn’t count the language specific criteria very well.
20.07.2008
iPhone 3G - Will it bounce?
I was one of the last lucky people in Rostock in northern Germany to get an iPhone 3G 16 GB black. I also was one of the first iPhone 2G phones in Berlin. But my luck was used up this Friday after only 8 days with my new gadget. While leaning forward to help my 5 year old out of his pants in a public toilet it slipped out of my jacket and crashed onto the tiled floor. The screen cracked:
Although the glass is broken the device works perfectly. Even the touch works with the cracks. Yesterday I went to a T-Mobile shop and the iPhone is now on its long way to the T-Mobile central repair station. I guess that will be very expensive. Apple states 299,- € for a 16 GB iPhone 3G.
Fortunately my wife was so kind to lend me old iPhone while I am waiting for the return of my latest toy.
Already ordered a leather case at Amazon and T-Mobile also offers a insurance for broken devices. I will definitely need one.
18.03.2008
Using (Native)Windows with AIR
If you want to use windows in AIR with custom chrome (especially transparent) you have to consider some drawbacks. First you cannot use NativeWindow if you want to use Flex components from the mx.* namespace. There is a separate Window class in the AIR package which encapsulates a NativeWindow. To get your own content inside this window you can create a separate MXML file like this:
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Window xmlns:mx=”http://www.adobe.com/2006/mxml”
width=”200″ height=”100″
transparent=”true” systemChrome=”none” type=”normal”
showStatusBar=”false” showTitleBar=”false” showFlexChrome=”false”>
<PlaceYourContentHere/>
</mx:Window>
This will display a transparent window without any controls and header on the screen.
Whenever you want to create and display the window use:
var myWindow:MyWindow = new MyWindow
myWindow.open()
If you want to change the position of the window you have to use its nativeWindow property:
// Center window
myWindow.nativeWindow.x = (Capabilities.screenResolutionX - myWindow.width) / 2
myWindow.nativeWindow.y = (Capabilities.screenResolutionY - myWindow.height) / 2
I used to use the NativeWindow class for transparent windows since AIR beta 1. To get Flex-Containers in it I initialized them in the main application window, removed them there and added them to stage of the NativeWindow. This worked fine until I used controls like ComboBox or ColorPicker which relied on the PopupManager. The popup window didn’t occur until I found that it was opened in the main application window at the position of the initial component.
19.02.2008
My new tlog (tumblelog)
In the excellent (German language) podcast Chaos Radio Express episode CRE072 they featured a tumblelog application named soup. I couldn’t resist, jumped on the train and this kind of (b)logging fits much better to my needs. The application is lean and (of course) written in Ruby on Rails.
I try to use it instead of Google bookmarks to remind myself (and others) of remindable things I discover during my surf sessions.
My new tlog address is: http://pegolon.soup.io
18.02.2008
My favorite monospaced font for coding of the month
I am constantly overthinking my editor font for coding. Using Java and Eclipse I was able to use a anti-proportional font because of the automatic code formatting. Unfortunately in Flexbuilder there is no such thing as automatic code formatting. Much worse the editor ignores sometimes, that I don’t want to use tabs at all and mixes tabs and spaces. So I had to switch back to a monospaced font and found this one in the web: http://www.ghostscript.com/~raph/type/myfonts/inconsolata.html Its under the Open Font License which feels rather unrestricted.
24.01.2008
Quick Ruby vs. Groovy performance comparison
I was just wondering how Ruby and Groovy are comparing in performance with each other so I wrote a quick line in both languages and ran it in irb / GroovyConsole.
Ruby:
start=Time.new;y=0;(1..2000000).each { |x| y=x };Time.new - start
Groovy:
def test=System.currentTimeMillis();(1..2000000).each { x -> y=x };System.currentTimeMillis() - test
The Ruby code is being interpreted, the Groovy one is being compiled into Java Bytecode and then executed.
Ruby: 456 - 529 ms
Groovy: 1812 - 1885 ms
If you change the line inside the closure to “y+=1″ you get these results:
Ruby: 674 - 785 ms
Groovy: 4210 - 4465 ms
In Ruby there is no “++” operator, but in Groovy it seems to be faster than “+=1″:
Groovy: 3298 - 3338 ms
Conclusion: it is not very surprising, that a language which is being developed over almost 15 years (Ruby) is better optimised than one which is just 5 years old. I guess if we wait a couple of years Groovy will become a serious competitor to Ruby, but note however that Ruby gets a JIT in version 1.9 so the advance will become much greater.
23.01.2008
Strange Flex/AIR error
If you get this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
There is likely a Loader.load() call which cannot find the file. You should add an event listener like this
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError)
17.10.2007
Adobe Max Barcelona: Round-up Day 3
The last day of the conference.
XD Initial Visions for the AIR experience
One of the best sessions I attended. Using the Adobe Media Player the presenter described the design decissions they made. Gave me some cool insights especially for the paradigm “Moving has Meaning”
Best Practices for Developing with ActionScript 3.0
The agenda was quiet impressive but the session at all was a complete dissappointment. Nearly a third was about ActionScript the rest was about how to develop programs. I don’t need to know that. The better named that session “Best Practices for Programming Newbies”
Functional & Performance Testing flex Applications: Borland’s Approach
I didn’t know that Borland bought an Austrian company that writes testing software. SilkTest it is called and now supports also Flex but the GUI is so ugly (Windows 95 style, Windows only) I had to suppress a reflex to vomit. I would never ever use such an ugly software. They are planning to release it next year as an Eclipse plugin. Very boring and confusing presentation.
HTML and Script Bridging for Flex Applications in AIR
That guy (Kevin Hoyt) was incredible. He had no powerpoint slides and did all the hacking live without using any prepared code statements. Very cool and thorough look into the possibilities of the Bridging API.
Introduction to LiveCycle Data Services for Flex Developers
A German trying to make a presentation in English with some really strange pronounciations (”thee” instead of “the”, “methord” instead of “method”…). He really messed up the whole presentation and could not impress the audience with the cool features of LCDS at all. Nonetheless I found the framework very cool.
Some useful insights into the inner works of the Flash Player. I enjoyed it very much.
16.10.2007
Adobe Max Barcelona: Round-up Day 2
The second day started with a keynote. They showed some really cool services:
Scene7 - server-side image scaling and management service, really nice shopping experiences are possible with that
Pacifica - a VoIP service for FlashPlayer
Share - a data sharing service, which renders the uploaded files in a Flex application
CoCoMo - a collaboration service which can be used with Flex
The rest of the day I attended the following sessions:
Nothing really new here. Just one sentence made me listen attentively. There seem to be already plans to port AIR also to mobile devices and other platforms…
Customizing the Flex Framework
Some interesting things. I hope the slides will appear soon on the max site so I can read them a second time. The topics validators and formatters will need more work in my current applications. I wasn’t aware, they existed.
Rich Internet Applications and Mobility
Held by an Intel guy who was a little bit disappointed that Adobe was not listening to him. He wanted to have battery and wifi status methods in AIR. Since Adobe was not listening he showed some browser plugins that provided these functions through JavaScript. I didn’t really get the point here…
Optimizing ActionScript 3.0 Performance
The content was very good but the presenter, a Swiss guy with very bad English pronounciation was overstrained. He could not speak fluently and sometimes mixed his speech French words and letters. Listening was a pain.
The third (!) time I got an introduction into AIR, how cool it was and especially how the File API worked. But there were also some new things especially about native windows in AIR, which change a little bit with the last beta.
Sneak Peek Session
Some nice and cool new features which might make it in real products where shown. The most impressive one: they hired a guy who had this really cool idea how to resize images far better.
15.10.2007
Adobe Max Barcelona: Round-up Day 1
I attended the following sessions on my first day.
Working with Persistent Data in AIR
Although I already used the File API and the SQL API very intensively this session gave some new insights to the new synchronous SQL API and the new Encrypted Local Store which comes in handy.
Some cool new features which might appear in the next version of Flex: primitive graphics. Another cool feature: the components are being split up into MVC parts so especially the View can be altered very extensively.
Local Database Access with AIR and Data Synchronisation Strategies
My second introduction to AIR and the SQL API
Oh my, the presenter used most of the time telling the audience what it means that the SQL API can be used synchronously and asynchronously. Then 3 minutes before the end he remembers that there was another topic: Data synchronisation. That was the part that interested me. His only comment: “Well, data synchronisation is difficult”. That was very disappointing!
