Stuff Yaron Finds Interesting

Technology, Politics, Food, Finance, etc.

Articles related to software I run on or use with my PC

Sharing Printers Between OS X Boxes in a Screwed Up Local Network

One of the reasons I bought a Mac for myself and my wife is that I could never get printer sharing working between Linux and Windows. I figured if Marina and I both had Macs then the problem would be solved. Unfortunately, I was wrong. While Apple has mostly embraced Bonjour technology there is still one major area that is left out – Apple's Printer Server (e.g. the open source CUPS) which uses its own multicast based discovery solution. When I hooked my USB printer to my OS X box and turned on printer sharing I couldn't get my wife's Mac to see the printer! The problem turned out to be that both my wife and I's computers have unique IP addresses that we get from our ISP's DHCP server. Unfortunately the ISP's DHCP server gave us addresses in different subnets! CUPS default configuration does not allow printer sharing between machines that are not on the same subnet. The CUPS configuration can be overridden fairly trivially but I don't want to because it would either mean hard coding in my wife's IP address (which changes) or allowing the whole world to print on my printer (which I'd rather not). Thankfully there was a really trivial solution to the problem that was pointed out to me by Stuart Cheshire, the father of Bonjour.

Read More

Ode to Apple – The iMac Rocks!

Atoning for my mistake of buying my wife a Dell laptop running XP that has more or less been a constant nightmare over the years we've owned it I decided to give her a birthday present a bit early – a new iMac. My wife is no technophobe but similarly she is not a technophile. To her a computer is a way to get things done. But her attitude changed when I get her the iMac.

Read More

PerfAnal – a simple but workable approach for Java Profiling using hprof on OS X

I have written a bit of Java code that does some financial analysis for me. Unfortunately it takes forever to run, even on my dual proc G5 w/a gig of ram it could literally run for over a day (it's those pesky 5 nested for loops, hey don't look at me, the equation it's solving has 12 variables and using some algebra and domain knowledge I could get it down it down to 5 independent variables but at that point I just had to iterate). Thankfully there were lots of obvious optimizations that I could apply that got the program down to around 4 minutes and then making the program multi-threaded got it down to around 3 minutes. But that is still a while to wait. So I decided I wanted to do some performance profiling.

I use Eclipe so it was natural to look a Hyades but the requirements included the Eclipse SDK which, near as I can tell, isn't currently available for OS X and anyway the whole project just seemed a bit complex and what I needed was really simple. I next tried out jMechanic which looked to be at just the right level of sophistication for my needs. Unfortunately it never seemed to quite run right. I would create a profile, run the program, see some hprof output in the console, etc. but when I tried to view the results using window->show view->other->profiler->etc. I never saw any data. I even got various errors from Eclipse.

I briefly considered using a commercial product but come on, my needs are trivial and the commercial stuff is expensive. So finally I decided to look into hprof directly. This is the performance profiling technology built into the JVM. Hprof is more than powerful enough to give me the level of detail I needed but the output is, to put it kindly, a bit hard to read. After looking around for a hprof viewer I found one that seems to do a pretty good job, PerfAnal.

It's very simple and doesn't have many features but it does a good job of providing a view of what the code is doing. This article gives a very nice overview and got me up and running within about two minutes. The end result? It helped me find some snags in my code (I never realized just how incredibly expensive it is to declare arrays in Java and I had left in some error checking code that I no longer needed) which got my performance down to around a minute. So I'm a pretty happy camper.

More DVD Fun with OS X

Marina had the idea of sending my father a copy of UNCONSTITUTIONAL. My father returned the favor by sending us CELSIUS 41.11. Ironically enough while both UNCONSTITUTIONAL and OUTFOXED ran fine on VLC but caused my machine to crash on Apple's DVD player pretty much the opposite happened with CELSIUS 41.11. It ran on Apple's DVD player without problem but if I tried it on VLC then VLC got an error that screwed up the sound. In fact, if I ran VLC and then ran Apple's DVD player the sound stayed broken. The only way to get the DVD to play right was to kill VLC and run Apple's DVD player which for the first time didn't crash my machine! I guess Apple must be right wing.

OS X + G5 != DVD Player, but there is hope!

I just got a new DVD, UNCONSTITUTIONAL. I intentionally didn't run it full screen because I didn't want my machine to crash again. Unfortunately that didn't work. After running for twenty seven minutes and fifty seconds my machine died hard. Keyboard, mouse, DVD player, everything dead. The only sound a stuttering from the speakers. The only difference from my previous experience is that a friend told me to hold down the power button for five seconds or more instead of just pressing it the way I did last time. That did work so I didn't have to pull the plug. Of course the point of buying a Mac was to not have to know things like that.

It appears that I'm not alone in having this problem. The previously mentioned thread suggested two possible solutions. One was to turn off one of my dual processors but a number of people said this still caused problems for them. The other was to use a different video player than Apple's DVD player. VLC was suggested. As an experiment I played OUTFOXED full screen in VLC, turned off the sound and went to bed. I came back to my computer the next morning to find it running just fine. So for the moment I have a workaround. But I can't say it's a great work around because the VLC player is no where near as easy to use as the Apple player. Also note that at least on my LCD screen I found switching to video-deinterlace-blend made a big difference when blowing the picture up beyond normal size.

Come on Apple, this is pathetic! The previously referenced thread lists numerous people having this problem and you can safely assume for every person who posts there are many, many people like me who have the problem but didn't post. Just admit the problem exists and fix it already!

Running Linux Live on a Dell Inspiron 8200

My wife's WinXP box died, again. I've been running the box for two years and that is just too long for windows. It really needs a full reformat and reinstall. But I don't have the time to deal with it now so I decided to instead to put Linux on my wife's machine. 98% of her time is spent in FireFox so she doesn't really care what the OS is. Wanting something easy I decided to try out several 'live Linux' distributions. These are distributions that run completely off a CD, no hard disk installation required. The one I found worked best on my wife's Dell was Mepis but even that will never stay up more than two days.
Read More

Escaping Excel X to OOo 1.1.2

I've previously described just how deeply awful Excel X is when using Visual Basic. But things recently got even worse when I found a bizarre bug in Excel X's For Each operator that prevented me from iterating on an array. Desperate for some kind of alternative I checked out Open Office for the Mac again and found a new version, 1.1.2, which is significantly better than the previous version and fits my needs much better than Excel X.
Read More