Archive for the ‘Missives’ Category

More Time Machine Surprises

Tuesday, November 14th, 2017


Another HDD bites the dust… I thought I was prepared. It turns out that there are always unexpected roadblocks when dealing with digital data.

Most recently, I decided to use a RAID 1 scheme (mirroring) as an additional piece of my data security plan. I then have a remote time machine backup. The Time Machine disk is smaller than my RAID, and as such, I only backup  irreplaceable data, like photos and documents to Time Machine. The remainder, like MP3s and DVDs I left to the RAID for protection. In the worst case scenario, I can always re-rip a CD or DVD.

Lesson 1: RAIDs aren’t backups!

Things have been going fine, and I’d been living happily with this setup for about 3 years before disaster strikes. My disk disappeared while I was working, which causes all sorts of weird behaviors. One of the RAID slices failed. The failure was so bad that I couldn’t even read any smart data from the disk. I also couldn’t remount the RAID for some reason. I shut down, removed the failed HDD, and rebooted. The RAID disk reappeared!

But there’s a catch… I did a quick check to see if the data on the disk looks accurate. It turns out that it is not. In fact, it is 6 months out of date! How did that happen?? The only explanation is that RAID failed silently 6 months ago. I’ve been operating on only one disk this whole time!

Lesson 2: Mac OS doesn’t inform of RAID failure!

In fact, disk utility (in El Capitan) doesn’t even show problems with RAID sets at all. The only way to verify a RAID set’s health is to check manually using a command in the terminal, or use the Yosemite Disk Utility.

$ diskutil AppleRAID list

I promptly ordered a new HDD. My plan for recovery is to rsync the data from the out-of-date disk to the new disk, and then rsync the more recent backup from Time Machine on top of it. That will ensure that I have the most coverage of my data.

$ rsync -aPE /Volumes/Old\ Volume/ /Volumes/New\ Volume

When rsyncing, I use the options ‘a’, ‘P’, and ‘E’. The ‘a’ is for ‘archive’ and enables a lot of good switches. ‘P’ is so progress is displayed. This is helpful for gauging how the copy is going. ‘E’ is for extended attributes. I use this because I still have OS 9 files hanging around with resource forks that I am trying to preserve.

The plan goes accordingly, and all my data is merged onto the new HDD! I reboot, login, and then discover the new hiccup; I can’t write anything to my user folder. I can’t load preferences, save anything. I can’t even touch a file!

$ touch ~/test.txt
touch: ~/test.txt: Permission denied

I look at the permissions of my folder to make sure everything looks fine, and indeed it does!

$ ls -ld ~
drwxr-xr-x@ 99 michael staff 3366 13 Sep 14:47 /Users/michael/

I can’t wrap my head around what possible be wrong! If the permissions are right, and the user settings are right? What could the problem be?? My brother is smart enough to have me try listing with the ‘e’ option which shows extended attributes.

$ ls -lde ~
drwxr-xr-x@ 99 michael staff 3366 13 Sep 14:47 /Users/michael/
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown

Lesson 3: Time Machine puts protective ACLs on everything!

Access Control Lists (ACLs)… I hate ACLs… A wonderful combination of events led to every file being completely protected from all users via ACLs. First of all, I didn’t know this, but Time Machine protects all the backed up files using ACLs. This keeps users from unwittingly deleting things from their backups. It makes sense, but isn’t something I would have expected to be done on a file level. The second ingredient in this predicament is that I used the ‘-E’ option in rsync which copies the extended attributes. If I had left that off, this wouldn’t have been an issue…

Fortunately, there is an easy solution. Remove all the ACLs from everything! This is done with chmod.

$ sudo chmod -RN ~

This takes a while, but works as expected. My user folder is now working as expected, I can write and save documents. I can read my Photos library, etc. But there’s one more issue… I notice that my homebrew is acting funny. I look at my homebrew directory, and discover that none of the symbolic links have had the ACLs removed.

$ ls -le libpng-config 
lrwxr-xr-x+ 1 michael  501  41 Aug 16 22:50 libpng-config@ -> ./Cellar/libpng/1.6.31/bin/libpng-config
 0: group:everyone deny write,delete,append,writeattr,writeextattr,chown

Lesson 4: ACLs can’t be removed from Symbolic Links!

It turns out that using chmod to remove the ACLs from symlinks doesn’t work. The man page suggests that the -h should be used to remove the ACLs.

-h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to.

But that doesn’t work either.

$ sudo chmod -hN libpng-config 
$ ls -le libpng-config 
lrwxr-xr-x+ 1 michael 501 41 Aug 16 22:50 libpng-config@ -> ../Cellar/libpng/1.6.31/bin/libpng-config
 0: group:everyone deny write,delete,append,writeattr,writeextattr,chown

Searching online yields similar stories. It sounds like this is a long standing bug. Time to pull out the big guns… A one line bash script to erase and recreate all symlinks!

$ find . -type l | while read link; do echo $link; dest=$(readlink "$link"); sudo rm "$link"; ln -s "$dest" "$link"; done

It works like a charm. I run that across all the data that came from Time Machine, and it looks like I am back in business. Full recovery!

I need to change my way of protecting my data. 2 things I am going to do differently going forward:

  1. I won’t rely on RAID 1. The lack of notification if there is a slice failure is unacceptable. I will now use a weekly rsync chron job to sync my data to a second drive in my computer. Having a fully duplicated drive is handy because you can switch to it immediately in the event of a failure, and not have to go through a lengthy restoration process.
  2. Full backup to Time Machine. Although I didn’t suffer (major) data loss, I think it’s worth buying a larger HDD to create a full Time Machine backup, and not just the irreplaceable documents.

So, there you have it. Hopefully this will answer questions for other people out there, especially about ACLs!

Lego CAD

Saturday, October 7th, 2017

My first introduction to Lego CAD was an old program I used as a child on Mac OS 7 called Gryphon Bricks. While interesting, it didn’t captivate me very much. I was old enough that I was more interested in the Technic type of Lego set, and there were limitations to the program that I found off-putting.

Since then, I haven’t delved into the world of Lego CAD until this month. I bumped into Bricksmith while searching for something, and decided to download it. Brick Smith is an unofficial Lego CAD program. I read about it  years ago, but never gave it a chance. I downloaded the newest version and was blown away. It uses an extensive library of Lego pieces (from ldraw.org) which include pretty much every Lego piece I’ve ever seen as well as the various prints for these pieces dating all the way back to the 70’s.

As an exercise, I built a T-16 Skyhopper. It went together pretty easily. Bricksmith has some convenient features, as well as some limitations. Everything is grid aligned, and you can move and orient pieces along these divisions. There doesn’t appear to be any concept of mating and piece intersection (which could be seen as a good thing or a bad thing). There is certainly lots of freedom. Once you pick a part, you place it, and you can move it using the arrow keys and rotate it, and select a color. You can copy and paste pieces too.

I’m not enamored with the coloring process. In this case, the problem is that there are so many colors to choose from, that finding them can be tedious.

What I found really neat was the concept of grouping. The pieces can be grouped into steps. Once you complete your model, you can then print the steps out. Step reordering and modification seemed pretty straightforward too.

As a whole, this program is pretty amazing.

While playing with Bricksmith, I spent some time googling to find out more about it, and ran into Lego Digital Designer (LDD), the official Lego CAD system. I somehow had never heard of it even though it was introduced in 2004, so I decided to give it a whirl as well. I played around doing some free builds, and then built a MicroFighter X-Wing.

The experience was very different from Brick Smith. At first, I was annoyed that all the color variation of pieces are displayed as separate pieces int he parts bin, but it actually made getting the correct pieces faster and easier. The other thing I love is that pieces automatically mate to each other. By dragging the piece around with the mouse, the piece automatically snaps to surfaces that are appropriate for mating. This can be faster. Unfortunately, I haven’t found a way of moving a piece directly with the arrows as one can do in Bricksmith. Generally, the auto snapping works well, and if you can’t get it to snap right where you want, usually rotating the camera can do the trick.

The program also knows when two pieces can hinge. The hinge tool is very impressive! After getting comfortable with that, I decided to do a bigger build to put LDD through it’s paces.

The Millennium Falcon. This is one of the larger Lego sets, at over 5,000 pieces. It is no longer sold, and as such, I never had the opportunity to build it in real life. This seemed like a fun way to dive in and see how the program handled. I had the PDF instructions and LDD on screen side by side.

I began constructing this set investing bits of time here and there. Along the way, I fought with some apparent limitations of the program (or it’s user).

However, I did finally complete the model within about a week’s time.

The automatic mating of pieces is a huge time saver when it works. Unfortunately, when there is an intersection problem, the selected pieces are transparent indicating that they can’t be placed. I wish it would highlight the intersection problems in red as it can be difficult to discern where problem areas are. When there are alignment issues, the program is very strict. There are no integrated physics, so hinged pieces don’t fall into place, but stay wherever they are placed. All of the exterior sheets of the Falcon had to be hand adjusted in place to make it fit together.

In some cases, the strict alignment prevented me from following the instruction precisely. In the example above, the hinge pieces are not allowed to bend beyond 90 degrees. In real life, you can forcibly bend them a bit further allowing this configuration shown in the instructions on the left. On the right, you can see that the holes are just barely misaligned, preventing the axle from being inserted.

In other case, I was probably too hasty in finding the proper alignment for elements, and improvised modifications to the model. In the above image, you will note that the angled wing shapes had to be shortened because they were interfering with the adjoining side. This could probably have been resolved by manipulating all the joint angles.

Overall, the tool seems very powerful, and fun. LDD is easy enough to use, that my seven year old can build things on his own, for example, this small Millennium Falcon. The hinging tool and part placement is intuitive enough that he only needed to observe me using the tools a few times to get it, and then be able to do it on his own.

One thing to note though is that some of the part categorization in LDD seems illogical (or at least, not how I would do it). There is a category that appears to be the catch-all for hard-to-classify pieces, and I find myself sifting through there quite often for specific things. Also, one category with an icon of a small wing is in fact home to flat angled, round, and curved pieces, and not just wing shapes which I find bewildering. They were kind enough to include a search feature that lets you filter by part number, size or description. I have had multiple instances where searching by part number provided by the instruction yields no result, yet I could find the part by visual searching through each category.

It’s also been fun using these programs to be able to build sets that are no longer available. While LDD has an easy-to-use UI, and fancy mating and hinge logic, Bricksmith has a superior part catalogue and flexibility for piece placement.

Post Apple Announcement Letdown

Thursday, October 27th, 2016

sadmacMy fanboism toward Apple has been waning for the last few years. Apple does not seem to share my priorities. A few examples:

  • I find no value in the Apple Watch.
  • I think that computing should be done from proper computer, and not an iPad or iPhone.
  • Focusing on the iOS and social integration into Mac OS X instead of more pressing matters (Like a new File System, or simply some bug fixes!) is a mistake.

Misleading The Fans

hello_again_event

This most recent announcement just about seals it though. The advertisement for the event featured the words “hello again.” For loyal Apple customers, this phrase has significant meaning, as it was central to the marketing that marked the rebirth of Apple with the introduction of the iMac by Steve Jobs.

imac-hello-again

When they used this phrase with the iMac, Apple was referencing an even earlier product that marked a significant shift in computing in the 1980’s. The original Macintosh. The first promotional shot of this computer-that-changed-everything had the playful “hello” welcoming user’s to its new graphical user interface.

Apple set up the long-time fans of Apple for something revolutionary. Something that would be amazing, and something most-certainly to do with the iMac, which is frankly Apple’s core product. It is the emblem of Apple and their revitalization in the 90’s. They had to know those words would make us expect an iMac announcement; especially after Microsoft’s announcement the day before, featuring the iMac like surface computer that works like a tablet.

microsoft_surface_studio_all_in_one_desktop_computer_1MacBooks

But instead of updating the iMac (or the MacMini or the MacPro…), they spent the majority of the time lauding the new MacBook Pro computers.

Let’s review all the amazing features that professionals were fervently waiting for:

  • They are thinner! (I’d rather have better heat dissipation, a better graphics card, and more battery capacity)
  • They have more pixels! (But I already have a large display on my desktop that I plug into)
  • There is a touchbar! (I don’t like having to look at what I am touching. Physical keys don’t jump around and can be felt without looking)
  • The track pad is bigger! (Was the previous track pad too small?)

Its not all superfluous though. There are some cool features that are exciting:

  • Touch id for logging in is a cool and novel feature.
  • USB3/Thunderbolt 3 does have interesting prospects since any port can be used for anything, including charging. (As long as they don’t change the port in 2 years and make us buy all new peripherals again…)
  • 2 TB SSD with 3 GB/s read/write speeds

Overall, it felt like a very weak press conference. It’s clear that they just don’t care about the desktop user. They want to appeal to young on-the-go people and their wallets.

Additionally Apple has been slowly killing useful features from their laptops for quite sometime. Here’s a brief list of the once common features that I wish were still present.

  • Battery Indicator Lights – Nice to check battery level without having to open up the laptop, and wait for it to power up
  • Non-soldered RAM – It used to be nice upgrading the RAM down the line, which would be more cost efficient. Admittedly, this isn’t to Apple’s favor though
  • Replaceable Battery – Less of a problem now than it used to be, still would be nice
  • IR Reciever  -Useful for presentation where you don’t want to be worrying about Bluetooth, or wifi connectivity. Also nice for playing movies if you use your Mac as a TV.
  • Sleep Indicator Light – nice to be able to tell is machine is sleeping or powered off
  • Magsafe Adapter – One of my favorite features to disappear. It has saved my laptop many times!
  • Glowing Apple – Not useful per-se, but definitely symbolic of Apple’s soul for the last decade!
  • Startup Chime – Useful for diagnostics, indicates that the hardware is working

No More Displays, No More Desktops?

lg5kmonitor-800x725

Another nail in the coffin for the desktop line is the fact that they endorsed an LG display for use with MacBooks. To me this signals that Apple will shortly discontinue the MacPro and MacMini line of computers. Apple tends not to use other company’s products in promotional shots and advertisements. The only two products without screens no longer have an Apple-branded screen to showcase and buy (and this screen certainly doesn’t exactly scream Apple). I don’t think this bodes well.

Less-Confusing Monikers?

Tangentially, their whole ecosystem has been very clumsily named lately. (Another problem reminiscent of the 1990’s Apple). They have Airs, Pros, Minis, and other dizzying designations that aren’t consistently used. What makes a Pro a Pro? Why was the MacBook smaller than the MacBook Air? Why is the MacMini not called the MacAir?

I propose a simpler, and far less confusing lineup across all products. There would only be 3 designations to differentiate product sizes, and two prefixes to differentiate between computers and devices. Please see the chart below:

proposedlineupConclusion

I hope Apple realizes that the Professional and Enthusiast users are important. For the last 30 years, the enthusiast and pro-sumer market has been Apple’s evangelists. This market would convince friends and family to purchase Apple products. If Apple Alienates these enthusiastic individuals, it could end up hurting their sales in the long run.

As for myself, I just can’t get excited about an Apple product until they release a decent desktop machine.