Ads 468x60px

freak2code is the blog about latest geek news,software reviews ,trends in technology and more informative stuff......

Tuesday, 18 September 2012

Amazon Kindle Fire HD vs Google Nexus 7


Amazon Kindle Fire HD vs Google Nexus 7

by vinay gautam



The Kindle Fire HD received a pretty massive overhaul compared to last years model, but it still didn’t quite hit some of those top end specs we’ve been seeing of late. We’re not going to compare every last detail here and tell you what to buy — especially since we’ve only managed a few minutes with the newcomer. Instead here’s some details about the differences, as well as a few fun pictures. For a full breakdown head to our own device comparison tool by clicking here.
Google Nexus 7: 
-Android 4.1 Jelly Bean
-7-inch 1280 x 800 IPS Display
-Quad-core 1.3 GHz Tegra 3
-8GB storage (no SD slot)
-7.8 x 4.7 x 0.4 and 12 oz.
Kindle Fire HD:
-Android 4.0 ICS (skinned)
-7-inch 1280 x 800 IPS Display
-Dual-core 1.2 GHz TI OMAP 4470
-16GB storage (no SD slot)
-7.6 x 5.4 x 0.4 and 13.9 oz.
Now a few things out of the gate you’ll notice the Kindle Fire HD only rocking a dual-core while the popular Nexus 7 has a quad-core. Amazon mentioned the Texas Instruments 4470 was actually “faster” than the Tegra 3 — although we doubt that. They also mentioned floating operations per second was better which helps with overall user interface performance. Then you’ll also notice the Kindle Fire is a bit larger, has massive bezels, and weights a decent amount more too.
On the flip side the Kindle Fire HD is the first tablet to offer dual-band MIMO WiFi support that should seriously improve overall WiFi signal, speed, and performance so that is a big difference. It also has stereo surround with Dolby Digital Plus and HDMI-Out while the Nexus 7 has mono sound and no HDMI. Then for another win in Google’s corner you have well over 650,000 apps in the Google Play Store vs about 55,000 from Amazon. The Nexus 7 also has NFC for Google Wallet and other sharing features as well as GPS, while the Fire HD has neither.

In terms of hardware they both actually feel quite excellent. Amazon really stepped up and refined their build quality over the original Fire, but I can’t help but think it reminds me of the DROID XYBOARD tablets from Motorola for some reason. Both screens were pretty equal in terms of overall quality but I just might have to give a win to Amazon with this one. Their single layer touch sensor should help improve performance while reducing glare and keeping colors more accurate — which seems like a fair statement given our quick time with it.
Obviously the big thing here comes down to ecosystem and the software. Being a diehard Android fan I’ve already made up my mind that I’d rather have the Nexus 7 simple for Android 4.1 Jelly Bean (or just stock vanilla Android in general.) Amazon’s heavily customized skin basically sets the blazes on Ice Cream Sandwich and makes it completely unrecognizable. Obviously Amazon has made the entire experience customized around their own ecosystem of options, apps, and content — and Google’s done the same with their Nexus 7.
In general can the Kindle Fire HD “dethrone” the Nexus 7 from being one of the best tablets around? That question is ultimately up to you. I think there’s room for both and neither will out-due the other. Amazon has a huge reach with their online store that can really help keep it in the eye of the public, but then so does Google when they put the Nexus 7 on their homepage.
Until we get the Kindle Fire HD in to review ourselves we’ll reserve a true comparison and comment for later. For now enjoy a few additional images below, plenty of content regarding both devices, as well as our full device spec sheets at the end.
Which tablet would you rather own?
P1100261 P1100262 Screen Shot 2012-09-07 at 12.04.14 PM Screen Shot 2012-09-07 at 12.03.42 PM Screen Shot 2012-09-07 at 12.03.07 PM

HTC One X+ quad-core 1.6 GHz specs leaked on Twitter


HTC One X+ quad-core 1.6 GHz specs leaked on Twitter

by vinay gautam

Rumors of an HTC smartphone to succeed the popular One X have been floating around for a few weeks now but today we might have seen our first solid details. An XDA Developer that is usually pretty accurate in his leaks has just confirmed — and leaked the specs of the upcoming HTC One X+ smartphone and it sounds powerful.


Just like previous reports and rumors this smartphone will indeed be running on NVIDIA’s Tegra 3 processor, only it will be the new Tegra 3+ instead. The CPU has been boosted to 1.6 GHz and a 1.7 GHz companion core NVIDIA calls 4-PLUS-1. The full details were revealed in this post on Twitter.
According to the leak, the HTC One X+ has dimensions of 134.36 x 69.9 x 9.3mm and weighs in at 129g. Then just like the original HTC One X the device has a 4.7-inch display, an 1,800 mAh battery, and 32GB of internal storage. The differences here are obviously the processor as well as a few other small changes.
He then goes on to mention Android 4.1 Jelly Bean and a new Sense UI 4.5 will be on board too. That will accompany the new Tegra 3+ quad-core processor that has been increased in speed, then we’ll still have 1GB of RAM. I’m hoping they’ve increased the battery life because in this day and age 1,800 mAh just isn’t enough — especially when Motorola’s new flagship is just as thin and comes with a 2,530 mAh battery. Previous rumors point this phone towards T-Mobile for an initial launch but I’m sure we’ll find out more come September 19th at the HTC event in NYC.

HTC unveils the One SC, SU, and dual-sim ST for China


HTC unveils the One SC, SU, and dual-sim ST for China 

by vinay gautam

The folks from HTC have been hard at work designing a few new budget aimed smartphones for their Chinese market because we have three new phones to show you today. While this was supposed to be HTC’s rebound year where they released less phones and focused on quality we’ve still seen quite a bit. Below is three brand new decent looking devices headed to China.


Out of the blue with no announcement or warning HTC China added three brand new “One” series smartphones to their website. Those being the HTC One SC, SU, and the ST. Pretty interesting to say the least — and we’re certainly not fans of the naming scheme. We’re not sure of HTC’s plans to help improve 2012 but this could be a sign of what’s to come.
HTC has an event scheduled for September 19th, and we’ll have all the details when that day comes. We’ve heard rumors of a new 1.7 GHz quad-core One X+ but these new phones we’re seeing today might show a different, more budget aimed approach. Here’s the new phones:
The HTC One SU is the first smartphone to appear (top image) and has a rather odd design. I like the large HTC letters across the back but that’s all the praise I’ll be giving. It rocks a 4.3-inch WVGA (480 x 800) display, a 1 GHz CPU, 1GB of RAM, 4GB internal storage, micro-SD, 5 megapixel camera and only Android 4.0 ICS. Pretty mid-range at best.

Then what you see above is the One SU which is essentially the same phone as the one above regarding specs. A single-core 1GHz CPU, 1GB of RAM, 4GB ROM, 1,800 mAh battery and the same low-res 4.3-inch display. Its design is a bit more plain and should probably appeal to more users.
Then the last of the three is the new dual-sim HTC One ST which is the best of the three, while looking like the cheapest if you ask us. Again the ST has the exact same mid-range average specs as the two devices mentioned above only it has a dual-core 1.0 GHz CPU instead of a single-core, then it also offers dual-sim options for those in need. Oh and it has a sweet Candy Apple Red color too.
For now we can’t be certain what HTC is planning for the US markets, but this looks to be what the Chinese marketplace will be getting from the “quietly brilliant” company. You can see more on their Chinese website byclicking here.
HTC-One-ST htc_one_sc1 Su-one

Sunday, 16 September 2012

Following The Trend: Mozscape Gets Faster and Cleaner


Following The Trend: Mozscape Gets Faster and Cleaner

by vianay gautam

Posted by AndrewDumont
There's a trend emerging with Mozscape, and it's a good one. Updates are getting more regular and indexes are increasing in size (with exception to a few bumps in the road). Today, we're happy to announce a few more awesome features to add to that list!
A few weeks back, Rand announced the Mozscape API beta, and the Moz community came by the dozens to try it out. Thanks to that passionate group of beta testers, we nailed down some bugs and battle-tested the new API.
Now, it's ready for primetime.
Starting today, Mozscape just got a whole lot faster. It now supports 200 requests per second for everyone on paid levels -- that's a 20x increase from the current paid levels! This rate limit increase will allow users to pull Mozscape data as they please, with a lot less wait time in between requests. Even better, you don't need to change a thing on your end to utilize latest update as a paid Mozscape user - just keep calling. No new keys, no new code.
Free Mozscape users, we didn't forget about you! We've got a small rate limit increase coming your way in the coming weeks.
We're also rolling out a fresh update to the Mozscape API documentation. We've heard time and time again that the old documentation caused headaches for folks who have tried to integrate Mozscape data. That's a bummer, so we completely refreshed the structure of our API documentation to remove some of the pain that came with navigating through the docs. This update is also live as of today.
All of these updates tie directly back to the theme of progression with Mozscape. We've got some of our best people on the job, and some 18 million resources behind improving our data (if you know what I mean). Much more to come!
PS. If you've built something awesome with Mozscape, drop me a line or let us know in the comments. We may be sending some love your way soon.

How To: Advanced rel="canonical" HTTP Headers


How To: Advanced rel="canonical" HTTP Headers

by vinay gautam

Posted by Kevin Graves
This post was originally in YouMoz, and was promoted to the main blog because it provides great value and interest to our community. The author's views are entirely his or her own and may not reflect the views of SEOmoz, Inc.
On February 12th, 2009, Google began to support the link rel="canonical" tag, which was later adopted by Bing and Yahoo, for specifying a preferred version of a URL. It wasnt until June 17th of 2011 that Google announced the support for rel=canonical in the form of an HTTP Header, giving webmasters yet another avenue to provide a preferred URL for non-text/html content-types such as PDF files, that were otherwise unable to have a specified URL using the link tag. In retrospect, this was relatively important news for SEOs, helping to minimize potential duplicate content issues, especially in wake of content penalties waged against site owners in recent years. This nontraditional method to this day is underutilized, and I believe that, now more than ever, SEOs should start leveraging and considering the power of this method for non-text/html content-types.
There are a lot of reasons that the link HTTP header has not had a ton of traction in the SEO industry:
  • SEOs are heavily focused on traditional URL consolidation for text/html content-types
  • Canonical HTTP headers are more difficult to implement dynamically than the link HTML tag.
  • Implementation may require additional access where privileges may be limited.
  • Implementation may require additional server modules to be enabled or installed.
  • Implementation can easily create server errors, if not handled correctly.
For the most part, these non-text/html content-types, specifically PDF files, add content and value to sites. They can be crawled, indexed, contain links which when shared across the web act as natural link building, and pass PageRank. Link HTTP Headers should be added to these content-types when applicable.
I recently was digging into the Apache documentation and surfing different articles for information about a more advanced implementation. I was surprised to see that there were not many advanced methods or tutorials on how to dynamically add in the HTTP header, and so I am bringing this to the community.

HTTP Headers Using PHP (Text/HTML Types):

The rel="canonical" HTTP Header can easily be added to a text/html content type that supports PHP using the header() function. Using the proper syntax shown in Google's documentation coupled with PHP will allow us to accomplish this.
 HTTP Header Response using PHP
Adding this header() function before any HTML is output will append a link rel="canonical" HTTP header to the headers before they get sent.
This minics the rel="canonical" link tag. The only difference is sending the preferred canonical URI using an HTTP header versus a <link> tag. Traditionally the <link> tag has been by far the most popular choice of implementation. This function, however, will be used in the advanced section of this article.

HTTP Headers Using .htaccess (non-Text/HTML Types):

The HTTP Header can modified relatively easily using .htaccess for all content-types, such as PDF files. This solution works great for sites that have a relatively small amount of files which you need the header added to. In this example I'm showcasing an application/pdf content-type.
Apache Files Directive
This snippet of code when implemented will add a HTTP Header to the PDF file pointing to an HTML page with the URL of /page.html.
The filename argument should include a filename, or a wild-card string, where ? matches any single character, and * matches any sequences of characters.
Regular expressions can also be used, with the addition of the ~ character.

Advanced Dynamic HTTP Header Implementation (non-Text/HTML Types):

The dynamic implementation of the HTTP Header for application/pdf content-types i'm about to show you is more advanced and does require knowledge with .htaccess and PHP, although I will provide the examples.
The first step is to create php file to control the output of the PDF. This can most easily be done by rewriting a URL.
PDF URL Rewrite
This RewriteRule, when added to an .htaccess file, simply allows us to control the PDF file from a php file named "pdf.php". Anytime a user or search engine tries to access a URL that contains the file extension ".pdf", the pdf.php file will be referenced for instructions on how to display the file. This gives us the ability to perform conditional logic to add a canonical HTTP header.
Adding a link  in PHP
This snippet of code when added to pdf.php, will check if the URL of the PDF file exists. If it does, we can then perform logic to add in the canonical HTTP header, otherwise, we want to return the file as a 404.
As you can see, the conditional logic has been commented and does not currently function although this is where I leave you in good hands to create your own logic based on your needs.
For example, you may have a csv or txt file you would like to read from. Those files could contain a list of pdf files and corresponding URLs that you would want to have the HTTP header added to. You may also have table(s) or column(s) of useful information in a database that you need to reference to find the corresponding URL to point to the preferred URL. There are many possibilities.
It is also important to note the other two additional headers added for the content-type and content-length. These are necessary for proper output. If we do not set the content-type to application/pdf, the file will be treated as a text/html file.

Check Your Headers

How do you know if the HTTP Headers have been sent? Verify them using a tool. The Web Developer Toolbar for Firefox is a great tool not for just implementing HTTP Headers. Another tool that can be used is Live HTTP Headers. You can also use a third party web-based tool for development sites that are generally not hosted locally.
Example of HTTP Headers Sent

Caution

I highly recommend testing any dynamic HTTP Headers using .htaccess on a development or local site before pushing changes live. There are potential errors that can occur, and it also gives us the chance to QA the implementation as well.

What I Used

  • PHP
  • Apache
  • mod_rewrite enabled
  • mod_headers enabled
Note: These script examples are very minimalistic on purpose to showcase the fundamental code necessary to perform the method. There are many different ways to add the canonical tag in the form of an HTTP Header. This simply showcases examples for users running the most widely used server and framework. Windows running IIS does not use .htaccess files unless third party extensions are enabled. They also are different with regards to case sensitivity using file_exists( ) with PHP.

How To Use Google+ And Rel=author To Start Building Your AuthorRank


How To Use Google+ And Rel=author To Start Building Your AuthorRank

by vinay gautam
Google+ AuthorRank
As Google continues its quest to provide its users with the most authoritative and relevant search results, the folks over at Mountain View have devised a strategy for connecting authors with their content.
Their technique is called AuthorRank, and it's shaping up to change how quality content is pushed through the SERP's.

What is AuthorRank?

AuthorRank is a quality score or online reputation measured by the quality of content that an author has published. Here's the specific language from Google's Agent Rank patent:
The identity of individual agents responsible for content can be used to influence search ratings.
Assuming that a given agent has a high reputational score, representing an established reputation for authoring valuable content, then additional content authored and signed by that agent will be promoted relative to unsigned content or content from less reputable agents in search results.
This means that when an author publishes content on a certain subject, their AuthorRank will increase and they will be considered more authoritative for that subject. For example if I publish 2-3 articles a week about Search Engine Optimization, my AuthorRank will begin to increase in the category of SEO. Now the same reputation points do not carry over if I publish an article on, say, knitting. This is because although I have a high reputation for SEO, that does not relate to me having any knowledge about knitting. This means that your AuthorRank is split up into the various categories you produce content for.

How does AuthorRank Affect the SERP's?

As it stands today, AuthorRank has no direct effect on PageRank, however I foresee it having a strong impact in the future. As Google tirelessly tries to update their algorithm with the purpose in mind of serving up only quality content for its users, it only makes sense that it starts awarding content publishers for producing said quality content.
Even though today there is no direct impact on PageRank, giving yourself authorship of an article can be leveraged to affect your click through rate in the SERP's. When you give yourself authorship of an article, information about you is pulled from your Google+ profile and displayed next to your article in the SERP's.

This is what Google calls a "Rich Snippet". This is a great way of getting your articles to stand out in the SERP's. Notice that your Google+ profile picture, your name and how many circles you are in is displayed directly next to your article in the SERP's. This is the biggest benefit today, of giving yourself authorship of an article, as your AuthorRank is currently just a stored value for Google's future use.
How do you give yourself authorship of an article you may ask? With the rel="author" attribute of course!

How to leverage rel="author" and start building AuthorRank

You've seen it countless times – the section at the bottom of a blog post that talks about the author and links to all their related social networks. Most people don't take the time to read these so they are often neglected by the author. However with AuthorRank this "About the Author" section becomes very important.

Including this section in your articles alone will not give you authorship of an article in Google's eyes. To tell Google that you are the author of the content you must include the rel="author" attribute in either the <a> tag or the URL when linking to your Google+ profile.
Adding rel="author" to the tag:
<a href="https://plus.google.com/u/0/118293635348546493797" rel="author">My Google+ Profile</a>
Adding ?rel=author to the URL:
<a href="https://plus.google.com/u/0/118293635348546493797?rel=author">My Google+ Profile</a>
Now what your blog is properly configured you need to make sure your Google+ profile is as well.
Login to your Google+ account and make sure your profile is set to public.

Next, add yourself as a "contributor" to the sites you publish content for.

That's it! You are now set up to start building your AuthorRank.
I myself am very excited to see what Google decides to do with AuthorRank, but it seems clear to me that with the combination of Google+ (an identity platform) and rel="author" (a digital signature), Google will begin to use AuthorRank as a way to help deal with the massive amount of content that currently exists on the web. My advice is to start building your AuthorRank by publishing quality content on your blog as soon as possible, because if Google does decide to influence search results based on AuthorRank, that update could come as a huge hit to those who currently outsource and produce low quality content for their blogs.
Leave a comment below and let me know how you think Google could use AuthorRank to affect PageRank and what it may means for SEO's in the future.

Make Your Site Even More Mobile Friendly with Responsive Design


Make Your Site Even More Mobile Friendly with Responsive Design

by vinay gautam

Times have changed and so have our ways of accessing information via internet browsers. The Internet is no longer accessible on desktops/laptop browsers alone. It is evolving rapidly and now your website needs to accommodate mobile browsers accessible within mobile devices, such as smartphones and tablets. While desktop browsing still far exceeds by 2015, more U.S. Internet users will access the Internet through mobile devices than through PCs or other wireline devices. (More Mobile Internet Users Than Wireline Users in the U.S. by 2015, IDC, September 2011). Consequently, if you have a website, traffic to it will come increasingly from mobile browsers than from web browsers.
Is your website optimized for mobile devices, and how flexible is it to adapt to the many different resolutions of the various smartphones and tablets on the market today? In other words, do you know how the experience will be for users viewing your website on Sony Ericsson T715 or iPad mini rumored to release in October of this year?
Experience Responsive Web Design
A quality mobile user experience requires a different design than whats needed to satisfy desktop users especially given the fact that user attention span on mobile devices are quite short compared to that on desktop browsers. With the rapid proliferation of mobile phones, tablets, and other mobile devices, it would require multiple sites or massive style sheets and scripting to cover every possible situation a user might encounter. One can do so but there is an easier alternative " Responsive Web Design. Websites built using Responsive Web Design automatically adapt the content and/or the layout of the website to match the size and shape of the screen of the mobile device the end user is viewing. Responsive Web Design has gained so much popularity lately that if a user views a site on a phone and it does not dynamically adapt, its annoying.
Debt Relief Attorneys, Los Angeles, CA on iPhoneHere is a simple way to experience Responsive Web Design (yes on your desktop!). Visit this website and then re-size the window. Notice how the graphics on the page change in simple but elegant animation. The desktop screen morphs into a laptop screen, then a tablet, and finally a smartphone as the browser window gets smaller. Whether accessing this site via an iPhone with a Safari browser or a small tablet (480×640 px) or on an iPad (landscape or portrait layout), you will experience a different layout, but a comparable user experience.
Notice there is no horizontal scroll bar as the layout has morphed itself to fit the device screen.
How is this done? One can use liquid layouts (a.k.a. flexible grid) where instead of fixed absolute pixel dimensions we use relative units (em or ex). In other words, the actual size of an element is computed in relation to the size of its parent element. This will convert designs pixel-based dimensions into percentages, and keep the proportions of grid intact as it resizes. In conjunction with liquid layouts, one can use CSS media querieswhere different breakpoints or thresholds are used depending on how your site flows and looks on various devices. It basically means that depending on the resolution of the device you are using, a different layout and/or content may be used.
The biggest benefit to responsive design is the ability to adjust the layout of your content and perhaps the content itself to fit your user in their environment. Another one to note is by using the same URL for both mobile and desktop version means single destination for link building. This will facilitate social sharing of pages via mobile phones meant for desktop consumption. Google recently spoke openly about recommending use of responsive design for mobile strategy.
Check Out More Examples
I invite you to experience an example of Responsive Web Design website we created -Immigration Attorneys, Philadelphia, PA. Some other sites for you to experience responsive design concept are Boston GlobeSony,Starbucks, and food sense. I hope seeing these examples and reading this post, you will be convinced that Mobile Responsive Design is The Future of The Web.

Enterprise SEO, the logical question


Enterprise SEO, the logical question


