Archive for the 'Geekfest' Category

on Cocoa programming.

Posted in Commentary, Geekfest on September 7th, 2008

IMG_9980

Still working through the decision process between ecto3 and marsedit.

I’m thinking I’m going to stay with ecto3 for now.

On the news side:

Started working my way through Cocoa Programming for Mac OS X by Aaron Hillegass. I’m about through the first 8 chapters. Things to know if you are going to be doing this:

  • This isn’t like working with Delphi, Visual Basic, Real Basic, or any of the other “object oriented” systems. This is much different.
  • You really should learn Objective-C first. Even though he says you should have a moderate knowledge of Objective-C, you really should spend time learning it well. The examples and “challenged” in this book assume a fair amount of knowledge. Some of the exercises and examples really don’t make that much sense until you spend time learning Objective-C.
  • It really helps if you have access to the Apple documentation. For example, in chapter 8, you go through some really cool stuff on bindings. For me it was completely magical until I went through the Apple “Cocoa Bindings Programming Topics”, “Key Value Coding Programming Guide”, and “Key Value Observing Programming Guide”. Once I worked through the basics of those documents, chapter 8 went from being a really mystical, chant invoking exercise, to more programming with some occasional leaps of faith.
  • Cocoa programming is based on some very extensive frameworks. If you are like me and you want to know how the frameworks work - don’t, yet. Just take some of the stuff as magic and assume that it works. Once I gave in to the “I’ll figure out how that works later” concept, this has started flowing better for me.

I’ll be posting more on this as I go through the exercises on this book. I’ve also started creating side challenges for myself to figure out how some of this stuff works. I’ll post those as well in case you need some additional views. Remember that I’m just learning this stuff so take this material as you would any other beginners: an example of how it possibly works correctly. To get you started, here’s a simple program that I wrote that uses a couple of controls, and a text field. The first one uses bindings to get it’s job done. The second one is the exact same, but uses an Object Controller to mediate the bindings. For me, until I saw both of these simple projects working, I couldn’t really “get” the different between just plain bindings and what an object controller bought for you. Check them out: myBindingsFun and myControllerFun.

Hope that helps someone

let’s try marsedit for a change

Posted in Geekfest on April 20th, 2008

It’s hard to decide between ecto and marsedit. So I’m going to try marsedit for a little bit and see if it does better.

Note that Ecto is in late beta for version 3 which is complete rewrite. That means more fun for me while I try both of them out.

Have to tell you that so far, marsedit 2.1.2 seems a little bit easier to use and has a better preview mode.

ok - back to ecto and some really nerdy cool wii+mac stuff

Posted in Fanboy, Geekfest, OOTT on April 11th, 2008

Turns out that the Wiimote can be connected to the Mac via bluetooth. Apparently, there’s a ton of cool things you can do with this, including control all of the functions on your mac. You can use DarwiinRemote to pair the mote and nunchuck up. With it you can control VLC and most other media programs. Pair it up with RemoteBuddy and just about anything is possible.

If that’s not cool enough, some people have paired it up with some seriously cool audio processing tools (KymaX) with OSCulator. I’m in nerdery heaven. Check out this video:

That’s cool, but this stuff on the PC is even better. Someone - please port Johnny Lee’s stuff over:

A cool thing or two

Posted in Geekfest on April 11th, 2008

A few different places have been raving about Flock. It’s a web browser + rss reader + email reader + flickr/facebook/youtube/del.icio.us, and web blogger interface all in one. Not convinced that this is my thing, but worth a try. Posting thing post from there.

Also while I’m at it, check this out: Max from sbooth.org. Cool little util to transmorgrify your audio from one format to another.

Blogged with the Flock Browser

Tags:

MacBook sleeping done right: SmartSleep

Posted in Fanboy, Geekfest, OOTT on March 18th, 2008

If you ever had a powerbook, you remember the almost instant sleep that happened when you closed your laptop. Somewhere in the late powerbook or macbook/pro timeframe, Apple changed the behavior from sleep (save contents in RAM only) to hibernate+sleep (save contents in RAM and dump to disk). There’s been undocumented PRAM settings that let you change the behavior so that you can select sleep, hibernate+sleep, or hibernate only. However, it was a setting that affected the system globally.

However, now Patrick Stein, the guy who wrote JollyFastVNC (should be a separate blog post), has released SmartSleep. From his website:

SmartSleep.prefPane

DESCRIPTION
SmartSleep.prefPane is a preference pane that dynamically sets the sleep state of your machine. It’s a successor to Hibernate.prefPane.

The Problem
Your macbook or macbook pro knows the following sleep states:

sleep: machine will go to sleep only (saves state in RAM only, battery keeps RAM contents)

sleep & hibernate: machine sleeps and hibernates. (default)

hibernate only machine will go to hibernate only. (saves state on disk, battery will not be used)

Just sleep means that the notebook will go to sleep fast, but you loose the ability to change the battery as the battery is needed to keep the contents of the memory (RAM).
Just sleep and hibernate will wake the computer fast, but sleeping will take ages as the contents of the memory are saved to disk before entering the sleep.

The solution
SmartSleep let’s you select each select sleep state. Additionaly the new SmartSleep state lets your notebook just sleep while the battery has a high level. If the battery level drops below a certain point ( default is less then 20% or 20 minutes ) it will switch to sleep and hibernate. So you have the best of both worlds.

Open Source SAM/QFS

Posted in Commentary, Geekfest, Storage on March 18th, 2008

For those of you that have never heard of Sun’s (formerly LSI) SAM/QFS, this is a high performance filesystem that also has high performance HSM capabilities. I’ve installed this and used it in some very large sites. Amongst the many good things you can do: multiple reader/multiple writer clustered file system, dynamic inode creation, dynamic migration and staging (even in the middle of a file when you do a fseek), file size based volume selection (let’s you send large files to volumes optimized for large files and small files to volumes design for them all in the same filesystem).

Now if the SAM/QFS guys and the ZFS guys could merge this stuff together, oh-la-la!

Get your copy here:

SAM/QFS at OpenSolaris.org:

Cocoa based VIM

Posted in Geekfest, OOTT on February 25th, 2008

So, over the weekend, I stumbled across a Really Good Thing. I’ve been using VIM and the mac carbon based GUI for VIM for a while now. I’ve even set it as the default editor for TXT files. However, I found myself right-clicking on files and selecting to use TextEdit more often than not. Why? Because TextEdit opens up much faster. I mean much faster. Then, by happenstance, and a lot of bored tv watching and web clicking, I stumbled across this Cocoa port of the VIM gui. On top of looking much better than the default carbon gui, this one fires up almost as fast as TextEdit. It also has cool support for transparencies, tabs, and a full screen mode that takes all of the non-sense off of the screen and makes you FOCUS. It’s actively being developed and looks very promising.

macvim - Google Code:

mental sausage

Posted in Commentary, Geekfest, Musings on February 14th, 2008

Merlin Mann might be one of the funniest, but also most insightful people ever. He recently made available the presentation he gave at MacWorld. In this brilliant presentation, he talks about how to keep our time and attention focused. He also gave me another reason to buy a domain name - mentalsausage.com.

Check out the presentation:

nerdery and why excel needs help

Posted in Geekfest on February 8th, 2008

So, I was just at a customer site today. They have an interesting storage problem. Part of it was that we needed to map a whole bunch of hosts IP addresses to their VLAN id’s so that we can determine how much storage was in each VLAN. This will help architect our backup solution. Well, there was no such simple mapping to be used, so we started with an excel spread sheet that had all of the hosts names and each of their drive letters (capacity and free space). Another excel spreadsheet had the hostname to IP mapping. Yet a third spreadsheet had the subnet mask to VLAN tag mapping. Problem was that none of these represented the data in a consistent manner. The storage spreadsheet had the short name of the hosts. The hostname+IP spreadsheet had the fully qualified domain name and the IP addresses in a full decimaled notation (i.e. 010.010.005.013 as opposed to 10.10.5.13). The VLAN spreadsheet had the domains listed in the standard x.x.x.x/x notation. Well manipulating almost all of these turned out to be mostly doable via excel. But, the conversion of 010.010.005.013 to something sensible turned out to be not so easy. Excel’s string functions are, ahhh…, rudimentary. So, rather than waste a whole bunch of time writing an excel equation that had a whole bunch of “=left(A2,search(”.”,A2,(search(”.”,A2)))” nonsense, I turned to my trusty command line on the mac and turned to sed. I copied the column with the IP’s to a text file called aa (one IP/line). It looked something like this:

slick:~$ cat aa
010.003.001.208
010.004.001.040
010.007.096.016
010.004.001.226
192.168.012.032
192.168.013.021
010.002.001.160
010.010.004.164
010.010.004.165
010.010.004.049
010.010.004.051
010.010.004.052
010.002.001.034
010.010.003.039
192.168.013.200
10.2.19.92
10.2.19.91
010.010.003.052
010.010.003.053


I then wrote this shell one liner:

slick:~$ while read i; do echo $i | sed ’s/^0*\([0-9]*\.\)0*\([0-9]*\.\)0*\([0-9]*\.\)0*\([0-9]*$\)/\1\2\3\4/’; done <aa


and it output this:

slick:~$ while read i; do echo $i | sed ’s/^0*\([0-9]*\.\)0*\([0-9]*\.\)0*\([0-9]*\.\)0*\([0-9]*$\)/\1\2\3\4/’; done <aa
10.3.1.208
10.4.1.40
10.7.96.16
10.4.1.226
192.168.12.32
192.168.13.21
10.2.1.160
10.10.4.164
10.10.4.165
10.10.4.49
10.10.4.51
10.10.4.52
10.2.1.34
10.10.3.39
192.168.13.200
10.2.19.92
10.2.19.91
10.10.3.52
10.10.3.53

So, the question is, can any of you (the four people that read my blog) do better on the RE in the sed statement?

Also, Microsoft, please add regular expressions to the function list! If not Steve Jobs, Numbers?

Zoogmo - Your Online Backup Community: Unlimited. Free. Secure. Automatic

Posted in Geekfest, Storage on February 7th, 2008

OK - now this is an idea that I’ve had in my head for a while and it looks like someone has done it. This service lets you set up “partners” with friends that have big setups to do off-site backups. In essence you set up an off-site encrypted backup at a friends data control facility … I mean home computer setup. The only downside I see is that this is a windows only tool right now.

Anyone out there want to test it out with me?

Zoogmo - Your Online Backup Community: Unlimited. Free. Secure. Automatic: