Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

June 29 2017

Twitter thread - What's your favorite book introducing a programming language?

Super interesting answers.

June 13 2017

Reading "How will you measure your life?" by Clayton M. Christensen

The other day I’ve started to listen the “How will you measure your life?” audiobook by Clayton M. Christensen.

The 2nd chapter introduces Frederick Herzberg’s two-factor theory or motivation theory. I have found it very educational. As a leader, you might discover or realize these aspects—what the theory calls hygiene and motivation factors—by yourself over time. It’s reassuring though to learn there’s a theory and research behind.

I’m also planning to watch the homonymous TEDx talk:

May 29 2017

What's the right way to organize my Go project code?

I’ve only worked with Go code a couple of times (the Go wrapper of the DataStax C++ driver for Apache Cassandra is one of them). But my familiarity with the rules and practices in the Go land is very limited. So when I looked to start a toy project I have found myself asking again: what’s the right way to organize my Go project code?

I have found very little online. The first, is Ben Johnson’s Structuring Applications in Go:

I used to place my main.go file in the root of my project so that when someone runs “go get” then my application would be automagically installed. However, combining the main.go file and my application logic in the same package has two consequences:

  1. It makes my application unusable as a library.
  2. I can only have one application binary.

The best way I’ve found to fix this is to simply use a “cmd” directory in my project where each of its subdirectories is an application binary.

There are some additional hints in the article about Go project code org, and some

I had very high hopes that I’ll find the final answer in David Crawshaw’s slides Organizing Go code. The slides are really interesting, but unfortunately they don’t provide the answer I was looking for.

Finally, I’ve run into Dave Cheney’s Five suggestions for setting up a Go projec. This article provides suggestions for the following types of projects:

  1. a single package
  2. multiple packages
  3. a command
  4. a command and a package
  5. multiple commands and multiple packages

All I read in this post makes sense to me. So until I hear other recommendations, this will be what I’ll be using.

December 24 2016

Dealing with the leap second at AWS

AWS Adjusted Time – We will spread the extra second over the 24 hours surrounding the leap second (11:59:59 on December 31, 2016 to 12:00:00 on January 1, 2017). AWS Adjusted Time and Coordinated Universal time will be in sync at the end of this time period.

It sounds like AWS is using a similar approach for dealing with the leap second as Google does, by making the time slightly slower for a window of time. What seems to differ is the lenght and when this window of time is scheduled. For Google, the interval is 20 hours with the leap second right in the middle of it. For AWS, the interval is 24 hours, but finishes at the same time with the lead second.

I confess that I’m curious about any pros and cons of each of these approaches.

December 23 2016

Dealing with the leap second at Google

No commonly used operating system is able to handle a minute with 61 seconds, and trying to special-case the leap second has caused many problems in the past. Instead of adding a single extra second to the end of the day, we’ll run the clocks 0.0014% slower across the ten hours before and ten hours after the leap second, and “smear” the extra second across these twenty hours. For timekeeping purposes, December 31 will seem like any other day.

I don’t know if this a widely used approach for the leap second to spread it across 20 hours.

December 16 2016

Make sure you're using the correct USB-C charge cable

  • If the first three characters of the serial number are C4M or FL4, the cable is for use with the Apple 29W USB-C Power Adapter.
  • If the first three characters of the serial number are DLC or CTC, the cable is for use with the Apple 61W or 87W USB-C Power Adapter.
  • If the cable says “Designed by Apple in California. Assembled in China” but has no serial number, you might be eligible for a replacement USB-C charge cable.

I wish it was a joke.

December 14 2016

Apple AirPods shipping... in 4 weeks

The Apple AirPods re-announced through a press release are shipping in 4 weeks and are not available for pick up from stores. This looks like missing a deadline to me.

Apple AirPods

I was more interested in the BeatsX Earphones. They are using the same Apple W1 chip as the AirPods, but are less futuristic. The status of these headphones changed from “Coming this fall” to “Currently unavailable”.

BeatsX Earphones

Anyways, I take the long delay with which the AirPods are shipping as a sign of technical issues. I’m not willing to spend the $150 to discover what are the issues and limitations of these headphones.

December 12 2016

Armadongleon: Connecting the Touch Bar/Thunderbolt 3/USB-C MacBook Pro to my TV and monitor

I’m still in the middle of the Armagedongleon and today’s task was to figure out connectivity from Thunderbolt 3/USB-C MacBook Pro to my TV and monitor.

Connecting the Thunderbolt 3/USB-C MacBook Pro to the TV

This one was as simple as I imagined. But not cheap.

In the past, there were 2 ways I would connect to the TV from my macOS devices:

  1. a HDMI-HDMI cable
  2. a Mini DisplayPort-HDMI cable.

Based on these, the 2 dongles I thought could help:

  1. the “USB-C Digital AV Multiport Adapter”: $49
  2. the “Thunderbolt 3 (USB-C) to Thunderbolt 2”: $29

The “USB-C Digital AV Multiport Adapter” option is the one that worked. The first time I plugged in the dongle, I was prompted to perform a driver update. Then everything worked as expected.

USB-C Digital AV Multiport Adapter

Please note that the Thunderbolt 3 to Thunderbolt 2 does not work. There is a note somewhere in the Apple pages about this dongle not working/supporting the Mini DisplayPort capabilities.

Side note: besides HDMI, the AV Multiport adapter also has a charging USB-C port and USB-A port. As I don’t need the USB-A port, and having the charging USB-C is nice, but definitely not critical, I’ll be looking to find a cheaper adapter that only support HDMI.

Connecting the Thunderbolt 3/USB-C MacBook Pro to my Monoprice IPS monitor

The Monoprice IPS monitor I’ve been using for the last couple of years requires a Dual-link DVI adapter1.

Mini DisplayPort to Dual-Link DVI

I confess that I didn’t have very high hopes. Even if my research hasn’t revealed any potential solutions, I wasn’t completely pessimistic when I walked into the Apple store. But things changed very fast after starting to describe how I use to connect to this monitor. I could tell by the grimace of the sale person that I’m touching a pain point2. We consulted with other technical people in the Apple store and in the end, we decided that the only adapter that seemed like having a slight chance to work is the “Thunderbolt 3 (USB-C) to Thunderbolt 2”.

Thunderbold 3 (USB-C) to Thunderbolt 2

Judging by what we read online — none of the people we’ve talked to could tell with a good level of confidence what can be expected to work or not from this dongle — I didn’t expect much. And I was right, as this adapter didn’t work3.

At this time, there is no way to use my Monoprice IPS monitor with the Touch Bar MacBook Pro.

To make things more complicated and unpleasant for me:

  1. the 4k LG monitor is not on display in the Apple store. Apple wants you to buy it blindly. I’m wondering why?
  2. the 5k LG monitor is “coming this fall” (today is Dec. 11th, but astronomically(?) fall’s ending on the Winter solstice day, Dec. 21st)
  3. I’m almost sure that neither of these will work with my 2013 retina MBP I got from work.

I haven’t made up my mind yet what to do regarding the monitor. If you are in a similar situation, I’d love to hear your thoughts and/or decision.

  1. Apple’s dongles have never been cheap. I had paid $99 for this Mini DisplayPort to Dual-Link DVI adapter. Compare it with the about $400 I paid for the monitor. But at that time, it was still a good deal considering the Dells were around $700-800. 

  2. we ended up chatting about the state of dongles and he confessed that 1) he postponed upgrading his own notebook; 2) he avoids recommending the Touch Bar MacBook Pros to non-geeks, and 3) it’s a nightmare.  

  3. right now, I have no idea what the “Thunderbolt 3 (USB-C) to Thunderbolt 2” adapter is good for. It definitely doesn’t support the DisplayPort features. But I’ve also tried chaining it with the Ethernet-to-Thunderbolt and it did nothing. 

December 11 2016

Dibya Chakravorty: My search for a MacBook Pro alternative

8 laptops reviewed to correspond to the following requirements:

  • must have good build quality comparable to Apple products.
  • must have powerful and upgradeable hardware (at least up to 16 GB RAM, 6th or 7th gen processors and 512 GB SSD).
  • must have a good form factor, be light and portable.
  • must be Linux compatible out of the box.
  • must be cheaper than/as costly as the MacBook Pro with similar configuration.

What she finds is not looking very encouraging. Slightly less disappointing than The best MacBook Pro alternatives, now that Apple ruined everything

December 08 2016

What happened to my Touch Bar?

DayOne on Touch Bar

This is how DayOne displays my movie journal in which each entry has the movie poster. That’s super cool!

December 02 2016

9304 5220 500

Looking at this I’m scratching my head wondering why I haven’t saved the models I had owned. I’m sure there are plently that had them all; I started with 3GS and I’ll most probably skip the 7.

Console app: how many bugs can you count?

How many bugs can you count in the screenshot below?

Console app on macOS Sierra

This is not about some third party app, but the Console app itself on macOS 10.12.1.

November 27 2016

Tree and Ranger: 2 utilities for the terminal

Just a quick note about 2 utilities for the terminal:

  1. Tree: a recursive directory listing command that produces a depth indented listing of files, which is colorized

    Tree screenshot

  2. ranger: a console file manager with VI key bindings

    Ranger screenshot

Both can be installed on macOS through Homebrew. And they are great!

November 21 2016

Reddit: I just tried spacemacs for two weeks. Here are my impressions

Great things:

  • The ability to roll back package updates easily
  • Pre-configured layers that can auto-install if you open a ruby (or whatever) file
  • Really good defaults (whoever came up with Emacs’ default scrolling needs a stern talking to in my book)
  • I really like the idea of the mnemonic keybindings. I ended up disliking how Spacemacs does it, more below

User zreeon on Reddit

I learned about Spacemacs a while ago. Before that I’ve tried to get comfortable with Emacs a couple of times and ended up having a decent working configuration; I’ve built it from scratch following the advice of adding to it only the bits and pieces that I understood.

Today I still have Spacemacs on all my machines. I don’t use it very frequently though, but I keep it up to date and, now and then, I check how random things are done.

Then I go back to my Vim environment. There are a few things that I wish I had in Vim too:

  1. a central listing of Vim plugins (download numbers, last update info would be super useful)
  2. feature packages. Not having to figure out what plugins to combine to get an end to end experience would make things so much easier. I do wonder if Vim’s 8.0 packages will start be using for this.
  3. Consistent mappings. Even more important, a keybindings hint system that could suggest mappings that are available. Spacemacs uses which-key which provides a help buffer listing the available key bindings and their associated commands. It is amazing!

November 20 2016

Random Thoughts about AsciiDoc

A question on Twitter made me quite curious about AsciiDoc. I’ve heard about it in the past and as someone writting almost everything in Markdown I was naturally curious to see what improvements could it bring to my environment.

What follows is the series of remarks, comments, head scratchers, and complains I accumulated over a couple of hours of learning AsciiDoc:

  1. searching anything about AsciiDoc led me invariably to either AsciiDoc or Asciidoctor. That was confusing as hell. Even if the 2 projects seem to be related.
  2. after doing quite a bit of reading, I still cannot summarize the main advantages of AsciiDoc when compared with Markdown. I did noticed some interesting features, but I had to read the docs twice. Now when writting this, I do realize that I should’ve create that summary myself.
  3. I didn’t find a way to simply generate an HTML fragment; AsciiDoc supports multiple output formats, but not HTML fragments (see update at the end)
  4. it feels to me that AsciiDoc has a bit too much ceremony. While I did look at an example file, I failed the test of creating a simple document right after going through the docs.
  5. I have found an AsciiDoc plugin for Vim that is quite good. Spacemacs also has a layer for AsciiDoc, but the formatting used goes too far and I could hardly use it.
  6. weirdly enough, while AsciiDoc has better support for standardizing quotations (inline and block), I have discovered that when generating HTML, it doesn’t use either of the specialized tags cite or blockquote. I have found a corresponding ticket from 2013.

In the times of myNoSQL, I have developed my own toolkit and extensions around various Python libraries, starting with Markdown and all the way to custom scripts for resizing and uploading images, and an end-to-end publishing workflow. I don’t need such a complete toolkit these days, but if I’d actually see the significant benefits of AsciiDoc, I’d probably be tempted to address some of the above points myself.

Update: thanks to Dan Allen, I’ve learned that it’s possible to generate HTML fragments by using the -s option.

November 09 2016

CNET reports new MacBook Pro sales are surging

According to data collected by e-commerce tracking firm Slice Intelligence and reported by CNET, MacBook Pro revenue for its first five days has hit 78 percent of all the revenue generated by the MacBook 12-inch since it became available in April 2015, and has accumulated more revenue than any other laptop this year.

I don’t know where the tracking firm (Slice Intelligence) collected this data, but Phil Shiller said a similar thing in the interview with The Independent:

And we are proud to tell you that so far our online store has had more orders for the new MacBook Pro than any other pro notebook before.

This will be interpretted, again, as a “just shut up! Your complains have no merit and Apple knows what’s doing”. There are many ways to look at this data:

  1. this could be a sign of how bad the competition is
  2. a large number of customers where on hold waiting for the upgrade
  3. it doesn’t contradict directly the fact that maybe, just maybe, the new MacBook Pros are not satisfying the needs, or at least the expectations, of a segment of the customers that were looking forward to this upgrade. It’s not even a clear data point about the size and definitely not about how significant this group is.

November 07 2016

Alex Kras gets answers from the AMP Team after “Google may be stealing your mobile traffic” post

There were 2 main concerns that I brought up about the AMP implementation:

  1. Google was caching AMP pages and serving cached version from their search results.
  2. Google provided a tool bar at the top, with a link to the original source, but there was no easy way to copy or click through to that link. This UX was encouraging users to get back to Google search results instead.

I’ve noticed these 2 issues a couple of weeks ago after a tweet from John Gruber, who also posted about it.

I’m reading the answers provided to Alex Kras differently though.

BBC: Why you feel busy all the time (when you’re actually not)

You might assume the explanation was straightforward: we feel so much busier these days because we’ve got so much more to do. But you’d be wrong. The total time people are working – whether paid or otherwise – has not increased in Europe or North America in recent decades. Modern parents who worry they’re spending insufficient time with their children spend significantly more of it than those in generations past.

My take-aways from this article:

  1. we suck at managing time
  2. we are not even able to track our time objectively
  3. our attention span is decreasing

And on top of all these, we also take a lot of pride in how busy we are.

A theory of Apple's all-in on Thunderbolt 3

If you are reading this, I’ll assume you already know that the new MacBook Pros announced on Oct. 27th come with Thunderbolt 3 ports only.

Having only these ports will make the transition to the new machines less frictionless for those customers that are using external devices (e.g. hard drives, USB hubs, mice, keyboards). It’s hard to tell what percentage of MacBook Pro users have at least one external device connected to their laptop. I don’t know if such information can be or is actually tracked by Apple.

Why would Apple ship new machines that will inconvenience some of its customers?

People with better knowledge of Apple’s history will point out that this wouldn’t be the first time Apple dropped support for some popular, or at least still in use, technology in favor of something new. As far as I can tell, these past decisions were made for making room for some significant improvements or getting rid of decaying technologies.

I know that some of these decisions could also be explained by business reasons. Take for example the removal of optical drive. Besides the technical reasons, another explanation for this decision could’ve been that it had the potential of increasing revenues from the iTunes store.

The past can only tell us that Apple is willing to make such decisions, but not necessarily explain the current one.

My theory is that Apple believes, deeply, that the future1 belongs to Thunderbolt 3. The technical advantage of Thunderbolt 3 is obvious, but it cannot explain the all-in strategy. Instead of waiting for this future to happen at the speed of device vendors, Apple wants to speed it up by going all-in.

Apple is one of the top laptop vendors. It doesn’t have the largest share, but it’s among the top 5. Customers getting the new MacBook Pros will probably rely initially on a series of converters for external devices, but soon they’ll expect native Thunderbolt 3 ones. This will create market pressure on device vendors to go Thunderbolt 3 or at least USB-C.

The first counter-argument for this theory is that Apple has a small market share (somewhere between 5-7%) and the new MacBook Pros represent just a subset of Apple machines.

On the other hand, I’m sure that there are plenty of vendors out there willing to get access to Apple customers. I think these will be the ones that will see the immediate opportunity and jump in right away. As a result, this will create even more market pressure for the move to Thunderbolt 3 or USB-C.

Simply put, Apple’s all-in on Thunderbolt 3 will create a virtuous circle which will lead to faster adoption of this technology among the vendors and implicitly customers, who’ll benefit of faster, better, and simpler connectivity.

Side note: There are some other possible explanations for this move, but I’d really like these not to be true:

  1. old ports were removed because of the thinner and lighter direction
  2. old ports were removed because they’re leading to an asymmetric design

  1. at least the next few years 

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!