GetBundle has now Growl

02 Nov 07 1 comment

The last few days i added real Growl-notifications, if it is installed. If you don’t have Growl installed get it, don’t worry, there are still notifications based on CocoaDialog.

It should update automatically if you have installed the auto-updater, if not you can run “Update Installed Bundles”. or you can download it at projects.validcode.net/getbundle

Feedback is welcome!

tags:

Upgraded to Leopard

28 Oct 07 0 comments

Yesterday i upgraded to Leopard the fifth Version of Mac OS X, and its awesome.

The Feature that really disappoints me are Stacks. I expected more. Also it is not possible to just have Link to a Folder, everything will be Stack. The Icons are so big, when i open the Application Stack half of the screen is covered with icons and the stack doesn’t even display all Applications! I think it would be a very nice feature to offer more options than just “Grid” and “Fan”. For example adjusting the icon size, maybe offer a third view that, has the grid view style but displays the content as a list, this would be nice for the apps stack. But i have to say i some situations a stack is better, like the “Downloads” stack, because i click on it and and another click opens the last downloaded file.

Spaces is a really nice “new” Feature its simple and does what it should do. I also like the Feature of Safari and the Terminal, that lets you merge windows on different Spaces into one window in one Space. One thing that really makes it a bit annoying… If an app has to tell you something it automatically hops to the space of that app.

Another nice feature is Webclip, which lets you select a part of a website and display it as a widget. I love it. But this also has it’s limitations i also want to be able to re-adjust the hight and the width in the widget itself and be able to set an auto-refresh, because currently it only refreshes when you activate Dashboard.

But all in all it is worth upgrading.

tags:

I love Pixelmator

27 Sep 07 0 comments

On the 25th September the Pixelmator Team released PixelMator Firestarter, the initial release of Pixelmator, after watching the screencast and playing around with it, i totaly fell in love with it. It uses Core Image for it’s filters which means the stuff gets processed in the GPU, not the CPU. Which also means it’s insanely with fast. But there are a few things i’m missing. Shapes are important, i need them, i need them to work like in Fireworks, i hate the way Photoshop offers Shapes. Also it would be nice if it handles PSD-Files better, yes it can open them, but working on them is a bit risky.

I already bought a license and hope the guys at Pixelmator, will make it even better. $59 is a very fair price for such a great application.

tags:

How to do things right in XSLT

23 Sep 07 0 comments

The last few weeks we transfered our hosted sites to a new Server, that meant we also had to switch to the new XSLTProc, some (or a lot) of the “old” XSLT-Files made problems, because they were build upon Bugs of the old XSLTProc.

I wrote a little script which gets the XSLT and XML from the old Server and processes it with my new local installed XSLT processors. I manly use Xalan to validate the XSLT-files, because XSLT is more tolerant then XSLTProc.

I wrote down the most common problems to inspect them and to prevent that i make the same crap. :)

Defining the Doctype

All the old XSLT-Files defined the Doctype with <xsl:text/> in the following way:

<xsl:text disable-output-escaping="yes">
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
</xsl:text>

The right way to define the Doctype in an XSLT-File is to define it in the <xsl:output/> and to define the XML-Namespace in <xsl:stylesheet>:


<xsl:stylesheet version="1.0" 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns:html="http://www.w3.org/1999/xhtml" 
        xmlns="http://www.w3.org/1999/xhtml" 
                exclude-result-prefixes="html" 
>
....
<xsl:output method="xml" 
        doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" 
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 
    encoding="utf-8" indent="yes" 
    omit-xml-declaration="yes" />

It was not possible to switch to the right way, in most cases.

XSLTProc acts different when the output method is set to “xml” and no Doctype is given in the xsl:output, it is not giving you valid XHTML, it gives you valid XML, which can lead to problems in the Browser and the HTML-Validator.

I recommend to define the Doctype in the xsl:output!

Definition of template parameters and variables

Like in programming languages you can define variables, like in programming languages they are available in a specified area. If you define the variable as a child of xsl:stylesheet you can call them in the whole xsl:stylesheet, if you define it in a xsl:template you can just call it in that xsl:template.

Unlike programming languages you are not able to overwrite them. In the old XSLT-Files variables were defined twice or more times in one xsl:template, this is not valid. Also parameters are kind of a variable, and can not be overwritten.

This was #1 on the list “Which Problems make me insane”, followed by:

Unused xsl:templates

Most of the variable overwrite tries were in those unused xsl:templates, and there were a lot of them.
Really try to avoid them. if you really don’t need them, remove them!

(I hope i find time to publish the script which helped me a lot by just grep for call-templates af a template, currently it is just useful for me)

Wrong use of CDATA

