"Really? Are you joking? I thought I was really doing well here. It wasn't my fault. Don't you remember my great quarter last year? How can there be budget cuts? My family really needs me to keep this job. Is there anything I can do to change your mind?"
The myriad of possible first instinct responses to "You're fired" might go along these lines .. but what about:
"Wow. This job was the only thing anchoring me down. I can do anything I want now!"
For some reason I found myself pondering this situation today as I began to look to self evaluating myself at my job in preparation for a review. (Don't read into this too much, I'm pretty happy at my job - I work for a pretty cool company, but even that could not keep me from day dreaming a bit.) Playing the mental exercise through, I asked myself, "What would I do if I was fired tomorrow?"
What would you do?
What would you do if you had nothing anchoring you down to where you live and what you do? Imagine you live in a city where you have no family, no belongings that can't be packed up and shipped anywhere, and no commitments or reasons to stay? What if you could pick up and go anywhere and do anything? Would you? Or do you prefer the status quo and the comfort of knowing your city blocks, worn sidewalks, and familiar faces. Status quo isn't necessarily bad - but what if there was nothing stopping you from moving to any city in the world? There are jobs to be found almost anywhere so imagine that money is no worry. You'll find work - maybe not what you do today, but something to sustain you. Could you, or would you, be willing to take that step into the unknown? Would you find it scary or invigorating?
I think I'm not alone in imagining what it would be like to just drop everything and walk away from this life to start another. There is no reason why I must stay in the software profession. What would I do? I think I would go back to college and get a teaching certificate and a job teaching 6th graders or simply join Teach For America.
So, how about you, what would you do?
Tuesday, August 28, 2007
You're Fired
Posted by Socratic Cyborg at 10:43 PM 1 comments
Thursday, August 23, 2007
Amazon Turns Away My Money
I have just had the pleasure (and displeasure) to build a tool on top of Amazon's E-Commerce Service.
My overall feeling is that Amazon does not actually expect users to use this service and only built it as an entertaining joke on how not to build web services. After attempting to talk to their customer service who all use the usual canned responses to difficult questions that fail to answer your question, and even tracking down a few developers through friends of friends; I now can say with certainty that this web service isn't reliable, nor should it be relied upon.
Despite this, I still attempted to build a tool that both relies on Amazon and needs some level of stability. Cart Control - built for college bookstores - it is meant to automate the shopping of used books. Bookstores deal in bulk, and Amazon just didn't have the necessary tools for them to quickly buy books, so I did my best to supplement what I could.
Oh, the pain.
You cannot delete a shopping cart with one, two, or even three clicks. This is problematic when you use my tool to build a cart of 3,000 books and then decide you don't want the books. It takes on average two clicks to delete a single item, which means 6,000 clicks total needed. With an average page load time of 4 seconds after each post back, it can take up to 6 hours to clear the cart.
Amazon only half supports 13 digit isbn numbers. They use the EAN field for 13 digit numbers, and the Isbn field for 10 digit ones. This means in your code when building search requests you have to do something along the lines of :
ItemLookupRequest request = new ItemLookupRequest();
request.Condition = Condition.All;
request.ConditionSpecified = true;
request.DeliveryMethod = DeliveryMethod.Ship;
request.DeliveryMethodSpecified = true;
request.ItemId = new string[] { isbn };
request.OfferPage = page;
request.MerchantId = "All";
if (isbn.Length == 13){
request.IdType = ItemLookupRequestIdType.EAN;
request.IdTypeSpecified = true;
request.SearchIndex = "Books";
}
else {
//do nothing, 10 digit ones just work, Amazon designing at its best
//request.IdType = ItemLookupRequestIdType.ASIN;
//request.IdTypeSpecified = true;
}
You might be tempted on the above if statement to have an else that defines the IdType to ASIN, but don't, you'll get no results back.
Notice request.DeliveryMethodSpecified, request.ConditionSpecified? They have these member variables all over the place, basically after giving them a value, you also have to tell them you are giving them a value. These are terribly documented, and really make no sense. Couldn't they check if I sent them the value? The only way you'll know you forgot one of these is that Amazon ignores your request, so if in doubt, search for a corresponding bool field that you can set to inform them you want to set a member variable. They aren't that consistent, you'll notice in the above example I don't need them for everything, so be careful and double check your work.
1 query a second.
Okay, I know this service is free and given Amazon's history of crashing on Harry Potter launches, we all know their data centers are not the most reliable, but being restricted to one query a second is very frustrating when dealing with a bookstore's shopping list. If I have 3,000 books each of which needs 4 titles, I have to send a fairly large number of requests, each of which must be spread out to play nice with Amazon's query rule. I even sent them an email asking if there was some top secret service I could pay for for the right to send queries more frequently, but to no avail, there is now a "System.Threading.Thread.Sleep(1000)" in my code. Ugh, so ugly.
And how do I buy 3,000 books from Amazon?
Well first of all, Amazon.com's shopping cart seems to reliably crash if you have more than 50 books. Yep, Amazon does not want you purchasing too many items from them! I wonder if this is to curb the shopoholics who sneak around Amazon.com at late hours. By building in a natural restriction on cart size, they do the socially responsible thing and keep the orders of rubber ducks to a respectable level.
If you have found a work around to cart size (ie, building lot's of small carts), putting your credit card in to make your payment makes sense, right? Since I'm purchasing used books that is my only option. Amazon.com used to support paying by bank account but recently disabled it so I was forced to use my Visa. I woke the next morning and over my mug of coffee drearily logged into my email....and what did I have the pleasure of finding but 2,955 cancellation emails. Apparently no matter what you try, credit cards companies will not allow you to make a large number of purchases from Amazon.com due to fraud protection rules. I begged, pleased, and blackmailed Visa and MasterCard, but never had a successful order using a credit card. Now that Amazon Payments has launched we might be able to use it, but the jury is still out.
Wait, did you read the above paragraph completely? Did you skip over that number ... that 4 digit number. That is not an exaggeration. For every seller you purchase from on Amazon's used marketplace you'll get an email confirming the purchase. This results in a lot of emails. Even worse, I have a bank statement 4 pages long with entries like "Amazon Charge 4.55". The bank statement does not say for which order it is from, making accounting impossible. Suppose after all of this, I should just have faith that Amazon will bill me correctly.
And with all of my complaints and requests to Amazon I got mostly unhelpful responses. Given I'm trying to give them money by enabling more users to shop Amazon.com, one would think they might be just a little helpful, but maybe they just aren't in the business to make money.
This API is not for the faint of heart. I'm a happy Amazon shopper, and still am despite my disappointment in their API support. This post is overall a long list of negatives, but there are so me fantastic tools that you can build. Having access to a database of books and prices can result in fantastic informational tools. Just don't expect to have much success in using it to purchase books. To be fair, Cart Control is built and usable, but it is difficult not to look back and ponder whether all of those late nights really paid off.
Next for me: Research using an alternative used book reseller for Cart Control. Someone out there must want some more money and be willing to construct a useful process for buying large quantities of used books.
Posted by Socratic Cyborg at 12:09 AM 0 comments
Thursday, August 16, 2007
Don't forget while on vacation .... (politics...)
I usually stay away from political commentary - but this post will be an exception.
Is anyone else bothered that the Cheney fiasco that rose to the headlines in June has all but disappeared, except for the occasional opinion piece.
Okay, I know that the Congress and the president are on vacation, but the issues still need to be discussed!
In June, Vice President Dick Cheney refused to comply with a requirement to provide the archives with documentation meant to safeguard classified national security information. The claim was that he was not part of the Executive Branch and thus not required to oblige.
In his own words: "Well, the job of Vice President is an interesting one, because you have a foot in both the executive and the legislative branch. Obviously, I have an office in the West Wing of the White House, I am an adviser to the president, I sit as a member of the National Security Council. At the same time, under the constitution, I have legislative responsibilities. I’m actually paid by the Senate, not by the executive. I sit as the President of the Senate, the presiding officer of the Senate. I cast tie breaking votes in the Senate. So the vice president is kind of a unique creature, if you will, in that you’ve got a foot in both branches."
Congress threatened to cut his executive funding, but were simply bluffing - and Cheney won the hand. As far as the public is concerned, nothing further has been resolved. Cheney's office is still refusing to operate under the legislation implemented for the executive branch.
Send letters to your representatives in the senate and house. The political power and lobbyists must know that the American public cannot afford to have a potentially rogue politician in the white house, ignoring our laws, and even worse, setting dangerous precedents. What other laws is Cheney ignoring because he feels they do not apply - we'll probably never know, but it is a scary thought.
We wasted an entire congress over the stupidity of Clinton, shouldn't we at least take the time to closely examine the case of a politician that appears to be equally clever at lying, but potentially far more dangerous?
Posted by Socratic Cyborg at 8:54 PM 0 comments
Tuesday, August 14, 2007
7 Wonders and the Future of Computer Science
People say that the field of Computer Science is losing popularity in the colleges because of stereotypes (nerds, pocket protectors), outsourcing, lack of human contact, a distaste for caffeine.
I conjecture that it is something else. Some might call this field a science, but I think I have lost an old argument and it is indeed engineering. Yet, what do engineers do? They more often than not build tangible objects by combining physical materials and parts into something more useful. What do they build? They design and build physical objects - some of which will last for centuries. They take theory and science and apply it to practical needs for humanity.
As a computer scientist my work is not physical, and will not outlive many. Thousands of years from now, humans won't look upon my work pondering it's meaning like we do the writings of ancient philosophers.
Yet, computer science does require the mindset of an engineer, the mindset to build. I don't think though computer science offers the same tangible rewards of other engineering fields that we are losing potential students to. As a mechanical engineer in college you might learn how to use 3D printers and machine a new prosthetic. Civil engineers build bridges and concrete canoes. Electrical engineers build hardware. These tangible devices are starkly different from the algorithms, data structures, and logic flows that computer scientists must busy themselves with.
This is a naive analysis of the situation of you consider the use of software. Without software, countless devices that we rely on today would not exist - from space shuttles, medical devices to the cell phone - but the impact isn't direct. A student of computer science would more than likely never work closely to a physical product. An undergraduate student will be lucky if they design a complete and useful software package in their four years, with most focusing on small exercises, useful and powerful as teaching devices, but far from the experiences other engineering students enjoy.
So the question remains - how do we attract the builders, the Galts into a field where the impact is much less tangible than our Seven Wonders?
I believe this might be a matter of communication to potential students. Software might not be what is studied by future archaeologists, but it will be responsible for the survival and continuation of human life on this planet and hopefully others. It will be the silent hero in preserving quality of life and health - keeping society humming nicely along - so that our other engineering compatriots can continue along building their bridges, temples, and artifacts for future generations to ponder.
Now, just to find a way to convey this crazy hypothesis to enough freshman college students this fall ....
Posted by Socratic Cyborg at 11:17 PM 1 comments
Thursday, August 9, 2007
Google Charges for Additional Storage
Google has announced a new option to purchase storage for gmail and picasa web.
If you are like me, you maxed out your picasa web account months ago, but wasn't willing to pay for storage solely for photos. However, with the ability to convert gmail to general file storage, this new option should seriously be considered.
Here are the prices:
And of course, they use their very own Google Checkout to take payments.
Posted by Socratic Cyborg at 9:50 PM 0 comments
Tuesday, August 7, 2007
Alcohol - A Diversion from the Normal Drink Menu
For those readers in or close to college or high school, you'll know the popular drink is hard liquor. The report gets that right:
Several factors might play a role in students choosing liquor more than other types of alcoholic beverages. First, high school students have a high prevalence of binge drinking, which can lead to acute intoxication (5); liquor might facilitate this outcome because of the higher ethanol concentration. Second, liquor can be combined with other beverages such as soft drinks, possibly making concealment easier and providing a flavor that is more acceptable to younger drinkers.Those drinking young want to get drunk. Why drink a 6 pack of beer when three shots could do the same (ok, these numbers might differ for you).
Now that you read the explanation, read the CNN interpretation.
Notice that the only reasons they draw from the report are " Beer cheaper, easy for adults to get; teens may filch liquor from home". Shoot, they hardly even mention the fact that teens want to just get drunk (Technically there is one sentence in there that hints at it, but they gloss over it.). Talk about bad reporting. Makes you wonder why CNN decided to exclude that aspect of the study. Suppose they decided to go for the "make parents feel guilty and lock the liquor cabinet" angle. Shoot, they didn't even provide a link to the original report from the CDC which I'll happily do - must have not wanted anyone to check their facts....
Ok, I never promised I would only talk shop. I did go to a liberal arts college.
Posted by Socratic Cyborg at 8:34 PM 0 comments
Saturday, August 4, 2007
Admissions and Solutions
After years of denial, closet programming, and terrible guilt, I must confess. I'm a closet Visual Studio 2005 and asp.net developer. Mind you, I would be shunned by my peers at my day job if they knew, but I needed to tell someone, so I decided what better than to scream it out to the ether. I think I can safely blame this habit to a group of professors at _____ University. I'll leave them anonymous - but it was a largely Microsoft loyal program with lots of free software to get you hooked.
So yes, from time to time I might make a post about my adventures with Visual Studio. Sadly, most of them will likely be work-arounds to common, but frustrating, bugs most ASP.NET developers will stumble upon. Hopefully, I can save the rest of you some pain and share some knowledge. As you'll find over time, this blog will have an eclectic mix of posts - from reviews, commentary, to tricks and best practices discovered in the wee hours of the morning. So sit back, grab a glass of wine or caffeinated beverage, and enjoy.
So my inaugural VS blog post!
Suddenly can you no longer re-configure Object Data Sources? Unable to upgrade VS with SP1. Get the following random error message:
Error invoking 'Configure Data Source...'. Details: Could not load file or assembly 'nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system cannot file the file specified.
Steps to Reproduce:
- Add the tag for an ObjectDataSource to my aspx source (Visual Studio 2005)
- Switch to Design Mode
- click the ObjectDataSource Tasks - "configure Data Source..."
- Error Message Appears in an "Ok" box -
This seems to have begun after patches released in June or July. The problem is related to DLL's imported in your BIN directory of a web project. My problem was solved when I added a nunit.framework.dll to my project (Google Checkout uses this, and it used to not be required, but maybe SP1 changed something making it required).
Of course, why a missing resource (one that isn't required to run the application) suddenly has become required, or better yet, causes IDE crashes instead of run time or compile errors beats me, but I have learned years ago to ignore the desire to ask questions and accept solutions to Microsoft bugs without fully understanding the "how" and "why". For thousands of years philosophers have asked questions without answers: "What is good?", "What is truth?", "Does God exist?" ... we may now add ... "Why did Microsoft do it that way?". Just another "feature" in Visual Studio I suppose.
Posted by Socratic Cyborg at 12:19 PM 1 comments
Friday, August 3, 2007
Amazon Payments
Amazon has launched Amazon Payments today and a beta of their API.
This solves one big problem - for months Amazon has disabled their "Pay by Bank Account" feature due to supposed problems with their payment provider. This method was the only means to purchase a large number of 3rd party items, as Visa would mark them as fraud.
And of course, they offer yet another choice for developers between Google Checkout and the new Amazon Checkout API for web developers.
Posted by Socratic Cyborg at 7:20 PM 0 comments
Thursday, August 2, 2007
Instant Translations for any website using Google Translate.
Interested in adding translations to your website, but don't want to hire translators. Google Translate has a service that will translate your website for you. Simply add a drop down that points users to Google Translate and magically, your users can access the translated version!
The easiest way to generate the urls is to just go to http://translate.google.com and use the service to translate a website. You can then copy the url you are redirected to into the value of your option in the select dropdown.
If you copy and paste the below code to your own site, you'll find it redirects you to a translated version of digg. So become an international site overnight and add this to your site!
<script language="JavaScript"><br /><!-- function goto(form) { var index=form.select.selectedIndex if (form.select.options[index].value != "0") {
location=form.select.options[index].value;}} //--><br /></script>
<form name="form1">
<select name="select" onchange="goto(this.form)" size="1">
<option value="">-------Choose a Languag -------</option>
<option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Car&hl=en&ie=UTF8">Arabic</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Cde&hl=en&ie=UTF8">German</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Cpt&hl=en&ie=UTF8">Portuguese</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Czh-TW&hl=en&ie=UTF8">Chinese Traditional</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Cru&hl=en&ie=UTF8">Russian</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Ces&hl=en&ie=UTF8">Spanish</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Cja&hl=en&ie=UTF8">Japanese</option><option
value= "http://translate.google.com/translate?u=http%3A%2F%2F
www.digg.com&langpair=en%7Cfr&hl=en&ie=UTF8"> French
</option></select>
</form>
Posted by Socratic Cyborg at 9:54 PM 1 comments