Why eBooks are backwards still in 2015

I was very early when it came to eBooks. I had one of the first e-ink devices from Sony even. And by early I am talking about the year the original Kindle even out. (Sony PRS-505 I believe is the model) This was a time period where page turns were measured in seconds and nobody was talking about backlighting e-ink or high resolution. Back then though there was something very different. You wouldn’t buy an eReader based on the store (unless you bought the Kindle) it supported. I mean when it came to stores Sony’s was really never good. The difference was that Sony could play books from pretty much every store online (not Amazon but who cared since Amazon barely had any eBooks at that pooint) now a bunch of those was through some crazy Adobe DRM scheme or you had to find some DRM free books.

Now this may not sound very different but lets look at where we sit today. Now we are down to two major eBook stores. Ok there is Kobo but they really aren’t as big. The only real players anymore are Amazon and Apple. Now why does this really suck? I mean you can read your Amazon books on pretty much any platform and Apple well those can be read on a bunch. The real issue in my mind is the book stores have moved 100% cloud based. Ask anyone how to get the ePub from Apple or the Kindle azw. I can promise you nobody knows how. Most don’t even realize there are alternative readers like the Kobo which while sounding pretty cool is just the 3rd of the evils in this whole fight.

So why does this matter? Lets start by talking about issues with the two main platforms first.

Amazon

Now Amazon has always been the lockdown king. They started with mobi and have only gotten worse when it comes to DRM. To make matters worse Amazon eBooks seem to be horrible formatted and any older ones are in a pretty sad state when it comes to editing. Why is this? It really seems like Amazon wants quantity and really doesn’t care if it looks all that good. I mean look at the Kindle fonts and app. It would be awesome if they would give us one amazing font and a clean app. I mean its 2015 and I have a tablet or phone why is it I CANNOT scroll through a book? Really I still have to flip pages on a phone? This isn’t an e-ink device I have to wait a second to render the screen. And on the Kindle devices why such big margins? It’s not paper Amazon the text can goto the edge of the screen and my fingers wont go over the text (unless I’m holding it wrong).

Apple

Apple is also a lockdown king. I mean you still have to authorize your computers for iTunes. The craziest thing though about Apple’s eBooks is that you CANNOT read them on non-Apple devices! Now why would I want Apple’s eBooks in the first place. I mean it’s so locked down. First off it has scrolling which call me crazy but it changes how you read a book when you can just keep scrolling till you get to the end. Second, they are the only company which seems to realize now that we have HiDPI screens we can have some amazing fonts and that formatting matters. Apple eBooks generally have seemed better put together and they do something really crazy they seem to update more. Now this could be that I have just more recently bought Apple eBooks that are more popular then the books I got while using the kindles. Third, did I mention you can scroll in their app instead of flipping pages? Crazy I know!

So basically Amazon has some great e-ink devices which really need a UI expert (all the e-ink devices have needed this since they got HiDPI screens). At the same time I could live with Apple if it played in more places. But overall the issues comes down to one think DRM and the lack of easy exporting has made the whole ecosystem worse. Vendor lock-in is horrible. I mean I have book in Kobo (Sony books transferred there), Amazon and Apple along with some random publishers who are awesome to distribute DRM-free eBooks. If there was just a way for me to pull down an epub even if it had to be authorized would be awesome. (Part of Apple’s formatting advantage is epub)

So eBooks are backwards since they haven’t picked up on what saved the music industry with DRM-free music. If you really want to read eBooks try and find a DRM-free source of epubs. That is the best long term option to speak with your wallet. As for what to do right now if just must jump into the DRM lake? Well if you got a iPhone and iPad personally I would with iBooks but just cause it is a better experience for me. If you’re using Android or really paranoid about switching (and don’t care about scrolling) jump on Amazon. I mean the only reason I would avoid eBooks right now is just cause you have to choose one which sucks.

Advertisement

PowerShell Scripting and my custom scripts

So I recently started playing with powershell. Mostly cause I wanted to try messing around with Windows Servers some more. The world of powershell is a bit strange coming from the world of zsh and bash which is what I have traditionally scripted with. So to help myself I have started making modules to help make things easier to do from the command line. You know the kind of things you could totally do with an app or a text editor but why not have it scripted? So now I have a new repo on GitHub. Currently I only have one cmdlet for Get-HostsEntries which I made to automate the last function missing from the automation Carbon provides around the windows Hosts file.

Batmobile Logic – A New Podcast

So I wanted to make everyone aware that I have started a podcast with a friend of mine. If you are interested checking out our podcast about technology and random tech stuff feel free to checkout Batmobile Logic. I hope it is interesting, funny and informative.

http://www.batmobilelogic.com

Atom Text Editor

So I am a bit slow on noticing this announcement but earlier this month the Atom Text Editor that the guys at GitHub have been working on was open sourced. Now this has been my favorite editor for the Mac since I got into the beta for it and so far is better than most text editors I have used. The one editor that would be compared to it is Sublime Text which I think Atom beats very easily for two reasons.

First, Atom has an actual screen for settings. This is one of my biggest issues with sublime the fact that is uses a text file as its settings. Sorry not user-friendly. Instead Atom has a well thought out settings GUI and includes an amazing package manager. It even has a way for the packages (plugins and themes) to tell you shortcuts they have. Now I have only use sublime lightly so maybe it has some of these things buried but I cannot stand Sublime Text long enough to use it whereas I have enjoyed Atom every time. (even the old version which caused my fan to run on my MacBook).

Second, they licensed it under the MIT license. Now this is even more an opinion then the first. Personally I love the openness of the MIT license so I am happy they went with that over GPL. It is even better then Sublime Text since they want you to pay. You would expect there to be many more features if your paying but really it’s just a plugin engine.

So if you’re using a Mac I recommend you checkout Atom at atom.io and if you’re using Windows or Linux well you can build it yourself or just wait I am sure the packages will be out soon.

And I’m back on WordPress

Well as some might have noticed I tried to move my blog over to ghost.org. It has been living there for the last 3 months or so. While I love the user interface and the simplicity of ghost.org I missed the built-in comments and stats. At the same time I also missed the fact that WordPress allows you to upload images to WordPress. Instead for Ghost you have to upload your files to another site and link to it. That means a lot of extra work for something like just adding a photo. In any case while Ghost may some day be an alternative it is not ready at least from an ease of use perspective so I’m back.

Named Pipes in C

If you happen to be programming in C at some point and you want to pass messages between two processes named pipes is an option. What you are doing is defining a node on the filesystem as a FIFO node and then piping messages through it. In the examples below I create a reader which reads from a named pipe. The pipe is defined as DEFAULT_PIPE in test.h. The writer application will write out a single line to named pipe.

//
// test.h
//

#ifndef test_h
#define test_h

#define DEFAULT_PIPE "/Users/nick/pipetest"

#endif
//
//  NamedPipeReader
//

#include
#include
#include
#include
#include
#include "test.h"

int main(void)
{
    FILE *fp;
    char readbuf[128];

    // Try creating pipe if it doesn't exit.
    mknod(DEFAULT_PIPE, S_IFIFO|0666, 0);

    // Lets say what is going on.
    fprintf(stdout, "Pipe %s created!\n", DEFAULT_PIPE);
    while(1)
    {
        // Open the named pipe.
        fp = fopen(DEFAULT_PIPE, "r");
        if (fp == NULL)
        {
            // Print error if an issue shows up.
            perror("fopen error");
            exit(1);
        }

        // Get string from the pipe.
        fgets(readbuf, 128, fp);
        // Print the pipe data to stdout (console).
        fprintf(stdout, "Received string: %s\n", readbuf);
        // Close the named pipe.
        fclose(fp);
    }

    return(0);
}
//
//  NamedPipeWriter
//

#include
#include
#include "test.h"

int main(int argc, char *argv[])
{
    FILE
        *pipe;
    char
        buffer[128];

    // Open existing pipe.
    if((pipe = fopen(DEFAULT_PIPE, "w")) == NULL) {
        perror("error from fopen");
        exit(1);
    }

    // Read a line from stdin (console).
    fgets(buffer, sizeof(buffer), stdin);

    // Write the line to the pipe.
    fputs(buffer, pipe);

    // Close the pipe.
    fclose(pipe);
    return(0);
}

Podcasts! Wait Wait Don’t Tell Me

Wait Wait Don’t Tell Me is the second of the two NPR podcasts which I listen to. It is a comedy/news podcast. They cover the news of the week while making fun of it and in generally being quite entertaining. If you’re looking for some general news or just a funny podcast I would recommend this one.

Link: NPR

Podcasts! This American Life

At this point in my Podcasts! series we enter the realm of NPR related podcasts. There are actually a few podcasts put out which I have found to be quite enjoyable. We will begin with This American Life. The only really good way I have ever found to describe This American Life is as the Readers Digest of podcasts. What do I mean by this? Basically it is an eclectic collection of stories. Every week it is generally some nice and timeless topic which is covered. It is always covered in such a way that anyone can approach it and still find it interesting. So I recommend this podcast to anyone out there looking for something simple and informative to fill some time. One note is that this podcast does tend to sway bit to the liberal side. This though is not to bad so far I have only felt the need to skip one episode due to these opinions. If you are curious it was an episode about guns which was put out when the media was being flooded with anti-gun propaganda and I really did not need to hear the same thing from yet another place.

Link: This American Life

Install and Secure RabbitMQ

First follow the simple instructions on the RabbitMQ site. I recommend using their Apt repo if your using Ubuntu like me.

Next you will want to install the management console. To do that you just need to run the following command:

rabbitmq-plugins enable rabbitmq_management

Now the part where we divert from the simple install. We next will want to generate the some certificates. Personally I used the /opt/cert/rabbitmq/ directory that I created to store these in. To do that run the openssl command you see below:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes

Now this is a self-signed cert which should be fine for most development. If you want to do something in production I recommend making your own internal CA so that you can load the CA into your browsers and not get the self-signed error all the time. As this should not be used by 3rd parties getting a 3rd party signed certificate seems a bit over board.

Next is to configure RabbitMQ to use these certificates.

[
    {rabbit, [
              {ssl_listeners, [5671]},
              {ssl_options, [{cacertfile, "/opt/certs/rabbitmq/key.pem"},
                             {certfile, "/opt/certs/rabbitmq/cert.pem"},
                             {keyfile, "/opt/certs/rabbitmq/key.pem"},
                             {verify, verify_peer},
                             {fail_if_no_peer_cert, fasle}]}
     ]},
     {rabbitmq_management, {
              {listener, [{port, 15672},
                          {ssl, true}]}
     ]}
].

Now you should just be able to run the following command to restart the server:

service rabbitmq-server restart

After the  server reboots you should be able to access it via AMQP over SSL via port 5671 and get to the management console via https on port 15672.

Next we should lock down the management interface. First login using the guest account (guest/guest). Once you are logged in click on the Admin tab.

selectAdmin

Then click on the “Add a user” section. At this point fill in the username you want, add a password, and select the admin tag.

addUser

You should now see the user in the list. This user though will still have no access off the bat. Click on the user name to get more information about the user and to edit it.

newUser 

Once you’re in the user’s information go to the “Set permission” section and you can just set the default. This will give the user full access to the default virtual host.

setPermission

At this point you can click on the guest user and delete it. At this point got a server setup to use SSL for connections and without the default user. You are set with a decently secure setup. Have fun developing with RabbitMQ.

Podcasts! Judge John Hodgman

The Judge John Hodgman Show is a parody court show style podcasts put out by the Maximum Fun network. It is done with John Hodgman (You know the guy who wrote those books covering all of human knowledge?) and Jesse Thorn. As pointed out earlier this show is a parody of the TV Court shows that are on TV with John Hodgman playing the Judge and Jesse playing the part of the bailiff. Each episode they have listeners call in to argue their complains about generally either silly or mundane arguments. These have gone from whether two brothers should fix their house to keep out bats to if a couple should open up their action figures they got as gifts. In the end there is a lot of comedy either provided just by the silliness of the actual argument or John Hodgman’s musings. If you enjoy John Hodgman’s comedy style this podcast is a must listen. If you have not heard of him before but enjoy comedy look no further for the funniest podcast on the Internet.

Link: Maximum Fun