View all posts filed under 'Programming'

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

Saturday, 3. December 2011 15:23

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:

Shell
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) | Author:

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

Friday, 2. December 2011 20:54

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) | Author:

Fixing CLSQL on OSX 10.5.8

Thursday, 7. April 2011 8:31

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) | Author:

Setting up Lisp & Hunchentoot on a web server

Sunday, 15. August 2010 13:35

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) | Author:

Hunchentoot behind a proxy server

Tuesday, 18. August 2009 12:30

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) | Author:

Setting up SLIME Tramp filename translation

Tuesday, 18. August 2009 6:23

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) | Author: