Tania Kaufmann new work Magnolia Theatre Gallery

by andrew 7. June 2009 17:14

Artist Tania Kaufmann is showing new work at the Magnolia Theatre Gallery on Thursday, June 11.

Aside from TK being an amazing artist, the Magnolia has a great little bar and you can catch a movie while you’re there.

 

Tags:

Netflix Custom Control

by andrew 26. May 2009 19:30

Everybody who has an account wtih neflix has access to some Personalized RSS feeds.  They are available here, once you have logged in.

I wanted to consume these feeds, and show what movies I'm watching so I went looking for an ASP.NET control which could do this but didn't find any.  I could have just used RSSDataSource for this, but I decided to write my own control to follow the DotNetBlogEngine convention of creating custom controls. I used SyndicationFeed class to load the XML from the WebResponse (as opposed to parsing the raw XML), then I just iterate over each of the SyndicationItem -- nothing fancy.  Althought I will consider turning this into a templated control, and parsing out the arbitrary HTML that appears in the Description field of each item at some point, if that is helpful to anyone.

I also discovered a helpful addon called FeedProxy, which works around Firefox's feed preview. You use FeedProxy as your Application Action for Web Feeds, and you get the actual XML in our browser window.

You can see the result below my Twitter updates.  The current code for this control is here.

Exception: Stack empty.

Interesting problem: Detecting random input into free-form fields

by andrew 18. May 2009 07:38

I had an interesting requirement for a website: Prevent a user from entering random text/garbage into a web form. They even provided a list of data that had got through (ex. “XXF”, “djfhfhfhf”, “asdf”, “John Doe”, etc).

So I thought about this problem for a while. I did a bit of research to see which direction to look in. There is a lot of material on generating randomness, but most of the focus on detecting randomness is on repeatable processes like random number generators that can be run over and over again to produce a sample set. In our case, we only get one sample, which is simply what the user enters when they submit the form.

In then end, I looked at the samples of random garbage I was given, and though about what the person probably did when they entered it into our form. I came up with the following rules, taken in combination, to flag a word as random garbage.

 

  1. Ratio of vowels-to-consonants and its inverse cannot exceed 0.16. This rule catches words that have too many vowels and consonants in them to be phonically useful (ex. “akdjfsa”, “aeiouux”)
  2. Obviously, edge cases involving words which are all vowels or consonants are also caught (ex. “aaaaaa”, “bbb”) The idea behind this rule was that people tend to use just a few keys on the keyboard to generate a random word.
  3. Ratio of unique-letters-to-total-word-size cannot exceed 0.4. (ex. “dfffdf” would fail because there are 2 unique characters used, ‘d’ and ‘f’, to make a word of size 6. 2/6 < 0.4) This rule tests to see if the word was created using the same keys in combination. In some ways this is an extension of rule 1, to catch cases where an acceptable mix of vowels and consonants was used (ex. "akkkakkaa") but the word doesn't have enough "variety" of letters to make phonic sense.
  4. All the characters in the word are positioned beside each other on the keyboard. This was the hardest of the rules to implement, since keys on a keyboard don’t line up top to bottom. The goal was to catch words generated when a person just mashes their keyboard with one hand. I think this is also the rule carrying the least weight, since lots of valid words would violate it (ex. “fred”).
  5.  

    I chose to combine rules 2 and 3 together, for a total score out of 2, where any word scoring less than 2 was considered to be valid (not random).

    Obviously these rules are limited at catching all cases of randomness, and are especially ineffective if the adversary explicitly tries to defeat it by entering an actual name (ex. “Curious George”, “Darth Vader”); However, their false acceptance rate seemed like it should be fairly low (so as not to penalize people with slightly obscure names). In my tests, only about 20% of random input provided to the tests was caught. When I ran the tests against first and last names of people in our database, a very small number (< 0.001%) were caught, and upon visual inspection, all of these were random garbage, not actual people's names.

    I’m interested in seeing how other people have tackled this problem.

Click here to try some input into the test.

