Now with editing and rotation

I went on and extended the autoresizing table cells to handle interface rotation and table editing as well. In both these cases, the width of the table cell content view changes, so the height of the text view needs to be recalculated. To achieve that, you need to wait to measure the new width of the text view until everything has settled down, but this turns out to be surprisingly difficult. The only functions I found that were called late enough in the view update cycle to give me the new definite text view width were didRotateFromInterfaceOrientation in the controller for rotations, and didTransitionToState in the table view cell for editing state changes.

Continue reading “Now with editing and rotation”

Ideology

One of the primary targets of Islamist terrorism is the vast majority of moderate Muslims. Sometimes physically, but always psychologically. And they want the rest of us to do their dirty work for them. A prime goal of these acts is to engineer a schism between Muslims and Western cultures. To create alienation, and to make Muslims a target of fear and anger. The resulting exclusion, xenophobia, suspicion, and implicit or explicit segregation is a tool of radicalisation.

Exactly.

Do yourself a service and read the whole thing.

The CSDP cert is dead

I had the IEEE CSDP certification since 2005, but let it lapse in 2014, since it was a significant cost to maintain. With IEEE/CS membership and recertification every three years, it cost me around $200 per year for the pleasure of having those four letters after my name. (I also maintained an ACM membership, costing another $100 a year.) Hardly anyone ever asked me what those letters mean, and even fewer ever knew, I figure. In theory, it’s a significant certification that needs some significant experience and knowledge of general software development principles to achieve, but if noone is interested in that, it’s not worth paying for on an ongoing basis. So, as I said, I let it lapse. At the same time, I quit paying for membership in both IEEE/CS and ACM, since none of these have really, when you look at it critically, contributed to either customers or reputation.

Recently, IEEE let us know they’re abandoning the CSDP (and the somewhat related CSDA) certifications entirely. So I guess I wasn’t wrong then.

Well, I can always hug my CISSP cert for consolation; I’m not giving up that one. And the MD, of course. That’s a real safety blanket.

OSX SL tftp doesn’t work?

…then this may be the reason… took me hours to figure out. Had to get it going for a netboot project, and the netboot just kept circling around the boot image download without getting much anywhere. First, check out Bombich’s troubleshooting, which put me on the right track without actually giving me the solution, but maybe that’s because my particular problem is relatively new. It may have been introduced with Snow Leopard.

What happened in my case is that I was able to download an image using the form:

tftp myserver.local
get NetBoot/NetBootSP0/Netinstall.nbi/i386/booter

…but not using the form:

tftp 172.25.26.27
get NetBoot/NetBootSP0/Netinstall.nbi/i386/booter

even though the “myserver.local” name pointed to the IP 172.25.26.27. At least, that’s what I presumed until I whipped out Wireshark and found out that using the “myserver.local” name resolved to an IPv6 address, not the IPv4 address I expected.

Next, I ran this on the server:

sudo lsof -i :69

COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
launchd   1 root  144u  IPv6 0x0a9ab4a0      0t0  UDP *:tftp

Aha! The tftp server only runs IPv6 for some reason. That explains it.

To fix this, go into the tftp.plist file with pico:

sudo pico /System/Library/LaunchDeamons/tftp.plist

and add the optional key for IPv4 a bit down:

...
<key>Sockets</key>
<dict>
    <key>Listeners</key>
    <dict>
        <key>SockServiceName</key>
        <string>tftp</string>
        <key>SockType</key>
        <string>dgram</string>
        <key>SockFamily</key>
        <string>IPv4</string>
    </dict>
</dict>
...

After that, all you need to do is stop and restart tftp:

sudo launchctl unload /System/Library/LaunchDaemons/tftp.plist
sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist

Then check that the port is working on IPv4 as well:

COMMAND PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
launchd   1 root  144u  IPv6 0x0a9ab4a0      0t0  UDP *:tftp
launchd   1 root  150u  IPv4 0x07e2ee14      0t0  UDP *:tftp

After that, retry the tftp get command using both IPv4 and “myserver.local” addressing. Should work now. I must admit I don’t understand why IPv6 keeps working, though. Oh well, not that it bothers me, but it bothers me a little bit.

Update: this post is correct, but it still didn’t solve my problem, so please see next blog post for more, at least if you’re doing netboot stuff on Snow Leopard

Don’t trust iTunes gift cards

This is what happened to me. I gave a friend $300 to buy gift cards for iTunes, and he got me six $50 cards in the Woodlands Best Buy store in Texas. This was in november 2009. Me and a relative redeemed three of these cards during the following months, but I only got around to redeeming the last three in september 2010. When I did, they didn’t work. The error I got was that these codes did not exist.

Continue reading “Don’t trust iTunes gift cards”

Even the machine agrees

Picture this. I’m a little nervous, not much, but a little, since I’m to present my first running code on an iPad of my own entirely different idea of what a medical record should actually look like. I’m presenting this to a group of industry folks, doctors, and professors of different kinds, a power group. So we park the car at Karolinska Hospital in Stockholm and I swipe my credit card in the parking ticket dispenser and this is what comes out:

Now, seriously, if even the parking ticket dispenser calls you “leet”, how can you lose? It went beyond great, by the way. But I can’t figure out how the machine knew that in advance.

I can’t help it…

…but I have to show you this. I almost wet myself reading it.


	From:     Central Inteligency Agency 
	Subject:  From Central Intelligence Agency
	Date:      8 February 2010 9:22:14 GMT+01:00
	To:         undisclosed recipients: ;
	Reply-To: inteligencyofficer@yahoo.in

Central Intelligence Agency
City in Carter Lane, next to St.Paul's.
https://www.cia.gov/

Att: Beneficiary,

This is letter from the Central Intelligence Agency (CIA) You was

reported in this office last year that you have been dealing with
some Nigeria Hoodlums through the internet, which we have monitored
you and confirm that you have sent so much amount of money to some
Hoodlums in the internet through Western Union and Money Gram all in
the name of transaction.

You have been advice to quit every communication that you have with
all those Hoodlums for the main time because we have marked some
trace on there email address and we are trying to get them arrested
and if you insist and continue with them you will be arrested, So
right now you are advice to disconnect communication with them and
give us details about them.

Get back to us as soon as possible.
Mr. Mualler
Central Intelligence Agency