Google have been running a few “treasure hunt” challenges; and with a half hour to spare I decided to give one of the challenges a spin. Now, as the challenges are still live I’ll spare you the details of my solution but naturally I worked a number of subsets of the problem in my head and immediately began to think how I’d represent my solution as an algorithm. I’m most proficent with C# so off I went hacking together a few lines of code and I cheerfully submitted my answer. After a short wait I was informed of the real answer and that my answer was many factors short. I don’t like to be wrong, then it struck me… integer overflow! What a sucker I am!
When developing most line of business applications it’s standard to stick with 32 bit integers. After all, 4,294,967,295 unsigned integers cover the vast majority of common issues. The solution to this particular problem can’t be covered by an unsigned 64 bit integer either. Which leads to two questions:
1. Why does C#/.NET not throw integer overflow exceptions?
It does throw integer overflow exceptions, however it is not enabled by default. You can check this in two different ways, firstly via a compiler switch (/checked) and secondly via the checked keyword.
It’s not a default because there is a significant performance penalty for carrying out the check. In reality though, there is probably an arguement for this to be used at the very least for initial builds to QA/Test environments for applications doing serious number crunching.
2. What do you do when 64 bits isn’t enough?
Now this is the first time I’m genuinely disappointed with the C# language/.NET framework. There is no support out of the box to deal with more than 64 bits. Now granted, this is an edge case for businesses, but it becomes more important in crypto and science. The BCL team had inserted a BigInteger class into System.Numeric for 3.5 and it was present throughout the betas. Unfortunately, it got pulled for performance and compatability reasons. It doesn’t appear to be in the beta for .NET 3.5 SP1 released a few weeks ago, so we’re probably looking at 2009/2010.
Another suggestion is to use the BigInteger implentation supplied in the Visual J# runtime and although sensible, it sums up how idiotic it is that there isn’t a BigInteger implentation in the actual framework! I also read that F# has it’s own BigInt – talk about “red rag to a bull”.
Luckily, there is an answer from the community at Code Project.
Incedently, I was able to confirm my approach was correct by using floating-point instead (checking the most significant bits). Despite my faults, it leads me to the conclusion that this is all a bit poor by MS, even if I had recognised the integer overflow before submitting my answer there is nothing in the framework that would have helped.
Last year I panned Facebook’s first foray into online advertising. I think Facebook is starting to demonstrate to me that they can get advertising right. I live in the UK, my wife is Canadian and I have a lot of Canadian friends on Facebook. Could it be that I’m being targeted by an airline that flies to Canada from the UK?
I might be reading too much into this – it might just be a regular campaign targeted at UK residents. It is much more difficult to infer if a Social Network advert is targeted or generic. With Google Adwords everything is out in the open, with Facebook it’s kept away from our prying eyes! I’ve flown with Zoom before, so the evolution of this would be whether I could be included or excluded based on my email address.
Actually, I just got this Ad – so it’s obviously pot luck for a married guy in his 20s like me!
More whining from Internet Service Providers here: http://news.bbc.co.uk/1/hi/technology/7336940.stm
PS. The mere suggestion that the government should get involved to broker a deal is ludicrous.
I’ve previously written about my thoughts about gripes that ISPs might have to enforce legislation to show that users aren’t downloading illegal content. I had intended to follow up with more thoughts on the legislative threats to firms that make their bread on the net. However, I’m growing tired of ISPs crying wolf in the press. Most recently, the news that Internet Service Providers want to get in on the advertising game with Phorm. Merely a service say the ISPs – to give users more relevant ads, yeah right say others.
It has also came to light that a number of Service Providers are upset with the BBC and the extra traffic that the BBC’s iPlayer is bringing. I found this amusing as in the US, ISPs have to pay ESPN a fee so that the ISP’s customers can access their ESPN360 service. UK ISPs shouldn’t be bitching about how the BBC is costing them money due to bandwidth or trying to kick-off a debate about net-neutrality; they should be thanking the BBC for not charging them a fee to access premium content.
Internet Service Providers forget their place in the food chain; you’re about “the tubes” and doing it in such a way that doesn’t invade our privacy. The reason that I pay for my internet connection is that I want to get some content, the reason I have broadband is because I want it quickly and without any new adverts “injected”.
One more thing, Internet Service Providers should not jump into bed with a company that has developed root kits in the past… it doesn’t inspire confidence that privacy will be respected.
The BBC are reporting that the UK Government are considering proposals that would see people who download pirated material losing their internet connection. This follows on the heels of proposals by the Australian and French Governments that will affect ISPs in their country.
It is clear, that western governments are taking the issue of piracy seriously but the bigger challenge will be convincing people that piracy is wrong. While campaigns by the movie and music industry has an impact, nothing beats a clear law and if implemented correctly these proposals would have the desired impact.
ISPs have generally been able to avoid legislative concerns; although Demon internet were sued successfully for hosting defamatory content back in the 90s. Some industry’s are more adept to keeping abreast of legaslative changes, such as financial services. In general it stiffles inovation, it raises the bar of entry and it increases the cost of “staying in the game”.
Putting the impact of the proposals aside; this is the beginning of a trend that all technology firms must prepare for. Industry’s that become more regulated become better at working the system and ensure they have their voice heard when legislation is drawn up.
This is something that the industry in Europe has generally failed to accomplish so far. Lobbying has been left to privacy groups and it’s resulted in legislation that doesn’t go far enough in enabling innovation in Europe.
Granted some of the big boys are on the case. But the industry as a whole needs to be better prepared for the coming storm.
For those of you not familiar with Rocketboom – it’s worth checking out.
One source of annoyance is that none of the RSS feeds consistently present the content embedded in Google Reader. Clicking “Open in New Tab” in your browser of choice is so 2006.
However, help is at hand as the folks at Rocketboom use YouTube as one of their distribution channels. YouTube allows you to create custom RSS feeds by user or tag. The feed http://www.youtube.com/rss/user/rocketboom/videos.rss presents a superior Google Reader experience.
The same trick can be applied to other videoblogs, however you’re mileage might vary as not every show updates their YouTube feed on a regular basis. For example Ask A Ninja are a few shows behind on YouTube.
Google have released a Mobile product called “Sync” to allow users to “Synchronize your BlackBerry® calendar with your Google calendar.” It’s Over-The-Air (OTA) too, which is the only way to go with syncing now. Reading on the forums, some users are having a few issues but it works for me. I’m going to give Google Calendar with “Sync” a spin and we’ll see how it plays out.
I’ve written before about the pain of being a mobile user when I investigated Plaxo. Google seem to be committed to making an effort in this area, just look at all the applications they have and their efforts with android.
Just like Facebook; it is too easy to forget just how good a job Google is doing because the expectations are so high. Bravo Google!
Many have warned about the power of supermarkets, in particular citing market basket analysis and the urban legend regarding beer and nappies. All joking aside, Tesco (Britain’s largest retailer) is getting very good at mining for gold in their data, Orwellian almost. My Wife and I use our club card at every opportunity – it’s worth a penny for every pound at Tesco or up to four pence if you use it on special offers.
As I paid for a small number of groceries the till printed out an extra voucher for me. Previously, I’ve been handed vouchers for extra points when buying bread or milk by a friendly cashier. I didn’t really think much of it. But this voucher was different, this time it struck me that Tesco are mining information about me.
The voucher offered me 150 points (£1.50 -> £6.00) if we purchase a £10 Top-Up for my Wife’s pay as you go mobile phone. Back-story: my Wife used to get her Vodafone top-up vouchers from Tesco before an unfortunate incident where the self serve machine didn’t print out her voucher and the store refused a refund. Since then, we’ve always made a point of getting them from somewhere else.
From a system’s perspective, Tesco obviously know that we’ve spent a fair amount of money on vouchers for Vodafone network in the past and that we’ve bought at a certain rate. We’ve stopped buying it at Tesco and they’ve worked out how much it’s worth to them to get our custom back once with the hope that we’ll stay. This voucher carries more to us than most of you reading. You’ve probably got a contract phone, or you live outside the UK or you use a different network. Don’t worry though, Tesco probably have a promotion relevant to you ready for the next time you checkout.
So Birmingham, Alabama and Atlanta duked it out in the battle of StartUpWeekends… well not really. First, Birimingham isn’t affiliated with StartUpWeekend and in reality both sets of participants were focused on building a startup and taking a whole lot away from their experiences.
I’ve not had the time to follow both groups closely – I’ve had a poke at both applications and my first impressions are that Birimingham’s site is a bit rough around the edges. I’m a little unclear on the financial side of things, but clearly there is an audience that perhaps isn’t being catered too.
I don’t think I fully grasp Skribit – mainly because in my humble opinion the problem doesn’t exist. It does look very polished though.
Reading the Birmingham blog and the code for equity debate, I have a greater appreciation of where Andrew Hyde is coming from, weekends do need standards and for me Code for No equity isn’t where I’d like it to be. But, it’s Birmingham’s weekend so it is their choice and everybody seems to have got a lot out of it.
As founding principles I believe most of the Founders Bill of Rights are great. As I previously blogged, I don’t like the fact that StartUpWeekend is a company and while it’s clear and transparent, I don’t like the fact Andrew takes 5% of the company founded over the weekend.
I found it interesting that both Mike Arrington of TechCrunch and David Cohen of TechStars have focused on the community of StartUpWeekend. But I’m confused? This is a company, but it is a community? I’ve already shared my thoughts on this, but ultimately they don’t really matter… Most of the participants at these weekends seem to come away with a lot from the experience, it’s clearer to me that many see that as being the real value of the weekend.