Tags:

Where are they now?

by andrew 23. April 2009 04:46

I enjoy the articles put out by pcworld.ca.

Many of them are history lessons on technology, which I think are important to know where we’re going.

Here are 25 computer products that refuse to die.

MS DOS still around and kicking

Tags:

Stop Motion Mandala

by andrew 25. March 2009 05:27

Last year I attended a really fantastic event in Austin called MakerFaire.  Me and Jenni camped in our new REI tent, and spent two days playing around with electronics, crafts, games and robots.

At one booth we created a stop motion video using found objects, which was recently posted at Anda Mandala.

Apple II Crack Screens

by andrew 21. March 2009 19:25

I came across this set of splash screens from hacked computer games of the early 1980’s.

I played a few of these games growing up, on an Apple II+, and these were a nice throwback to those days.

 

Tags:

Thoughts of a newly Certified Microsoft Techology Specialist

by andrew 4. March 2009 02:31

Yesterday I passed Microsoft exam 70-562, which covers .NET Framework 3.5 and ASP.NET Application Development.  It was a bit of a relief to finally get this done, since completing the base exam 70-562 almost two years ago.  Now I actually have something to show for all this work: I’m officially a MCTS.

I have mixed feelings on these exams.  On the one hand, I feel that its important for developers to stay on top of their field.  Often we go through cycles where we are only using a small subset of our knowledge on the problems at hand, so its important to keep up with advances in other areas should the need arise to make use of them.  There is also the broader issue of the lack of standards for software designers and developers.  Our field is riddled with bad programmers who are only in this for the money and are ultimately making life difficult for the rest of us who love technology and would do this stuff even if it paid a fraction of what it does.  One potential way of eliminating these people from our lives is by ensuring that there is some common measure of commitment.  In theory, if all the good companies who are doing all the cool stuff require you to have up-to-date certs, then they will hire less of baddies, who will go work for crappy companies that don’t require it.  Obviously there are holes in this logic, and I don’t think certs are the ultimate answer to the problem, but its a start.

On the other hand, its easy to make the argument that the tests are ineffective in truly gauging our abilities.  Indeed, you can guess or infer the answers to some of the questions with knowledge of how Microsoft structures its APIs (see one of my hints below).  I would also say that Microsoft’s training related website is overcomplicated, and the materials (books, free online tutorials) available for training are not very sufficient or effective (I can’t comment on pay-per-use or in-person training sessions however, as I have never attended any).