Also a very common problem was that JavaScript code in a <script>-Element were wrong escaped, the old XSLTProc didn’t touch the code in a CDATA section, the new one does, and this is the valid way, because a CDATA in XSLT means don’t treat the following piece of code as XSL, not don’t touch this. So in the new XSLTProc < were escaped to &lt;

The way you should JS in XSLT (if you really need to) is:

<script language="JavaScript" type="text/javascript">
<xsl:text disable-output-escaping="yes">
/* &lt;![CDATA[ */
<![CDATA[
function Bla(){
 alert('Hello World')
}
]]>
/* ]]&gt; */
</xsl:text>
</script>

tags:

They know where you are...

26 Aug 07 0 comments

...and they know where you have been.

People using a mobile phone (should) know this. Mobile Service Providers know everything about your moves, when you have your mobile phone with you.

At the last festival i have been there was a trailer of a shop where they sold t-shirts and other stuff every time i walked by this trailer i got a file sent via bluetooth. Also the festival it self had a mobile guide which showed you your exact position and what’s around you. They were able to track everyone. Mobile Service Providers (in Austria) are allowed to process this data, under a few conditions (see TKG 2003 ).

I guess even if they don’t know your mobile phone number, they are able to track you mobile phone and can track every step you do.

In some cases it can also be helpful for you, imagine you have an accident in the mountains and you are alone and can’t exactly tell them where you are they just enter you phone number and within seconds they have you position. Technorati Profile

tags:

Mac, the best web development platform

10 Aug 07 0 comments

[Screenshot] Windows Xp and VistaIn my day job i work on a PC with Windows XP and it’s frustrating, not because it is Windows. It is the fact that there is no way to make your self comfortable on a Windows machine, because there is no good software for Windows to get a useful workspace.

The mac gives you useful stuff right after you installed it, because Mac OS X is a UNIX you get a whole bunch of useful command-line applications. By installing MacPorts you are able to get nearly every application or library related to web-development.

To do the development of every kind i use TextMate, it is one of the best editors on this earth, it is simple, easy to extend and personalize. There is no feature you don’t need. There is a nice community around this editor, which contributes a lot to make this editor better and better.

To test your website or your web-application on browsers like Internet Explorer 6 or 7 there are to very good virtualization programs, VMWare Fusion and Parallels. Both are the best and both offer you the Unity Mode (or Parallels “Coherence Mode”), which allows you to display Windows-Windows integrated into you workspace. The windows are also display in Exposé and the window-switcher. For server-side develppment you can simulate the whole deployment process and test your application with the same configuration you have on you server. I have Debian on my server, and i also have virtual machine with the same configuration localy.

Beyond development there a lot of cool utilities, one of my favorites is Quicksilver it not only offers a quick way to launch applications, it also lets you quickly access your addressbook entries or skip the current track in itunes.

I don’t hate Windows, it’s just that i love mac.

tags:

Festivals

31 Jul 07 0 comments

It’s summer this means in whole Europe there is nearly every day a festival somewhere.

This summer i already attended one the Nuke Festival in St. Pölten. The first band i saw after i arrived was “The Prodigy”, and they are great. The next day i saw more than one Band. Lambchop, played on the stage inside where no sunlight goes, “The Roots” played after Lambchop outside on the Main Stage where i stayed till the last Band the “Beastie Boys” went off the stage.

There are still two festivals i am going to attend, one of them is this weekend, the “Urban Art Forms” it is a pure electronic music and arts festival. It takes place in Wiesen with four stage. It is the third time i am going there. Then two weeks later there is the “Frequency” Festival in Salzburg, where “Tool”, NIN, and many other good Bands will play, there will also be an electronic stage the main act is Digitalism, a great french DJ-Combo.

tags:

Safari on Windows at your own risk

12 Jun 07 0 comments

Yesterday Apple released a Beta of Safari for Windows, some user, including me, think it is more Alpha. Thor Larholm found a security lack after two hours. I found two bugs related to the rendering engine WebKit. Several other people experienced problems with Font rendering in the whole Application.

Excerpt from the License of Safari 3:
IMPORTANT NOTE: THIS IS “BETA”, PRE-RELEASE, TIME-LIMITED SOFTWARE MEANT FOR EVALUATION AND DEVELOPMENT PURPOSES ONLY. THIS SOFTWARE SHOULD NOT BE USED IN A COMMERCIAL OPERATING ENVIRONMENT OR WITH IMPORTANT DATA. BEFORE INSTALLING THIS APPLE SOFTWARE, YOU SHOULD BACK UP ALL OF YOUR DATA AND REGULARLY BACK UP DATA WHILE USING THIS APPLE SOFTWARE.

You should help Apple and the WebKit Team to fix as many Bugs as possible till the official release in October.

Download it, use it (but carefully), report Bugs to the WebKit Team

tags:

Developing iPhone apps? Use Web Standards!

11 Jun 07 0 comments

Today Apple presented some amazing stuff of leopard, a Windows version of Safari and suggested to develop Apps for the iPhone with Web Standards.

Many people thought there will be a whole SDK for the iPhone and an enviroment to run Apps natively, but there will never be something like this, instead Apple wants you to use Safari as an environment to develop your Apps for the iPhone. I also think they will have some kind of gateway to access iPhone stuff like phone numbers.

Using Web Standards as a Environment for applications is the right direction to go! Adobe is doing it with Apollo. Microsoft is doing or will do it with Silverlight.

Nearly every platform understands Web Standards and can handle them.

Using them to build applications is also a huge benefit for developers.

For Example if 37signals wanted to build a simple To-Do list application for the iPhone they just have to take their HTML Views add a Javascript to store the data localy on the iPhone (maybe using Google Gears) and thats it. If someone of them wants the same app on one of his computers, using the Apollo Runtime, it will be no big deal.

tags:

About my new Airport Express

07 Jun 07 0 comments

Yesterday i bought a shiny new Airport Express to connect my mac mini, witch has no Airport, to my Airport Extreme Base Station, because till yesterday there was a long cable, which went through the whole kitchen to the living room where the mini is.

It took me long to get it work and understand how the ethernet port from the Express acts. I read through the Apple Docs and found this. This made me think it is possible to connect wired clients to the Airport Express other people said this is not working, but the docs say it is.

The only thing i had to do is to build up a WDS. First i didn’t really understand how it works. I thought the Base station is building a wireless network and the Express connects to it, but i didn’t think that the Base Station need another wireless device to build a network.

After hours of failures, i tried again the assistent and watched what happen and it worked, it was to easy.

Both Stations are set to “Participate in a WDS Network”. The Airport extreme is set to be the “WDS main” and has the Express added as a “WDS Remote”. The Airport Express is set to be a WDS Remote and bridges all wired connections to the Extreme Base station.

Now if i connect a hub to the Express i’m even able to connect a whole bunch of wired clients to the Airport Express.

tags:

Hello my name is Sebastian Gräßl

14 May 07 0 comments

Adobe Labs [Screenshot]Not Graessl, not GrÅÅl, not Gr伍陸l, just Gräßl. Yes, my name includes Umlauts. Many Web Services and Applications can’t handle them right. They replace it by characters you don’t even know they exist or force you to write your name wrong (without Umlauts). This is a serious problem, because there are more people that have Umlauts and other unusual characters for your region in theire name. I also experienced problems with Flash-based Applications. I saw sites playing nice with these characters on one page and destroying my name on the other, bacause they tell the browser the wrong encoding. Some webservices don’t even let you signup, because they count it as an validation error.

There is UTF-8 that can handle these characters very well, please use it!

tags:

Timeout for setTimeout

10 May 07 0 comments

Prototype provides a many alias functions like $() for document.getElementsById(), in the latest trunk you get an nice new way to execute functions delayed.

The old way was to use window.setTimeout(), now you can use yourFunction.delay().

Lets try something very simple. We want to simply tell the user after five seconds that he is five seconds on the site. Ok, this is actually a stupid example.

First we define a function that executes alert(). You think thats stupid to, but you’ll see why i define a new function later.


function tellFiveSeonds() {

 alert('Your now five seconds on this page! Go away!');

}

Then we execute this function with a delay of five seconds with the following code:



tellFiveSeconds.delay(5);


But lets say we want to personalize this function and want to alert something like “Hey Bast! You are now five seconds on my page, please leave!”, then we will have to give the function an argument.


function tellFiveSeonds(username) {

 alert('Hey ' + username + '! You are now five seconds on my page, please leave!');

}

But how do we still execute it with a delay of five seconds?

Like that:



tellFiveSeconds.delay(5, 'Bast');


delay takes the first argument for its own and passes the others to the function you want to execute, like you would do with any other function.

tags:

Back in the Blogsphere

06 May 07 0 comments

It’s been a long time since i posted my last post, there is one reason for this, i had no time at all to blog, but i want to start forcing me to post at least one article a week.

Since September 2006 i work for a company called icomedias in this time i learned a lot. The company is located in Graz, so i had to move to there into a flat with seven other really nice friends.

At my work i have to work on windows. I searched very long to find the right editor and i found it. My favorite TextEditor on Windows is e to show how much i like it i ported (or started porting) my GetBundle to e. Allan made some improvements to the TM-Version of the GetBundle and i’ll go on improving the e-version of it.

A few weeks ago i went on a trip to London, to attend the Future of Web Design conference. I love London. It is a great city and i hope i’ll get there again soon.

As you might have noticed i also had some time to do more photographs and i hope my motivation will hold on.

tags: