Thursday, December 21, 2006

 

Boy am I glad we have smaller gear today!

5MB Hard Disk in 1956



More popular pictures at Popular-Pics.com


Its a hard disk in 1956.... The Volume and Size of 5MB memory storage in 1956. In September 1956 IBM launched the 305 RAMAC, the first computer with a hard disk drive (HDD). The HDD weighed over a ton and stored 5MB of data. Let us start appreciating your 4 GB jump drive!


Friday, December 08, 2006

 

What to do with dirty data in an Syndication feed

Hello all,

Yes it has been some time since I posted on this blog. I have a bunch of other blogs that have gotten more attention of late. Also finding appropriate stuff to post here is tricky sometimes. Anyway onto the meat of this one:

So I've been working with feeds of late and found myself in need of a way to handle the case where a summary is not present in a feed but the main content is. Some of the time this content can contain HTML and I hope I don't need to tell you what a pain that can be when trying to create a summary. So what did I do you ask, I used a simple regular expression and then took a substring of the resulting string.

Here is the code: (Java Code BTW)

public String process(String content){

String result = new String(content);

result = result.replaceAll("<(.|\n)*?>", "").trim();

return result.substring(0,(result.length()>100)?100:result.length())+"...";

}

Wednesday, April 19, 2006

 

When a spade is not a spade


Hello all!, this entry sat around a while before posting. I'm working on some new content, specifially for microformats, standards development, and ruby on rails.

I know I have been a bad blogger. No Posts for a week and abit! There was a good reason. I got busy working on solving problems and lost track of the days. So I'm back and have some stuff to blog about.

First off, desk ergonomics. I think a desk is like a bed, you need to roll over every now and again so I have moved from the 90 degree corner of my desk that I like to work in to the full 180 degree space availible. Boy am I uncomfortable but its still refreshing to simply move a foot to the left. It has the effect of giving you a new perspective on your work and can actually change your mood about a grate many things.

Eclipse rant: Do you see that image above? Ya? Well I'm sick of seeing it for 10 minutes at a time. It kills workflow and makes me wonder sometimes if eclipse is broken or what. Its a small rant but some one needs to look into that for me. A viable solution would be to place execution threads into hibernation after a time out and let waiting methods execute. This would involve some sort of concequence rating on operations. I'll have to think about this some more...

CSS the Fun the Joy: So I have to bring myself up to speed on creating specific generic style sheets. That is, the normal way style sheets are used is that the html gets written and then you create the style sheets to go along with it. In our case we are doing it the other way. Can anyone say "nail in the foot". I thought it was a good idea at the time but now I just need to learn to dig in an upward direction. I got a fe books on it that we are passing around the office here I'll let you know what I think of them after I have them read.

Saturday, April 01, 2006

 

Some times beta is bad....

Some of you may recall that a few posts ago I mentioned a tool called Performancing that hooks into your Fire Fox and allows you to write blog entries when ever you want without having to login to your blog system. You know all the cool kids are doing it. Well mine stoped working yesterday as I prepared an entry for this blog. Sucks too because I had some killer material... Ok, I guess I can put the killer material in this post. But first "What happened to my cool blog tool?" well, here is the error I keep getting which sucks because I have NO IDEA WHY ITS TELLING ME THIS! Also, as a direct result (I think) I am unable to post to this blog using the tool. Oh, well thats why I'm doing it the "old fashioned" way. You know, logging in through the web, and clicking links instead of buttons. Wow I feel like I'm back in March...

Ok, enough griping about my blogging tools, I have big news about something I actually may infact like to know more about before determining that it sucks or not. It's called Ruby (Some of you may have heard the term Ruby On Rails) and some of you should know what it is but for those who don't here is the jist. Ruby is a dynamic language that has some very cool tools and toys. First I grabbed the download of version 1.8.2 from the Ruby Central Site then after playing around with the FreeIde that comes packaged with it (btw: I'm a windows user but ruby works on all major platforms - Chris there is a mac flavour) boring ide but it works. It has some nice things like syntax colouring etc. but not really all that great for real development work. For that kind of power I turn to my good pal Eclipse 3.1 and then I look for a plugin that will allow me to code and run/debug ruby code. I found this great artical at IBM that deals the dirt. So I follwed the directions as listed and all is good. It works and its nice. But then what can you do with Ruby anyway?

In my last post (not counting the one that was not posted) I was talking about ebay and their api, well from my perspective ebay and their api are dumb. They must not believe in standards because although they go to the trouble to provide a wsdl and xsd for their service, their service only losely follow it. For instance, their xsd defines an Item with a set of attributes that are defined in alphabetical order, yet in their response xml that is supposed to follow the xsd the Item attributes are not delivered in alphabetical order. Now, its well formed XML but its invalid when validating against its xsd which I did using Altova XML Spy. It tells me what I had to discover from my JAXB code, that the returned xml does not conform to its schema. Baka!!!!!

So what the heck does that last paragraph have to do with Ruby? Here is my thought: I can use Ruby to write a webservice that handles the xml in a different way and spits out an xml format that I have control over. That way it wont matter that ebay, amazon or anyone else is a tool and I can make it play nice with my brain and way of making the web work.

I'm gona try to code up the solution to this intresting problem in a few hours (maybe Sunday) and I'll post my findings here. So stay tuned and keep coding...

Remember its in that place where I put that thing that time....

Thursday, March 30, 2006

 

eBay the next generation

Hello once again!

I know two posts in one day, does this guy ever do any work? I assure you I do and this is what this post is going to be about. Specifically the newest incarnation of the eBay web service api. I have written a few small applications now that use the ebay api (of which I will now refer to it as epita - [eBays Pain In The Ass]). Now, I will start by saying that I respect ebay for their service and the fact that they even opened up an api. What I do not respect is the fact that they appear to have their heads up their asses. The reason I say this is that although the api documentation is LARGE it says very little. As a developer I like to hit up a doc, find the section of intrest (say, GetSearchResults) and have all the detail I need to make it work for me in that section. Instead ebay has felt the need to thoughly spread the knowlage of how to use a simple REST request like GetSearchResults accross five different documents some of which are legacy documents that will be invalid in a few months as their Unified Schema take a full hold of their service.

I suppose that I am probably asking too little of the system to take advantage of the extensive documentation provided. What ever. The other last pain in the ass thing about ebay and their api is the frigin account integration stuff. You need a Developer Id, Application Id, Certificate, REST Token, Authentication Token, Developer User Id, and Ebay User Id just to attempt at using the api. I think that is a little too much by itself but on top of that you also need to a second set of the credentials above to use their sandbox server. Stupid? I thought so. But who am I? Just the poor sap trying to use their product.

Ok so thats my rant about what I dont like about it so how do I use it?

Well, my method is like this:

1. Grab the schema definition (its an XSD)
2. Create an ant task in my eclipse project to generate the XML bindings from the XSD using JAXB

=================================
target: generate.xmlbinding.ebay
================================= -- /> name="generate.xmlbinding.ebay" depends="clean" description="-- Generates the jaxb binding classes" />
Ebay US Class Generation -- /> file="${dir.schema}/ebaySvc.xsd" todir="./JavaSource"/ />
dir="./JavaSource/com/project/component/ebay/xmlbinding"/ />
level="info" Parsing Ebay Unified Schema... /> jar="${libs.dir}/${lib.jaxb.xjc}" failonerror="true" dir="./JavaSource" fork="true" /> value="-Xmx1000M"/ /> value="-quiet"/ /> value="-p"/ /> value="com.projectcomponent.ebay.xmlbinding"/ /> file="./JavaSource/ebaySvc.xsd"/ /> /> file="./JavaSource/ebaySvc.xsd" /
/>
This creates my XML bound classes for unmarshalling the api call results.

3. Build a suitable wrapper and service class for myself and make the REST calls
4. Bind the results to the correct generated class
5. Serve up with a beer to the end user.

Its simple and it works. I can go into more detail only if there is intrest so leave comments.


Technorati Tags: , , , , ,

 

Performancing in Firefox - The browser is your OS

Greetings one and all,

This is sort of an early post for me as I usually do my blogging later on in the day. So this will be short. I just wanted to direct any of you bloggers out there to this very cool fire fox extension at Performancing that lets you write your blogstuff right inside your browser. So now you can look at a site and blog about it without having to load a new app etc. Its pretty good, and this post was written using it. If this actually makes it to blogger.com then at least I know its a success.

Anyway folks, gota go write an ebay component for the Portal Prophet Platform...

Wednesday, March 29, 2006

 

You need to know when to call it a day

As I write this I am zonked. Not so much in the tired sense but more in the my-brain-has-turned-to-a-puddle-of-goo-and-I-cant-think-good. This became more then apparent when I started asking a non-tech for tech help. God I must be tired! Of course then I began to wonder what the heck could put my otherwise able and creative brain in this state. Did I have a floating pointer hidden from my mental garbage collector? Lets recap the week in a few sentances....

Sunday - Video games (Katamari Dumanche, Grandia 3, GTA:San Andreas, Mario Cart DS, Age of Empires DS) some food etc. No, nothing to turn my brain to mush there...

Monday - Full day of work (on the stupid ass Amazon Alexa Information Service) dam thing is broken as windows. I really wonder at the sliding quality that Amazon is offering in their web services (maybe I'll write more on that in a future blog). So after full day of work its off to the university (Ryerson for you who dont know) as the CE students are giving final presentations on their Software Engineering projects and I have been asked to sit in and evaluate their work. So thats a few hours of life I sacrificed for the greater good. My brain is still functional at this point I think... a little hazy as one group put me to sleep. So after the presentations another group (not the one that put me to sleep) invites me out for beer in a way to thank me for the help I gave them this term. I'm not one to turn down a beer so off we go into Oakem House (on campus pub) where beer was-a-flowin (Ok at this point you probably think "well thats why your brain sucks you drowned it like a kitten in a berlap sack" but I assure you I thought [at the time] that I was fine... I remmeber what I did last night... (see last blog entry)

Today - well maybe I'm just tired, I woke up tired and drank sugar all day and ate candy and had some spicy chicken from BBQ Express. At any rate, I just did not have the energy to blog about tech today. I promise that tommorow you will get a rundown on some tech (I'm using the new Unified EBay Api so I'll tell you all about how I'm not using it).

until next time...

Tuesday, March 28, 2006

 

Demo Camp 4 - Toronto

Hello one and all!

I've switched formats, as I became unispired and disillusioned with my last attempt at keeping an active blog about all my development woes and solutions to those woes. This is the new format and we will see how it goes over the next few months.

So, first off I was at Demo Camp 4 (http://barcamp.pbwiki.com/TorCampDemoCamp4) and I am struck by how large it has grown from the last one I attended. There were close to 150 people from the GTA (Greater Toronto Area for you out of towners). Where the last Code Camp / Demo Camp was held at the tucows headquarters (King & Duffern) in a cramped area (no fault to tucows as it was the largest area they had and I dont think they were expecting so many people to attend) this time it was held at the MaRS building at 101 Collage St. ( MaRS Site ) it has recently been renovated (the building not mars! teraforming takes longer [sorry geek humor]) and the space that we were assembled in was great! I have a feeling that in the future we may have to take on even larger spaces.

So the presentations were very good as usual, and also very fun to participate in. I had passed the word out to the student of a class that I help coach at Ryerson University, also I let the Professor know about the event and he was in attendance. We met with some of the University of Toronto guys (they were at the other code camps too) and we hope to hook up with them in the near future and discuss some mutual intrests in Software Development.

I have rattled on for a bit about some high level stuff, my goal with this new blog is to provide an ongoing diary of the problems I encounter (technical and other) while working as a software developer. The next blog will be about the Amazon Web Service API's and why I think they are not all they are cracked up to be. I'll show some issues I have encounterd while trying to integrate them in the publishing platform I'm working on code named Portal Prophet.

So long for now....

This page is powered by Blogger. Isn't yours?