Migrating from iPhone to Android 4.4 (Nexus 5) – the geeky review

For the past few years, I have been an iPhone user. At first I was jailbreaking, that got frustrating pretty soon, so I forgot about phone freedom, which for me means I can install any app I want, not any app that Steve or any other guy (however nice) approves of.

I mainly missed a Bitcoin wallet, a good PGP implementation, encrypted folders. So I bought a Nexus 5 and quickly got introduced to the world of Android.

The good:

  • I can easily install any app I want. That includes a Bitcoin wallet (I use Mycelium), Tripglasses 🙂 and Fon (which can automatically log me into free wifi hotspots when I’m around)
  • Most apps I used have a good Android version or there’s a good alternative. The most difficult thing to migrate was GTD/to-do list app called Things, which I really enjoyed. Thankfully, I have found an alternative called doit.im, which is subscription-based ($20 for a year if you want a desktop app; otherwise it’s free as in beer). I have migrated while still on iPhone, and the device support of the app is just amazing. It also has all the features from Things I used and some more. There are some things in the GUI that are not so optimal, but I am very satisfied.
  • All the geeky stuff is there. I switched from Acrobits Softphone to csipsimple for encrypted calls. I also installed RedPhone. The first guy I called had it installed, so it switched the call to encrypted automatically. No hacking needed! It has encrypted filesystems, mail client with PGP and S/MIME support, SSH shell, terminal access. Llama can do things based on my location (like switch on ringtones when I leave home). It does not use the GPS; only cell tower IDs (it has to learn them), so it does not eat battery nor send my location to Google.
  • It is fast. I switched from Dalvik to ART runtime, which compiles the application during the first boot (or when they are installed). That makes it even faster!
  • Apps run in the background without hassle. Threema downloads my messages.
  • I can change my ringtones without hacking. I can upload and download music to a folder using any app I want, not just iTunes. I can listen to FLAC music.
  • The home screen widgets are fun. It’s very useful to see my agenda, browse the to-do list, etc.
  • SwiftKey – guys, this is amazing! The best way to type on a phone ever. It works in both English and Slovak at the same time, and it makes me want to type blogs on my phone. OK, not really, but it is so convenient. And it shows that on Android, you are free to change default keyboard, which Apple does not allow you to do because they know what’s best for you. Also, Google voice dictation works both for Slovak and English and is much better than Siri for English (I have to admit I am working a little bit on my accent, but we tried with really heavy eastern European accent at work). And the assistant activates by saying OK Google – how cool is that? :). Of course, there are privacy concerns, but for setting alarms at night, it’s very convenient.
  • All the apps show you what kind of permissions they want before they are installed. The system enforces those permissions. There are also firewalls, antivirus and anonymization programs, although iPhone has Onion Browser as well.
  • The notification LED is cool – it can change color based on how you configure it, and you see if you have a message, missed call or any other significant event occurred. It does not reveal any sensitive information; it’s just a blinking LED.

The bad parts of migration from iPhone:

  • iTunes backups to my Mac (not to cloud) took me a minute to set up, and they would just work. I could set up encrypted backups, and I would have a recent backup over wifi without needing to do anything. If I don’t want to send my data to Google, I need a third party solution. I use Titanium Backup, but hell the UI looks worse than our internal information system :). It also needs to backup to my local internal ROM and then it can upload (encrypted, which is good) to Dropbox or Box.com. I don’t need the backup on my phone; I need it somewhere – safe and encrypted, without me ever touching a button. I don’t want to do manual backups through USB. And I don’t want my backups to waste precious space on my phone.
  • I use r2mail2, because I use both S/MIME (I would not be able to read any work related e-mail without it) and PGP. The user interface is really not so nice if you are used to Apple Mail client – and that needs an improvement. To be fair, there are different e-mail clients that support S/MIME, r2mail2 is just the only one that support both S/MIME and PGP (both inline and PGP/MIME). So I am gaining functionality I did not have on iPhone at the expense of a worse GUI. Hopefully it will stop me from replying to e-mails from my phone, and I will enjoy life around me more 🙂
  • I had to buy a few apps even when I have Android versions. Evernote just used my premium account, so that’s fine. I have not decided for navigation yet, but I guess I’ll buy Sygic because it’s the cheapest option with offline maps and navigation (there are pretty cool OpenStreetMaps based offline maps, but they don’t support search and offline directions).
  • On iPhone, I really hated that simple apps like calculators, rulers and flashlights were not free or displayed ads. Seems that Android is not so much different, but there are at least more options usually. I learned about a nice flashlight app that traced your location. Thankfully, I found one flashlight that is both free as in beer and free of spyware called SearchLight. I was actually seeing myself installing the fresh new IDEA-based Android SDK and writing the app that turns on the camera flash myself.

Things I would like to see in the future:

  • Amazing e-mail client
  • OK Google dictation
  • More Bitcoin and encryption apps
  • Smaller phone (although the display is nice)
  • Finally a phone that lasts for days on battery. I know the old Nokias didn’t do much, but one week battery life was cool!

Right now I am happy Android user. I am learning new stuff, and I will probably not hack the phone as a total geek, it’s good to customize the device that travels with you.

Update: PowerToggles deserves a very honorable mention as well, landed on my home screen.

Interview with me about Bitcoin and other virtual currencies

There was an interview with me on a Slovak web about money and I decided to translate it to English (and do a few minor edits). Enjoy!

Is Bitcoin a pyramid scheme? Certainly not, is more like gold. Juraj Bednar talks about the most popular virtual currency in the world.

Mining and buying are two ways of getting Bitcoin. What is the difference?

Regarding Bitcoin mining, we can use an analogy to gold. Mining is a very difficult process and currently makes use of specialized hardware developed only for this purpose. As with gold, most people who want to get gold (and Bitcoin) buy it on the market instead of mining it. Mining gold from nature means people need specialized machines to mine gold. They also need a lot of knowledge – like the location of good mining spots.

Is it better to mine or to purchase Bitcoins?

Mining is required to secure the Bitcoin network, and you need to realize that there are only 25 Bitcoins mined every ten minutes in the whole network. Miners compete to get these 25 Bitcoins. I guess for all normal Bitcoin users, mining is irrelevant and too difficult.

Aren’t the “first miners” in advantage?

Again the analogy with gold: Those who have mined it first were in advantage, because it was much easier to find new gold then than it is now. With Bitcoin mining, there was always a risk – no one knew if Bitcoin would take off and have any value at all. First miners are rewarding for taking this risk and investing in mining infrastructure.

Isn’t it a bit of like a pyramid scheme? Who got in first has earned the highest profit…

Unlike pyramid schemes, there is one crucial difference – no one ever promised profit on Bitcoin. A pyramid scheme is based on the fact that those who join it first earn profit at the expense of those who came later, despite promises that they all earn profit. There is and never was such promise with Bitcoin – it is, and it was risky all the time. Bitcoin was invented as a new medium of exchange, not as a quick way to get rich.

Even so, a lot of people buy it hoping to get rich…

You should be aware that Bitcoin itself is not an investment. It does not create anything new; it is just a medium of exchange. One can make a profit if one is willing to take a chance and “bet” on the future value of Bitcoin. It is also possible that the value crashes and you end up with a loss.

It is important to note that speculations are very beneficial for the market because, in the long term, they stabilize prices. And it is not just earning, it is risk-taking with a possible downside. At the same time, people who started using it first took the risk, popularized it and built the necessary infrastructure around it. In my opinion, they deserve a reward.

Because it was the first fully decentralized virtual currency. Technologically it is something new, the authors of this currency invented some really unique solutions to previously unsolvable problems. At the same time, during the financial crisis, people at least for a moment lost their illusions about the stability of the international financial system based on government fiat money and welcomed an alternative. Alternative currencies have existed in the past – for example e-gold based on gold, but all were centralized. This was also their main problem if they have not crashed before that because of inflation or poor acceptance (especially true for so-called local currencies).

Which of virtual currencies do you think are the most interesting right now?

Currently, I think that the most promising is still Bitcoin because it is the largest and most widely accepted. If anything is to become a universal medium of exchange, liquidity is the most important parameter, i.e. for what it can be exchanged. Bitcoin is still too small, especially compared to credit cards, but all other decentralized virtual currencies are only a small fraction of the Bitcoin economy.

There are more than 40 of such currencies on the market…

Other currencies are not so popular because they did not bring much new. Most of the differences are cosmetic and do not bring anything fundamentally new to the user. The best technological innovations currently are ZeroCoin, which brings anonymity on top of Bitcoin and proof-of-stake mining, which gives more power to holders of the currency (in addition to miners). For example, TerraCoin implements this. It is a little bit more ecological because the creating new blocks can be done also without power-hungry calculations. I want to state again that mining is not an end in itself, but it helps to maintain network security.

Bitcoin is relatively new – it is from 2009. Are there any predecessors?

Several attempts have been made to create virtual currency. The ideological predecessor of Bitcoin was probably Hashcash, which was not a currency in itself; it was a system designed to fight spam. It used similar calculations as Bitcoin to increase the price of sending an e-mail. If you wanted to send an e-mail, you had a computer perform calculations similar to mining – if a person wanted to send one e-mail, it took a few seconds. If a person wanted to send millions of e-mails, it would take too long, and it would cost a lot of computing power and electricity. Verification of the calculation (as with Bitcoin) is simple and takes very short time. The second system was the forerunner of Bitcoin called Bit Gold, authored by Nick Szabo. It has a lot of characteristics similar to Bitcoin and many people believe that the author of Bitcoin who hides behind the pseudonym Satoshi Nakamoto is Nick Szabo.

Bitcoin is currently worth about a thousand dollars. Is it also suitable for smaller payments?

High value of Bitcoin is certainly not a problem. What you know as Bitcoin is a hundred million pieces of units called Satoshi. When you send a Bitcoin, in fact, send a hundred million Satoshi. The authors of Bitcoin knew about the possibility that the price of Bitcoin would rise. I have changed my wallet to display balances in millibitcoins (one Bitcoin equals 1000 mBTC), and I know that 100mBTC is about $100 as of time of this writing. Bitcoin is also suitable for sending small transactions.

Is it possible to steal or fake Bitcoins?

It is currently not possible to create fake Bitcoins, but it is possible to steal them – your Bitcoins are stored on your computer in your wallet – an encrypted file with a “private key”. The easiest way of stealing it is infecting your computer with a virus that waits until you enter the decryption password for your wallet and at that moment, it transfers all Bitcoins to the thief’s address. When using Bitcoins, you need to follow all safety precautions as with any other electronic payments. There are several solutions to the security problem. You can use an offline wallet, when transactions are created on a computer that does not have the necessary private keys to sign it, and then sign it on another computer that is not connected to the Internet and is sufficiently secured against theft. I would also like to mention Bitcoin Trezor, which is a good solution for securing your Bitcoins.

What about legislation? Does it treat Bitcoin as private property?

I hope that every theft is illegal, and legislation sees Bitcoin as an asset, but it is a question for lawyers (and the answer would probably differ among countries). Even more interesting question is if the police can actually do something about the theft. Like ten years ago, the Internet was something completely unknown for police and justice systems in most countries. I do not believe that our police would be able to investigate the theft of Bitcoins or do something about it. By design, Bitcoin transactions are irreversible and relatively anonymous. The investigation and correction would be tough even for experienced security professionals. I recommend that you think deeply about security if you hold a significant amount of Bitcoins.

Avoid news

If you have an intellectual minute, read Avoid news by Rolf Dobelli

I highly agree. I have not watched TV for years now (we don’t have a subscription and I did not bother installing an antenna) and I’ve been practicing a healthy news diet for more than a year now. It really helps, especially with focus. The justifications in the article are sound, and I highly agree with this article. Nothing important passed my attention – someone always tells me. I am sometimes in an awkward situation when I don’t know that our country’s president said something stupid again, but I am actually proud of it.

I try to learn more about internal structures of the world by reading books. I add to the suggested diet by reading books which I know I won’t agree with to challenge what I believe. I also try to talk to people with opinions highly different than mine.

Also read this article by N. N. Taleb which explains why noise explodes faster than data (and thus why you should read less news, not more). Warning: equations ahead! 🙂

If you are trying to replace news with some really interesting reading, I highly suggest Taleb’s Antifragile and Dobelli’s The Art of Thinking Clearly. Both are both interesting and very valuable. They will both also improve your life, not only stimulate your intellect.

What do you think?

About Hacktivism: My TedX talk with English subtitles

This Tedx talk is about hacktivism in a modern world and it’s morality.

It talks about Moral Reform, an artistic performance of Czech art group called Ztohoven. The setting: Czech Parliament.

More about Moral Reform can be found in my previous blogpost or at the project’s page on Ztohoven.com.

There is also an English translation of the slides

Enjoy and I hope you liked it!

OHM2013 – hackers are camping

The evocative video made by conference organizer tried to convince the audience that the hacker campgrounds are a Dutch tradition – as well as tulips, windmills, Gouda cheese and wooden shoes. Since 1989, every four years hackers gather in a traditional Dutch style campsite. Imagine a large music festival, substitute concerts with tech lectures and replace a variety of food stalls with tents of various hackerspaces, makerspaces and projects. At night, the camp turns into a twinkling city in which hackers want to prove that the image of the hacker as an intellectual loner is pure clichĂ©.

Our group starts arriving to Amsterdam a few days early group by group. We all want to see the other Dutch traditions – Red Light District, have a beer at the windmill and go cycling. Many of us opt for a bicycle trip from the nearest station to the campground. We were welcomed by a typical Dutch weather and arrive completely wet, but happy. Trying to dry at the Progressbar, Laila, the chief decorator of our camp tent is already sticking posters to the wall. Others build up tents – inside the main tent which is the headquarters of Czech-Slovak village. Geography is maintained at least relatively because a short walk from our village is HQ and campsite of Metalab, Vienna. Their typical telephone booth is connected to the OHM2013 phone network. Brmlab from Prague is a bit further but still close.

Unofficial, but apparently the main theme of OHM2013 is the apparent asymmetry between the human desire for privacy and large organizations – headed by the NSA and the largest social networks and portals, who have other plans with the “private” data. Proclaimed objective of NSA is to protect the public against terrorist attacks, although the facts show a significantly different story. According to the latest information, NSA-caught personal communication is distributed to DEA for minor drug investigations as well. The aim of “technology” giants like Google, Facebook and Yahoo is to serve their customers – the advertisers. In this way, they can raise prices and allow better ad targeting. People are starting to realize that for these companies, we are not the customers, but the product. Julian Assange spoke about this from his “asylum” in the Ecuadorian Embassy in London via Skype. JĂ©rĂ©mie Zimmermann, founder of La Quadrature du Net, a European organization that is fighting for the right to privacy of users said, “Julian, I really wish that you could be here with us. It’s beautiful here, there are lots of blinking lights at night. We miss you.” The atmosphere was nostalgic, just four years ago he gave one of the major speeches on his project Wikileaks at this same event. Julian Assange did not say much, but one new thing we did learn – according to him, the states are not forcing companies to send data to their secret organizations and companies are fighting, but ultimately giving up. Technology giants and NSA are in the same bed. As an example, he mentioned a visit from Eric Schmidt of Google, who came up with several representatives of state power.

The so-called “Spook Panel”, which consisted of former agents and contractors of NSA, CIA, MI5 and American Department of Justice, explained to us how the surveillance system works. There is a great deal of exchange of information between the agencies. Since the NSA cannot eavesdrop on Americans officially, they simply outsource this part of activities to their partners, who in exchange receive information that are captured by the U.S. probes. Analyst at the agency sees target’s e-mails, conversations on social networks, browsing history, metadata about phone calls (date, time of call and dialed number), or SWIFT transfers and card transactions. Whenever the analyst tries to get the information, they must provide written justification, however, although it is archived, nobody reads it.

In addition to political issues, there were also purely technical issues. Philippe Langlois started a popular topic of hackers – hacking telecommunications infrastructure. Telecommunications market is known for its closeness and overcomplicated solutions and protocols. It is a popular target for hackers because closed complex systems usually involve a lot of vulnerabilities. Phillipe’s lecture was about Home Location Registry of cellphone operators. HLR is a central database of users and information about them. Each access to the network by the user, whether at home or from a roaming network is verified by this system. It contains most sensitive data operator knows about its users. And it’s almost always a huge, complex system covered with the various old components. It is no wonder that finding security holes is not that difficult. But no one would forget to protect such systems with firewall and certainly no one would ever put them out on the Internet, to be reachable by anyone, right? Not really – several mobile operators with millions of active users have put the most important system they own out on the Internet.

Karsten Nohl continued his series of mobile technology hacks and this time he focused on the SIM card. He found a vulnerability in firmware signing of several SIM cards, which allows complete remote cloning, locating the user or calling the attacker-chosen phone number at any time. Effectively this way an attacker can transform a phone with a SIM card to a surveillance bug, which intercepts not only what you say, but also where you are. Some mobile operators stated that their SIM cards are not vulnerable – at least our SIM cards were OK. But you should be aware that mobile phone operators change their SIM card technology, and while the newest cards may not be vulnerable, when was the last time you actually changed the SIM card?

Like at other hacker camps, what is happening outside of the official program is usually much more fun and interesting. Workshops, technology demonstrations and dance floors gave us perhaps more than mere lectures. Opportunity to meet interesting people from different fields of science, technology and art is almost priceless. And the biggest surprise? Flying ostrich. Do you say that ostriches do not fly? That is true, but not at hacker camps, where they replace their inside with an engine and add few rotors on top. And voilĂ , the ostrich can fly. I saw it with my own eyes.

Stuck Bitcoin transaction and play with double-spend

A few days ago I was sending my friend a payment of 1.2 BTC. My account had only slightly more than this amount available, not even enough for recommended transaction fee. Instead of borrowing or waiting for a miner to generate more, I decided I would push a transaction with a much smaller fee to the network and hope it gets confirmed in under a day. It did not happen. According to Bitcoin wiki, a transaction needs to pay the recommended fee unless all outputs are more than 0.1 BTC and few other conditions. I did not meet this condition, because I had one 1.2 BTC output and one change which was smaller than transaction fee. It was stuck there for more than a day, my mining pool paid me, so I decided I want to just cancel this transaction and create a new one with a proper fee. Easier said than done :).

I use Electrum as a client – it is much better than stock Bitcoin client and there’s a nice console. I was able to extract the transaction and try to modify it to include the fee. The interface is not so nice, or at least I am too lame. I got the transaction as a JSON structure from Wallet object by transaction hash. I was not able to easily create a different transaction without going through manually finding keys to sign.

mktx does not work, because I don’t have enough unspent outputs (same as paying from the GUI).

createrawtransaction is something I managed to do, but then for signing, I would need a list of private keys, addresses and scripts. My transaction had more than 10 inputs and I was too lazy to find which keys belonged to the other addresses (and if it’s possible to do it programatically, there should be a function to do it – I guess that’s what mktx does internally too). I guess it should work with less parameters per documentation, but the console call insisted I fill all the parameters.

I found out a very lame and easy solution. I thought if Electrum does not see the old transaction, it can spend the inputs again. So I changed wallet.py. There’s a function called update_tx_outputs that takes a tx_hash and updates a list of spent outputs. I modified it like this:

 def update_tx_outputs(self, tx_hash): if tx_hash == '00455149b368344f4087596c97dccf9dc185ed275a58187a63f72399618f815d': return tx = self.transactions.get(tx_hash) ... 

So if my transaction (the hash is from other stuck transaction I found online) is found, it’s skipped, so Electrum thinks the outputs are not spent.

I thought I would just pay, but the transaction got refused by Electrum server, because it thought it’s a double spend (which was correct). So I used mktx and used Coinb.in’s wonderful Raw Transaction utilities to broadcast the hash to the network. It also returned that the transaction is invalid, but it propagated anyway and a miner included it in a block.

I found out that blockchain.info reports on attempts to double spend when I look at a transaction or address and recommends you proceed with caution.

Takeaways: Pay the transaction fee, really. Nodes try to refuse double spends (they cache stuck transactions), but the transaction eventually propagates. Electrum could have much nicer Python interface for things.

I guess Amir’s sx command-line utility would make my life much easier, but I had no time to upgrade my g++ toolchain, it does not compile on any system I own. Installing Ubuntu or ArchLinux just because I want to play with it takes a lot of time. I tried fixing a few of the main problems of libbitcoin not compiling on OS X, but I had no more time doing it. I would love to use sx with OS X or Scientific Linux someday. Playing with Electrum and it’s internals is fun too though.

Spying, liberty, NSA and USA vs. Europe

When I discussed the loss of American liberties with people here in Europe few years ago, my position was simple – we get the same draconian regulations without any opposition or fanfare here in Europe. Remember export controls of cryptography? We should have been fighting against this barrier because it was primarily against our interests and privacy. The people in the U.S. got the benefits of cryptography anyway (short of some patent issues). They fought the battle anyway – on principle.

Do you remember Communication Decency Act of 1996? The Americans fought against it. There were blogs and strong opposition.

Do you remember data retention? Massive campaign against it in the U.S., a press release that said that a new law passed here in Slovakia. A press release, no discussion, no opposition. “We are just implementing European regulation”.

I always regarded Americans as liberty-minded and people who speak up when their liberties are about to be taken away from them.

That is until recently. While information about massive surveillance programs of NSA are nothing new. I wrote about Echelon (and ways to protect yourselves) in my book in 2002. Thomas Drake and William Binney are both ex-NSA employees and they both mentioned these programs before. There are several videos of them talking about the program on YouTube. It was easy to mistake all these report for conspiracy theories and not act upon this information.

With the information release by Edward Snowden, we now positively know that communication on the Internet is surveilled in real-time and recorded for unknown time by the NSA. We know that e-mail, telephone conversations, Facebook chat, Google communication tools, HTTP requests, SWIFT and credit card payments are all included. This huge world-wide privacy breach was revealed. And what happened? Nothing.

I mean it’s great that Mr. Snowden could at least walk out of the Moscow airport and have a life. What should have happened? People out in the streets demanding their privacy back. The state should have apologized to Snowden and to the public for their crimes. Something should have changed.

It seems that the American public does not care anymore. It’s exhausted from the financial crisis, sceptical about the issues around us. The failure of Occupy movement to bring any real change to the world, the gloom caused by the financial crisis, the reality of doing more of what caused the crash. The wars, the drones, the kill list.

Americans are tired; they no longer care about their freedoms. And that’s too sad. It means the the Illuminati can do whatever they want now. And they will use this opportunity.

On darkness: Your fear of death attracts such strange objects

I am widely known for listening to darker genres of music. It makes some people feel I am a complete weirdo (which is true). A few weeks ago I was sitting in a cab with a full album (!) of Aqua playing on a radio. Happy songs of happy days, so unauthentic. It thankfully ended with me putting my headphones on :).

Why do we fear darkness? When walking on a street at night, with no lights on, we don’t fear darkness itself; we fear that something unseen could harm us. The fact? It can happen on a clear day. Thanks to bystander effect, we are not even much safer during the day.

Getting comfortable with darkness, with things that seem evil and with the unknown is a huge asset in life. Our minds infer causation from correlation. We fear darkness because it may be evil and we fear it because it’s unknown. And then we infer that the unknown is evil, which is incorrect. There’s so much hatred and misunderstanding in this world already.

Happy songs with happy melodies, positive texts and beautiful performers have their place in this world. But there are tracks that are unexpected. Computer-generated noise, glitches and yelling can come at any time. And that prepares us to understand that dark and unexpected is not evil (please show me a person who died of listening to dark music if you disagree). While happy music can increase our mood, from the unexpected, we learn.

Here’s an interview with Coil about the same topic.

My favorite bands that are dark, but nice are Coil, Current 93, The Residents, Orphx and The Kilimanjaro Darkjazz Ensemble.

Raspberry Pi and Block Erupter on Fidora

My AsicMiner Block Erupter USB miners arrived a few days ago thanks to Andreas and people from Bitcoin Austria who processed the order and the chief Bitcoin economist Peter Ĺ urda who drove them to Progressbar. I shipped some of them abroad to friends.

Although I appreciate the work guys that created minepeon do, I decided to go with pure Pidora as I believe using more generic distribution accounts for faster updates and makes it easier to use my Raspberry Pi for other things than just mining. This is debatable, as this is my first and only Raspberry Pi and it has been sitting on my window shelf for almost a year.

Anyway, this is how you get your block erupter running fast and easy under Pidora (and I guess any other Fedora-based distribution if you choose not to use Raspberry Pi):

 # screen is optional, but I like to run cgminer in screen and we will make it autostart in screen yum install libusb-devel libcurl libcurl-devel libudev-devel ncurses-libs ncurses-devel git gcc screen autoconf automake libusb1-devel libusbx-devel libusb libusb1 libusbx # current version of cgminer from git has working hotplug support for USB miners git clone https://github.com/ckolivas/cgminer.git cd cgminer ./configure --enable-icarus make && make install 

run cgminer to create config, in the menu, save the config file.

If mining is working, create /usr/local/bin/start_miner.sh with this content:

#!/bin/sh screen -dmS miner -- /usr/local/bin/cgminer -c /root/.cgminer/cgminer.conf 

Create /etc/systemd/system/cgminer.service with this content:

[Unit] Description=CGMiner Service After=network.target [Service] ExecStart=/usr/local/bin/start_miner.sh Type=forking [Install] WantedBy=multi-user.target 

Now make it a service and try it out:

chmod a+x /usr/local/bin/start_miner.sh systemctl daemon-reload systemctl start cgminer.service 

Now you attach the screen and make sure it’s working:

screen -x 

If all is well, make it run on boot:

systemctl enable cgminer.service 

I really like systemd instead of init.d scripts. I liked SMF from Solaris 10 for booting things up, but since Oracle ditched Solaris out of the window, I switched to Red Hat-based systems. The only thing I do not like about systemd is the estetical equivalent of .ini files from ancient DOS times. There has to be a better way to write configuration (no, I am not talking about XML).

Anyway, happy mining and remember – it’s just for fun, you will most probably not get a return on this investment anytime soon (the most optimistic scenario is 8 months, I would say two years if ever).

Are we going to be slaves of algorithms?

Server idnes.cz published an interview with Josef Ĺ lerka, an expert on new media (translation by Google Translate). He warns that we can become slaves to algorithms that we do not understand. This issue has been raised repeatedly in media. I don’t doubt the fact that the algorithms are much more important in our lives than ever before. I do not think that we understand all algorithms – especially neural networks are problematic in this regard because we do not know exactly why the network made a particular decision. We can only tell how well the network performs given the inputs and outputs used during training phase. Corner cases are sometimes unknown and analytical understanding in extreme situations is quite difficult. Let me, however, explain my slightly different and less pessimistic view on the role of algorithms in our lives.

Mr. Ĺ lerka mentioned an experiment, in which Lukasz Barabasz showed that given location information of people during a longer time period, he is able to predict a person’s location the next day at a given time. He used data collected from cell towers. The problem in this case is not a prediction algorithm – it is quite simple and it performs pretty well (and in this case, we understand it pretty well too). We are just being predictable. If you have something to worry about in this example, it is the possibility to collect data (what Mr. Ĺ lerka also mentions). There is even a scarier algorithm that can identify a particular person by their movement itself (even if it’s recorded with a different device). Our movement is like a fingerprint.

The problem is not the algorithm. The algorithm is like a mathematical equation – when you invent it, it exists. Inventions like this cannot be “undone” – it is not possible to forget or ban it once it’s out. Algorithm is like an idea. If we really care about our privacy, blaming the algorithms will not help. We need to make sure that these algorithms do not have enough inputs to do things we do not want them to do. Is it possible to create anonymized mobile phones, where the operator know how much to bill us, but does not know our location at any time? I bet it is possible, but is there enough consumer demand?

Quote praised in headline of the article reads (translation from Czech is mine): “With the advent of technology and applications of artificial intelligence and neural networks, the majority of people loses understanding about what a computer does, and how it makes it’s decisions. In other words, we become slaves to algorithms we do not understand. “

Let’s talk about two different methods of decision-making – i.e. “table-based decisions” and “fuzzy” decision. Computers have been criticized for being to discreet, for having no smooth decision area. They were not human enough. An example “table” decision process is for example deciding whether an ATM (algorithm) or a bank clerk (person) should let you withdraw money from your account. Both decisions are based on the same table: If the available account balance is greater than or equal to the amount the customer wants to withdraw, customer gets their money. If it is less, do not allow this withdrawal. The algorithm is the same for human beings and machines and we understand it very well.

