« April 2008 | Main | June 2008 »

May 2008

May 29, 2008

What's not to love about this sweet profile

Palabea

 

Yep, that’s me. Or my profile over at palabea.net. I lived in Europe for a spell and have always loved learning new languages so when i heard about palabea I decided to check it out and maybe sharpen my french up or expand my spanish vocab. I didn’t get much filled out as you can see. I didn’t even upload a pic of my ugly mug. So I was rather puzzled when yesterday I started getting comments on my profile. Didn’t take me long to figure out why. I got the following message:

 

Palabea2

 

Nigerian 419 scam, obviously. I got this same exact message several  times actually. “I am beautiful young girl with faithful, loving, tender and very caring.” What??!

But what really gave this spam dork away was “I saw your profile and i love it” Are you kidding me? Ha! 

I really hope palabea can put some tools in place for policing the site. I can’t stand this type of spam. It degrades the service.

 

Truth be told I didn’t get fooled cos I wear these.

 

 

 

View From My Screen

Vfms-google-reader

 

Who knew I was so literate? Ok, so I don’t read every post on flexcoders. I do read every post on this flex user group though.

 

My Shared Items Are Here : http://www.google.com/reader/shared/03660126966680980338

My FriendFeed is here: http://friendfeed.com/brianholmes

 

If you’re using GoogleReader let me know.

 

 

 

 

 

 

 

 

 

 

 

May 28, 2008

Google App Engine opens it's doors, shows cover charge

Google App Engine 

Google App Engine is now open to all developers. That’s really good news for those that didn’t get in to the beta program. But the bigger news is that they’ve offered up estimated costs. It’s going to be free to get started ( take notice Amazon ) but the expected pricing will be  

  • $0.10 - $0.12 per CPU core-hour
  • $0.15 - $0.18 per GB-month of storage
  • $0.11 - $0.13 per GB outgoing bandwidth
  • $0.09 - $0.11 per GB incoming bandwidth

That’s after you have run through your 500 MB of storage and 5M pageviews / month.  They seem like pretty reasonable rates. As always Google does it bigger and for cheaper.

There’s also two new apis being being opened up: image api and the google memcache api.

 

Fun.

May 21, 2008

SVN Checkin Madness

I had the follwing problem while checking in files to google code with the subversion for eclipse.

Svnerror

It was rather frustrating. Working on it for about 20 minutes. Cleaning stuff out of SVN repository and trying to update and and synchronize I remembered my SVN goto. Simply find your .svn file in the folder you’re having problems with and then delete it > then just add them back to source control.

Svnerror2

The Flex Show - Episode 44.

Ben Clinkinbeard and I were interviewed on The Flex Show for flexmdi last week and today it was released. Check it out and many thanks to John Wilker and Jeffry Houser for being gracious hosts and having us on!

Theflexshow2

 

 

May 20, 2008

Austin Flex User Group

I’m going to be giving a presentation this Wednesday, 5/21/2008, via Connect to the Austin Flex User Group. It will actually be two presentations. The first is a session on debugging from within Flex Builder. I’m going to focus on debugging techniques and also will explore remote debugging with ColdFusion, C# and Java. The second session will be a sneak peak on how you can leverage cloud services with a flex front end using the Smashed Apples framework, but specifically I’m going to be talking about Amazon Web Services and how you can leverage cloud services to make money. That’s always fun!

You can find out more info at: http://www.austinflex.org/.

If you’re in Austin, Texas I hope you can make it.

May 19, 2008

Become a Visual Studio Test @@#@!

GarethJ is looking for testers to test out the new Visual Studio eXtensibility.

VSTesters

I wasn’t amazed when I saw that. There seems like a general shift in the industry towards rich internet applications. And let’s face it : Testing applications was never sexy. But knowing how hard it is to find good people, you can read more about the job here. ( I’m an equal opportunity job link distributor )

But I have to admit, I did chuckle, especially when I read this part.

VSTesters2

Sweet. So the dev team writes the code. The test @@#@! then does all the work. Sounds like a sweet product development plan….. or one of these.

 

 

 

 

 

 

 

 

May 15, 2008

Overloaded Methods in Action Script ( sorta )

via wikipedia

Method overloading is a feature found in various programming languages such as Ada, C#, C++ and Java that allows the creation of several functions with the same name which differ from each other in terms of the type of the input and the type of the output of the function.

