iOS launch crash with reference to “setValue:forUndefinedKey:”

Saturday, 3. December 2011 15:23 | Author:

Just found that I need to be really careful when refactoring code that requires me to remove views from my project. I spent about 15 minutes trying to understand what the hell was going on, I was just receiving the following error:

1
2
3
4
2011-12-03 15:04:52.341 UIScroll1[80115:f803] *** Terminating app due
to uncaught exception 'NSUnknownKeyException', reason:
'[<UIScroll1ViewController 0x6d70990> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key customView.'

I tried completely deleting my project from the device and simulator, running it again and still the same error. It turns out that I had removed all code references to customView but completely forgot about removing the outlets in the xib (Yeah still not a fan of storyboard).

So I guess I won’t be CTRL-dragging to hook up outlets anymore, it’s actually better to CTRL-Click on element or using the Connections editor because that way I can easily see warnings near broken or invalid connections.

Category:iOS, Programming | Comment (0)

Starting out on iOS development and the fear of failing in Programming

Friday, 2. December 2011 20:54 | Author:

For the last month or so I’ve been trying to get my foot into iOS development. This has proven more difficult than I had anticipated mostly because of my lack of spare time to dedicate to such endeavor. One thing I’ve come to realize is that even though I’ve been programming for a couple of years now, I’ve been suffering from a widespread disease amongst programmers, the lack of confidence and fear of failing.

Countless times have I taken on some personal project that I never fully develop because I get stuck thinking about the “right” way to achieve something. I tend to get blocked on the “how should it be done” instead of the “how can I do it”. This time I’ve decided I will not go down that hole and, surprisingly, things are coming along quite nicely. I’ve finally realized that more important than trying to do the things the “right way” (if there’s such a thing) is to actually get things done.

It’s amazing how much more you learn when you spend hours banging your head on the wall trying to solve some problem, trying out a multitude of different approaches with an open mindset without fear of failing or doing it wrong. This process leads to such a great feeling once you finally get it! Thinking back to my first experiences in programming, this was the feeling that got me interested in programming. Back then, I had absolutely no fear of failing, all was great because I was fully aware that all those failed experiments would be followed by that wonderful feeling of finally solving the problem by myself.

So what made me forget what was really fun and fundamental in programming? I blame the fact I work as a programmer for a living, mostly doing uninteresting stuff on the web using uninteresting languages like PHP (sorry guys). But most of all, I blame the fact that in my work I can’t actually program the way that always made me happy, banging my head on problems, pushing even further when a problem is taking more than a couple of hours to solve, experimenting crazy ideas that I already know won’t work but that might gain me some insight into the inner workings of something else. All these are great but not possible in my day job, deadlines are deadlines and budgets are budgets. Working as sole programmer on the team doesn’t help either, having no one else that relates to what you do just makes it worse.

So, wrapping it all up, if by any chance you are starting out on programming my advice is that you keep pursuing the fun in it. Keep trying out approaches. Keep present the idea that all those failed attempts will bring you pleasure. To sum it up, just do it.

My many thanks to the Apple team for creating the technology that reminded me once again of what is really important about programming and most of all of how fun and self-rewarding it can be.

Category:iOS, Programming | Comment (0)

Fixing CLSQL on OSX 10.5.8

Thursday, 7. April 2011 8:31 | Author:

I recently had the need to run some older Lisp code on OSX 10.5.8 which used CLSQL, unfortunately this was enough to cause me a couple of lost hours trying to compile and load the CLSQL helper libraries.
[...]

Category:OsX, Programming | Comment (0)

Setting up Lisp & Hunchentoot on a web server

Sunday, 15. August 2010 13:35 | Author:

For this post i decided to explain how i’ve setup Common Lisp Hunchentoot webserver running on Ubuntu 8.10 and how to set it up for remote interaction using Emacs and SLIME (Superior Lisp Interaction Mode for Emacs).
[...]

Category:Common Lisp, Programming, Server administration | Comments (12)

Showing hidden and *nix files on OSX Finder

Sunday, 16. May 2010 11:45 | Author:

Coming to OSX from a Linux background it struck me hard that there isn’t a single Finder preference/option to allow me to see files starting with a dot (hidden files) in Finder listings. Knowing that this is probably due to security concerns that not-so-advanced users will mess up their whole system, nevertheless i believe Finder should provide this option. I’m used to the great Xubuntu where i simply press Ctrl+h to enable or disable viewing the hidden files, this might not sound like it but for me this is a real productivity booster.

Although i couldn’t find such a perl in OSX i did however find on google a way to allow me to view those pesky files with Finder.

Fire up a terminal session and type the following command:

defaults write com.apple.Finder AppleShowAllFiles YES

Then simply hold down Option and click on the Finder icon until it the context menu shows up and then select relaunch. Voilá, if everything went ok nest time you open finder it should show all those files for you.

Edit: Apparently this limitation doesn’t exist anymore in Snow Leopard but since i still haven’t managed to install it on my laptop i have no way of being sure.

Category:OsX | Comment (0)

LGE-500 Hackintosh

Tuesday, 27. April 2010 17:04 | Author:

I always wanted to give Apple’s OsX a test-drive, it always appealed to me as the best looking Operating System out there but i would never throw away all that money without first giving it a real test-drive. When some of my colleagues got their hands on their macbooks and started bragging about how great it was, making fun about everyone else at the office, i decided i really had to give it a try. I had already heard several stories about people successfully installing OsX on regular PC’s and since i couldn’t really spend the bucks to get the real thing i had to give it a try.
[...]

Category:OsX | Comment (0)

Resizing a VirtualBox Disk (VDI)

Thursday, 21. January 2010 18:13 | Author:

While installing some software on my virtual machine i ran out of disk space so i went out googling and found a nice tutorial. I don’t really like doing this, kind of pasting someone else’s article but, since i keep this blog mainly as a reference to myself and i believe i will most surely need it later, i’ll explain here step by step what i did to accomplish this task.
[...]

Category:Virtualization | Comment (0)

Solving Gmail IMAP error ‘Web login required (Failure)’

Thursday, 21. January 2010 12:41 | Author:

At work we have been using Google apps to host some of our customers domain e-mail accounts. The other day one of our customer collaborators complained that when accessing e-mails through IMAP (on Outlook 2007) he was getting the following error:

Web login required (Failure)

After repeatedly checking his IMAP settings i decided it was not a problem with his settings so I looked around the web and found a quite dated tutorial (back from 2008). Since all my other approaches hadn’t worked i decided to try it, here’s the steps i followed:

  1. Logged in to the web portal with the gmail account that was returning that error
  2. Disabled both POP3 and IMAP functionality and logged off
  3. Logged in with a Administrator privileged account for that domain
  4. Goto “Domain Settings” and section “New Services and Pre-release Features”
  5. Disable “Automatically add new services when they become available” and “Enable pre-release features”
  6. Saved these changes
  7. Re-enabled “Automatically add new services when they become available” which was the one i wanted
  8. Saved these changes
  9. Logged off (as Administrator)
  10. Logged in to the web portal with the gmail account that was returning the error.
  11. Re-enabled both POP3 and IMAP functionality.

After this the user reported that IMAP was working again for him. It amazes me that such a simple and dated (almost 2 years now) solution like this has worked but luckily it did.

Category:Server administration | Comment (0)

Hunchentoot behind a proxy server

Tuesday, 18. August 2009 12:30 | Author:

Having a lightweight http server (in this case Nginx) proxy request to Hunchentoot offers some advantages over letting Hunchentoot speak directly to the web:

  1. You can have nginx serve all the static files for you app, this way serving them faster while freeing lisp process for generating only dinamic content.
  2. You can take advantage of nginx caching strategies.
  3. You can use nginx for load-balancing.

[...]

Category:Programming | Comments (2)

Setting up SLIME Tramp filename translation

Tuesday, 18. August 2009 6:23 | Author:

Picking up from “Remote login with SSH key pair” and the updated “Setting up Lisp & Hunchentoot on a web server”, when i run emacs locally and connect to my running lisp + hunchentoot process on the server, the REPL alone, although awesome, is insufficient for my hacking need. I’ll need some way to work with remote files…

[...]

Category:Programming | Comments (2)