All Things Techie With Huge, Unstructured, Intuitive Leaps

Facebook Inc. (NASDAQ:FB) Accounts Illegaly Used to Gather Secret Information, Report | News Today Digest


Fake Facebook Inc. (FB) accounts are being illegally used to gather secret information, it is revealed by an Australian government review of social media and defense.
The review of social media and defense by Australian government completed in March disclosed that Taliban is using fake Facebook profiles with girls to obtain intelligence from military personnel. (Read more)


Facebook Inc. (NASDAQ:FB) Accounts Illegaly Used to Gather Secret Information, Report | News Today Digest

The Problem With Python ~ Perils of Python

Python freaks adhere to their favorite programming language like zombies to a cult. This is going to tick off some Python freaks.

You need some third party apps to make a standalone app out of Python. Plus it has many many add-ins built with C, C++ and whatever your programming weapon of choice. It can be a mashup of binary vomitus that can have some serious consequences. I saw one today.

This particular Python app was built by some troglodyte who's previous arena of expertise was DBase and FoxPro and thought that relational databases were a passing fad. So this app that he built fed itself data using .dbf files. Let me tell you, finding a .dbf file converter for free is like trying to find someone with a full set of teeth in a small southern town. Excel stopped outputting .dbf with 2007. Why would you need a dbf converter when you could use something more in the 19th century like a csv file? (Twentieth century is xml and 21rst century is JSON).

Well, it all has to do with the Perils of Python. The importer in this case was written in Python, and theoretically, it could import both csv and dbf files. CSV files always failed. But they didn't fail consistently. Sometimes the python input parser would correctly import a CSV and then on another like file, it would create extra fields, columns or whatever dinosaurs called table columns. It was a huge WTF? moment.

Then it came to me in a flash while I was emptying my colon. It was the colon in the date field. In some random cases, it correctly surmised that it was just another character in the field, and when another file was read in, it immediately said "AHA! Reserved character separator!. So why the inconsistent behavior? Da Python!

The input parser would make a decision on which import method to pass the input to. Depending on file size, it went to a method that was a layer of abstraction over the Python engine, or virtual machine, or Model T or whatever they call Python binaries. This would cause a choke. With just a few changes in the file characteristics, it would get imported natively and happily work. Unfortunately, you couldn't predict when and where it would work.

SO .... people beware of hiring the guy next door who will do the job for cheap ... these guys who still program with tools from the middle ages are doing you more harm than good. And your program is only good when it is operating on their development machine. Put it out in the real world and it fails quicker than the zipper coming down on Pee Wee Herman's and Fred Willard's pants in a darkened theater. Caveat emptor. The price you pay for using Python is huge if you want real inter-connectivity.

Chrome Blocking Extensions Part II



In a previous blog entry, I described how I added Chrome Browser extensions to prevent tracking cookies. Sites like CNN and New York Times and such sell tracking cookie information to all comers, and since I am a privacy advocate, it was starting to tick me off. So, I added DisconnectMe, Ghostery, and Do Not TrackPlus to my Chrome browser, and life was good.

I added the Adblocker, and that threw me my first curve ball. I couldn't access my Google account to see how much money my online ads were making. That made me take off AdBlocker.

Last week I discovered another fly in the ointment: Expedia.

The reason that I use Expedia is simple. I wanted in overnight hotel room in city that was 5 hours away. I just wanted a quick stopover, a place to lay my head and to get up and continue my journey. I knew of just the hotel that I wanted to stay at and where it was. I went to their site, and got what I thought was a reasonable price. To double check, I went to Expedia.

That same hotel room was 30 per cent cheaper on Expedia for the same night. I immediately booked it. I couldn't complete the online transaction. It kept telling me to wait a second and try again. After 15 minutes of this, a Eureka moment struck me. I turned off the Chrome Extension blockers and all worked well. I was able to book my hotel online.

Luckily most of these blockers have a little icon in the corner of the browser where you can turn them off and on. However, I wasted a quarter of an hour figuring this out.

500 Error UnsupportedClassVersionError


(click for larger image)

Had a troublesome error. I moved my development environment in Eclipse to my laptop. Imported the project. Everything went smoothly. Started the server. All fine. The minute that I had to go to the database, it blew up with an error that looked like this:

javax.servlet.ServletException: java.lang.UnsupportedClassVersionError Unsupported major.minor version 51.0

I realized that my new Eclipse Juno was set to compile for the 1.7 Java environment and Tomcat was running 1.6 Java JRE.

I went into the project properties, and selected Java Compiler option. On the upper right corner there is a link where you can click to Configure workspace settings. The JDK compliance is set to 1.7. (which is version 51). Use the combo box to set it to 1.6 which is version 50 and it should work.

I Won a Copyright Right Dispute with Google's Youtube

(click for larger image)

Google owns Youtube. When I wanted to make some of my pictures of Provence into a Youtube video, I deliberately did not want to run afoul of copyright laws. So I googled royalty free music and came to a site with free, unencumbered music. I downloaded a track and used it as background information.

When it came time to upload, I identified the track and artist and the fact that it was royalty free music. Youtube said that I couldn't monetize the video, because I didn't own the copyright. Interestingly enough, they didn't make me take it down.

I left it that way for months. Then I get a notice saying that some entity called CD Baby was disputing my right to use the music. I did an online appeal by filling in the forms, and using drop down menus to say that it was free, and royalty free music.

A couple of days later, I get the following email:


CD Baby has reviewed your dispute and released its copyright claim on your video, "A Peek At Provence". For more information, please visit your Copyright Notice page

Sincerely,
- The YouTube Team

Cool. So I figured that I would go ahead and monetize the video. Not so fast. I opened up video manager, and it said that there was copyright information that said I couldn't monetize it. I cut and pasted the email into the explanation box.

So I won a copyright dispute with the Google-owned YouTube, now lets see if they will let me monetize it. Here is the video in question:





Twitter Follow-Backs

(click for larger image)

I have officially stopped. I have stopped playing the stupid tit-for-tat followers games. I got the above this morning in my email saying that I was being followed, and that we would have a pact, and if I followed they would keep the follow and if I unfollowed them on Twitter, they would unfollow as well.

Bully for them. I am tired of playing this game. I will return to my true self. I will not follow ghetto rap artists. I will not follow girls more intent on showing their breasts rather than reading my content. I will not follow fundamentalist, racist Republicans.

I will just follow people and accounts that I am interested in, and will not follow you just because you follow me. Inflated follower numbers mean nothing. I have conducted experiments on how to convert followers to web hits, and the only way to do it, is to emulate the religion model. Anyone who is a true follower, will check out your website. Anyone paying lip service and just playing the tit-for-tat following game cannot be converted to web hits and is uninterested in what you have to say.

So most of my followers are real now. If you want to follow me for real, I can be followed @ArtOfWarm. If you are interesting, have decent content, and are not trying to sell me something, I will follow you back,

Javascript - How To Format a Telephone Number

This is quite a common problem. You have an user input table on your html or jsp page and you want to make sure that it is numbers only, has the area code, and is in a consistent format when you put it into the database. I downloaded some javascript to do just that and it worked fine for numbers that you typed in using the numbers on the keyboard. But when you used the numeric keypad on the keyboard, or a USB external keypad, it failed. The keypad, instead of putting numbers, put junk into it.

So this is how I solved it. I created a javascript file called phone.js. This is the contents:

function formatPnum(phonenum, textbox) {
var regexObj = /^(?:\+?1[-. ]?)?(?:\(?([0-9]{3})\)?[-. ]?)?([0-9]{3})[-. ]?([0-9]{4})$/;
if (regexObj.test(phonenum)) {
var parts = phonenum.match(regexObj);
var phone = "";
if (parts[1]) {
phone += "(" + parts[1] + ") "; }
phone += parts[2] + "-" + parts[3];
textbox.value = phone;
}
else {
//invalid phone number
alert('Please enter a proper phone number');
textbox.value = '';
}
return false;
}

Then at the top of the html page, I added the following script tag:

(script type="text/javascript" src="phone.js" /)

Note: I used "(" and ")" instead of "<" and ">" because this blog actually parses it as real HTML. Then, everywhere I needed a phone number, I added this to the tag (in this case for a fax number):


Fax (Area Code + #)
(input type="text" name="fax" onfocus="this.value='';" onmouseout="javascript:return formatPNum(this.value, this);")


Note: I used "(" and ")" instead of "<" and ">" because this blog actually parses it as real HTML.
You will note, that I have an onfocus event. When the user clicks on it, the previous number or whatever is in the input box goes away. Then the user enters the number. If any part of it fails (like he adds a letter), it fails and the alert shows that there is an error. There is no input displayed. However, if the user enters a three digit area code and a seven digit number, the phone number is automagically formatted into (123) 456-7890.

Piece of cake. Hope this helps.

Where is Facebook Stock Price Going

Where is Faceboook Stock Price going? Everyone wants to know. Here are a couple of charts that I want to show you with some rudimentary technical analysis. This is the 5 day chart of Facebook stock with the blue line being the stock price and the red line being a Exponential moving average. Generally when the exponential moving average line crosses over and is above the price line, the stock price will drop. The obverse is true. When the stock price is above the exponential moving average, the stock will rise. The buy and sell signals are when the two lines actually cross. (this is rather basic technical analysis).

Friday, the stock closed for the weekend at $19.05. This is the 5 day chart (click for larger image):

This is the same chart, except it is the 30 day view (again click for larger image):

As one can see, the technical indicators show that the stock is on the down escalator, it is on the handcart to hell, and it is dropping like a song on yesterday's hit parade. Where will it end?

In a previous blog post, I stated that my technical analysis shows that the stock will gain some support in the $16-$19 dollar range, but even at that level, the free fall is not over. So what is the true value of Facebook stock? Where is it going?

If you use commonly accepted metrics, then Facebook stock is really worth about $7.25 per share. The freefall will stop against a mountain of reason at that value.

However, my opinion is that Facebook is dead man walking. They sent out announcements of new products, attempts, sales algorithms etc almost daily. These product announcements are like flares from a sinking ship. Facebook is old PHP technology that doesn't adapt well to mobile, and it value proposition to its users, is that it allows one to stay in touch with another in a very lazy fashion. This is not a marketing proposition for users, and that is why Facebook ads generally fail. The folks at Facebook are trying to put lipstick on a pig and sell it.

I am particularly enjoying this because analysts from all over Wall Street (hello Arvind Bhatia) wanted to be media stars and appeared on TV saying what a great buy this stock was at $38. I hope that these analysts don't get bonuses this year.

So there you have it -- a social media platform in the golden years of its quick internet existence is trying to pawn itself off as investment grade. The competitor to Facebook is already on its platform, and Facebook will become the MySpace of the investment world.

Blocking Extensions for Chrome

(click for larger image)

Regular readers of this blog will know that I am a privacy freak. I also use Google Chrome which is the safest, fastest, best browser in the marketplace.

I just got a new laptop, and I had forgotten to add my privacy extensions. However I was reminded when an old highschool friend sent me an invitation to join her on Facebook, and since she had my email address, the Facebook code read my contacts and suggested other friends that were not connected to her, but were to me.

Since I get my email through my browser, I decided that it was time to add the privacy extensions. I added Disconnect.me, Ghostery and Do Not Track Plus. I also added Ad Block, but I had to disable it, because I couldn't read how much money that I was making on the ads for Google Adsense.

However, I am quite pleased with the performance of the blocker privacy extensions for Chrome. So far, the worst offender for tracking in my experience, is the CNN.com website.

As an added feature for today, you get a fearless prognostication. Facebook stock is going to tank today. The closing price was $20.38 and I'm willing to bet that it will close lower today.

Scumbag Trailer Trash Human Garbage Webmasters ~ Wall of Shame

I'm getting tired of human garbage, scumbag webmasters who spam and traffic fake. These people are the lowest classes of internet users, who think that SEO involves being a rectal sphincter on other peoples' sites. They have absolutely no skills at real SEO, and no content worthy of real traffic so they resort to shady, dubious and questionable tactics to try to pathetically generate traffic to their websites. These are cretins of the lowest kind.

This week's wall of shame in include the following websites:

  • FILMHILL
  • STUMBLEDUPON (obviously parking on the the legitimate website StumbleUpon)
  • BROADWAYPINK
These ghetto webmasters don't belong on the internet.


We now take you back to regularly scheduled programming of how to be a zen coder. Ommmmmmmmmmmmmmm mmmmmmmmmmmmmmmmmmmmm mmmmmmmm

JSP - How to Programatically Set the Select of a Combo Box

I had to look this one up, so I am posting this JSP tip in case anyone else needs help. Here is the scenario. I have a form with a select tag and a bunch of options. The data is stored in a data base. When I read the data back and display the page, I want to set the select of the combo box to display the data value of the variable or the database value. It is very easy with a scriptlet. Just add the following attribute code to your option tag:

option value = "Chocolate Brownies" <% if (icecream.equalsIgnoreCase("Chocolate Brownies") out.print("selected"); %>

There you have it. Easy peasy!

Buddha of the Binaries ~ Zen of Software Development~ Noble Truth #2

• What is the Second Noble Truth, oh Buddhist of the Binaries?

The second truth is that bad software is caused by wrong motives. Our binaries will be worth less than feces if we take shortcuts or try to copy other's art without understanding it, if we want others to like our work without putting our best effort, if we do not get the money that we want out of our efforts,etc. In other words, coding purely for money does not guarantee happiness. Rather than constantly struggling to use software as a means for other things, try to modify yourself to code for the love of it. Wanting money deprives us of contentment and happiness. The true riches in digital life come from creating something you love ......... ....... ........ ......... ......... ........... ........ ........ (and then going to IPO).

(Lesson one is found HERE)

Sorry Twitter - You Lose in Generating Web Hits



I like to treat the internet as one big test subject, and when you have a couple of blogs, you can do some fascinating experiments in internet metrics and crowd behaviour. The aim of almost every posted video, picture, blog entry and image is to go viral. The holy grail of this technology-driven world is page views and web hits. There are entire books, websites and courses dedicated to generating website traffic.

Once you put something up on the internet, you can either wait for the search engines to find you, hope that the What's New section profiles you or you can link advertise on other social media. But very few people know the most effective means to get hits.

I decided to have a mano a mano, a head to head to find out ...... (are you ready) ....

THE MOST EFFECTIVE WAY TO GENERATE HITS WITH LINK POSTING


In one of my blogs, I posted this picture that I took on the shores of Loch Awe in Scotland. It is the Robert the Bruce Chapel in St. Conan's Kirk. When I looked at it, I said "Holy Rigor Mortis, Batman, this looks like you dead!". Sure enough, it looks like the grave of a dead Batman. I thought that this was a suitable subject to go viral.

(click for larger image)

So, posted competing links on Twitter and Reddit. I used the same title "Photo of Dead Batman" and the same tags including #DarkKnight, #Photo, #DeadBatman.

Twitter generated six hits that hour. Reddit generated 170 hits in the first hour.

Clearly we have a winner when it comes to generating hits by link posting on social media. And to think that I have been ignoring reddit.com.

(Disclaimer: I am in no way associated with Twitter or Reddit).

The Journal of Inexact Computing Volume 1

Welcome to Volume I of the Inexact Journal of Computing. This journal introduces the next big thing in computing. It is software that behave and operates with missing, incomplete or corrupt data.

Humans operate with partial information all the time. It is called thin-slicing. We make decisions without having all of the facts. If we are going to have a machine pass a Touring Test, or make machines behave more like humans, they have to operate with missing or incomplete data.

So lets take tiny steps in getting to inexact computing. In this first blog entry, let's examine how software can small steps forward not to choke on missing data.

The most common cause of programs failing upon missing data, is when a null exception is thrown for a variable that doesn't have a value, but is called upon to produce its value for an operation, calculation or input/output to another step. A null exception throws an ugly error.

One way around this, and the very first step to inexact computing, is to have a variable initialization either in a specific method or at its time of declaration that is near, close or somewhat close to what it should be. That way when the assignment fails to happen (either from a fetched database value, input parameter or whatever), the program doesn't come crashing down and throw an exception. The value may not be right, but don't forget the title. This is the journal of INEXACT computing. Just like us inexact humans. This might not be good for calculating tax returns, but it would work in areas like image recognition in real time where the software is driving a car and a highway marking is partially obliterated. A good guess is really helpful here.

One could even put some intelligence into the variable assignment. A try and catch block would catch the null value, and depending on where it was in the program, it could determine to send it to a variety of inexact assignment functions, depending on the stage of the program. It could even determine the severity level of having inexact data.

The way that I see it, is that each application will have a customized framework attached to a caching layer and a database to directly deal with missing data to supply values to progress with the planar execution of the program. More on the inexact value framework in another article.

So that is the baby-step start to inexact computing. The next article will deal with the guess() function and the what-did-I-use-lasttime() function as well as the most-Probable-Value() function using Bayesian inference. Stay tuned.

Quick Tip: Clear an HTML Input When You Click On It

How does one clear an html input, when you click on it or it gets focus? I had to look this up, and anything that I have to look up, I reprint to help others find it quickly.

In any mobile app, it is a real pain to remove input text if you have to replace it. It is much easier to have it automagically clear when anyone clicks on it to give it focus in order to change it.

Here is a simple way of doing it. Just add this attribute to the input tag:

onfocus="this.value='';"

The value for this.value is a single quote (') repeated for the null. Easy Peasy!