jump-ship
Google's Penguin and Panda updates have created a sea of turmoil. But before you jump ship, or jump to conclusions, let's look at the current paradox of Enterprise SEO. Specifically, should Search Marketing Strategies turn towards content marketing and social media by copywriters rather than utilizing SEOs, who are often oversimplified as link builders? This blog will provide a matrix for Web Marketing Managers to analyze Enterprise SEO and the fundamental causes resulting in change. Additionally, we will discuss how you can apply this tool to your Search Marketing Strategy.
Panda and Penguin Defined
Panda is "designed to reduce rankings for low-quality sites-sites which are low-value add for users, copy content from other websites or sites that are just not very useful. At the same time, it will provide better rankings for high-quality sites-sites with original content and information."
Penguin is increasingly targeting inbound links, demoting sites/pages that appear to have unnatural inbound links.
Is SEO Changing?
Perhaps this SEO mutiny began at SXSW, where Google's Matt Cutts commented on the purpose of the recent updates, saying:
'So all those people who have sort of been doing, for lack of a better word, "over optimization" or "overly" doing their SEO, compared to the people who are just making great content and trying to make a fantastic site, we want to sort of make that playing field a little bit more level.' Matt Cutts went on to say, "we try to make our relevance more adaptive so that people don't do SEO."
This statement conceivably introduces the logical question of things that grow. Is SEO changing? The response to this proposition is bound to create a dichotomy between web marketing professionals who believe SEO remains viable and people who feel SEO is no longer the same.
Google's Panda update contributes largely to this rising dichotomy between Web Marketing Managers. Specifically, Panda's ranking of sites by original content and information. You can also see an increased value of social media in Google Analytics' Social Reports and cutting-edge platforms like BrightEdge who have partnered with Facebook and Twitter. If original content and social media are burgeoning forms of in-bound link strategy, perhaps it is time to introduce social and copywriter teams? For SEOs, this obviously opens the door to some philosophical debates.
Before responding to this schism of opinion, I want to frame our question, is SEO changing, by borrowing from two men who have yet to receive the credit they deserve from the SEO world: Plutarch and Aristotle. Today, we are going to take a look at how ancient Greek philosophical systems can be used to determine change in the field of Enterprise SEO. Particularly, we will review the Ship of Theseus paradox. And then we'll modernize the paradox, borrowing the name of another famous ship, The Enterprise.
Plutarch's Lives
The paradox was first raised by Plutarch:
"The ship wherein Theseus and the youth of Athens returned [from Crete] had thirty oars, and was preserved by the Athenians ., for they took away the old planks as they decayed, putting in new and stronger timber in their place, insomuch that this ship became a standing example among the philosophers, for the logical question of things that grow; one side holding that the ship remained the same, and the other contending that it was not the same." -Plutarch, Theseus
The Ship of Theseus aka The SEO Enterprise
According to the philosophical system of Aristotle, there are four causes used to understand how fundamental causes result in change. These causes have been used by Managers in different fields of business, sports and even music to determine if change has occurred. {ex. What causes to the Rolling Stones would result in a change, i.e. How would they cease to be the Rolling Stones? Replacing Mick Jagger? Or, why have they remained constant despite exchanging 6 past members?}
First, we will identify the "four causes" using the Ship of Theseus paradox. Next, we will apply these causes to the SEO Enterprise paradox.
  • The formal cause or form is the design of a thing. The "what-it-is" of a thing, but not to be confused with the matter used to construct it.
  • The material cause is the matter that the thing is made of, i.e. the planks.
  • The efficient cause is how and by whom a thing is made, for example, the methods artisans used to fabricate and assemble the Ship of Theseus, the workers who built the ship.
  • The final cause is the intended purpose of a thing. In this case, The Ship of Theseus' purpose was transporting Theseus.
Ship of Theseus

For Enterprise SEOs, these causes can be applied for your own solution to the paradox.
  • Has the design of SEO changed? Is the formal cause the same? It still explores how search engines work, people's search queries, and the actual search terms.
  • The material cause refers to the planks: keywords, meta data, image tags, anchor text, urls, backlinks. In this sense, are SEO planks the same? How do Google Updates affect your planks? If you were using Black Hat tactics, then you will need to replace planks. Panda and Penguin updates reiterate link relevancy. So your planks should remain, if you were using White Hat tactics.
  • The efficient cause may or may not be changing, this depends on the strategy. Do you incorporate a new fabricator? Link builder vs. Copywriter? Or is there a synthesis?
  • The final cause remains: SEO's purpose is to improve the visibility on search engine results pages (SERP).
The idea behind the SEO Enterprise paradox is for you to determine if Google's updates (or future updates) have created a need for YOU to change YOUR Search Marketing Strategies. It is an opportunity to identify the fundamental cause behind your Enterprise SEO. By associating your own causes you can decide how to best move forward. Therefore, the SEO Enterprise is a standing example among the Web Marketing Managers "for the logical question of things that grow; one side holding that the ship remained the same, and the other contending that it was not the same."
Is it time to jump ship?
Remember that for the SEO Enterprise, similar to the Ship of Theseus, the replacing of the planks takes place while the ship is at sea. Therefore, it is a constant process. But how do we navigate through Google's tumultuous peaks and troughs? Our North Star is Domain Authority. And yes, The SEO Enterprise's future is belayed by new tools and techniques, recently: original content, social media, and link relevancy. But, it is healthy for Web Marketing Managers to debate whether it is still the same ship.
Furthermore, SEOs should welcome the copywriters onboard. Not to avoid SEO Enterprise's commandeering, but because in this increasingly competitive world of search marketing we need all hands on deck. The efficient cause should involve a synthesis. I would implore you to adapt this approach to the challenges of Search Engine Optimization. And, explore the idea of creating a dynamic response that combines the intuitive approach of both copywriters and SEOs. Algorithms may alter the course, but it isn't time to jump ship.

How To Get Your Startup Featured By Giants


How To Get Your Startup Featured By Giants


Get Your Startup Featured By Giants
Let's face it, the only way to really get your startup off the ground is through tireless, frustrating work. Anyone who has begun the process knows well the long hours, the neat constant struggle and the process of moving through each new stage and milestone with the emotional ups and downs that come along with it. It is just all a part of the journey.
But that doesn't mean we aren't all looking for a leg up. Especially when it comes to being featured by one of the well respected media giants on the web. Mashable, Endadget, Gizmodo and Tech Crunch are the most commonly cited dream features from most startups on the web. Given their massive user base and popularity, that isn't a surprise.
So, how do you get them to take notice? That question was asked on Quora and there have been absolutely awesome answers. Here are my takeaways:
Get Your Startup Featured By Giants
  • Provide an exclusive. No matter what the blog, it will be looking for exclusives. But TechCrunch and Mashable are especially interested in being the first to see a story go out. Which means they will actively kill stories if they find out that someone released or leaked it first. If someone else is planning on publishing a feature, you have no chance of getting a post on either of these blogs.
  • Make sure the appeal of the story is a broad one. Both blogs are syndicated, and with big name media sources like CNN, Forbes and USA Today. So you can't have a startup that only appeals to a small, niche audience. It has to have a broader appeal that can be picked up by any of these publications for a followup. Even if your company is very specific in their target user base, if you can find a way to make it interesting for almost anybody, you have a shot.
  • Be direct in your pitch. A lot of people make the mistake of droning on and on in their email pitches. Which none of the reporters or editors appreciate. Because they all get hundreds of emails per day, all with requests for features, you have to get and hold their attention. Which means being direct, succinct and offering all of the details within a couple of sentences. Tell them what your product or business does, when it was started or is launching, give a link to whatever video or page you think is relevant and leave it at that.
  • Get someone trusted in the industry to vouch for your startup. One of the fastest ways into a feature is by being endorsed by someone in the industry that is trusted and well known within the behind-the-scenes circle of people at one of these blogs.
  • Make sure you improve your product prior to release. Let's say you manage to catch someone's attention, get an endorsement and you are given a post on an exclusive review. That's great! What isn't so great is that you didn't pre-release some kind of beta that allowed people to try it out first. This led to bugs, and so the product you launch doesn't work properly. Now, you have your feature. But it is a brutal post essentially tearing apart your startup for making something that isn't up to scratch. No one wants that. Contact them early, long before release. Make sure it works properly and improve it before the final product is reviewed.
  • Know who you are asking. It is better to already have some level of a relationship with the press before you start asking them to do things for you. This is a basic of business PR; you don't want to come off as a media leech, after all. Take some time to get acquainted with writers, editors, reporters and their work. Try commenting on blog posts, corresponding via email and just becoming a regular face instead of someone in the endless crowd.
  • Use the proper media. I have heard of blogs cutting features because they didn't have the proper media to go forward with it. No joke; they won't waste their time if they don't have visuals to go along with it that are easily shared and avoid potential copyright issues. Have prepared thumbnails, images, embedded videos and various other media in a press pack, ready to go out.

Wednesday, 12 September 2012

Heteroglot: #15 in COBOL


Heteroglot: #15 in COBOL

Introduction

Many moons ago, I started a ridiculous quest to solve every Project Euler problem, in order, with a different programming language. I called it “heteroglot”.
Partway through that, I gave myself the additional unwritten rule that the next language would be selected by polling the nearest group of nerds. This has resulted in math problems solved in such wildly inappropriate languages as vimscriptMUMPSLOLcode, and XSLT.
It’s been a while since I did one of these, but I still remember that the next language I’m stuck using is COBOL. I don’t know who suggested it, but I hope he chokes on a rake. ♥
I figure if this is interesting to me, it might be interesting to someone else. So let’s learn some math and/or COBOL.

The math

Illustration of the six paths from the top-left to bottom-right of a 2×2 grid, following the grid lines.
Problem 15:
Starting in the top left corner of a 2×2 grid, there are 6 routes (without backtracking) to the bottom right corner.
How many routes are there through a 20×20 grid?
There are two approaches to solving this: actually count every path, or invent a formula. I’d like to spend as little time with COBOL as possible today, so let’s try the latter approach.
So, find a pattern.
  • In the trivial case (0×0), there’s only 1 path.
  • For 1×1, there are 2 paths: effectively clockwise and counter-clockwise.
  • The problem already states that 2×2 has 6 paths.
Now, wait. Before considering 3×3, bear in mind: nothing about this problem requires that the grid be square. Think of some other small sizes:
  • 0×1 and 0×2 also have only one path. Naturally, any grid with either dimension of 0 will have only one possible path, because it’s a straight line.
  • 1×2 has 3 paths: clockwise, counter-clockwise, and through the middle in an S shape.
      @@@@    @--+    @--+
      ¦  @    @  ¦    @  ¦
      +--@    @--+    @@@@
      ¦  @    @  ¦    ¦  @
      +--@    @@@@    +--@
    
  • Consider 1×3. It has four horizontal grid lines, making for 4 possible paths: one for each horizontal line.
      @@@@    @--+    @--+    @--+
      ¦  @    @  ¦    @  ¦    @  ¦
      +--@    @@@@    @--+    @--+
      ¦  @    ¦  @    @  ¦    @  ¦
      +--@    +--@    @@@@    @--+
      ¦  @    ¦  @    ¦  @    @  ¦
      +--@    +--@    +--@    @@@@
    
Has a pattern emerged?
· | 0   1   2   3
--+--------------
0 | 1   1   1   1
1 | 1   2   3   4
2 | 1   3   6
3 | 1   4
Oh ho ho. Yes, yes it has. Tilt that table diagonally.
        1
      1   1
    1   2   1
  1   3   3   1
1   4   6   4   1
This is Pascal’s Triangle.
In retrospect, this makes perfect sense. Consider the 3×3 grid. Starting from the top left, there are only two possible directions to go: right, or down. If you go right, you can only follow the possible paths for a 2×3 grid. If you go down, you can only follow the possible paths for a 3×2 grid. And none of them can overlap, because you started differently.
+--+--+--+      @@@@--+--+    @
¦  ¦  ¦  ¦         ¦  ¦  ¦    @
+--+--+--+         +--+--+    @--+--+--+
¦  ¦  ¦  ¦  =>     ¦  ¦  ¦    ¦  ¦  ¦  ¦
+--+--+--+         +--+--+    +--+--+--+
¦  ¦  ¦  ¦         ¦  ¦  ¦    ¦  ¦  ¦  ¦
+--+--+--+         +--+--+    +--+--+--+
So in the table, any given number is the sum of the number immediately to its left and immediately above it: the two solutions for the same-size grid with one fewer row or one fewer column. That’s exactly how Pascal’s Triangle is created.
In the nth row of the triangle, the number at offset r (both counting from zero) is given by nCr(n, r). All I need now is to convert a grid size a×b to a row in the triangle. Each triangle row is a diagonal of the original table, so you get the row number from a + b, and the offset is either a or b. The answer is then nCr(a + b, a).
Check against what I know: 1×1 is nCr(2, 1) = 2, 2×2 is nCr(4, 2) = 6. 0-by-anything is 1. Lookin good.
From here I could just figure it out with a calculator, but that’s cheating. Time to find a COBOL compiler.

The code

