Archive

Archive for May, 2011

Lenovo comparisons

May 25, 2011 Leave a comment

The other day my parents were talking about getting a new computer. I wanted to see which deals I could get through work and discovered that the only deals were through HP, Dell and Lenovo. I’ve seen so many problems with HP and Dell’s consumer products I’m never going to purchase them myself leaving only Lenovo. I go over the their website and am actually impressed with the computers they’re offering. Something which computer makers do to differentiate their computers from their competitors is add additional software to help users manage their OS. On the internet this software is known as bloatware or crapware, because it tends to get in the way more than actually helping. Something which caught me by surprise was the Lenovo was not only advertising enhancements to their computers, but they would actually put it only on the more expensive models and had video’s and chart’s showing how it would improve the computer experience. This stuff might actually help (and therefore be worth paying for).

Sadly though, Lenovo’s website didn’t help me find a computer model the way I would like to find it. There’s a page that shows some comparisons between the different form factors, but then you have to drill down into the form factor series to look at comparisons between different versions of the series. I couldn’t find a way to compare a specific version of a specific series to a version on another series. It made it somewhat difficult to see exactly what I would be getting for the different dollars spent on the different models and series. Not impossible, just more difficult than what I would like.

To find out if the fancy Lenovo features are worth it I’ll have to do some more research to see if I can find reviews and opinions from non-Lenovo sources. Lenovo is trying to sell these things, they could be trying to pull a fast one. I’d hate it to pay a couple extra bucks for some software that I endup disabling because I find that it gets in the way. Either way, their website did a good enough job on selling to me the idea that I’m going to put some effort into finding out what I think would be worth it.

Microsoft shouldn’t announce Phone updates so far from release

May 24, 2011 Leave a comment

Today Microsoft announced the Mango update for Windows Phone 7. It’s scheduled to make to actual phones some time in the Fall. I think it was a bad move for Microsoft to make this announcement months in advance of the actual update. The reason is because they should have learned from the infamous “January” update that it takes months longer than anticipated to get updates through the carriers. In the months between now and the announced release the consumers are now going to be in a constant state of “I want that update”. Which for a while is good synergy, but it quickly turns into bad feelings if they’re in that state for too long. Then the inevitable delay will happen, which will cause the frustrations to grow by leaps and bounds. It’ll get to the point where there will be customers who say “Never again, I was so frustrated with that.” Whereas if they didn’t know about the update in the first place they would have been satisfied with what they had.

I think I understand why Microsoft has done the announcement this far out. The first reason is because they want to give developers time to make use of the new features. That way when the update is shipped there’ll be a slate of new apps that can take advantage of it right away. It creates a positive wave of improvements when the OS update actual is installed on the device. One of the problems with this is that there’s no guarantee that developers will have the updates to their apps ready. They may be waiting till the update begins making it to the actual end user phones before putting resources into updating their individual apps.

The second reason Microsoft has done this is because there have been times when they’ve surprised the world with a product (.Net being an example) and business complaining that they weren’t given enough heads up. Because if they had known earlier about the new product, they wouldn’t have made some recent planning/purchasing decisions. Microsoft is trying to extend this to the consumer marketplace. Buy a WP7 now, and in a few months it’ll be what you wanted it to be in the first place. This will only result in frustration though because it’s not going to happen fast enough from the consumers point of view.

I think that Microsoft should announce the phone updates after at least one carrier has approved it and will start pushing it out within the month. That way, there’s less frustration from the “why isn’t it out yet” feeling and since Microsoft is trying to build a brand instead of one-off product, it would be better for them in the long run.

I’m leaking objects, but all of the GC Roots point to a WeakEventTable

May 20, 2011 Leave a comment

Recently my team ran into a major performance problem where we were leaking every object in our code. The code is C# and the visuals for the data are done in WPF. Every tool at our disposal pointed to the same fact, all of the objects were being held in memory by a WeakEventTable. It was so odd, one would assume that the type WeakEventTable wouldn’t have the ability to hold onto objects, but it does. It’s the global table mentioned in http://support.microsoft.com/kb/938416. Have you read the KB article? Does it make sense? It doesn’t for me either.

Given how easy it is to create a WPF object which then gets placed in a global table (as described in KB938416) one would think that Microsoft would create tools for detecting this. As far as I can tell they haven’t. This would be a perfect issue to have Visual Studio find with the Code Analysis tool. Warning: You’re going leak everything. I can’t imagine why anyone would ever want an object to live indefinitely, unless they intentionally put it in the global table themselves. It’s so bizzare.

It’s very frustrating how KB938416 is considered by design. It may be by design at the language level, but it shouldn’t be at the tooling level.

May 2011 update to IP Address block list

May 17, 2011 1 comment

The original list of IP Addresses which I block can be found at https://jader3rd.wordpress.com/2010/12/22/ip-addresses-advertisers-use/. I have updated that list as follows:

Added:

12.129.210.71

64.214.232.204

65.55.116.184

69.192.197.115

69.194.244.11

72.14.231.101

72.14.213.148 – 72.14.213.149

72.14.213.154 – 72.14.213.157

72.14.213.164 – 72.14.213.166

74.125.224.58 – 74.125-224.60

74.125.225.27

74.125.95.113

74.125.95.154 – 74.125.95.157

96.17.15.105

96.17.15.136

96.17.69.26

209.196.28.156

209.85.225.164 – 209.85.225.167

Removed:

63.80.4.0/24

217.23.5.233

The reason why I do this is because it makes for a better browsing experience. Plus I get a certain sense of satisfaction when I use my technical skills to figure out what I wanted filtered and what I don’t want filtered. The IE9 F12 tools have been a decent help in this process. I also use the no tracking feature in IE9, but it doesn’t have a way of pointing out where the annoying adds came from, so I’m less inclined to use it.

Bing Maps Streetside shows more data

May 16, 2011 Leave a comment

