malloc();

taking up more space on the interweb

  Home  |   Contact  |   Syndication    |   Login
  13 Posts | 0 Stories | 0 Comments | 7 Trackbacks

News



Tag Cloud


Archives

Post Categories

Image Galleries

code

comics

gadgets

tech

Monday, August 20, 2007 #

CodeCamp at FootHill College.  Click Here for Details and Registration

Time to register again for this years Code Camp.

 

 


Monday, July 09, 2007 #

Back in February we (me and one other co-worker) started on a new project. We were both very excited about the project (and still are) so we needed to come up with a great codename.

Since we were both Transformers fans as kids we named all the different components after Transformers characters. And now in July we are almost done with the project, so today we all went to the noon showing of the Transformers movie.

Mini-movie-review: if you can get passed the GM advertising, it is an excellent summer action blockbuster movie.

Was a great break from work, and also great to know your work is appreciated. But now that the project is coming to the end, the worst part is approaching. We will have to start calling it by its "public" name and can no longer complain about bugs in Snarl, Grimlock, or Unicron.

If your in the Bay Area and looking for a new job and like .NET, TDD, Transformers, and wants to work with web services and/or financial data you should get in contact with me.

 

EOF


Sunday, June 10, 2007 #

I already had the book xUnit Test Patterns: Refactoring Test Code on my Amazon wishlist. But after reading Sam Gentile's xUnit Test Patterns and evolving TDD and test automation post today about the book and its topics I've decided to go ahead and order it now. I still have 3 books that I am currently reading ( 1, 2, 3 ) but this will jump to the front of the line when it arrives.

 

EOF

Technorati tags: , ,

Here is a simple example, lets try and find the following address: 240 St. Joseph Ave, 94115.

Live Maps / Live Local / Local Live / Virtual Earth finds it with no errors or warnings.

Yahoo Local Gets the right location after using the closest match "240 Saint Josephs Ave, San Francisco, CA 94115".

Web 1.0 Mapquest can't find the address but it does suggests the correct location.

Ask Maps & Directions can't find the address but focuses the map on the correct zip code.

Google Maps can't find the address, the closest possible match is someplace in Missouri.

 

I believe that all these mapping sites get their data from the same place, NAVTEQ, but some are better than others at using that data.

 

 

EOF


Saturday, May 26, 2007 #

Thanks to Andrew Stopford and everyone else who works on MbUnit development. MbUnit 2.4 was just released.

If you are not unit testing or practicing TDD in your projects, I don't know how you could choose plain old NUnit over MbUnit. If you are using regular NUnit it is very simple to convert your projects MbUnit, they use the same [Test] attribute.

MbUnit has:

  • Row Testing:
    [RowTest]
    [Row("Hello")]
    [Row("Goodbye")]
    public void TestString( string myString )
    {
        // do your tests in here...
    }
    More row testing details here.
  • Specialized Assertions
  • Database rollback. The unit testing gods say that there should be absolutly no DB access in unit tests, but there are some times when I cannot avoid it. With the rollback attribute I don't have to worry about cleaning up the database after my test runs
  • Being able to test private methods. (see Vadim Kreynin's articles here and here). *
  • Extract Embedded Resources With An Attribute In MbUnit. No more dealing with test file directories or setting the correct path in the [SetUp] methods!
  • RepeatAttribute. Run a specific test multiple times in a row.
  • ThreadedRepeatAttribute. Run a specific test on multiple threads.
  • etc. http://www.mbunit.com/ for all the details.

 * I have been using the InternalsVisibleTo assembly attribute to accomplish this for a little while now. It gets the job done nicely and has allowed complete separation of our unit tests into a separate assembly. It does require you to change method signatures to internal instead of private, OO purists might feel dirty doing this. Derik Whittaker had a good example on how the attribute should be used.

EOF

Technorati tags: , , ,

Thursday, May 24, 2007 #

More than a month ago I wrote a post about trusting software and what it tells you. I ended the post on a tangent about farecast.com and if I was going to trust it with its prediction.

I have been keeping track of the prices listed for a flight from San Francisco, CA to Newark, NJ and their confidence value since then. You can check out my graphs below, Blue == Confidence, Orange == Price. You can click here to view the price graph on their site, but they do not show their past confidence levels.

confidenceprice

Well it looks like distrust (untrustingness? disgustingness?) seems to have paid off. On 4/9 the price was $348 and a confidence of 80%+, and as of today the price is $443 with a confidence of 58%.  A $100 price increase in a month, and all the time their confidence is pretty high telling you that the price will be dropping.

On 4/22 I bought my tickets, for $373.80 after taxes and fees. I did not use Farecast to buy the tickets, I used Priceline, and I am happy with decision to buy then. I will continue to follow the standard advice: buy plane tickets as early as possible for the cheapest tickets. Hope this information helps some people out there.

EOF


Tuesday, May 01, 2007 #

 Anyone visiting digg tonight was definitely in for a surprise. There are a few (hundreds? thousands? tens of thousands?) users that are angry with digg and their decision to take down a post earlier today. The post that was taken down contained the HD-DVD decryption key that can be used in Linux to watch HD-DVD movies. The original submitter has his story in more details here.

The users have now flooded digg with fake stories, each one attacking digg's decision to remove the story/key, and also publishing the key hundreds of times in the story and comments.

  • Is this the beginning of the end for digg?
    • I doubt that. If you remember digg really became popular when Pairs Hilton's cell phone address book and pictures were released onto the web. That drew a lot of hits to their site, this will do the same.
  • Do I agree with what the digg admin did?
    • Sad to say, but yes and no.
    • One part of me knows that it is digg's site, the content of the posts are on their servers using their bandwidth, they have a right to restrict it how ever they want. They have to worry about being sued and losing their funding from investors.
    • Then the other part of me wants stick it to DRM and the MPAA and go write some script that will auto digg up and post that contains that HD-DVD key in it. 
  • Will the users really leave?
    • This is the hard one (which is why I left it for last).  My guess is that some will stop posting, digging stories, and being as active on the comments; but they will still read the stories as they come in on their rss feed.
    • Others will not change their digging at all, they were just along for the ride. Mob mentality is always fun.
    • There will be a very small number that never return to digg again. If only because there is still no good competitor or rival where you can get the broad range of news that is 'AMAZING', or 'GREATEST * EVER',

  

Tomorrow will be an important day, lets hope that digg does not do a
DELETE FROM stories WHERE text LIKE '%09 F9 % 88 C0%' or text LIKE '%09-F9-%-88-C0%'
I hope they leave every single post up there, with the number of diggs they received, as a reminder that their site is dependant on their users. That this can easily happen again, and that if they anger enough users, the site will suffer.

EOF


Saturday, April 14, 2007 #

Thanks everyone at GWB for the free hosting, and for dealing with a long 6 hour upgrade to the subtext blog engine!

 

EOF


Monday, April 09, 2007 #

When you first use a new piece of software do you trust it right away, or does it need to earn your trust? The same goes for the code you write, are the kind of person who just re-reads some code and says "it will work" or do you doubt yourself until your unit tests are complete and all passing?

I'm the untrusting type, and when it comes to my code I rarely trust my unit tests at first. If I can't write perfect code on the first attempt (like all people), how can I think that my first attempt at testing that code would be perfect?

Some software I trust: Money, TurboTax, and Outlook. There are some things that these three apps have in common: they are desktop apps, they handle sensitive data, and they work both online and offline. When it comes to trusting web apps, I am must less trusting. There are still too many possible problems that happen with web:

This brings me to Farecast. A relatively new website that claims that it can tell you the best time to buy airline tickets be studying historic price fluctuations in ticket prices to and from certain locations. As someone who has to make 5 trips back to NY this year (3 weddings, a graduation, and Christmas), I am visiting this website daily. Here is a screenshot of Farecast from today's search.

It wants me to wait for these tickets, but should I trust it? It does have the very popular 'Beta' tag on its logo, so that gives it free reign to make mistakes and say "It is Beta software, what do you expect". I will continue to check the site for these tickets for another week or so. Who knows, maybe after that week I can add another piece of trusted software to my list.

 

EOF


Thursday, April 05, 2007 #

My team has been working on and off all week trying to find out why one of our windows services was crashing at the same time every day with a very unhelpful eventlog message.

Like all good errors, a search on the error message returns many results where people get the same message but for a bunch of different reasons and where many of the search result threads are left unanswered.

This service was first developed in .NET 1.1 way before I joined the company (only 5 months ago). It had been running without crashes on a Windows 2k machine for years. Now that we are finally throwing out our 2k systems we have migrated all our 1.1 code to 2.0 and running them on Win2k3.

So what does this service do? It is the final step in a data stream processing system. Here is a quick graphic to display the flow:

As you can see, this service does the easy part of the process. Read from the MSMQ, spawn a new thread (thread pooled) for each message to take the SQL string value, connect to the DB, and execute the SQL. The thread does those simple steps and then dies off. The main thread continues to wait for new MSMQ messages and spawn new threads as they come in.

At first look of the code there was nothing obvious wrong. No "important" code missing try's or catch's. And all of the try/catches has logging code to tell us (using the eventlog) if anything goes wrong. However, the eventlog would only have the '.NET Runtime 2.0 Error Reporting' message after the crash and none of our messages.

After looking closer at all of the code, we found the problem. Here is a snippet of what ended up being the problem code. It is code that runs on the worker threads from the thread pool.

   1: Public Class DumpInThread
   2:     Public Query As System.String
   3:     Public Message As System.Messaging.Message
   4:     Private objConnection As System.Data.SqlClient.SqlConnection
   5:     '======================================================================================
   6:     Public Sub Dump(ByVal StateInfo As System.Object)
   7:         Do Until GetNewConnection() = True
   8:         Loop
   9:         InsertMessage(Query)
  10:     End Sub
  11:     '======================================================================================
  12:     Public Function GetNewConnection() As System.Boolean
  13:         Try
  14:             objConnection = New System.Data.SqlClient.SqlConnection("SqlServer")
  15:             objConnection.Open()
  16:             Return (True)
  17:         Catch Exception As System.Data.SqlClient.SqlException
  18:             SharedEventLog.WriteEntry("Could not obtain connection " & Connection & ":" & Exception.Message, System.Diagnostics.EventLogEntryType.Error)
  19:             objMessageQueue.Send(Message)
  20:             Return (False)
  21:         End Try
  22:     End Function

Look here (or just continue reading) to find out what we first realized. SqlConnection.Open() can throw either a a SqlException or an InvalidOperationException. To me, it makes more sense for a SqlConnection to throw a SqlException if it cannot connect to a DB, not a generic exception like InvalidOperationException. We changed the catch so it will also catch the InvalidOperationException. This stops the threads and therefor the process from crashing.

The second thing to realize is that this InvalidOperationException is not new to .NET 2.0. The .NET 1.1 api docs say that the SqlConnection.Open() throws an InvalidOperationException. This code has been incorrect since the day it was written. One thing that has changes between 1.1 and 2.0 has been the handling of threads. In 2.0 if a thread has an uncaught exception it will crash the entire process instead of being quietly swallowed.

"But didn't you say the process crashed at the same time every day, how does that factor into the fix?" Yes this process would crash daily at 2:14pm, and after all of this I still have no idea why :-). We could not find any jobs using the same DB at this time that may have caused a connection to timeout. There is not a large burst of messages at that time, it is actually one of the more quieter times in the day. But I know that the new catch block fixes the crash, and makes the code much more reliable then it has been since it was born.

 

EOF


Wednesday, March 28, 2007 #

Like most people I have multiple accounts with the big three email services (Hotmail/live, gmail, yahoo). For my older Hotmail accounts, I still have the ability to use Outlook to connect to them for free. Gmail gives POP access, and reads everyone’s email, so my gmail accounts are setup in Outlook. Yahoo gives me nothing.

Can you guess from the previous paragraph which accounts I use more? I like Outlook, I use it more than any other app. It holds my to-do list, my shopping lists, my current tasks, calendar, contacts, etc. Always syncing with my HTC Apache, always syncing with the exchange server, always having its PST's and OST's backed up to both the Windows Home Server (on-site) and to Mozy (off-site).

For me to use an email account seriously I need to be able to have it show up in Outlook. That lets me have my emails backed up and archived with the rest of my emails. It lets me search over them using Windows Desktop Search. It lets them get pushed to my phone. It lets me easily forward them to other people using different email accounts, which is key when you have certain emails for certain tasks. Bringing these emails into Outlook makes them truly exist to me.

Yesterday Yahoo announced that it will soon offer unlimited email storage, excellent news for all people who use Yahoo mail. But today the news that the Yahoo Mail APIs, both SOAP and JSON will be free and available to all developers. This is very cool good news. First because Yahoo is still supporting SOAP web services, unlike others, and hasn't been completely overrun with web 2.0 madness. But secondly because this can (and hopefully will) bring in a lot of new developers to code against their API. T

I can't wait until someone writes a nice little .NET Outlook add-in that can connect to Yahoo and make it seem like Yahoo mail is being accessed through POP or IMAP. Have access to the storage of unlimited emails through Outlook and Desktop Search. I hope I don't have to wait for too long, because that is the kind of project that I might add to my list after my current one is completed.

Related URL: http://jeremy.zawodny.com/blog/archives/008785.html

EOF


Saw this at the latest Bay.NET user group meeting. Might as well start this blog off with something already popular.

EOF


They all have to start someplace. So as I sit here watching Lost I finally decided to start blogging after reading thousands and thousands of blogs over the past 3 or 4 or more years

Living in the Bay Area means I'm currently in the center of the web 2.0 bubble. It was great when I was searching for a new job 4 months ago. I currently work for a startup ( I'm employee #6 ). We are doing a lot of cool things with .NET, web services, SOA and SaaS. There might even be a developer community around the things we've built soon. I like working on developer tools/APIs, because it is one of the few places I can say I understand the audience. 

If this blog doesn't end up an abandoned blog I hope to write about some of the following:

  • .NET (C# and VB)
  • mobile devices and .NET CF programming
  • Web services
  • WCF
  • WPF and/or WPF/e
  • Unit testing / TDD
  • CI with ccnet
  • source control with subversion
  • bug tracking with Trac
  • general tech stuff
  • general web 2.0 hype

 I'm not a big gamer, as I'm sure my gamerscore shows, but I'll throw my gamer tag up her anyway. My favorite game still remains the original ToeJam & Earl for Genesis.

 

EOF