2014-02-06

Cocoapods complaining about unmerged files due to broken specs repository

If you see the following message at the end of any pod command output:
Pull is not possible because you have unmerged files.

Please, fix them up in the work tree, and then use 'git add/rm '

as appropriate to mark resolution, or use 'git commit -a'.
Then you need to
$ pod repo remove master
$ pod setup
As described on http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/.

2014-01-20

My take on Bitcoin - appreciation for the freedom!

In the human world everything starts with an idea. That idea has to be built by a human mind in order to materialize it in this world. Imagining a new, digital, and secure currency as an alternative to traditional payment instruments is an extraordinarily exceptional achievement to me!
The vision and the thought processes leading to the vision of a decentralized, non-regulated, independent, and reliable currency are very exciting.
However, this phenomenon is more than just a new way of trading: It's about the freedom and power of imagination. We still don't know who the person(s) is/are behind the idea. For me, I even don't know, whether I really need this crypto-currency in the future. But I'm glad I already made a decent amount of money thanks to the volatility of the exchange rate.

In contrast to e.g. stock exchanges, where the market actors are only professionals with an appropriate license and are experts of their fields, Bitcoin exchanges will heavily be used by laymen, too. Everyone can join the party, manipulate the exchange rate or even open a marketplace without any restrictions. Without the need for law, government or gold reserve Bitcoins are just working, spread and increase in popularity across many countries. More and more businesses of various industrial sectors accept, embrace and use it each and every day. Start-ups utilizing and extending its versatileness will be created one after the other.
Without trias politica (legislative authority, executive authority, and judiciary) value will be added, jobs will be created, and wealth will be increased. It is optional to join: The country you're living in may ban, charge pay duty on or simply ignore it.

It's up to you how you perceive this liberty. The risk of losing your investment isn't a threat, but simply a natural consequence of the freedom, potential, and lack of experience and scientific knowledge of this exciting new territory.
People with limited or narrow perspective may only see the hazards related to Bitcoins, because they just can't handle this degree of autonomy. Such people rather rely on financial institutions dealing with means of payments, stocks, funds, or materials said to be valuable by others (isn't gold just a kind of metal…?). These people ignore many facts! The last economic crisis was possible because of the failure/corruption of the governments and the bank industry. The lack of criminal prosecution resulted neither in fundamental changes in the sector, nor in sentences for the responsible persons. Instead public money was used for saving banks and even for paying bonuses to employees for ruining whole economies. Less devastating is gambling funds or long-term bonds away. Common in both cases is that whether you were involved or not, you pay the penalty (with your investment and/or your tax) for the greed, maliciousness, incompetence, and failure of people who should've valued your trust, but are in fact just criminals or criminally unsuitable. In both cases you'd relied on the state, value reserves, responsible and skilled operation of your contract partner. You could blame all of them, but it was solely you who made the decision to get into business with those racketeers.

In case of Bitcoin there's a huge advantage: There's no false promise of safety and security, but only honest unpredictability. Due to its peer-to-peer nature no one else other than you can lose your investment. Unlike in case of conventional investments you can't delegate to anyone (such as a broker), you can't trust, believe or in any other dubious way waste your personal resources on anyone.
This overwhelming freedom with all its advantages and disadvantages can be yours, but enjoy it responsibly.

2013-10-31

Apple and iMessage - an unreliable service

They can't get it right. It has always been buggy.
I encountered the following failures since the launch of the service:

  • iMessages on my Mac have always been delivered several, up to 10 minutes later than on my iPhone
  • Sending iMessages on the Mac failed at first in 90% of the cases; I had to resend them prior to Mavericks
  • Yesterday the activation of my phone number suddenly disappeared from both my Mac and my iPhone
  • Since yesterday the delivery of the iMessages has been unreliable: I haven't received Messages which are shown "Delivered" at the peers' end and vice-versa.
(Being an iPhone developer, I reported all the issues.)

Is it a bug in iOS 6 and/or 7?
Apple rarely admits failures.

Is it an infrastructure issue? 
Not according to their systems status page.

Is it because of solare flares?
Could be.

Fact is that compared to other messaging services such as Viber, Skype, Facebook or GTalk Apple's iMessages is by far the worst in terms of reliability! This is not the quality I'm used to…

2013-10-17

Inline date picker with static cells configured in storyboard

In previous versions of iOS the pickers were usually displayed in modal views.
But for iOS 7 Apple recommends the implementation in their iOS Human Interface Guidelines as follows:
"As much as possible, display a date picker inline with the content."
They also provide a sample implementation, but for tables with dynamic prototype cells what makes the implementation more complex.
Instead of deleting and inserting a row containing the picker, constantly modifying the data source, calculating the number of rows in the sections, etc. my solution for one cell using the date picker is:
  1. Store the picker's row height
  2. Store the picker's row's index path
  3. Set the picker's row height to 0 in viewDidLoad
  4. Set a flag reflecting the visibility of the picker to false
  5. When the date cell will be selected in tableView:didSelectRowAtIndexPath:, then negate the flag
  6. Depending on the flag's value set the height of the picker's cell either to 0, or to the original value
  7. Deselect the date's row in a [self.tableView beginUpdates] … [self.tableView endUpdates] block what causes the picker's cell to collapse and expand in an animated way.
The synchronization of the date cell's label text and the picker's value is trivial to solve and isn't subject of this post.

In case the date picker needs to be "attached" to several date cells, then the following need to be considered
  • Use an array where the indexes represent the sections and the values the number of rows in the sections
  • Use tableView:moveRowAtIndexPath:toIndexPath: (probably in a separate beginUpdates - endUpdates block)
  • Reduce the number of rows in the source and increase the number of rows in the destination section by one (or do nothing if they are the same)
  • Use the section's index for the array's index in tableView:numberOfRowsInSection:.

2013-05-06

Tanita Segmental Body Composition Scale BC-545N

Experiences with the FitBit Aria and the Withings WS-50 Smart Body Analyzer showed me that I don't need a scale with
  • Wi-Fi capabilities
  • Air quality measurement
  • iPhone app
  • Web dashboard.
What I really need is a reliable device based on scientific and medical knowledge supporting me in understanding my body composition - this is how I got to the third and final choice, the Tanita BC-545N

You don't have to set it up either via Bluetooth or Wi-Fi, because it only stores data in its memory. Thus to make graphs and over-time analysis you'll have to enter data manually either on their site called WeightCheckers or simply into a spreadsheet (this is how I do it). But, in order to understand all the metrics provided by the device you need 1-2 minutes anyway and that's sufficient to do the typing.

With these measurements you can set a correct focus for you (and up to 4 further persons with automatic recognition):
  • Weight
  • Body Fat %
  • Body Fat Healthy Range Indicator
  • Total Body Water %
  • Muscle Mass
  • Physique Rating
  • Bone Mineral Mass
  • Basal Metabolic Rate
  • Metabolic Age
  • Body Mass Index
  • Visceral Fat
  • Visceral Fat Healthy Range Indicator
  • 5 Segmental Fat Readings (trunk, right and left arms and legs)
  • 5 Segmental Muscle Readings (trunk, right and left arms and legs).
I'm satisfied with this product after a few days of usage and can only recommend it.

2013-04-18

Fitbit Aria

After having sent back the Withings WS-50 scale (for details read my previous blog entry http://www.andrashatvani.com/2013/04/withings-ws-50-smart-body-analyzer.html) I decided to try the Fitbit Aria.
Here I provide a very short comparison with the WS-50 and a conclusion, too.

Advantages:

  • Cheaper by € 40
  • Doesn't need a smartphone for the setup/scale assignment, because it will be done via the Mac/PC
Disadvantages

  • You must buy a premium account for € 44,99/year to be able to access all the fitness-reports 
  • No air quality measurement
  • No heart rate measurement.
I've already started the return process of this device, too…

2013-04-07

Withings WS-50 Smart Body Analyzer

I was one of the first few who ordered this device: http://www.withings.com/en/bodyanalyzer and I'd like to share my experiences and problems I encountered.


Experiences

I keep the device in the bedroom as it is suggested by Withings and (opposed to their recommendation) I weigh myself each and every day.
  • Body weight: The records show a daily variation of 2-3 kg, but as far as I know this is normal for a me-sized human.
  • Fat and lean mass: I can't really judge, whether the values are correct, but I have to assume, since I want to keep the device. 
  • Heart rate: It requires discipline to ensure identical breathing and other preconditions; for me it will take a few more days…
  • Air quality (CO2): The device analyzes the air every half an hour and submits the values upon each scaling or every 12 hours. It really helps to improve my ventilation habits.
  • Data synchronization: The data shows up immediately after the scaling has been completed. 
  • Scale display: Crystal clear and pleasant white-on-black.
  • Usage by non-registered users: The data can be assigned to a user to be created.

Issues

  • The scale couldn't connect to my 1st gen. Time Capsule (5 years old)  which was set to the radio mode "802.11n (5GHz only)". I had to set the radio mode to 802.11n 2.4GHz, to make it work, but this is a performance degradation resulting in half of the bandwidth as on 5GHz.
  • The web dashboard doesn't yet fully support the device
Heart rate and air quality metrics are missing
  • Assigning the scale to a further user account results in going through the whole setup process again.
  • The scale suddenly started to measure unbelievably high CO2 values, where blue is around 50 ppm and brown is around 65.500 ppm (would be normally a very dangerous concentration)
Invalid measurement data
  • The scale measured −4,5% fat mass reduction in just two days - also impossible.
These issues force me not to recommend the scale as I'm thinking about returning it, because I don't trust it anymore…