Philosophical analysis aside, for those of you looking to do an exam, here are some hints

  • 70-562 is actually an augmentation of 70-528, covering whats in ASP.NET 2.0. I would say the mix on the exam was about 70/30 old stuff to new.  The MCTS 70-528 training kit is still very relivant, and I actually found it more helpful and less full of fluff then Esposito’s newer ASP.NET 3.5 book.
  • While an understanding of the language (C#/VB) you intend to write you exam in is required, knowing the latest language features (annonymous types, linq, extension methods, etc.) doesn’t seem to be needed for this exam.  Way more emphasis is put on knowing how the ASP.NET Framework and IIS work rather then unique language constructs.
  • Some of the new stuff you should know includes new controls like the ListView , MultiView , ScriptManager , and UpdatePanel controls. In particular, really know how UpdatePanel works, how nested UpdatePanels work, how to make sure of the ChildrenAsTriggers property and so on.
  • Know how ASP.NET AJAX Javascript libraries work.
  • Know the difference between Bind and Eval.
  • Know page lifecycle — which events (Init, Load, etc.) are handled by a page, in which order they are handled, and what is possible when each event fires. This is a lot harder to guess if you don’t know, but if you do know its an easy hit.
  • You are bound to get a question which boils down to, “Here’s some code. What should you insert at line X” and the choices vary by a single property, none of which you’re familier with.  Take a deep breath, read the question two more times, and then look at each property and think about which one looks the most right to you and go with that. Look at how the properties are named — property names are generally self descriptive, so you should be able to infer what each property does by its name.  Insert each at line X in your mind and think about which one seems the most right.
  • I bought the MeasureUp materials; I am terrible at taking tests, so being able to practice taking a test was really helpful to me.  If you have a photographic memory, you might not need this as much.
  • Once you purchase your exam from Prometric, set a reasonable date and stick to it.  I kept pushing the date, always finding excuses not to write this week, which was really about not commiting to a schedule for getting through the material.
  • During the exam, use all your time, and don’t rush.  Take a break half way through and get some water.  These are of course obvious general test taking practices which people tend to ignore or forget.
  • Microsoft has a second shot promotion so if you do screw up, you get um… a second shot!

First WCF Service

by andrew 22. February 2009 18:10

Wow its been more then a month since I posted anything.

Well, I *have* been busy.

In January, I helped paxUnited get started with a new website driven by CMS mojoportal.  My team’s project got blogged about by the creator of mojoportalJay Smith also has some details of the project and pictures.

Recently, I’ve been working on a learning WCF, and as part of that creating my own multiplayer game service.  The game I chose is the italian card game Briscola, an old favourite of mine.

I started by first writing a class library assembly that would contain the objects necessary to play the game according to the rules.  Then I designed a WCF service which would augment the core library and expose it as an Interface.  I chose the wsDualHttpBinding binding, which basically enabled bi-directional communication between client and server byway of an additional Interface which defines callback methods which the client implements.  Its just really really cool stuff, as I remember the headache trying to do something like this back in the day with DCOM or (*gulp*) sockets.  Anyway, I build a really simple command-line application with consumes the service.  With a few clicks I had class BriscolaClient : System.ServiceModel.DuplexClientBase<IBriscola> defined, and just had to write a class to implement IBriscolaCallback.  After working out a few bugs,  I had two client windows connecting to the IIS hosted service and working great!

Now, I have uploaded the service to my Web Hosting Provider here, but unfortuntaly most people wouldn’t be able to connect to the service because firewalls would prevent them (in fact my own did until I told it not too).  In any case, this is just a first step, and I consider the wsDualHttpBinding to more applicable to an intranet scenario.  Nonetheless, I indend to proceed with this project.  My next step will to be build a basic SOAP web service around the game, and I’m also currently reading an interesting book called RESTful .NET which may lead me in the direction of exposing the game byway of REST and JSON.  In any case, the ultimate goal is to leaverage the service in some platforms which are unfamilier to me, such as iPhone and facebook applications, so that I can come full circle and learn some new languages (Objective-C/PHP) along the way.

Also, the shortlist of features includes

* Again, expanding the service endpoints for support for SOAP WS-* and REST

* Integration of some sort of membership (username/password) to set up a game player profile

* Persistance of game data in a database

* Looking to get this up in the cloud (via Azure or some other host), for instant scalability.

MSDN Developer Conference

by andrew 9. January 2009 04:27

I’m attending the MSDN Developer Conference at the Westin Galleria on Monday, Jan. 26, which is sort of a mini-pdc covering topics in the areas of Azure Services Platform for Cloud Computing, Client and Presentation, and Tools, Languages and Framework.

My top sessions choices are:

  • ASP.NET and JQuery
  • Developing and Deploying Your First Azure Services
  • A Lap Around the Live Framework and Mesh Services
  • ASP.NET 4.0 Roadmap

Hopefully one of my colleagues can attend Building Business-Focused Applications Using Silverlight 2 and share the experience because I have an interest in learning silverlight after my brief, poor experience developing an mp3 music player in flash for Jessica Clemmon‘s site.

 

Tags: , ,

Volunteer Developer

by andrew 6. January 2009 06:51

I decided to sign up to volunteer for a good cause as a developer for the The We Are Microsoft – Charity Challenge Weekend.

“This 3-day event matches developers with charities to develop applications for those charities. At the end of the 3 days, all of the participants will vote and the winners will be proclaimed champion coders., to help local charities with some website work.”

Tags


BlogRoll


Search


Twitter updates

Netflix movies at home