NCD: 2016 Macbook Pro 15″ Review! (refurb)


Got me a 2016 MacBook Pro 15″. Got it refurbished but it is really looks good as new. I really couldn’t justify paying the full price for what you get. No complains here, Apple’s refurbished stuff is top-notch.

Here are some of my thoughts on it after the one month honeymoon period.


Apple knows how to make desirable, beautiful hardware. And the new MacBook Pro is no exception. Apple stuck to the brushed aluminium feel and the whole package looks elegant. Not much to pick at regarding looks.


The new low-travel keys take some getting used to – I’m actually still not used to them. I like chiclet keys, but these are even lower travel than those. It almost feels like they are trying to steer you in the direction of on-screen keys on a digital screen by introducing these. Perhaps such keys are less failure-prone?

They do work functionally, but give off a clickety-clack sound when you are typing. Those with mechanical keyboards may like this “feature” that it has. Overall, I still prefer the feel of the keys of previous models.


The 15″‘s touchpad, or trackpad as Apple would like you to call it, is slightly too big in my opinion. It has built-in palm rejection to prevent accidental triggering of the cursor when you are typing, although I still do mange to trigger it, once in a while. No major complains here, and Apple’s gesture integration with OSx is top-notch, as always.


And here comes the latest gimmick from Apple’s stable. The touch bar. I have to admit, when I just got this machine, I wanted to use the touch bar so much that I was on the look out for stuff appearing on it. But as time went by, I realised that I never actually look at the keyboard when I am typing, let alone look at the touch-bar. In this respect, the touch bar doesn’t serve its intended purpose. It isn’t a selling point for me. If I could get the same model for 200USD less without the touch-bar, I would.

Dongles, Dongles, Dongles!

USB3.1 is excellent technology. You can interface lots of things to it – HDMI / power / just about anything you can think of.  It has a transfer speed of up to 5GBits/s, which translates to 625MB/s. This is comparable to a SSD’s write speed. What this means is that you can expect to write to an external USB3.1 SSD drive with the same speed as you would to an onboard SSD, with both drives being the same.

Apple loves USB3.1, and they loved it so much they put nothing but USB3.1 connectors on the laptop. Even the power adaptor is USB-3.1, which is a shame – I loved the MagSafe laptop power connector on older models.  On the flip side, it also means that you don’t have to lug a power adaptor around, any wall power with usb3.1 socket and be used to charge your Macbook.

The problem is : These ports are ahead of their time. There really isn’t a lot of USB3.1 devices out there at the moment. So for now, we will have to use dongles to convert these connectors to the intended connector type. In time to come, I don’t see why devices not all converge to USB3.1 as a standard connector. It just makes everything easier – but currently it is a case of the real world needing to catch up the the tech.

Last Words

The real reason I got Apple’s laptops is that I make iOS apps – there isn’t a real alternative  that doesn’t involve tons of hair pulling when all I want to do is to be productive.  Regarding this, I got what I wanted. No more waiting for Xcode to load interface builder, or web-page freezing up when I too much is going on in a web-page. Rendering stuff is much faster than on my late 2011 MacBook Pro.

I got six good years out of my 2011 MacBook Pro, and it is the only computer that I can profess to use the term “love” on. In my opinion, OSx is a better OS than Windows. It feels as stable as a Linux-based system, with the software that I need to do my stuff. It is an added bonus that you can plug in a USB keyboard and have it play music software with little latency immediately. The Microsoft lovers will say, but windows runs on all PCs, so it inevitably has to do more heavy lifting compared to OSx. I don’t care. I just want to get things done, and the machine that allows me to do that is my weapon of choice.


Loading tmux on Boot in Linux


tmux is a wonderful tool for displaying virtual consoles on the linux command prompt screen. It’s the next best thing to getting actual GUI windows controllable with a mouse.

Mainly, I use it for ssh purposes. Where I can ssh to a pc that I know has tmux already launched in the background and type.

tmux a

which attaches the session to the on-going tmux background session, allowing you to see everything that is going on in that process. This is especially useful for embedded systems where there are multiple processes launched in the background and you want to monitor them all.

So I have a tmux script here:



#allow re-launch
/usr/bin/tmux has-session -t $SESSION 2> /dev/null && /usr/bin/tmux kill-session -t $SESSION
/usr/bin/tmux -2 new-session -d -s $SESSION

echo "Launching tmux"

/usr/bin/tmux split-window -h
/usr/bin/tmux split-window -v
/usr/bin/tmux select-pane -t 0

/usr/bin/tmux send-keys -t $SESSION.0 "cd /path/to/binary1folder" C-m
/usr/bin/tmux send-keys -t $SESSION.0 "./binary1" C-m

/usr/bin/tmux send-keys -t $SESSION.1 "cd /path/to/binary2folder" C-m
/usr/bin/tmux send-keys -t $SESSION.1 "./binary2" C-m

/usr/bin/tmux send-keys -t $SESSION.2 "cd /path/to/binary3folder" C-m
/usr/bin/tmux send-keys -t $SESSION.2 "./binary3" C-m

This basically opens up , three panes and splits the window horizontally first, then splitting again one of the split windows vertically. It then launches a binary in each of the window panes. I won’ t go too much into the scripting here as there are plenty of resources for doing so, like this.

Configuring tmux to boot on startup on CentOS 7

Normally this should be pretty straightforward, but I ran into some hiccups.


sudo nano /etc/rc.local

And edit the rc.local file to include

su -c /path/toyourscript/ -l your_user_id

-l your_user_id means that you do the launch of the script as the user your_user_id.

Make sure your rc.local is executable.

sudo chmod +x /etc/rc.local

And by right it should launch when CentOS boots, launching in the background which in turn launches tmux. However, I found that one of the abrt startup scripts, was interfering with the launching of the tmux process/binaries. It would hang at the console terminal of the tmux screens. Doing the following resolved the problem for me.

cd /etc/profile.d/
chmod -r

Basically, make non-readable, allowing the profile.d startup process to skip over this particular script. It’s kind of a hack, but it worked. I reckon at most I don’t get the automatic bug reporting tool notifications at the console. Note that this script is run depending on what type of installation you chose when installing CentOS. I think that the minimal installl doesn’t run into this issue.

Hope this it useful to you, let me know!

ps. Here’s a tmux cheat sheet.

Sign Bit Extension

Sometimes you can get a value like this :

For example, something that is 12-bit in a 16-bit short int.

shortIntValue = 0b0000 1100 1110 1100

The latter 12 bits are the actual value. It is a negative value by the 12th bit being 1. And you really want :

0b1111 1100 1110 1100

You can do

shortIntValue <<= 4;

followed by

shortIntValue >>= 4;

Volia! Sign bit extension! This is useful for 2’s complement values which are put into a primitive integer size. (As above)

iOS Launch Images Madness

I was struggling with the iOS launch images. The easiest way I found was to not use image assets, or the launch image file. Just put these images under Resources in your project in XCode and iOS will find them.

  • Default.png (iPhone)
  • Default@2x.png (iPhone Retina 3.5 inch)
  • Default@3x.png (iPhone 6 Plus landscape)
  • Default-568h@2x.png (iPhone Retina 4 inch) 
  • Default-667h@2x.png (iPhone 6 portrait)
  • Default-736h@3x.png (iPhone 6 Plus portrait)
  • Default-Portrait.png (iPad in portrait orientation)
  • Default-Portrait@2x.png (iPad Retina in portrait orientation)
  • Default-Portrait@3x.png (iPhone 6 Plus portrait)
  • Default-Landscape.png (iPad in landscape orientation)
  • Default-Landscape@2x.png (iPad Retina in landscape orientation)

Oh my god, such a trivial thing.. why did Apple make it so difficult??

Quickly Plot in Python with Text File Values

Python has this wonderful command in numpy, np.loadtxt.
In this case, I use np.loadtxt to load a file consisting of several ADC real values to do a quick plot for visualization. The rule is that each row in the text file has to have the same number of elements. In this case it is simply.

and so on...


import matplotlib.pyplot as plt
import numpy as np

data = np.loadtxt('/path/to/your/file')

# get x-axis bins
x_axis = np.arange(data.size) * 960 / data.size

#plot time domain

# plot frequency domain
spc = np.fft.fft(data)
plt.plot(x_axis, 20*np.log10(abs(spc)))

That’s all. Pretty quick and nifty!