How about a loan? Bank clerk can say “This customer looks insincere” or he “was too nervous.” Alternatively officer does not trust that the underlying business plan of a company asking for a loan is sound. This is not a table-based decision – the bank representative decides on the basis of their feeling, which can be justified, but surely it cannot be explained in exact terms. Another bank clerk could decide differently.

The algorithm for bank loans is (or can be) similar to this line of thinking. We taught the algorithm that people with certain credit profile do not pay back. The input can be: financial behavior (as learned from the customer’s history in the bank), age, number of children or any other additional information available to the bank. If the algorithm is based on neural network, it could just say “loan rejected”. No explanation. In most cases, the neural network’s output is a score on some scale (for example 0 to 1), in which case a negative decision is something closer to zero (or less than some predefined threshold). We do not know why exactly the network’s output is a particular score.

A common example of algorithm critics is high frequency trading (HFT). HFT algorithms are used very successfully for several years. A human being simply cannot make decisions about buying and selling of a variety of asset classes several times per second. Can they cause a crisis? A common example that they can get “crazy” is the book The Making of a Fly by Peter Lawrence, which sold on Amazon marketplace for $1,730,045.91 due to an algorithm that set this price. The problem was that there were two competing algorithms. They go through Amazon marketplace and try to find rare products and offer them at a higher price than other sellers. When someone buys a book from a seller that has a higher price (e.g. due to higher reputation of the seller), the author of this algorithm orders the book from a dealer with a lower price. When it arrives, they deliver it to final customer and keep the price difference as profit. It gets interesting when the original item is sold and the only vendors are the automated trading bots. They start to raise prices to top up the best available seller. And depending on the periodicity of checking and harvesting the marketplace, the price starts going up. Neither of the seller has the goods available. They rely on each other for delivering the nonexistent product. The algorithm tries to make a profit and this corner conditions are not accounted for – so they get “crazy” while seeking profit…

Are we different? During 1636-1637 we witnessed one of the first bubbles. In the Netherlands, tulips have become popular and everyone wanted this beautiful flower (or it’s bulb actually). Many people wanted it because of it’s inherent beauty, but a lot more people perceived the price increase and wanted to buy cheap and sell for more later. The result was a bubble and its collapse. In the winter of 1636-1637, some bulbs changed hands ten times a day. During the peak of the bubble in February 1637, some onions sold for more than ten times the annual income of a skilled craftsman. People went crazy for a while. Do algorithms really behave differently to us or they are just getting more similar to us? Isn’t that what worries us?

Shai Danziger of the University of the Negev has done an interesting research on the Israeli judicial system. He examined the results of 1112 parole hearings. The judges had an average of 22 years of experience and their decisions accounted for 40% of cases of parole decisions during the investigated 10-month period. The results are quite uncomfortable for justice: Judges decided in favor of parole before their morning snack, lunch and before the end of working hours with much lower probability. Parole was granted in up to 20% of cases. Immediately after a meal, the chance of a positive decision was 65%. Note that this is no small statistical error, but a significant difference.

Our decisions are controlled by a number of factors we do not understand. Our neural network in the brain makes decisions that we not only don’t understand, but they are not consistent. The level of certain hormones in our body, mood, concentration, and hunger, even the lighting, biases us. These biases are significant and affect lives of people around us (such as judges granting or not granting parole based on when they ate).

If we are asking ourselves whether we are slaves to algorithms we do not understand, I would first ask: Aren’t we slaves to senseless human decisions we do not understand right now? The algorithm decides consistently and if it is flawed, we can at least quickly find out and fix it. Can we fix people this way?

Personally, I would not neither overestimate nor underestimate the role and threat of algorithms. They are tools for people. Let’s talk about what data are collected about us. That is what gets abused. If it is a person looking at a data or a highly efficient algorithm, it does not make such a difference. What external organizations (or people, companies, States) have power over our lives? Rather than adding algorithms to what we should “fight against”, I decided to become interested in the necessary conditions for their functions – data collection. Let’s not fear the algorithms. Let’s fight against everything that we can control that limits our freedom. Whether it’s an algorithm, hungry judge or greedy state backed the wrong econometric model…