Archive for March, 2008

29
Mar

Handout updated to use Share improvements (Well, the ones you can use more than 5 times)

Adobe Share has received a much needed update to its document embed capability. The previous version required keen eyesight or the use of a magnifying glass to read the embedded docs. The new version has received the “fullscreen” button treatment. I consider this the only real way to read these documents. Really… how many times have you read embedded documents in blog pages even if they have adequate scaling controls in place (Scribed, etc…)?

Magnifying Glass

The second update to Share is the ability to generate PDF versions of your uploaded documents. Which is really awesome all “five” times you’re able to do it. As advertised on the login page you get 5 conversions. There doesn’t seem to be any way to get additional conversions and there isn’t any explanation on whether more will be possible in the future (that I could find). I recommend you just ignore that “Convert to PDF” button for now. Why? Because if you’re anything like me the “neat” factor will be far outweighed by the “aggravation” factor in this case.

Sharelimit

If in the future they do open up the PDF creation, then I will definitely add it to the Handout program. In conclusion it is good to see improvements being made to the Share service. I expect these improvements to get more exciting in the future, hopefully with ties coming between applications and services such as Buzzword, Share, Digital Editions, etc…

Get the latest version of Handout
Read more about Share updates at the Share Blog

13
Mar

How to get Safari Technical Books Online for free +more

I’m completely serious about this next sentence. Get a library card. The San Francisco public library (and many others) offer Safari Online for free. The library also has these things on shelves called books, they are made of paper(comes from trees) and have words in them. I highly recommend checking them out.

sfmain.jpg

Personally I love the library, I’m not afraid to say it. Try it out and you will too.

Although sometimes at the SF Main library Nicolas Cage will show up and just stare at you. He doesn’t want your seat or anything, he just stares.
niccage.jpg

SF Library Card Sign-up
Safari SF library Link

09
Mar

My code look pretty one day (or turning your GeSHi install into a service and using it with AS3)

File this one under “when I could have been creating something useful, I created this”

Hmmmm

I’ve been using PrivatePaste.com quite often of late and thought hmm… it would be simple to create a quick as3 library for using the service. Unfortunately PrivatePaste isn’t intended to be used as a web service. This means we can post and get a result, but it will be html. The site also lacks a crossdomain.xml file. While parsing the HTML using a regular expression, it occurred to me that privatepaste just uses GeSHi. A php open source library for syntax highlighting.

Since I already have the GeSHi wordpress plugin setup on this blog, I figured why mess around with parsing an HTML page when I can just make a quick syntax highlighting service myself. All you need to do is add the following file to the directory containing GeSHi. If you’ve installed the wp-syntax plugin (or any highlighting plugin that uses GeSHi) for your wordpress blog then its under /wp-content/plugins.

include('geshi.php');
 
if ( get_magic_quotes_gpc() ) $_POST['source'] = stripslashes($_POST['source']);
 
$source = $_POST['source'];
$language = $_POST['format'];
$path = 'geshi/';
 
$geshi = new GeSHi($source, $language, $path);
 
if($_POST['linenumbers'] == "true")
	$lineoption = GESHI_NORMAL_LINE_NUMBERS;
else
	$lineoption = GESHI_NO_LINE_NUMBERS;
 
 
$geshi->enable_line_numbers($lineoption);

echo $geshi->parse_code();

Thats it, you now have a GeSHi service. To use your service in ActionScript 3 you can use as3geshilib that I’ve included in the download:
GeSHi AIR

private function parseCode():void{
	var geshiService:GeshiService = new GeshiService();
 
	geshiService.addEventListener(GeshiResultEvent.ON_GET_PARSE_CODE, function(event:GeshiResultEvent):void{
			trace(event);
			htmlDisplay.htmlText = event.data as String;
		});
 
	geshiService.parseCode("SELECT * FROM user_table", GeshiFormatType.SQL, true);
}
geshiservice.zip Includes geshiservice.php, as3geshilib - source included

In the end, what we really have here is an example of how to make a quick php service and use it in ActionScript. Which I guess is not a complete waste of time…

If you just need syntax highlighting in your AS3 project then I would recommend checking out this AS3 code highlighting library http://labs.searchcoders.com/text/. I haven’t checked it out yet, but plan to the next time my code runs off on a tangent.

07
Mar

Stefan Sagmeister at Design Matters: For designers, developers, everyone.

Stefan Sagmeister

When your average developer hears about a design conference or lecture they often don’t give it a thought. Its like a developer sitting in a meeting while designers argue over fonts. Early in my career I often didn’t pay designers any mind, but as I matured I realized that there was a lot to learn from them and that design isn’t all about fonts and colors. Sagmeister is a designer that when he gives a lecture every developer should shut their laptops and pay attention.

Stefan is in a unique position of being able to take basic principles he has learned from life and turn them in to design (and make a living at it). These principles aren’t design principles, they’re life principles. A simple set of ideas that if you can live by them could actually improve your life.

Here is the list (Things I have learned in my life so far) that he went over in his presentation lastnight at AIGA DesignMatters in SF:

sageverythinglarge.jpg

