Randy Pausch

I’ve recently come across the last lecture by Randy Pausch. It’s very inspirational and it works to look at stuff from his perspective. Last week I ran into a brick wall trying to accomplish something which I really wanted.

At first I was really disappointed about things not working out the way I wanted, but one day later I remembered the following:

Brick walls are there for a reason. The brick walls are not there to keep us out. The brick walls are there to show how badly we want something. Because the brick walls are there to stop the people who don’t want something badly enough. They are there to keep out the other people.
– Randy Pausch ( 1960-2008 )

When I was considering this, I also remembered a remark by Zedd from the Sword of Truth Series: Don’t think about the problem, think about the solution.

So far these small pieces of advice, although one is from a fictional character, if anything, it helped lift my spirit to a considerable higher level. Actually thinking about the solution is a lot more creative than wallowing in despair.


Building boost on Mac OS X 10.6

Today I finally had the time to verify that the problems building boost on Mac OS X 10.6 aka Snow Leopard using the compiler enclosed in XCode-3.2 were over. And indeed, building boost 1.42.0 is a nobrainer: just unpack and build.

I’ve built it with these options:

bjam --build-dir=../boost_build --layout=versioned toolset=darwin architecture=combined address-model=32_64 link=shared,static stage

Building boost on Mac OS X 10.6 with XCode 3.2

Getting boost to build in ‘fat binaries’ is a pain when you’ve just switched to XCode 3.2. Switching to XCode 3.2 is somewhat obligatory, because that also brings you the SDK for Mac OS X 10.6, aka Snow Leopard. And when you run the Snow Leopard, you want the SDK for it as well. It sounds so simple.

The Apple version of gcc, included in XCode, stops building boost in fat versions, it works for targeted versions (i.e. with only one architecture). But, if you want to build ‘universal’ binaries that work in 64bit and 32bit mode, you’re out of luck.

I got it to build this morning, thanks to some discussions on the boost mailing list. And it == boost 1_40_0, with XCode 3.2 on Snow Leopard.

This is the command-line I used:

bjam --build-dir=../boost_build --layout=versioned toolset=darwin architecture=combined address-model=32_64 link=shared,static install

And here is the patch I created to get it to work. It boils down to: remove all the ppc entries from the tools/build/v2/tools/darwin.jam, because the XCode compiler does not offer support for PPC anymore. And, you have to remove the “-m64” option in the gcc.jam, because the xcode compiler does not like to have -arch x86_64 -arch i386 -m64 all together on the command-line.

But, if you take the road of building your code on XCode 3.2, you specifically eliminate all those users still using a PPC based Mac. That might not be what you intended. In that case you probably need to add the -V 4.0.1. option to gcc/g++ in which case you use the older compiler (from XCode 3.1), which might or might not be what you need for your project.

(Sorry for the stupid looks on the patch, but wordpress mangles stuff with the <code> tag).

diff --recursive -u boost_1_40_0.orig/tools/build/v2/tools/darwin.jam boost_1_40_0/tools/build/v2/tools/darwin.jam
--- boost_1_40_0.orig/tools/build/v2/tools/darwin.jam 2009-04-14 09:59:30.000000000 +0200
+++ boost_1_40_0/tools/build/v2/tools/darwin.jam 2009-09-06 08:01:26.000000000 +0200
@@ -304,9 +304,9 @@
: $(values) ;

-arch-addr-flags darwin OPTIONS : combined : 32 : -arch i386 -arch ppc : default ;
-arch-addr-flags darwin OPTIONS : combined : 64 : -arch x86_64 -arch ppc64 ;
-arch-addr-flags darwin OPTIONS : combined : 32_64 : -arch i386 -arch ppc -arch x86_64 -arch ppc64 ;
+arch-addr-flags darwin OPTIONS : combined : 32 : -arch i386 : default ;
+arch-addr-flags darwin OPTIONS : combined : 64 : -arch x86_64 ;
+arch-addr-flags darwin OPTIONS : combined : 32_64 : -arch i386 -arch x86_64 ;

arch-addr-flags darwin OPTIONS : x86 : 32 : -arch i386 : default ;
arch-addr-flags darwin OPTIONS : x86 : 64 : -arch x86_64 ;
diff --recursive -u boost_1_40_0.orig/tools/build/v2/tools/gcc.jam boost_1_40_0/tools/build/v2/tools/gcc.jam
--- boost_1_40_0.orig/tools/build/v2/tools/gcc.jam 2009-07-11 13:04:31.000000000 +0200
+++ boost_1_40_0/tools/build/v2/tools/gcc.jam 2009-09-06 08:11:17.000000000 +0200
@@ -375,7 +375,8 @@
- option = -m64 ;
+ # option = -m64 ;
+ option = ;
OPTIONS on $(targets) += $(option) ;

Blogging with OneNote

All of a sudden there is a small note inside the ‘right-click’-menu that says “Blog This”. Now, that sounds interesting. It may be the feature that I’ve been looking for some while. Currently I’m using the Microsoft Live Writer to create new postings to the blog, but if I can keep the number of dependencies down to get a working laptop, I’m all for it.

So, does it work, is the general question?

First we think of a new subject for a blogpost. In this case, it concerns creating blogposts. Of course, this is quite a stupid subject and a bit of a meta-blog in itself. But then again, sometimes you have to get stuff like that written out. It even gets worse. When you tell OneNote to ‘Blog this’ it copies everything into MS Word. How about an unexpected result. But, how to get to the rest? The ribbon tells there’s a ‘Publish’ button.

When you press it, it offers to enter the essential information for blogging, and then you’re off. And, surprise, surprise, it actually seems to work. Well, sort of. All the stuff you ordinarily expect, like adding tags, setting the categories, is not quite where you expect them. Actually, I haven’t been able to find them at all.

Further, the text becomes riddled with html tags, which makes the layout quite different from your average blogpost. That’s really not what you would expect from a blogging client.

Concluding, there is a very slim chance that Microsoft Word will become a very well received blog-writing-client. It’s quite dysfunctional in this respect. But, if all you have is the ‘trusted’ MS Word, it’s better than nothing.

SCADA Honeypot

I really like the idea of a SCADA honeypot. John Strand live-demoes a SCADA Honeypot. It uses several services which can later on be used to demonstrate (and lure an attacker) the life inside a SCADA universe.

You can download the SCADA Honeypot from here.

From the scadahoneynet site:

[The] goal of this project is to provide tools and to simulate a variety of industrial networks and devices. We see several uses for this project:

  • Build a HoneyNet for attackers, to gather data on attacker trends and tools
  • Provide a scriptable industrial protocol simulators to test a real live protocol implementation
  • Research countermeasures, such as device hardening, stack obfuscation, reducing application information, and the effectiveness network access controls.

Windows 7, continued

Well, so far I’ve been quite happy with Windows 7. It doesn’t crash on me, it’s just there. Even hibernation works like it should (which it never, ever did with any Linux version).

But, on the other hand, I’ve been forced (…) to do a complete reinstall because I could not upgrade Visual Studio Professional to SP1. Because it had conflict somewhere in the Web devel with Office Home & student. Because of that it totally abandoned upgrading to SP1.

Ok, then just uninstall office, do SP1, and reinstall Office and do Office SP2.

Nope. It would not, because it could not uninstall because of some half-successful, but not quite, install of SP1.

Ok, I’ll uninstall VS, and then upgrade Office to SP2. Oh wait, it could not uninstall VS, because of some half installed web devel thingy which could not complete.

That sucked.

But, I would not abandon my conversion from Linux to Windows in a mere week and a half. Usually it takes about two months before I get really fed up with everything and throw the towel in the ring.

No, I did a total reinstall of Windows 7, with Office (professional trial), VS Professional, OneNote (which, for some reason that totally eludes me, is included in Home&Student, but not in Professional. I guess OneNote is not professional than to use), Kaspersky Internet Security(thanx for giving a voucher for a year free Kaspersky, great for tests like this) and TortoiseHG.

It took less than four hours, which is quite good. It didn’t take as many reboots as it used to. About four, if I remember correctly. Which is very nice. In the four hours I also BitLocked the 100GB drive in my laptop, so all in all, that wasn’t that bad an experience and I could get to work on it after four hours. An ubuntu install takes less time, but before I can actually go to work, it takes about the same amount of time (getting window managers set up, install all the freaking packages I forgot, etc.).  Hmm, that’s not very fair of me, because the windows machine is not quite ready yet. I don’t have emacs. It always takes a while to get emacs working properly on any platform. But that’s for another day.

At the end of this day, I’m still a happy camper, while writing this post in Windows Live Writer. That is, if I’m successful at actually posting this.

In the mean time my verdict so far:

  • coolness: 7/10 (it looks ok, but aero gets old really fast)
  • crashes: 10/10 (none, so far)
  • reinstall: 1/10 (if I have to reinstall to get a setup working again, that’s bad. Really bad).
  • wonkyness: 7/10 (Win7 doesn’t really get in your face, which is good, but the jury’s still out on the actually liking of the Libraries. That feels, well, we’re still out on that one)