I don’t know when this happened, but over the weekend I checked out the Streetside feature on Bing Maps, and it’s changed. The first thing that surprised me about this is changes like this are usually accompanied by press releases and I’ll pick up on them through the different tech blogs I follow. I did not see this change coming. In all fairness Streetside on Bing maps isn’t something one turns to regularly due to how few streets it actually covers. That may be due to the fact of the emphasis on Birds Eye view (http://blogs.forbes.com/quentinhardy/2011/04/27/bing-maps-aerial-victory/), a feature I do take regular advantage of.

When Streetside was first released it had a certain “wow” factor to it. Moving from one scene to the next involved transformations that had a morphy, photosynthy, look to them. It was also useful when helping my wife with driving directions because I could take her to the exact spot where she’d need to turn, and hopefully by seeing the view first on Streetside she’d have a better chance of finding that point when actually going there. The current Streetside has less of a “wow” factor to it. There aren’t cool, visual transitions, but I have a feeling that it’s much more useful.

The way it looks now is instead of being immersed in a 3D world, you have a choice of looking at the street from only two angles. You can only look at one side of the street, or the other, not down or up the street. The views of the sides of the street are much more panoramic, which resulted in some dead space, which is now taken up with more information. There’s now a much larger street map, so you can see exactly where you’re looking, and under the different buildings it lists what the building is. So now instead of hoping you can make out the sign on the building, there’s easy to read text beneath the picture. Adjoining streets are also pointed out in a clearer fashion, similar to the buildings.

Overall I’d say it was an improvement. Hopefully the Bing team will be able to figure out a way to give it the “wow” factor back. My idea would be to add it as a zoom level. Someone transitions from Map, to Birds Eye, and can keep on zooming into Streetside.

How I came around to accepting the financial bailout

May 15, 2011 Leave a comment

Through a series of acts, in 2008 the U.S. Federal Government bailed out the financial industry (and threw in the American auto industry for kicks and giggles). One of the major motivations for this was that if the entire industry were to collapse it would be an unmitigated disaster for every part of the American economy. While I understood that it would be bad, I still didn’t like it. The free market capitalist in me loves survival of the fittest and feels that any company that can’t survive deserves to fail. The strong and healthy companies will rise from the ashes and we as a society will be better for it.

That desire though only works if other certain assumptions are true. One of those assumptions is that the market has well thought out rules and regulations. The American mortgage industry does not. The American mortgage industry has a very aberrant aspect to it, and that’s Fannie and Freddie. I understand that a free market will benefit society the most when it has proper rules and regulations. Without rules, a market will collapse and deteriorate into either a medieval fiefdom system, or a banditry system. Rules and regulations in a market system are like scaffolding and the individual contributors build healthy societies around that scaffolding. If the scaffolding is weak, the whole system falls apart. The best an individual player in the market can do is build a pyramid out of their own rocks; no one works together. My desire is for there to be a strong scaffolding, resulting in a healthy, stable, and “tall” society.

If Fannie and Freddie are the cause of commercial collapse then shouldn’t the solution be that the smart financial companies don’t deal with them, and then they will survive the next crisis and eventually Fannie and Freddie will go away? The problem is that since the government created Fannie and Freddie, that’s not going to happen. It’s the government who creates the rules of the market, and with Fannie and Freddie (or any future Fannie and Freddie like groups) they’re part of the rules of the market. The result is an unhealthy, unsustainable market; a scaffolding with a weak point. The reason why they’re such a blight to a healthy system is because they play by different rules. I’m not familiar with all of the details, but an example would be if the financial rules were that all banks needed to keep %6 of the value of their loans in cash at all times, Fannie and Freddie would only need to keep %3. So what we have is a well thought out market which was put into place (by the Congress and financial regulators), and then Fannie and Freddie were given exceptions to all of the rules. This makes them more profitable; but only in the short term, they don’t operate in a sustainable way.

Because of the size, exceptional rules, and mandate of Fannie and Freddie it would be unreasonable to expect the other financial companies to ignore them. It’s too difficult to ask a company not to take advantage of the opportunity to make money by selling assets to Fannie and Freddie. The reason is because it can work, for one, two, five, ten, twenty years. The rules Fannie and Freddie play by, are passable, for about fifty to sixty years. Then it comes falling apart, and because they’re so big (with the government supplied starting capital) they bring the whole system down with them. It’s unreasonable to ask a company to do profitable business for fifty years, and then hope that they magically know there’s going to be a collapse soon so they should stop doing those things. The rules of the post 1930’s market seem to have been well thought out, and the only reason why we’re in trouble today is because of exceptions, given to certain entities, from those rules.

The reason why the government had the responsibility to bail the financial sector out is because the government caused the weakness in the market that the other players in the market couldn’t avoid.

Categories: News and politics

Should I use a class or should I use a struct?

May 12, 2011 1 comment

In .Net the decision to use a struct or to use a class when creating a new type doesn’t come up often. Up until a few months ago I never even considered turning a class into a struct, it seemed like it would come back and bite me later. After seeing some other peoples code and hearing their reasons for why they chose struct’s, I’ve start considering it when I program. For the vast majority of situations, when creating a new type, one should make it a class. But after flushing out the details of usage the opportunity arises to make it a struct.

This opportunity in .Net was created as a way to distinguish .Net from Java. In Java everything is a class. But there are times when have the value on the stack instead of a reference to the value is more performant. One thing I struggle finding online is good guidance of when to use struct’s instead of classes. The best I can find is to not create a struct if it has more than four member fields. The idea being that in a 32-bit process a struct shouldn’t be over 16 bytes. In talking with some friends they also take into consideration how much the instance is going to be passed around. The idea being that if an instance of the type is constantly being copied having a reference to it instead would result in less memory and the overhead of an being object would be worth it.

With all of this in mind I come to my dilemma. I have a FreeCell solver I’ve been writing and in it is the Card type. Right now it’s a class, but it could be a struct. To save on memory there are only 52 instances of the card type instantiated in my application, but there are hundreds of thousands of structures which references these 52 Card instances. If I changed them to a struct the web of references on the heap would be much simpler and the GC would have a lot less work to do. However, where all of the Card arrays are currently only holding references, they would be changed to holding the entire type. Their size would increase by perhaps doubling or tripling. Would the increase in size outweigh the value of having reduced time spent by the GC?

If I’m really worried about the size I could drop one of the fields from the Card class. Right now it has a hash field which is lazily calculated and then stored. If I dropped the field it would need to be calculated every time GetHashCode gets called, and in my application it gets called a lot. On the other hand compilers are pretty smart and should be able to inline the method and make it part of the processor pipeline. So it might not even be measurably different than just returning a stored integer.

So is it worth it? No way to know that for sure without actually doing it and taking measurements. But this situation certainly does make it a possibility. It’s a small class which only holds onto three (possibly two) fields, which are all structs themselves.

Is there anything else to take into consideration when making this decision?

The Microsoft Skype deal smells fishy to me

May 10, 2011 Leave a comment

Today it was announced that Microsoft is purchasing Skype for $8.5 Billion. That’s a lot of money. That’s too much money. The different reasons that Steve Ballmer gave for the purchase (enabling communication for different Microsoft products) don’t fly with me. The reason is because every reason given works just as well for putting Windows Live Messenger onto those product. Skype doesn’t do anything that Windows Live Messenger doesn’t do. One of the possible reasons floated was to get users, but in both registered users and active monthly users WLM has at least three times the number of users. Assuming that all of active Skype users aren’t active WLM users that’s still a decent growth in the customer base, but $8.5 Billion worth? I don’t think so.

Skype’s not even a profitable company. Skype is losing about $70 million anually and has about $800 million in debt. So that tacks on a minimum of $1 billion of additional cost.

One of the other reasons given was that Microsoft has foreign money reserves that won’t bring into the US. Fine, but did it have to get spent this way? The other bidders for Skype were Google and Facebook and they were bidding a little above $4 billion. Why did Microsoft double all existing known bids? Was Microsoft afraid that a competitor was going to get a hold of a failing company?

To me, this deal reminds me of the phrase “McDonald Douglas purchased Boeing with Boeing’s money”. Right now Skype is owned by two venture capatilst firms, who also happen to own shares in Facebook. While there is Facebook/Windows Live integration, perhaps the venture capatilsts felt that Skype would lose money if Facebook got it, but Facebook could profit it from it, if Microsoft had it. But how did they get Microsoft to buy it? I feel that there’s somebody on the board, or who can put pressure on enough of the board, who made this deal happen.

Skype was purchased for $2.6 Billion in 2003. What has it done to deserve such wonderful evaluation since then? AFAIK it’s user base hasn’t grown, and it’s only been losing money since then. This deal really smells like somebody realized they were losing money because of Skype and were able to Microsoft to pay them handsomely for it.

Perhaps we should still try Osama

May 6, 2011 2 comments

When the announcement was first made that Osama Bin Laden was killed on 1 May 2011, the public was informed that he was killed in a gun fight with American Special Forces. The idea being that if he hadn’t resisted American forces would have captured him and brought him back to the United States to stand trial. We can use Saddam Hussein as an example of how if someone doesn’t resist they get captured. Since then it has been announced that while there was some small arms fire by the time the SEAL team made it to Osama bed room, Osama wasn’t armed but that he was shot dead lunging for a weapon.

Perhaps I hold special forces teams on too high a pedistal, but I would think that they would be able to shoot to wound in a situation like that. On the other hand, if I was there and had a gun pointed at a mass murder and saw him so much as sneeze, there’d be a hail of bullets coming out of the other end of my weapon.

So part of me wishes that that SEAL team could have captured and brought Osama back for trial. But then I wonder, what would be the point? I certainly hope that the American legal system is robust enough to be able to convict Osama Bin Laden to the death penalty. So if it were a predetermined outcome that should justice prevail that he would get exectued, why not do it when we capture him and get it over with? On the other hand there have been plenty of instances where western justice as brought people into trials where the predetermined outcome was execution. The WWII war crime trials for instance. One of the purposes of those trials was to reveal to the world how bad those people were though. We know pretty well exactly what Osama has done, and what he’s been up to, so I don’t think that a trial would have helped much there.

Either way, he’s dead now. Should we still hold a public trial (of sorts), just to go through the process of revealing exactly all of his wrong doings? I could see there being possible benefit to that. Or, for the same benefit, in a decade or so, the US government could unclassify all of the information that they have about him and make the information public. Or if the won’t, hopefully Wikileaks will.

Categories: News and politics