I’ve wanted overloaded methods in Action Script for some time now. After using it in other languages like java and c# it’s really easy to train your mind to solve one off scenarios with overloaded methods. Much more than an easy way to provide defaults for lots of different scenarios I enjoy crafting them to manipulate program behavior for base or core classes so that the actual implementation of the program becomes much more simple and easier to maintain.

I’ve tried several approaches to getting something similar and elegant in Action Script. Most everything came down to being a hack and turned out to be more work than was necessary to implement. I know overloading is more of an AS thing than an FB thing but thinking about new FB4 features  – (my comment is still awaiting approval as of this writing, I mentioned visual studio’s intellisense, oops) the other day made me decide to sit down and attempt overloaded methods one more time. This time I wanted to look at my prominent use cases and see if there was a way to solve this issue.

The two use cases I came across time and time again were 1) eventHandler methods that accept related and similar events: breaking them out to thier own function is do-able but is a lot of work when the difference of how you handle them is 1–off. And 2) methods that take a UIComponent of some sort that either gets or sets data. For example, if you were to loop over an array of form input controls reading / writing data to them you’d find the difference in how you set or get data on them is very similar but just a little different. A TextInput just reads and writes to the “text” property. A ComboBox might read and write to a selectedItem[”property”] value. Or you might want to pull the htmlText value off the RTE.

With those use cases in mind, I thought about how I could handle the two problems simply and elegantly, not necessarily by overloaded methods but just something that could slim my code down, drop a lot of casting, and at the very least make my code more maintainable and more precise in it’s intent.

The first obvious thing I saw was that I didn’t need to worry about the number of arguments, although the technique I’m gonna demonstrate can be used with multiple parameters or event the …rest params. In my case I’m handling an event or a view in both cases. The second thing I saw was that I’d almost solved this problem. In most of these methods I was just accepting either an Event or UIComponent or something similar. The next thing I noticed was that I was either casting from within switches or if statements and I was executing my computing goal from within my function or calling an outside function to accomplish something. With that in mind I decided calling an outside function was the best method. Indeed, once you identify what you want to do, with overloaded methods you can easily add more methods with different signatures that all call your most basic function. The names on all the methods are all the same. Your code becomes very clear in it’s intent. It’s not saveEmployee(), saveUser(), it just becomes save(user), save(employee).  It’s important to note that I understand the former examples are very intent. However, the latter examples, when working in teams or groups, it’s much easier to learn and remember save(variable) and when you want to save an object and you don’t know if it’s an Employee or User you don’t have to worry about it because in most languages the compiler creates your switch or if statements for you.

 ( you should be able to see the next step with overloaded methods, which is to dynamically interpret objects you didn’t know about save(order), save(product) for example. Ruby on Rails made this kind of processing retro the past few years, but I’ve been doing something similar with coldfusion argumentCollection for years now. Check out Proxy if you’re interested in that. )

So to get to the demo, I created two functions with the same name eventHandler(), eventHandler(). My first method is my bucket. It’s where I want to throw everything into. My second method is my target method, the method that does the cool kick ass thing I want it to. It takes very specific arguments. Obviously it didn’t compile. So I created a namespace in the default package ( so I don’t have to import it ) called overload. I made my first method public and put my second method in the overload namespace. I reworked how I called the overload method and it compiled. To interpret my arguments I use a switch statement or if statements depending, like i was before. My code then becomes very intent. It at least accomplishes my goals with overloaded methods.

Overloadcode

 

A couple thoughts on this technique. First, I looked for but didn’t find that overload was a future reserved word in ActionScript. It feels like something that might be. Secondly, ActionScript should define overloaded methods, the compiler should implement them and and FB should support them.

Here’s the live demo. Right click for source.

 

 

 

 

 

 

 

May 14, 2008

View From My Screen

Theflexshow

 

More later.

 

 

 

Sorry For Spamming You

I’ve been receiving a lot of bounce backs ( in the thousands ) on my domain smashedapples.com for emails to people that I never sent. Apparently someone is spoofing my domain to spam people. So if you got spam from someone at smashedapples.com I apologize. I assure you it was not me. I use gmail. Hopefully it went into your junk mail. But that leads me to a question I have? Does anybody have any advice about what to do when something like this happens?

Tags: