Code-free
Code-free

Immutability Part 2

wherein we make a compiler do the work

Russ Bishop
March 23, 2014

The very first question any programmer has when they hear about immutable data structures is "how the hell can that possibly work when I can't change my data?"

The answer is rather simple, at least in an object-oriented language like C#. Instead of setting properties and fields, you call a method that returns a new object . . .

Read More

Russell's Rules for Highly Concurrent Software

mutable state is the devil's handiwork

Russ Bishop
March 23, 2014

This is the first in a series of posts I plan regarding immutability (edit: yay, follow-through!). In this post, I want to cover some of the reasoning around why you'd want to use immutability and some of the awesome things that just fall out of an immutable design naturally. Future posts will cover making the compiler create immutable . . .

Read More

Storm Sim Requires 180 Screenshots

or how not to cry yourself to sleep

Russ Bishop
March 23, 2014

Storm Sim has a free and paid version. It supports six languages. Two devices at three resolutions. If the UI changes in any significant way, it needs 180 screenshots. Uploading them in iTunes Connect is bad enough, but navigating through the app in each language is just killer. I find myself not wanting to make a change because I know it . . .

Read More

Why Android Security is Broken

hint: it isn't technical

Russ Bishop
March 23, 2014

A recent slashdot post was discussing a privilege escalation hole in Android and by looking at the comments, it was obvious to me that most geeks just don't get it when it comes to security.

Android has a huge, gaping security hole but it isn't a technical one, it's the design. The flaw is the same one that afflicted ActiveX in . . .

Read More

What is LINQ

and why it matters

Russ Bishop
March 23, 2014

I've been listening to some excellent podcasts recently where the subject of C# and LINQ came up:

I've been meaning to start blogging recently and this was a good excuse. I want to cover what LINQ is and why it matters, because it . . .

Read More

ARM64 and You

or how I rue NSInteger

Russ Bishop
March 22, 2014

NSInteger is now 64-bit on ARM64; that means a bunch of useless warnings everywhere about precision loss right? WRONG.

Here's a hint: "Comparison of constant 'NSNotFound' with expression of type 'int' is always true". Uh-oh. Fix your integer warnings and kick yourself for not using NSInteger because every count, . . .

Read More

Associated Objects in C#

objc_setAssociatedObject makes a friend

Russ Bishop
March 22, 2014

Many people think there is no equivalent of objc_setAssociatedObject in C#, but those people are wrong.

As a quick refresher, Objective-C allows you to add methods to objects via categories (roughly equivalent to extension methods in C#), but there's no way to add new property values directly. Instead, you can use . . .

Read More

Archive
  Subscribe by Email and Never Miss a Post