Everything I do always comes back to me.
Complaining is silly. Either act or forget it.
Thinking life will be better in the future is stupid. I have to live now.
Being not truthful works against me.
Organizing a charity group is suprisingly easy.
Drugs feel great in the beginning and become a drag later on .
Over time I get used to everything and start taking it for granted.
Money does not make me happy.
Traveling alone is helpful for a new perspective on life.
Assuming is stifling.
Keeping a diary supports my personal development.
Trying to look good limits my life.
Worrying solves nothing.
Material luxuries are best enjoyed in small doses.
Having guts always works out for me.

In the end it was a really enjoyable (and funny) lecture. And as for the developers out there. Listen to the designers and creative directors you work with. They may have more to offer than you think.

Contribute things you have learned in your life to the website

Information on upcoming AIGA events (Devs sign-up you won’t regret it)
Sagmeisters website
Watch an interview of Stefan Sagmeister
Watch a talk given by Stefan Sagmeister

Thanks to my girl Kelly for turning me on to this guy and to Lee a creative director I used to work with who always encouraged me to attend events like these.

04
Mar

Silverlight to run on linux! Oh wait that was last year.

Silverlight

So I’ve heard a few people today mention that Silverlight is going to be running on new nokia handsets. (Article 1, Article 2)

I especially enjoyed the end of the article 1.

Nokia is only prepared to say that a Silverlight developers’ kit is “intended” to be available during 2008, and that versions for S40 and Nokia Internet Tablets will be “confirmed later”.

Given how enthusiastically Nokia has endorsed every other Web 2.0 technology, its reticence is both uncharacteristic, and a little worrying.

Come on. Can’t microsoft stay focused on anything for more than 10 minutes. Please just show me another demo of silverlight running on my giant touchscreen coffee table. It works great when my cats not sleeping on it.

Microsoft Surfacecatdrawersm.jpg

In conclusion. Microsoft please fix my Vista Media Center First. I would like a Netflix Watch Now plugin and to not have to reboot it every couple of days.

You know what I do like, SQL Server. Good job with that.

Thank you Ben for giving me my mornings rant. Its like most people without coffee.

Link to last years article on Silverlight for linux

03
Mar

Pownce Actionscript 3 Library Released - Full API V2.0 Implementation (Upload files and everything)

Now that Pownce has released an official API covering features such as posting files, I decided to go ahead and make an AS3 library for it. I just posted it to googlecode and have only done minimal testing on it. I would appreciate any feedback.

The Pownce team did a terrific job with the API. Easy to use and consistent. I had minimal issues while creating the as3 library.

In my opinion (yeah you can skip this) Pownce is a far better user experience than Twitter. Its like a gobot and a transformer or a dell laptop and a macbook or chocolate torte and hohos. That is the best I an come up with that the moment, yes.

torteHoHos

I could be missing something here… but this API in my mind is a leap forward in the race with twitter.

// Imports omitted for brevity
private const APP_KEY:String = "<your app key>";
 
private var _pownceService:PownceService;
private var _testUsername:String = "<Pownce username>";
private var _testPassword:String = "<Pownce password>";
 
private function initApp():void{
	_pownceService = new PownceService(APP_KEY);
	_pownceService.setAuth(_testUsername, _testPassword);				
}
 
// Example of posting a file
public function testPostAFile():void{
	var file:FileReference = new FileReference();
 
	_pownceService.addEventListener(PownceResultEvent.ON_POST_A_FILE, function(event:PownceResultEvent):void{
			var pownceResult:PownceNotesResult = event.data as PownceNotesResult;
 
			if(pownceResult.success){
				trace((pownceResult.notes[0] as PownceNote).body);
			}else{
				trace(pownceResult.statusCode);
				trace(pownceResult.message);
				trace(pownceResult.request);
			}
		});
 
	file.addEventListener(Event.SELECT, function(event:Event):void{
			_pownceService.postAFile("all", event.currentTarget as FileReference, "File upload test");
		});
	file.addEventListener(ProgressEvent.PROGRESS, function(event:ProgressEvent):void{
			trace(event.bytesLoaded + "/" + event.bytesTotal);
		});
 
	file.browse();
}
private function testGetNoteList():void{
 
	_pownceService.addEventListener(PownceResultEvent.ON_GET_NOTE_LIST, function(event:PownceResultEvent):void{
			var pownceNoteResult:PownceNotesResult = event.data as PownceNotesResult;
 
			if(pownceNoteResult.success){
				trace(pownceNoteResult.notes.length);
			}else{
				trace(pownceNoteResult.statusCode);
				trace(pownceNoteResult.message);
				trace(pownceNoteResult.request);
			}
		});
 
	_pownceService.getNoteList(_testUsername,null, 100, -1, -1);
}

I’m going to continue to test the library and improve the documentation. Let me know if I missed anything (outside of OAUTH).

Add me to your Pownce http://pownce.com/InitApp/

Existing issue:
One method is not currently working. It is the retrieval of the send to list. I’ve posted information about the issue to the google pownce group and hopefully it will be resolved soon.




flickr