Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
User Journal

Journal Journal: FizzBuzz in Swift

The following is my prepared answer for anyone who asks me this stupid fucking question in any interview in the future.

extension Int
  func modBool(modulus: Int) -> Bool
  return (self % modulus).boolValue
for x in 1...100
  print((x.modBool(3) ? "" : "Fuck ") +
    (x.modBool(5) ? "" : "You") +
    ((x.modBool(3) && x.modBool(5)) ? "\(x)" : ""))


User Journal

Journal Journal: Three years after Steve died... 1

I don't think I've written this down anywhere before, so here's my story about the first time I had a face-to-face conversation with Steve Jobs.

I was working for Richard Kerris in Apple Worldwide Developer Relations, on a group called the SWAT team. I was the Cocoa expert on that team, and I had colleagues who had expertise in UNIX internals, Windows development, and the Metrowerks tools.

Our role was to help third-party developers bring their products to Mac OS X, whether they were coming from Windows, Solaris, Mac OS 9, etc. We would look over their code, and consult with them on how to go about porting and/or rewriting their products for the new platform.

I went to Fred Anderson's retirement party which was held at Cafe Macs in Building four of the Infinite Loop campus. I saw Steve there, and I went over to introduce myself. I said "Hi Steve, I'm John Randolph. You may or may not recognize my name, but I used to flame you from time to time before I worked here." He asked me "Why did you stop?" I told him "Well, I work here now, and I respect the chain of command."

At the time we had this conversation, there was a big fight going on between the foot-dragging laggards who wanted to keep using the old Mac Toolbox API (which had been cleaned up considerably and put into a framework we called "Carbon"), and those of us who wanted to get everyone using the NeXTStep-derived "Cocoa" frameworks,

At the previous WWDC, Steve had started the keynote with a bit of theater: a coffin had risen up through a trap door on the stage, in the midst of a cloud of dry ice fog. Steve had opened the coffin to show a big Mac OS 9 box, and he praised OS 9 in a eulogy, to make the point that Apple developers should consider it dead and gone.

So getting back to our conversation.. I told Steve what I was doing on Richard's team, and I said "I know that you can't do this politically, but I wish you could have another coffin on the stage at the next WWDC...." and he said: "With Carbon in it?"

He was grinning. At that point, I realized that I could quit worrying about where Apple's development environment was heading. Steve knew what we needed to do, and in the years that followed, Apple has kept the best of NeXT's technology, and let go of what we didn't need.

We miss you Steve, but we're doing fine. Thanks for the things you made happen.


User Journal

Journal Journal: The tragedy of brain-dead apparatchiki entrusted with the care of children. 6

Earlier today, I read an account of a little girl getting a severe sunburn while on a school field trip, because of an unconscionable policy prohibiting children from possessing sunscreen while at school or on school activities. I looked up the name of the spokesman who had the nerve to try to defend this policy to the press, and wrote her the following e-mail:

Miss Chancellor, you and the pinheads you serve in the Northeast Indecent School District are a tragic example of the kind of abject incompetence that pervades American public schools in the past several decades.

I would urge you to resign and pursue employment in the janitorial services industry, but youâ(TM)re obviously too goddamned stupid to be trusted with cleaning supplies.


Well, it would appear that Miss Chancellor was offended by my criticism, and she replied thusly:

Your comments do not warrant an intelligent response. Clearly - you do not have all the facts.

Now, it's rather unusual for an apparatchik in a shitstorm to bother to respond to any of the angry e-mails they get, so naturally I have replied:

On Jun 6, 2014, at 10:26 AM, Chancellor, Aubrey wrote:

>Your comments do not warrant an intelligent response.

Since youâ(TM)re entirely incapable of an intelligent response, that just works out fine and dandy now, doesnâ(TM)t it?

>Clearly - you do not have all the facts.

The fact is that when you screw up like this, the thing to do is apologize and promise the parents, the child, and the rest of the community that it will never happen again. You donâ(TM)t double down on your idiotic policy of depriving children of sunscreen.

When children are entrusted to you by their parents, your paramount duty is to ensure their safety and well being. it is NOT to sacrifice their welfare to your psychotic need for obedience.


More on this as it develops. Start the popcorn.

User Journal

Journal Journal: Throwing in the towel on Facebook. 7

Last post to FB:

In the time since I created this Facebook account in 2006, I found a bunch of old friends, met many new ones, wasted a whole lot of time, had some arguments that never would have happened in real life, and been frequently annoyed by the business decisions FB has made.

This post will be my last. I will delete this account 48 hours from now. Those of you who want to keep in touch can reach me as always at, which I've had for at least a decade.

All's well that ends. I wish you all peace, love and happiness.

It feels like leaving high school. There are people there that I will always care about, some that I love, some that I barely know, some that I have no idea how I met in the first place or why they're in my FB friends list.

A very smart friend of mine is working on changing social media from a site and a vendor that sells the users' info to advertisers, into a protocol that would operate on a peer-to-peer basis, with strong security to ensure that what we write goes to those we wish, and no one else. I hope he succeeds, and I look forward to making a fair bit of cash shorting FB when the writing appears on the wall.

  I will thank my friends who worked on FB, and every user there who ever shared a heartwarming, interesting, inspiring, or even outrageous bit of information that I wouldn't have found otherwise. Congrats to all the FB millionaires and worker bees, I wish them all the best.

I'll still be NSResponder here on /., on StackOverflow and Twitter. The internet is still a lot bigger than Facebook, and I'll see you all around.

User Journal

Journal Journal: Soylent News 4

I've not been posting on Slashdot much this week, because I've been trying out Soylent News, which is using (and old version of) Slashcode (with some improvements) and lacks corporate overlords. It seems to have captured most of what I like about discussions in Slashdot, although is suffering slightly from not having nearly as many active users (50 or so comments is still the norm and it probably needs 100+ to be sustainable).
If you've not visited yet, I'd recommend giving it a go.

I'm TheRaven over there.

User Journal

Journal Journal: Well, that about wraps it up for e-trade. 2

E-mail to Neal Martin, E-trade's vice president of customer service:

Well Neal,

I doubt that this message will actually get to you personally, but what the hell.

After the fracas over the last few weeks in which e-trade failed to issue me a second ATM card, I finally got around to transferring the bulk of my shares to a competent broker.

The automatic mail from e-trade notifying me of the transfer included this paragraph:

E*TRADE strives to achieve best in class service and is focused on meeting all of your financial needs. We would like to understand your reason for your transfer out and see if there are any improvements we can make to serve you better in the future. If you have the time to discuss, please call us at 1-800-ETRADE -1 (1-800-387-2331).

The fact is, after going around with your underlings a few times on my requirement for a second card, and having told each of them several times that this was a deal breaker, I know that the claim that youâ(TM)re âoestriving to achieve best in class serviceâ is nothing but marketing drivel. Indeed, my direct, personal experience has shown me that my business isnâ(TM)t important enough to get on the radar of anyone who would actually solve the problem.

I had already planned to find another broker, but the thing that made me hurry up and do so was receiving your oh-so-thoughtful gift of an e-trade gym bag. So, after refusing my very simple request, you apparently assumed that Iâ(TM)d be satisfied if I just got a bag to advertise an incompetent financial institution to my friends.

Looking at the transaction log, I see that e-trade has charged me $25 for the privilege of taking my property elsewhere. Now, Iâ(TM)m sure you have something in your fine print that allows you to do that, but itâ(TM)s still kind of shitty on your part. Given that youâ(TM)re not even capable of issuing two cards on one account (as you had done for the previous decade or so), waiving that fee is probably entirely beyond the capabilities of the fifth-rate keyboard monkeys in your so-called âoeIT departmentâ, so you can go ahead and keep it. Iâ(TM)m getting a nice welcome gift from your competition, which I didnâ(TM)t even ask for.

Would you like the gym bag back?


User Journal

Journal Journal: Even less impressed with E-Trade. 3

