Skip to content

Some things I learned these past few days…

May 13, 2009

A day without learning is a wasted day.

Don’t know who said that, but I live by this rule, and so I try to learn something valuable* every day:


  • You *can* serve confirmation dinner in your living room for 26 people. The only challenge is for the servant whose supposed to present the large tray of steak to each guest, when the guests are sitting shoulder-to-shoulder. 🙂
  • When your ASP.NET button click isn’t doing anything, the first place to look ISN’T the SQL query that’s supposed to run. Check that the button is hooked up with the onClick-event containing the code. That will save you a lot of wasted debugging-cycles. n00b. 🙂
  • If you are working on a virtual lab and have 20 minutes remaining of your alotted time, but only 10 minutes before your wife has dinner ready, she will “make it so” that the virtual lab crashes. Don’t ask me how.
  • If you plan for a nice day out, bicycling with your family, you will only get so far before you have a flat tire.
  • Your winner’s luck is thoroughly spent once you land any prize – no matter what it’s worth. So if you win a stack of bananas, that will count as much as winning the lottery. You can’t have both.

So these are some things that I learned. Your comments confirming or denying these claims are welcome.



* Valuable TO ME, that is.. 🙂

Creative and discrete Joomla hack..

April 23, 2009
tags: , , , ,

Recently a client reported that their web-page had turned black! I was tasked with investigating, and this turned out a tad more interesting than I first thought it would be…

I soon discovered that there was indeed text on the page, it was just black on black, so you couldn’t read it. The only text on there though, was a PHP error message, stating that there was a syntax error in banners.php, which was a file unknown to me. When I opened the banners.php file, I found code in there which would do something like this:

  1. Check client, if it’s a normal web browser, return the normal webpage, nobody notices anything..
  2. If the client is a search-engine, however, return only these links: (then a whole lot of links to what looked like different articles on a blog, but the names disclosed them as selling some product) and then do nothing..

Crafted for silent operation, this hack would only affect indexing spiders and search engines! Thereby upping the rating for this particular “blog”, or whatever it was, in those search engines! This would indeed have gone unnoticed for who-knows how long, had it not been for the syntax error they had made in the file.

In trying to learn how this hack was done, I turned to the Joomla forums, but there wasn’t much help to be had there, as we weren’t running the very latest release of the Joomla CMS… :-/

I gotta admire the creativity of some people out there, in finding new ways of exploiting the web… You can only winder how many other site-admins are unaware of their websites returning SPAM to all indexing attempts made at their site.. Just goes to show, you should ALWAYS keep your software, be it on your computer or out on the web, up to date…

Windows Live Mesh on the iPhone!

April 23, 2009

Microsofts endeavour, or should I say one of Microsofts endeavours, into cloud computing is (currently :)) called Live Mesh. At first glance it might seem that all you can do with this thing is synchronize data across your computers, but there is more to come and it touted by some to be the next-generation application platform, supporting both Windows PC’s, Mac’s and mobile devices.


I’ve been using Live Mesh for a while now, synchronizing select folders between work and home computers. I’m able to keep documents I’m working on, code projects and scripts handy, so no matter if I’m at work or at home, I can find the latest version ready for me. Between two home computers we use it to synchronize our GSAK database, to make sure we’re always carrying the latest geocaches with us on the netbook. 🙂

So while I was really searching for an iphone app that would allow me to download documents to the iphone as a flash drive, index the contents and make them searchable (btw: I had no luck with that), I stumbled upon this article:

Windows Live Mesh on the iPhone!

I hadn’t realized yet that mobile devices were supported, but they are, through the Live Mesh Mobile web interface. And what’s more, you don’t need a Windows Mobile device to use it, it works just as well with an iphone or (I’d imagine) any other device. Granted, your mobile device must be able to read the document type.. So far I’ve been able to read Office documents, text-files and PDF’s with the iphone and they are all good.

Now, the *true* mobile support (as in mobile device installed application) isn’t out yet, and likely will be Windows Mobile only. At least in the first iteration. I do expect Mesh-enable apps to surface on the iphone App Store, it just makes sense..

And one more thing.. You can actually remote control your online Mesh members! Now, I don’t have a Mac, but I have tried remote controlling both Vista and Windows Server 2008 Mesh members, and it works well enough that you can get out of a tight spot or remote support someone else. I was toying with the idea of installing Mesh on my Windows Home Server as well, as I have never been able to get that remote control support working.

I’m very excited about Live Mesh, and now that I can have documents available both on my Windows Mobile phone and my ipod touch, it’s shaping up real good!

But, keep in mind – this is just a Tech Preview beta, and things could change dramatically! Don’t put anything valuable up there, something COULD break!

Project Euler

April 15, 2009
tags: ,

Project EulerI picked up a tip for a cool website from one of the podcasts I’m a regular listener of. Think it was DotNetRocks! but I’m not absolutely sure. [Edit: It was DNR #428 with Mike Nash talking about Windows 7 and IE8] The tip was brought in by some guy who was trying out F#. On learning the syntax of a new language, he would try and solve a set of math-problems in the new language to get a feel for how it works. He referred to a site known as Project Euler which hosts a collection of math-problems of varying difficulty.

One can register for an account at the site, and once you have solved a particular problem, you send in the answer. If it’s approved, you’re allowed access to a forum thread discussing this particular problem and showcasing the different approaches and programming languages people have used to solve that problem.

I was so intrigued by this that I jumped on it first chance I got! By bed-time last night, I had solved the first two problems, and used some of the suggestions in the forum thread to tweak my C#-code. It was very interesting to see how the problems were solved, both using higher maths (far beyond me! :)) and as I did, brute-forcing… There are some *very* obscure languages out there! 🙂

I was also able to use suggestions in the forum to time the execution of my code, and to my surprise, the ~1000 iterations in the first problem were computed in less than 1ms in my ASP.NET C# code! I was impressed! There was some guy in the forum that touted how his code solved the problem in “only” 274ms, so I was very impressed that my less-than-optimal C# snippet was that much faster! Granted, his solution was done waay back in 2005, so maybe computers really have gotten faster since then.. 🙂

All in all, Project Euler is a very interesting site I’ll be sure to visit every time I feel up to a challenge. It’s gonna be a *very* long time until I’ve solved all 240 problems, that’s for sure!!

SharePoint Designer 2007 now for free!

April 14, 2009

That’s right! Free as in lunch! My guess is that sales weren’t soaring, SPD is like the fifth wheel on the wagon – not directly a part of the Office productivity suite, nor is it naturally a part of SharePoint Server.. So, now it’s there for free. Granted, you have to register to get to the download, but hey – that’s not a big deal, right? 🙂

Find the download here.

The extended Easter..

April 14, 2009

Extending Easter by a week was an excellent idea, visiting the US was even better! Highlights have been (in no particular order) : driving a car on Manhattan at night in rain and fog, guided tour of a steel mill in Ohio, visiting Amish country, The Great Wolf Lodge in PA, the great warmth and hospitality of our american relatives and a fun Easter Egg Hunt! Now I’m back at the office, and I just feel a lot lighter than last time I was here. I’m probably not, though. 😉

I’ve joined up with the Linkedin .NET Users Group  (formally the “C# Professionals Group”) and they look set to make a real difference in the .net developers community. Being over 20,000 members strong already I think they really can.

Focus will be as before, on ASP.NET and learning all the facets of greatly scalable web-architecture. I’m kinda struggling to find the time outside office hours to get real deep into it, but somehow I’ll make it happen.

I’m getting into Microsofts Hyper-V working on a case for a client, and sorting out all the pros and cons vs the competition is proving a challenge, even if I have the local Microsoft experts only a call away.. 🙂 For instance – will Server Core support failover clustering with Hyper-V? Will the free Hyper-V Server support failover clustering? How do you convert existing physical servers to virtual ones, does it require System Center Virtual Machine Manager (SCVMM)? Somehow I’ll straighten it out, and if all goes well, we’ll bag this case as the first “win” over VMWare VI3.. Fingers crossed..

Some ramblings…

March 27, 2009

I’ve begun digging into the Sitepoint book “Build Your Own ASP.NET 3.5 Web Site” as part of my effort to become a software developer.

I couldn’t eradicate the family computer, and I couldn’t burden it with more “stuff”, overloaded as it already is, so I decided to do a dual boot instead.

I installed the Win 7 public beta, on a separate drive, somehow anticipating that the dual boot setup would magically materialize itself, but when that didn’t happen, I had a computer that would only boot into Win 7. I had better fix that, and a deep-dive into the new BCDEdit that came with Vista was in order. I just might do a separate blog post on that.

Anyhow, I’m up and running, plugging away at the lessons and practices on my late-night sparetime.. The book is looking good, and while I haven’t really gotten past the basics yet, I like the authors’ writing style and the examples are easy to follow. For now.

So, some things I’ve learned this week:

  • It’s entirely possible to dream up a solution for a problem, only to wake up with nothing but a vague feeling about what it was..
  • When planning for a roadtrip, you can use Google Maps, driving directions – not only will it give you directions, but actual photos of the major intersections! 🙂
  • My ipod touch 8gb easily holds 24 hours of music, 7,5 hours of movies, 500 photos and 40 applications.. with room to spare..
  • Microsoft System Center Virtual Machine Manager 2008 has exactly the same amount of letters as Microsoft System Center Data Protection Manager 2007. I suspect they have a plan.
  • The movie “Things we Lost in the Fire” featuring Halle Berry and Benicio Del Toro, the EU DVD version, which I purchased last month, has copy-protection on it so I’m unable to rip it into my collection. They think they have a plan.
  • Earth Hour will have the entire human population turn out their light for an hour tomorrow.

So that will have to do…