Programming

All posts, articles, pages that have anything coding and programming related. For sections or a finer selection, navigate to sub-categories.

Using arrays of checkboxes to store and retrieve WordPress options

I am into a complex task: for some time I’ve wanted to update the theme of this site and make it more versatile. Despite my obvious lack of time, the content is increasing steadily, so is the number of visitors, and I feel more and more often the need to structure better all these posts […]

Simple and default UIPickerView

UIPickerView Tutorial — part 2

Before we continue the second installment in the series of basic tutorials about UIPickerView usage and customization, a short digression. Most Cocoa/ Cocoa Touch tutorials assume that all connections to delegates, data sources and outlets are done visually in XCode. Our previous example was no exception. You can see from the project (gave the link below) […]

Simple and default UIPickerView

iOS 7 UIPickerView Simple Application

Recently I was asked by a friend to provide some support with UIPickerView in iOS 7. He was a bit puzzled by what it seemed to be the impossibility to pad the content of each picker view row to a certain distance from the left side of the UIPickerView. Basically, let’s consider the following example. […]

Usage of void in C

Going into some USB programming for a project I am into (on my Mac), I ran into this and I thought would be nice and useful to elaborate a bit. This is about void* pointers and callbacks in C. USB device discovery and probing under IOKit makes heavy use of callbacks, I wanted to write […]

Auto-increment versioning in XCode 5

Ok, this will be quick. There is no built-in feature or that supports automatic code versioning in XCode. I am talking about auto incrementing versions or build numbers in XCode plist, aka “CFBundleVersion” info.plist entry. Here’s a quick one for XCode 5. Make sure your target has an *Info.plist file. Add an entry there, as […]

Using LLDB Commands in XCode 4

The rationale for Apple’s move to LLVM and slowly parting with the aging GCC has a long history and is out of the scope of this brief tutorial on LLVM commands. The primary reason for switching from GCC to Clang — probably — is the incompatibility of GCC’s GPL v3 license with the goals of […]

NSString initWithBytes:length:encoding:

NSString initWithBytes:length:encoding instance method. A quick example. Uses a NSData object from the content of my blog’s first page and displays the string in an NSTextView outlet: The result: A variant, with a char array: The result:

Chasing Zombies in XCode 4

Ok, this will be a short one. Probably I will create a category like “code snippets and hints” to include all these small articles. This is about zombies in your coding projects and how to chase them. Enabling a project to trace zombies is different in XCode 4 than in previous versions. There is a […]

Core Animation documentation revisited

January brings updated documentation from Apple and I want to share the link to the  completely rewritten Core Animation Programming Guide. The release notes include reference to a “Major revamp, reorganization, and expansion to cover modern Core Animation behavior in iOS and OS X”. Just in time, as some of my projects rely on this. […]

NSOutlineView — Inside Out 2

Some good months ago I started a series on NSOutlineView that I didn’t imagine it will stir such an interest. To my astonishment, googling NSOutlineView ranks my post fourth in the search, immediately after Apple’s official documentation and some other two links: This intriguing situation (nevertheless inspiring for me) might have to do with the […]

AVRISP mkII unboxing

AVRISP mkII

Until recently I have extensively used my MacBook, AVRDude and USBTiny for my μController projects: Now I got myself a proper tool, the AVRISP markII, mostly because I wanted to use AVRStudio 6.0 features: Key features: Programs both flash and EEPROM Supports fuses and lock bit programming Upgradeable for future device support Supports target voltages from […]

XCode 4.3.3 – how to edit build settings

Working on my Logic Analyzer project, I wanted to setup a combined target structure in XCode, to have the complete E2E scenario built, from μC firmware to the cocoa libraries and application code. This means adding custom targets for μC build and upload. Well, as a short reminder, for now I am using a simple Arduino […]

Logic Analyzer!

…and not only software (maybe). OK, to keep things short, I got tired by limitations of my Saleae logic analyzer, especially on the software side so I decided to build one. This is my new project: a DIY logic analyzer that I will hopefully use to better extent in my other projects. First results promising. […]

NSOutlineView — Inside Out

This is the first part of a series I intend to maintain on NSOutlineView. Some NSOutlineView basics and a very simple example.

Micro Project IDE - general IDE preferences - colors

Going Low Level

Some time ago I have on boarded on a very ambitious project that I though could be overkill, nevertheless I have persevered in my ambition to prove it is doable. However, as I needed to dig a bit into Assembly language, I have gathered some resources I thought it might be useful to share here.

RFM12B Command Calculator for Mac

RFM12B Command Calculator for Mac

Inspired by this project for RFMB12 and needing a similar one for my Mac, I started to build one myself: Next – a version for iPad. Stay tuned. 😉

Webpage design thumb

Redesigning the blog

I decided a need a new theme for this blog. Rolled my sleeves and started to work.

Keyboard shortcuts in XCode 4

First things first. Let’s present the navigator shortcuts. The Workspace Window has the following for areas: Opened with all areas active: Pressing cmd + 0 hides Project Navigator (left area): Pressing opt + cmd + 0 hides Utilities Area (right area): Pressing shift + cmd + Y hides Debug Area (bottom area). Always useful to […]

How to create Arduino brush for Syntax Highlighter

For my Arduino lessons I needed to add WordPress support for Arduino syntax highlighting. A custom brush for SyntaxHighlighter plugin that would format and color my Arduino syntax similar to the application (see here an example). This is what I did.

Globals and Singletons

My preferred approach to creation and maintaing global variables/ constants is by singletons and singleton instance[s]. Not only is an elegant method that adds compliance to a very important Cocoa design pattern, but also provides you a lot of flexibility.

Code for Weather Station prototype

I took some steps in learning the capabilities of Arduino Platforms. Below is the code of my Bluetooth-enabled temperature reader with OS X integration.