Monday, February 6, 2012

coderunner



Sometimes to try a small portion of code, I need to open a new project or I need to insert the code into my app delegate class which is very nonsense, I know. For example, I want to see how a specific date formatter works by writing the code and logging the results. To try these kinds of things, I don't have a separate workspace. So, I was so glad that I came across CodeRunner, which provides me with just the thing I need. It also has support for Python, Perl, Ruby, C, C++, Java and some more languages.  Now I'm so relieved :] 

code collector


Just began using Code Collector Pro for saving my code snippets. Now they're much easier to find and re-use yay!  

Sunday, January 15, 2012

an idea for a programming exercise


An idea came to my mind that could be a programming exercise for a newbie. I'll give the simplest example to get the idea. Suppose you have implemented a view controller that has a view which loads an image from a remote URL and shows a loading indicator until the loading is done. And then when the loading is done your view controller does some action.


For some reasons, you have implemented this functionality inside your view controller code. And luckily you have a newbie little sister who wants to be a software developer.  Instead of telling her to go get some bread from the market, you can as well tell her to go get your view's functionality extracted.


Her exercise would be to extract that view's functionality from your view controller completely. This way she'll get a stand alone view that goes and loads the image from the specified URL and tell a delegate that it's job is done. So, you'll get a reusable image loader component and a less crowded view controller and a trained little sister who has learned something about encapsulation, reusability and delegation :P
.widget { margin-top: 30px; margin-bottom: 30px; }