Hashemian Blog
Web, Finance, Technology, Running

What Gmail Needs, Action Icons

by @ 3:56 pm
Filed under: email,google — Tags:

I have been a Gmail user since its debut and have never looked back since I migrated from Hotmail so many years ago. But I still use Hotmail (now known as Outlook) and Yahoo Mail on occasion for trivial emailing and one of the great features that they offer is one-click actions for delete or move. As the mouse pointer rolls over the individual messages, action icons appear to the left of the titles allowing one to delete or move the messages. This is immensely helpful and it's something Gmail doesn't have.

Action icons in Yahoo Mail

Action icons in Yahoo Mail

In Gmail one either has to right-click each message for a menu to pop up and then choose an action like delete or archive, or click the checkbox to the left of the message and then select an action on the top menu. Both of these methods are not as convenient as having single-click action icons appear as one rolls over a message.

I think it's time for Google to introduce action icons in Gmail, at least as a Labs feature.

Was Bitcoin a Fad?

by @ 2:56 pm
Filed under: financial,internet — Tags:

bitcoinRemember the Million Dollar Homepage? Back then everyone thought pixel advertising was the future of web marketing. People went crazy over it, pixel sites popped up like weed, and then the whole thing faded away like it was never there.

To me that is what bitcoin is. Sure, I have a few bitcoins and I'd like to fantasize that each will be worth a million dollars some day. But let's be real, the possibility of bitcoin fading into oblivion is so much greater. Bitcoin is nothing like gold and there are 2 reasons why it'll never achieve the success some people may dream of:

1- There may be a limited number of bitcoins that can be mined but there are no limits on how many types of crypto-currency can pop up. Everyone can come up with their own version and flood the market. There are already dozens of them out there and probably thousands vying for recognition.

2- Governments will never allow bitcoin or any other type of anarchist currency gain real traction in their countries. It's just too dangerous to their existence. We've already seen moves by China and Europe to crack down on bitcoin. More will come if bitcoin's popularity survives.

The bitcoin fad will pass just like many others have before it. Something else will eventually come along and capture people's attention and what will be left of bitcoin will be http://en.wikipedia.org/wiki/Bitcoin.

2013 NYC Marathon

by @ 2:35 pm
Filed under: running-hiking — Tags:

The New York City marathon is everything they say and much more. I have been to a few races in my time and to New York city as a visitor (including one new year's eve) but nothing like this.

The city was alive, electric, vibrant, and loud, and so was I as a runner. I didn't even feel tired from all the energy I was drawing from the crowd. This city knows how to throw a party and it was unforgettable.

On a sad note, here's a story of the oldest female runner who died the day after completing the race. Kudos to her. This is exactly how I'd like to leave this world. One kick ass run and then a swift trip to the other side. A true inspiration, may she rest in peace.

Joy Johnson, New York marathon's oldest woman dies next day

2013 NYC Marathon Road Closures

by @ 10:13 am
Filed under: running-hiking,Uncategorized — Tags:

2013 nyc marathonTook me some time on Google to find out about the road closures during the 2013 New York City marathon. Head on over to Gridlock Sam for that info. Figured another entry for this post in the Google index maybe helpful to those searching for this info. Good luck to the runners.

Wordpress 'page_option' Hack

by @ 1:21 pm
Filed under: hacking,web — Tags:

wordpress-hackWordpress is a great publishing product but its popularity is also its Achilles heel. It's notorious for being a favorite target of hackers and many have been successful in compromising plenty of installations out there, including this one.

Having automated monitoring software is certainly a prudent way to stay on top of things, but in the end vigilance and bit of common sense seems to be a good way of detecting and removing attacks. Thwarting them is of course another story.

Staying with the vigilance theme, for some time I had noticed that this blog was very slow. I just attributed it to the server load or bandwidth issues but like everything else after a prolonged time of sluggish performance I turned my attention to the installation itself.

That's when I discovered the 'page_option' hack. The 'functions.php' file in my theme folder had been appended with a block calling the 'add-action' with the 'wp_head' parameter. The second parameter was from a deserialized array coming from a newly added row in the 'wp_options' table (in MySQL) with the 'option_name' field set to 'page_option'. The whole thing smelled of a hack, you know the mysterious call to decode and slice up some long encoded string. Why do hackers waste so much time with these idiotic obscurity schemes? Just dump the damn payload in. the layman won't see it and the rest can spot it from miles away, totally pointless.

A Google search brought up this reference, and the blogger's experience was very similar to mine and indeed I found the offending '/wp-includes/page.php' file just as he had. He has very good tips and hints on dealing with this hack, so head on over and give it a read.

As for me, I removed the offending block from the 'functions.php' file, delete the '/wp-includes/page.php' file, deleted the 'page_option' row from the 'wp_options' table and removed all unused themes and plugins, in case those were the hacker's conduit.

The page load times are now back to normal and for good measure I updated Wordpress to the latest version, always a wise move as they always plug new security holes.

Stay vigilant…

Berkshire Hathaway Over $1.5 Million

by @ 4:26 pm
Filed under: financial,google — Tags:

Way to go Google Finance, showing Berkshire Hathaway Class A shares up by over 900% at the close of the market today. I almost jumped out of my seat when I saw that. Warren Buffett probably thought: "My company is worth only $3 trillion?"

Berkshire Hathaway Quote

Google has since fixed the quote. It's back to its actual value of a mere $173,600 per share.

My EPUB Journey - A Sort of EPUB Primer

by @ 6:00 pm
Filed under: technology,web,writing — Tags: , , ,

With the proliferation of the mobile devices, books have morphed into digital versions and are increasingly viewed in their digital rather then paper formats. To that end there are several popular formats for e- books. PDF, the well-established type from Adobe has been around for many years and still widely used for digital books, but newer formats have begun to supplant PDF as they are more suited to mobile devices. Of those, the most popular is ePub, used by almost all modern e-book readers, except for Amazon Kindle, which uses the KF8 or AZW formats.

With ePub content is optimized and can easily reflow as the user zooms in and out, making for a much smoother reading experience, regardless of the device . In a previous post I mentioned that iUniverse had uploaded my book to Google Books (now part of Google Play) along with its ePub version and how I was able to stop that. In doing so, iUniverse had managed to knock out my own upload from Google Books which I had done long before. I already had the PDF version of my book, so re-uploading that format was a simple task. Generating the ePub version to upload wasn't so simple, specially since I wanted to do that at no cost.

The first order of business was to get an ePub reader on my computer. To that end I followed Google's suggestion of installing Adobe Digital Editions. The product can be used to read eBooks and it has a library feature where one can create a collection of eBooks. Another product, Calibre, does the same and can handle other formats such as PDF and it has other features such as format conversion.

Adobe Digital Editions

Adobe Digital Editions

My first inclination to create the ePub version was to convert the PDF file of the book I already had. One of  the promising methods that I found was an add-on for OpenOffice. After installing OpenOffice and subsequently the add-on, I started the conversion and waited and waited and waited. After a couple of hours the process ended and I had a giant ePub file to contend with. When I tried to view the file in either of the ePub readers it became evident that the conversion result was less then stellar. The text was mangled and jumbled and the ePub was basically useless.

At this point I decided that conversion from PDF is an inexact science and most attempts would  not yield a usable ePub file. Fortunately I still had the original copy of my book as a Word file and figured that would be a much better starting point. What I found incredible was that Word itself has no means of exporting to ePub. Seems unbelievable, but that is the case.

Googling possible options I was back to the freeware product, Calibre. Calibre can be used as a digital library and a reader and it offers some simple conversion tools as well. This article shows how a Word file can be converted to ePub using Calibre. Following the instructions, I was able to tag the book chapters in Word, save the book as html and then make the conversion to ePub in Calibre. Finally I had the ePub version of my book and I confirmed this by loading it in both Calibre and Adobe Digital Editions.

Calibre

Calibre

Time to upload the book to Google Play and be done with this project. Google Play happily accepted the upload and even displayed a progress bar, but in the end it showed no indication that anything was uploaded. I tried multiple times and the result was the same, no indication that I had uploaded anything. What does one do when an app doesn't work, doesn't produce helpful error messages and there's no tech support? Check the help files. Therein was a mention of a product called EPubCheck which one was expected to use against ePub files to validate them before uploading to Google Play.

Seemed like long shot specially since my ePub was working fine with two different viewers, but there was little else I could think of. EPubCheck is written in java and requires JVM to run. Fortunately I already had JVM on my PC so I ran EPubCheck on my ePub file and a flurry of errors and warnings went flying by. How could I have ever been expected to fix all these errors when I didn't even know how to peek inside the ePub file? I ended up downloading a couple of ePub fix and repair utilities but none were able to rid the ePub file of its errors. EPubCheck kept spewing out the same errors over and over.

More online searches led me to a product called Sigil that actually let one open and edit ePub files. Sigil sure delivered. Finally I was able to open the ePub file, locate the errors reported by EPubCheck and fix them. Turns out EPubCheck was just being too picky complaining about some trivial extra fields that Calibre had added based on the original Word file. But apparently Google Play runs EPubCheck against every ePub upload and silently dumps those that don’t pass validation no matter how small the offense.

sigil

Sigil

There was one more revelation here that is noteworthy. While editing the ePub file in Sigil, it occurred to me that the files were in html format. That's when the whole thing started to make sense like an epiphany. The ePub format is actually a collection of html files together with some assets such as image and stylesheet files, zipped and renamed to a .ePub extension. One can open an ePub file by unzipping it and manipulating the files within using the plainest of text editors, like notepad.

One final validation check using EPubCheck and the file was now error-free. I uploaded the file to Google Play, received the indication that the file was received and a few days later, my book was finally available on Google Play in ePub format.

Book on Google Play

Book on Google Play

Add Newline After SSI (Server Side Include)

by @ 4:00 pm
Filed under: web — Tags: , , ,

Recently I noticed that my Chrome browser was having issues displaying some of the web pages on this site. The pages wouldn't load at all or would only load partially.

After some investigating it turned out that those pages were of SSI type, usually having extensions .shtml or .shtm. Such pages could also have other extensions depending on the system configuration.

Figuring out and fixing the problem however took a number of frustrating hours. On this server, Apache has KeepAlive turned on. That means for most browsers the content is sent using chunked transfer encoding and that means the browser and server maintain an open connection for some time as data is passed in. That saves on resources and gives the server more flexibility in data transmission but on the flip side the server needs to calculate and send the content length to the browser for each chunk. Without the correct content length, browsers won't be able to correctly display the page.

After hours of trial and error, I noticed that these pages had an include such as below at their tail end with nothing after that, no newlines, no characters, nothing.

<!--#include virtual="/some_file.inc" -->

The Chrome debugger would show a red failure loading for the page but there was no explanation. cURL however came in handy, displaying this error at the end:

error 18: transfer closed with outstanding read data remaining

That's when the underlying issue revealed itself, sort of. Obviously the server wasn't sending the correct content length or the terminating chunk to the browser causing the failure. The fix came by luck after I added a few characters at the tail end of the file. Turns out that adding a single space or newline character was enough to fix the error.

At this point I have no idea why this flaw exists in the first place and why adding a character at the end of the file fixes the issue. But if you are running into the same problem, try the same solution and see if it helps, and don't underestimate the power of cURL to debug these types of issues.

iUniverse, eBooks, and Copyright

by @ 11:14 am
Filed under: technology,Uncategorized,writing — Tags: , ,

back in June 2012 I received an email from iUniverse regarding my book, Financial Markets For The Rest Of Us. In that email iUniverse, my book's publisher, proudly exclaimed that they have converted my book to the EPUB format and have submitted it to multiple sites. Here's an excerpt:

We are glad to inform you that your book, Financial Markets For The Rest Of Us, has been successfully converted to a new eBook file format. This new eBook version, called EPUB, is quickly becoming the new standard for the eBook industry. iUniverse has submitted the new eBook file to our partner eBook vendors to increase the overall distribution of your book.

iUniverse sure made it sound like they did this to help me, the author, but in reality it was more of a self-serving action to exercise control and maximize profits. Eventually I discovered an even bigger issue to deal with than just their EPUB initiative.

A few months ago I noticed that the book I had uploaded to Google Books had been replaced by the iUniverse's PDF and EPUB versions. This meant that iUniverse was not only earning money from the sale of the paper and digital copies, but also from the Google ads displayed alongside the pages of the book online. I am certain that iUniverse was not sharing any of the ad revenues with the authors. Concerned, I contacted Google to inquire about this and was told that I needed to contact iUniverse and request them to stop their automatic list upload. That meant that iUniverse could circumvent my copyright, effectively preventing me from listing my own book on Google Books.

Eventually I was able persuade iUniverse to stop uploading my book to Google Books and regained control of the situation. It took a few months, but I am now back in charge for both the PDF and EPUB versions on Google Books. Google no longer displays advertising alongside the books' pages, so I must assume iUniverse's willingness to relinquish control was somewhat helped along by that fact.

iUniverse was once a decent company for POD (Print On Demand) publishing. Those were the times when paper books were the only choice and POD services were affordable, but that is no longer the case. iUniverse was acquired by Author Solutions, a company that owns other self-publishing businesses, the POD prices are now exorbitant, service is subpar, sales and marketing pitches are incessant and author payments are questionable according to many sources online. In addition the traditional paper book is no longer the only game in town, being slowly replaced by its digital counterpart, the e-book. E-book publishing is relatively simple nearly eliminating the need for a publishing company, although the publishing outfits won't admit this.

As for my book, while iUniverse continues to be the publisher of the paper version as it was from the beginning, I was finally able to bring the digital versions under my own control, allowing me to make my own decisions, be it to offer the EPUB version for a small fee on Google Books, or just make it available in its entirety on my own web site.

P.S. On my next post I will address how I created the e-book version of my book. It was an interesting journey in the world of digital books.

Why did you write about Jesus?

by @ 11:13 pm
Filed under: religion — Tags:

Fox network never ceases to be amusing, specially with the women they hire.

Fox woman: as a Moslem why did you write about Jesus?
Author: I didn't write it as a Moslem , but as a scholar.
Fox woman: but you are a Moslem , why did you write about Jesus?
Author: I have a PhD in religious studies, it's an academic book. My religion is irrelevant.
Fox woman: but as a Moslem why did you write about Jesus?
Author: I have done research on many religions, including Christianity. That gives me the basis to write this book.
Fox woman: as a Moslem why did you write about Jesus?

Older Posts »

Powered by


Read Financial Markets  |   Home  |   Blog  |   Web Tools  |   News  |   Articles  |   FAQ  |   About  |   Contact
Bitcoin: 1K9TzBvQ2oaEb4tX9t2vKDtZouMcpfV6QF
© 2001-2017 Robert Hashemian   Powered by Hashemian.com