i’ve been working on some more objc stuff lately. i followed along with become an xcoder which finally, at least for me, made the connection between interface builder- and things like IBOutlet, IBAction, and custom classes that seem to be missing or glossed over in other books that i’ve read- and xcode. as a follow up to my last post , i just wanted to mention that i’ve finished two mini objective-C/cocoa apps. these aren’t terribly complicated, and were just a smidge more challenging than a command-line tool, but fun and instructive anyway.
first one was a test to see if i could write something from the ground up that actually worked. surprisingly, i could and it did. so the second one was made a bit more useful- it calculates squares and roots of a given number. if the number does not have an integer root, it will display the closest integer root, as well as the square of that calculated number. sounds more confusing to describe than it was to write. if anyone wants to give it a go, here it is:
solo
(obviously it will only run on OS X- just drop it in your applications folder.)
this just brought me a huge step closer to finishing that homework machine i dreamt up a few months back.
this is what i had for breakfast:

also, this book appears to be one of the more useful “hands-on” cocoa/obj-c tutorials i’ve looked through. the most interesting part of it is that it actually goes into the help and documentation parts of xcode. the other books i’ve looked through seem to skip any mention of api searching and assume you know where it is or what you are looking for. i don’t think there’s any one book out there that has everything i’m looking for, but this one seems to be a nice compliment to the others i’ve checked out so far.
remember a few days ago when i was complaining about my difficulties getting rails set up and running? well, here’s how it all turned out.
the error i was getting (”Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock”) was caused by two things:
- i forgot to start the mysql server before trying rake, and
- i didn’t edit .bash_profile correctly.
the first thing to fix was pretty obvious- start the mysql server from within system preferences.
after doing that, i got the inspiring “rake aborted! Unknown database ‘demo_development’” error. as i was going step by step through one of my many sets of installation instructions (this time browsing through Beginning Rails), i realized i didn’t have a .bash_profile file and that i may not have actually created a database. i thought i remember adding it when first setting up this project, but it wasn’t there. this was fixed by creating the file and adding the line “export PATH=”/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH” ” and then creating a database with “mysqladmin -uroot create demo_development”.
crossed my fingers, gave rake one last go, and all is now well.
ps. yes, this post is partially a reference for if when i screw this up again.
about a month ago, i went to Right to Move to pick out a frame. projects there are given 30 days to be completed.
i was getting a bit worried earlier this week because i had delayed starting until after my exam, and my 30 days ends may 5th. i went in on monday- perfect because it was rainy and not busy- and got a good start. tuesday when i showed up, there weren’t any workspaces available for most of the time they were open, and i ended up only putting on some new brake pads. yesterday, same thing. i didn’t get in until 8pm which was about an hour before closing time. luckily i worked quickly and got it all together.
this is what i built this week:
-
-
my horseless carriage
-
-
1 chainring, 8 gears.
-
-
no front brakes
if i count all the time i put into it, including rummaging through boxes for miscellaneous stuff like a matching set of pedals, then it took me about 5 hours to get it together. sure, i decided not to put brakes on the front or have more than 7 gears, but it’s almost exactly what i was looking for in a bike. it’s fast, light, and, unlike my last one, actually stops.