Wednesday, April 28, 2010

interesting note

nota bene: trying to access your local django admin site with localhost:[port]/admin fails (probably) because localhost is not a FQDN, so writing out a cookie fails.

Use 127.0.0.1 and rejoice.

Wednesday, April 21, 2010

git push origin master # kick punch it's all in the mind

Just created my github repo, think I'll add a few more things I've done lately in ruby and possibly Obj-C.

Here's a ruby commandline tool that will correct some spelling mistakes.

There's an rspec file and another that will generate mistakes and then fix them. The only outstanding but I never fixed was that String.squeeze() is too general - you can't tell it to only squeeze down strings one at a time, so I'll need to write some more to handle cases like 'sheap' -> 'sheep'.

ruby fail

Don't do this:

#/usr/bin/ruby
arr = Array.new
something = "hello world"
arr.push(something)
something = "whoops"
puts arr #sends 'whoops' to stdout

Found this out while working on a commandline utility that corrects spelling errors. I was looping through the characters in a string, potentially altering the word we were given and then pushing the result into an array that held the values we might want to return (I was going to post-process them as well).

Implementing a deep copy in ruby didn't strike me as a good use of time, so I returned the first 'correct' value instead of returning an array of possible corrections. I will probably post this to my github later, for posterity.

Friday, April 2, 2010

musing on views and view controllers

Anyone have any idea how to manage a view controller that may have an arbitrary number of views? I'm thinking to have a base view that the other views are descendents in a hierarchy of [thisView addSubView:anotherView] which should be easy to do since I'm storing them in a mutable array.

Next iphone app : something that doesn't involve an arbitrary number of UIImageViews.

edit: since the arbitrary number of views do not necessarily need to know about each other, this is best accomplished by having a ViewController subview one master view that has all of the subviews in its hierarchy. This is probably the best approach unless you need to worry about layers and or clipping.
[thx brian]

Wednesday, March 31, 2010

Stop! backup time.

Today I configured my mac mini server + 1TB external usb drive as a networked time machine device, since I haven't actually made a backup of my data since... ever? It was a long time coming.

I got backups running so long as I'm at home and on the network. :-D

Server OS not required, afp is bundled with OS X and you can manage it through system preferences. More info...

Tuesday, March 30, 2010

int i; while i {look for work; drink coffee; i++}//same as it ever was

Well it's been a while since I posted here. Maybe I'll start tracking some iphone development here.

....oh and I am currently unemployed, so if you need a software engineer with a range of skills all across the board (from front end to back end and back again), hit me up.

Thursday, January 15, 2009

System.Threading.Thread.Kill();

Perhaps my previous posts were a little hasty. The previous months have been interesting, to say the least. I still intend on maintaining this blog and talking about some projects I'd like to undertake (some in Python, others in .Net) but I feel that this would be a good place to sort out the state of my life.

Since my last post I have
  • finished writing a complete system tray application for the usb panic button
  • failed miserably at porting said app to vista (I'll blame this on vista not liking filter drivers and the pain of using usb devices on a virtual machine)
  • wrote up documentation for the 5+ projects I was working on
  • quit my job
  • started working for Apple
That's quite a leap from code wrangler, late night html updater, junior developer at a small IT Consulting company to working for some unimaginably large corporation. What is most interesting here is how this affects how I will approach blogging. Here's a sneak preview of what I'd like to do in the next month:

"Computers frustrate me. Specifically, the sheer amount of text that is around on any computer system, or that you are presented with when installing software, is enough to make my mind shut off and long for pictures of kittens. Let's see if we can do something about this. Wouldn't it be nice if you could wake up one day and all the text on your computer was gone?"

Unfortunately, I'm going to need to travel through .dll Hell and back to bring any of this to life. We'll see how that turned out next week.