Autumn Weather

Two days before Halloween in New York City, and there’s 3 inches of snow on the ground.  I’m sure there’s a good explanation for this.  In the mean time, I’m glad I have winter hiking gear.

Snow in NYC

Unimpressed with Android

Android

I’ve been curious about Google’s Android for some time.  Technically, it’s an interesting design – a curious amalgam of Linux, free software packages, and a custom Java runtime.  Moreover, unlike Apple’s iOS, Android isn’t a closed system.  You can more or less run whatever you want on the phone.  In fact last winter I installed an x86 port of Android in VMWare as part of a class project.

Meanwhile, my iPhone has remained essentially unusable at my apartment (thanks AT&T).

So when I found I could get a Nexus S with a prepaid phone plan that was both cheaper than my current plan and offered coverage at home, it seemed like a good idea.

Continue reading

Fall is Here

Fall is Here

 

Fall is arriving in New York.  Sadly so are midterm exams, term projects and an ample number of problem sets, but it’s nice to see a little color on the occasions that I manage to escape the city for a bit.

Fun with OpenVPN

OpenVPN

One of the disadvantages of working from places like the library and the train is that the wireless network connections aren’t exactly secure.  For casual browsing, that’s not terribly important, but even for stuff like Facebook and GMail it would be nice to have a way of ensuring the connection is secure.  Unfortunately, it’s not always possible or practical to use HTTPS connections for such things.

The obvious solution is a secure point-to-point connection to another machine on a wired network – in other words a VPN.  The secured machine will act as an IP routing gateway, so that any insecure traffic that is intercepted will appear to be coming from that machine.

While I was at the library yesterday I created just such a setup using OpenVPN.  As usual, it was more complicated to configure than I’d anticipated.

Continue reading

MacOS X 10.7 compilers

Compile window

As part of a little project to make detecting memory/pointer errors easier for beginning C/C++ programmers, I’ve installed a number of different compilers on my system.  I wanted to make sure that my approach was widely applicable.

At this point, there are 4 (3.5 really) major C/C++ compilers available for MacOS X 10.7.  What follows is a brief description of each, and some background as to how we got here.

Continue reading

Building gcc on MacOS X

Apple has never included a stock version of GCC with their development tools, but now with the current version of Xcode, they don’t even include a modified version.  Seeing as their plan going forward is to move entirely to Clang/LLVM, if you intend to use GCC on OS X, you’ll have to build it yourself.  It’s not a terribly difficult process, but it can be a bit tricky the first few times around, particularly when it comes to configuring the build.

Instructions follow.

Continue reading

Finally some site updates!

Last weekend, I found an archive of a lot of my old postings, and after some chicanery to get around WordPress limitations, I managed to import all the old content into the new blog.

That discovery spurred me to begin updating this place more regularly, and add some things that I’d been meaning to post but never quite got around to.

The Hiking section includes all of the trip reports I’ve written from the last 4 years.  I’ll try to add in brief reports for some of the missing trips as well.

The Miscellaneous section from the old site has been restored.  There’s a lot to update there.

Finally, I’ve created a Programming section, where I’ll be posting the projects I am or have been working on.

Notes on Building a C/C++ Leak Detector

Building a simple C memory leak detector is not too difficult.  I did it in a previous post in less than 200 lines.  But once you add features, it becomes a lot more complicated.

What features am I talking about?

1) Allow use in programs with more than 1 source file.
2) Make fast enough to use in reasonably large programs.
3) C++ support (track allocations made with new and delete).
4) Detect use of mismatched allocation/deallocation (e.g. new and free).
5) Detect simple buffer overflows (writing off the end of an array). 
6) Be generally helpful (errors should be handled gracefully). 
7) Test everything well.

And of course it goes without saying that I wanted to keep it portable, and as simple as possible.

Continue reading

Chance Encounters

Low Memorial - Concert

 

I went down to campus this morning to do some work at the library.  On my way out, I was pleasantly surprised to discover a concert in progress on the Low Steps.  Quite a talented group, particularly the lead singer Bri Arden.  Chalk that up as another good reason not to stay indoors on a pleasant Saturday afternoon.