Introducing AuctionAverages.com!
Posted by Zachary Pinter on December 26, 2007 at 09:29 AM

When using eBay, it's often difficult to find the right price to buy or sell at. Sure, you can always compare to what the stores are selling an item for, but that's still a lot of guesswork. Furthermore, things get a lot trickier when dealing with in-demand items that have limited availability at stores (like the Nintendo Wii).
To help fix this problem, I've started AuctionAverages.com. The site is in its infancy, but I think you'll find it provides a lot of valuable information. Basically, it stores information about previous auctions and represents that information visually with graphs.
Using the graphs, you can find the average, highest, and lowest prices. Furthermore, you can find out which day of the week and time of the day had the lowest or highest bids. Armed with such knowledge, one can get the most out of their bids and auctions.
Weak References with Dictionaries in Actionscript
Posted by Zachary Pinter on October 11, 2007 at 08:02 PM
Actionscript dictionaries are a great tool for dealing with memory management because you can use them to create weak references to objects. This means that the object automatically goes away upon garbage collection if the only reference to it is in the Dictinary.
To use a dictionary in this manner, simply pass true to the constructor. However, one should note that this only makes the keys of the Dictionary weak.
For example:
1 class MyObject { 2 public var message:String; 3 } 4 5 var dict:Dictionary = new Dictionary(true); 6 var obj1:MyObject = new MyObject(); 7 obj1.message = "My really long message..."; 8 var obj2:MyObject = new MyObject(); 9 obj2.message = "My second really long message..."; 10 11 dict[obj1] = true; //obj1 is weakly referenced 12 dict[2] = obj2; //obj2 is strongly referenced
If the only reference to an object is the key of a weakly referenced dictionary, the object will not persist after garbage collection. However, if the only reference to an object is the value of a key in a weakly referenced dictionary, the reference is considered strong and will force the object to persist after garbage collection.
So, what do you do if you want to store a dictionary of weakly referenced objects, but key them off of a meaningful value (such as an item id) rather than their reference id?
The answer is to use a simple WeakReference class (source):
1 class WeakRef { 2 private var dic:Dictionary; 3 4 public function WeakRef( obj:* ) { 5 dic = new Dictionary( true ); 6 dic[obj] = 1; 7 } 8 9 public function get():* { 10 for( var item:* in dic ) { 11 return item; 12 } 13 return null; 14 } 15 }
From here, you can do the following:
1 var dict:Dictionary = new Dictionary(true); 2 var obj1:MyObject = new MyObject(); 3 obj1.message = "My really long message..."; 4 var obj2:MyObject = new MyObject(); 5 obj2.message = "My second really long message..."; 6 7 dict[1] = new WeakReference(obj1); //weakly referenced value 8 dict[2] = new WeakReference(obj2); //weakly referenced value
Now, you can key based off of a meaningful value, and still get all the benefits of weak references.
Actionscript Hash
Posted by Zachary Pinter on October 09, 2007 at 08:36 PM
On the surface, the Dictionary object in Actionscript seems quite limited compared to the Hash and HashMap libraries of other languages. However, the functionality you would expect is still there, it's just obscure.
For example, to loop through all keys in a Dictionary:
1 for (var key:Object in groupMap) 2 { 3 trace(key + ", " + groupMap[key]); 4 }
To loop through all values in a Dictionary:
1 for each (var item:Object in groupMap) 2 { 3 trace(item); 4 }
To check if a key exists (in a way that's distinguishes from a key whose value could be null):
1 obj['key'] === undefined //key exists
To remove a key/value pair from a Dictionary:
1 delete obj['key']
All of the above code will also work for a regular object treated like a hash.
This Vs That is live!
Posted by Zachary Pinter on October 07, 2007 at 12:59 PM
Recently, a 48-hour programming competition called Rails Rumble was held. The goal was to develop a functioning Ruby on Rails website in a weekend. Trong Nguyen, a past coworker of mine in Florida, flew to Denver and together we worked on bringing our idea of a debate website to life.
The result? This Vs That
This Vs That is a website where two opposite opinions can be discussed and debated, with the intention of bringing out the best arguments from both positions. In a fashion similar to Digg, Slashdot, and Reddit, replies to a topic get weighted and sorted by their popularity (determined via a "vote"). However, unlike the those sites, the discussion is not single-threaded, but rather dual-threaded (a thread for each side).
Think of a debate topic. Categories can include science, religion, sports teams, colleges, social issues, technology, medicine, politics, and more. As long as the issue can be divided into two sides or paths, it can be a topic on This Vs That.
So go check it out and start posting!
eBay Desktop Launched
Posted by Zachary Pinter on October 02, 2007 at 07:51 PM
As I mentioned previously, I started working for effectiveUI in July. Since then, I've been working on Project Sandimas, the code name for the AIR application now known as eBay Desktop. The product launched into open beta yesterday and has already won an award at the Adobe MAX conference.
So go ahead and try it out!