Posts

Apple Profiling Tools - Shark is Out, Instruments is In


Posted in:

As we sat down today to do some performance profiling in Shark, we came to a sudden realization - it doesn't work anymore with iOS4. After some quick Google searching I came across a thread in Apple's developer forum (registration required) that indicated there were no plans to bring iOS4 support to Shark.

Read More Icon Read More

WPF 4 Lowers Default BitmapScalingMode Quality


Posted in:

If you've recently upgraded a .NET 3.5 WPF application to .NET 4.0, you may have noticed that some of your images look like crap. This is because Microsoft has changed how WPF rescales images. Instead of the original high quality, it has been lowered to low quality. This was done, they say, to improve performance.

Read More Icon Read More

Creating a Javascript Bookmarklet


Posted in:

For nearly all problems there are probably a hundred different solutions. Recently one solution I have chosen for a few problems has been a Javascript bookmarklet. A bookmarklet is a regular bookmark that runs a bit of Javascript code instead of just going to a link. They are really useful for doing a small task on a website or webpage that you don't have direct access to the backend or source of. So, today I am going to show you how to make a simple bookmarklet.

Read More Icon Read More

How to Build a Simple Twitter Client using Python


Posted in:

Building a Twitter client is nothing new to Switch On The Code. We've done it in WCF and Silverlight. To be honest though, using the Twitter API is a great way to exercise two very useful parts of a language and framework - making web requests and parsing XML. That's what we're going to do today. We're going to build a very simple command line twitter client (read-only) using Python.

Read More Icon Read More

Flex & Actionscript Singleton Model Class


Posted in:

In many of the projects and applications I build with Flex I use a singleton for the Model - we've talked about Singletons in the past here. Whether this is the preferred method of handling a model is a matter of opinion so I won't be discussing it. However, I do want to share the model class that I typically use. Actionscript lacks a real static constructor, used for creating a single instance of a class, which means creating a nice singleton takes a bit more work.

Read More Icon Read More

Running a Method After A Delay on iPhone or Mac


Posted in:

In nearly every programming language there is a way to delay a method call. Objective-C is no different. They have built in a few simple methods to achieve this. We are going take a look at one of these methods today, all which reside in NSObject. This means any class you create will have the ability to call these methods. The method we are going to take a gander at is - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay, got the love the Objective-C method names.

Read More Icon Read More

Python Tutorial - Batch Image Resizing


Posted in:

Every once and a while I come across a simple task that deserves a script. Instead of using a language I know, this is often a great opportunity to pick up a new language or get a refresher on one I haven't used in a long time. In this case, I needed to resize an entire directory of images. There are tons of free tools out there to do this, but where's the fun in that? Also, I could have whipped this tool up very quickly in a language I know, like C#, however I haven't used Python in several years and I decided it was time for a refresher.

Read More Icon Read More

Loading XML Through XNA Content Pipeline


Posted in:

XNA is quite possibly one of the most robust game programming frameworks out there. You can do nearly anything with it, and one of the reasons it is so flexible is its "Content Pipeline". But sometimes it can be a bit tricky to use this feature, requiring us to do bit more work. But in the end, it helps to use the Content Pipeline. Luckily today we are going over how to use it to load in some XML.

Read More Icon Read More

Installing and Running Google Go on Mac OS X


Posted in:

A while ago Google gave us a brand new language, Go. In the last couple of years I really haven't heard much about it, but I decided to finally install it and give it a try. This tutorial will guide you step-by-step on how to install Google Go and start writing your own applications.

Read More Icon Read More

Using Doc Raptor to create Excel Spreadsheets


Posted in:

Remember back many moons ago when we posted a previous tutorial about Excel document creation? Specifically, this one. It worked, but if you take a look at it again, that code was painful. And ugly. And required hooking up ruby with a Java library called JExcelAPI using RJB - which, really, is not something anyone actually wants to do. So today we are going to take a look at something else (that I think) is a lot nicer/cleaner for Excel document generation: a new web service specifically for document creation called Doc Raptor.

Read More Icon Read More

In The News

Tutorials Around The Web