on tools and operating systems

Sometimes people ask why do I use MacOSX as my main work platform (isn’t that something to do with beliefs?). My answer is “good foundation with great user interface”. Though that can be treated as “he must like unix kernel and look&feel!”, it is not exactly that.

What I like is that I can have good graphical stable environment with some mandatory tools (yes, I used OS-supplied browser, mail, etc), but beside that maintain the bleeding edge open-source space (provided by MacPorts).

Also what I like, is OS-supplied development and performance tools. DTrace included is awesome, yes, but Apple did put some special touch on it too. This is visualization environment for dtrace probes and other profiling/debugging tools:

Even the web browser (well, I upgraded to Safari4.0 ;-) provides some impressive debugging and profiling capabilities:

Of course, I end up running plethora of virtual machines (switching from Parallels to VirtualBox lately), but even got a KDE/Aqua build (for kcachegrind mostly). I don’t really need Windows apps, and I can run ‘Linux’ ones natively on MacOSX, and I can run MacOSX ones on MacOSX.

There’s full web stack for my MediaWiki work, there’re dozens of MySQL builds around, there’re photo albums, dtrace tools, World of Warcraft, bunch of toy projects, few different office suites, Skype, NetBeans, Eclipse, Xcode, integrated address books and calendars, all major scripting languages, revision control systems – git, svn, mercurial, bzr, bitkeeper, cvs, etc.

All that on single machine, running for three years, without too much clutter, and nearly zero effort to make it all work. Thats what I want from desktop operating system – extreme productivity without too much tinkering.

And if anyone blames me that I’m using non-open-source software, my reply is very simple – my work output is open-sourced.

100 processes ought to be enough for anybody

I couldn’t resist to rework the famous phrase to portray 100 process per user limit in MacOSX. One would ask why would you ever want to run 100 programs. You don’t – it’s enough that every running Dashboard widget is a process. Every terminal window has multiple processes attached, of course, every application running (and they hide safely in dock even without windows). There’re as well various OS helper applications. At the moment when I type, there’re like 90 processes running on my system, and I’m not even doing any development work. There is a solution for that, hidden in operating system internals, but what should regular user do?

Imagine Apple keynote:

  • Presenter: Here I’ll add magnificient amazing superb Dashboard widget. Oh wait, it doesn’t add, something is wrong, haha, it happens sometimes, doesn’t it?
  • Voice from crowd: There’s a nice undocumented file that has nice undocumented option that you can change!
  • Presenter: Yay, see, our system can do pretty anything, even run more than 100 processes!

Solution:
Create a /etc/sysctl.conf file and add following lines there:

kern.maxproc=2000
kern.maxprocperuid=1000

Then type following commands:

sysctl -w kern.maxproc=2000
sysctl -w kern.maxprocperuid=1000

Then you’d have to log out (or restart) and login. Puff, magic capabilities activated. Thanks, Steve!

printing envelopes in macosx

I had to print address labels on an envelope (people still need to use snail mail sometimes). I used to be spoiled by MS Office, so I started OpenOffice and tried to do something there. I failed:

  • It didn’t print “landscape” whatever I tried to do, didn’t save settings, barf.
  • It complained that locale “” did not exist, so I couldn’t have my street name spelled correctly.
  • Ah, sure, it crashed several times, it’s 2.0 experimental Mac Intel build, so I guess it must do that, in order to show how difficult QA is. :)

So I opened simple text editor and tried to do it from there. I failed too, because didn’t understand how to transform simple text files into rotated envelope print. It was either rescaled or simply wrong somewhere else. That counts as failure too. I tried to do that from TextMate too, but it didn’t like my tries either.

So I searched the web for hints. It wasn’t a real search, because first title of first hit did tell me exactly what to do: Address Book. The solution is simple, select recipient, print. Sometimes I still am too power-oriented :)