I’m on Arch, and the first thing I found was OpenCOBOLon the AUR, so I’m installing this bad boy. Your results may vary, if for some reason you’re following along.
eevee@perushian ~ ⚘ sudo packer -S open-cobol
Now I need to learn some COBOL. OpenCOBOL’s site helpfully links this OpenCOBOL Programmer’s Guide. Let’s see what I have here.
1.3.1. “I Heard COBOL is a Dead Language!” Phoenician is a dead language. Mayan is a dead language. Latin is a dead language. What makes these languages dead is the fact that no one speaks them anymore. COBOL is NOT a dead language, and despite pontifications that come down to us from the ivory towers of academia, it isn’t even on life support.
As more and more people became at least informed about programming if not downright skilled, the syntax of COBOL became one of the reasons the ivory-tower types wanted to see it eradicated.
My archaeological adventure is off to a fantastic start.
Right, well, step two: what the hell does a program look like? I am dimly away that COBOL has a lot of wordy setup and DIVISIONs of code or data or something. Section 2 starts to explain this setup. The only required part of a COBOL program appears to be PROGRAM-ID. {program-name}, but that won’t actually do anything. So I think I’ll actually need something more like this:
IDENTIFICATION DIVISION.
PROGRAM-ID. project-euler-15

DATA DIVISION.
// something to specify 20 by 20

PROCEDURE DIVISION.
// make it go

END PROGRAM project-euler-15.
That last part isn’t actually necessary if I’m only building one file, but I like the feeling of talking to a computer with no prepositions or particles. Reminds me a little of Robotic.
At this point I like to stick my no-op program in a file and compile it, just to make sure I have something valid (and also to figure out how to compile). Here I discover several things.
  • COBOL source is .cob. Or .cbl, but that’s not as funny.
  • vim has built-in COBOL syntax highlighting.
  • Because “indented block” is nonsense in COBOL, the shift operators (< and >) do nothing. (The above block was indented, because my blog is all Markdown, and I had to outdent it manually.)
  • Everything about the code above is wrong. Everything. Every single character is syntax colored as an error.
I’m having flashbacks to MUMPS already.
Let’s continue reading. In §1.5, “Source Program Format”, it is revealed that the compiler can run in two modes: fixed (the default) and free. Fixed mode uses “traditional” 80-column formatting. This rings some faint bells: COBOL is all about the columns. What column does code need to start in? Fuck if I know. I can’t find anywhere in the documentation for this compiler that actually explains how fixed mode works.
Back to the website, and I find that the online User Manual is not very thorough but does contain an examplehello world program, which explicitly states that program lines must start in column 8.
And, indeed, indenting everything by 7 spaces makes vim happy. Now I have:
1
2
3
4
5
6
7
8
9
10
   IDENTIFICATION DIVISION.
   PROGRAM-ID. project-euler-15

   DATA DIVISION.
  * something to specify 20 by 20

   PROCEDURE DIVISION.
  * make it go

   END PROGRAM project-euler-15.
Haha, and people complain that Python has significant whitespace. You assholes. Guess what I’m linking you next time I hear that.
At last, time to try running this thing. The hello world program comes with super simple instructions for that, too.
⚘ cobc -x 015.cob
⚘ ./015
Success! Nothing happened.

Do a thing

First is the seed data, which here is just the size of the grid: 20×20. I’m gonna go out on a limb here and guess that data goes in the DATA DIVISION. This handy programmer guide has a page-sized diagram of the syntax for defining data and many more pages of the clusterfuck that is record syntax, but luckily there’s a much simpler way to define constants:
1
78 foo VALUE IS bar.
The 78 is a “level”, an ancient incantation used to specify just how deep in the hierarchy a datum is. In this case78 happens to be a special level used only for constants.
Before trying to run this again, it’d be helpful to print out the constants and make sure I’ve actually defined them correctly. This is done with DISPLAY. (The same statement, inexplicably, also inspects command-like arguments and gets/sets environment variables. What.)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
   IDENTIFICATION DIVISION.
   PROGRAM-ID. project-euler-15


   DATA DIVISION.
   WORKING-STORAGE SECTION.

  * grid size: 20 x 20
   78 width VALUE IS 20.
   78 height VALUE IS 20.


   PROCEDURE DIVISION.

   DISPLAY width
       UPON CONSOLE
   DISPLAY height
       UPON CONSOLE


   END PROGRAM project-euler-15.
The UPON CONSOLE is entirely optional but it looks like I’m hacking a mainframe so I’m including it anyway.
And, whoops, this totally doesn’t work. Unsurprisingly, the PROCEDURE DIVISION needs code to be in… procedures. I had to give up and just look at the same programs here, but the short version is, do this:
1
2
3
4
5
6
7
   PROCEDURE DIVISION.
   do-the-needful.
       DISPLAY width
           UPON CONSOLE
       DISPLAY height
           UPON CONSOLE
       .
Compile, run, and get 20 twice. Off to a fabulous start.
Just need the math.
A flip through the list of statements finds me PERFORM, which both calls procedures and acts like a loop. I might as well make this a real program, so let’s do both and write a real function. Sorry, procedure.
I want to implement nCr(). I need a numerator and denominator accumulator, a loop of r times, and some multiplication. Seems easy enough.
The first stumbling block is, er, creating variables. There’s nothing to do that. They all go in the DATA DIVISION.All of them. In this case I want a LOCAL-STORAGE section, which is re-initialized for every procedure—that means it should act like a local.
I want a loop variable, a numerator, a denominator, and two arguments.
Arguments.
Hmmmm.
It is at this point that I begin to realize that COBOL procedures do not take arguments or have return values. Everything appears to be done with globals.
There’s a CALL statement, but it calls subprograms—that is, a whole other IDENTIFICATION DIVISION and everything. And even that uses globals. Also it thinks BY VALUE for passing means to pass a pointer address, and passing literals BY REFERENCE allows the callee to mutate that literal anywhere else it appears in the program, and various other bizarre semantics.
Let’s, um, just go with the globals. Some fumbling produces:
1
2
3
4
5
6
7
8
9
   n-choose-r.
       MOVE 1 TO numerator
       MOVE 1 TO denominator
       PERFORM VARYING i FROM 1 BY 1 UNTIL i > r
           MULTIPLY i BY denominator
           COMPUTE numerator = numerator * (n - i + 1)
       END-PERFORM
       COMPUTE n-choose-r-result = numerator / denominator
       .
A note on assignment in COBOL: there isn’t any. Instead, there are several different statements for different kinds of assigning. ADDSUBTRACTMULTIPLY, and DIVIDE all divide a variable or a literal (but not an expression!) into a variable and store the result into that variable. MOVE stores a variable or a literal (but, again, not an expression) into a variable. COMPUTE stores an arbitrary expression into a variable. I assume COMPUTE, um, came later.
Anyway, the idea here would be that you store the arguments into the n and r globals, PERFORM this procedure or paragraph or whatever, then get your result out of the n-choose-r-result global. The globals are in the DATA DIVISION like this:
1
2
3
4
5
6
7
8
9
   LOCAL-STORAGE SECTION.

  * used by n-choose-r
   01 i                            USAGE IS UNSIGNED-LONG.
   01 n                            USAGE IS UNSIGNED-LONG.
   01 r                            USAGE IS UNSIGNED-LONG.
   01 numerator                    USAGE IS UNSIGNED-LONG.
   01 denominator                  USAGE IS UNSIGNED-LONG.
   01 n-choose-r-result            USAGE IS UNSIGNED-LONG.
(UNSIGNED-LONG is a 64-bit unsigned machine integer, the biggest machine number COBOL appears to have.)
Compile it, run it, and the answer is… 6.
Hmmm.
A little DISPLAYing reveals that the numerator and denominator print as 688017186506670080 and 432902008176640000, respectively. It looks like 64 bits is not enough, and I’m overflowing. Oops.
Well. I could set out to see if COBOL does bignums or if the whole PIC thing supports arbitrary precision, but I’m scared to think what I might find. Instead, let’s do some more math.
Consider that nCr(n, r) for any nonnegative integers n and r is always, itself, an integer. (This isn’t too hard to prove informally, but just accepting it is enough.) So I know:
nCr(n, 1) = n / 1
nCr(n, 2) = n * (n - 1) / (2 * 1)
          = n / 1 * (n - 1) / 2
nCr(n, 3) = n * (n - 1) * (n - 2) / (3 * 2 * 1)
          = n / 1 * (n - 1) / 2 * (n - 2) / 3
I can take advantage of this to minimize the intermediate results without ever worrying about floating-point. (Does COBOL support floating-point? Christ, I don’t want to know.)
1
2
3
4
5
6
7
   n-choose-r.
       MOVE 1 TO n-choose-r-result
       PERFORM VARYING i FROM 1 BY 1 UNTIL i > r
           COMPUTE n-choose-r-result =
               n-choose-r-result * (n - i + 1) / i
       END-PERFORM
       .
This produces the answer: 000000137846528820.
Er… eh, close enough. And the internets suggest it may not really be possible to avoid the leading zeroes.
Throw it at Euler and, indeed, this is correct. Phew. Done! The final program is 015.cob.

Impression

COBOL is even more of a lumbering beast than I’d imagined; everything is global, “procedures” are barely a level above goto, and the bare metal shows through in crazy places like the possibility of changing the value of a literal (what).
On the other hand, I can see how the design maps pretty naturally to bare metal, and the alternatives at the time were Fortran and ALGOL. Ada didn’t exist. C didn’t exist. Hell, B didn’t exist. The original Lisp paper had only just been published! In that light, COBOL is a reasonably impressive piece of work, which I will never use again if I can possibly avoid it.
One thing that slightly bewilders me is how COBOL came to both have so many ways to do the same thing, yetalso so heavily reuse some keywords. DISPLAY both prints stuff out and messes with environment variables.PERFORM both calls a procedure and performs a loop. Or calls a procedure in a loop. And it has some pretty complex syntax for determining when the loop ends and how many times it runs and whether there’s an incrementor. It even has syntax explicitly designed for doing nested loops without actually having to nest loops. What?
As a closing note, consider: just like MUMPS, second-hand experience tells me that there are still big high-level government/financial COBOL applications probably handling your money. Sleep well.

More choice quotes about COBOL

I can’t resist. This programmer’s guide is amazing. I know COBOL is ass-old, but this guide was published in 2009!
On endianness.
All CPUs are capable of “understanding” big-endian format, which makes it the “most-compatible” form of binary storage across computer systems.
Some CPUs – such as the Intel/AMD i386/x64 architecture processors such as those used in most Windows PCs – prefer to process binary data stored in a little-endian format. Since that format is more efficient on those systems, it is referred to as the “native” binary format.
On working with libraries.
Today’s current programming languages have a statement (usually, this statement is named “include” or “#include”) that performs this same function. What makes the COBOL copybook feature different than the “include” facility in current languages, however, is the fact that the COBOL COPY statement can edit the imported source code as it is being copied. This capability enables copybook libraries extremely valuable to making code reusable.
On whitespace.
A comma character (“,”) or a semicolon (“;”) may be inserted into an OpenCOBOL program to improve readability at any spot where white space would be legal (except, of course, within alphanumeric literals). These characters are always optional. COBOL standards require that commas be followed by at least one space, when they’re used. Many modern COBOL compilers (OpenCOBOL included) relax this rule, allowing the space to be omitted in most instances. This can cause “confusion” to the compiler if the DECIMAL POINT IS COMMA clause is used (see section 4.1.4).
On the DISPLAY statement.
The specified mnemonic-name must be CONSOLE, CRT, PRINTER or any user-defined mnemonic name associated with one of these devices within the SPECIAL-NAMES paragraph (see section 4.1.4). All such mnemonics specify the same destination – the shell (UNIX) or console (Windows) window from which the program was run.

Recent Posts