Got this from some minion at E-trade, since the VP I wrote to was apparently too busy to answer a customer personally:

Good Morning Mr. Randolph,

We received your email inquiry to our VP of Customer Service, Neal Martin on 8/5/13. We regret that we are unable to accommodate your request for two ATM cards for your account. We appreciate your feedback and it has been shared with management and our product teams for review. If you have any additional questions or concerns feel free to contact me at [phone number deleted]

Thank You,

[Name redacted]
Corporate Support Manager
Alpharetta GA
E*TRADE Securities LLC
[phone number redacted]

Manager? Yeah, right. In a functioning company, a manager is someone who takes the initiative to solve a problem.

I left the VP's name because he fully deserves to have this come up when someone googles him in the future.

My response:


You might mention to Neal Martin that when a customer responds to an email message that has his name on it, itâ(TM)s rather poor form to pass the buck to someone else unless that other person is capable of solving the problem.

I was a more-or-less satisfied customer of E-trade for over a decade. I will be transferring my assets to another broker in the near future, as soon as I determine which of your competitors can demonstrate the competence that E-trade has abandoned.


User Journal

Journal Journal: Rather unimpressed with E-Trade today.

I've been a customer of theirs for over a decade, and I've had two ATM cards for the same account for many years. Recently, I needed to cancel one of the cards and instead of just replacing that card, they cancelled both of my cards. I just sent the following message to Neal Martin, VP of customer service at E-trade.


I got a call from one of your employees this morning, Meagan something, who told me that after looking into it she wasnâ(TM)t able to find a way to issue a second card for my account. Her suggested workaround was that I should open another account, and get an ATM card for that account.

So, because of your IT departmentâ(TM)s refusal to fulfill a very simple request, E-tradeâ(TM)s âoesolutionâ is that I should give you MORE of my business, and incur whatever additional costs are associated with having a second account. Not to mention that using a second account means that if I lose a card while traveling, Iâ(TM)ll either be dead in the water for a day while funds get transferred to that second account, or Iâ(TM)d have to have money parked in that second account already.

Now, Iâ(TM)m a software engineer myself with a fair bit of experience in financial systems. In my Wall Street days, I worked at JP Morgan, Salomon Brothers, and UBS/Warburg. I know that there is indeed a way to solve the problem at hand, even if it requires manually editing a database to make it happen. If my business is important enough to you, youâ(TM)ll direct your IT department to do so.

In the meantime, I suggest your inform all of your employees in customer-facing roles that âoesecurity policy" is not an excuse for incompetence.


The message above was a follow-up to this one:

Hello Neal,

I have been an E-Trade customer since 2002 or thereabouts, and I currently have about [redacted] in assets on deposit with e-trade.

Iâ(TM)ve got to say, Iâ(TM)m on the verge of taking my business elsewhere and itâ(TM)s because of something that should be trivial for you to solve.

Iâ(TM)ve had two debit cards for my account for a decade or more, and Iâ(TM)ve just been told that I can only have one now. This doesnâ(TM)t work for me, because I travel quite a bit, and I like to keep one card in the safe in my hotel room, and have the other one on me. If I lose a card while traveling, I do not want to be stranded without a way to access my funds.

Yesterday, I spoke with a representative who told me that he had figured it out and was sending me an additional card, but this morning he called me back and told me that he couldnâ(TM)t do it after all. Just now, I spoke with another representative from your âoeCorporate Relationship Managementâ team, and heâ(TM)s looking into it.

Iâ(TM)ve generally been happy with E-trade up to this point, but if you canâ(TM)t issue me two cards as before, itâ(TM)s a deal breaker. I hope you get this figured out.

Also, donâ(TM)t put your name on an e-mail address that doesnâ(TM)t go to you directly. Itâ(TM)s insulting.


The upshot is I did some shopping around and found that Scottrade's fees are lower than E-trade's. The first brokerage company I find that can issue two cards on one account will get my business.

User Journal

Journal Journal: Another interesting stint at Apple. 5

For the last two years (almost), I was back at Apple working on the UI frameworks that the ProApps and the iApps use to give them their distinctive look. Interesting work, nice people to work with, and now I can say that there's some of my code in most of Apple's Pro and consumer apps on the Mac.

To everyone in PhotoApps, ProApps, Frameworks, and Dev Tools, thanks much! I enjoyed working with you.


User Journal

Journal Journal: Getting a Job 4

Someone on Slashdot recently claimed I hadn't read Keep the Aspidistra Flying because I thought the ending was depressing. After I finished my PhD in 2007, I've managed to avoid the same fate and have successfully avoided having a real job for almost five years. I've done freelance programming and written four books, and had a lot of time to post on Slashdot (as you can tell from the fact that, so far, I've posted more than anyone else this quarter) and do open source stuff (Ohloh ranks me in the top 2,000 geeks with no life^W^W^W^Wopen source developers).

That's about to change though. I had two interesting job offers recently (I seem to get job offers from banks very often, but I have a very low tolerance for tedium, so I'd probably have been fired around day 3 if I'd taken any of them). One was from Google in Paris (yay!) but working on boring things (boo!). The other was from Cambridge University, which is about as well paid as you expect in academia (aww!) but basically involves working on the same stuff I do for fun (yay!) with some very intelligent people (yay!). Oh, and it's in a city where a quick search found four tango classes (yay!) and property prices not much lower than London (oops!) and which is both small and flat enough that I can cycle everywhere (yay!) and so does everyone else (look out!).

So, in a few weeks I'm moving to Cambridge. I'll miss looking out at the sea, but being able to dance tango more than once a week should be some compensation. There also seems to be a lively salsa scene, although having to learn yet another set of names for the same Rueda steps is going to be a little tiresome...

When I visited, I went for drinks with some of the makerspace guys the night before my interview (I have no idea how much I drank, but it didn't seem to affect my interview performance too badly...) and met someone who worked on the C++11 atomics spec (which I was in the middle of implementing at the time) and someone who had ported 2BSD to a 32-bit PIC with 128KB of RAM, so it definitely seems like a city with no shortage of geeks...

User Journal

Journal Journal: Wow, I Need to Get a Life 5

This weekend (I think, maybe earlier), Slashdot published some statistics about the most active people. Apparently I am in the top four most active commenters for the past month and the past quarter. This is quite depressing.

In happier, and unrelated news, my FreeBSD commit bit was approved this weekend, so I can now cause untold destruction on the Internet at large...

User Journal

Journal Journal: What Phone? 6

My current phone is a Nokia N80. I've had it a few years and I'm reasonably happy with it, but it has a fault with the charging circuit and it's pretty bulky, so I'm thinking about replacing it. Unfortunately, there seem to be about 3,000 different options with no competent way of way of working out which one is sensible.

I mainly use my phone as... a phone. So, the most important feature for me is the ability to make and receive calls. Because I am a cheapskate, this includes SIP (and WiFi), since my SIP provider charges a lot less than my mobile provider when calling landlines. I really like WebOS in terms of UI, but that seems to rule the Pre out because the only WebOS SIP client is alpha quality and doesn't integrate with the address book. This is something that Nokia does really well - the SIP client is fully integrated, so I can just select someone from my address book and select Internet Call to make the call. No extra skill required.

Beyond that, the only thing I really need is to be able to sync contacts via bluetooth and to use it as a modem via bluetooth - both pretty standard features, I'd assume, since my last three phones have had them.

In terms of smartphone features, I'm not that bothered. A programming environment that supports native code so that I can port my ObjC runtime would be nice - I have no interest in VM-based crap - but aside from that I don't have any strong requirements.

I would, however, like decent battery life and a small size, and ideally a nice camera. The bulk and poor battery life of my N80 means that I quite often leave it at home.

So, any suggestions?

United Kingdom

Journal Journal: Sale of Goods Act beats AppleCare 2

A little while ago, someone on Slashdot pointed me at the Sale of Goods Act in relation to purchased electronics. The act, for those unfamiliar with it, requires that goods be 'suitable for the purpose for which sold.' This is a fairly broad term, but it basically means that they must be able to do anything that the seller claims that they can do. Under this law, you have 6 years from the date of purchase to file a lawsuit if the item does not match the claims.

This was relevant to me because my MacBook Pro is now out of warranty and the battery is dying. Looking in the System Profiler, its full charge capacity was showing up as 1476mAh after 56 charges. When new, it was 5500mAh. These numbers don't mean anything by themselves, but Apple claims that their batteries retain 80% of their full charge capacity after 300 charge cycles. Claiming this means that a battery that does not retain 4400mAh after 300 charge cycles is not suitable for the purpose for which sold, and they are legally required to refund or replace it (irrespective of the time that has elapsed, although I can only sue them if they don't within 6 years of the time of sale).

