Summer Coding

2
Jul/09
0

One of my main hobbies is programming/developing/coding or whatever the heck you want to call it, and now that it is summer I’ve decided to sit out in the garden and doing my coding and work there. The LED screens on the MacBook Pro really help, and make the image perfectly visible. A little bit of reflection but my sunglasses take care of most of it.

I live on the Coast, about a mile away from the really busy touristy section so its pretty peaceful where I am, so its really relaxing to be sat outside, in the shade, just the sound of the birds and slight rustle of trees and doing some Cocoa/iPhone development. Also listening to one of my favourite albums (The Wall by Pink Floyd) is fast making this one of the best days coding of my life!

On a side note The app I mentioned yesterday for testing TuneBar Notifications is about 50% done. Its just a small app primarily for building and testing Notifications. It won’t however actually run them in the way TuneBar 4 will or link through to iTunes. You can however simulate iTunes with it and drag and drop artwork and edit song information to be able properly preview them. The app will be called TuneBar Workbench, and in time include facilities for creating and previewing controller skins. Workbench will include a Code Editor complete with syntax highlighter for those who wish to get in to creating TuneBar notifications and skins but don’t have access to a decent code editor (I’m betting that is not many, but still).

TuneBar 4 - HTML Notifications up and running!

1
Jul/09
0

Small update here, with two things. First off all I have setup a twitter feed specifically for TuneBar development. I’ll updating this on an near daily basis with information and possible small screen shots of TuneBar 4.

Y0u can follow it here: http://twitter.com/tunebar

OK, now on to the bigger bit of news. I have just passed the second major mile stone for TuneBar 4 (I have set 6 of them, so thats 2 down 4 to go). The first milestone was the core engine of TuneBar 4 which has been completely and utterly rewritten. TuneBar 2 was the last complete rewrite, and although TuneBar 3 rewrote large sections there was still underlying bits of legacy code from TuneBar 2. Hell there was even a couple of AppleScripts in there from TuneBar 1!!

Anyway the second milestone is the Notifications engine which is now for the most part completed (a few small things to add in here and there and a lot of tidying up of the code!). One of the features a lot of people have requested is the ability to be able to create Notifications. That and create skins with HTML. Well as of version 4.0 this will be possible (on both counts). The implementation still feels a little clunky at the moment so I will be refining and polishing it off after I have all features completed.

TuneBar 4 HTML Notification

TuneBar 4 HTML Notification

Don’t worry this won’t be the default Notification of TuneBar 4, I have something a little better on the drawing board. The default TuneBar notification that has been around these past four years will no longer be the default notification style and be provided only as an optional notification style.

I will be posting documentation on how to create TuneBar 4 Notifications within the week, as well as a small application that will allow you to test them. The reason for this is that I will be running a small competition for creating a Notification, and winner will receive a free copy of TuneBar 4 ($12) and get their notification included in the final build of TuneBar 4. However I will only run the competition if I have enough entrants.

Snow Leopard, iPhone OS 3, TuneBar and File Actions

9
Jun/09
0

Hot dang, its been a while since I plucked up the time to post anything, so as you may have guessed, I got a lot to mention!

Snow Leopard

Not much to say on this front other than it looks truly amazing. The mere fact that they have cleaned up the system alone is a big plus for me. Grand Central is another big plus, as well as the Exposé updates. Of course a revamped Finder is nice, though it would have been nice to have tabs :(.

iPhone OS 3.0

I’ve been using the SDK Beta for a while now. Primarily for developing an iPhone app for a client, which I’m not yet at liberty to divulge, but as soon as I can I will post about it. My secondary reason will be following shortly.

I’ve got to say that out of everything in 3.0, tethering is my favorite feature. I spend a fair amount of time out and about and it will be nice to have net access on my laptop for those occasions. The same goes with the turn-by-turn directions on the iPhone and the TomTom application. Very nice.

TuneBar

I’ve got to say TuneBar 4 has been an absolute roller-coaster ride thus far. TuneBar 3 was primarily developed before I had any contract work, so my time was a lot more readily available. TuneBar 4 began development just I took on my first real paying job, and since then I’ve taken on numerous other jobs to help pay the bills and continue to find myself swamped and unable to put the desired time into TuneBar.

I am still working on TuneBar 4, and am working on some pretty nice features (or at least I hope they are), which I have no problems finally announcing now.

  1. Selectable Sources
    TuneBar 4 will support a selection of different sources such as iPhone/iPod touch, iTunes and Remote iTunes. This list may or may not grow depending on user requests. When I say different sources I mean the slide down controller (SlimBar), keyboard shortcuts and notifications will all synchronize with the new source. So when a new track on your iPod starts TuneBar will notify you on your computer. The controller will display current track information from the current source, etc.
    If your anything like me, then the place you listen to most of your music is your iPod, as its hooked in to the surround sound system. Now you can leave your iPod hooked up to it at the other side of the room, or in another room completely and keep control of it as normal using TuneBar.
  2. Last.FM
  3. My TuneBar
    My TuneBar is a service that I’m going to trial with TuneBar 4. Depending on how it goes, I’ll decide on whether to keep it running or not.
    Social Networks are getting increasingly popular and everyone these days wants to be part of one in a network of friends/followers/buddies/whatever. My TuneBar is a social network designed specifically for TuneBar allowing the following key things

    - Online record of your last 50/100/200 played songs for your friends to view.
    - Just listened to a track you really like, or think a friend would like? Recommend it to them.
    - Know what your friends are listening to. TuneBar will now notify you of what songs your friends have just begun listening to. You can of course disable this functionality on either end, choosing not to broadcast your current music, or not to receive notifications from other users.
    - My TuneBar will be completely free to all TuneBar users.

    As I’ve said, this feature is one I’m still unsure on myself. Last.FM is already a very big social music site and My TuneBar may just sit not doing much. I will run the service for 6 months, at which point depending on how active it is, I’ll decide if I keep it up and running or not.

  4. HTML based controllers
    By popular request you will be able to build controller skins in HTML/JavaScript and CSS now.

  5. Cocoa based controllers
    By less of a request you will also be able to build a controller in Objective-C / Cocoa as an attachable plugin to TuneBar.

As you can a lot of work is going in to this. TuneBar 4 is still very much in development, though my work load is now thinning out so I should be able to kick up the pace. I’m not pinning down a release date yet.

File Actions

The Core Engine for version 2 is now pretty much in place. UI is all that remains really. Features

  1. Plugins - Create new actions to perform on files using Objective-C, AppleScript or the shell.
  2. File System Observer - File Actions now knows about files as soon as they are changed, created or deleted… with out the overhead or latency of version 1.0
  3. Better rules system - You can now match against file name, size, extension, creation dates and contents.
  4. File Actions runs as daemon in the background now.

Well thats all for now. Let me know on thoughts and opinions.

Assembly

30
Mar/09
0

Assembly language is one of the lowest level programming languages around. There are many different dialects of it around too, (one for each processor architecture) making it possible that any programs written in assembly may be completely useless on a machine that has a different processor.

This is one of the reasons why high level languages such as BASIC and C became so popular. They were far more portable between architectures that simple Assembly. However compilers these days tend to add a fair amount of bloat to any assembly code that they generate. For example, a simple Hello World application written in C compiled with GCC 4 weighs around 32KB (29,248 bytes). However, after rewriting the application myself in Assembler it only weighed 16KB (12,608 bytes).

This is a pretty hefty size difference. Heck, its over twice as big!! If your dealing with programs that are large anyway this is kind of a none issue.

I have recently begun learning the Core 2 Duo assembly language (my seconds assembly language) and all though the concepts behind it are rather peculiar and a lot of concepts and rules from higher level languages just go straight out the window its surprisingly easy to pick up.

Here’s a comparison of Hello World in a few languages.

C:

#import 

int main() {
    printf("Hello World\n");
    return 0;
}

PHP:

echo "Hello World\n";

REALbasic:

msgbox "Hello World"

Assembly (i686):

	.cstring
output:
	.ascii	"Hello World\12\0"

	.text
.globl	_main
	.private_extern _main
_main:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$24, %esp
	movl	$output, (%esp)
	call	_printf_stub
	movl	$0, %eax
	leave
	ret

	.section	__IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5
_printf_stub:
	.indirect_symbol	_printf
	hlt ; hlt ; hlt ; hlt ; hlt
	.subsections_via_symbols

As you can see, assembly has a lot of VERY symbolic code and is the most incomprehensible to anyone who doesn’t know it. The other 3 you could at least take a guess at!

New MacBook Pro; Updates as well

17
Mar/09
2

Hello to all who are reading this!

I finally have a new laptop, and it only took 6 months after my old MacBook got sent back to Apple due to it constantly needing repairs. I should clarify that I did get a replacement almost as soon as it left, but I sold that not wanting to put up with the old plastic MacBook model any further. Of course new MacBooks had just come out and putting money aside for one was a strong reason for selling it :).

Well I have finally got one of the new MacBook Pro! I’ve got to say it’s very nice. Its good being able to go do some of my development work else where around the house, or even in the garden (weather permitting; lousy unpredictable UK weather). I’ve noticed a few glitchy things with it (though that seems to be more software than anything, so maybe 10.5.7 will fix it?)

Updates
On to the second part of this post. A while I go I said about the possibility of TuneBar 4 having a public beta released. Unfortunately other ventures of mine of distracted me from getting any beta like prepared with TuneBar 4, so its still not beta ready, though I will say that given the sheer number of “iTunes controllers” out there now, I’m having to think slightly outside of the box and offer something that they aren’t. It hasn’t been easy, but I’ve come up with a feature that I think will totally rock.

This feature also stems from another app I’m dabbling around with and thinking about creating, and basically I think the two would interface with each other quite nicely. If you want to try and guess the feature, or even the app feel free to do so. I will say nothing as to what they are, until I’m writing the webpage for TuneBar 4 :)

As for what I’ve been distracted with. Project D as I like to call it is Top Secret, and should have as few people in the loop as possible according to my contractor. However, the instant I’m allowed I’m posting it up here! Some you may have figured that it has stuff to do with networking given the sheer amount I have been ranting about the stuff :D

Well I suppose I should get off and get some TuneBar 4 done :). Oh for all my real old web friends, back from the ev-nova.net forums (which I notice is no longer going :( ) I have restarted the editor I began shortly before I stopped visiting the boards; iNova. Its going to be full Cocoa and will still encompass everything I said, and more.

Filed under: Uncategorized

Deepening my understanding of programming…

11
Mar/09
0

I’ve been programming for a long time; 11 years. This is just over half of my current age! I can confidently program in 4 different languages (and several markup languages) as well as get by in about 8 others.

One languages I began using 5 years ago, Objective-C is the only language not to follow the same trend as the other languages whilst learning it. When learning Objective-C, most programmers will be tying and making themselves almost dependent on Cocoa. This is not necessarily a bad thing. Cocoa is an excellent Framework, one which I very much enjoy having in my toolbox, but there are sometimes being able to use Objective-C without Cocoa may be advantageous.

I’ve recently run in to one such thing. I small experimental utility I’ve made for myself needs to run on Windows, Mac OS X and Linux. I fully had in mind that I was going to be using C# on Windows, C++ on Linux and Objective-C on the Mac. I know I could use C++ on all 3, but C++ is not my strong suit. I know it, and can program it well enough, but prefer not to.

Well, whilst visiting the website for GCC in order to download it to my Windows setup, I noticed the Objective-C compiler in it. I knew it was there, but I just never even considered Objective-C outside of the Mac. Seeing that I decided to try and create a small application with Objective-C.

I should stress that although stripping out Cocoa from Objective-C is a relatively painless task, there are some differences to basic method names and a lot of functionality that we take for granted is not there. For instance you a stuck at Text only applications unless you want to code a GUI from the ground up.

I set about creating a basic application that would display the infamous Hello World to the screen, but do it in a slightly overkill way… it would create a new class to print to the screen.

Here is the code for the header and implementation files for the class.

hello.h
#import <stdio.h>
#import <objc/Object.h>

@interface Hello : Object {
    const char * message;
}
- (id)initWithMessage:(const char *)m;
- (void)setMessage:(const char *)m;
- (void)displayMessage;
- (void)free;
@end

hello.m
#import "hello.h"

@implementation Hello

- (id)initWithMessage:(const char *)m {
    if (self = [super init]) {
        message = m;
    }
    return self;
}

- (void)setMessage:(const char *)m {
    message = m;
}

- (void)displayMessage {
    printf("%s\n", message);
}

- (void)free {
    [super free];
}

@end

main.m
#import <stdio.h>
#import "hello.h"

int main (void) {
    Hello *hello = [[Hello alloc] initWithMessage:"Hello World"];
    [hello displayMessage];
    [hello free];

    return 0;
}

Notice the lack of any NS naming? This example has used Objective-C, but has ditched Foundation and Cocoa. You may even notice the lack of -dealloc, which has been replaced by -free.

There are a few things to watch out for however. On Mac OS X plain Objective-C with out Cocoa has been severely crippled, due to the absence of some key classes. Namely NXConstantString. This is the class in Objective-C that allows for the @”" style string creation. Apple has replaced the class inside of Cocoa and Foundation to use NSConstantString, and the developer tools tell GCC to look for this class rather than NXConstantString. You should (I have not tested this yet) be able to use NXConstantString on Windows and Linux.

This is draw back on the Mac, but we do have Cocoa and Foundation in its place. NSConstantString is a much better version of NXConstantString, as it descends from NSString which includes all the encoding information for localizing applications.

Objective-C itself is a very small thing. Its got may be a dozen or so header files inside GCC. Lets put this in perspective. Cocoa and Foundation combined have about several hundred header files. This is what most Objective-C programmers are learning. Its Cocoa and Foundation. Yes they know the Objective-C syntax and can program it, but the majority will never program plain Objective-C.

I find this to be rather interesting. For all other languages we learn the actual languages, but with Objective-C we spend a tiny amount of time learning the syntax and the rest learning the frameworks. Perhaps this is why its seen to be such a difficult thing to learn, because of the sheer overwhelming size of it. If people learnt Objective-C with out Cocoa to begin with, and then eased in things like Foundation, perhaps it might be that bit easier for new comers.

Then again I could have just been spouting crap :). Anyone got any experience programming plain Objective-C, or have any thoughts on my thoughts?

An idea… Opinions please.

1
Feb/09
2

The idea has come from watching an episode of Top Gear. Not quite the standard source of inspiration for Software, but still inspiration can come from weird places. I won’t say the exact bit that inspired me, but rather what my idea is. I should say that I’m looking for feedback on to what people think of this (both Developers and Users).

My idea is for a group of developers (as many as willing to participate) to create a a fully featured application ( such as a Graphics package, or some such thing ) in the shortest possible period of time and to ultimately release it as freeware or open source.

Why?

Well a few of reasons.

1. My thought is that it would be one hell of a good collaboration project for everyone, a real community project, and hopefully something that looks professional at the end.

2. Sheer curiosity to see if such a thing is even possible. Several developers, different places, different time zones working to get a fully featured application built as fast as possible to be released as fast as possible.

3. The Challenge it presents.

I’m not stupid, I realize A LOT of developers will think this is a waste of time, there’s no profit involved for them.  My intent is that the rights to the application will be held by ALL the people involved in creating it. Anyone those people can update the application when and if they choose to do so.

Let me know what you all think of this idea. Crap? Interesting? A winner? This is just something that popped in to my head about 5 minutes ago, so its not been completely thought through so some planning is going to be required.

Anyone who is interested or would like to take part (be it graphic designers/developers/etc) should be willing to get no profit from this.

Opinions and thoughts please.

TuneBar 4 Update: UI Elements

25
Jan/09
3

It’s been a while since any updates on TuneBar 4, so I figured it might be time to do one now.

Today I’m going to show you several screen grabs of control elements of TuneBar 4. Note that none of these reflect the actual finished interface, just the finished look and feel of those particular elements.

Preferences Toolbar

Preferences Toolbar

TuneBar 4 is completely saying goodbye to the Aqua Interface. I love the aqua interface, but it just doesn’t work for my plans in TuneBar 4. This isn’t the complete Toolbar, there are some icons missing, and it isn’t showing the labels, but it does show what it will basically look like.

I realize that this a slightly unorthodox way of doing this, but I think it will work well with the rest of the interface.

Buttons

Buttons

Both TuneBar 2.6 and TuneBar 3 suffered from this: a mish mash of different types of buttons, that didn’t look like they belonged. TuneBar 4 is going to address that with buttons that are much more sleek and elegant.

Text Fields

Text Fields

Given the overall darker interface of TuneBar 4, it made sense to go for a darker looking Text Field. Just so you know, that is not a real license code ;)

Album Artwork

Album Artwork

I got bored of the old plain looking Artwork. I figured it was time for something a little different. I thought of Jewel Cases, (which I toyed around with in a few skins for TuneBar 3.) but decided that they have been done so much already that it seemed like I would just be adding them to keep up. So I decided on something more subtle, a soft glow/focus surrounding the artwork.

Technologies

In the past TuneBar has relied heavily on one major apple technology: Apple Events and Applescript. It hasn’t really taken advantage of much of what OS X has to offer. I’m going to outline a few of the things which TuneBar is finally going to be taking advantage of:

  • Quartz (Core Graphics)
  • Core Image
  • Core Animation
  • Application Scripting Bridge
  • Threads

Well thats all from me for now. Hope you enjoyed these teasers ;)

Teaser

21
Jan/09
1

iPhone ApplicationiPhone Application Teaser

Just a really small, quick teaser of one my applications. This is done on contract, so

no names are getting involved, and nothing critical is shown here, other than the interface.

I’ll leave it to people to have guesses at what it may or may not be.

Gaming

15
Jan/09
6

I spend a fair amount of time on the computer, writing code/software/websites and also doing a lot of stuff in Photoshop, but I also spend a reasonable amount of time gaming.

I’m not a “hardcore” gamer. Never have been, never will be. Doesn’t interest me to be. But I am a casual gamer, and I do like to think that I have some skill.

The game(s) that I play more than any other has got to Halo. I play Halo quite a bit of Halo, and have beaten the game several times, on Easy, Heroic and Legendary (curiously enough I’ve never done it on Normal :\). Now my time on Halo is spent on Xbox Live and match making, playing against others from around the world. On the whole this is a lot of fun (provided you mute all the players in the playlist. A lot of the ones chatting on the public chat seem to be 12/13 year old kids with voices so high pitched they actually make ears feel as though they’re about to bleed!)

Anyway, my reason for this post, is not to rant about my Halo gaming habits, but rather to announce the first gallery that I plan on doing. This gallery will be off screen grabs/movies that I have taken from numerous games that I have played. The screen grabs will be done in the format of desktop backgrounds, so anyone interested can take a look. Most of the grabs will be things from unique “freeze frame” moments, or quite arty looking ones.

Anyone who has Xbox Live and wants to friend feel free to do so!

Tagged as: ,