In this post I'm going to show you how to run a commandline Whatsapp client. It can be very useful to connect it to a unix pipe and automatically get messages from your server, via Whatsapp. Also, it's cool B-)
Disclaimer: Whatsapp is sending DMCAs to take down Yowsup's Github repos, so either the software or the process may break with any update of their protocol. However, to date, I've been using it for a couple of months with no hassle.
- Download Yoswup from Gitorious and extract it somewhere
- Edit the config file and input your cc, phone and id. Leave the password blank
- We are going to force a re-auth on your phone's whatsapp in order to cache the password.
Authenticate with yowsup:
./yowsup-cli -c config -r smsand wait for the SMS
- Second step of the authentication:
./yowsup-cli -c config -R [6-digit sms code]
- Now your phone's Whatsapp is disabled. Open the app and re-auth with either a SMS or a phone call, whatever is available first. You may have to wait some minutes.
- Download iFunBox
- Connect your phone, open the iFunBox app in your computer, and navigate to
- Copy all files named Cache.db* to some place
- Download SQLiteStudio
- Open SQLiteStudio, and open the database on Cache.db. Navigate to the table
cfurl_cache_receiver_dataand scroll to the end. You will see a large json string. This is your current authentication data.
- Look on the json string for
pw:XXXXXXX. That's your password. Copy it to yowsup's config file
- We are ready!
./yowsup-cli -c config -s [cc][phonenumber] "I'm texting you from a terminal"
Enjoy! Yowsup can also be used for full conversations, send messages to yourself which you'll receive on your phone or, as mentioned in the beginning of this post, pipe some other command to your phone.
Motivated by some friends generating activity at Github I decided to add one of the main missing issues of bashblog: support for tags, or categories, whichever name one prefers.
It turned out to be a bit of work because I had to do some tricks to process comma-separated words, but in the end the result is nice enough. Now, a line accepting tags is displayed at the bottom of each post, and it automatically creates new tag archive files and links them from posts.
This doesn't break compatibility with previous posts, but unfortunately adding categories to old entries needs to be done manually. Here's how. For each post:
./bb.sh edit post.html
- You will see a full HTML file. Don't panic! Look for a line which says
<!-- text end -->. It is always after the content of the post.
- Open a new line above that one, and paste the following template:
tagname(both occurrences) with the desired name for the tag
- The part in bold represents one tag. Copy and paste as many as you want
</p>, separating them with commas.
- Make sure that all the tag information is on a single line
When you are done editing the desired posts, run
./bb.sh rebuild and voila!
The tag files will be generated.
Don't edit html files manually! Always use
bb.sh edit since it keeps the
file timestamp, which is necessary for storing the blogpost dates.
Facebook bought Whatsapp for $19B. There has been a lot of discussion on the net since the numbers are crazy. Even for today's standards, where startups are measured in Instagrams or Yahoo!s much like length is measured in football courts, that is a large sum.
To summarize my thoughts on the money; maybe we should start thinking about a new Web 2.0 bubble? Whether $12B in Facebook shares is actually twelve billion dollars cash is left as an exercise for the reader. Smarter people than me defend the acquisition, and I will definitely not argue against that.
So why did Facebook buy Whatsapp? TL;DR: because of what people use it for.
I don't think this is an acqui-hire as Whatsapp needs every employee and it wouldn't be a smart move to shut it down while it's #1 with this huge competition. However, Facebook can probably learn a lot from Whatsapp's engineers. Their amazing staff can scale at a ratio of 450M users per 32 engineers. That's 14M users per engineer. But again, this isn't about the people, the risk of Whatsapp being bought by Google, or just their user base.
It is most likely the fact that Whatsapp has more than 300M daily active users, and Facebook could greatly benefit from having all this people's data. Remember what Facebook, and all the other big companies on the net, are. They are advertisers. And all this people using Whatsapp is communicating outside Facebook's network.
Google wants to collect all the world's data, but Facebook wants to know everything about people. Now it will reach an additional 450M that they weren't previously controlling.
What's so special about Whatsapp users? From my experience, Whatsapp is a great mix of Instagram, Twitter, chat and Facebook. It is totally spontaneous, friendly, private, and chaotic. Non-geeks love the ability to send pics, text and audio and let messages scroll to the top. It is so comfortable to use.
But what's more interesting, users communicate intentions, meetings, events. Outside the US, nobody creates Facebook events any more; we create Whatsapp groups. Groups for parties, dinner, quick stuff that's happening and needs immediate action. We use Facebook to discuss what happened —maybe with a cool beach pic— but Whatsapp is all about the immediate future. Plans are made on Whatsapp.
And here goes my conclusion. What could be sweeter for Facebook's advertisers than knowing in advance what people are up to? It's the perfect user data. Remember, next time you create a Whatsapp group for that birthday party, restaurant ads will pop in your Facebook. And I'm not saying that it's a bad thing necessarily.
Some time ago I started a compilation of unix tricks regarding bash completion, obscure tools and some ssh magic.
The list grew bit by bit until it was posted to Hacker News and quickly exploded. It got about 200k visits the first day and has been accessed and linked frequently since then.
I still maintain it, and I'd like to share it again, as the first post of this blog's new era. I have been tempted to re-write it as a longer blog post many times, but I believe that many people were attracted to the simplicity of the original text file.
These last months I've been quite busy learning new stuff. Researchers always need to keep an eye on the state of the art by reading papers, but multi-disciplinar sciences usually require a strong background in two or more areas, like biology, chemistry, math, physics or the always present computer science.
While we can appreciate a good book, it is not the ideal way to learn new skills. Books don't force you to follow a schedule, do the assignments, and obviously don't evaluate you. We all have work to do and, with no deadlines, we never invest enough time on learning new tools in depth. Most books and tutorials are abandoned at chapter 4.
If you want to follow an university-like learning methodology, you will need to invest university-like time and money, enrolling in short courses or traditional Masters degrees. They are fine, but cost a lot of time and money. What happens if you just want to learn one specific tool or technique and not a whole curriculum?
Many universities offer workshops and non-official courses, typically for 3-5 days, which don't cost much money, but they are usually full-time and not really compatible with a daily job, unless you get permission from your supervisor.
In 2011, and especially in 2012, a new learning tool appeared on the internet: the MOOCs, or Massive Open Online Courses. Their format varies, but most of them cover one or half a university class (7-15 weeks) in depth, with video lectures, assignments, deadlines, and real interaction with other students, TAs and professors.
In learning, it isn't worth to to cheat at solitaire. A hard deadline is the only way to assure we won't lag behind the class, and while nobody will be watching whether we finish the course or drop it, it is up to us to decide if we want to take that opportunity to learn or not.
Resources to learn online
If you need some pointers I'd recommend to try Coursera first, since it has the best methodology, for my taste, and the one which resembles a college the most. If I'm not mistaken, it's also the website with the most number of courses. A good alternative is Udacity, which doesn't have as many advanced topics as Coursera, but it's great for beginners. Finally, the last generalistic site is Khan Academy, but unfortunately, it doesn't provide the same assignments-and-deadline mechanism that the former have. It basically contains video lectures. As a non-website, we can't forget iTunes U, Apple's video lectures directory, with classes directly recorded from campus.
Other self-learning resources, while not strictly MOOCs, are Codeschool and Codeacademy for programming, and Memrise for languages. The number of education websites is growing, so make a quick search on Google to check if there is anything else you could be interested in.
Effort, pace and cost
MOOCs surprisingly compare to real online universities in terms of quality and material level, however, real interaction with the professor is difficult and only through public forums. The number of makes up for that, as usually there is somebody which can answer you. It is really a collaborative effort.
Besides the obvious "knowledge for all" motto, there's another big advantage for me, as you can study at your own pace. Good MOOCs have precise deadlines which allow you some margin if you have a hard week at work or home, but they are not so far enough as to let you lag behind.
Now, the question is, who pays for that? Posting video lectures online has a marginal cost, but what about the TAs and professor's time? Most of the assignments are corrected by a computer or other students, but the organizers have to invest a significant amount of money.
I don't have the answer, but probably, since those courses are sponsored by a university, it probably fits into their social community service. Some professors advertise their books on the subject, which is perfectly reasonable, and finally, there is usually some self interest and promotion goal.
Whoever pays for the courses with their time and money, thank you.
Go check these links out, especially Coursera, and see if there's anything that catches your eye. Be brave, enroll, and prepare for a university-like effort. You'll learn university-like knowledge, for free.