I called their support line and was put through to an Indian woman, who explained that the warranty had expired. I quoted the relevant parts of law to her, and (after being kept on hold for a bit), was transferred to someone senior. He very quickly agreed to send out a replacement battery.

Interestingly, he did not ask that the original battery be sent out, nor that I provide a credit card number where I would be billed if the battery turned out not to be defective. I've had two batteries replaced in warranty, and this was standard procedure then, so apparently I get better service out of warranty. I don't have a great deal of use for a battery that only lasts about 35 minutes on a full charge, but I'll probably keep it as a spare.

As always, it pays to know the law. It's a shame that Apple, which claims to be a customer-focussed company, doesn't educate its support team about this though. Possibly the Indian call centre deals with people from everywhere English speaking, while the Irish one only deals with people in the UK and Ireland, so the people there are more familiar with British law, but if I had not quoted the relevant act then I would have been charged £99 for a battery, on top of the £1.50 it cost to call their support line for half an hour.

User Journal

Journal Journal: So, Farewell, MacMiniColo 1

Some time around 2005, Slashdot ran an article about a new hosting company, MacMiniColo that was taking advantage of the new machines that Apple had just released to offer cheap hosting. I got in contact with them, and a little while later, I had a Mac Mini, sitting in a rack somewhere, running OpenBSD and acting as my dedicated server. A 1.42GHz G4 CPU, 512MB of RAM, and an 80GB disk was (and still is) more than adequate for my needs. The biggest load on it is eJabberd, and even that only used under 1% of the CPU.

I had really great service from these people. The hard drive failed a little under a year after I bought the Mini, and Apple refused to honour the warranty because they couldn't find the records of the sale (then, a few weeks later, they could, but by then it was out of the warranty period). MacMiniColo replaced the disk for me at their own expense.

After five years with them, however, I had a little look around and noticed that VPS hosting has gone down in price a lot. I've written a book on Xen, so I thought I might try a Xen-based VPS now that FreeBSD has Xen support.

GigaTux only claims to offer Linux, but I dropped them an email and they were happy to install FreeBSD for me. I still haven't tried the Xen-enabled kernel yet; they installed the stock x86-64 kernel in an HVM domain for me and performance has been fantastic.

I'm sharing a server with 64 other guests and in spite of that performance tends to be better than my ageing Mac Mini. I was getting 1000IOPS while untaring the ports tree, which is far more than the Mini's old 2.5" laptop drive could handle, and is amazing considering that it's going via the slow, QEMU-derived, emulated device, rather than the fast PV driver. I've been installing software from ports, so everything is compiled on the machine, and even that has been fast.

And my Mini? They found someone else who wants it, and offered me about a third of what I paid for it originally - not bad depreciation after five years of constant use. Shipping it back to the UK would have cost almost as much as buying one on eBay, so I sold it on. Hopefully someone else will get some good use out of it.

As an aside, I've been really impressed by how well OpenBSD works on Mac/PowerPC hardware. If you've got an old Mac Mini lying around, chuck OpenBSD on it and you've got a reasonable low-volume server. The newer ones, of course, are x86 hardware, so will run just about anything.

New York... when civilization falls apart, remember, we were way ahead of you. - David Letterman